UNPKG

287 kBJavaScriptView Raw
1// modules are defined as an array
2// [ module function, map of requires ]
3//
4// map of requires is short require name -> numeric require
5//
6// anything defined in a previous bundle is accessed via the
7// orig method which is the require for previous bundles
8parcelRequire = (function (modules, cache, entry, globalName) {
9 // Save the require from previous bundle to this closure if any
10 var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11 var nodeRequire = typeof require === 'function' && require;
12
13 function newRequire(name, jumped) {
14 if (!cache[name]) {
15 if (!modules[name]) {
16 // if we cannot find the module within our internal map or
17 // cache jump to the current global require ie. the last bundle
18 // that was added to the page.
19 var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20 if (!jumped && currentRequire) {
21 return currentRequire(name, true);
22 }
23
24 // If there are other bundles on this page the require from the
25 // previous one is saved to 'previousRequire'. Repeat this as
26 // many times as there are bundles until the module is found or
27 // we exhaust the require chain.
28 if (previousRequire) {
29 return previousRequire(name, true);
30 }
31
32 // Try the node require function if it exists.
33 if (nodeRequire && typeof name === 'string') {
34 return nodeRequire(name);
35 }
36
37 var err = new Error('Cannot find module \'' + name + '\'');
38 err.code = 'MODULE_NOT_FOUND';
39 throw err;
40 }
41
42 localRequire.resolve = resolve;
43 localRequire.cache = {};
44
45 var module = cache[name] = new newRequire.Module(name);
46
47 modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48 }
49
50 return cache[name].exports;
51
52 function localRequire(x){
53 return newRequire(localRequire.resolve(x));
54 }
55
56 function resolve(x){
57 return modules[name][1][x] || x;
58 }
59 }
60
61 function Module(moduleName) {
62 this.id = moduleName;
63 this.bundle = newRequire;
64 this.exports = {};
65 }
66
67 newRequire.isParcelRequire = true;
68 newRequire.Module = Module;
69 newRequire.modules = modules;
70 newRequire.cache = cache;
71 newRequire.parent = previousRequire;
72 newRequire.register = function (id, exports) {
73 modules[id] = [function (require, module) {
74 module.exports = exports;
75 }, {}];
76 };
77
78 var error;
79 for (var i = 0; i < entry.length; i++) {
80 try {
81 newRequire(entry[i]);
82 } catch (e) {
83 // Save first error but execute all entries
84 if (!error) {
85 error = e;
86 }
87 }
88 }
89
90 if (entry.length) {
91 // Expose entry point to Node, AMD or browser globals
92 // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93 var mainExports = newRequire(entry[entry.length - 1]);
94
95 // CommonJS
96 if (typeof exports === "object" && typeof module !== "undefined") {
97 module.exports = mainExports;
98
99 // RequireJS
100 } else if (typeof define === "function" && define.amd) {
101 define(function () {
102 return mainExports;
103 });
104
105 // <script>
106 } else if (globalName) {
107 this[globalName] = mainExports;
108 }
109 }
110
111 // Override the current require with this new one
112 parcelRequire = newRequire;
113
114 if (error) {
115 // throw error from earlier, _after updating parcelRequire_
116 throw error;
117 }
118
119 return newRequire;
120})({"../../node_modules/preact/dist/preact.module.js":[function(require,module,exports) {
121"use strict";
122
123Object.defineProperty(exports, "__esModule", {
124 value: true
125});
126exports.render = N;
127exports.hydrate = O;
128exports.h = exports.createElement = a;
129exports.Fragment = y;
130exports.createRef = h;
131exports.Component = p;
132exports.cloneElement = S;
133exports.createContext = q;
134exports.toChildArray = w;
135exports.options = exports.isValidElement = void 0;
136var n,
137 l,
138 u,
139 i,
140 t,
141 r,
142 o = {},
143 f = [],
144 e = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
145exports.isValidElement = l;
146exports.options = n;
147
148function c(n, l) {
149 for (var u in l) n[u] = l[u];
150
151 return n;
152}
153
154function s(n) {
155 var l = n.parentNode;
156 l && l.removeChild(n);
157}
158
159function a(n, l, u) {
160 var i,
161 t,
162 r,
163 o = arguments,
164 f = {};
165
166 for (r in l) "key" == r ? i = l[r] : "ref" == r ? t = l[r] : f[r] = l[r];
167
168 if (arguments.length > 3) for (u = [u], r = 3; r < arguments.length; r++) u.push(o[r]);
169 if (null != u && (f.children = u), "function" == typeof n && null != n.defaultProps) for (r in n.defaultProps) void 0 === f[r] && (f[r] = n.defaultProps[r]);
170 return v(n, f, i, t, null);
171}
172
173function v(l, u, i, t, r) {
174 var o = {
175 type: l,
176 props: u,
177 key: i,
178 ref: t,
179 __k: null,
180 __: null,
181 __b: 0,
182 __e: null,
183 __d: void 0,
184 __c: null,
185 __h: null,
186 constructor: void 0,
187 __v: null == r ? ++n.__v : r
188 };
189 return null != n.vnode && n.vnode(o), o;
190}
191
192function h() {
193 return {
194 current: null
195 };
196}
197
198function y(n) {
199 return n.children;
200}
201
202function p(n, l) {
203 this.props = n, this.context = l;
204}
205
206function d(n, l) {
207 if (null == l) return n.__ ? d(n.__, n.__.__k.indexOf(n) + 1) : null;
208
209 for (var u; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) return u.__e;
210
211 return "function" == typeof n.type ? d(n) : null;
212}
213
214function _(n) {
215 var l, u;
216
217 if (null != (n = n.__) && null != n.__c) {
218 for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) {
219 n.__e = n.__c.base = u.__e;
220 break;
221 }
222
223 return _(n);
224 }
225}
226
227function k(l) {
228 (!l.__d && (l.__d = !0) && u.push(l) && !m.__r++ || t !== n.debounceRendering) && ((t = n.debounceRendering) || i)(m);
229}
230
231function m() {
232 for (var n; m.__r = u.length;) n = u.sort(function (n, l) {
233 return n.__v.__b - l.__v.__b;
234 }), u = [], n.some(function (n) {
235 var l, u, i, t, r, o;
236 n.__d && (r = (t = (l = n).__v).__e, (o = l.__P) && (u = [], (i = c({}, t)).__v = t.__v + 1, T(o, t, i, l.__n, void 0 !== o.ownerSVGElement, null != t.__h ? [r] : null, u, null == r ? d(t) : r, t.__h), j(u, t), t.__e != r && _(t)));
237 });
238}
239
240function b(n, l, u, i, t, r, e, c, s, a) {
241 var h,
242 p,
243 _,
244 k,
245 m,
246 b,
247 w,
248 A = i && i.__k || f,
249 P = A.length;
250
251 for (u.__k = [], h = 0; h < l.length; h++) if (null != (k = u.__k[h] = null == (k = l[h]) || "boolean" == typeof k ? null : "string" == typeof k || "number" == typeof k ? v(null, k, null, null, k) : Array.isArray(k) ? v(y, {
252 children: k
253 }, null, null, null) : k.__b > 0 ? v(k.type, k.props, k.key, null, k.__v) : k)) {
254 if (k.__ = u, k.__b = u.__b + 1, null === (_ = A[h]) || _ && k.key == _.key && k.type === _.type) A[h] = void 0;else for (p = 0; p < P; p++) {
255 if ((_ = A[p]) && k.key == _.key && k.type === _.type) {
256 A[p] = void 0;
257 break;
258 }
259
260 _ = null;
261 }
262 T(n, k, _ = _ || o, t, r, e, c, s, a), m = k.__e, (p = k.ref) && _.ref != p && (w || (w = []), _.ref && w.push(_.ref, null, k), w.push(p, k.__c || m, k)), null != m ? (null == b && (b = m), "function" == typeof k.type && null != k.__k && k.__k === _.__k ? k.__d = s = g(k, s, n) : s = x(n, k, _, A, m, s), a || "option" !== u.type ? "function" == typeof u.type && (u.__d = s) : n.value = "") : s && _.__e == s && s.parentNode != n && (s = d(_));
263 }
264
265 for (u.__e = b, h = P; h--;) null != A[h] && ("function" == typeof u.type && null != A[h].__e && A[h].__e == u.__d && (u.__d = d(i, h + 1)), L(A[h], A[h]));
266
267 if (w) for (h = 0; h < w.length; h++) I(w[h], w[++h], w[++h]);
268}
269
270function g(n, l, u) {
271 var i, t;
272
273 for (i = 0; i < n.__k.length; i++) (t = n.__k[i]) && (t.__ = n, l = "function" == typeof t.type ? g(t, l, u) : x(u, t, t, n.__k, t.__e, l));
274
275 return l;
276}
277
278function w(n, l) {
279 return l = l || [], null == n || "boolean" == typeof n || (Array.isArray(n) ? n.some(function (n) {
280 w(n, l);
281 }) : l.push(n)), l;
282}
283
284function x(n, l, u, i, t, r) {
285 var o, f, e;
286 if (void 0 !== l.__d) o = l.__d, l.__d = void 0;else if (null == u || t != r || null == t.parentNode) n: if (null == r || r.parentNode !== n) n.appendChild(t), o = null;else {
287 for (f = r, e = 0; (f = f.nextSibling) && e < i.length; e += 2) if (f == t) break n;
288
289 n.insertBefore(t, r), o = r;
290 }
291 return void 0 !== o ? o : t.nextSibling;
292}
293
294function A(n, l, u, i, t) {
295 var r;
296
297 for (r in u) "children" === r || "key" === r || r in l || C(n, r, null, u[r], i);
298
299 for (r in l) t && "function" != typeof l[r] || "children" === r || "key" === r || "value" === r || "checked" === r || u[r] === l[r] || C(n, r, l[r], u[r], i);
300}
301
302function P(n, l, u) {
303 "-" === l[0] ? n.setProperty(l, u) : n[l] = null == u ? "" : "number" != typeof u || e.test(l) ? u : u + "px";
304}
305
306function C(n, l, u, i, t) {
307 var r;
308
309 n: if ("style" === l) {
310 if ("string" == typeof u) n.style.cssText = u;else {
311 if ("string" == typeof i && (n.style.cssText = i = ""), i) for (l in i) u && l in u || P(n.style, l, "");
312 if (u) for (l in u) i && u[l] === i[l] || P(n.style, l, u[l]);
313 }
314 } else if ("o" === l[0] && "n" === l[1]) r = l !== (l = l.replace(/Capture$/, "")), l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + r] = u, u ? i || n.addEventListener(l, r ? H : $, r) : n.removeEventListener(l, r ? H : $, r);else if ("dangerouslySetInnerHTML" !== l) {
315 if (t) l = l.replace(/xlink[H:h]/, "h").replace(/sName$/, "s");else if ("href" !== l && "list" !== l && "form" !== l && "download" !== l && l in n) try {
316 n[l] = null == u ? "" : u;
317 break n;
318 } catch (n) {}
319 "function" == typeof u || (null != u && (!1 !== u || "a" === l[0] && "r" === l[1]) ? n.setAttribute(l, u) : n.removeAttribute(l));
320 }
321}
322
323function $(l) {
324 this.l[l.type + !1](n.event ? n.event(l) : l);
325}
326
327function H(l) {
328 this.l[l.type + !0](n.event ? n.event(l) : l);
329}
330
331function T(l, u, i, t, r, o, f, e, s) {
332 var a,
333 v,
334 h,
335 d,
336 _,
337 k,
338 m,
339 g,
340 w,
341 x,
342 A,
343 P = u.type;
344
345 if (void 0 !== u.constructor) return null;
346 null != i.__h && (s = i.__h, e = u.__e = i.__e, u.__h = null, o = [e]), (a = n.__b) && a(u);
347
348 try {
349 n: if ("function" == typeof P) {
350 if (g = u.props, w = (a = P.contextType) && t[a.__c], x = a ? w ? w.props.value : a.__ : t, i.__c ? m = (v = u.__c = i.__c).__ = v.__E : ("prototype" in P && P.prototype.render ? u.__c = v = new P(g, x) : (u.__c = v = new p(g, x), v.constructor = P, v.render = M), w && w.sub(v), v.props = g, v.state || (v.state = {}), v.context = x, v.__n = t, h = v.__d = !0, v.__h = []), null == v.__s && (v.__s = v.state), null != P.getDerivedStateFromProps && (v.__s == v.state && (v.__s = c({}, v.__s)), c(v.__s, P.getDerivedStateFromProps(g, v.__s))), d = v.props, _ = v.state, h) null == P.getDerivedStateFromProps && null != v.componentWillMount && v.componentWillMount(), null != v.componentDidMount && v.__h.push(v.componentDidMount);else {
351 if (null == P.getDerivedStateFromProps && g !== d && null != v.componentWillReceiveProps && v.componentWillReceiveProps(g, x), !v.__e && null != v.shouldComponentUpdate && !1 === v.shouldComponentUpdate(g, v.__s, x) || u.__v === i.__v) {
352 v.props = g, v.state = v.__s, u.__v !== i.__v && (v.__d = !1), v.__v = u, u.__e = i.__e, u.__k = i.__k, v.__h.length && f.push(v);
353 break n;
354 }
355
356 null != v.componentWillUpdate && v.componentWillUpdate(g, v.__s, x), null != v.componentDidUpdate && v.__h.push(function () {
357 v.componentDidUpdate(d, _, k);
358 });
359 }
360 v.context = x, v.props = g, v.state = v.__s, (a = n.__r) && a(u), v.__d = !1, v.__v = u, v.__P = l, a = v.render(v.props, v.state, v.context), v.state = v.__s, null != v.getChildContext && (t = c(c({}, t), v.getChildContext())), h || null == v.getSnapshotBeforeUpdate || (k = v.getSnapshotBeforeUpdate(d, _)), A = null != a && a.type === y && null == a.key ? a.props.children : a, b(l, Array.isArray(A) ? A : [A], u, i, t, r, o, f, e, s), v.base = u.__e, u.__h = null, v.__h.length && f.push(v), m && (v.__E = v.__ = null), v.__e = !1;
361 } else null == o && u.__v === i.__v ? (u.__k = i.__k, u.__e = i.__e) : u.__e = z(i.__e, u, i, t, r, o, f, s);
362
363 (a = n.diffed) && a(u);
364 } catch (l) {
365 u.__v = null, (s || null != o) && (u.__e = e, u.__h = !!s, o[o.indexOf(e)] = null), n.__e(l, u, i);
366 }
367}
368
369function j(l, u) {
370 n.__c && n.__c(u, l), l.some(function (u) {
371 try {
372 l = u.__h, u.__h = [], l.some(function (n) {
373 n.call(u);
374 });
375 } catch (l) {
376 n.__e(l, u.__v);
377 }
378 });
379}
380
381function z(n, l, u, i, t, r, e, c) {
382 var a,
383 v,
384 h,
385 y,
386 p = u.props,
387 d = l.props,
388 _ = l.type,
389 k = 0;
390 if ("svg" === _ && (t = !0), null != r) for (; k < r.length; k++) if ((a = r[k]) && (a === n || (_ ? a.localName == _ : 3 == a.nodeType))) {
391 n = a, r[k] = null;
392 break;
393 }
394
395 if (null == n) {
396 if (null === _) return document.createTextNode(d);
397 n = t ? document.createElementNS("http://www.w3.org/2000/svg", _) : document.createElement(_, d.is && d), r = null, c = !1;
398 }
399
400 if (null === _) p === d || c && n.data === d || (n.data = d);else {
401 if (r = r && f.slice.call(n.childNodes), v = (p = u.props || o).dangerouslySetInnerHTML, h = d.dangerouslySetInnerHTML, !c) {
402 if (null != r) for (p = {}, y = 0; y < n.attributes.length; y++) p[n.attributes[y].name] = n.attributes[y].value;
403 (h || v) && (h && (v && h.__html == v.__html || h.__html === n.innerHTML) || (n.innerHTML = h && h.__html || ""));
404 }
405
406 if (A(n, d, p, t, c), h) l.__k = [];else if (k = l.props.children, b(n, Array.isArray(k) ? k : [k], l, u, i, t && "foreignObject" !== _, r, e, n.firstChild, c), null != r) for (k = r.length; k--;) null != r[k] && s(r[k]);
407 c || ("value" in d && void 0 !== (k = d.value) && (k !== n.value || "progress" === _ && !k) && C(n, "value", k, p.value, !1), "checked" in d && void 0 !== (k = d.checked) && k !== n.checked && C(n, "checked", k, p.checked, !1));
408 }
409 return n;
410}
411
412function I(l, u, i) {
413 try {
414 "function" == typeof l ? l(u) : l.current = u;
415 } catch (l) {
416 n.__e(l, i);
417 }
418}
419
420function L(l, u, i) {
421 var t, r, o;
422
423 if (n.unmount && n.unmount(l), (t = l.ref) && (t.current && t.current !== l.__e || I(t, null, u)), i || "function" == typeof l.type || (i = null != (r = l.__e)), l.__e = l.__d = void 0, null != (t = l.__c)) {
424 if (t.componentWillUnmount) try {
425 t.componentWillUnmount();
426 } catch (l) {
427 n.__e(l, u);
428 }
429 t.base = t.__P = null;
430 }
431
432 if (t = l.__k) for (o = 0; o < t.length; o++) t[o] && L(t[o], u, i);
433 null != r && s(r);
434}
435
436function M(n, l, u) {
437 return this.constructor(n, u);
438}
439
440function N(l, u, i) {
441 var t, r, e;
442 n.__ && n.__(l, u), r = (t = "function" == typeof i) ? null : i && i.__k || u.__k, e = [], T(u, l = (!t && i || u).__k = a(y, null, [l]), r || o, o, void 0 !== u.ownerSVGElement, !t && i ? [i] : r ? null : u.firstChild ? f.slice.call(u.childNodes) : null, e, !t && i ? i : r ? r.__e : u.firstChild, t), j(e, l);
443}
444
445function O(n, l) {
446 N(n, l, O);
447}
448
449function S(n, l, u) {
450 var i,
451 t,
452 r,
453 o = arguments,
454 f = c({}, n.props);
455
456 for (r in l) "key" == r ? i = l[r] : "ref" == r ? t = l[r] : f[r] = l[r];
457
458 if (arguments.length > 3) for (u = [u], r = 3; r < arguments.length; r++) u.push(o[r]);
459 return null != u && (f.children = u), v(n.type, f, i || n.key, t || n.ref, null);
460}
461
462function q(n, l) {
463 var u = {
464 __c: l = "__cC" + r++,
465 __: n,
466 Consumer: function (n, l) {
467 return n.children(l);
468 },
469 Provider: function (n) {
470 var u, i;
471 return this.getChildContext || (u = [], (i = {})[l] = this, this.getChildContext = function () {
472 return i;
473 }, this.shouldComponentUpdate = function (n) {
474 this.props.value !== n.value && u.some(k);
475 }, this.sub = function (n) {
476 u.push(n);
477 var l = n.componentWillUnmount;
478
479 n.componentWillUnmount = function () {
480 u.splice(u.indexOf(n), 1), l && l.call(n);
481 };
482 }), n.children;
483 }
484 };
485 return u.Provider.__ = u.Consumer.contextType = u;
486}
487
488exports.options = n = {
489 __e: function (n, l) {
490 for (var u, i, t; l = l.__;) if ((u = l.__c) && !u.__) try {
491 if ((i = u.constructor) && null != i.getDerivedStateFromError && (u.setState(i.getDerivedStateFromError(n)), t = u.__d), null != u.componentDidCatch && (u.componentDidCatch(n), t = u.__d), t) return u.__E = u;
492 } catch (l) {
493 n = l;
494 }
495
496 throw n;
497 },
498 __v: 0
499}, exports.isValidElement = l = function (n) {
500 return null != n && void 0 === n.constructor;
501}, p.prototype.setState = function (n, l) {
502 var u;
503 u = null != this.__s && this.__s !== this.state ? this.__s : this.__s = c({}, this.state), "function" == typeof n && (n = n(c({}, u), this.props)), n && c(u, n), null != n && this.__v && (l && this.__h.push(l), k(this));
504}, p.prototype.forceUpdate = function (n) {
505 this.__v && (this.__e = !0, n && this.__h.push(n), k(this));
506}, p.prototype.render = y, u = [], i = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, m.__r = 0, r = 0;
507},{}],"../../node_modules/classnames/index.js":[function(require,module,exports) {
508var define;
509/*!
510 Copyright (c) 2017 Jed Watson.
511 Licensed under the MIT License (MIT), see
512 http://jedwatson.github.io/classnames
513*/
514/* global define */
515
516(function () {
517 'use strict';
518
519 var hasOwn = {}.hasOwnProperty;
520
521 function classNames () {
522 var classes = [];
523
524 for (var i = 0; i < arguments.length; i++) {
525 var arg = arguments[i];
526 if (!arg) continue;
527
528 var argType = typeof arg;
529
530 if (argType === 'string' || argType === 'number') {
531 classes.push(arg);
532 } else if (Array.isArray(arg) && arg.length) {
533 var inner = classNames.apply(null, arg);
534 if (inner) {
535 classes.push(inner);
536 }
537 } else if (argType === 'object') {
538 for (var key in arg) {
539 if (hasOwn.call(arg, key) && arg[key]) {
540 classes.push(key);
541 }
542 }
543 }
544 }
545
546 return classes.join(' ');
547 }
548
549 if (typeof module !== 'undefined' && module.exports) {
550 classNames.default = classNames;
551 module.exports = classNames;
552 } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
553 // register as 'classnames', consistent with npm package name
554 define('classnames', [], function () {
555 return classNames;
556 });
557 } else {
558 window.classNames = classNames;
559 }
560}());
561
562},{}],"../utils/omit.js":[function(require,module,exports) {
563"use strict";
564
565Object.defineProperty(exports, "__esModule", {
566 value: true
567});
568exports.default = void 0;
569
570var _default = function _default(obj) {
571 var keysToDelete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
572 var copy = Object.assign({}, obj);
573 keysToDelete.forEach(function (key) {
574 delete copy[key];
575 });
576 return copy;
577};
578
579exports.default = _default;
580},{}],"../utils/get-styled-component.js":[function(require,module,exports) {
581"use strict";
582
583Object.defineProperty(exports, "__esModule", {
584 value: true
585});
586exports.default = void 0;
587
588var _preact = require("preact");
589
590var _classnames = _interopRequireDefault(require("classnames"));
591
592var _omit = _interopRequireDefault(require("./omit"));
593
594function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
595
596function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
597
598function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
599
600function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
601
602function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
603
604function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
605
606function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
607
608function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
609
610var alwaysPassThroughProps = ['disabled'];
611
612var _default = function _default(args) {
613 var _args$tagName = args.tagName,
614 tagName = _args$tagName === void 0 ? 'div' : _args$tagName,
615 _args$baseClasses = args.baseClasses,
616 baseClasses = _args$baseClasses === void 0 ? '' : _args$baseClasses,
617 _args$options = args.options,
618 options = _args$options === void 0 ? {} : _args$options,
619 style = args.style,
620 fn = args.fn,
621 _args$passThroughProp = args.passThroughProps,
622 passThroughProps = _args$passThroughProp === void 0 ? [] : _args$passThroughProp,
623 defaultProps = args.defaultProps,
624 renderChildren = args.renderChildren;
625 var defaults = Object.assign({}, defaultProps);
626 var propsToRemove = ['className', 'tagName'];
627 var allOptionValues = Object.keys(options).reduce(function (result, key) {
628 var value = options[key];
629
630 if (_typeof(value) !== 'object') {
631 defaults[key] = value;
632 propsToRemove.push(key);
633 result.push(value);
634 } else {
635 result.push.apply(result, _toConsumableArray(value));
636 }
637
638 return result;
639 }, []);
640 propsToRemove.push.apply(propsToRemove, _toConsumableArray(allOptionValues.filter(function (key) {
641 return !passThroughProps.includes(key) && !alwaysPassThroughProps.includes(key);
642 })));
643
644 var componentFn = function componentFn(incomingProps) {
645 var props = Object.assign({}, defaults, incomingProps);
646 var finalTagName = props.tagName || tagName;
647 var passThroughProps = (0, _omit.default)(props, propsToRemove);
648 var className = (0, _classnames.default)(baseClasses, fn && fn(props), props.className);
649 var combinedStyle = Object.assign({}, style, props.style);
650 var renderedChildren = renderChildren ? renderChildren(props) : props.children;
651 return (0, _preact.h)(finalTagName, Object.assign({
652 className: className,
653 style: combinedStyle
654 }, passThroughProps), renderedChildren);
655 };
656
657 componentFn.definition = args;
658 return componentFn;
659};
660
661exports.default = _default;
662},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./omit":"../utils/omit.js"}],"../pill-icon.js":[function(require,module,exports) {
663"use strict";
664
665Object.defineProperty(exports, "__esModule", {
666 value: true
667});
668exports.default = void 0;
669
670var _preact = require("preact");
671
672function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
673
674var _default = function _default(props) {
675 return (0, _preact.h)("svg", _extends({
676 viewBox: "0 0 24 24"
677 }, props), (0, _preact.h)("path", {
678 d: "M20 12c0-2.2-2-4-4.5-4h-9C4 8 2 9.8 2 12s2 4 4.5 4h9c2.5 0 4.5-1.8 4.5-4zm-9.5 2.1V9.9h5.7c1.3.4 2 1 2 2.1 0 1-.7 1.7-2 2.1h-5.7z",
679 "fill-rule": "nonzero"
680 }));
681};
682
683exports.default = _default;
684},{"preact":"../../node_modules/preact/dist/preact.module.js"}],"../icon.js":[function(require,module,exports) {
685"use strict";
686
687Object.defineProperty(exports, "__esModule", {
688 value: true
689});
690exports.Icon = void 0;
691
692var _preact = require("preact");
693
694var _classnames = _interopRequireDefault(require("classnames"));
695
696var _omit = _interopRequireDefault(require("./utils/omit"));
697
698var _pillIcon = _interopRequireDefault(require("./pill-icon"));
699
700function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
701
702function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
703
704var customIcons = {
705 pill: _pillIcon.default
706};
707
708var Icon = function Icon(props) {
709 var icon = props.icon,
710 size = props.size,
711 className = props.className,
712 style = props.style;
713 var rest = (0, _omit.default)(props, ['icon', 'size', 'className']);
714 var px = "".concat(size || 24, "px");
715 var styles = Object.assign({}, style, {
716 fontSize: px,
717 width: px,
718 height: px
719 });
720 var Custom = customIcons[icon];
721 return (0, _preact.h)("i", _extends({}, rest, {
722 style: styles,
723 className: (0, _classnames.default)('dib', {
724 'material-icons': !Custom
725 }, className)
726 }), Custom ? (0, _preact.h)(Custom, null) : icon);
727};
728
729exports.Icon = Icon;
730},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./utils/omit":"../utils/omit.js","./pill-icon":"../pill-icon.js"}],"../button.js":[function(require,module,exports) {
731"use strict";
732
733Object.defineProperty(exports, "__esModule", {
734 value: true
735});
736exports.TapIconButton = exports.Button = void 0;
737
738var _preact = require("preact");
739
740var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
741
742var _icon = require("./icon");
743
744function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
745
746/** @jsx h */
747var preventDefault = function preventDefault(e) {
748 e.preventDefault();
749};
750
751var Button = (0, _getStyledComponent.default)({
752 tagName: 'button',
753 baseClasses: 'br2 ba',
754 options: {
755 size: ['tiny', 'large'],
756 pressed: ['pressed'],
757 variant: ['primary', 'stop', 'disabled']
758 },
759 defaultProps: {
760 onContextMenu: preventDefault
761 },
762 fn: function fn(_ref) {
763 var tiny = _ref.tiny,
764 large = _ref.large,
765 disabled = _ref.disabled,
766 pressed = _ref.pressed,
767 primary = _ref.primary,
768 stop = _ref.stop;
769 var classes = ['bn']; // handle sizes
770
771 if (tiny) {
772 classes.push('pa1');
773 } else if (large) {
774 classes.push('pa3 fw6');
775 } else {
776 classes.push('pa2');
777 } // if disabled stop here
778
779
780 if (disabled) {
781 classes.push('mid-gray bg-light-gray not-allowed');
782 return classes.join(' ');
783 } // pointer class
784
785
786 classes.push('pointer');
787
788 if (pressed) {
789 classes.push('shadow-3');
790 } else {
791 classes.push('shadow-2');
792 }
793
794 if (stop) {
795 classes.push('white bg-red');
796 }
797
798 if (primary) {
799 classes.push('dark-blue bg-light-blue');
800 }
801
802 if (!stop && !primary) {
803 classes.push('dark-blue');
804
805 if (pressed) {
806 classes.push('bg-lightest-blue');
807 } else {
808 classes.push('bg-white');
809 }
810 }
811
812 return classes.join(' ');
813 }
814});
815exports.Button = Button;
816var TapIconButton = (0, _getStyledComponent.default)({
817 baseClasses: 'button-reset pointer pa0 ma0 bn bg-transparent flex items-center justify-center',
818 style: {
819 width: '40px',
820 height: '40px'
821 },
822 options: {
823 icon: ['icon'],
824 color: ['color']
825 },
826 renderChildren: function renderChildren(_ref2) {
827 var icon = _ref2.icon,
828 color = _ref2.color;
829 return [(0, _preact.h)(_icon.Icon, {
830 icon: icon,
831 color: color,
832 size: "28"
833 })];
834 }
835});
836exports.TapIconButton = TapIconButton;
837},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/get-styled-component":"../utils/get-styled-component.js","./icon":"../icon.js"}],"../logo.js":[function(require,module,exports) {
838"use strict";
839
840Object.defineProperty(exports, "__esModule", {
841 value: true
842});
843exports.LogoLight = exports.LogoLightMark = exports.LogoTextOnly = exports.LogoDark = void 0;
844
845var _preact = require("preact");
846
847var _omit = _interopRequireDefault(require("./utils/omit"));
848
849function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
850
851function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
852
853var LogoDark = function LogoDark(props) {
854 return (0, _preact.h)("svg", _extends({
855 viewBox: "0 0 521 104",
856 xmlns: "http://www.w3.org/2000/svg"
857 }, props), (0, _preact.h)("g", {
858 fill: "none",
859 "fill-rule": "evenodd"
860 }, (0, _preact.h)("path", {
861 d: "M143.234 40.272l-2.684 12.564h7.236l-2.685-12.564h-1.867zm-10.113 22.017l5.951-26.451h10.192l5.951 26.451h-5.368l-1.05-4.785h-9.258l-1.05 4.785h-5.368zm30.574 0h-5.213v-19.45h5.174v1.089c1.763-1.036 3.384-1.555 4.863-1.555 2.592 0 4.382.765 5.368 2.295.985 1.53 1.478 3.89 1.478 7.08v10.541h-5.213V51.903c0-1.659-.194-2.885-.583-3.676-.389-.79-1.167-1.187-2.334-1.187a8.839 8.839 0 0 0-3.073.545l-.467.155v14.549m27.462-11.476c0-1.556-.247-2.638-.739-3.247-.493-.609-1.355-.915-2.586-.915-1.232 0-2.101.319-2.607.953-.505.636-.772 1.706-.797 3.209h6.729zm-5.738 6.555c.61.532 1.485.798 2.626.798 2.412 0 4.564-.079 6.458-.233l1.089-.118.078 3.851c-2.982.727-5.679 1.089-8.091 1.089-2.931 0-5.057-.777-6.38-2.333-1.322-1.556-1.984-4.085-1.984-7.586 0-6.975 2.866-10.463 8.597-10.463 5.653 0 8.48 2.931 8.48 8.791l-.389 3.617h-11.436c.025 1.193.343 2.056.952 2.587zm28.767-9.666c-3.216-.414-5.466-.623-6.749-.623-1.284 0-2.114.117-2.49.35-.376.234-.564.604-.564 1.109s.253.856.759 1.05c.506.195 1.801.48 3.89.856 2.087.376 3.572.992 4.453 1.848.882.855 1.323 2.244 1.323 4.162 0 4.201-2.606 6.301-7.819 6.301-1.711 0-3.786-.233-6.223-.7l-1.245-.233.155-4.357c3.216.416 5.452.622 6.71.622s2.114-.122 2.568-.368c.453-.247.681-.617.681-1.109s-.24-.856-.72-1.089c-.48-.233-1.725-.519-3.734-.856-2.011-.337-3.508-.908-4.493-1.712-.986-.803-1.478-2.237-1.478-4.298 0-2.062.7-3.618 2.1-4.669 1.4-1.049 3.202-1.575 5.407-1.575 1.53 0 3.617.248 6.262.74l1.284.233-.077 4.318m15.364-.429h-4.784v7.975c0 .778.019 1.33.058 1.653.039.325.181.603.428.837.246.233.629.349 1.147.349l2.957-.077.234 4.162c-1.738.389-3.061.583-3.968.583-2.334 0-3.929-.525-4.785-1.575-.855-1.05-1.284-2.989-1.284-5.815v-8.092h-2.294v-4.434h2.294v-5.406h5.213v5.406h4.784v4.434m8.791 15.016h-5.212V35.06h5.212v8.712c1.789-.933 3.397-1.399 4.824-1.399 2.593 0 4.382.765 5.367 2.295.987 1.53 1.48 3.89 1.48 7.08v10.541h-5.213V51.864c0-1.634-.195-2.846-.584-3.637-.388-.79-1.167-1.187-2.334-1.187a10.28 10.28 0 0 0-3.034.467l-.506.156v14.626m27.463-11.476c0-1.556-.247-2.638-.739-3.247-.493-.609-1.355-.915-2.587-.915-1.231 0-2.1.319-2.607.953-.505.636-.771 1.706-.797 3.209h6.73zm-5.737 6.555c.608.532 1.483.798 2.625.798 2.413 0 4.564-.079 6.457-.233l1.089-.118.078 3.851c-2.982.727-5.678 1.089-8.091 1.089-2.931 0-5.056-.777-6.379-2.333-1.323-1.556-1.985-4.085-1.985-7.586 0-6.975 2.866-10.463 8.598-10.463 5.653 0 8.48 2.931 8.48 8.791l-.389 3.617h-11.437c.026 1.193.344 2.056.954 2.587zm28.765-9.666c-3.216-.414-5.465-.623-6.749-.623-1.283 0-2.114.117-2.489.35-.377.234-.565.604-.565 1.109s.253.856.759 1.05c.506.195 1.802.48 3.89.856 2.087.376 3.572.992 4.454 1.848.881.855 1.323 2.244 1.323 4.162 0 4.201-2.606 6.301-7.819 6.301-1.712 0-3.786-.233-6.224-.7l-1.245-.233.156-4.357c3.215.416 5.452.622 6.71.622 1.257 0 2.113-.122 2.567-.368.454-.247.681-.617.681-1.109s-.24-.856-.719-1.089c-.481-.233-1.726-.519-3.735-.856-2.01-.337-3.508-.908-4.492-1.712-.986-.803-1.479-2.237-1.479-4.298 0-2.062.7-3.618 2.101-4.669 1.4-1.049 3.202-1.575 5.407-1.575 1.529 0 3.617.248 6.263.74l1.283.233-.078 4.318m4.589 14.587h5.213v-19.45h-5.213v19.45zm0-21.939h5.213v-5.29h-5.213v5.29zm16.377 13.692c-1.453.13-2.179.908-2.179 2.334 0 1.427.636 2.14 1.907 2.14.985 0 2.061-.156 3.228-.467l.583-.156v-4.162l-3.539.311zm8.752-5.134v8.091c.052.622.156 1.057.311 1.303.156.247.48.421.973.525l-.156 3.928c-1.322 0-2.379-.09-3.17-.272-.791-.181-1.589-.544-2.392-1.089-1.867.908-3.774 1.361-5.718 1.361-4.021 0-6.03-2.125-6.03-6.379 0-2.074.558-3.545 1.673-4.415 1.115-.869 2.826-1.381 5.135-1.536l4.161-.312v-1.205c0-.804-.181-1.355-.543-1.654-.364-.297-.948-.447-1.751-.447l-7.313.312-.156-3.619c2.775-.751 5.413-1.127 7.916-1.127 2.502 0 4.304.519 5.408 1.555 1.101 1.038 1.652 2.698 1.652 4.98zm22.406 12.953c-2.749.596-5.226.894-7.429.894-2.205 0-3.968-.272-5.291-.816-1.322-.545-2.36-1.413-3.112-2.606-.753-1.193-1.271-2.594-1.556-4.202-.285-1.607-.428-3.63-.428-6.068 0-5.108.719-8.667 2.159-10.678 1.44-2.009 4.091-3.015 7.955-3.015 2.229 0 4.81.351 7.741 1.051l-.156 4.279c-2.567-.389-4.7-.584-6.399-.584-1.698 0-2.911.228-3.637.681-.726.454-1.264 1.316-1.614 2.587-.35 1.271-.524 3.436-.524 6.496 0 3.061.355 5.18 1.068 6.36.713 1.18 2.14 1.77 4.279 1.77 2.14 0 4.416-.181 6.827-.545l.117 4.396m9.296.428h-5.212V35.06h5.212v8.712c1.79-.933 3.397-1.399 4.824-1.399 2.593 0 4.383.765 5.368 2.295.986 1.53 1.479 3.89 1.479 7.08v10.541h-5.213V51.864c0-1.634-.194-2.846-.583-3.637-.389-.79-1.167-1.187-2.335-1.187a10.28 10.28 0 0 0-3.034.467l-.506.156v14.626m22.639-8.247c-1.452.13-2.178.908-2.178 2.334 0 1.427.636 2.14 1.907 2.14.985 0 2.061-.156 3.228-.467l.583-.156v-4.162l-3.54.311zm8.753-5.134v8.091c.052.622.156 1.057.312 1.303.154.247.479.421.972.525l-.155 3.928c-1.323 0-2.38-.09-3.171-.272-.791-.181-1.589-.544-2.392-1.089-1.868.908-3.774 1.361-5.719 1.361-4.02 0-6.029-2.125-6.029-6.379 0-2.074.558-3.545 1.672-4.415 1.115-.869 2.827-1.381 5.136-1.536l4.161-.312v-1.205c0-.804-.181-1.355-.544-1.654-.363-.297-.947-.447-1.751-.447l-7.312.312-.156-3.619c2.775-.751 5.413-1.127 7.917-1.127 2.501 0 4.304.519 5.406 1.555 1.102 1.038 1.653 2.698 1.653 4.98zm5.173 13.381v-19.45h5.173v2.062c2.179-1.297 4.254-2.139 6.224-2.528v5.251c-2.1.441-3.902.895-5.406 1.361l-.779.272v13.032h-5.212m25.44-15.016h-4.785v7.975c0 .778.02 1.33.059 1.653.039.325.181.603.428.837.246.233.628.349 1.148.349l2.957-.077.232 4.162c-1.737.389-3.06.583-3.968.583-2.333 0-3.929-.525-4.784-1.575-.856-1.05-1.284-2.989-1.284-5.815v-8.092h-2.295v-4.434h2.295v-5.406h5.212v5.406h4.785v4.434m3.579 15.016h5.212v-19.45h-5.212v19.45zm0-21.939h5.212v-5.29h-5.212v5.29zm15.443 21.939h-5.213v-19.45h5.174v1.089c1.763-1.036 3.383-1.555 4.863-1.555 2.592 0 4.381.765 5.367 2.295.985 1.53 1.478 3.89 1.478 7.08v10.541h-5.213V51.903c0-1.659-.193-2.885-.583-3.676-.389-.79-1.167-1.187-2.334-1.187a8.833 8.833 0 0 0-3.072.545l-.467.155v14.549m20.966-12.934c0 1.906.992 2.859 2.975 2.859 1.985 0 2.976-.953 2.976-2.859 0-1.906-.991-2.859-2.976-2.859-1.983 0-2.975.953-2.975 2.859zm-.312 15.929c0 1.115 1.368 1.673 4.104 1.673 2.736 0 4.105-.648 4.105-1.945 0-.7-.234-1.148-.701-1.343-.467-.193-1.452-.304-2.956-.33l-3.501-.272c-.7.7-1.051 1.439-1.051 2.217zm13.46-.564c0 2.217-.856 3.858-2.567 4.921-1.712 1.063-4.026 1.595-6.944 1.595s-5.161-.389-6.73-1.168c-1.569-.777-2.353-2.191-2.353-4.239 0-1.634.934-3.178 2.801-4.629-.96-.648-1.439-1.634-1.439-2.956 0-.519.389-1.375 1.167-2.568l.349-.545c-1.763-1.27-2.645-3.144-2.645-5.621 0-2.476.746-4.271 2.238-5.387 1.49-1.115 3.467-1.673 5.932-1.673 1.114 0 2.217.13 3.305.389l.623.117 6.263-.194v4.162l-2.918-.234c.57.882.856 1.764.856 2.646 0 2.593-.661 4.382-1.983 5.368-1.323.986-3.398 1.478-6.224 1.478a7.363 7.363 0 0 1-1.595-.156c-.26.675-.389 1.225-.389 1.653 0 .428.219.72.661.875.441.156 1.478.248 3.113.273 3.266.026 5.496.461 6.69 1.303 1.192.843 1.789 2.373 1.789 4.59z",
862 fill: "#FFF"
863 }), (0, _preact.h)("path", {
864 d: "M520.01 50.187a3.51 3.51 0 0 1-3.5 3.5h-39.956a3.51 3.51 0 0 1-3.5-3.5V38.571a3.51 3.51 0 0 1 3.5-3.5h39.956a3.51 3.51 0 0 1 3.5 3.5v11.616",
865 fill: "#6CC4CA"
866 }), (0, _preact.h)("path", {
867 fill: "#173140",
868 d: "M477.476 49.241h2.801v-3.228h-2.801zm8.734-9.958c.673 0 1.536.104 2.586.312l.525.116-.078 2.061c-1.024-.103-1.782-.155-2.275-.155-.894 0-1.488.192-1.779.574-.292.382-.437 1.105-.437 2.168 0 1.064.145 1.793.437 2.189.291.395.891.593 1.798.593l2.256-.156.078 2.081c-1.387.273-2.444.409-3.17.409-1.439 0-2.473-.405-3.102-1.216-.63-.81-.943-2.11-.943-3.9 0-1.789.323-3.082.972-3.88.649-.797 1.692-1.196 3.132-1.196m7.497 7.274c.266.467.743.7 1.43.7.686 0 1.164-.233 1.429-.7.266-.467.399-1.199.399-2.198 0-.998-.133-1.724-.399-2.178-.265-.453-.743-.681-1.429-.681-.687 0-1.164.228-1.43.681-.265.454-.398 1.18-.398 2.178 0 .999.133 1.731.398 2.198zm-2.013-5.941c.687-.889 1.835-1.333 3.443-1.333s2.755.444 3.443 1.333c.687.888 1.03 2.135 1.03 3.743 0 3.411-1.491 5.116-4.473 5.116-2.982 0-4.473-1.705-4.473-5.116 0-1.608.343-2.855 1.03-3.743zm12.428 8.625h-2.606v-9.724h2.587v.545c.895-.519 1.659-.779 2.295-.779 1.05 0 1.861.305 2.431.914 1.193-.609 2.282-.914 3.268-.914 1.283 0 2.175.373 2.674 1.119.499.745.749 1.935.749 3.568v5.271h-2.607v-5.193c0-.829-.09-1.442-.271-1.838-.182-.395-.545-.593-1.09-.593-.415 0-.921.091-1.516.273l-.293.096c.052.973.078 1.712.078 2.218v5.037h-2.606v-4.998c0-.96-.085-1.637-.253-2.033-.168-.395-.538-.593-1.108-.593a4.29 4.29 0 0 0-1.498.273l-.234.077v7.274"
869 }), (0, _preact.h)("path", {
870 d: "M36.159 103.665c-.72 0-1.448-.14-2.143-.433C14.026 94.818-.01 75.049-.01 52S14.026 9.182 34.016.768a5.508 5.508 0 0 1 2.143-.433c1.74 0 3.433.821 4.504 2.298l9.633 13.287C32.674 18.476 19.093 33.681 19.093 52s13.581 33.524 31.203 36.081l-9.633 13.286a5.565 5.565 0 0 1-4.504 2.298m38.791 0a5.563 5.563 0 0 1-4.504-2.298l-9.633-13.286C78.435 85.524 92.016 70.319 92.016 52c0-18.319-13.581-33.524-31.203-36.08l9.633-13.287A5.563 5.563 0 0 1 74.95.335c.719 0 1.448.14 2.143.433C97.083 9.182 111.119 28.951 111.119 52s-14.036 42.818-34.026 51.232a5.511 5.511 0 0 1-2.143.433",
871 fill: "#4486A0"
872 }), (0, _preact.h)("path", {
873 d: "M58.348 19.319L70.446 2.633a5.56 5.56 0 0 1 6.659-1.86 55.435 55.435 0 0 1 11.57 6.61L65.124 40.479c-5.264 7.396-13.876 7.396-19.139 0L22.434 7.383A55.453 55.453 0 0 1 34.003.773a5.562 5.562 0 0 1 6.66 1.86L52.76 19.319c1.378 1.9 4.21 1.9 5.588 0m0 65.362l12.098 16.686a5.56 5.56 0 0 0 6.659 1.86 55.435 55.435 0 0 0 11.57-6.61L65.124 63.521c-5.264-7.396-13.876-7.396-19.139 0L22.434 96.617a55.453 55.453 0 0 0 11.569 6.61 5.562 5.562 0 0 0 6.66-1.86L52.76 84.681c1.378-1.9 4.21-1.9 5.588 0",
874 fill: "#6CC4CA"
875 })));
876};
877
878exports.LogoDark = LogoDark;
879
880var LogoTextOnly = function LogoTextOnly(props) {
881 var fill = props.fill;
882
883 if (!fill) {
884 fill = '#fff';
885 }
886
887 return (0, _preact.h)("svg", _extends({
888 width: "333",
889 height: "37",
890 viewBox: "0 0 333 37",
891 fill: "none",
892 xmlns: "http://www.w3.org/2000/svg"
893 }, (0, _omit.default)(props, ['fill'])), (0, _preact.h)("path", {
894 "fill-rule": "evenodd",
895 "clip-rule": "evenodd",
896 d: "M10.2 5.3L7.6 17.8h7.2L12 5.3h-1.9.1zm-10 22L6.1.8h10.2l6 26.5h-5.5l-1-4.8H6.5l-1 4.8H0h.2zm30.5 0h-5.2V7.8h5.2V9c1.7-1 3.3-1.5 4.8-1.5 2.6 0 4.4.7 5.4 2.3a13 13 0 0 1 1.5 7v10.6h-5.2V16.9c0-1.7-.2-2.9-.6-3.7-.4-.8-1.2-1.2-2.4-1.2-1 0-2 .2-3 .6l-.5.1v14.6zm27.5-11.5c0-1.5-.3-2.6-.8-3.2-.5-.6-1.3-1-2.6-1-1.2 0-2 .4-2.6 1-.5.6-.7 1.7-.8 3.2h6.8zm-5.8 6.6a4 4 0 0 0 2.6.8c2.5 0 4.6-.1 6.5-.3h1l.2 3.8c-3 .7-5.7 1-8.1 1-3 0-5-.7-6.4-2.3-1.3-1.5-2-4-2-7.6 0-7 2.9-10.4 8.6-10.4 5.7 0 8.5 2.9 8.5 8.8l-.4 3.6H51.5c0 1.2.3 2 1 2.6h-.1zm28.8-9.7c-3.2-.4-5.5-.6-6.8-.6-1.2 0-2 .1-2.5.3-.3.3-.5.6-.5 1.1 0 .5.2.9.7 1 .5.3 1.8.6 4 1 2 .3 3.5 1 4.4 1.8.9.8 1.3 2.2 1.3 4.2 0 4.2-2.6 6.3-7.8 6.3-2 0-4.2-.3-6.2-.7l-1.3-.3.2-4.3c3.2.4 5.4.6 6.7.6 1.3 0 2.1-.1 2.6-.4.4-.2.6-.6.6-1s-.2-1-.7-1.2a20 20 0 0 0-3.7-.8c-2-.4-3.5-1-4.5-1.7-1-.9-1.5-2.3-1.5-4.3 0-2.1.7-3.7 2.1-4.7 1.4-1 3.2-1.6 5.4-1.6 1.5 0 3.6.3 6.3.8l1.3.2-.1 4.3zm15.4-.4h-4.8v9.6c0 .3.2.6.5.8.2.3.6.4 1.1.4h3l.2 4c-1.7.5-3 .7-4 .7-2.3 0-4-.6-4.8-1.6-.8-1-1.2-3-1.2-5.8v-8.1h-2.3V7.8h2.3V2.4h5.2v5.4h4.8v4.5zm8.7 15h-5.2V0h5.2v8.7a10 10 0 0 1 4.9-1.4c2.6 0 4.3.7 5.3 2.3a13 13 0 0 1 1.5 7v10.6h-5.2V16.9c0-1.7-.2-2.9-.6-3.7-.4-.8-1.2-1.2-2.3-1.2-1 0-2 .2-3 .5l-.6.2v14.6zm27.5-11.5c0-1.5-.2-2.6-.7-3.2-.5-.6-1.4-1-2.6-1-1.3 0-2.1.4-2.6 1s-.8 1.7-.8 3.2h6.7zm-5.7 6.6c.6.5 1.4.8 2.6.8 2.4 0 4.6-.1 6.4-.3h1.1l.1 3.8c-3 .7-5.7 1-8 1-3 0-5.1-.7-6.5-2.3-1.3-1.5-2-4-2-7.6 0-7 3-10.4 8.7-10.4 5.6 0 8.4 2.9 8.4 8.8l-.4 3.6h-11.4c0 1.2.4 2 1 2.6zm28.7-9.7c-3.2-.4-5.4-.6-6.7-.6-1.3 0-2.1.1-2.5.3-.4.3-.6.6-.6 1.1 0 .5.3.9.8 1 .5.3 1.8.6 3.9 1 2 .3 3.6 1 4.4 1.8 1 .8 1.4 2.2 1.4 4.2 0 4.2-2.7 6.3-7.9 6.3-2 0-4.2-.3-6.2-.7l-1.2-.3.1-4.3c3.2.4 5.5.6 6.7.6a6 6 0 0 0 2.6-.4c.5-.2.7-.6.7-1s-.3-1-.7-1.2c-.5-.2-1.8-.5-3.8-.8-2-.4-3.5-1-4.5-1.7-1-.9-1.4-2.3-1.4-4.3 0-2.1.7-3.7 2-4.7 1.5-1 3.3-1.6 5.5-1.6 1.5 0 3.6.3 6.2.8l1.3.2v4.3h-.1zm4.6 14.6h5.2V7.8h-5.2v19.5zm0-22h5.2V.1h-5.2v5.2zM176.8 19c-1.5.2-2.2 1-2.2 2.4s.7 2.1 2 2.1c1 0 2-.1 3.2-.5l.5-.1v-4.2l-3.5.3zm8.7-5v8c.1.6.2 1 .4 1.3.1.2.4.4 1 .5l-.2 4c-1.3 0-2.4-.1-3.2-.3-.8-.2-1.6-.6-2.4-1.1a13 13 0 0 1-5.7 1.4c-4 0-6-2.2-6-6.4 0-2.1.5-3.6 1.6-4.4 1.5-1 3.3-1.6 5.2-1.6l4.1-.3V14c0-.8-.1-1.3-.5-1.6a3 3 0 0 0-1.8-.5l-7.3.3-.1-3.6c2.7-.8 5.4-1.1 7.9-1.1s4.3.5 5.4 1.5c1.1 1 1.6 2.7 1.6 5zM208 26.8c-2.8.6-5.3.9-7.5.9s-4-.3-5.3-.9a6.5 6.5 0 0 1-3-2.6c-.8-1.2-1.3-2.6-1.6-4.2-.3-1.6-.5-3.6-.5-6 0-5.1.8-8.7 2.2-10.7 1.4-2 4-3 8-3 2.2 0 4.8.3 7.7 1l-.2 4.3c-2.5-.4-4.7-.6-6.4-.6-1.7 0-2.9.2-3.6.7-.7.5-1.3 1.3-1.6 2.6-.4 1.3-.5 3.4-.5 6.5 0 3 .3 5.2 1 6.3.7 1.2 2.2 1.8 4.3 1.8 2.2 0 4.4-.2 6.8-.5l.2 4.4zm9.3.4H212V0h5.3v8.7c1.7-1 3.3-1.4 4.8-1.4 2.6 0 4.4.7 5.3 2.3a13 13 0 0 1 1.5 7v10.6h-5.2V16.9c0-1.7-.2-2.9-.6-3.7-.4-.8-1.1-1.2-2.3-1.2-1 0-2 .2-3 .5l-.5.2v14.6-.1zm22.6-8.2c-1.5.2-2.2 1-2.2 2.4s.6 2.1 2 2.1c.9 0 2-.1 3.1-.5l.6-.1v-4.2l-3.5.3zm8.7-5v8c.1.6.2 1 .4 1.3.1.2.4.4 1 .5l-.2 4c-1.4 0-2.4-.1-3.2-.3-.8-.2-1.6-.6-2.4-1.1a13 13 0 0 1-5.7 1.4c-4 0-6-2.2-6-6.4 0-2.1.5-3.6 1.6-4.4 1.5-1 3.3-1.6 5.2-1.6l4.1-.3V14c0-.8-.1-1.3-.5-1.6a3 3 0 0 0-1.8-.5l-7.3.3-.1-3.6c2.7-.8 5.4-1.1 7.9-1.1s4.3.5 5.4 1.5c1 1 1.6 2.7 1.6 5zm5.2 13.3V7.8h5.2V10c2.2-1.3 4.2-2.1 6.2-2.5v5.2l-5.4 1.4-.8.3v13h-5.2v-.1zm25.5-14.9h-4.8V22c0 .3.2.6.5.8.2.3.6.4 1.1.4h3l.2 4c-1.7.5-3 .7-4 .7-2.3 0-3.9-.6-4.8-1.6-.8-1-1.2-3-1.2-5.8v-8.1H267V7.9h2.3V2.5h5.2v5.4h4.8v4.5zm3.5 15h5.2V7.8h-5.2v19.6zm0-22h5.2V.2h-5.2v5.2zm15.5 22H293V7.8h5.1V9c1.8-1 3.4-1.5 4.9-1.5 2.6 0 4.4.7 5.4 2.3 1 1.5 1.4 3.9 1.4 7v10.6h-5.2V16.9c0-1.7-.2-2.9-.5-3.7-.4-.8-1.2-1.2-2.4-1.2-1 0-2 .2-3 .6l-.5.1v14.6l.1.1zm20.9-13.1c0 2 1 3 3 3 1.9 0 2.9-1 2.9-3 0-1.9-1-2.8-3-2.8s-3 1-3 2.9l.1-.1zm-.4 16c0 1.1 1.4 1.7 4.1 1.7 2.8 0 4.1-.7 4.1-2 0-.7-.2-1.1-.7-1.3-.4-.2-1.4-.3-3-.4l-3.4-.2a3 3 0 0 0-1 2.2h-.1zm13.5-.6c0 2.2-.9 3.9-2.6 5-1.7 1-4 1.5-7 1.5s-5-.4-6.6-1.1c-1.6-.8-2.4-2.2-2.4-4.3 0-1.6 1-3.1 2.8-4.6-1-.6-1.4-1.6-1.4-3 0-.5.3-1.3 1.1-2.5l.4-.6a6.5 6.5 0 0 1-2.7-5.6c0-2.5.8-4.3 2.3-5.4a9.7 9.7 0 0 1 5.9-1.6c1.1 0 2.2 0 3.3.3l.6.2 6.3-.2v4.1l-3-.2a5 5 0 0 1 1 2.6c0 2.6-.7 4.4-2 5.4a10.8 10.8 0 0 1-7.9 1.3l-.4 1.7c0 .4.3.7.7.9.4.1 1.5.2 3.1.2 3.3 0 5.5.5 6.7 1.3 1.2.9 1.8 2.4 1.8 4.6z",
897 fill: "#fff"
898 }));
899};
900
901exports.LogoTextOnly = LogoTextOnly;
902
903var LogoLightMark = function LogoLightMark(props) {
904 return (0, _preact.h)("svg", _extends({
905 viewBox: "0 0 112 104",
906 xmlns: "http://www.w3.org/2000/svg"
907 }, props), (0, _preact.h)("path", {
908 "fill-rule": "evenodd",
909 "clip-rule": "evenodd",
910 d: "M19.103 51.6638C19.103 33.3448 32.684 18.1398 50.305 15.5828L40.673 2.29676C39.9378 1.28176 38.881 0.545149 37.6743 0.206577C36.4676 -0.131995 35.1819 -0.0526371 34.026 0.431761C14.035 8.84576 0 28.6148 0 51.6638C0 74.7128 14.035 94.4818 34.026 102.896C36.403 103.896 39.158 103.119 40.673 101.031L50.305 87.7448C32.684 85.1878 19.103 69.9828 19.103 51.6638ZM70.456 2.29676L60.823 15.5828C78.445 18.1398 92.026 33.3448 92.026 51.6638C92.026 69.9828 78.445 85.1878 60.823 87.7448L70.456 101.031C71.1912 102.046 72.248 102.782 73.4547 103.121C74.6614 103.46 75.9471 103.38 77.103 102.896C97.093 94.4818 111.129 74.7128 111.129 51.6638C111.129 28.6148 97.093 8.84576 77.103 0.431761C75.9471 -0.0526371 74.6614 -0.131995 73.4547 0.206577C72.248 0.545149 71.1912 1.28176 70.456 2.29676",
911 fill: "#173140"
912 }), (0, _preact.h)("path", {
913 "fill-rule": "evenodd",
914 "clip-rule": "evenodd",
915 d: "M58.358 18.9828L70.456 2.29676C71.193 1.28052 72.2522 0.543581 73.4612 0.205864C74.6703 -0.131853 75.9581 -0.0504734 77.115 0.436761C81.2234 2.16687 85.1081 4.38624 88.685 7.04676L65.134 40.1428C59.87 47.5388 51.258 47.5388 45.995 40.1428L22.444 7.04676C26.0206 4.38645 29.905 2.1671 34.013 0.436761C35.1701 -0.0503619 36.458 -0.131685 37.6672 0.206017C38.8764 0.543718 39.9357 1.28058 40.673 2.29676L52.77 18.9828C54.148 20.8828 56.98 20.8828 58.358 18.9828ZM58.358 84.3448L70.456 101.031C71.193 102.047 72.2522 102.784 73.4612 103.122C74.6703 103.459 75.9581 103.378 77.115 102.891C81.2234 101.161 85.1081 98.9413 88.685 96.2808L65.134 63.1848C59.87 55.7888 51.258 55.7888 45.995 63.1848L22.444 96.2808C26.0206 98.9411 29.905 101.16 34.013 102.891C35.1701 103.378 36.458 103.459 37.6672 103.121C38.8764 102.784 39.9357 102.047 40.673 101.031L52.77 84.3448C54.148 82.4448 56.98 82.4448 58.358 84.3448Z",
916 fill: "#6CC4CA"
917 }));
918};
919
920exports.LogoLightMark = LogoLightMark;
921
922var LogoLight = function LogoLight(props) {
923 return (0, _preact.h)("svg", _extends({
924 viewBox: "0 0 521 104",
925 xmlns: "http://www.w3.org/2000/svg"
926 }, props), (0, _preact.h)("g", {
927 fill: "none",
928 "fill-rule": "evenodd"
929 }, (0, _preact.h)("path", {
930 d: "M143.234 40.272l-2.684 12.564h7.236l-2.685-12.564h-1.867zm-10.113 22.017l5.951-26.451h10.192l5.951 26.451h-5.368l-1.05-4.785h-9.258l-1.05 4.785h-5.368zm30.574 0h-5.213v-19.45h5.174v1.089c1.763-1.036 3.384-1.555 4.863-1.555 2.592 0 4.382.765 5.368 2.295.985 1.53 1.478 3.89 1.478 7.08v10.541h-5.213V51.903c0-1.659-.194-2.885-.583-3.676-.389-.79-1.167-1.187-2.334-1.187a8.839 8.839 0 0 0-3.073.545l-.467.155v14.549m27.462-11.476c0-1.556-.247-2.638-.739-3.247-.493-.609-1.355-.915-2.586-.915-1.232 0-2.101.319-2.607.953-.505.636-.772 1.706-.797 3.209h6.729zm-5.738 6.555c.61.532 1.485.798 2.626.798 2.412 0 4.564-.079 6.457-.233l1.09-.118.078 3.851c-2.982.727-5.679 1.089-8.091 1.089-2.931 0-5.057-.777-6.38-2.333-1.323-1.556-1.984-4.085-1.984-7.586 0-6.975 2.866-10.463 8.597-10.463 5.653 0 8.48 2.931 8.48 8.791l-.389 3.617h-11.436c.025 1.193.343 2.056.952 2.587zm28.767-9.666c-3.216-.414-5.466-.623-6.749-.623-1.284 0-2.114.117-2.49.35-.376.234-.564.604-.564 1.109s.253.856.759 1.05c.505.195 1.801.48 3.89.856 2.087.376 3.572.992 4.453 1.848.882.855 1.323 2.244 1.323 4.162 0 4.201-2.606 6.301-7.819 6.301-1.711 0-3.786-.233-6.223-.7l-1.245-.233.155-4.357c3.216.416 5.452.622 6.71.622s2.114-.122 2.568-.368c.453-.247.681-.617.681-1.109s-.24-.856-.72-1.089c-.48-.233-1.725-.519-3.734-.856-2.011-.337-3.508-.908-4.493-1.712-.986-.803-1.479-2.237-1.479-4.298 0-2.062.701-3.618 2.101-4.669 1.4-1.049 3.202-1.575 5.407-1.575 1.53 0 3.617.248 6.262.74l1.284.233-.077 4.318m15.364-.429h-4.784v7.975c0 .778.019 1.33.058 1.653.039.325.181.603.427.837.247.233.63.349 1.148.349l2.956-.077.235 4.162c-1.738.389-3.061.583-3.968.583-2.334 0-3.929-.525-4.785-1.575-.856-1.05-1.284-2.989-1.284-5.815v-8.092h-2.294v-4.434h2.294v-5.406h5.213v5.406h4.784v4.434m8.791 15.016h-5.212V35.06h5.212v8.712c1.789-.933 3.397-1.399 4.824-1.399 2.593 0 4.382.765 5.367 2.295.987 1.53 1.48 3.89 1.48 7.08v10.541h-5.213V51.864c0-1.634-.195-2.846-.584-3.637-.388-.79-1.167-1.187-2.334-1.187a10.28 10.28 0 0 0-3.034.467l-.506.156v14.626m27.463-11.476c0-1.556-.247-2.638-.739-3.247-.493-.609-1.356-.915-2.587-.915s-2.101.319-2.607.953c-.505.636-.771 1.706-.797 3.209h6.73zm-5.737 6.555c.608.532 1.483.798 2.625.798 2.412 0 4.564-.079 6.457-.233l1.089-.118.078 3.851c-2.982.727-5.678 1.089-8.091 1.089-2.931 0-5.056-.777-6.379-2.333-1.323-1.556-1.985-4.085-1.985-7.586 0-6.975 2.866-10.463 8.598-10.463 5.653 0 8.48 2.931 8.48 8.791l-.389 3.617h-11.437c.026 1.193.344 2.056.954 2.587zm28.765-9.666c-3.216-.414-5.465-.623-6.749-.623-1.283 0-2.114.117-2.489.35-.377.234-.565.604-.565 1.109s.253.856.759 1.05c.506.195 1.802.48 3.89.856 2.087.376 3.572.992 4.454 1.848.881.855 1.323 2.244 1.323 4.162 0 4.201-2.606 6.301-7.819 6.301-1.712 0-3.786-.233-6.224-.7l-1.245-.233.156-4.357c3.215.416 5.452.622 6.71.622 1.257 0 2.113-.122 2.567-.368.454-.247.681-.617.681-1.109s-.24-.856-.719-1.089c-.481-.233-1.726-.519-3.735-.856-2.01-.337-3.508-.908-4.493-1.712-.985-.803-1.478-2.237-1.478-4.298 0-2.062.7-3.618 2.101-4.669 1.399-1.049 3.202-1.575 5.407-1.575 1.529 0 3.617.248 6.262.74l1.284.233-.078 4.318m4.589 14.587h5.213v-19.45h-5.213v19.45zm0-21.939h5.213v-5.29h-5.213v5.29zm16.377 13.692c-1.453.13-2.179.908-2.179 2.334 0 1.427.636 2.14 1.907 2.14.985 0 2.061-.156 3.228-.467l.583-.156v-4.162l-3.539.311zm8.752-5.134v8.091c.052.622.156 1.057.311 1.303.156.247.48.421.973.525l-.156 3.928c-1.322 0-2.379-.09-3.17-.272-.791-.181-1.589-.544-2.392-1.089-1.867.908-3.774 1.361-5.719 1.361-4.02 0-6.029-2.125-6.029-6.379 0-2.074.558-3.545 1.673-4.415 1.115-.869 2.826-1.381 5.135-1.536l4.161-.312v-1.205c0-.804-.181-1.355-.544-1.654-.363-.297-.947-.447-1.75-.447l-7.313.312-.156-3.619c2.775-.751 5.413-1.127 7.916-1.127 2.502 0 4.304.519 5.407 1.555 1.102 1.038 1.653 2.698 1.653 4.98zm22.406 12.953c-2.749.596-5.226.894-7.429.894-2.205 0-3.968-.272-5.291-.816-1.322-.545-2.36-1.413-3.112-2.606-.753-1.193-1.271-2.594-1.556-4.202-.285-1.607-.428-3.63-.428-6.068 0-5.108.719-8.667 2.159-10.678 1.44-2.009 4.091-3.015 7.955-3.015 2.229 0 4.809.351 7.741 1.051l-.156 4.279c-2.568-.389-4.7-.584-6.399-.584-1.698 0-2.911.228-3.637.681-.726.454-1.264 1.316-1.615 2.587-.349 1.271-.523 3.436-.523 6.496 0 3.061.355 5.18 1.068 6.36.713 1.18 2.14 1.77 4.279 1.77 2.14 0 4.416-.181 6.827-.545l.117 4.396m9.296.428h-5.212V35.06h5.212v8.712c1.79-.933 3.397-1.399 4.824-1.399 2.593 0 4.382.765 5.368 2.295.986 1.53 1.479 3.89 1.479 7.08v10.541h-5.213V51.864c0-1.634-.194-2.846-.584-3.637-.388-.79-1.167-1.187-2.334-1.187a10.28 10.28 0 0 0-3.034.467l-.506.156v14.626m22.639-8.247c-1.452.13-2.178.908-2.178 2.334 0 1.427.636 2.14 1.907 2.14.984 0 2.061-.156 3.228-.467l.583-.156v-4.162l-3.54.311zm8.753-5.134v8.091c.052.622.156 1.057.312 1.303.154.247.479.421.972.525l-.156 3.928c-1.322 0-2.379-.09-3.17-.272-.791-.181-1.589-.544-2.393-1.089-1.867.908-3.773 1.361-5.718 1.361-4.02 0-6.029-2.125-6.029-6.379 0-2.074.558-3.545 1.672-4.415 1.115-.869 2.827-1.381 5.136-1.536l4.161-.312v-1.205c0-.804-.181-1.355-.544-1.654-.363-.297-.947-.447-1.751-.447l-7.312.312-.157-3.619c2.776-.751 5.414-1.127 7.917-1.127 2.502 0 4.305.519 5.407 1.555 1.102 1.038 1.653 2.698 1.653 4.98zm5.173 13.381v-19.45h5.173v2.062c2.179-1.297 4.254-2.139 6.224-2.528v5.251c-2.1.441-3.902.895-5.406 1.361l-.779.272v13.032h-5.212m25.44-15.016h-4.785v7.975c0 .778.02 1.33.059 1.653.039.325.181.603.428.837.246.233.628.349 1.147.349l2.957-.077.233 4.162c-1.737.389-3.06.583-3.968.583-2.333 0-3.929-.525-4.785-1.575-.855-1.05-1.283-2.989-1.283-5.815v-8.092h-2.295v-4.434h2.295v-5.406h5.212v5.406h4.785v4.434m3.578 15.016h5.213v-19.45h-5.213v19.45zm0-21.939h5.213v-5.29h-5.213v5.29zm15.444 21.939h-5.213v-19.45h5.174v1.089c1.763-1.036 3.383-1.555 4.863-1.555 2.592 0 4.381.765 5.367 2.295.985 1.53 1.478 3.89 1.478 7.08v10.541h-5.213V51.903c0-1.659-.193-2.885-.583-3.676-.389-.79-1.167-1.187-2.334-1.187a8.833 8.833 0 0 0-3.072.545l-.467.155v14.549m20.966-12.934c0 1.906.992 2.859 2.975 2.859 1.985 0 2.976-.953 2.976-2.859 0-1.906-.991-2.859-2.976-2.859-1.983 0-2.975.953-2.975 2.859zm-.312 15.929c0 1.115 1.368 1.673 4.104 1.673 2.736 0 4.105-.648 4.105-1.945 0-.7-.234-1.148-.701-1.343-.467-.193-1.452-.304-2.956-.33l-3.501-.272c-.7.7-1.051 1.439-1.051 2.217zm13.46-.564c0 2.217-.856 3.858-2.567 4.921-1.712 1.063-4.026 1.595-6.944 1.595s-5.161-.389-6.73-1.168c-1.569-.777-2.353-2.191-2.353-4.239 0-1.634.934-3.178 2.801-4.629-.96-.648-1.439-1.634-1.439-2.956 0-.519.389-1.375 1.167-2.568l.349-.545c-1.763-1.27-2.645-3.144-2.645-5.621 0-2.476.746-4.271 2.238-5.387 1.49-1.115 3.467-1.673 5.932-1.673 1.114 0 2.217.13 3.305.389l.623.117 6.263-.194v4.162l-2.918-.234c.57.882.856 1.764.856 2.646 0 2.593-.661 4.382-1.983 5.368-1.323.986-3.398 1.478-6.224 1.478a7.363 7.363 0 0 1-1.595-.156c-.26.675-.389 1.225-.389 1.653 0 .428.219.72.661.875.441.156 1.478.248 3.113.273 3.266.026 5.496.461 6.69 1.303 1.192.843 1.789 2.373 1.789 4.59zm54.617-14.533a3.51 3.51 0 0 1-3.5 3.5h-39.956a3.51 3.51 0 0 1-3.5-3.5V38.571a3.51 3.51 0 0 1 3.5-3.5h39.956a3.51 3.51 0 0 1 3.5 3.5v11.616",
931 fill: "#162E3E"
932 }), (0, _preact.h)("path", {
933 fill: "#FFF",
934 d: "M477.476 49.241h2.801v-3.228h-2.801zm8.733-9.958c.674 0 1.537.104 2.587.312l.525.116-.078 2.061c-1.024-.103-1.782-.155-2.275-.155-.894 0-1.488.192-1.78.574-.291.382-.437 1.105-.437 2.168 0 1.064.146 1.793.437 2.189.292.395.892.593 1.799.593l2.256-.156.078 2.081c-1.387.273-2.444.409-3.17.409-1.439 0-2.473-.405-3.102-1.216-.63-.81-.943-2.11-.943-3.9 0-1.789.323-3.082.972-3.88.649-.797 1.692-1.196 3.131-1.196m7.498 7.274c.266.467.743.7 1.43.7.686 0 1.164-.233 1.429-.7.266-.467.399-1.199.399-2.198 0-.998-.133-1.724-.399-2.178-.265-.453-.743-.681-1.429-.681-.687 0-1.164.228-1.43.681-.265.454-.398 1.18-.398 2.178 0 .999.133 1.731.398 2.198zm-2.013-5.941c.687-.889 1.835-1.333 3.443-1.333s2.755.444 3.443 1.333c.687.888 1.03 2.135 1.03 3.743 0 3.411-1.491 5.116-4.473 5.116-2.982 0-4.473-1.705-4.473-5.116 0-1.608.343-2.855 1.03-3.743zm12.428 8.625h-2.606v-9.724h2.587v.545c.895-.519 1.659-.779 2.295-.779 1.05 0 1.861.305 2.431.914 1.192-.609 2.282-.914 3.268-.914 1.283 0 2.174.373 2.674 1.119.499.745.749 1.935.749 3.568v5.271h-2.607v-5.193c0-.829-.09-1.442-.271-1.838-.183-.395-.545-.593-1.09-.593-.415 0-.921.091-1.516.273l-.293.096c.052.973.078 1.712.078 2.218v5.037h-2.606v-4.998c0-.96-.085-1.637-.253-2.033-.169-.395-.538-.593-1.108-.593a4.29 4.29 0 0 0-1.498.273l-.234.077v7.274"
935 }), (0, _preact.h)("path", {
936 d: "M19.093 52c0-18.319 13.581-33.524 31.202-36.081L40.663 2.633A5.556 5.556 0 0 0 34.016.768C14.025 9.182-.01 28.951-.01 52s14.035 42.818 34.026 51.232c2.377 1 5.132.223 6.647-1.865l9.632-13.286C32.674 85.524 19.093 70.319 19.093 52M70.446 2.633l-9.633 13.286C78.435 18.476 92.016 33.681 92.016 52c0 18.319-13.581 33.524-31.203 36.081l9.633 13.286a5.556 5.556 0 0 0 6.647 1.865c19.99-8.414 34.026-28.183 34.026-51.232S97.083 9.182 77.093.768a5.556 5.556 0 0 0-6.647 1.865",
937 fill: "#173140"
938 }), (0, _preact.h)("path", {
939 d: "M58.348 19.319L70.446 2.633a5.56 5.56 0 0 1 6.659-1.86 55.435 55.435 0 0 1 11.57 6.61L65.124 40.479c-5.264 7.396-13.876 7.396-19.139 0L22.434 7.383A55.453 55.453 0 0 1 34.003.773a5.562 5.562 0 0 1 6.66 1.86L52.76 19.319c1.378 1.9 4.21 1.9 5.588 0m0 65.362l12.098 16.686a5.56 5.56 0 0 0 6.659 1.86 55.435 55.435 0 0 0 11.57-6.61L65.124 63.521c-5.264-7.396-13.876-7.396-19.139 0L22.434 96.617a55.453 55.453 0 0 0 11.569 6.61 5.562 5.562 0 0 0 6.66-1.86L52.76 84.681c1.378-1.9 4.21-1.9 5.588 0",
940 fill: "#6CC4CA"
941 })));
942};
943
944exports.LogoLight = LogoLight;
945},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/omit":"../utils/omit.js"}],"../transition-in.js":[function(require,module,exports) {
946"use strict";
947
948Object.defineProperty(exports, "__esModule", {
949 value: true
950});
951exports.transitionIn = void 0;
952
953var _preact = require("preact");
954
955function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
956
957function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
958
959function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
960
961function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
962
963function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
964
965function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
966
967function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
968
969function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
970
971function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
972
973function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
974
975function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
976
977var transitionIn = function transitionIn(Wrapped) {
978 var TransitionIn = /*#__PURE__*/function (_Component) {
979 _inherits(TransitionIn, _Component);
980
981 var _super = _createSuper(TransitionIn);
982
983 function TransitionIn(props) {
984 var _this;
985
986 _classCallCheck(this, TransitionIn);
987
988 _this = _super.call(this, props);
989 _this.state = {
990 firstRender: true
991 };
992 return _this;
993 }
994
995 _createClass(TransitionIn, [{
996 key: "componentDidMount",
997 value: function componentDidMount() {
998 var _this2 = this;
999
1000 setTimeout(function () {
1001 _this2.setState({
1002 firstRender: false
1003 });
1004 }, 0);
1005 }
1006 }, {
1007 key: "render",
1008 value: function render() {
1009 return (0, _preact.h)(Wrapped, Object.assign({
1010 firstRender: this.state.firstRender
1011 }, this.props));
1012 }
1013 }]);
1014
1015 return TransitionIn;
1016 }(_preact.Component);
1017
1018 return TransitionIn;
1019};
1020
1021exports.transitionIn = transitionIn;
1022},{"preact":"../../node_modules/preact/dist/preact.module.js"}],"../crate.js":[function(require,module,exports) {
1023"use strict";
1024
1025Object.defineProperty(exports, "__esModule", {
1026 value: true
1027});
1028exports.MessagePageCrate = exports.PageCrate = exports.PageCrateHeading = exports.Page = exports.LogoCrate = void 0;
1029
1030var _preact = require("preact");
1031
1032var _classnames = _interopRequireDefault(require("classnames"));
1033
1034var _logo = require("./logo");
1035
1036var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1037
1038var _transitionIn = require("./transition-in");
1039
1040var _omit = _interopRequireDefault(require("./utils/omit"));
1041
1042var _icon = require("./icon");
1043
1044function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1045
1046function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1047
1048var LogoCrate = function LogoCrate() {
1049 return (0, _preact.h)("div", {
1050 className: "mw6 mv3 ph3 pt2 pb3 center br2"
1051 }, (0, _preact.h)("div", {
1052 className: "w-60"
1053 }, (0, _preact.h)("a", {
1054 href: "/"
1055 }, (0, _preact.h)(_logo.LogoLight, null))));
1056};
1057
1058exports.LogoCrate = LogoCrate;
1059var Page = (0, _transitionIn.transitionIn)((0, _getStyledComponent.default)({
1060 baseClasses: 'transition',
1061 options: {
1062 transitions: ['firstRender']
1063 },
1064 fn: function fn(_ref) {
1065 var firstRender = _ref.firstRender;
1066 return firstRender ? 'o-0 translate-y' : 'o-100';
1067 }
1068}));
1069exports.Page = Page;
1070var PageCrateHeading = (0, _getStyledComponent.default)({
1071 baseClasses: 'mt1 mb3',
1072 tagName: 'h3'
1073});
1074exports.PageCrateHeading = PageCrateHeading;
1075var PageCrate = (0, _getStyledComponent.default)({
1076 baseClasses: 'no-print-padding mv3 pa3 center br2',
1077 options: {
1078 title: '',
1079 backgroundColor: 'white',
1080 width: ['wide'],
1081 shadowExists: ['noShadow']
1082 },
1083 fn: function fn(_ref2) {
1084 var wide = _ref2.wide,
1085 backgroundColor = _ref2.backgroundColor,
1086 noShadow = _ref2.noShadow;
1087 return (0, _classnames.default)(wide ? 'mw7' : 'mw6', "bg-".concat(backgroundColor), {
1088 'shadow-1': !noShadow
1089 });
1090 },
1091 renderChildren: function renderChildren(_ref3) {
1092 var title = _ref3.title,
1093 children = _ref3.children;
1094 var res = [children];
1095
1096 if (title) {
1097 res.unshift((0, _preact.h)(PageCrateHeading, null, title));
1098 }
1099
1100 return res;
1101 }
1102});
1103exports.PageCrate = PageCrate;
1104
1105var MessagePageCrate = function MessagePageCrate(props) {
1106 var loading = props.loading,
1107 error = props.error,
1108 warning = props.warning,
1109 success = props.success,
1110 children = props.children;
1111 var rest = (0, _omit.default)(props, ['loading', 'error', 'warning', 'success', 'children']);
1112 var icon = null;
1113 var iconClasses = null;
1114 var backgroundColor = 'white';
1115 var colorClasses = null;
1116
1117 if (loading) {
1118 icon = 'autorenew';
1119 iconClasses = 'spin-animation';
1120 }
1121
1122 if (error) {
1123 icon = 'error';
1124 backgroundColor = 'red';
1125 colorClasses = 'black';
1126 }
1127
1128 if (warning) {
1129 icon = 'warning';
1130 backgroundColor = 'orange';
1131 colorClasses = 'black';
1132 }
1133
1134 if (success) {
1135 icon = 'check';
1136 backgroundColor = 'light-blue';
1137 colorClasses = 'black';
1138 }
1139
1140 var iconComp = (loading || error || warning || success) && (0, _preact.h)(_icon.Icon, {
1141 className: (0, _classnames.default)('f3 mr3', iconClasses),
1142 size: "40",
1143 icon: icon
1144 });
1145 return (0, _preact.h)(PageCrate, _extends({
1146 backgroundColor: backgroundColor
1147 }, rest), (0, _preact.h)("div", {
1148 className: (0, _classnames.default)('flex items-center min-h3 f4', colorClasses)
1149 }, iconComp, children));
1150};
1151
1152exports.MessagePageCrate = MessagePageCrate;
1153},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./logo":"../logo.js","./utils/get-styled-component":"../utils/get-styled-component.js","./transition-in":"../transition-in.js","./utils/omit":"../utils/omit.js","./icon":"../icon.js"}],"../full-screen-overlay.js":[function(require,module,exports) {
1154"use strict";
1155
1156Object.defineProperty(exports, "__esModule", {
1157 value: true
1158});
1159exports.FullScreenOverlay = exports.FullScreenOverlayWrapper = void 0;
1160
1161var _preact = require("preact");
1162
1163var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1164
1165var _omit = _interopRequireDefault(require("./utils/omit"));
1166
1167function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1168
1169var FullScreenOverlayWrapper = (0, _getStyledComponent.default)({
1170 baseClasses: 'fixed top-0 left-0 z-999 w-100 h-100 bg-gray flex items-center dark-blue'
1171});
1172exports.FullScreenOverlayWrapper = FullScreenOverlayWrapper;
1173
1174var FullScreenOverlay = function FullScreenOverlay(props) {
1175 return (0, _preact.h)(FullScreenOverlayWrapper, (0, _omit.default)(props, ['children']), (0, _preact.h)("div", {
1176 className: "center ph2 ph4-m"
1177 }, props.children));
1178};
1179
1180exports.FullScreenOverlay = FullScreenOverlay;
1181},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/get-styled-component":"../utils/get-styled-component.js","./utils/omit":"../utils/omit.js"}],"../inputs.js":[function(require,module,exports) {
1182"use strict";
1183
1184Object.defineProperty(exports, "__esModule", {
1185 value: true
1186});
1187exports.Textarea = exports.Select = exports.Input = exports.inputClasses = void 0;
1188
1189var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1190
1191function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1192
1193var inputClasses = 'pa2 input-reset bg-white ba b--gray br2';
1194exports.inputClasses = inputClasses;
1195var Input = (0, _getStyledComponent.default)({
1196 baseClasses: inputClasses,
1197 tagName: 'input'
1198});
1199exports.Input = Input;
1200var Select = (0, _getStyledComponent.default)({
1201 baseClasses: inputClasses,
1202 tagName: 'select'
1203});
1204exports.Select = Select;
1205var Textarea = (0, _getStyledComponent.default)({
1206 baseClasses: inputClasses,
1207 tagName: 'textarea'
1208});
1209exports.Textarea = Textarea;
1210},{"./utils/get-styled-component":"../utils/get-styled-component.js"}],"../drug-box.js":[function(require,module,exports) {
1211"use strict";
1212
1213Object.defineProperty(exports, "__esModule", {
1214 value: true
1215});
1216exports.DrugBox = void 0;
1217
1218var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1219
1220function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1221
1222var DrugBox = (0, _getStyledComponent.default)({
1223 baseClasses: 'pv2 ph2 br2 ba b--light-gray bg-near-white',
1224 options: {
1225 highlight: ['highlighted']
1226 },
1227 fn: function fn(_ref) {
1228 var highlighted = _ref.highlighted;
1229 return highlighted ? 'bg-lightest-blue' : 'bg-near-white';
1230 }
1231});
1232exports.DrugBox = DrugBox;
1233},{"./utils/get-styled-component":"../utils/get-styled-component.js"}],"../links.js":[function(require,module,exports) {
1234"use strict";
1235
1236Object.defineProperty(exports, "__esModule", {
1237 value: true
1238});
1239exports.SupportLink = exports.Link = void 0;
1240
1241var _preact = require("preact");
1242
1243var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1244
1245function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1246
1247function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1248
1249var supportEmail = 'support@anesthesiacharting.com';
1250var Link = (0, _getStyledComponent.default)({
1251 baseClasses: 'link dark-blue underline hover-light-blue',
1252 tagName: 'a'
1253});
1254exports.Link = Link;
1255
1256var SupportLink = function SupportLink(props) {
1257 return (0, _preact.h)(Link, _extends({
1258 href: "mailto:".concat(supportEmail)
1259 }, props), supportEmail);
1260};
1261
1262exports.SupportLink = SupportLink;
1263},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/get-styled-component":"../utils/get-styled-component.js"}],"../check-mark.js":[function(require,module,exports) {
1264"use strict";
1265
1266Object.defineProperty(exports, "__esModule", {
1267 value: true
1268});
1269exports.CheckMark = void 0;
1270
1271var _preact = require("preact");
1272
1273var _icon = require("./icon");
1274
1275var _classnames = _interopRequireDefault(require("classnames"));
1276
1277function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1278
1279var CheckMark = function CheckMark(_ref) {
1280 var className = _ref.className,
1281 name = _ref.name,
1282 label = _ref.label,
1283 isComplete = _ref.isComplete,
1284 _onClick = _ref.onClick;
1285 return (0, _preact.h)("label", {
1286 htmlFor: name,
1287 className: (0, _classnames.default)('flex items-center mb2', className),
1288 "data-e2e": "checkMark"
1289 }, (0, _preact.h)("input", {
1290 onClick: function onClick() {
1291 return _onClick(name);
1292 },
1293 className: "checkbox o-0",
1294 id: name,
1295 checked: isComplete,
1296 type: "checkbox"
1297 }), isComplete && (0, _preact.h)(_icon.Icon, {
1298 className: "light-blue",
1299 size: "40",
1300 icon: "check_box"
1301 }), !isComplete && (0, _preact.h)(_icon.Icon, {
1302 size: "40",
1303 icon: "check_box_outline_blank"
1304 }), (0, _preact.h)("span", {
1305 className: "ml2"
1306 }, label || name));
1307};
1308
1309exports.CheckMark = CheckMark;
1310},{"preact":"../../node_modules/preact/dist/preact.module.js","./icon":"../icon.js","classnames":"../../node_modules/classnames/index.js"}],"../drawer.js":[function(require,module,exports) {
1311"use strict";
1312
1313Object.defineProperty(exports, "__esModule", {
1314 value: true
1315});
1316exports.Drawer = exports.DrawerLinkContainer = exports.DrawerLink = exports.FlipIcon = exports.FlipContainer = void 0;
1317
1318var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
1319
1320var _preact = require("preact");
1321
1322var _icon = require("./icon");
1323
1324var _classnames = _interopRequireDefault(require("classnames"));
1325
1326function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1327
1328function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1329
1330function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1331
1332function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1333
1334var cardStyles = {
1335 backfaceVisibility: 'hidden',
1336 webkitBackfaceVisibility: 'hidden',
1337 top: '0',
1338 left: '0'
1339};
1340
1341var FlipContainer = function FlipContainer(_ref) {
1342 var front = _ref.front,
1343 back = _ref.back,
1344 flipped = _ref.flipped,
1345 height = _ref.height,
1346 width = _ref.width,
1347 className = _ref.className,
1348 style = _ref.style,
1349 _ref$direction = _ref.direction,
1350 direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
1351 _ref$perspective = _ref.perspective,
1352 perspective = _ref$perspective === void 0 ? '100px' : _ref$perspective,
1353 rest = _objectWithoutProperties(_ref, ["front", "back", "flipped", "height", "width", "className", "style", "direction", "perspective"]);
1354
1355 var axis = direction === 'vertical' ? 'X' : 'Y';
1356 var rotateZero = "rotate".concat(axis, "(0deg)");
1357 var rotateFlipped = "rotate".concat(axis, "(180deg)");
1358 return (0, _preact.h)("div", _extends({}, rest, {
1359 className: className,
1360 style: Object.assign({
1361 position: 'relative',
1362 perspective: perspective,
1363 width: width,
1364 height: height
1365 }, style)
1366 }), (0, _preact.h)("div", {
1367 style: {
1368 transition: '0.6s',
1369 transformStyle: 'preserve-3d',
1370 webkitTransformStyle: 'preserve-3d',
1371 position: 'relative',
1372 transformOrigin: 'center',
1373 webkitTransformOrigin: 'center',
1374 width: '100%',
1375 height: '100%',
1376 transform: !flipped ? rotateFlipped : '',
1377 webkitTransform: !flipped ? rotateFlipped : ''
1378 }
1379 }, (0, _preact.h)("div", {
1380 style: Object.assign({}, cardStyles, {
1381 transform: rotateFlipped,
1382 webkitTransform: rotateFlipped,
1383 width: '100%',
1384 height: '100%',
1385 position: 'relative'
1386 })
1387 }, front), (0, _preact.h)("div", {
1388 style: Object.assign({}, cardStyles, {
1389 zIndex: 2,
1390 transform: rotateZero,
1391 webkitTransform: rotateZero,
1392 width: '100%',
1393 height: '100%',
1394 position: 'absolute'
1395 })
1396 }, back)));
1397};
1398
1399exports.FlipContainer = FlipContainer;
1400var FlipIcon = (0, _getStyledComponent.default)({
1401 options: {
1402 complete: ['complete'],
1403 icon: ['icon']
1404 },
1405 renderChildren: function renderChildren(_ref2) {
1406 var icon = _ref2.icon,
1407 complete = _ref2.complete;
1408 return [(0, _preact.h)(FlipContainer, {
1409 width: "20px",
1410 height: "20px",
1411 flipped: complete,
1412 front: (0, _preact.h)(_icon.Icon, {
1413 size: "20",
1414 icon: icon
1415 }),
1416 back: (0, _preact.h)(_icon.Icon, {
1417 className: "light-blue",
1418 size: "20",
1419 icon: "check_circle"
1420 })
1421 })];
1422 }
1423});
1424exports.FlipIcon = FlipIcon;
1425var DrawerLink = (0, _getStyledComponent.default)({
1426 tagName: 'a',
1427 baseClasses: 'link pv1 mt1 f5 fw3 flex items-center',
1428 options: {
1429 active: ['active'],
1430 disabled: ['disabled'],
1431 completeness: ['complete']
1432 },
1433 fn: function fn(_ref3) {
1434 var active = _ref3.active,
1435 disabled = _ref3.disabled;
1436 return (0, _classnames.default)({
1437 'light-blue': active,
1438 'mid-gray not-allowed': disabled,
1439 'white hover-moon-gray': !active && !disabled
1440 });
1441 },
1442 renderChildren: function renderChildren(_ref4) {
1443 var icon = _ref4.icon,
1444 title = _ref4.title,
1445 complete = _ref4.complete;
1446 return [(0, _preact.h)(FlipIcon, {
1447 icon: icon,
1448 complete: complete
1449 }), (0, _preact.h)("span", {
1450 "data-e2e": "".concat(title, "Nav"),
1451 className: icon ? 'pl2' : null
1452 }, title)];
1453 }
1454});
1455exports.DrawerLink = DrawerLink;
1456var DrawerLinkContainer = (0, _getStyledComponent.default)({
1457 baseClasses: 'link db pt2 pl3 f4',
1458 options: {
1459 completeness: ['complete'],
1460 title: ['title']
1461 },
1462 renderChildren: function renderChildren(_ref5) {
1463 var complete = _ref5.complete,
1464 title = _ref5.title,
1465 children = _ref5.children;
1466 return [(0, _preact.h)("div", {
1467 className: "flex items-center"
1468 }, (0, _preact.h)(_icon.Icon, {
1469 className: (0, _classnames.default)('light-blue pr2', {
1470 hidden: !complete
1471 }),
1472 size: "20",
1473 icon: "check_circle"
1474 }), (0, _preact.h)("h3", {
1475 className: "fw3 f6 ma0 ttu mid-gray bb b--mid-gray pb2 pt1 relative flex-grow-1"
1476 }, title)), (0, _preact.h)("div", null, children)];
1477 }
1478});
1479exports.DrawerLinkContainer = DrawerLinkContainer;
1480var Drawer = (0, _getStyledComponent.default)({
1481 baseClasses: 'bg-dark-blue white fixed top-0 vh-100 overflow-x-hidden'
1482});
1483exports.Drawer = Drawer;
1484},{"./utils/get-styled-component":"../utils/get-styled-component.js","preact":"../../node_modules/preact/dist/preact.module.js","./icon":"../icon.js","classnames":"../../node_modules/classnames/index.js"}],"../../node_modules/preact/hooks/dist/hooks.module.js":[function(require,module,exports) {
1485"use strict";
1486
1487Object.defineProperty(exports, "__esModule", {
1488 value: true
1489});
1490exports.useState = l;
1491exports.useReducer = p;
1492exports.useEffect = y;
1493exports.useLayoutEffect = h;
1494exports.useRef = s;
1495exports.useImperativeHandle = _;
1496exports.useMemo = d;
1497exports.useCallback = A;
1498exports.useContext = F;
1499exports.useDebugValue = T;
1500exports.useErrorBoundary = q;
1501
1502var _preact = require("preact");
1503
1504var t,
1505 u,
1506 r,
1507 o = 0,
1508 i = [],
1509 c = _preact.options.__b,
1510 f = _preact.options.__r,
1511 e = _preact.options.diffed,
1512 a = _preact.options.__c,
1513 v = _preact.options.unmount;
1514
1515function m(t, r) {
1516 _preact.options.__h && _preact.options.__h(u, t, o || r), o = 0;
1517 var i = u.__H || (u.__H = {
1518 __: [],
1519 __h: []
1520 });
1521 return t >= i.__.length && i.__.push({}), i.__[t];
1522}
1523
1524function l(n) {
1525 return o = 1, p(w, n);
1526}
1527
1528function p(n, r, o) {
1529 var i = m(t++, 2);
1530 return i.t = n, i.__c || (i.__ = [o ? o(r) : w(void 0, r), function (n) {
1531 var t = i.t(i.__[0], n);
1532 i.__[0] !== t && (i.__ = [t, i.__[1]], i.__c.setState({}));
1533 }], i.__c = u), i.__;
1534}
1535
1536function y(r, o) {
1537 var i = m(t++, 3);
1538 !_preact.options.__s && k(i.__H, o) && (i.__ = r, i.__H = o, u.__H.__h.push(i));
1539}
1540
1541function h(r, o) {
1542 var i = m(t++, 4);
1543 !_preact.options.__s && k(i.__H, o) && (i.__ = r, i.__H = o, u.__h.push(i));
1544}
1545
1546function s(n) {
1547 return o = 5, d(function () {
1548 return {
1549 current: n
1550 };
1551 }, []);
1552}
1553
1554function _(n, t, u) {
1555 o = 6, h(function () {
1556 "function" == typeof n ? n(t()) : n && (n.current = t());
1557 }, null == u ? u : u.concat(n));
1558}
1559
1560function d(n, u) {
1561 var r = m(t++, 7);
1562 return k(r.__H, u) && (r.__ = n(), r.__H = u, r.__h = n), r.__;
1563}
1564
1565function A(n, t) {
1566 return o = 8, d(function () {
1567 return n;
1568 }, t);
1569}
1570
1571function F(n) {
1572 var r = u.context[n.__c],
1573 o = m(t++, 9);
1574 return o.__c = n, r ? (null == o.__ && (o.__ = !0, r.sub(u)), r.props.value) : n.__;
1575}
1576
1577function T(t, u) {
1578 _preact.options.useDebugValue && _preact.options.useDebugValue(u ? u(t) : t);
1579}
1580
1581function q(n) {
1582 var r = m(t++, 10),
1583 o = l();
1584 return r.__ = n, u.componentDidCatch || (u.componentDidCatch = function (n) {
1585 r.__ && r.__(n), o[1](n);
1586 }), [o[0], function () {
1587 o[1](void 0);
1588 }];
1589}
1590
1591function x() {
1592 i.forEach(function (t) {
1593 if (t.__P) try {
1594 t.__H.__h.forEach(g), t.__H.__h.forEach(j), t.__H.__h = [];
1595 } catch (u) {
1596 t.__H.__h = [], _preact.options.__e(u, t.__v);
1597 }
1598 }), i = [];
1599}
1600
1601_preact.options.__b = function (n) {
1602 u = null, c && c(n);
1603}, _preact.options.__r = function (n) {
1604 f && f(n), t = 0;
1605 var r = (u = n.__c).__H;
1606 r && (r.__h.forEach(g), r.__h.forEach(j), r.__h = []);
1607}, _preact.options.diffed = function (t) {
1608 e && e(t);
1609 var o = t.__c;
1610 o && o.__H && o.__H.__h.length && (1 !== i.push(o) && r === _preact.options.requestAnimationFrame || ((r = _preact.options.requestAnimationFrame) || function (n) {
1611 var t,
1612 u = function () {
1613 clearTimeout(r), b && cancelAnimationFrame(t), setTimeout(n);
1614 },
1615 r = setTimeout(u, 100);
1616
1617 b && (t = requestAnimationFrame(u));
1618 })(x)), u = void 0;
1619}, _preact.options.__c = function (t, u) {
1620 u.some(function (t) {
1621 try {
1622 t.__h.forEach(g), t.__h = t.__h.filter(function (n) {
1623 return !n.__ || j(n);
1624 });
1625 } catch (r) {
1626 u.some(function (n) {
1627 n.__h && (n.__h = []);
1628 }), u = [], _preact.options.__e(r, t.__v);
1629 }
1630 }), a && a(t, u);
1631}, _preact.options.unmount = function (t) {
1632 v && v(t);
1633 var u = t.__c;
1634 if (u && u.__H) try {
1635 u.__H.__.forEach(g);
1636 } catch (t) {
1637 _preact.options.__e(t, u.__v);
1638 }
1639};
1640var b = "function" == typeof requestAnimationFrame;
1641
1642function g(n) {
1643 var t = u;
1644 "function" == typeof n.__c && n.__c(), u = t;
1645}
1646
1647function j(n) {
1648 var t = u;
1649 n.__c = n.__(), u = t;
1650}
1651
1652function k(n, t) {
1653 return !n || n.length !== t.length || t.some(function (t, u) {
1654 return t !== n[u];
1655 });
1656}
1657
1658function w(n, t) {
1659 return "function" == typeof t ? t(n) : t;
1660}
1661},{"preact":"../../node_modules/preact/dist/preact.module.js"}],"../../node_modules/preact/compat/dist/compat.module.js":[function(require,module,exports) {
1662"use strict";
1663
1664Object.defineProperty(exports, "__esModule", {
1665 value: true
1666});
1667var _exportNames = {
1668 version: true,
1669 Children: true,
1670 render: true,
1671 hydrate: true,
1672 unmountComponentAtNode: true,
1673 createPortal: true,
1674 createFactory: true,
1675 cloneElement: true,
1676 isValidElement: true,
1677 findDOMNode: true,
1678 PureComponent: true,
1679 memo: true,
1680 forwardRef: true,
1681 unstable_batchedUpdates: true,
1682 StrictMode: true,
1683 Suspense: true,
1684 SuspenseList: true,
1685 lazy: true,
1686 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: true,
1687 unstable_ImmediatePriority: true,
1688 unstable_UserBlockingPriority: true,
1689 unstable_NormalPriority: true,
1690 unstable_LowPriority: true,
1691 unstable_IdlePriority: true,
1692 unstable_runWithPriority: true,
1693 unstable_now: true,
1694 createElement: true,
1695 createContext: true,
1696 createRef: true,
1697 Fragment: true,
1698 Component: true
1699};
1700exports.render = V;
1701exports.hydrate = z;
1702exports.unmountComponentAtNode = an;
1703exports.createPortal = j;
1704exports.createFactory = ln;
1705exports.cloneElement = cn;
1706exports.isValidElement = fn;
1707exports.findDOMNode = sn;
1708exports.PureComponent = E;
1709exports.memo = g;
1710exports.forwardRef = x;
1711exports.Suspense = O;
1712exports.SuspenseList = D;
1713exports.lazy = U;
1714exports.unstable_runWithPriority = rn;
1715Object.defineProperty(exports, "createElement", {
1716 enumerable: true,
1717 get: function () {
1718 return _preact.createElement;
1719 }
1720});
1721Object.defineProperty(exports, "createContext", {
1722 enumerable: true,
1723 get: function () {
1724 return _preact.createContext;
1725 }
1726});
1727Object.defineProperty(exports, "createRef", {
1728 enumerable: true,
1729 get: function () {
1730 return _preact.createRef;
1731 }
1732});
1733Object.defineProperty(exports, "Fragment", {
1734 enumerable: true,
1735 get: function () {
1736 return _preact.Fragment;
1737 }
1738});
1739Object.defineProperty(exports, "Component", {
1740 enumerable: true,
1741 get: function () {
1742 return _preact.Component;
1743 }
1744});
1745exports.unstable_now = exports.unstable_IdlePriority = exports.unstable_LowPriority = exports.unstable_NormalPriority = exports.unstable_UserBlockingPriority = exports.unstable_ImmediatePriority = exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = exports.StrictMode = exports.unstable_batchedUpdates = exports.Children = exports.version = exports.default = void 0;
1746
1747var _hooks = require("preact/hooks");
1748
1749Object.keys(_hooks).forEach(function (key) {
1750 if (key === "default" || key === "__esModule") return;
1751 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1752 Object.defineProperty(exports, key, {
1753 enumerable: true,
1754 get: function () {
1755 return _hooks[key];
1756 }
1757 });
1758});
1759
1760var _preact = require("preact");
1761
1762function C(n, t) {
1763 for (var e in t) n[e] = t[e];
1764
1765 return n;
1766}
1767
1768function S(n, t) {
1769 for (var e in n) if ("__source" !== e && !(e in t)) return !0;
1770
1771 for (var r in t) if ("__source" !== r && n[r] !== t[r]) return !0;
1772
1773 return !1;
1774}
1775
1776function E(n) {
1777 this.props = n;
1778}
1779
1780function g(n, t) {
1781 function e(n) {
1782 var e = this.props.ref,
1783 r = e == n.ref;
1784 return !r && e && (e.call ? e(null) : e.current = null), t ? !t(this.props, n) || !r : S(this.props, n);
1785 }
1786
1787 function r(t) {
1788 return this.shouldComponentUpdate = e, (0, _preact.createElement)(n, t);
1789 }
1790
1791 return r.displayName = "Memo(" + (n.displayName || n.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
1792}
1793
1794(E.prototype = new _preact.Component()).isPureReactComponent = !0, E.prototype.shouldComponentUpdate = function (n, t) {
1795 return S(this.props, n) || S(this.state, t);
1796};
1797var w = _preact.options.__b;
1798
1799_preact.options.__b = function (n) {
1800 n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), w && w(n);
1801};
1802
1803var R = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
1804
1805function x(n) {
1806 function t(t, e) {
1807 var r = C({}, t);
1808 return delete r.ref, n(r, (e = t.ref || e) && ("object" != typeof e || "current" in e) ? e : null);
1809 }
1810
1811 return t.$$typeof = R, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
1812}
1813
1814var N = function (n, t) {
1815 return null == n ? null : (0, _preact.toChildArray)((0, _preact.toChildArray)(n).map(t));
1816},
1817 k = {
1818 map: N,
1819 forEach: N,
1820 count: function (n) {
1821 return n ? (0, _preact.toChildArray)(n).length : 0;
1822 },
1823 only: function (n) {
1824 var t = (0, _preact.toChildArray)(n);
1825 if (1 !== t.length) throw "Children.only";
1826 return t[0];
1827 },
1828 toArray: _preact.toChildArray
1829},
1830 A = _preact.options.__e;
1831
1832exports.Children = k;
1833
1834function O() {
1835 this.__u = 0, this.t = null, this.__b = null;
1836}
1837
1838function L(n) {
1839 var t = n.__.__c;
1840 return t && t.__e && t.__e(n);
1841}
1842
1843function U(n) {
1844 var t, e, r;
1845
1846 function u(u) {
1847 if (t || (t = n()).then(function (n) {
1848 e = n.default || n;
1849 }, function (n) {
1850 r = n;
1851 }), r) throw r;
1852 if (!e) throw t;
1853 return (0, _preact.createElement)(e, u);
1854 }
1855
1856 return u.displayName = "Lazy", u.__f = !0, u;
1857}
1858
1859function D() {
1860 this.u = null, this.o = null;
1861}
1862
1863_preact.options.__e = function (n, t, e) {
1864 if (n.then) for (var r, u = t; u = u.__;) if ((r = u.__c) && r.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), r.__c(n, t);
1865 A(n, t, e);
1866}, (O.prototype = new _preact.Component()).__c = function (n, t) {
1867 var e = t.__c,
1868 r = this;
1869 null == r.t && (r.t = []), r.t.push(e);
1870
1871 var u = L(r.__v),
1872 o = !1,
1873 i = function () {
1874 o || (o = !0, e.componentWillUnmount = e.__c, u ? u(l) : l());
1875 };
1876
1877 e.__c = e.componentWillUnmount, e.componentWillUnmount = function () {
1878 i(), e.__c && e.__c();
1879 };
1880
1881 var l = function () {
1882 if (! --r.__u) {
1883 if (r.state.__e) {
1884 var n = r.state.__e;
1885
1886 r.__v.__k[0] = function n(t, e, r) {
1887 return t && (t.__v = null, t.__k = t.__k && t.__k.map(function (t) {
1888 return n(t, e, r);
1889 }), t.__c && t.__c.__P === e && (t.__e && r.insertBefore(t.__e, t.__d), t.__c.__e = !0, t.__c.__P = r)), t;
1890 }(n, n.__c.__P, n.__c.__O);
1891 }
1892
1893 var t;
1894
1895 for (r.setState({
1896 __e: r.__b = null
1897 }); t = r.t.pop();) t.forceUpdate();
1898 }
1899 },
1900 f = !0 === t.__h;
1901
1902 r.__u++ || f || r.setState({
1903 __e: r.__b = r.__v.__k[0]
1904 }), n.then(i, i);
1905}, O.prototype.componentWillUnmount = function () {
1906 this.t = [];
1907}, O.prototype.render = function (n, t) {
1908 if (this.__b) {
1909 if (this.__v.__k) {
1910 var e = document.createElement("div"),
1911 r = this.__v.__k[0].__c;
1912
1913 this.__v.__k[0] = function n(t, e, r) {
1914 return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function (n) {
1915 "function" == typeof n.__c && n.__c();
1916 }), t.__c.__H = null), null != (t = C({}, t)).__c && (t.__c.__P === r && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function (t) {
1917 return n(t, e, r);
1918 })), t;
1919 }(this.__b, e, r.__O = r.__P);
1920 }
1921
1922 this.__b = null;
1923 }
1924
1925 var u = t.__e && (0, _preact.createElement)(_preact.Fragment, null, n.fallback);
1926 return u && (u.__h = null), [(0, _preact.createElement)(_preact.Fragment, null, t.__e ? null : n.children), u];
1927};
1928
1929var F = function (n, t, e) {
1930 if (++e[1] === e[0] && n.o.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) for (e = n.u; e;) {
1931 for (; e.length > 3;) e.pop()();
1932
1933 if (e[1] < e[0]) break;
1934 n.u = e = e[2];
1935 }
1936};
1937
1938function M(n) {
1939 return this.getChildContext = function () {
1940 return n.context;
1941 }, n.children;
1942}
1943
1944function T(n) {
1945 var t = this,
1946 e = n.i;
1947 t.componentWillUnmount = function () {
1948 (0, _preact.render)(null, t.l), t.l = null, t.i = null;
1949 }, t.i && t.i !== e && t.componentWillUnmount(), n.__v ? (t.l || (t.i = e, t.l = {
1950 nodeType: 1,
1951 parentNode: e,
1952 childNodes: [],
1953 appendChild: function (n) {
1954 this.childNodes.push(n), t.i.appendChild(n);
1955 },
1956 insertBefore: function (n, e) {
1957 this.childNodes.push(n), t.i.appendChild(n);
1958 },
1959 removeChild: function (n) {
1960 this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), t.i.removeChild(n);
1961 }
1962 }), (0, _preact.render)((0, _preact.createElement)(M, {
1963 context: t.context
1964 }, n.__v), t.l)) : t.l && t.componentWillUnmount();
1965}
1966
1967function j(n, t) {
1968 return (0, _preact.createElement)(T, {
1969 __v: n,
1970 i: t
1971 });
1972}
1973
1974(D.prototype = new _preact.Component()).__e = function (n) {
1975 var t = this,
1976 e = L(t.__v),
1977 r = t.o.get(n);
1978 return r[0]++, function (u) {
1979 var o = function () {
1980 t.props.revealOrder ? (r.push(u), F(t, n, r)) : u();
1981 };
1982
1983 e ? e(o) : o();
1984 };
1985}, D.prototype.render = function (n) {
1986 this.u = null, this.o = new Map();
1987 var t = (0, _preact.toChildArray)(n.children);
1988 n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
1989
1990 for (var e = t.length; e--;) this.o.set(t[e], this.u = [1, 0, this.u]);
1991
1992 return n.children;
1993}, D.prototype.componentDidUpdate = D.prototype.componentDidMount = function () {
1994 var n = this;
1995 this.o.forEach(function (t, e) {
1996 F(n, e, t);
1997 });
1998};
1999
2000var I = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103,
2001 W = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
2002 P = function (n) {
2003 return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/i : /fil|che|ra/i).test(n);
2004};
2005
2006function V(n, t, e) {
2007 return null == t.__k && (t.textContent = ""), (0, _preact.render)(n, t), "function" == typeof e && e(), n ? n.__c : null;
2008}
2009
2010function z(n, t, e) {
2011 return (0, _preact.hydrate)(n, t), "function" == typeof e && e(), n ? n.__c : null;
2012}
2013
2014_preact.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (n) {
2015 Object.defineProperty(_preact.Component.prototype, n, {
2016 configurable: !0,
2017 get: function () {
2018 return this["UNSAFE_" + n];
2019 },
2020 set: function (t) {
2021 Object.defineProperty(this, n, {
2022 configurable: !0,
2023 writable: !0,
2024 value: t
2025 });
2026 }
2027 });
2028});
2029var B = _preact.options.event;
2030
2031function H() {}
2032
2033function Z() {
2034 return this.cancelBubble;
2035}
2036
2037function Y() {
2038 return this.defaultPrevented;
2039}
2040
2041_preact.options.event = function (n) {
2042 return B && (n = B(n)), n.persist = H, n.isPropagationStopped = Z, n.isDefaultPrevented = Y, n.nativeEvent = n;
2043};
2044
2045var $,
2046 q = {
2047 configurable: !0,
2048 get: function () {
2049 return this.class;
2050 }
2051},
2052 G = _preact.options.vnode;
2053
2054_preact.options.vnode = function (n) {
2055 var t = n.type,
2056 e = n.props,
2057 r = e;
2058
2059 if ("string" == typeof t) {
2060 for (var u in r = {}, e) {
2061 var o = e[u];
2062 "value" === u && "defaultValue" in e && null == o || ("defaultValue" === u && "value" in e && null == e.value ? u = "value" : "download" === u && !0 === o ? o = "" : /ondoubleclick/i.test(u) ? u = "ondblclick" : /^onchange(textarea|input)/i.test(u + t) && !P(e.type) ? u = "oninput" : /^on(Ani|Tra|Tou|BeforeInp)/.test(u) ? u = u.toLowerCase() : W.test(u) ? u = u.replace(/[A-Z0-9]/, "-$&").toLowerCase() : null === o && (o = void 0), r[u] = o);
2063 }
2064
2065 "select" == t && r.multiple && Array.isArray(r.value) && (r.value = (0, _preact.toChildArray)(e.children).forEach(function (n) {
2066 n.props.selected = -1 != r.value.indexOf(n.props.value);
2067 })), "select" == t && null != r.defaultValue && (r.value = (0, _preact.toChildArray)(e.children).forEach(function (n) {
2068 n.props.selected = r.multiple ? -1 != r.defaultValue.indexOf(n.props.value) : r.defaultValue == n.props.value;
2069 })), n.props = r;
2070 }
2071
2072 t && e.class != e.className && (q.enumerable = "className" in e, null != e.className && (r.class = e.className), Object.defineProperty(r, "className", q)), n.$$typeof = I, G && G(n);
2073};
2074
2075var J = _preact.options.__r;
2076
2077_preact.options.__r = function (n) {
2078 J && J(n), $ = n.__c;
2079};
2080
2081var K = {
2082 ReactCurrentDispatcher: {
2083 current: {
2084 readContext: function (n) {
2085 return $.__n[n.__c].props.value;
2086 }
2087 }
2088 }
2089},
2090 Q = 1,
2091 X = 2,
2092 nn = 3,
2093 tn = 4,
2094 en = 5;
2095exports.unstable_IdlePriority = en;
2096exports.unstable_LowPriority = tn;
2097exports.unstable_NormalPriority = nn;
2098exports.unstable_UserBlockingPriority = X;
2099exports.unstable_ImmediatePriority = Q;
2100exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = K;
2101
2102function rn(n, t) {
2103 return t();
2104}
2105
2106var un = "object" == typeof performance && "function" == typeof performance.now ? performance.now.bind(performance) : function () {
2107 return Date.now();
2108},
2109 on = "16.8.0";
2110exports.version = on;
2111exports.unstable_now = un;
2112
2113function ln(n) {
2114 return _preact.createElement.bind(null, n);
2115}
2116
2117function fn(n) {
2118 return !!n && n.$$typeof === I;
2119}
2120
2121function cn(n) {
2122 return fn(n) ? _preact.cloneElement.apply(null, arguments) : n;
2123}
2124
2125function an(n) {
2126 return !!n.__k && ((0, _preact.render)(null, n), !0);
2127}
2128
2129function sn(n) {
2130 return n && (n.base || 1 === n.nodeType && n) || null;
2131}
2132
2133var hn = function (n, t) {
2134 return n(t);
2135},
2136 pn = _preact.Fragment;
2137
2138exports.StrictMode = pn;
2139exports.unstable_batchedUpdates = hn;
2140var _default = {
2141 useState: _hooks.useState,
2142 useReducer: _hooks.useReducer,
2143 useEffect: _hooks.useEffect,
2144 useLayoutEffect: _hooks.useLayoutEffect,
2145 useRef: _hooks.useRef,
2146 useImperativeHandle: _hooks.useImperativeHandle,
2147 useMemo: _hooks.useMemo,
2148 useCallback: _hooks.useCallback,
2149 useContext: _hooks.useContext,
2150 useDebugValue: _hooks.useDebugValue,
2151 version: "16.8.0",
2152 Children: k,
2153 render: V,
2154 hydrate: z,
2155 unmountComponentAtNode: an,
2156 createPortal: j,
2157 createElement: _preact.createElement,
2158 createContext: _preact.createContext,
2159 createFactory: ln,
2160 cloneElement: cn,
2161 createRef: _preact.createRef,
2162 Fragment: _preact.Fragment,
2163 isValidElement: fn,
2164 findDOMNode: sn,
2165 Component: _preact.Component,
2166 PureComponent: E,
2167 memo: g,
2168 forwardRef: x,
2169 unstable_batchedUpdates: hn,
2170 StrictMode: _preact.Fragment,
2171 Suspense: O,
2172 SuspenseList: D,
2173 lazy: U,
2174 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: K
2175};
2176exports.default = _default;
2177},{"preact/hooks":"../../node_modules/preact/hooks/dist/hooks.module.js","preact":"../../node_modules/preact/dist/preact.module.js"}],"../portal.js":[function(require,module,exports) {
2178"use strict";
2179
2180Object.defineProperty(exports, "__esModule", {
2181 value: true
2182});
2183exports.Portal = void 0;
2184
2185var _compat = require("preact/compat");
2186
2187var Portal = function Portal(_ref) {
2188 var into = _ref.into,
2189 children = _ref.children;
2190 var container = document.querySelector(into);
2191 return (0, _compat.createPortal)(children, container);
2192};
2193
2194exports.Portal = Portal;
2195},{"preact/compat":"../../node_modules/preact/compat/dist/compat.module.js"}],"../shield.js":[function(require,module,exports) {
2196"use strict";
2197
2198Object.defineProperty(exports, "__esModule", {
2199 value: true
2200});
2201exports.Shield = void 0;
2202
2203var _preact = require("preact");
2204
2205var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
2206
2207var _transitionIn = require("./transition-in");
2208
2209function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2210
2211/** @jsx h */
2212var Shield = (0, _transitionIn.transitionIn)((0, _getStyledComponent.default)({
2213 baseClasses: 'fixed transition w-100 h-100 top-0 left-0 bg-blue o-50',
2214 options: {
2215 transitions: ['firstRender']
2216 },
2217 fn: function fn(_ref) {
2218 var firstRender = _ref.firstRender;
2219 return firstRender ? 'o-0' : '';
2220 }
2221}));
2222exports.Shield = Shield;
2223},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/get-styled-component":"../utils/get-styled-component.js","./transition-in":"../transition-in.js"}],"../dialog.js":[function(require,module,exports) {
2224"use strict";
2225
2226Object.defineProperty(exports, "__esModule", {
2227 value: true
2228});
2229exports.Dialog = void 0;
2230
2231var _preact = require("preact");
2232
2233var _classnames = _interopRequireDefault(require("classnames"));
2234
2235var _icon = require("./icon");
2236
2237var _omit = _interopRequireDefault(require("./utils/omit"));
2238
2239var _portal = require("./portal");
2240
2241var _shield = require("./shield");
2242
2243function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2244
2245function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2246
2247var Dialog = function Dialog(incomingProps) {
2248 var className = incomingProps.className,
2249 title = incomingProps.title,
2250 doClose = incomingProps.doClose,
2251 forceChoice = incomingProps.forceChoice,
2252 style = incomingProps.style,
2253 bottom = incomingProps.bottom,
2254 children = incomingProps.children;
2255 var props = (0, _omit.default)(incomingProps, ['className', 'title', 'doClose', 'forceChoice', 'style', 'children', 'bottom']);
2256 return (0, _preact.h)(_portal.Portal, {
2257 into: "body"
2258 }, (0, _preact.h)("div", {
2259 className: "fixed z-999 vh-100 w-100 top-0 left-0 flex items-center justify-center"
2260 }, (0, _preact.h)(_shield.Shield, {
2261 onClick: forceChoice ? null : doClose
2262 }), (0, _preact.h)("dialog", _extends({
2263 open: true,
2264 style: Object.assign({
2265 minHeight: '150px',
2266 minWidth: '300px',
2267 width: '600px',
2268 // this is important for iOS
2269 maxHeight: 'calc(100vh - 120px)'
2270 }, style),
2271 className: (0, _classnames.default)('ph2 pt2 pb1 bg-white bn br3 shadow-2 z-999 relative flex flex-column', className)
2272 }, props), (0, _preact.h)("div", {
2273 className: "w-100 pt1 ph1"
2274 }, !forceChoice && // this is just a spacer
2275 (0, _preact.h)("div", {
2276 className: "fr",
2277 style: {
2278 width: '44px',
2279 height: '10px'
2280 }
2281 }, (0, _preact.h)("button", {
2282 onClick: doClose,
2283 style: {
2284 top: '-16px',
2285 right: '-4px'
2286 },
2287 className: "button-reset bn bg-transparent relative pa3"
2288 }, (0, _preact.h)(_icon.Icon, {
2289 icon: "close"
2290 }))), title && (0, _preact.h)("h3", {
2291 className: "mt0 mb2"
2292 }, title)), (0, _preact.h)("div", {
2293 className: "pa1 prevent-overscroll overflow-y-scroll w-100 overflow-x-hidden"
2294 }, children), (0, _preact.h)("div", {
2295 className: "ph1 pv2"
2296 }, bottom))));
2297};
2298
2299exports.Dialog = Dialog;
2300},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./icon":"../icon.js","./utils/omit":"../utils/omit.js","./portal":"../portal.js","./shield":"../shield.js"}],"../../node_modules/milliseconds/milliseconds.js":[function(require,module,exports) {
2301function calc(m) {
2302 return function(n) { return Math.round(n * m); };
2303};
2304module.exports = {
2305 seconds: calc(1e3),
2306 minutes: calc(6e4),
2307 hours: calc(36e5),
2308 days: calc(864e5),
2309 weeks: calc(6048e5),
2310 months: calc(26298e5),
2311 years: calc(315576e5)
2312};
2313
2314},{}],"../footer.js":[function(require,module,exports) {
2315"use strict";
2316
2317Object.defineProperty(exports, "__esModule", {
2318 value: true
2319});
2320exports.Footer = void 0;
2321
2322var _preact = require("preact");
2323
2324var _milliseconds = _interopRequireDefault(require("milliseconds"));
2325
2326function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2327
2328var currentYear = new Date().getFullYear();
2329
2330var getUpdatedText = function getUpdatedText(updatedDate) {
2331 if (Date.now() - updatedDate < _milliseconds.default.weeks(2)) {
2332 var date = new Date(updatedDate);
2333 return "".concat(date.getMonth() + 1, "/").concat(date.getDate(), "/").concat((date.getFullYear() + '').slice(2));
2334 }
2335};
2336
2337var linkClasses = 'link f6 gray no-underline underline-hover';
2338
2339var Footer = function Footer(_ref) {
2340 var _ref$privacyUrl = _ref.privacyUrl,
2341 privacyUrl = _ref$privacyUrl === void 0 ? 'https://legal.anesthesiacharting.com/privacy' : _ref$privacyUrl,
2342 _ref$termsUrl = _ref.termsUrl,
2343 termsUrl = _ref$termsUrl === void 0 ? 'https://legal.anesthesiacharting.com/terms' : _ref$termsUrl,
2344 version = _ref.version,
2345 privacyUpdatedDate = _ref.privacyUpdatedDate,
2346 hideLinks = _ref.hideLinks,
2347 extra = _ref.extra;
2348 var updateText = privacyUpdatedDate && getUpdatedText(privacyUpdatedDate);
2349 return (0, _preact.h)("footer", {
2350 className: "pt2 pb3 tc f6 gray mb7"
2351 }, "\xA9 ", currentYear, " I.V. Enterprises LLC ", version && "v".concat(version), ' ', !hideLinks && (0, _preact.h)("div", {
2352 className: "mt1 no-print"
2353 }, (0, _preact.h)("a", {
2354 className: linkClasses,
2355 href: termsUrl,
2356 rel: "noopener"
2357 }, "terms"), ' | ', (0, _preact.h)("a", {
2358 className: linkClasses,
2359 href: privacyUrl,
2360 rel: "noopener"
2361 }, "privacy"), updateText && " (updated ".concat(updateText, ")")), extra);
2362};
2363
2364exports.Footer = Footer;
2365},{"preact":"../../node_modules/preact/dist/preact.module.js","milliseconds":"../../node_modules/milliseconds/milliseconds.js"}],"../utils/throttle.js":[function(require,module,exports) {
2366"use strict";
2367
2368Object.defineProperty(exports, "__esModule", {
2369 value: true
2370});
2371exports.throttle = void 0;
2372
2373var throttle = function throttle(callback, delay) {
2374 var timeout = null;
2375
2376 var fn = function fn() {
2377 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2378 args[_key] = arguments[_key];
2379 }
2380
2381 if (!timeout) {
2382 timeout = setTimeout(function () {
2383 callback.apply(void 0, args);
2384 clearTimeout(timeout);
2385 timeout = null;
2386 }, delay);
2387 }
2388 };
2389
2390 fn();
2391 return fn;
2392};
2393
2394exports.throttle = throttle;
2395},{}],"../env-tag.js":[function(require,module,exports) {
2396"use strict";
2397
2398Object.defineProperty(exports, "__esModule", {
2399 value: true
2400});
2401exports.default = void 0;
2402
2403var _preact = require("preact");
2404
2405var _classnames = _interopRequireDefault(require("classnames"));
2406
2407function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2408
2409var classMap = {
2410 dev: 'bg-yellow black',
2411 stage: 'bg-green black'
2412};
2413var fallback = 'bg-red white';
2414
2415var _default = function _default(_ref) {
2416 var env = _ref.env;
2417
2418 if (!env || env === 'prod') {
2419 return null;
2420 }
2421
2422 return (0, _preact.h)("div", {
2423 style: {
2424 right: '0px',
2425 top: '0px',
2426 padding: '4px',
2427 fontSize: '10px',
2428 borderBottomLeftRadius: '4px'
2429 },
2430 className: (0, _classnames.default)('absolute z-999 br--bottom-left fw6', classMap[env] || fallback)
2431 }, env.toUpperCase());
2432};
2433
2434exports.default = _default;
2435},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js"}],"../app-layout.js":[function(require,module,exports) {
2436"use strict";
2437
2438Object.defineProperty(exports, "__esModule", {
2439 value: true
2440});
2441exports.AppLayout = void 0;
2442
2443var _classnames = _interopRequireDefault(require("classnames"));
2444
2445var _preact = require("preact");
2446
2447var _logo = require("./logo");
2448
2449var _drawer = require("./drawer");
2450
2451var _shield = require("./shield");
2452
2453var _footer = require("./footer");
2454
2455var _button = require("./button");
2456
2457var _omit = _interopRequireDefault(require("./utils/omit"));
2458
2459var _throttle = require("./utils/throttle");
2460
2461var _envTag = _interopRequireDefault(require("./env-tag"));
2462
2463function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2464
2465function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2466
2467function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2468
2469function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2470
2471function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2472
2473function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2474
2475function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
2476
2477function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2478
2479function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2480
2481function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
2482
2483function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2484
2485function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
2486
2487function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2488
2489var DrawerContentWrapper = /*#__PURE__*/function (_Component) {
2490 _inherits(DrawerContentWrapper, _Component);
2491
2492 var _super = _createSuper(DrawerContentWrapper);
2493
2494 function DrawerContentWrapper(props) {
2495 var _this;
2496
2497 _classCallCheck(this, DrawerContentWrapper);
2498
2499 _this = _super.call(this, props);
2500 _this.handleScroll = (0, _throttle.throttle)(_this.handleScroll.bind(_assertThisInitialized(_this)), 200);
2501 return _this;
2502 }
2503
2504 _createClass(DrawerContentWrapper, [{
2505 key: "handleScroll",
2506 value: function handleScroll() {
2507 if (!this.base) {
2508 return;
2509 }
2510
2511 var _this$props = this.props,
2512 updateScrolledDown = _this$props.updateScrolledDown,
2513 scrolledDown = _this$props.scrolledDown;
2514 var scrollTop = this.base.scrollTop;
2515
2516 if (scrollTop === 0 && scrolledDown) {
2517 updateScrolledDown(false);
2518 }
2519
2520 if (!scrolledDown && scrollTop > 0) {
2521 updateScrolledDown(true);
2522 }
2523 }
2524 }, {
2525 key: "componentDidMount",
2526 value: function componentDidMount() {
2527 this.base.addEventListener('scroll', this.handleScroll, {
2528 passive: true
2529 });
2530 }
2531 }, {
2532 key: "componentWillUnMount",
2533 value: function componentWillUnMount() {
2534 this.base.removeEventListener('scroll', this.handleScroll, {
2535 passive: true
2536 });
2537 }
2538 }, {
2539 key: "render",
2540 value: function render(_ref) {
2541 var style = _ref.style,
2542 children = _ref.children;
2543 return (0, _preact.h)("div", {
2544 className: "v-scroll h-100 w-100",
2545 style: style
2546 }, children);
2547 }
2548 }]);
2549
2550 return DrawerContentWrapper;
2551}(_preact.Component);
2552
2553var AppLayout = /*#__PURE__*/function (_Component2) {
2554 _inherits(AppLayout, _Component2);
2555
2556 var _super2 = _createSuper(AppLayout);
2557
2558 function AppLayout(props) {
2559 var _this2;
2560
2561 _classCallCheck(this, AppLayout);
2562
2563 _this2 = _super2.call(this, props);
2564 _this2.state = {
2565 drawerScrolledDown: false
2566 };
2567 _this2.updateScrolledDown = _this2.updateScrolledDown.bind(_assertThisInitialized(_this2));
2568 return _this2;
2569 }
2570
2571 _createClass(AppLayout, [{
2572 key: "updateScrolledDown",
2573 value: function updateScrolledDown(scrolledDown) {
2574 this.setState({
2575 drawerScrolledDown: scrolledDown
2576 });
2577 }
2578 }, {
2579 key: "render",
2580 value: function render(props, _ref2) {
2581 var drawerScrolledDown = _ref2.drawerScrolledDown;
2582 var drawerOpen = props.drawerOpen,
2583 screenIsWide = props.screenIsWide,
2584 drawerEnabled = props.drawerEnabled,
2585 drawerContent = props.drawerContent,
2586 statusBarContent = props.statusBarContent,
2587 extraContent = props.extraContent,
2588 extraFooterContent = props.extraFooterContent,
2589 _props$drawerWidth = props.drawerWidth,
2590 drawerWidth = _props$drawerWidth === void 0 ? 256 : _props$drawerWidth,
2591 mainContent = props.mainContent,
2592 doCloseDrawer = props.doCloseDrawer,
2593 hideFooter = props.hideFooter,
2594 version = props.version,
2595 logoHref = props.logoHref,
2596 logoOnClick = props.logoOnClick,
2597 preventScroll = props.preventScroll,
2598 env = props.env;
2599 var rest = (0, _omit.default)(props, ['drawerOpen', 'screenIsWide', 'drawerEnabled', 'drawerContent', 'statusBarContent', 'extraContent', 'drawerWidth', 'mainContent', 'doCloseDrawer', 'hideFooter', 'version', 'logoHref', 'logoOnClick', 'preventScroll', 'extraFooterContent']);
2600 var drawerAlwaysVisible = drawerEnabled && screenIsWide;
2601 var useFloatingDrawer = drawerEnabled && !screenIsWide;
2602 var showShield = useFloatingDrawer && drawerOpen;
2603 var floatingDrawerHidden = useFloatingDrawer && !drawerOpen;
2604 var leftMarginStyles = drawerAlwaysVisible ? {
2605 width: "calc(100% - ".concat(drawerWidth, "px)"),
2606 marginLeft: "".concat(drawerWidth, "px")
2607 } : {
2608 width: '100%'
2609 };
2610
2611 if (showShield || preventScroll) {
2612 document.body.classList.add('overflow-hidden');
2613 } else {
2614 document.body.classList.remove('overflow-hidden');
2615 }
2616
2617 var drawerHeaderHeightPx = (drawerAlwaysVisible ? 80 : 60) + 'px';
2618 var logoClasses = (0, _classnames.default)({
2619 pointer: logoHref || logoOnClick
2620 });
2621 return (0, _preact.h)("div", _extends({
2622 className: "bg-near-white dark-blue sans-serif min-vh-100"
2623 }, rest), statusBarContent && (0, _preact.h)("div", {
2624 className: "sticky no-print top-0 bg-light-gray z-1 shadow-1",
2625 style: leftMarginStyles
2626 }, statusBarContent), drawerEnabled && (0, _preact.h)(_drawer.Drawer, {
2627 "aria-hidden": floatingDrawerHidden,
2628 className: useFloatingDrawer ? 'z-4 transition' : '',
2629 style: {
2630 width: "".concat(drawerWidth, "px"),
2631 transform: floatingDrawerHidden ? "translateX(".concat(-drawerWidth, "px)") : null
2632 }
2633 }, (0, _preact.h)("div", {
2634 className: (0, _classnames.default)('absolute left-0 bg-dark-blue z-1 top-0 pa2 pa3-l', {
2635 'shadow-1': drawerScrolledDown
2636 }),
2637 style: {
2638 width: "".concat(drawerWidth, "px"),
2639 height: drawerHeaderHeightPx
2640 }
2641 }, (0, _preact.h)(_envTag.default, {
2642 env: env
2643 }), screenIsWide && (0, _preact.h)("a", {
2644 className: (0, _classnames.default)('db link white', logoClasses),
2645 href: logoHref,
2646 onClick: logoOnClick
2647 }, (0, _preact.h)(_logo.LogoDark, null)), !screenIsWide && (0, _preact.h)("div", {
2648 className: "flex items-center justify-between"
2649 }, (0, _preact.h)(_button.TapIconButton, {
2650 icon: "close",
2651 color: "white",
2652 className: "flex-shrink-0",
2653 onClick: function onClick(e) {
2654 e.preventDefault();
2655 doCloseDrawer();
2656 }
2657 }), (0, _preact.h)("a", {
2658 className: logoClasses,
2659 href: logoHref,
2660 onClick: logoOnClick
2661 }, (0, _preact.h)(_logo.LogoTextOnly, {
2662 className: "mh3",
2663 style: {
2664 paddingTop: '6px',
2665 width: '168px'
2666 }
2667 })))), (0, _preact.h)(DrawerContentWrapper, {
2668 scrolledDown: drawerScrolledDown,
2669 updateScrolledDown: this.updateScrolledDown,
2670 style: {
2671 paddingTop: drawerHeaderHeightPx,
2672 paddingBottom: '120px'
2673 }
2674 }, drawerContent)), showShield && (0, _preact.h)(_shield.Shield, {
2675 className: "z-3 dn-l",
2676 onClick: function onClick() {
2677 return doCloseDrawer && doCloseDrawer();
2678 }
2679 }), (0, _preact.h)("main", {
2680 style: leftMarginStyles,
2681 className: "bg-nearly-white overflow-x-hidden"
2682 }, mainContent, hideFooter !== true && (0, _preact.h)(_footer.Footer, {
2683 version: version,
2684 extra: extraFooterContent
2685 })), extraContent);
2686 }
2687 }]);
2688
2689 return AppLayout;
2690}(_preact.Component);
2691
2692exports.AppLayout = AppLayout;
2693},{"classnames":"../../node_modules/classnames/index.js","preact":"../../node_modules/preact/dist/preact.module.js","./logo":"../logo.js","./drawer":"../drawer.js","./shield":"../shield.js","./footer":"../footer.js","./button":"../button.js","./utils/omit":"../utils/omit.js","./utils/throttle":"../utils/throttle.js","./env-tag":"../env-tag.js"}],"../../node_modules/tryit/tryit.js":[function(require,module,exports) {
2694// tryit
2695// Simple, re-usuable try-catch, this is a performance optimization
2696// and provides a cleaner API.
2697module.exports = function (fn, cb) {
2698 var err;
2699
2700 try {
2701 fn();
2702 } catch (e) {
2703 err = e;
2704 }
2705
2706 if (cb) cb(err || null);
2707};
2708
2709},{}],"../utils/ls.js":[function(require,module,exports) {
2710"use strict";
2711
2712Object.defineProperty(exports, "__esModule", {
2713 value: true
2714});
2715exports.clearLocalStorage = exports.deleteLocalStorageItem = exports.getLocalStorageItem = exports.setLocalStorageItem = void 0;
2716
2717var _tryit = _interopRequireDefault(require("tryit"));
2718
2719function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2720
2721var setLocalStorageItem = function setLocalStorageItem(item, value) {
2722 return (0, _tryit.default)(function () {
2723 return localStorage.setItem(item, value);
2724 });
2725};
2726
2727exports.setLocalStorageItem = setLocalStorageItem;
2728
2729var getLocalStorageItem = function getLocalStorageItem(item) {
2730 var result;
2731 (0, _tryit.default)(function () {
2732 result = localStorage.getItem(item);
2733 });
2734 return result;
2735};
2736
2737exports.getLocalStorageItem = getLocalStorageItem;
2738
2739var deleteLocalStorageItem = function deleteLocalStorageItem(item) {
2740 return (0, _tryit.default)(function () {
2741 return delete localStorage[item];
2742 });
2743};
2744
2745exports.deleteLocalStorageItem = deleteLocalStorageItem;
2746
2747var clearLocalStorage = function clearLocalStorage() {
2748 return (0, _tryit.default)(function () {
2749 var debug = localStorage.debug;
2750 localStorage.clear();
2751
2752 if (debug) {
2753 localStorage.debug = debug;
2754 }
2755 });
2756};
2757
2758exports.clearLocalStorage = clearLocalStorage;
2759},{"tryit":"../../node_modules/tryit/tryit.js"}],"../utils/cookie.js":[function(require,module,exports) {
2760"use strict";
2761
2762Object.defineProperty(exports, "__esModule", {
2763 value: true
2764});
2765exports.deleteCookie = exports.readCookie = exports.writeCookie = void 0;
2766
2767function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2768
2769var writeCookie = function writeCookie(item, value) {
2770 var _cookieData;
2771
2772 var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
2773 maxAge = _ref.maxAge,
2774 expires = _ref.expires,
2775 _ref$secure = _ref.secure,
2776 secure = _ref$secure === void 0 ? false : _ref$secure,
2777 domain = _ref.domain;
2778
2779 var cookieData = (_cookieData = {}, _defineProperty(_cookieData, item, value), _defineProperty(_cookieData, "domain", domain || location.hostname), _defineProperty(_cookieData, "path", '/'), _defineProperty(_cookieData, "secure", secure), _cookieData);
2780
2781 if (location.hostname === 'localhost') {
2782 cookieData.secure = false;
2783 }
2784
2785 if (maxAge) {
2786 cookieData['max-age'] = Math.floor(maxAge / 1000); // convert to seconds
2787 } else if (expires) {
2788 cookieData.expires = expires.toGMTString();
2789 }
2790
2791 var cookieString = Object.keys(cookieData).reduce(function (result, key) {
2792 var value = cookieData[key];
2793
2794 if (typeof value === 'boolean') {
2795 if (value === true) {
2796 result.push(key);
2797 }
2798 } else {
2799 result.push("".concat(key, "=").concat(value));
2800 }
2801
2802 return result;
2803 }, []).join(';');
2804 document.cookie = cookieString;
2805};
2806
2807exports.writeCookie = writeCookie;
2808
2809var readCookie = function readCookie(name) {
2810 var value = null;
2811 document.cookie.split(';').find(function (item) {
2812 var parts = item.split('=');
2813 var key = parts[0].trim();
2814
2815 if (key === name) {
2816 value = parts[1].trim();
2817 return true;
2818 }
2819 });
2820 return value;
2821};
2822
2823exports.readCookie = readCookie;
2824
2825var deleteCookie = function deleteCookie(item, domain) {
2826 return writeCookie(item, '', {
2827 expires: new Date(0),
2828 domain: domain
2829 });
2830};
2831
2832exports.deleteCookie = deleteCookie;
2833},{}],"../utils/token-writer.js":[function(require,module,exports) {
2834"use strict";
2835
2836Object.defineProperty(exports, "__esModule", {
2837 value: true
2838});
2839exports.createTokenWriter = void 0;
2840
2841var _milliseconds = _interopRequireDefault(require("milliseconds"));
2842
2843var _cookie = require("./cookie");
2844
2845var _ls = require("./ls");
2846
2847function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2848
2849var createTokenWriter = function createTokenWriter(_ref) {
2850 var _ref$name = _ref.name,
2851 name = _ref$name === void 0 ? 'token' : _ref$name,
2852 domain = _ref.domain;
2853
2854 var writeToken = function writeToken(token) {
2855 (0, _cookie.writeCookie)(name, token, {
2856 maxAge: _milliseconds.default.days(180),
2857 secure: true,
2858 domain: domain
2859 });
2860 };
2861
2862 var readToken = function readToken() {
2863 var valueFromLS = (0, _ls.getLocalStorageItem)('token');
2864 var valueFromCookie = (0, _cookie.readCookie)(name);
2865
2866 if (valueFromLS && valueFromLS !== valueFromCookie) {
2867 writeToken(valueFromLS);
2868 (0, _ls.deleteLocalStorageItem)('token');
2869 }
2870
2871 return valueFromCookie || valueFromLS;
2872 };
2873
2874 var clearToken = function clearToken() {
2875 return (0, _cookie.deleteCookie)(name, domain);
2876 };
2877
2878 return {
2879 writeToken: writeToken,
2880 readToken: readToken,
2881 clearToken: clearToken
2882 };
2883};
2884
2885exports.createTokenWriter = createTokenWriter;
2886},{"milliseconds":"../../node_modules/milliseconds/milliseconds.js","./cookie":"../utils/cookie.js","./ls":"../utils/ls.js"}],"../bundles/token.js":[function(require,module,exports) {
2887"use strict";
2888
2889Object.defineProperty(exports, "__esModule", {
2890 value: true
2891});
2892exports.createTokenBundle = void 0;
2893
2894var _tokenWriter = require("../utils/token-writer");
2895
2896var _ls = require("../utils/ls");
2897
2898var UPDATED = 'TOKEN_UPDATED';
2899var CLEARED = 'TOKEN_CLEARED';
2900
2901var createTokenBundle = function createTokenBundle(opts) {
2902 var _createTokenWriter = (0, _tokenWriter.createTokenWriter)(opts),
2903 readToken = _createTokenWriter.readToken,
2904 writeToken = _createTokenWriter.writeToken,
2905 clearToken = _createTokenWriter.clearToken;
2906
2907 return {
2908 name: 'token',
2909 getReducer: function getReducer() {
2910 var initial = {
2911 token: readToken()
2912 };
2913 return function () {
2914 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initial;
2915
2916 var _ref = arguments.length > 1 ? arguments[1] : undefined,
2917 type = _ref.type,
2918 payload = _ref.payload;
2919
2920 if (type === UPDATED) {
2921 return Object.assign({}, state, {
2922 token: payload
2923 });
2924 }
2925
2926 if (type === CLEARED) {
2927 return Object.assign({}, state, {
2928 token: null
2929 });
2930 }
2931
2932 return state;
2933 };
2934 },
2935 selectAuthToken: function selectAuthToken(state) {
2936 return state.token.token;
2937 },
2938 selectIsSignedIn: function selectIsSignedIn(state) {
2939 return !!state.token.token;
2940 },
2941 doReceiveToken: function doReceiveToken(token) {
2942 return function (_ref2) {
2943 var dispatch = _ref2.dispatch;
2944 writeToken(token);
2945 dispatch({
2946 type: UPDATED,
2947 payload: token
2948 });
2949 };
2950 },
2951 doClearToken: function doClearToken() {
2952 return function (_ref3) {
2953 var dispatch = _ref3.dispatch;
2954 clearToken();
2955 (0, _ls.clearLocalStorage)();
2956 dispatch({
2957 type: CLEARED
2958 });
2959 };
2960 }
2961 };
2962};
2963
2964exports.createTokenBundle = createTokenBundle;
2965},{"../utils/token-writer":"../utils/token-writer.js","../utils/ls":"../utils/ls.js"}],"../bundles/layout-ui.js":[function(require,module,exports) {
2966"use strict";
2967
2968Object.defineProperty(exports, "__esModule", {
2969 value: true
2970});
2971exports.layoutUiBundle = void 0;
2972var DRAWER_OPENED = 'DRAWER_OPENED';
2973var DRAWER_CLOSED = 'DRAWER_CLOSED';
2974var layoutUiBundle = {
2975 name: 'layoutUi',
2976 reducer: function reducer() {
2977 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2978 drawerOpen: false,
2979 beeping: null
2980 };
2981
2982 var _ref = arguments.length > 1 ? arguments[1] : undefined,
2983 type = _ref.type;
2984
2985 if (type === DRAWER_OPENED) {
2986 return Object.assign({}, state, {
2987 drawerOpen: true
2988 });
2989 }
2990
2991 if (type === DRAWER_CLOSED) {
2992 return Object.assign({}, state, {
2993 drawerOpen: false
2994 });
2995 }
2996
2997 return state;
2998 },
2999 selectDrawerIsOpen: function selectDrawerIsOpen(state) {
3000 return state.layoutUi.drawerOpen;
3001 },
3002 doOpenDrawer: function doOpenDrawer() {
3003 return {
3004 type: DRAWER_OPENED
3005 };
3006 },
3007 doCloseDrawer: function doCloseDrawer() {
3008 return {
3009 type: DRAWER_CLOSED
3010 };
3011 }
3012};
3013exports.layoutUiBundle = layoutUiBundle;
3014},{}],"../utils/decimals.js":[function(require,module,exports) {
3015"use strict";
3016
3017Object.defineProperty(exports, "__esModule", {
3018 value: true
3019});
3020exports.cleanDecimalInput = exports.ensureDecimals = exports.roundToPrecision = exports.roundToDecimal = exports.getNumberOfDecimals = void 0;
3021
3022var getNumberOfDecimals = function getNumberOfDecimals(num) {
3023 var postDecimalString = (num + '').split('.')[1];
3024 return postDecimalString ? postDecimalString.length : 0;
3025};
3026
3027exports.getNumberOfDecimals = getNumberOfDecimals;
3028
3029var roundToDecimal = function roundToDecimal(number, precision) {
3030 var factor = Math.pow(10, precision);
3031 return Math.round(number * factor) / factor;
3032};
3033
3034exports.roundToDecimal = roundToDecimal;
3035
3036var roundToPrecision = function roundToPrecision(number, precision) {
3037 var decimalString = roundToDecimal(number, precision).toString();
3038 var numberOfDigitsBeforePeriod = decimalString.split('.')[0].length;
3039 var actualPrecision = Math.max(precision - numberOfDigitsBeforePeriod, 0);
3040 return roundToDecimal(number, actualPrecision);
3041};
3042
3043exports.roundToPrecision = roundToPrecision;
3044
3045var ensureDecimals = function ensureDecimals(number) {
3046 var targetDecimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3047 var numberOfDecimals = getNumberOfDecimals(number);
3048 var numberToAdd = targetDecimals - numberOfDecimals;
3049
3050 if (!numberToAdd) {
3051 return number;
3052 }
3053
3054 var result = number + (numberOfDecimals === 0 ? '.' : '');
3055
3056 while (numberToAdd--) {
3057 result += '0';
3058 }
3059
3060 return result;
3061};
3062
3063exports.ensureDecimals = ensureDecimals;
3064var floatInputRE = /[^0-9.]/g;
3065var leadingZerosWithDecimalRE = /^0{2,}\./g;
3066var leadingZerosNoDecimalRE = /^0{1,}[1-9]/g;
3067var periodRE = /\./g;
3068
3069var cleanDecimalInput = function cleanDecimalInput(str) {
3070 var matches = 0;
3071 return str // removes invalid characters anywhere
3072 .replace(floatInputRE, '') // removes leading zeros if there's more than one before a decimal '00.123'
3073 .replace(leadingZerosWithDecimalRE, '0.') // removes leading zeros if there's no decimal
3074 .replace(leadingZerosNoDecimalRE, function (match) {
3075 return match.slice(-1);
3076 }) // removes all but first decimal
3077 .replace(periodRE, function () {
3078 return matches++ > 0 ? '' : '.';
3079 });
3080};
3081
3082exports.cleanDecimalInput = cleanDecimalInput;
3083},{}],"../plus-minus.js":[function(require,module,exports) {
3084"use strict";
3085
3086Object.defineProperty(exports, "__esModule", {
3087 value: true
3088});
3089exports.IncrementorButtons = exports.MinusButton = exports.PlusButton = void 0;
3090
3091var _preact = require("preact");
3092
3093var _classnames = _interopRequireDefault(require("classnames"));
3094
3095var _ = require("./");
3096
3097var _decimals = require("./utils/decimals");
3098
3099function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3100
3101function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3102
3103function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3104
3105function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3106
3107function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3108
3109function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3110
3111function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3112
3113function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3114
3115function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
3116
3117function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3118
3119function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3120
3121function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3122
3123function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3124
3125function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3126
3127function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3128
3129var HOLD_DELAY = 180;
3130var ITERATION_DELAY = 90;
3131
3132var getPlusMinusButton = function getPlusMinusButton(icon) {
3133 return (/*#__PURE__*/function (_Component) {
3134 _inherits(_class, _Component);
3135
3136 var _super = _createSuper(_class);
3137
3138 function _class(props) {
3139 var _this;
3140
3141 _classCallCheck(this, _class);
3142
3143 _this = _super.call(this, props);
3144 _this.runIt = _this.runIt.bind(_assertThisInitialized(_this));
3145 _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
3146 _this.onPress = _this.onPress.bind(_assertThisInitialized(_this));
3147 _this.clear = _this.clear.bind(_assertThisInitialized(_this));
3148 _this.holdStart = false;
3149 return _this;
3150 }
3151
3152 _createClass(_class, [{
3153 key: "runIt",
3154 value: function runIt() {
3155 var _this$props = this.props,
3156 onClick = _this$props.onClick,
3157 disabled = _this$props.disabled;
3158
3159 if (onClick && !disabled) {
3160 onClick();
3161 }
3162 }
3163 }, {
3164 key: "componentDidMount",
3165 value: function componentDidMount() {
3166 if (this.base && this.base.addEventListener) {
3167 this.base.addEventListener('touchstart', this.onPress);
3168 this.base.addEventListener('touchend', this.clear);
3169 this.base.addEventListener('touchcancel', this.clear);
3170 }
3171 }
3172 }, {
3173 key: "componentWillUnmount",
3174 value: function componentWillUnmount() {
3175 if (this.base && this.base.removeEventListener) {
3176 this.base.removeEventListener('touchstart', this.onPress);
3177 this.base.removeEventListener('touchend', this.clear);
3178 this.base.removeEventListener('touchcancel', this.clear);
3179 }
3180 }
3181 }, {
3182 key: "onClick",
3183 value: function onClick(e) {
3184 e.preventDefault();
3185 e.stopImmediatePropagation();
3186 this.clear();
3187 this.runIt();
3188 }
3189 }, {
3190 key: "onPress",
3191 value: function onPress() {
3192 var _this2 = this;
3193
3194 var iterate = function iterate() {
3195 clearTimeout(_this2.iterationTimer);
3196 var delay = _this2.props.iterationDelay || ITERATION_DELAY;
3197
3198 var holdDuration = Date.now() - _this2.holdStart;
3199
3200 if (holdDuration > 4000) {
3201 delay = delay * 0.4;
3202 } else if (holdDuration > 2000) {
3203 delay = delay * 0.5;
3204 }
3205
3206 _this2.iterationTimer = setTimeout(function () {
3207 if (_this2.holdStart && !_this2.props.disabled) {
3208 _this2.runIt();
3209
3210 iterate();
3211 }
3212 }, delay);
3213 };
3214
3215 this.holdTimer = setTimeout(function () {
3216 _this2.holdStart = Date.now();
3217 iterate();
3218 }, this.props.holdDelay || HOLD_DELAY);
3219 }
3220 }, {
3221 key: "clear",
3222 value: function clear() {
3223 clearTimeout(this.holdTimer);
3224 clearTimeout(this.iterationTimer);
3225 this.holdStart = false;
3226 }
3227 }, {
3228 key: "render",
3229 value: function render() {
3230 var _this$props2 = this.props,
3231 className = _this$props2.className,
3232 disabled = _this$props2.disabled,
3233 name = _this$props2.name;
3234 return (0, _preact.h)(_.Button, {
3235 "data-e2e": "".concat(name || '').concat(icon.charAt(0).toUpperCase()).concat(icon.slice(1), "Button"),
3236 type: "button",
3237 onContextMenu: function onContextMenu(e) {
3238 e.preventDefault();
3239 e.stopImmediatePropagation();
3240 return false;
3241 },
3242 onClick: this.onClick,
3243 onMouseUp: this.clear,
3244 onMouseLeave: this.clear,
3245 onMouseDown: this.onPress,
3246 disabled: disabled,
3247 className: (0, _classnames.default)('ba br2 pa2 mv1', {
3248 mr2: icon === 'add'
3249 }, className)
3250 }, (0, _preact.h)("div", {
3251 className: "flex items-center"
3252 }, (0, _preact.h)(_.Icon, {
3253 size: "18",
3254 icon: icon
3255 }), this.props.children));
3256 }
3257 }]);
3258
3259 return _class;
3260 }(_preact.Component)
3261 );
3262};
3263
3264var PlusButton = getPlusMinusButton('add');
3265exports.PlusButton = PlusButton;
3266var MinusButton = getPlusMinusButton('remove');
3267exports.MinusButton = MinusButton;
3268
3269var IncrementorButtons = function IncrementorButtons(_ref) {
3270 var displayValue = _ref.displayValue,
3271 updateValue = _ref.updateValue,
3272 _ref$step = _ref.step,
3273 step = _ref$step === void 0 ? 1 : _ref$step,
3274 _ref$max = _ref.max,
3275 max = _ref$max === void 0 ? Infinity : _ref$max,
3276 _ref$min = _ref.min,
3277 min = _ref$min === void 0 ? 0 : _ref$min,
3278 _ref$className = _ref.className,
3279 className = _ref$className === void 0 ? '' : _ref$className,
3280 _ref$width = _ref.width,
3281 width = _ref$width === void 0 ? '200px' : _ref$width,
3282 _ref$showStep = _ref.showStep,
3283 showStep = _ref$showStep === void 0 ? true : _ref$showStep,
3284 _ref$unit = _ref.unit,
3285 unit = _ref$unit === void 0 ? '' : _ref$unit,
3286 _ref$displayValueClas = _ref.displayValueClasses,
3287 displayValueClasses = _ref$displayValueClas === void 0 ? 'f4' : _ref$displayValueClas,
3288 value = _ref.value,
3289 startingValue = _ref.startingValue,
3290 formatter = _ref.formatter,
3291 name = _ref.name,
3292 style = _ref.style;
3293 var targetNumberOfDecimals = (0, _decimals.getNumberOfDecimals)(step);
3294 var valueToShow = displayValue != null ? displayValue : value;
3295
3296 if (!valueToShow) {
3297 valueToShow = targetNumberOfDecimals === 0 ? value : (0, _decimals.ensureDecimals)(value, targetNumberOfDecimals);
3298 }
3299
3300 if (formatter) {
3301 valueToShow = formatter(valueToShow);
3302 }
3303
3304 var stepDown = step;
3305 var stepUp = step;
3306 var effectiveValue = value != null ? value : startingValue;
3307 return (0, _preact.h)("div", {
3308 className: "flex items-center justify-between ".concat(className),
3309 style: _objectSpread({
3310 width: width
3311 }, style)
3312 }, (0, _preact.h)("div", {
3313 "data-e2e": "".concat(name, "Value"),
3314 className: "dib ".concat(displayValueClasses)
3315 }, valueToShow, unit && " ".concat(unit)), (0, _preact.h)("div", null, (0, _preact.h)(PlusButton, {
3316 name: name,
3317 disabled: effectiveValue + stepUp > max,
3318 onClick: function onClick() {
3319 return updateValue((0, _decimals.roundToDecimal)(effectiveValue + stepUp, targetNumberOfDecimals));
3320 }
3321 }, showStep ? step : null), (0, _preact.h)(MinusButton, {
3322 name: name,
3323 disabled: effectiveValue - stepDown < min,
3324 onClick: function onClick() {
3325 return updateValue((0, _decimals.roundToDecimal)(effectiveValue - stepDown, targetNumberOfDecimals));
3326 }
3327 }, showStep ? step : null)));
3328};
3329
3330exports.IncrementorButtons = IncrementorButtons;
3331},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./":"../index.js","./utils/decimals":"../utils/decimals.js"}],"../signature.js":[function(require,module,exports) {
3332"use strict";
3333
3334Object.defineProperty(exports, "__esModule", {
3335 value: true
3336});
3337exports.default = void 0;
3338
3339var _preact = require("preact");
3340
3341function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3342
3343function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3344
3345function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3346
3347function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
3348
3349function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3350
3351function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3352
3353function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3354
3355function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
3356
3357function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3358
3359function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3360
3361function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3362
3363function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3364
3365function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3366
3367function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3368
3369var AnimatedPath = /*#__PURE__*/function (_Component) {
3370 _inherits(AnimatedPath, _Component);
3371
3372 var _super = _createSuper(AnimatedPath);
3373
3374 function AnimatedPath(props) {
3375 var _this;
3376
3377 _classCallCheck(this, AnimatedPath);
3378
3379 _this = _super.call(this, props);
3380 _this.state = {
3381 firstRender: true,
3382 length: 0
3383 };
3384 return _this;
3385 }
3386
3387 _createClass(AnimatedPath, [{
3388 key: "componentDidMount",
3389 value: function componentDidMount() {
3390 var _this2 = this;
3391
3392 setTimeout(function () {
3393 var length = Math.round(_this2.base.getTotalLength());
3394
3395 _this2.setState({
3396 length: length
3397 });
3398
3399 setTimeout(function () {
3400 _this2.setState({
3401 firstRender: false
3402 });
3403 }, 100);
3404 }, 100);
3405 }
3406 }, {
3407 key: "render",
3408 value: function render(_ref, _ref2) {
3409 var path = _ref.path,
3410 animate = _ref.animate;
3411 var firstRender = _ref2.firstRender,
3412 length = _ref2.length;
3413
3414 if (!animate) {
3415 return (0, _preact.h)("path", {
3416 d: path,
3417 fill: "none",
3418 stroke: "black",
3419 "stroke-width": "5"
3420 });
3421 }
3422
3423 return (0, _preact.h)("path", {
3424 key: length ? 'real' : 'fake',
3425 d: path,
3426 fill: "none",
3427 stroke: length ? 'black' : 'none',
3428 "stroke-width": "5",
3429 style: {
3430 transitionDuration: '1s',
3431 transitionDelay: '.25s',
3432 transitionProperty: 'stroke-dashoffset',
3433 strokeDashoffset: firstRender ? length : 0,
3434 strokeDasharray: length
3435 }
3436 });
3437 }
3438 }]);
3439
3440 return AnimatedPath;
3441}(_preact.Component);
3442
3443var _default = function _default(_ref3) {
3444 var path = _ref3.path,
3445 _ref3$width = _ref3.width,
3446 width = _ref3$width === void 0 ? '100' : _ref3$width,
3447 animate = _ref3.animate,
3448 rest = _objectWithoutProperties(_ref3, ["path", "width", "animate"]);
3449
3450 return (0, _preact.h)("svg", _extends({
3451 width: width,
3452 height: width / 2,
3453 viewBox: "0 0 800 400"
3454 }, rest), (0, _preact.h)(AnimatedPath, {
3455 key: path.slice(0, 10),
3456 path: path,
3457 animate: animate
3458 }));
3459};
3460
3461exports.default = _default;
3462},{"preact":"../../node_modules/preact/dist/preact.module.js"}],"../signature-box.js":[function(require,module,exports) {
3463"use strict";
3464
3465Object.defineProperty(exports, "__esModule", {
3466 value: true
3467});
3468exports.default = void 0;
3469
3470var _preact = require("preact");
3471
3472var _ = require("./");
3473
3474function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3475
3476function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3477
3478function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3479
3480function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3481
3482function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
3483
3484function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3485
3486function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3487
3488function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3489
3490function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3491
3492function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3493
3494function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3495
3496var height = 300;
3497
3498var SignatureInput = /*#__PURE__*/function (_Component) {
3499 _inherits(SignatureInput, _Component);
3500
3501 var _super = _createSuper(SignatureInput);
3502
3503 function SignatureInput(props) {
3504 var _this;
3505
3506 _classCallCheck(this, SignatureInput);
3507
3508 _this = _super.call(this, props);
3509 _this.mouseMove = _this.mouseMove.bind(_assertThisInitialized(_this));
3510 _this.mouseEnd = _this.mouseEnd.bind(_assertThisInitialized(_this));
3511 _this.mouseDown = _this.mouseDown.bind(_assertThisInitialized(_this));
3512 _this.mouseUp = _this.mouseUp.bind(_assertThisInitialized(_this));
3513 _this.mouseLeave = _this.mouseLeave.bind(_assertThisInitialized(_this));
3514 _this.touchStart = _this.touchStart.bind(_assertThisInitialized(_this));
3515 _this.touchMove = _this.touchMove.bind(_assertThisInitialized(_this));
3516 _this.touchEnd = _this.touchEnd.bind(_assertThisInitialized(_this));
3517 _this.calculateCanvasInfo = _this.calculateCanvasInfo.bind(_assertThisInitialized(_this));
3518 _this.renderCanvas = _this.renderCanvas.bind(_assertThisInitialized(_this));
3519 return _this;
3520 }
3521
3522 _createClass(SignatureInput, [{
3523 key: "reset",
3524 value: function reset() {
3525 this.path = '';
3526 this.break = true;
3527 }
3528 }, {
3529 key: "componentDidMount",
3530 value: function componentDidMount() {
3531 this.reset();
3532 this.canvas = this.base.querySelector('canvas');
3533 this.ctx = this.canvas.getContext('2d');
3534 window.addEventListener('resize', this.calculateCanvasInfo, {
3535 passive: true
3536 });
3537 window.addEventListener('scroll', this.calculateCanvasInfo, {
3538 passive: true
3539 });
3540 document.addEventListener('mouseup', this.mouseUp);
3541 document.addEventListener('touchmove', this.touchMove);
3542 document.addEventListener('touchend', this.touchEnd);
3543 document.addEventListener('touchcancel', this.touchEnd);
3544 this.canvas.addEventListener('touchstart', this.touchStart);
3545 this.calculateCanvasInfo();
3546 this.renderCanvas();
3547 }
3548 }, {
3549 key: "calculateCanvasInfo",
3550 value: function calculateCanvasInfo() {
3551 var _this$canvas$getBound = this.canvas.getBoundingClientRect(),
3552 top = _this$canvas$getBound.top,
3553 left = _this$canvas$getBound.left,
3554 width = _this$canvas$getBound.width,
3555 height = _this$canvas$getBound.height;
3556
3557 this.canvasInfo = {
3558 left: left,
3559 top: top,
3560 height: height,
3561 width: width
3562 };
3563 }
3564 }, {
3565 key: "componentWillUnmount",
3566 value: function componentWillUnmount() {
3567 window.removeEventListener('resize', this.calculateCanvasInfo, {
3568 passive: true
3569 });
3570 window.removeEventListener('scroll', this.calculateCanvasInfo, {
3571 passive: true
3572 });
3573 document.removeEventListener('mouseup', this.mouseUp);
3574 document.removeEventListener('touchmove', this.touchMove);
3575 document.removeEventListener('touchend', this.touchEnd);
3576 document.removeEventListener('touchcancel', this.touchEnd);
3577 this.canvas && this.canvas.removeEventListener('touchstart', this.touchStart);
3578 }
3579 }, {
3580 key: "adjustCoord",
3581 value: function adjustCoord(clientX, clientY) {
3582 var _this$canvasInfo = this.canvasInfo,
3583 left = _this$canvasInfo.left,
3584 top = _this$canvasInfo.top,
3585 height = _this$canvasInfo.height,
3586 width = _this$canvasInfo.width;
3587 var x = clientX - left;
3588 var y = clientY - top;
3589
3590 if (x < 0 || x > width) {
3591 return null;
3592 }
3593
3594 if (y < 0 || y > height) {
3595 return null;
3596 }
3597
3598 return {
3599 x: x,
3600 y: y
3601 };
3602 }
3603 }, {
3604 key: "appendCoord",
3605 value: function appendCoord(x, y) {
3606 this.path += " ".concat(x, ",").concat(y);
3607 requestAnimationFrame(this.renderCanvas);
3608 }
3609 }, {
3610 key: "mouseDown",
3611 value: function mouseDown(e) {
3612 e.preventDefault();
3613 e.stopImmediatePropagation();
3614 }
3615 }, {
3616 key: "mouseLeave",
3617 value: function mouseLeave(e) {
3618 if (e.buttons === 1) {
3619 this.appendCoord(e.layerX, e.layerY);
3620 this.break = true;
3621 }
3622 }
3623 }, {
3624 key: "mouseUp",
3625 value: function mouseUp() {
3626 this.break = true;
3627 }
3628 }, {
3629 key: "mouseEnd",
3630 value: function mouseEnd(e) {
3631 e.preventDefault();
3632 e.stopImmediatePropagation();
3633 this.break = true;
3634 }
3635 }, {
3636 key: "mouseMove",
3637 value: function mouseMove(e) {
3638 e.preventDefault();
3639 e.stopImmediatePropagation();
3640
3641 if (e.buttons === 1) {
3642 if (this.break) {
3643 this.break = false;
3644 this.path += ' M';
3645 }
3646
3647 var adjusted = this.adjustCoord(e.clientX, e.clientY);
3648
3649 if (adjusted) {
3650 this.appendCoord(adjusted.x, adjusted.y);
3651 } else {
3652 this.break = true;
3653 }
3654 }
3655 }
3656 }, {
3657 key: "touchStart",
3658 value: function touchStart(e) {
3659 this.drawing = true;
3660 this.path += ' M'; // this prevents to "M"s next to each other if
3661 // there's a touch start without a touch move
3662
3663 this.touchMove(e);
3664 e.preventDefault();
3665 }
3666 }, {
3667 key: "touchMove",
3668 value: function touchMove(e) {
3669 if (this.drawing) {
3670 var touch = e.touches[0];
3671 var isStylus = touch.touchType === 'stylus';
3672 var adjusted = this.adjustCoord(touch.clientX + (isStylus ? 0 : -20), touch.clientY + (isStylus ? 0 : -10));
3673
3674 if (adjusted) {
3675 this.appendCoord(adjusted.x, adjusted.y);
3676 } else {
3677 this.break = true;
3678 }
3679 }
3680 }
3681 }, {
3682 key: "touchEnd",
3683 value: function touchEnd() {
3684 this.break = true;
3685 }
3686 }, {
3687 key: "renderCanvas",
3688 value: function renderCanvas() {
3689 var ctx = this.ctx;
3690 var _this$canvas = this.canvas,
3691 width = _this$canvas.width,
3692 height = _this$canvas.height;
3693 ctx.clearRect(0, 0, width, height);
3694 var marginFromEdge = width * 0.1;
3695 var marginFromBottom = 80; // signature line
3696
3697 ctx.beginPath();
3698 ctx.moveTo(marginFromEdge, height - marginFromBottom);
3699 ctx.lineTo(width - marginFromEdge, height - marginFromBottom);
3700 ctx.strokeStyle = '#ddd';
3701 ctx.lineWidth = 2;
3702 ctx.stroke();
3703 ctx.strokeStyle = '#000';
3704 ctx.lineWidth = 1;
3705 ctx.fillStyle = '#000';
3706
3707 if (this.path) {
3708 ctx.stroke(new Path2D(this.path));
3709 }
3710
3711 if (this.props.name) {
3712 ctx.font = '18px sans-serif';
3713 ctx.fillText(this.props.name, marginFromEdge, height - (marginFromBottom - 25));
3714 }
3715 }
3716 }, {
3717 key: "shouldComponentUpdate",
3718 value: function shouldComponentUpdate() {
3719 return false;
3720 }
3721 }, {
3722 key: "render",
3723 value: function render(_ref) {
3724 var _this2 = this;
3725
3726 var updateValue = _ref.updateValue,
3727 close = _ref.close;
3728 return (0, _preact.h)("div", {
3729 className: "top-0 left-0 fixed bg-gray w-100 h-100 z-9999 flex items-center justify-center"
3730 }, (0, _preact.h)("div", {
3731 "data-e2e": "signatureBox"
3732 }, (0, _preact.h)("canvas", {
3733 "data-e2e": "signaturePad",
3734 className: "bg-white ba",
3735 width: Math.min(window.innerWidth - 10, 660),
3736 height: height,
3737 onMouseMove: this.mouseMove,
3738 onMouseDown: this.mouseDown,
3739 onMouseCancel: this.mouseCancel,
3740 onMouseLeave: this.mouseLeave
3741 }), (0, _preact.h)("div", {
3742 className: "flex items-center justify-between mt2"
3743 }, (0, _preact.h)(_.Button, {
3744 primary: true,
3745 large: true,
3746 "data-e2e": "signatureSaveButton",
3747 onClick: function onClick() {
3748 updateValue(_this2.path.trim());
3749 },
3750 type: "button"
3751 }, "Save"), (0, _preact.h)("div", null, (0, _preact.h)(_.Button, {
3752 large: true,
3753 onClick: function onClick() {
3754 _this2.reset();
3755
3756 _this2.renderCanvas();
3757 },
3758 className: "mr2",
3759 type: "button"
3760 }, "Clear"), (0, _preact.h)(_.Button, {
3761 large: true,
3762 onClick: function onClick() {
3763 _this2.reset();
3764
3765 _this2.renderCanvas();
3766
3767 close();
3768 },
3769 "data-e2e": "cancelSignatureButton",
3770 type: "button"
3771 }, "Cancel")))));
3772 }
3773 }]);
3774
3775 return SignatureInput;
3776}(_preact.Component);
3777
3778var _default = SignatureInput;
3779exports.default = _default;
3780},{"preact":"../../node_modules/preact/dist/preact.module.js","./":"../index.js"}],"../utils/question.js":[function(require,module,exports) {
3781"use strict";
3782
3783Object.defineProperty(exports, "__esModule", {
3784 value: true
3785});
3786exports.decorateFormItem = exports.choice = void 0;
3787
3788function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3789
3790function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3791
3792function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3793
3794var choice = function choice(name, val, qs) {
3795 if (Array.isArray(val) && !qs) {
3796 qs = val;
3797 val = name;
3798 }
3799
3800 var result = {
3801 name: name,
3802 val: typeof val !== 'undefined' ? val : name
3803 };
3804
3805 if (qs) {
3806 result.questions = qs;
3807 }
3808
3809 return result;
3810};
3811
3812exports.choice = choice;
3813
3814var testComplete = function testComplete(value) {
3815 return typeof value === 'string' ? !!value : value != null;
3816};
3817
3818var decorateFormItem = function decorateFormItem(item, value) {
3819 var test = item.test,
3820 required = item.required,
3821 completenessTest = item.completenessTest;
3822 var isRequired = required !== false;
3823 var errorMessage = test && test(value);
3824 var isComplete = !isRequired || !errorMessage && (completenessTest ? completenessTest(value) : testComplete(value));
3825 return _objectSpread(_objectSpread({}, item), {}, {
3826 value: value,
3827 errorMessage: errorMessage,
3828 isComplete: isComplete,
3829 isRequired: isRequired
3830 });
3831};
3832
3833exports.decorateFormItem = decorateFormItem;
3834},{}],"../utils/smart-suggestion-utils.js":[function(require,module,exports) {
3835"use strict";
3836
3837Object.defineProperty(exports, "__esModule", {
3838 value: true
3839});
3840exports.buildQuestionList = exports.buildSuggestionList = exports.getAutoPopulatedValue = exports.removeCommaSeparatedItem = exports.addCommaSeparatedItem = exports.withoutText = exports.textAppended = void 0;
3841
3842var _question = require("./question");
3843
3844function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3845
3846function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3847
3848function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3849
3850function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
3851
3852function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3853
3854function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
3855
3856var textAppended = function textAppended(existing, newPhrase) {
3857 if (!existing) {
3858 return newPhrase;
3859 }
3860
3861 var cleaned = existing.trim();
3862
3863 if (cleaned.slice(-1)[0] !== '.') {
3864 cleaned = cleaned + '.';
3865 }
3866
3867 return "".concat(cleaned, " ").concat(newPhrase);
3868};
3869
3870exports.textAppended = textAppended;
3871
3872var withoutText = function withoutText() {
3873 var existing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3874 var phraseToRemove = arguments.length > 1 ? arguments[1] : undefined;
3875 return existing.replace(phraseToRemove, '').replace(' ', ' ').trim();
3876};
3877
3878exports.withoutText = withoutText;
3879
3880var getAsArray = function getAsArray() {
3881 var existing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3882 return existing.split(',').map(function (item) {
3883 return item.trim();
3884 }).filter(Boolean);
3885};
3886
3887var addCommaSeparatedItem = function addCommaSeparatedItem(existing, newItem) {
3888 return [].concat(_toConsumableArray(getAsArray(existing)), [newItem]).join(', ');
3889};
3890
3891exports.addCommaSeparatedItem = addCommaSeparatedItem;
3892
3893var removeCommaSeparatedItem = function removeCommaSeparatedItem(existing, toRemove) {
3894 return getAsArray(existing).filter(function (item) {
3895 return item !== toRemove;
3896 }).join(', ');
3897};
3898
3899exports.removeCommaSeparatedItem = removeCommaSeparatedItem;
3900
3901var getAutoPopulatedValue = function getAutoPopulatedValue(suggestions) {
3902 var totalSuggestions = suggestions.length;
3903
3904 if (!totalSuggestions) {
3905 return '';
3906 }
3907
3908 var firstSuggestionEntry = suggestions[0];
3909 var firstScore = firstSuggestionEntry.score;
3910
3911 if (firstScore < 3) {
3912 return '';
3913 }
3914
3915 var secondScore = suggestions[1] && suggestions[1].score || 0;
3916 var scoreDiff = firstScore - secondScore;
3917 var confidenceValue = scoreDiff / (firstScore + secondScore);
3918 return confidenceValue > 0.7 ? firstSuggestionEntry.phrase : '';
3919};
3920
3921exports.getAutoPopulatedValue = getAutoPopulatedValue;
3922
3923var buildSuggestionList = function buildSuggestionList(matchingSuggestion, value, autoSuggestType) {
3924 return matchingSuggestion && autoSuggestType ? matchingSuggestion.slice(0, 5).map(function (_ref) {
3925 var phrase = _ref.phrase;
3926 var pressed;
3927
3928 if (autoSuggestType === 'single') {
3929 pressed = value && value.trim() === phrase;
3930 } else {
3931 pressed = value && value.includes(phrase);
3932 }
3933
3934 return {
3935 phrase: phrase,
3936 pressed: pressed
3937 };
3938 }) : null;
3939};
3940
3941exports.buildSuggestionList = buildSuggestionList;
3942
3943var buildQuestionList = function buildQuestionList(config, data, suggestionsByField) {
3944 var result = [];
3945
3946 var addQuestion = function addQuestion(item) {
3947 var _ref2 = suggestionsByField[item.name] || {},
3948 suggestions = _ref2.suggestions,
3949 deleting = _ref2.deleting;
3950
3951 var value;
3952
3953 if (data.hasOwnProperty(item.name)) {
3954 value = data[item.name];
3955 } else if (item.autoSuggestType && suggestions) {
3956 value = getAutoPopulatedValue(suggestions);
3957 }
3958
3959 var question = Object.assign({}, (0, _question.decorateFormItem)(item, value), {
3960 value: value,
3961 suggestions: buildSuggestionList(suggestions, value, item.autoSuggestType),
3962 suggestionsDeleting: !!deleting
3963 });
3964 result.push(question);
3965
3966 if (question.choices) {
3967 question.choices.forEach(function (_ref3) {
3968 var val = _ref3.val,
3969 questions = _ref3.questions;
3970
3971 if (question.value === val && questions) {
3972 questions.forEach(addQuestion);
3973 }
3974 });
3975 }
3976 };
3977
3978 config.forEach(addQuestion);
3979 return result;
3980};
3981
3982exports.buildQuestionList = buildQuestionList;
3983},{"./question":"../utils/question.js"}],"../suggestions-box.js":[function(require,module,exports) {
3984"use strict";
3985
3986Object.defineProperty(exports, "__esModule", {
3987 value: true
3988});
3989exports.default = void 0;
3990
3991var _preact = require("preact");
3992
3993var _ = require("./");
3994
3995var _classnames = _interopRequireDefault(require("classnames"));
3996
3997var _smartSuggestionUtils = require("./utils/smart-suggestion-utils");
3998
3999function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4000
4001function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4002
4003function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4004
4005function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4006
4007function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4008
4009function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
4010
4011function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4012
4013function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4014
4015function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4016
4017function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4018
4019function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
4020
4021function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4022
4023var _default = /*#__PURE__*/function (_Component) {
4024 _inherits(_default, _Component);
4025
4026 var _super = _createSuper(_default);
4027
4028 function _default(props) {
4029 var _this;
4030
4031 _classCallCheck(this, _default);
4032
4033 _this = _super.call(this, props);
4034 _this.toggleExpand = _this.toggleExpand.bind(_assertThisInitialized(_this));
4035 _this.state = {
4036 expanded: true
4037 };
4038 return _this;
4039 }
4040
4041 _createClass(_default, [{
4042 key: "toggleExpand",
4043 value: function toggleExpand() {
4044 this.setState({
4045 expanded: !this.state.expanded
4046 });
4047 }
4048 }, {
4049 key: "render",
4050 value: function render(_ref, _ref2) {
4051 var autoSuggestType = _ref.autoSuggestType,
4052 name = _ref.name,
4053 value = _ref.value,
4054 suggestions = _ref.suggestions,
4055 suggestionsDeleting = _ref.suggestionsDeleting,
4056 updateValue = _ref.updateValue,
4057 removeSuggestion = _ref.removeSuggestion;
4058 var expanded = _ref2.expanded;
4059 return (0, _preact.h)("div", {
4060 className: "fw3 pa2 bg-near-white br2 shadow-inset",
4061 "data-e2e": "smartSuggestions:".concat(name)
4062 }, (0, _preact.h)("div", {
4063 className: "f6"
4064 }, "SmartSuggestions\u2122"), (0, _preact.h)("div", {
4065 className: (0, _classnames.default)('overflow-y-scroll', {
4066 dn: !expanded
4067 })
4068 }, suggestionsDeleting && (0, _preact.h)("div", {
4069 className: "flex items-center pv2",
4070 "data-e2e": "smartSuggestionsUpdating"
4071 }, (0, _preact.h)(_.Icon, {
4072 icon: "autorenew",
4073 className: "spin mr2",
4074 size: 16
4075 }), "Updating..."), !suggestionsDeleting && suggestions.map(function (suggestion) {
4076 var pressed = suggestion.pressed,
4077 phrase = suggestion.phrase;
4078 return (0, _preact.h)("label", {
4079 "data-e2e": "suggestionPhrase",
4080 key: phrase,
4081 className: (0, _classnames.default)('flex items-center ph1 pv2', {
4082 fw6: pressed
4083 })
4084 }, (0, _preact.h)("input", {
4085 onChange: function onChange(e) {
4086 e.preventDefault();
4087
4088 if (autoSuggestType === 'sentence') {
4089 updateValue(pressed ? (0, _smartSuggestionUtils.withoutText)(value, phrase) : (0, _smartSuggestionUtils.textAppended)(value, phrase));
4090 } else if (autoSuggestType === 'multiple') {
4091 updateValue(pressed ? (0, _smartSuggestionUtils.removeCommaSeparatedItem)(value, phrase) : (0, _smartSuggestionUtils.addCommaSeparatedItem)(value, phrase));
4092 } else if (autoSuggestType === 'single') {
4093 updateValue(pressed ? '' : phrase);
4094 }
4095 },
4096 type: "checkbox",
4097 checked: suggestion.pressed,
4098 className: "mr2 flex-shrink-0",
4099 style: {
4100 width: '15px',
4101 height: '15px'
4102 }
4103 }), (0, _preact.h)("span", {
4104 className: "lh-solid"
4105 }, suggestion.phrase), (0, _preact.h)(_.Button, {
4106 tiny: true,
4107 className: "flex ml2",
4108 onClick: function onClick(e) {
4109 e.preventDefault();
4110 e.stopImmediatePropagation();
4111 removeSuggestion(name, suggestion.phrase);
4112 },
4113 type: "button"
4114 }, (0, _preact.h)(_.Icon, {
4115 icon: "close",
4116 size: 12
4117 })));
4118 })));
4119 }
4120 }]);
4121
4122 return _default;
4123}(_preact.Component);
4124
4125exports.default = _default;
4126},{"preact":"../../node_modules/preact/dist/preact.module.js","./":"../index.js","classnames":"../../node_modules/classnames/index.js","./utils/smart-suggestion-utils":"../utils/smart-suggestion-utils.js"}],"../utils/env.js":[function(require,module,exports) {
4127var global = arguments[3];
4128"use strict";
4129
4130Object.defineProperty(exports, "__esModule", {
4131 value: true
4132});
4133exports.IS_CHROME = exports.IS_IOS = void 0;
4134
4135if (typeof window === 'undefined') {
4136 // eslint-disable-next-line
4137 global.window = global;
4138}
4139
4140var navigator = window && window.navigator || {};
4141var ua = navigator && navigator.ua || '';
4142var IS_IOS = /iPad|iPhone|iPod/.test(ua);
4143exports.IS_IOS = IS_IOS;
4144var IS_CHROME = /Chrome/.test(ua) && /Google Inc/.test(navigator.vendor);
4145exports.IS_CHROME = IS_CHROME;
4146},{}],"../form-fields.js":[function(require,module,exports) {
4147"use strict";
4148
4149Object.defineProperty(exports, "__esModule", {
4150 value: true
4151});
4152exports.SignatureField = exports.IncrementButtonField = exports.TextareaField = exports.DecimalInputField = exports.InputField = exports.SelectButtons = exports.Label = void 0;
4153
4154var _preact = require("preact");
4155
4156var _classnames = _interopRequireDefault(require("classnames"));
4157
4158var _plusMinus = require("./plus-minus");
4159
4160var _signature = _interopRequireDefault(require("./signature"));
4161
4162var _signatureBox = _interopRequireDefault(require("./signature-box"));
4163
4164var _ = require(".");
4165
4166var _suggestionsBox = _interopRequireDefault(require("./suggestions-box"));
4167
4168var _question = require("./utils/question");
4169
4170var _env = require("./utils/env");
4171
4172var _decimals = require("./utils/decimals");
4173
4174function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4175
4176function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4177
4178function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4179
4180function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4181
4182function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4183
4184function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4185
4186function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4187
4188function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4189
4190function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4191
4192function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4193
4194function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4195
4196function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
4197
4198function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4199
4200function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4201
4202function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4203
4204function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4205
4206function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
4207
4208function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4209
4210var noOp = function noOp() {};
4211
4212var Label = function Label(_ref) {
4213 var item = _ref.item,
4214 updateValue = _ref.updateValue,
4215 removeSuggestion = _ref.removeSuggestion;
4216 var isRequired = item.required !== false;
4217 return (0, _preact.h)("label", {
4218 className: "db fw6 lh-copy f5 mb1",
4219 htmlFor: item.name
4220 }, (0, _preact.h)("div", {
4221 className: "flex-shrink-0"
4222 }, (0, _preact.h)("div", {
4223 className: "flex items-center"
4224 }, item.label, isRequired && item.isComplete && (0, _preact.h)(_.Icon, {
4225 className: "ml2 light-blue",
4226 icon: "check",
4227 size: "18"
4228 }), isRequired && !item.isComplete && (0, _preact.h)("span", {
4229 className: "fw3 red ml2"
4230 }, "(required)"), !isRequired && item.explicitOptional && (0, _preact.h)("span", {
4231 className: "fw3 gray ml2"
4232 }, "(optional)")), item.subLabel && (0, _preact.h)("div", {
4233 className: (0, _classnames.default)('fw3 f6', {
4234 orange: item.subLabelWarning,
4235 red: item.subLabelError
4236 })
4237 }, item.subLabel instanceof Function ? item.subLabel(item) : item.subLabel)), item.buttons && (0, _preact.h)("div", null, item.buttons.map(function (val) {
4238 return (0, _preact.h)(_.Button, {
4239 key: val,
4240 type: "button",
4241 "data-e2e": "".concat(item.name, "InputButton:").concat(val),
4242 className: "mr2 ml0 mt2",
4243 pressed: item.value === val,
4244 onClick: function onClick(e) {
4245 e.preventDefault();
4246 updateValue(val);
4247 }
4248 }, val);
4249 })), item.suggestions && (0, _preact.h)(_suggestionsBox.default, {
4250 removeSuggestion: removeSuggestion,
4251 name: item.name,
4252 value: item.value,
4253 autoSuggestType: item.autoSuggestType,
4254 updateValue: updateValue,
4255 suggestions: item.suggestions,
4256 suggestionsDeleting: item.suggestionsDeleting
4257 }));
4258};
4259
4260exports.Label = Label;
4261var separator = ', ';
4262
4263var stringToArray = function stringToArray(str) {
4264 return str ? str.toString().split(separator) : [];
4265};
4266
4267var arrayToString = function arrayToString(arr) {
4268 return arr.filter(Boolean).join(separator);
4269};
4270
4271var SelectButtons = /*#__PURE__*/function (_Component) {
4272 _inherits(SelectButtons, _Component);
4273
4274 var _super = _createSuper(SelectButtons);
4275
4276 function SelectButtons(props) {
4277 var _this;
4278
4279 _classCallCheck(this, SelectButtons);
4280
4281 _this = _super.call(this, props);
4282 _this.state = {
4283 open: false
4284 };
4285 _this.handleButtonPress = _this.handleButtonPress.bind(_assertThisInitialized(_this));
4286 _this.handleOtherPress = _this.handleOtherPress.bind(_assertThisInitialized(_this));
4287
4288 _this.open = function () {
4289 if (!_this.state.open) {
4290 _this.setState({
4291 open: true
4292 });
4293 }
4294
4295 setTimeout(function () {
4296 _this.base.querySelector('input').focus();
4297 }, 200);
4298 };
4299
4300 _this.close = function () {
4301 return _this.setState({
4302 open: false
4303 });
4304 };
4305
4306 _this.choiceValues = props.item.choices.reduce(function (res, choice) {
4307 res[choice.val] = true;
4308 return res;
4309 }, {});
4310 return _this;
4311 }
4312
4313 _createClass(SelectButtons, [{
4314 key: "handleButtonPress",
4315 value: function handleButtonPress(val, isPressed) {
4316 var _this$props = this.props,
4317 item = _this$props.item,
4318 allowDeselect = _this$props.allowDeselect,
4319 updateValue = _this$props.updateValue;
4320 var isMultiButton = item.type === 'multiButton';
4321 var value = item.value;
4322
4323 if (!isMultiButton) {
4324 this.close();
4325
4326 if (isPressed && allowDeselect === false) {
4327 return;
4328 }
4329
4330 updateValue(isPressed ? null : val);
4331 } else {
4332 var values = stringToArray(value);
4333 var index = values.indexOf(val);
4334
4335 if (index === -1) {
4336 values.push(val);
4337 } else {
4338 values.splice(index, 1);
4339 }
4340
4341 this.UpdateValue(arrayToString(values));
4342 }
4343 }
4344 }, {
4345 key: "handleOtherPress",
4346 value: function handleOtherPress(isPressed) {
4347 var _this2 = this;
4348
4349 var _this$props2 = this.props,
4350 item = _this$props2.item,
4351 updateValue = _this$props2.updateValue;
4352 var isMultiButton = item.type === 'multiButton';
4353
4354 if (!isMultiButton) {
4355 if (isPressed) {
4356 this.close();
4357 updateValue(null);
4358 } else {
4359 this.open();
4360 updateValue('');
4361 }
4362 } else {
4363 var values = stringToArray(this.props.item.value);
4364
4365 if (isPressed) {
4366 this.close();
4367 var unknownRemoved = values.reduce(function (res, val) {
4368 if (_this2.choiceValues[val]) {
4369 res.push(val);
4370 }
4371
4372 return res;
4373 }, []);
4374 updateValue(arrayToString(unknownRemoved));
4375 } else {
4376 values.push('');
4377 updateValue(arrayToString(values));
4378 this.open();
4379 }
4380 }
4381 }
4382 }, {
4383 key: "getPressed",
4384 value: function getPressed(val) {
4385 var _this$props$item = this.props.item,
4386 value = _this$props$item.value,
4387 type = _this$props$item.type;
4388 var isMultiButton = type === 'multiButton'; // if there are no unusual circumstances, we just want an exact match
4389
4390 if (!isMultiButton) {
4391 return value === val;
4392 }
4393
4394 return value != null && value.toString().includes(val);
4395 }
4396 }, {
4397 key: "getOtherInputVisible",
4398 value: function getOtherInputVisible() {
4399 var _this3 = this;
4400
4401 return (// either its explicitly open
4402 this.state.open || // or it contains something outside of known options
4403 // this is important for first load (since we may not have state yet)
4404 !stringToArray(this.props.item.value).every(function (val) {
4405 return _this3.choiceValues[val];
4406 })
4407 );
4408 }
4409 }, {
4410 key: "render",
4411 value: function render(_ref2) {
4412 var _this4 = this;
4413
4414 var item = _ref2.item,
4415 updateValue = _ref2.updateValue,
4416 rest = _objectWithoutProperties(_ref2, ["item", "updateValue"]);
4417
4418 var showOtherInput = this.getOtherInputVisible();
4419 var value = item.value;
4420 return (0, _preact.h)("div", rest, item.label && (0, _preact.h)(Label, {
4421 item: item,
4422 updateValue: updateValue
4423 }), (0, _preact.h)("div", {
4424 "data-e2e": "".concat(item.name, "InputButtons")
4425 }, item.choices.map(function (choice) {
4426 var name = choice.name,
4427 val = choice.val;
4428
4429 var pressed = _this4.getPressed(val);
4430
4431 return (0, _preact.h)(_.Button, {
4432 key: val,
4433 pressed: pressed,
4434 className: "mr2 mv1 items-base",
4435 "data-e2e": "".concat(item.name, "InputButton:").concat(val),
4436 "data-state": pressed ? 'pressed' : 'unpressed',
4437 type: "button",
4438 onClick: function onClick() {
4439 return _this4.handleButtonPress(val, pressed);
4440 }
4441 }, name);
4442 }), item.showOther && (0, _preact.h)(_.Button, {
4443 key: "other",
4444 pressed: showOtherInput,
4445 "data-state": showOtherInput ? 'pressed' : 'unpressed',
4446 className: "mr2 mv1 items-base",
4447 type: "button",
4448 onClick: function onClick() {
4449 return _this4.handleOtherPress(showOtherInput);
4450 },
4451 "data-e2e": "".concat(item.name, "InputButton:other")
4452 }, "Other"), item.showOther && showOtherInput && (0, _preact.h)(_.Input, {
4453 className: "mv1 w-100 border-box",
4454 name: "".concat(item.name, "Other"),
4455 value: value,
4456 onInput: function onInput(e) {
4457 return updateValue(e.target.value);
4458 }
4459 })));
4460 }
4461 }]);
4462
4463 return SelectButtons;
4464}(_preact.Component);
4465
4466exports.SelectButtons = SelectButtons;
4467
4468var identity = function identity(res) {
4469 return res;
4470};
4471
4472var autoCompleteFallback = _env.IS_CHROME ? 'new-password' : 'none';
4473
4474var InputField = function InputField(_ref3) {
4475 var item = _ref3.item,
4476 updateValue = _ref3.updateValue,
4477 _ref3$autocomplete = _ref3.autocomplete,
4478 autocomplete = _ref3$autocomplete === void 0 ? autoCompleteFallback : _ref3$autocomplete,
4479 autofocus = _ref3.autofocus,
4480 _ref3$className = _ref3.className,
4481 className = _ref3$className === void 0 ? '' : _ref3$className,
4482 _ref3$inputClassName = _ref3.inputClassName,
4483 inputClassName = _ref3$inputClassName === void 0 ? 'w-100' : _ref3$inputClassName,
4484 removeSuggestion = _ref3.removeSuggestion,
4485 rest = _objectWithoutProperties(_ref3, ["item", "updateValue", "autocomplete", "autofocus", "className", "inputClassName", "removeSuggestion"]);
4486
4487 var type = item.type || 'text';
4488 var clean = item.clean;
4489 var value = item.value,
4490 cleanRe = item.cleanRe;
4491
4492 if (!clean && cleanRe) {
4493 clean = function clean(val) {
4494 return val.replace(cleanRe, '');
4495 };
4496 }
4497
4498 if (!clean) {
4499 clean = identity;
4500 }
4501
4502 var update = function update(e) {
4503 return updateValue(clean(e.target.value));
4504 };
4505
4506 var hasError = !!item.errorMessage;
4507 return (0, _preact.h)("div", _extends({
4508 className: "w-100 ".concat(className)
4509 }, rest), item.label && (0, _preact.h)(Label, {
4510 item: item,
4511 updateValue: updateValue,
4512 removeSuggestion: removeSuggestion
4513 }), (0, _preact.h)(_.Input, {
4514 className: (0, _classnames.default)('mv1', {
4515 'bg-washed-red': hasError
4516 }, inputClassName),
4517 name: item.name,
4518 onChange: item.onInput ? noOp : update,
4519 onInput: item.onInput ? update : noOp,
4520 id: item.name,
4521 placeholder: item.placeholder,
4522 type: type,
4523 value: value,
4524 autocomplete: autocomplete,
4525 autofocus: autofocus,
4526 inputmode: item.inputmode || null,
4527 'data-e2e': "".concat(item.name, "Input"),
4528 'data-has-error': hasError ? true : null,
4529 style: item.inputWidth ? {
4530 width: item.inputWidth
4531 } : null
4532 }));
4533};
4534
4535exports.InputField = InputField;
4536
4537var DecimalInputField = function DecimalInputField(_ref4) {
4538 var item = _ref4.item,
4539 updateValue = _ref4.updateValue,
4540 rest = _objectWithoutProperties(_ref4, ["item", "updateValue"]);
4541
4542 var modifiedItem = _objectSpread({
4543 type: 'number',
4544 onInput: true,
4545 inputmode: 'decimal',
4546 clean: _decimals.cleanDecimalInput,
4547 required: false
4548 }, item);
4549
4550 return (0, _preact.h)(InputField, _extends({
4551 updateValue: updateValue,
4552 item: modifiedItem
4553 }, rest));
4554};
4555
4556exports.DecimalInputField = DecimalInputField;
4557
4558var TextareaField = function TextareaField(_ref5) {
4559 var item = _ref5.item,
4560 updateValue = _ref5.updateValue,
4561 removeSuggestion = _ref5.removeSuggestion;
4562 return (0, _preact.h)("div", {
4563 className: "mb2"
4564 }, (0, _preact.h)(Label, {
4565 item: item,
4566 updateValue: updateValue,
4567 removeSuggestion: removeSuggestion
4568 }), (0, _preact.h)(_.Textarea, {
4569 className: (0, _classnames.default)('w-100', item.size === 'large' ? 'h5' : 'h4'),
4570 name: item.name,
4571 onChange: item.onInput ? noOp : function (e) {
4572 return updateValue(e.target.value);
4573 },
4574 onInput: item.onInput ? function (e) {
4575 return updateValue(e.target.value);
4576 } : noOp,
4577 value: item.value,
4578 id: item.name,
4579 'data-e2e': "".concat(item.name, "Input")
4580 }));
4581};
4582
4583exports.TextareaField = TextareaField;
4584
4585var IncrementButtonField = function IncrementButtonField(_ref6) {
4586 var item = _ref6.item,
4587 displayValue = _ref6.displayValue,
4588 updateValue = _ref6.updateValue,
4589 _ref6$step = _ref6.step,
4590 step = _ref6$step === void 0 ? 1 : _ref6$step,
4591 _ref6$max = _ref6.max,
4592 max = _ref6$max === void 0 ? Infinity : _ref6$max,
4593 _ref6$min = _ref6.min,
4594 min = _ref6$min === void 0 ? 0 : _ref6$min,
4595 width = _ref6.width,
4596 _ref6$unit = _ref6.unit,
4597 unit = _ref6$unit === void 0 ? '' : _ref6$unit,
4598 _ref6$showStep = _ref6.showStep,
4599 showStep = _ref6$showStep === void 0 ? true : _ref6$showStep,
4600 formatter = _ref6.formatter,
4601 className = _ref6.className;
4602 var name = item.name,
4603 value = item.value,
4604 fieldSpecificProps = item.fieldSpecificProps;
4605
4606 var passOn = _objectSpread({
4607 formatter: formatter,
4608 width: width,
4609 updateValue: updateValue,
4610 displayValue: displayValue,
4611 step: step,
4612 showStep: showStep,
4613 max: max,
4614 min: min,
4615 unit: unit,
4616 name: name,
4617 value: value != null ? value : fieldSpecificProps.startingValue
4618 }, fieldSpecificProps || {});
4619
4620 return (0, _preact.h)("div", {
4621 className: (0, _classnames.default)(className)
4622 }, (0, _preact.h)(Label, {
4623 item: item
4624 }), (0, _preact.h)("div", null, (0, _preact.h)(_plusMinus.IncrementorButtons, passOn)));
4625};
4626
4627exports.IncrementButtonField = IncrementButtonField;
4628
4629var SignatureField = /*#__PURE__*/function (_Component2) {
4630 _inherits(SignatureField, _Component2);
4631
4632 var _super2 = _createSuper(SignatureField);
4633
4634 function SignatureField(props) {
4635 var _this5;
4636
4637 _classCallCheck(this, SignatureField);
4638
4639 _this5 = _super2.call(this, props);
4640 _this5.state = {
4641 editing: false
4642 };
4643 return _this5;
4644 }
4645
4646 _createClass(SignatureField, [{
4647 key: "render",
4648 value: function render(_ref7, _ref8) {
4649 var _this6 = this;
4650
4651 var item = _ref7.item,
4652 _updateValue = _ref7.updateValue;
4653 var editing = _ref8.editing;
4654 var value = item.value;
4655 return (0, _preact.h)("div", null, item.label && (0, _preact.h)(Label, {
4656 item: item
4657 }), (0, _preact.h)("div", null, !editing && value && (0, _preact.h)(_signature.default, {
4658 width: "200",
4659 path: value,
4660 className: _.inputClasses
4661 }), !editing && (0, _preact.h)(_.Button, {
4662 type: "button",
4663 className: "db mv2",
4664 onClick: function onClick() {
4665 return _this6.setState({
4666 editing: true
4667 });
4668 }
4669 }, value ? 'Change' : 'Add Signature'), editing && (0, _preact.h)(_signatureBox.default, {
4670 name: item.signatureLineName,
4671 close: function close() {
4672 return _this6.setState({
4673 editing: false
4674 });
4675 },
4676 updateValue: function updateValue(val) {
4677 _updateValue(val);
4678
4679 _this6.setState({
4680 editing: false
4681 });
4682 }
4683 })));
4684 }
4685 }]);
4686
4687 return SignatureField;
4688}(_preact.Component);
4689
4690exports.SignatureField = SignatureField;
4691},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","./plus-minus":"../plus-minus.js","./signature":"../signature.js","./signature-box":"../signature-box.js",".":"../index.js","./suggestions-box":"../suggestions-box.js","./utils/question":"../utils/question.js","./utils/env":"../utils/env.js","./utils/decimals":"../utils/decimals.js"}],"../../node_modules/money-clip/dist/money-clip.m.js":[function(require,module,exports) {
4692"use strict";
4693
4694Object.defineProperty(exports, "__esModule", {
4695 value: true
4696});
4697exports.getConfiguredCache = exports.getAll = exports.set = exports.get = exports.keyValLib = void 0;
4698
4699var Store = function Store(dbName, storeName) {
4700 if (dbName === void 0) dbName = 'keyval-store';
4701 if (storeName === void 0) storeName = 'keyval';
4702 this.storeName = storeName;
4703 this._dbp = new Promise(function (resolve, reject) {
4704 var openreq = indexedDB.open(dbName, 1);
4705
4706 openreq.onerror = function () {
4707 return reject(openreq.error);
4708 };
4709
4710 openreq.onsuccess = function () {
4711 return resolve(openreq.result);
4712 };
4713
4714 openreq.onupgradeneeded = function () {
4715 openreq.result.createObjectStore(storeName);
4716 };
4717 });
4718};
4719
4720Store.prototype._withIDBStore = function _withIDBStore(type, callback) {
4721 var this$1 = this;
4722 return this._dbp.then(function (db) {
4723 return new Promise(function (resolve, reject) {
4724 var transaction = db.transaction(this$1.storeName, type);
4725
4726 transaction.oncomplete = function () {
4727 return resolve();
4728 };
4729
4730 transaction.onabort = transaction.onerror = function () {
4731 return reject(transaction.error);
4732 };
4733
4734 callback(transaction.objectStore(this$1.storeName));
4735 });
4736 });
4737};
4738
4739var store;
4740
4741function getDefaultStore() {
4742 if (!store) {
4743 store = new Store();
4744 }
4745
4746 return store;
4747}
4748
4749function get(key, store) {
4750 if (store === void 0) store = getDefaultStore();
4751 var req;
4752 return store._withIDBStore('readonly', function (store) {
4753 req = store.get(key);
4754 }).then(function () {
4755 return req.result;
4756 });
4757}
4758
4759function set(key, value, store) {
4760 if (store === void 0) store = getDefaultStore();
4761 return store._withIDBStore('readwrite', function (store) {
4762 store.put(value, key);
4763 });
4764}
4765
4766function del(key, store) {
4767 if (store === void 0) store = getDefaultStore();
4768 return store._withIDBStore('readwrite', function (store) {
4769 store.delete(key);
4770 });
4771}
4772
4773function clear(store) {
4774 if (store === void 0) store = getDefaultStore();
4775 return store._withIDBStore('readwrite', function (store) {
4776 store.clear();
4777 });
4778}
4779
4780function keys(store) {
4781 if (store === void 0) store = getDefaultStore();
4782 var keys = [];
4783 return store._withIDBStore('readonly', function (store) {
4784 (store.openKeyCursor || store.openCursor).call(store).onsuccess = function () {
4785 if (!this.result) {
4786 return;
4787 }
4788
4789 keys.push(this.result.key);
4790 this.result.continue();
4791 };
4792 }).then(function () {
4793 return keys;
4794 });
4795}
4796
4797var idbKeyVal = {
4798 Store: Store,
4799 get: get,
4800 set: set,
4801 del: del,
4802 clear: clear,
4803 keys: keys
4804};
4805var defaultOpts = {
4806 maxAge: Infinity,
4807 version: 0,
4808 lib: idbKeyVal
4809};
4810
4811var getOpts = function (passedOptions) {
4812 return Object.assign({}, defaultOpts, passedOptions);
4813};
4814
4815var keyValLib = idbKeyVal;
4816exports.keyValLib = keyValLib;
4817
4818var get$1 = function (key, opts, store) {
4819 var ref = getOpts(opts);
4820 var maxAge = ref.maxAge;
4821 var version = ref.version;
4822 var lib = ref.lib;
4823 return lib.get(key, store).then(JSON.parse).then(function (parsed) {
4824 var age = Date.now() - parsed.time;
4825
4826 if (age > maxAge || version !== parsed.version) {
4827 lib.del(key, store);
4828 return null;
4829 }
4830
4831 return parsed.data;
4832 }).catch(function () {
4833 return null;
4834 });
4835};
4836
4837exports.get = get$1;
4838
4839var set$1 = function (key, data, spec, store) {
4840 var ref = getOpts(spec);
4841 var lib = ref.lib;
4842 var version = ref.version;
4843 return lib.set(key, JSON.stringify({
4844 version: version,
4845 time: Date.now(),
4846 data: data
4847 }), store).catch(function () {
4848 return null;
4849 });
4850};
4851
4852exports.set = set$1;
4853
4854var getAll = function (spec, store) {
4855 var opts = getOpts(spec);
4856 var keys$$1;
4857 return opts.lib.keys(store).then(function (retrievedKeys) {
4858 keys$$1 = retrievedKeys;
4859 return Promise.all(keys$$1.map(function (key) {
4860 return get$1(key, opts, store);
4861 }));
4862 }).then(function (data) {
4863 return data.reduce(function (acc, bundleData, index) {
4864 if (bundleData) {
4865 acc[keys$$1[index]] = bundleData;
4866 }
4867
4868 return acc;
4869 }, {});
4870 }).catch(function () {});
4871};
4872
4873exports.getAll = getAll;
4874
4875var getConfiguredCache = function (spec) {
4876 var opts = getOpts(spec);
4877 var store;
4878
4879 if (opts.name) {
4880 store = new Store(opts.name, opts.name);
4881 }
4882
4883 return {
4884 get: function (key) {
4885 return get$1(key, opts, store);
4886 },
4887 set: function (key, val) {
4888 return set$1(key, val, opts, store);
4889 },
4890 getAll: function () {
4891 return getAll(opts, store);
4892 },
4893 del: function (key) {
4894 return opts.lib.del(key, store);
4895 },
4896 clear: function () {
4897 return opts.lib.clear(store);
4898 },
4899 keys: function () {
4900 return opts.lib.keys(store);
4901 }
4902 };
4903};
4904
4905exports.getConfiguredCache = getConfiguredCache;
4906},{}],"../utils/drug-cache.js":[function(require,module,exports) {
4907"use strict";
4908
4909Object.defineProperty(exports, "__esModule", {
4910 value: true
4911});
4912exports.getDrugName = void 0;
4913
4914var _moneyClip = require("money-clip");
4915
4916var _getConfiguredCache = (0, _moneyClip.getConfiguredCache)({
4917 maxAge: Infinity,
4918 version: 1,
4919 name: 'drug-name-cache'
4920}),
4921 set = _getConfiguredCache.set,
4922 get = _getConfiguredCache.get,
4923 getAll = _getConfiguredCache.getAll;
4924
4925var drugData = {};
4926getAll().then(function (dbValues) {
4927 Object.assign(drugData, dbValues);
4928});
4929
4930var fetchDrug = function fetchDrug(id) {
4931 return fetch("https://rxnav.nlm.nih.gov/REST/rxcui/".concat(id, ".json")).then(function (res) {
4932 return res.json();
4933 }).then(function (drugData) {
4934 return drugData.idGroup.name;
4935 });
4936};
4937
4938var getDrugName = function getDrugName(id) {
4939 var found = drugData[id];
4940
4941 if (found) {
4942 return Promise.resolve(found);
4943 }
4944
4945 return get(id).then(function (res) {
4946 if (res) {
4947 drugData[id] = res;
4948 return res;
4949 }
4950
4951 return fetchDrug(id).then(function (res) {
4952 if (res) {
4953 drugData[id] = res;
4954 set(id, res);
4955 return res;
4956 }
4957 });
4958 });
4959};
4960
4961exports.getDrugName = getDrugName;
4962},{"money-clip":"../../node_modules/money-clip/dist/money-clip.m.js"}],"../utils/fetch-drug-autocomplete.js":[function(require,module,exports) {
4963"use strict";
4964
4965Object.defineProperty(exports, "__esModule", {
4966 value: true
4967});
4968exports.fetchDrugAutocomplete = void 0;
4969
4970var _drugCache = require("./drug-cache");
4971
4972var fetchDrugAutocomplete = function fetchDrugAutocomplete(term) {
4973 return fetch("https://rxnav.nlm.nih.gov/REST/approximateTerm.json?maxEntries=4&term=".concat(encodeURIComponent(term))).then(function (res) {
4974 return res.json();
4975 }).then(function (parsed) {
4976 var resultsById = (parsed.approximateGroup.candidate || []).reduce(function (result, item) {
4977 var id = item.rxcui;
4978
4979 if (!result[id]) {
4980 result[id] = {
4981 id: id,
4982 score: item.score
4983 };
4984 }
4985
4986 return result;
4987 }, {});
4988 return Object.keys(resultsById);
4989 }).then(function (ids) {
4990 return Promise.all(ids.map(_drugCache.getDrugName)).then(function (names) {
4991 return names.map(function (name, index) {
4992 return {
4993 id: ids[index],
4994 name: name
4995 };
4996 });
4997 }).then(function (matches) {
4998 return matches.filter(function (item) {
4999 return !!item.name;
5000 });
5001 });
5002 });
5003};
5004
5005exports.fetchDrugAutocomplete = fetchDrugAutocomplete;
5006},{"./drug-cache":"../utils/drug-cache.js"}],"../drug-lookup-ui.js":[function(require,module,exports) {
5007"use strict";
5008
5009Object.defineProperty(exports, "__esModule", {
5010 value: true
5011});
5012exports.default = void 0;
5013
5014var _preact = require("preact");
5015
5016var _ = require("./");
5017
5018var _default = function _default(_ref) {
5019 var status = _ref.status,
5020 term = _ref.term;
5021
5022 if (status === 'noResults') {
5023 return (0, _preact.h)("span", {
5024 className: "flex items-center mv1"
5025 }, (0, _preact.h)(_.Icon, {
5026 className: "f3 mr2",
5027 size: "18",
5028 icon: "warning"
5029 }), (0, _preact.h)("span", null, "No results for \"", term, "\""));
5030 }
5031
5032 if (status === 'searching') {
5033 return (0, _preact.h)("span", {
5034 className: "flex items-center mv1"
5035 }, (0, _preact.h)(_.Icon, {
5036 className: "f3 spin-animation mr2",
5037 size: "18",
5038 icon: "autorenew"
5039 }), (0, _preact.h)("span", null, "Searching"));
5040 }
5041
5042 if (status === 'ready') {
5043 return (0, _preact.h)("span", {
5044 className: "flex items-center mv1"
5045 }, (0, _preact.h)(_.Icon, {
5046 className: "f3 mr2",
5047 size: "18",
5048 icon: "info"
5049 }), (0, _preact.h)("span", null, "Suggestions will appear here"));
5050 }
5051
5052 return null;
5053};
5054
5055exports.default = _default;
5056},{"preact":"../../node_modules/preact/dist/preact.module.js","./":"../index.js"}],"../medication-field.js":[function(require,module,exports) {
5057"use strict";
5058
5059Object.defineProperty(exports, "__esModule", {
5060 value: true
5061});
5062exports.default = void 0;
5063
5064var _preact = require("preact");
5065
5066var _classnames = _interopRequireDefault(require("classnames"));
5067
5068var _tryit = _interopRequireDefault(require("tryit"));
5069
5070var _fetchDrugAutocomplete = require("./utils/fetch-drug-autocomplete");
5071
5072var _formFields = require("./form-fields");
5073
5074var _ = require("./");
5075
5076var _drugLookupUi = _interopRequireDefault(require("./drug-lookup-ui"));
5077
5078function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5079
5080function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5081
5082function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5083
5084function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5085
5086function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
5087
5088function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
5089
5090function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
5091
5092function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5093
5094function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5095
5096function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5097
5098function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5099
5100function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5101
5102function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5103
5104var MedicationInput = /*#__PURE__*/function (_Component) {
5105 _inherits(MedicationInput, _Component);
5106
5107 var _super = _createSuper(MedicationInput);
5108
5109 function MedicationInput(props) {
5110 var _this;
5111
5112 _classCallCheck(this, MedicationInput);
5113
5114 _this = _super.call(this, props);
5115 _this.state = {
5116 term: '',
5117 loading: false
5118 };
5119 return _this;
5120 }
5121
5122 _createClass(MedicationInput, [{
5123 key: "componentDidMount",
5124 value: function componentDidMount() {
5125 var _this2 = this;
5126
5127 setTimeout(function () {
5128 (0, _tryit.default)(function () {
5129 _this2.base.querySelector('input').focus();
5130 });
5131 }, 100);
5132 }
5133 }, {
5134 key: "componentDidUpdate",
5135 value: function componentDidUpdate(prevProps, prevState) {
5136 var _this3 = this;
5137
5138 var term = this.state.term;
5139
5140 if (term && term !== prevState.term) {
5141 this.setState({
5142 loading: true
5143 });
5144 (0, _fetchDrugAutocomplete.fetchDrugAutocomplete)(term).then(function (results) {
5145 if (term === _this3.state.term) {
5146 var _toSet;
5147
5148 var toSet = (_toSet = {}, _defineProperty(_toSet, "term_".concat(term), results), _defineProperty(_toSet, "loading", false), _toSet);
5149
5150 _this3.setState(toSet);
5151 }
5152 });
5153 }
5154 }
5155 }, {
5156 key: "drugSelected",
5157 value: function drugSelected(drug) {
5158 var updateValue = this.props.updateValue;
5159 updateValue(drug);
5160 this.setState(_defineProperty({
5161 term: ''
5162 }, "term_".concat(this.state.term), undefined));
5163 }
5164 }, {
5165 key: "focusOnInput",
5166 value: function focusOnInput() {
5167 this.base.querySelector('input').focus();
5168 }
5169 }, {
5170 key: "render",
5171 value: function render(_ref, _ref2) {
5172 var _this4 = this;
5173
5174 var item = _ref.item,
5175 updateValue = _ref.updateValue,
5176 className = _ref.className,
5177 resultsClassName = _ref.resultsClassName;
5178 var term = _ref2.term,
5179 loading = _ref2.loading;
5180 console.log('HERE', item.label);
5181 var optsForTerm = this.state["term_".concat(term)];
5182 var hasOptsForTerm = optsForTerm && optsForTerm.length > 0;
5183 var noResults = !loading && term && !hasOptsForTerm;
5184 var isEmpty = !term && !loading;
5185 var showMessage = noResults || isEmpty || loading;
5186 var showResults = hasOptsForTerm && !showMessage;
5187 var drugLookupStatus;
5188
5189 if (noResults) {
5190 drugLookupStatus = 'noResults';
5191 } else if (isEmpty) {
5192 drugLookupStatus = 'ready';
5193 } else if (loading) {
5194 drugLookupStatus = 'searching';
5195 }
5196
5197 var drugName = item.value && item.value.name;
5198 return (0, _preact.h)("div", {
5199 className: className
5200 }, (0, _preact.h)(_formFields.Label, {
5201 item: item,
5202 updateValue: updateValue
5203 }), !drugName && (0, _preact.h)(_preact.Fragment, null, (0, _preact.h)(_.Input, {
5204 className: "w-100 border-box mv1",
5205 value: term,
5206 "data-e2e": "".concat(item.name, "Input"),
5207 onKeyDown: function onKeyDown(e) {
5208 if (e.key === 'Enter') {
5209 e.preventDefault();
5210
5211 if (optsForTerm && optsForTerm.length > 0) {
5212 _this4.drugSelected(optsForTerm[0]);
5213 }
5214 }
5215 },
5216 onInput: function onInput(e) {
5217 var term = e.target.value || '';
5218
5219 _this4.setState({
5220 term: term
5221 });
5222 }
5223 }), showResults && (0, _preact.h)("div", {
5224 key: "opts",
5225 className: (0, _classnames.default)(resultsClassName)
5226 }, optsForTerm.map(function (drug) {
5227 return (0, _preact.h)(_.Button, {
5228 key: drug.name,
5229 className: "mr2 mv1",
5230 type: "button",
5231 "data-e2e": "".concat(item.name, "SuggestionButton"),
5232 onClick: function onClick(e) {
5233 e.preventDefault();
5234
5235 _this4.drugSelected(drug);
5236 }
5237 }, drug.name);
5238 })), (0, _preact.h)("div", null, (0, _preact.h)(_drugLookupUi.default, {
5239 term: term,
5240 status: drugLookupStatus
5241 }))), drugName && (0, _preact.h)("div", null, drugName, ' ', (0, _preact.h)(_.Button, {
5242 className: "mr2 mb2",
5243 type: "button",
5244 tiny: true,
5245 stop: true,
5246 "data-e2e": "drugRemoveButton",
5247 onClick: function onClick(e) {
5248 e.preventDefault();
5249 updateValue('');
5250 setTimeout(function () {
5251 return _this4.focusOnInput();
5252 }, 200);
5253 }
5254 }, (0, _preact.h)("span", {
5255 className: "flex items-center"
5256 }, (0, _preact.h)(_.Icon, {
5257 className: "mr2",
5258 icon: "delete",
5259 size: "16"
5260 }), (0, _preact.h)("span", {
5261 className: "mr1"
5262 }, "remove")))));
5263 }
5264 }]);
5265
5266 return MedicationInput;
5267}(_preact.Component);
5268
5269var _default = MedicationInput;
5270exports.default = _default;
5271},{"preact":"../../node_modules/preact/dist/preact.module.js","classnames":"../../node_modules/classnames/index.js","tryit":"../../node_modules/tryit/tryit.js","./utils/fetch-drug-autocomplete":"../utils/fetch-drug-autocomplete.js","./form-fields":"../form-fields.js","./":"../index.js","./drug-lookup-ui":"../drug-lookup-ui.js"}],"../multi-medication-entry-field.js":[function(require,module,exports) {
5272"use strict";
5273
5274Object.defineProperty(exports, "__esModule", {
5275 value: true
5276});
5277exports.default = void 0;
5278
5279var _preact = require("preact");
5280
5281var _fetchDrugAutocomplete = require("./utils/fetch-drug-autocomplete");
5282
5283var _formFields = require("./form-fields");
5284
5285var _ = require("./");
5286
5287var _drugLookupUi = _interopRequireDefault(require("./drug-lookup-ui"));
5288
5289function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5290
5291function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5292
5293function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5294
5295function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5296
5297function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5298
5299function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5300
5301function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
5302
5303function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
5304
5305function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
5306
5307function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5308
5309function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5310
5311function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5312
5313function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5314
5315function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5316
5317function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5318
5319var MedicationEntryField = /*#__PURE__*/function (_Component) {
5320 _inherits(MedicationEntryField, _Component);
5321
5322 var _super = _createSuper(MedicationEntryField);
5323
5324 function MedicationEntryField(props) {
5325 var _this;
5326
5327 _classCallCheck(this, MedicationEntryField);
5328
5329 _this = _super.call(this, props);
5330 _this.focusOnInput = _this.focusOnInput.bind(_assertThisInitialized(_this));
5331 _this.originalState = {
5332 term: '',
5333 loading: false
5334 };
5335 _this.state = Object.assign({}, _this.originalState);
5336 return _this;
5337 }
5338
5339 _createClass(MedicationEntryField, [{
5340 key: "componentDidUpdate",
5341 value: function componentDidUpdate(prevProps, prevState) {
5342 var _this2 = this;
5343
5344 var term = this.state.term;
5345
5346 if (term !== prevState.term && term) {
5347 this.setState({
5348 loading: true
5349 });
5350 (0, _fetchDrugAutocomplete.fetchDrugAutocomplete)(term).then(function (results) {
5351 var _this2$setState;
5352
5353 _this2.setState((_this2$setState = {}, _defineProperty(_this2$setState, "term_".concat(term), results), _defineProperty(_this2$setState, "loading", false), _this2$setState));
5354 });
5355 }
5356 }
5357 }, {
5358 key: "focusOnInput",
5359 value: function focusOnInput() {
5360 var input = this.base && this.base.querySelector('input');
5361
5362 if (input) {
5363 input.focus();
5364 }
5365 }
5366 }, {
5367 key: "addDrug",
5368 value: function addDrug(drug) {
5369 var _this$props = this.props,
5370 item = _this$props.item,
5371 updateValue = _this$props.updateValue;
5372 var value = item.value;
5373 var valueIsEmptyArray = typeof value === 'string';
5374 var drugs = value && !valueIsEmptyArray ? value : [];
5375 var copy = drugs.slice();
5376 copy.push(drug);
5377 updateValue(copy);
5378 this.setState(_defineProperty({
5379 term: ''
5380 }, "term_".concat(this.state.term), undefined));
5381 }
5382 }, {
5383 key: "render",
5384 value: function render() {
5385 var _this3 = this;
5386
5387 var _this$props2 = this.props,
5388 item = _this$props2.item,
5389 _updateValue = _this$props2.updateValue;
5390 var loading = this.state.loading;
5391 var value = item.value;
5392 var term = this.state.term;
5393 var optsForTerm = this.state["term_".concat(term)];
5394 var valueIsEmptyArray = Array.isArray(value) && !value.length;
5395 var itemCopy = Object.assign({}, item);
5396 delete itemCopy.subLabel;
5397 var modifiedItemForLabel = value ? _objectSpread(_objectSpread({}, item), {}, {
5398 buttons: null
5399 }) : item;
5400 var drugLookupStatus;
5401 console.log(valueIsEmptyArray, value);
5402
5403 if (term && optsForTerm && !optsForTerm.length) {
5404 drugLookupStatus = 'noResults';
5405 } else if (!term && (!optsForTerm || optsForTerm.length === 0) && !value.length) {
5406 drugLookupStatus = 'ready';
5407 } else if (loading) {
5408 drugLookupStatus = 'searching';
5409 }
5410
5411 return (0, _preact.h)("div", null, (0, _preact.h)("div", null, (0, _preact.h)(_formFields.Label, {
5412 item: modifiedItemForLabel,
5413 updateValue: function updateValue(val) {
5414 if (val === 'none') {
5415 _updateValue([]);
5416 }
5417 }
5418 }), !valueIsEmptyArray && (0, _preact.h)(_.Input, {
5419 style: {
5420 width: 'calc(100% - 18px)'
5421 },
5422 value: term,
5423 "data-e2e": "".concat(item.name, "Input"),
5424 onKeyDown: function onKeyDown(e) {
5425 if (e.key === 'Enter') {
5426 e.preventDefault();
5427
5428 if (optsForTerm && optsForTerm.length > 0) {
5429 _this3.addDrug(optsForTerm[0]);
5430 }
5431 }
5432 },
5433 onInput: function onInput(e) {
5434 var term = e.target.value || '';
5435
5436 _this3.setState({
5437 term: term
5438 });
5439 }
5440 })), optsForTerm && optsForTerm.length > 0 && (0, _preact.h)("div", {
5441 key: "opts",
5442 className: "overflow-x-scroll nowrap pv2"
5443 }, optsForTerm.map(function (drug) {
5444 return (0, _preact.h)(_.Button, {
5445 key: drug.name,
5446 className: "mr2",
5447 type: "button",
5448 "data-e2e": "".concat(item.name, "SuggestionButton"),
5449 onClick: function onClick(e) {
5450 e.preventDefault();
5451
5452 _this3.addDrug(drug);
5453
5454 _this3.focusOnInput();
5455 }
5456 }, drug.name);
5457 })), (0, _preact.h)(_drugLookupUi.default, {
5458 term: term,
5459 status: drugLookupStatus
5460 }), (0, _preact.h)("div", {
5461 className: "mb2"
5462 }, valueIsEmptyArray && (0, _preact.h)(_.Button, {
5463 type: "button",
5464 className: "mb2",
5465 onClick: function onClick(e) {
5466 e.preventDefault();
5467
5468 _updateValue(null);
5469 }
5470 }, (0, _preact.h)("span", {
5471 className: "flex items-center"
5472 }, "none ", (0, _preact.h)(_.Icon, {
5473 className: "ml2",
5474 icon: "close",
5475 size: "24"
5476 }))), value && !valueIsEmptyArray && value.length !== 0 && (0, _preact.h)("div", null, (0, _preact.h)("div", {
5477 className: "mb2 fw3 f6 pt2"
5478 }, "Chosen Medications:"), value.map(function (drug) {
5479 return (0, _preact.h)("div", {
5480 key: drug.name
5481 }, drug.name, ' ', (0, _preact.h)(_.Button, {
5482 className: "mr2 mb2",
5483 type: "button",
5484 tiny: true,
5485 stop: true,
5486 "data-e2e": "drugRemoveButton",
5487 onClick: function onClick(e) {
5488 e.preventDefault();
5489 var newVal = value.filter(function (item) {
5490 return item.id !== drug.id;
5491 });
5492
5493 _updateValue(newVal);
5494 }
5495 }, (0, _preact.h)("span", {
5496 className: "flex items-center"
5497 }, (0, _preact.h)(_.Icon, {
5498 className: "mr2",
5499 icon: "delete",
5500 size: "16"
5501 }), (0, _preact.h)("span", {
5502 className: "mr1"
5503 }, "remove"))));
5504 }))));
5505 }
5506 }]);
5507
5508 return MedicationEntryField;
5509}(_preact.Component);
5510
5511var _default = MedicationEntryField;
5512exports.default = _default;
5513},{"preact":"../../node_modules/preact/dist/preact.module.js","./utils/fetch-drug-autocomplete":"../utils/fetch-drug-autocomplete.js","./form-fields":"../form-fields.js","./":"../index.js","./drug-lookup-ui":"../drug-lookup-ui.js"}],"../question.js":[function(require,module,exports) {
5514"use strict";
5515
5516Object.defineProperty(exports, "__esModule", {
5517 value: true
5518});
5519exports.Question = void 0;
5520
5521var _preact = require("preact");
5522
5523var _formFields = require("./form-fields");
5524
5525var _medicationField = _interopRequireDefault(require("./medication-field"));
5526
5527var _multiMedicationEntryField = _interopRequireDefault(require("./multi-medication-entry-field"));
5528
5529function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5530
5531function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5532
5533function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5534
5535function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5536
5537var fieldMap = {
5538 choices: _formFields.SelectButtons,
5539 longText: _formFields.TextareaField,
5540 medications: _multiMedicationEntryField.default,
5541 medication: _medicationField.default,
5542 signature: _formFields.SignatureField,
5543 incrementor: _formFields.IncrementButtonField
5544};
5545
5546var Question = function Question(_ref) {
5547 var item = _ref.item,
5548 updateValue = _ref.updateValue,
5549 removeSuggestion = _ref.removeSuggestion;
5550
5551 if (item.hidden) {
5552 return null;
5553 }
5554
5555 var MatchedComponent = fieldMap[item.type] || _formFields.InputField;
5556
5557 var props = _objectSpread({
5558 item: item,
5559 updateValue: updateValue,
5560 removeSuggestion: removeSuggestion
5561 }, item.fieldSpecificProps || {});
5562
5563 return (0, _preact.h)(MatchedComponent, props);
5564};
5565
5566exports.Question = Question;
5567},{"preact":"../../node_modules/preact/dist/preact.module.js","./form-fields":"../form-fields.js","./medication-field":"../medication-field.js","./multi-medication-entry-field":"../multi-medication-entry-field.js"}],"../form.js":[function(require,module,exports) {
5568"use strict";
5569
5570Object.defineProperty(exports, "__esModule", {
5571 value: true
5572});
5573exports.default = void 0;
5574
5575var _preact = require("preact");
5576
5577var _question = require("./question");
5578
5579function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5580
5581function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5582
5583function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5584
5585function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5586
5587var _default = function _default(_ref) {
5588 var bottom = _ref.bottom,
5589 fields = _ref.fields,
5590 _onSubmit = _ref.onSubmit,
5591 _updateValue = _ref.updateValue,
5592 removeSuggestion = _ref.removeSuggestion,
5593 rest = _objectWithoutProperties(_ref, ["bottom", "fields", "onSubmit", "updateValue", "removeSuggestion"]);
5594
5595 return (0, _preact.h)("form", _extends({
5596 onSubmit: function onSubmit(e) {
5597 e.preventDefault();
5598
5599 _onSubmit();
5600 }
5601 }, rest), fields.map(function (item) {
5602 return (0, _preact.h)(_question.Question, {
5603 key: item.name,
5604 item: item,
5605 updateValue: function updateValue(val) {
5606 var updateObj = _defineProperty({}, item.name, val);
5607
5608 if (item.getUpdates) {
5609 updateObj = item.getUpdates(val);
5610 }
5611
5612 _updateValue(updateObj);
5613 },
5614 removeSuggestion: removeSuggestion
5615 });
5616 }), bottom);
5617};
5618
5619exports.default = _default;
5620},{"preact":"../../node_modules/preact/dist/preact.module.js","./question":"../question.js"}],"../index.js":[function(require,module,exports) {
5621"use strict";
5622
5623Object.defineProperty(exports, "__esModule", {
5624 value: true
5625});
5626var _exportNames = {
5627 getStyledComponent: true,
5628 omit: true,
5629 Form: true
5630};
5631Object.defineProperty(exports, "getStyledComponent", {
5632 enumerable: true,
5633 get: function () {
5634 return _getStyledComponent.default;
5635 }
5636});
5637Object.defineProperty(exports, "omit", {
5638 enumerable: true,
5639 get: function () {
5640 return _omit.default;
5641 }
5642});
5643Object.defineProperty(exports, "Form", {
5644 enumerable: true,
5645 get: function () {
5646 return _form.default;
5647 }
5648});
5649
5650var _button = require("./button");
5651
5652Object.keys(_button).forEach(function (key) {
5653 if (key === "default" || key === "__esModule") return;
5654 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5655 Object.defineProperty(exports, key, {
5656 enumerable: true,
5657 get: function () {
5658 return _button[key];
5659 }
5660 });
5661});
5662
5663var _logo = require("./logo");
5664
5665Object.keys(_logo).forEach(function (key) {
5666 if (key === "default" || key === "__esModule") return;
5667 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5668 Object.defineProperty(exports, key, {
5669 enumerable: true,
5670 get: function () {
5671 return _logo[key];
5672 }
5673 });
5674});
5675
5676var _crate = require("./crate");
5677
5678Object.keys(_crate).forEach(function (key) {
5679 if (key === "default" || key === "__esModule") return;
5680 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5681 Object.defineProperty(exports, key, {
5682 enumerable: true,
5683 get: function () {
5684 return _crate[key];
5685 }
5686 });
5687});
5688
5689var _fullScreenOverlay = require("./full-screen-overlay");
5690
5691Object.keys(_fullScreenOverlay).forEach(function (key) {
5692 if (key === "default" || key === "__esModule") return;
5693 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5694 Object.defineProperty(exports, key, {
5695 enumerable: true,
5696 get: function () {
5697 return _fullScreenOverlay[key];
5698 }
5699 });
5700});
5701
5702var _inputs = require("./inputs");
5703
5704Object.keys(_inputs).forEach(function (key) {
5705 if (key === "default" || key === "__esModule") return;
5706 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5707 Object.defineProperty(exports, key, {
5708 enumerable: true,
5709 get: function () {
5710 return _inputs[key];
5711 }
5712 });
5713});
5714
5715var _icon = require("./icon");
5716
5717Object.keys(_icon).forEach(function (key) {
5718 if (key === "default" || key === "__esModule") return;
5719 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5720 Object.defineProperty(exports, key, {
5721 enumerable: true,
5722 get: function () {
5723 return _icon[key];
5724 }
5725 });
5726});
5727
5728var _drugBox = require("./drug-box");
5729
5730Object.keys(_drugBox).forEach(function (key) {
5731 if (key === "default" || key === "__esModule") return;
5732 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5733 Object.defineProperty(exports, key, {
5734 enumerable: true,
5735 get: function () {
5736 return _drugBox[key];
5737 }
5738 });
5739});
5740
5741var _links = require("./links");
5742
5743Object.keys(_links).forEach(function (key) {
5744 if (key === "default" || key === "__esModule") return;
5745 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5746 Object.defineProperty(exports, key, {
5747 enumerable: true,
5748 get: function () {
5749 return _links[key];
5750 }
5751 });
5752});
5753
5754var _checkMark = require("./check-mark");
5755
5756Object.keys(_checkMark).forEach(function (key) {
5757 if (key === "default" || key === "__esModule") return;
5758 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5759 Object.defineProperty(exports, key, {
5760 enumerable: true,
5761 get: function () {
5762 return _checkMark[key];
5763 }
5764 });
5765});
5766
5767var _transitionIn = require("./transition-in");
5768
5769Object.keys(_transitionIn).forEach(function (key) {
5770 if (key === "default" || key === "__esModule") return;
5771 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5772 Object.defineProperty(exports, key, {
5773 enumerable: true,
5774 get: function () {
5775 return _transitionIn[key];
5776 }
5777 });
5778});
5779
5780var _drawer = require("./drawer");
5781
5782Object.keys(_drawer).forEach(function (key) {
5783 if (key === "default" || key === "__esModule") return;
5784 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5785 Object.defineProperty(exports, key, {
5786 enumerable: true,
5787 get: function () {
5788 return _drawer[key];
5789 }
5790 });
5791});
5792
5793var _dialog = require("./dialog");
5794
5795Object.keys(_dialog).forEach(function (key) {
5796 if (key === "default" || key === "__esModule") return;
5797 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5798 Object.defineProperty(exports, key, {
5799 enumerable: true,
5800 get: function () {
5801 return _dialog[key];
5802 }
5803 });
5804});
5805
5806var _appLayout = require("./app-layout");
5807
5808Object.keys(_appLayout).forEach(function (key) {
5809 if (key === "default" || key === "__esModule") return;
5810 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5811 Object.defineProperty(exports, key, {
5812 enumerable: true,
5813 get: function () {
5814 return _appLayout[key];
5815 }
5816 });
5817});
5818
5819var _shield = require("./shield");
5820
5821Object.keys(_shield).forEach(function (key) {
5822 if (key === "default" || key === "__esModule") return;
5823 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5824 Object.defineProperty(exports, key, {
5825 enumerable: true,
5826 get: function () {
5827 return _shield[key];
5828 }
5829 });
5830});
5831
5832var _portal = require("./portal");
5833
5834Object.keys(_portal).forEach(function (key) {
5835 if (key === "default" || key === "__esModule") return;
5836 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5837 Object.defineProperty(exports, key, {
5838 enumerable: true,
5839 get: function () {
5840 return _portal[key];
5841 }
5842 });
5843});
5844
5845var _getStyledComponent = _interopRequireDefault(require("./utils/get-styled-component"));
5846
5847var _omit = _interopRequireDefault(require("./utils/omit"));
5848
5849var _ls = require("./utils/ls");
5850
5851Object.keys(_ls).forEach(function (key) {
5852 if (key === "default" || key === "__esModule") return;
5853 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5854 Object.defineProperty(exports, key, {
5855 enumerable: true,
5856 get: function () {
5857 return _ls[key];
5858 }
5859 });
5860});
5861
5862var _cookie = require("./utils/cookie");
5863
5864Object.keys(_cookie).forEach(function (key) {
5865 if (key === "default" || key === "__esModule") return;
5866 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5867 Object.defineProperty(exports, key, {
5868 enumerable: true,
5869 get: function () {
5870 return _cookie[key];
5871 }
5872 });
5873});
5874
5875var _tokenWriter = require("./utils/token-writer");
5876
5877Object.keys(_tokenWriter).forEach(function (key) {
5878 if (key === "default" || key === "__esModule") return;
5879 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5880 Object.defineProperty(exports, key, {
5881 enumerable: true,
5882 get: function () {
5883 return _tokenWriter[key];
5884 }
5885 });
5886});
5887
5888var _throttle = require("./utils/throttle");
5889
5890Object.keys(_throttle).forEach(function (key) {
5891 if (key === "default" || key === "__esModule") return;
5892 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5893 Object.defineProperty(exports, key, {
5894 enumerable: true,
5895 get: function () {
5896 return _throttle[key];
5897 }
5898 });
5899});
5900
5901var _token = require("./bundles/token");
5902
5903Object.keys(_token).forEach(function (key) {
5904 if (key === "default" || key === "__esModule") return;
5905 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5906 Object.defineProperty(exports, key, {
5907 enumerable: true,
5908 get: function () {
5909 return _token[key];
5910 }
5911 });
5912});
5913
5914var _footer = require("./footer");
5915
5916Object.keys(_footer).forEach(function (key) {
5917 if (key === "default" || key === "__esModule") return;
5918 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5919 Object.defineProperty(exports, key, {
5920 enumerable: true,
5921 get: function () {
5922 return _footer[key];
5923 }
5924 });
5925});
5926
5927var _layoutUi = require("./bundles/layout-ui");
5928
5929Object.keys(_layoutUi).forEach(function (key) {
5930 if (key === "default" || key === "__esModule") return;
5931 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5932 Object.defineProperty(exports, key, {
5933 enumerable: true,
5934 get: function () {
5935 return _layoutUi[key];
5936 }
5937 });
5938});
5939
5940var _question = require("./question");
5941
5942Object.keys(_question).forEach(function (key) {
5943 if (key === "default" || key === "__esModule") return;
5944 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5945 Object.defineProperty(exports, key, {
5946 enumerable: true,
5947 get: function () {
5948 return _question[key];
5949 }
5950 });
5951});
5952
5953var _form = _interopRequireDefault(require("./form"));
5954
5955var _formFields = require("./form-fields");
5956
5957Object.keys(_formFields).forEach(function (key) {
5958 if (key === "default" || key === "__esModule") return;
5959 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
5960 Object.defineProperty(exports, key, {
5961 enumerable: true,
5962 get: function () {
5963 return _formFields[key];
5964 }
5965 });
5966});
5967
5968function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5969},{"./button":"../button.js","./logo":"../logo.js","./crate":"../crate.js","./full-screen-overlay":"../full-screen-overlay.js","./inputs":"../inputs.js","./icon":"../icon.js","./drug-box":"../drug-box.js","./links":"../links.js","./check-mark":"../check-mark.js","./transition-in":"../transition-in.js","./drawer":"../drawer.js","./dialog":"../dialog.js","./app-layout":"../app-layout.js","./shield":"../shield.js","./portal":"../portal.js","./utils/get-styled-component":"../utils/get-styled-component.js","./utils/omit":"../utils/omit.js","./utils/ls":"../utils/ls.js","./utils/cookie":"../utils/cookie.js","./utils/token-writer":"../utils/token-writer.js","./utils/throttle":"../utils/throttle.js","./bundles/token":"../bundles/token.js","./footer":"../footer.js","./bundles/layout-ui":"../bundles/layout-ui.js","./question":"../question.js","./form":"../form.js","./form-fields":"../form-fields.js"}],"../colors.js":[function(require,module,exports) {
5970"use strict";
5971
5972Object.defineProperty(exports, "__esModule", {
5973 value: true
5974});
5975exports.colors = void 0;
5976var colors = {
5977 black: '#000',
5978 'near-black': '#111',
5979 'dark-gray': '#333',
5980 'mid-gray': '#5b7385',
5981 gray: '#a1afba',
5982 silver: '#999',
5983 'light-silver': '#aaa',
5984 'moon-gray': '#ccc',
5985 'light-gray': '#d0d7dc',
5986 'near-white': '#dbe1e5',
5987 white: '#fff',
5988 'black-90': 'rgba(0, 0, 0, 0.9)',
5989 'black-80': 'rgba(0, 0, 0, 0.8)',
5990 'black-70': 'rgba(0, 0, 0, 0.7)',
5991 'black-60': 'rgba(0, 0, 0, 0.6)',
5992 'black-50': 'rgba(0, 0, 0, 0.5)',
5993 'black-40': 'rgba(0, 0, 0, 0.4)',
5994 'black-30': 'rgba(0, 0, 0, 0.3)',
5995 'black-20': 'rgba(0, 0, 0, 0.2)',
5996 'black-10': 'rgba(0, 0, 0, 0.1)',
5997 'black-05': 'rgba(0, 0, 0, 0.05)',
5998 'black-025': 'rgba(0, 0, 0, 0.025)',
5999 'black-0125': 'rgba(0, 0, 0, 0.0125)',
6000 'white-90': 'rgba(255, 255, 255, 0.9)',
6001 'white-80': 'rgba(255, 255, 255, 0.8)',
6002 'white-70': 'rgba(255, 255, 255, 0.7)',
6003 'white-60': 'rgba(255, 255, 255, 0.6)',
6004 'white-50': 'rgba(255, 255, 255, 0.5)',
6005 'white-40': 'rgba(255, 255, 255, 0.4)',
6006 'white-30': 'rgba(255, 255, 255, 0.3)',
6007 'white-20': 'rgba(255, 255, 255, 0.2)',
6008 'white-10': 'rgba(255, 255, 255, 0.1)',
6009 'white-05': 'rgba(255, 255, 255, 0.05)',
6010 'white-025': 'rgba(255, 255, 255, 0.025)',
6011 'white-0125': 'rgba(255, 255, 255, 0.0125)',
6012 'dark-red': '#e7040f',
6013 red: '#ff0000',
6014 'light-red': '#ff725c',
6015 orange: '#ff6300',
6016 gold: '#ffb700',
6017 yellow: '#ffd700',
6018 'light-yellow': '#fbf1a9',
6019 purple: '#5e2ca5',
6020 'light-purple': '#a463f2',
6021 'dark-pink': '#d5008f',
6022 'hot-pink': '#ff41b4',
6023 pink: '#ff80cc',
6024 'light-pink': '#ffa3d7',
6025 'dark-green': '#19a974',
6026 green: '#0fdd83',
6027 'light-green': '#9eebcf',
6028 navy: '#357edd',
6029 'dark-blue': '#133651',
6030 blue: '#1f566f',
6031 'light-blue': '#53d6e4',
6032 'lightest-blue': '#bcebf1',
6033 'washed-blue': '#f6fffe',
6034 'washed-green': '#e8fdf5',
6035 'washed-yellow': '#fffceb',
6036 'washed-red': '#ffdfdf'
6037};
6038exports.colors = colors;
6039},{}],"section.js":[function(require,module,exports) {
6040"use strict";
6041
6042Object.defineProperty(exports, "__esModule", {
6043 value: true
6044});
6045exports.default = void 0;
6046
6047var _preact = require("preact");
6048
6049var _crate = require("../crate");
6050
6051var _default = function _default(_ref) {
6052 var title = _ref.title,
6053 children = _ref.children;
6054 return (0, _preact.h)(_crate.PageCrate, {
6055 wide: true,
6056 title: title
6057 }, children);
6058};
6059
6060exports.default = _default;
6061},{"preact":"../../node_modules/preact/dist/preact.module.js","../crate":"../crate.js"}],"component-code.js":[function(require,module,exports) {
6062"use strict";
6063
6064Object.defineProperty(exports, "__esModule", {
6065 value: true
6066});
6067exports.default = void 0;
6068
6069var _preact = require("preact");
6070
6071var _default = function _default(_ref) {
6072 var name = _ref.name,
6073 code = _ref.code,
6074 children = _ref.children;
6075 return (0, _preact.h)("div", {
6076 className: "bg-white pv3 br3 mt3"
6077 }, (0, _preact.h)("h3", {
6078 className: "mt0"
6079 }, name), (0, _preact.h)("div", {
6080 className: "fw6 mv2"
6081 }, "Code:"), (0, _preact.h)("code", {
6082 className: "light-blue dib bg-black-90 pa2 br2 overflow-x-auto w-100"
6083 }, (0, _preact.h)("pre", {
6084 className: "ma0 f6"
6085 }, code)), (0, _preact.h)("div", {
6086 className: "fw6 mv2"
6087 }, "Output:"), (0, _preact.h)("div", null, children));
6088};
6089
6090exports.default = _default;
6091},{"preact":"../../node_modules/preact/dist/preact.module.js"}],"../utils/get-prop-variants.js":[function(require,module,exports) {
6092"use strict";
6093
6094Object.defineProperty(exports, "__esModule", {
6095 value: true
6096});
6097exports.default = void 0;
6098
6099function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6100
6101function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6102
6103function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6104
6105function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6106
6107function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
6108
6109function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6110
6111function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6112
6113var _default = function _default(definition) {
6114 var result = [];
6115
6116 var addDimension = function addDimension(category, options) {
6117 var values = ['default'].concat(_toConsumableArray(options));
6118
6119 if (!result.length) {
6120 result.push.apply(result, _toConsumableArray(values.map(function (value) {
6121 return _defineProperty({}, category, value);
6122 })));
6123 return;
6124 }
6125
6126 values.forEach(function (value, i) {
6127 if (i === 0) {
6128 result.forEach(function (item) {
6129 item[category] = value;
6130 });
6131 } else {
6132 var copy = JSON.parse(JSON.stringify(result));
6133 copy.forEach(function (item) {
6134 item[category] = value;
6135 });
6136 result.push.apply(result, _toConsumableArray(copy));
6137 }
6138 });
6139 };
6140
6141 Object.keys(definition).forEach(function (key) {
6142 addDimension(key, definition[key]);
6143 }); // remove defaults
6144
6145 var propVariants = result.map(function (item) {
6146 var props = {};
6147 Object.keys(item).forEach(function (key) {
6148 var value = item[key];
6149
6150 if (value !== 'default') {
6151 props[value] = true;
6152 }
6153 });
6154 return props;
6155 });
6156 var results = {};
6157 propVariants.forEach(function (props) {
6158 results[Object.keys(props).sort().join(',')] = true;
6159 });
6160 var deduped = Object.keys(results).map(function (key) {
6161 return key.split(',');
6162 });
6163 return deduped.map(function (propArray) {
6164 return propArray.reduce(function (result, item) {
6165 if (item) {
6166 result[item] = true;
6167 }
6168
6169 return result;
6170 }, {});
6171 });
6172};
6173
6174exports.default = _default;
6175},{}],"introspect.js":[function(require,module,exports) {
6176"use strict";
6177
6178Object.defineProperty(exports, "__esModule", {
6179 value: true
6180});
6181exports.default = void 0;
6182
6183var _preact = require("preact");
6184
6185var _componentCode = _interopRequireDefault(require("./component-code"));
6186
6187var _getPropVariants = _interopRequireDefault(require("../utils/get-prop-variants"));
6188
6189var _omit = _interopRequireDefault(require("../utils/omit"));
6190
6191function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6192
6193function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6194
6195var serializeProps = function serializeProps(props) {
6196 if (!props) {
6197 return '';
6198 }
6199
6200 return Object.keys(props).reduce(function (buffer, prop) {
6201 var value = props[prop];
6202 return "".concat(buffer, " ").concat(prop).concat(value === true ? '' : "=\"".concat(value, "\""));
6203 }, '');
6204};
6205
6206var componentString = function componentString(name, props, content) {
6207 return "<".concat(name).concat(serializeProps(props)).concat(content ? ">".concat(content, "</").concat(name) : " />");
6208};
6209
6210var _default = function _default(_ref) {
6211 var Component = _ref.Component,
6212 children = _ref.children,
6213 name = _ref.name;
6214 var _Component$definition = Component.definition.options,
6215 options = _Component$definition === void 0 ? {} : _Component$definition;
6216 var variants = (0, _getPropVariants.default)(options);
6217 var code = variants.reduce(function (buff, props) {
6218 return buff + componentString(name, props, children) + '\n';
6219 }, '');
6220 return (0, _preact.h)(_componentCode.default, {
6221 name: name,
6222 code: code
6223 }, variants.map(function (props) {
6224 return (0, _preact.h)(Component, _extends({
6225 title: componentString(name, props, children)
6226 }, Object.assign({}, props, {
6227 children: children
6228 }), {
6229 className: "mr2 mb2"
6230 }));
6231 }));
6232};
6233
6234exports.default = _default;
6235},{"preact":"../../node_modules/preact/dist/preact.module.js","./component-code":"component-code.js","../utils/get-prop-variants":"../utils/get-prop-variants.js","../utils/omit":"../utils/omit.js"}],"dialog-section.js":[function(require,module,exports) {
6236"use strict";
6237
6238Object.defineProperty(exports, "__esModule", {
6239 value: true
6240});
6241exports.default = void 0;
6242
6243var _preact = require("preact");
6244
6245var _section = _interopRequireDefault(require("./section"));
6246
6247var _componentCode = _interopRequireDefault(require("./component-code"));
6248
6249var _dialog = require("./../dialog");
6250
6251var _button = require("../button");
6252
6253function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6254
6255function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6256
6257function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6258
6259function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6260
6261function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
6262
6263function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
6264
6265function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6266
6267function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6268
6269function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6270
6271function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6272
6273function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6274
6275function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6276
6277var Container = /*#__PURE__*/function (_Component) {
6278 _inherits(Container, _Component);
6279
6280 var _super = _createSuper(Container);
6281
6282 function Container(props) {
6283 var _this;
6284
6285 _classCallCheck(this, Container);
6286
6287 _this = _super.call(this, props);
6288 _this.state = {
6289 open: false
6290 };
6291
6292 _this.open = function () {
6293 return _this.setState({
6294 open: true
6295 });
6296 };
6297
6298 _this.close = function () {
6299 return _this.setState({
6300 open: false
6301 });
6302 };
6303
6304 return _this;
6305 }
6306
6307 _createClass(Container, [{
6308 key: "render",
6309 value: function render(props, _ref) {
6310 var open = _ref.open;
6311 return (0, _preact.h)(_section.default, {
6312 title: "Dialog"
6313 }, (0, _preact.h)(_componentCode.default, {
6314 name: "Dialog",
6315 code: "<Dialog doClose={this.close} title=\"A Dialog\">\n Hello there\n</Dialog>"
6316 }, (0, _preact.h)(_button.Button, {
6317 onClick: this.open
6318 }, "Open"), open && (0, _preact.h)(_dialog.Dialog, {
6319 doClose: this.close,
6320 title: "A Dialog with a really, really, ridiculously long title",
6321 bottom: (0, _preact.h)("div", null, (0, _preact.h)(_button.Button, {
6322 onClick: this.close
6323 }, "Done"))
6324 }, "Hello there", (0, _preact.h)("p", null, "long thing"), (0, _preact.h)("p", null, "long thing"), (0, _preact.h)(_button.Button, null, "Some button"))));
6325 }
6326 }]);
6327
6328 return Container;
6329}(_preact.Component);
6330
6331var _default = Container;
6332exports.default = _default;
6333},{"preact":"../../node_modules/preact/dist/preact.module.js","./section":"section.js","./component-code":"component-code.js","./../dialog":"../dialog.js","../button":"../button.js"}],"drugbox-section.js":[function(require,module,exports) {
6334"use strict";
6335
6336Object.defineProperty(exports, "__esModule", {
6337 value: true
6338});
6339exports.DrugBoxSection = void 0;
6340
6341var _preact = require("preact");
6342
6343var _2 = require("../");
6344
6345var _section = _interopRequireDefault(require("./section"));
6346
6347var _componentCode = _interopRequireDefault(require("./component-code"));
6348
6349function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6350
6351function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6352
6353function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6354
6355function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6356
6357function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
6358
6359function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
6360
6361function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6362
6363function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6364
6365function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6366
6367function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6368
6369function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6370
6371function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6372
6373var DrugBoxSection = /*#__PURE__*/function (_Component) {
6374 _inherits(DrugBoxSection, _Component);
6375
6376 var _super = _createSuper(DrugBoxSection);
6377
6378 function DrugBoxSection(props) {
6379 var _this;
6380
6381 _classCallCheck(this, DrugBoxSection);
6382
6383 _this = _super.call(this, props);
6384 _this.state = {
6385 flipped: false
6386 };
6387 return _this;
6388 }
6389
6390 _createClass(DrugBoxSection, [{
6391 key: "render",
6392 value: function render(_, _ref) {
6393 var _this2 = this;
6394
6395 var flipped = _ref.flipped;
6396 return (0, _preact.h)(_section.default, {
6397 title: "DrugBox"
6398 }, (0, _preact.h)(_componentCode.default, {
6399 name: "DrugBox FlipContainer",
6400 code: "<FlipContainer\n direction=\"horizontal\"\n perspective=\"2000px\"\n front={\n <DrugBox style={{ width: '200px' }}>\n <div>\n <p>Hi front</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n </div>\n </DrugBox>\n }\n back={\n <DrugBox style={{ width: '200px', height: '100%' }}>\n <p>Hi back</p>\n <p>Stuff</p>\n <p>Stuff</p>\n <p>Stuff</p>\n </DrugBox>\n }\n width=\"200px\"\n flipped={flipped}\n/>"
6401 }, (0, _preact.h)("button", {
6402 onClick: function onClick() {
6403 return _this2.setState({
6404 flipped: !flipped
6405 });
6406 }
6407 }, "flip"), (0, _preact.h)("div", {
6408 className: "flex items-center justify-between"
6409 }, (0, _preact.h)(_2.FlipContainer, {
6410 "data-e2e": "flipcontainer",
6411 className: "bg-blue",
6412 direction: "horizontal",
6413 perspective: "2000px",
6414 front: (0, _preact.h)(_2.DrugBox, null, (0, _preact.h)("div", null, (0, _preact.h)("p", null, "Hi front"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"))),
6415 back: (0, _preact.h)(_2.DrugBox, {
6416 style: {
6417 height: '100%'
6418 }
6419 }, (0, _preact.h)("p", null, "Hi back"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff")),
6420 width: "calc(50% - 8px)",
6421 flipped: flipped
6422 }), (0, _preact.h)(_2.FlipContainer, {
6423 direction: "horizontal",
6424 perspective: "2000px",
6425 front: (0, _preact.h)(_2.DrugBox, null, (0, _preact.h)("div", null, (0, _preact.h)("p", null, "Hi front"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"))),
6426 back: (0, _preact.h)(_2.DrugBox, {
6427 style: {
6428 height: '100%'
6429 }
6430 }, (0, _preact.h)("p", null, "Hi back"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff"), (0, _preact.h)("p", null, "Stuff")),
6431 width: "calc(50% - 8px)",
6432 flipped: flipped
6433 }))));
6434 }
6435 }]);
6436
6437 return DrugBoxSection;
6438}(_preact.Component);
6439
6440exports.DrugBoxSection = DrugBoxSection;
6441},{"preact":"../../node_modules/preact/dist/preact.module.js","../":"../index.js","./section":"section.js","./component-code":"component-code.js"}],"form-section.js":[function(require,module,exports) {
6442"use strict";
6443
6444Object.defineProperty(exports, "__esModule", {
6445 value: true
6446});
6447exports.FormsSection = void 0;
6448
6449var _preact = require("preact");
6450
6451var _2 = require("../");
6452
6453var _section = _interopRequireDefault(require("./section"));
6454
6455var _componentCode = _interopRequireDefault(require("./component-code"));
6456
6457var _question = require("../utils/question");
6458
6459var _smartSuggestionUtils = require("../utils/smart-suggestion-utils");
6460
6461var _button = require("../button");
6462
6463function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6464
6465function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6466
6467function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6468
6469function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6470
6471function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
6472
6473function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
6474
6475function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6476
6477function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6478
6479function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6480
6481function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6482
6483function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6484
6485function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6486
6487var fields = [{
6488 name: 'text',
6489 label: 'This is the "label"',
6490 subLabel: 'this is the subLabel',
6491 onInput: true
6492}, {
6493 name: 'textWithSuggestions',
6494 label: 'This one has smart suggestions',
6495 subLabel: 'this is the subLabel',
6496 autoSuggestType: 'single',
6497 onInput: true
6498}, {
6499 name: 'medications',
6500 label: 'Multi-medication',
6501 type: 'medications'
6502}, {
6503 name: 'medication',
6504 label: 'Single Medication',
6505 type: 'medication'
6506}, {
6507 name: 'signature',
6508 label: 'Signature',
6509 type: 'signature',
6510 signatureLineName: 'Someone'
6511}, {
6512 label: 'Incrementor Field',
6513 name: 'incrementor',
6514 type: 'incrementor',
6515 fieldSpecificProps: {
6516 showStep: false,
6517 width: '140px',
6518 min: -5,
6519 max: 5
6520 },
6521 test: function test(val) {
6522 return val < 1 ? 'value has to be more than zero' : '';
6523 }
6524}, {
6525 label: 'Secured By',
6526 name: 'securedWith',
6527 type: 'choices',
6528 choices: [(0, _question.choice)('Tape'), (0, _question.choice)('Tegaderm')],
6529 showOther: true
6530}];
6531
6532var FormsSection = /*#__PURE__*/function (_Component) {
6533 _inherits(FormsSection, _Component);
6534
6535 var _super = _createSuper(FormsSection);
6536
6537 function FormsSection(props) {
6538 var _this;
6539
6540 _classCallCheck(this, FormsSection);
6541
6542 _this = _super.call(this, props);
6543 _this.state = {
6544 incrementor: 0
6545 };
6546 fields.forEach(function (field) {
6547 if (!_this.state.hasOwnProperty(field.name)) {
6548 _this.state[field.name] = '';
6549 }
6550 });
6551 return _this;
6552 }
6553
6554 _createClass(FormsSection, [{
6555 key: "updateValue",
6556 value: function updateValue(updates) {
6557 this.setState(updates, function () {});
6558 }
6559 }, {
6560 key: "render",
6561 value: function render(_, state) {
6562 var _this2 = this;
6563
6564 var processedFields = (0, _smartSuggestionUtils.buildQuestionList)(fields, this.state, {
6565 textWithSuggestions: {
6566 suggestions: [{
6567 score: 2,
6568 phrase: 'Jsjsj'
6569 }],
6570 deleting: false
6571 }
6572 });
6573 return (0, _preact.h)(_section.default, {
6574 title: "Forms"
6575 }, (0, _preact.h)(_componentCode.default, {
6576 name: "Form",
6577 code: "<Form\n autocomplete=\"off\"\n onSubmit={() => {\n !state.missingItems && alert('finished')\n }}\n updateValue={updates => this.updateValue(updates)}\n removeSuggestion={(fieldName, suggestion) =>\n alert(`removeSuggestion(\"${fieldName}\", \"${suggestion}\")`)\n }\n fields={processedFields}\n bottom={\n <div>\n <Button>Submit</Button>\n </div>\n }\n/>"
6578 }, (0, _preact.h)(_2.Form, {
6579 autocomplete: "off",
6580 onSubmit: function onSubmit() {
6581 alert('submit called');
6582 },
6583 updateValue: function updateValue(updates) {
6584 return _this2.updateValue(updates);
6585 },
6586 removeSuggestion: function removeSuggestion(fieldName, suggestion) {
6587 return alert("removeSuggestion(\"".concat(fieldName, "\", \"").concat(suggestion, "\")"));
6588 },
6589 fields: processedFields,
6590 bottom: (0, _preact.h)("div", {
6591 className: "mv3"
6592 }, (0, _preact.h)(_button.Button, {
6593 primary: true,
6594 large: true,
6595 type: "submit"
6596 }, "Submit"))
6597 }), (0, _preact.h)("div", {
6598 className: "f7"
6599 }, "Form Definition:", (0, _preact.h)("pre", null, (0, _preact.h)("code", {
6600 className: "f7"
6601 }, JSON.stringify(processedFields, null, 2))), "Form state:", (0, _preact.h)("pre", null, (0, _preact.h)("code", {
6602 className: "f7"
6603 }, JSON.stringify(state, null, 2))))));
6604 }
6605 }]);
6606
6607 return FormsSection;
6608}(_preact.Component);
6609
6610exports.FormsSection = FormsSection;
6611},{"preact":"../../node_modules/preact/dist/preact.module.js","../":"../index.js","./section":"section.js","./component-code":"component-code.js","../utils/question":"../utils/question.js","../utils/smart-suggestion-utils":"../utils/smart-suggestion-utils.js","../button":"../button.js"}],"sections.js":[function(require,module,exports) {
6612"use strict";
6613
6614Object.defineProperty(exports, "__esModule", {
6615 value: true
6616});
6617var _exportNames = {
6618 ColorSection: true,
6619 ButtonSection: true,
6620 LinkSection: true,
6621 LogoSection: true,
6622 InputSection: true,
6623 IconSection: true,
6624 MessagePageCrateSection: true,
6625 DialogSection: true,
6626 DrugBoxSection: true
6627};
6628Object.defineProperty(exports, "DialogSection", {
6629 enumerable: true,
6630 get: function () {
6631 return _dialogSection.default;
6632 }
6633});
6634Object.defineProperty(exports, "DrugBoxSection", {
6635 enumerable: true,
6636 get: function () {
6637 return _drugboxSection.DrugBoxSection;
6638 }
6639});
6640exports.MessagePageCrateSection = exports.IconSection = exports.InputSection = exports.LogoSection = exports.LinkSection = exports.ButtonSection = exports.ColorSection = void 0;
6641
6642var _preact = require("preact");
6643
6644var _ = require("../");
6645
6646var _colors = require("../colors");
6647
6648var _section = _interopRequireDefault(require("./section"));
6649
6650var _componentCode = _interopRequireDefault(require("./component-code"));
6651
6652var _introspect = _interopRequireDefault(require("./introspect"));
6653
6654var _checkMark = require("../check-mark");
6655
6656var _dialogSection = _interopRequireDefault(require("./dialog-section"));
6657
6658var _drugboxSection = require("./drugbox-section");
6659
6660var _formSection = require("./form-section");
6661
6662Object.keys(_formSection).forEach(function (key) {
6663 if (key === "default" || key === "__esModule") return;
6664 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
6665 Object.defineProperty(exports, key, {
6666 enumerable: true,
6667 get: function () {
6668 return _formSection[key];
6669 }
6670 });
6671});
6672
6673function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6674
6675var ColorSection = function ColorSection() {
6676 return (0, _preact.h)(_section.default, {
6677 title: "Colors"
6678 }, (0, _preact.h)("div", {
6679 className: "flex flex-wrap items-center"
6680 }, Object.keys(_colors.colors).map(function (name) {
6681 return (0, _preact.h)("div", {
6682 className: "mb2 mr2"
6683 }, (0, _preact.h)("div", {
6684 className: "ba b--light-gray mb1 w4 h2 bg-".concat(name)
6685 }), (0, _preact.h)("div", {
6686 className: "f7"
6687 }, name));
6688 })));
6689};
6690
6691exports.ColorSection = ColorSection;
6692
6693var ButtonSection = function ButtonSection() {
6694 return (0, _preact.h)(_section.default, {
6695 title: "Buttons"
6696 }, (0, _preact.h)(_introspect.default, {
6697 Component: _.Button,
6698 name: "Button",
6699 children: "Button"
6700 }));
6701};
6702
6703exports.ButtonSection = ButtonSection;
6704
6705var LinkSection = function LinkSection() {
6706 return (0, _preact.h)(_section.default, {
6707 title: "Links"
6708 }, (0, _preact.h)(_componentCode.default, {
6709 name: "Link",
6710 code: "<Link href='something'>hi</Link>"
6711 }, (0, _preact.h)(_.Link, {
6712 href: "something"
6713 }, "Some text")), (0, _preact.h)(_componentCode.default, {
6714 name: "SupportLink",
6715 code: "<SupportLink />"
6716 }, (0, _preact.h)(_.SupportLink, null)));
6717};
6718
6719exports.LinkSection = LinkSection;
6720
6721var LogoSection = function LogoSection() {
6722 return (0, _preact.h)(_section.default, {
6723 title: "Logos"
6724 }, (0, _preact.h)(_componentCode.default, {
6725 name: "LogoLight",
6726 code: "<LogoLight className=\"w5\" />"
6727 }, (0, _preact.h)(_.LogoLight, {
6728 className: "w5"
6729 })), (0, _preact.h)(_componentCode.default, {
6730 name: "LogoDark",
6731 code: "<div className=\"bg-dark-blue pa3 w5\">\n <LogoDark />\n</div>"
6732 }, (0, _preact.h)("div", {
6733 className: "bg-dark-blue pa3 w5"
6734 }, (0, _preact.h)(_.LogoDark, null))));
6735};
6736
6737exports.LogoSection = LogoSection;
6738
6739var InputSection = function InputSection() {
6740 return (0, _preact.h)(_section.default, {
6741 title: "Inputs"
6742 }, (0, _preact.h)(_componentCode.default, {
6743 name: "Input",
6744 code: "<Input />"
6745 }, (0, _preact.h)(_.Input, null)), (0, _preact.h)(_componentCode.default, {
6746 name: "Select",
6747 code: "<Select>\n <option>option 1</option>\n <option>option 2</option>\n</Select>"
6748 }, (0, _preact.h)(_.Select, null, (0, _preact.h)("option", null, "option 1"), (0, _preact.h)("option", null, "option 2"))), (0, _preact.h)(_componentCode.default, {
6749 name: "Textarea",
6750 code: "<Textarea />"
6751 }, (0, _preact.h)(_.Textarea, null)), (0, _preact.h)(_componentCode.default, {
6752 name: "TooltipButton",
6753 code: "<TooltipButton />"
6754 }, (0, _preact.h)(_.TooltipButton, {
6755 text: "some content"
6756 }, "Stuff goes here")), (0, _preact.h)(_componentCode.default, {
6757 name: "CheckMark",
6758 code: "<CheckMark />"
6759 }, (0, _preact.h)(_checkMark.CheckMark, {
6760 name: "name",
6761 label: "something"
6762 })));
6763};
6764
6765exports.InputSection = InputSection;
6766
6767var IconSection = function IconSection() {
6768 return (0, _preact.h)(_section.default, {
6769 title: "Icons"
6770 }, (0, _preact.h)(_componentCode.default, {
6771 name: "Icon",
6772 code: "<Icon icon=\"pill\" />\n<Icon icon=\"close\" />"
6773 }, (0, _preact.h)(_.Icon, {
6774 icon: "pill"
6775 }), (0, _preact.h)(_.Icon, {
6776 icon: "close"
6777 })));
6778};
6779
6780exports.IconSection = IconSection;
6781
6782var MessagePageCrateSection = function MessagePageCrateSection() {
6783 return (0, _preact.h)(_section.default, {
6784 title: "Message Page Crate"
6785 }, (0, _preact.h)(_componentCode.default, {
6786 name: "MessagePageCrate",
6787 code: "<MessagePageCrate loading>Loading</MessagePageCrate>\n<MessagePageCrate warning>Uh oh!</MessagePageCrate>\n<MessagePageCrate error>Aw Crap!</MessagePageCrate>"
6788 }, (0, _preact.h)(_.MessagePageCrate, null, "Hello there!"), (0, _preact.h)(_.MessagePageCrate, {
6789 noShadow: true,
6790 wide: true,
6791 loading: true
6792 }, "Loading"), (0, _preact.h)(_.MessagePageCrate, {
6793 warning: true,
6794 wide: true
6795 }, "Uh oh!"), (0, _preact.h)(_.MessagePageCrate, {
6796 error: true
6797 }, "Aw Crap!"), (0, _preact.h)(_.MessagePageCrate, {
6798 success: true
6799 }, "Success!")));
6800};
6801
6802exports.MessagePageCrateSection = MessagePageCrateSection;
6803},{"preact":"../../node_modules/preact/dist/preact.module.js","../":"../index.js","../colors":"../colors.js","./section":"section.js","./component-code":"component-code.js","./introspect":"introspect.js","../check-mark":"../check-mark.js","./dialog-section":"dialog-section.js","./drugbox-section":"drugbox-section.js","./form-section":"form-section.js"}],"../../package.json":[function(require,module,exports) {
6804module.exports = {
6805 "name": "ac-patterns",
6806 "version": "2.2.7",
6807 "main": "dist/index.node.js",
6808 "module": "dist/index.js",
6809 "scripts": {
6810 "start": "parcel component-library/site/index.html -d dist --public-url / --port 3000",
6811 "prepublishOnly": "npm run build",
6812 "build": "npm run build-module && npm run build-css && npm run build-umd",
6813 "build-module": "babel component-library --out-dir dist",
6814 "build-umd": "parcel build component-library/index.js --out-file dist/index.node.js --no-source-maps",
6815 "build-css": "cd tachyons-ac && npm run build && cd .. && cpy tachyons-ac/css/tachyons.css dist/",
6816 "build-site": "parcel build component-library/site/index.html -d site --public-url / --no-minify"
6817 },
6818 "keywords": [],
6819 "author": "Henrik Joreteg <henrik@joreteg.com> (joreteg.com)",
6820 "license": "MIT",
6821 "devDependencies": {
6822 "@babel/cli": "7.12.10",
6823 "@babel/core": "7.12.10",
6824 "@babel/preset-env": "7.12.11",
6825 "@henrikjoreteg/babel-preset-preact": "1.0.0",
6826 "cpy-cli": "^3.1.1",
6827 "parcel": "1.12.4",
6828 "redux-bundler": "28.0.0",
6829 "redux-bundler-preact": "2.0.1",
6830 "tachyons-cli": "1.3.3"
6831 },
6832 "browserslist": ["defaults", "safari 11"],
6833 "dependencies": {
6834 "classnames": "2.2.6",
6835 "milliseconds": "1.0.3",
6836 "money-clip": "3.0.3",
6837 "preact": "10.5.12",
6838 "tryit": "1.0.3"
6839 },
6840 "prettier": {
6841 "semi": false,
6842 "singleQuote": true,
6843 "trailingComma": "none",
6844 "arrowParens": "avoid"
6845 },
6846 "files": ["dist"]
6847};
6848},{}],"layout.js":[function(require,module,exports) {
6849"use strict";
6850
6851Object.defineProperty(exports, "__esModule", {
6852 value: true
6853});
6854exports.default = void 0;
6855
6856var _preact = require("preact");
6857
6858var sections = _interopRequireWildcard(require("./sections"));
6859
6860var _drawer = require("../drawer");
6861
6862var _crate = require("../crate");
6863
6864var _appLayout = require("../app-layout");
6865
6866var _package = require("../../package.json");
6867
6868var _logo = require("../logo");
6869
6870var _button = require("../button");
6871
6872function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
6873
6874function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6875
6876function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6877
6878function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6879
6880function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6881
6882function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
6883
6884function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
6885
6886function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6887
6888function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6889
6890function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6891
6892function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6893
6894function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6895
6896function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6897
6898var guessEnv = function guessEnv() {
6899 var host = window.location.host;
6900
6901 if (host.includes('dev')) {
6902 return 'dev';
6903 }
6904
6905 if (host.includes('stage')) {
6906 return 'stage';
6907 }
6908
6909 if (host.includes('localhost')) {
6910 return 'local';
6911 }
6912
6913 return 'prod';
6914};
6915
6916var _default = /*#__PURE__*/function (_Component) {
6917 _inherits(_default, _Component);
6918
6919 var _super = _createSuper(_default);
6920
6921 function _default(props) {
6922 var _this;
6923
6924 _classCallCheck(this, _default);
6925
6926 _this = _super.call(this, props);
6927 _this.state = {
6928 screenIsWide: _this.isScreenWide(),
6929 drawerOpen: false,
6930 drawerEnabled: true,
6931 activeHash: ''
6932 };
6933 _this.toggleDrawerOpen = _this.toggleDrawerOpen.bind(_assertThisInitialized(_this));
6934 _this.toggleDrawerEnabled = _this.toggleDrawerEnabled.bind(_assertThisInitialized(_this));
6935 _this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
6936 _this.handleHashChange = _this.handleHashChange.bind(_assertThisInitialized(_this));
6937 return _this;
6938 }
6939
6940 _createClass(_default, [{
6941 key: "componentDidMount",
6942 value: function componentDidMount() {
6943 window.addEventListener('resize', this.handleResize, {
6944 passive: true
6945 });
6946 window.addEventListener('hashchange', this.handleHashChange);
6947 }
6948 }, {
6949 key: "componentWillUnmount",
6950 value: function componentWillUnmount() {
6951 window.removeEventListener('resize', this.handleResize, {
6952 passive: true
6953 });
6954 }
6955 }, {
6956 key: "handleHashChange",
6957 value: function handleHashChange() {
6958 this.setState({
6959 activeHash: location.hash
6960 });
6961 }
6962 }, {
6963 key: "toggleDrawerOpen",
6964 value: function toggleDrawerOpen() {
6965 this.setState({
6966 drawerOpen: !this.state.drawerOpen
6967 });
6968 }
6969 }, {
6970 key: "toggleDrawerEnabled",
6971 value: function toggleDrawerEnabled() {
6972 this.setState({
6973 drawerEnabled: !this.state.drawerEnabled
6974 });
6975 }
6976 }, {
6977 key: "handleResize",
6978 value: function handleResize() {
6979 var isWide = this.isScreenWide();
6980
6981 if (isWide !== this.state.screenIsWide) {
6982 this.setState({
6983 screenIsWide: isWide
6984 });
6985 }
6986 }
6987 }, {
6988 key: "isScreenWide",
6989 value: function isScreenWide() {
6990 return window.innerWidth > 960;
6991 }
6992 }, {
6993 key: "render",
6994 value: function render(_, _ref) {
6995 var _this2 = this;
6996
6997 var screenIsWide = _ref.screenIsWide,
6998 drawerEnabled = _ref.drawerEnabled,
6999 drawerOpen = _ref.drawerOpen,
7000 activeHash = _ref.activeHash;
7001 return (0, _preact.h)(_appLayout.AppLayout, {
7002 version: _package.version,
7003 env: guessEnv(),
7004 doCloseDrawer: this.toggleDrawerOpen,
7005 doOpenDrawer: this.toggleDrawerOpen,
7006 screenIsWide: screenIsWide,
7007 drawerEnabled: drawerEnabled,
7008 drawerOpen: drawerOpen,
7009 mainContent: (0, _preact.h)(_crate.Page, {
7010 className: "ph3"
7011 }, Object.keys(sections).sort().map(function (section) {
7012 var Component = sections[section];
7013 return (0, _preact.h)("div", {
7014 id: section
7015 }, (0, _preact.h)(Component, {
7016 key: section
7017 }));
7018 })),
7019 statusBarContent: (0, _preact.h)("div", {
7020 className: "pa2 flex items-center"
7021 }, (0, _preact.h)(_button.TapIconButton, {
7022 icon: "menu",
7023 onClick: this.toggleDrawerOpen,
7024 className: "dn-l"
7025 }), (0, _preact.h)(_logo.LogoLightMark, {
7026 className: "dn-l ml2",
7027 style: {
7028 width: '30px'
7029 }
7030 }), (0, _preact.h)("h2", {
7031 className: "pv0 mv2 f4 ml2"
7032 }, "Pattern Library")),
7033 drawerContent: (0, _preact.h)("div", null, (0, _preact.h)(_drawer.DrawerLinkContainer, {
7034 title: "Components"
7035 }, Object.keys(sections).map(function (section) {
7036 return (0, _preact.h)(_drawer.DrawerLink, {
7037 icon: "polymer",
7038 href: "#".concat(section),
7039 onClick: _this2.toggleDrawerOpen,
7040 title: section,
7041 complete: activeHash === "#".concat(section)
7042 });
7043 })))
7044 });
7045 }
7046 }]);
7047
7048 return _default;
7049}(_preact.Component);
7050
7051exports.default = _default;
7052},{"preact":"../../node_modules/preact/dist/preact.module.js","./sections":"sections.js","../drawer":"../drawer.js","../crate":"../crate.js","../app-layout":"../app-layout.js","../../package.json":"../../package.json","../logo":"../logo.js","../button":"../button.js"}],"index.js":[function(require,module,exports) {
7053"use strict";
7054
7055var _preact = require("preact");
7056
7057var _layout = _interopRequireDefault(require("./layout"));
7058
7059var cookie = _interopRequireWildcard(require("../utils/token-writer"));
7060
7061function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
7062
7063function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
7064
7065function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7066
7067window.cookieHelper = cookie;
7068(0, _preact.render)((0, _preact.h)("div", {
7069 id: "app"
7070}, (0, _preact.h)(_layout.default, null)), document.body, document.getElementById('app')); // if (module.hot) {
7071// module.hot.dispose(() => {
7072// document.getElementById('app').innerHTML = ''
7073// })
7074// }
7075},{"preact":"../../node_modules/preact/dist/preact.module.js","./layout":"layout.js","../utils/token-writer":"../utils/token-writer.js"}],"../../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
7076var global = arguments[3];
7077var OVERLAY_ID = '__parcel__error__overlay__';
7078var OldModule = module.bundle.Module;
7079
7080function Module(moduleName) {
7081 OldModule.call(this, moduleName);
7082 this.hot = {
7083 data: module.bundle.hotData,
7084 _acceptCallbacks: [],
7085 _disposeCallbacks: [],
7086 accept: function (fn) {
7087 this._acceptCallbacks.push(fn || function () {});
7088 },
7089 dispose: function (fn) {
7090 this._disposeCallbacks.push(fn);
7091 }
7092 };
7093 module.bundle.hotData = null;
7094}
7095
7096module.bundle.Module = Module;
7097var checkedAssets, assetsToAccept;
7098var parent = module.bundle.parent;
7099
7100if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
7101 var hostname = "" || location.hostname;
7102 var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
7103 var ws = new WebSocket(protocol + '://' + hostname + ':' + "51286" + '/');
7104
7105 ws.onmessage = function (event) {
7106 checkedAssets = {};
7107 assetsToAccept = [];
7108 var data = JSON.parse(event.data);
7109
7110 if (data.type === 'update') {
7111 var handled = false;
7112 data.assets.forEach(function (asset) {
7113 if (!asset.isNew) {
7114 var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
7115
7116 if (didAccept) {
7117 handled = true;
7118 }
7119 }
7120 }); // Enable HMR for CSS by default.
7121
7122 handled = handled || data.assets.every(function (asset) {
7123 return asset.type === 'css' && asset.generated.js;
7124 });
7125
7126 if (handled) {
7127 console.clear();
7128 data.assets.forEach(function (asset) {
7129 hmrApply(global.parcelRequire, asset);
7130 });
7131 assetsToAccept.forEach(function (v) {
7132 hmrAcceptRun(v[0], v[1]);
7133 });
7134 } else if (location.reload) {
7135 // `location` global exists in a web worker context but lacks `.reload()` function.
7136 location.reload();
7137 }
7138 }
7139
7140 if (data.type === 'reload') {
7141 ws.close();
7142
7143 ws.onclose = function () {
7144 location.reload();
7145 };
7146 }
7147
7148 if (data.type === 'error-resolved') {
7149 console.log('[parcel] ✨ Error resolved');
7150 removeErrorOverlay();
7151 }
7152
7153 if (data.type === 'error') {
7154 console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
7155 removeErrorOverlay();
7156 var overlay = createErrorOverlay(data);
7157 document.body.appendChild(overlay);
7158 }
7159 };
7160}
7161
7162function removeErrorOverlay() {
7163 var overlay = document.getElementById(OVERLAY_ID);
7164
7165 if (overlay) {
7166 overlay.remove();
7167 }
7168}
7169
7170function createErrorOverlay(data) {
7171 var overlay = document.createElement('div');
7172 overlay.id = OVERLAY_ID; // html encode message and stack trace
7173
7174 var message = document.createElement('div');
7175 var stackTrace = document.createElement('pre');
7176 message.innerText = data.error.message;
7177 stackTrace.innerText = data.error.stack;
7178 overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
7179 return overlay;
7180}
7181
7182function getParents(bundle, id) {
7183 var modules = bundle.modules;
7184
7185 if (!modules) {
7186 return [];
7187 }
7188
7189 var parents = [];
7190 var k, d, dep;
7191
7192 for (k in modules) {
7193 for (d in modules[k][1]) {
7194 dep = modules[k][1][d];
7195
7196 if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
7197 parents.push(k);
7198 }
7199 }
7200 }
7201
7202 if (bundle.parent) {
7203 parents = parents.concat(getParents(bundle.parent, id));
7204 }
7205
7206 return parents;
7207}
7208
7209function hmrApply(bundle, asset) {
7210 var modules = bundle.modules;
7211
7212 if (!modules) {
7213 return;
7214 }
7215
7216 if (modules[asset.id] || !bundle.parent) {
7217 var fn = new Function('require', 'module', 'exports', asset.generated.js);
7218 asset.isNew = !modules[asset.id];
7219 modules[asset.id] = [fn, asset.deps];
7220 } else if (bundle.parent) {
7221 hmrApply(bundle.parent, asset);
7222 }
7223}
7224
7225function hmrAcceptCheck(bundle, id) {
7226 var modules = bundle.modules;
7227
7228 if (!modules) {
7229 return;
7230 }
7231
7232 if (!modules[id] && bundle.parent) {
7233 return hmrAcceptCheck(bundle.parent, id);
7234 }
7235
7236 if (checkedAssets[id]) {
7237 return;
7238 }
7239
7240 checkedAssets[id] = true;
7241 var cached = bundle.cache[id];
7242 assetsToAccept.push([bundle, id]);
7243
7244 if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
7245 return true;
7246 }
7247
7248 return getParents(global.parcelRequire, id).some(function (id) {
7249 return hmrAcceptCheck(global.parcelRequire, id);
7250 });
7251}
7252
7253function hmrAcceptRun(bundle, id) {
7254 var cached = bundle.cache[id];
7255 bundle.hotData = {};
7256
7257 if (cached) {
7258 cached.hot.data = bundle.hotData;
7259 }
7260
7261 if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
7262 cached.hot._disposeCallbacks.forEach(function (cb) {
7263 cb(bundle.hotData);
7264 });
7265 }
7266
7267 delete bundle.cache[id];
7268 bundle(id);
7269 cached = bundle.cache[id];
7270
7271 if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
7272 cached.hot._acceptCallbacks.forEach(function (cb) {
7273 cb();
7274 });
7275
7276 return true;
7277 }
7278}
7279},{}]},{},["../../node_modules/parcel/src/builtins/hmr-runtime.js","index.js"], null)
7280//# sourceMappingURL=/site.e31bb0bc.js.map
\No newline at end of file