-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.0.4.js
128 lines (126 loc) · 307 KB
/
1.0.4.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
var app=function(){"use strict";function e(){}const t=e=>e;function n(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function r(){return Object.create(null)}function s(e){e.forEach(i)}function o(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let l;function c(e,t){return l||(l=document.createElement("a")),l.href=t,e===l.href}function u(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function d(e){let t;return u(e,(e=>t=e))(),t}function h(e,t,n){e.$$.on_destroy.push(u(t,n))}function f(e,t,n,i){if(e){const r=p(e,t,n,i);return e[0](r)}}function p(e,t,i,r){return e[1]&&r?n(i.ctx.slice(),e[1](r(t))):i.ctx}function m(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|r[i];return e}return t.dirty|r}return t.dirty}function g(e,t,n,i,r,s){if(r){const o=p(t,n,i,s);e.p(o,r)}}function v(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function y(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}function _(e,t){const n={};t=new Set(t);for(const i in e)t.has(i)||"$"===i[0]||(n[i]=e[i]);return n}function $(e){let t=!1;return function(...n){t||(t=!0,e.call(this,...n))}}function w(e){return null==e?"":e}function b(e,t,n){return e.set(n),t}function x(t){return t&&o(t.destroy)?t.destroy:e}const E="undefined"!=typeof window;let C=E?()=>window.performance.now():()=>Date.now(),T=E?e=>requestAnimationFrame(e):e;const S=new Set;function k(e){S.forEach((t=>{t.c(e)||(S.delete(t),t.f())})),0!==S.size&&T(k)}function A(e,t){e.appendChild(t)}function O(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function L(e){const t=D("style");return function(e,t){A(e.head||e,t)}(O(e),t),t.sheet}function I(e,t,n){e.insertBefore(t,n||null)}function M(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function D(e){return document.createElement(e)}function P(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function R(e){return document.createTextNode(e)}function V(){return R(" ")}function U(){return R("")}function F(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Y(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)null==t[i]?e.removeAttribute(i):"style"===i?e.style.cssText=t[i]:"__value"===i?e.value=e[i]=t[i]:n[i]&&n[i].set?e[i]=t[i]:Y(e,i,t[i])}function j(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function z(e,t){e.value=null==t?"":t}function B(e,t,n,i){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function G(e,t,n){e.classList[n?"add":"remove"](t)}function W(e,t,n=!1){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}class q{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.e=D(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)I(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(M)}}const Z=new Map;let X,K=0;function Q(e,t,n,i,r,s,o,a=0){const l=16.666/i;let c="{\n";for(let e=0;e<=1;e+=l){const i=t+(n-t)*s(e);c+=100*e+`%{${o(i,1-i)}}\n`}const u=c+`100% {${o(n,1-n)}}\n}`,d=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(u)}_${a}`,h=O(e),{stylesheet:f,rules:p}=Z.get(h)||function(e,t){const n={stylesheet:L(t),rules:{}};return Z.set(e,n),n}(h,e);p[d]||(p[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${d} ${i}ms linear ${r}ms 1 both`,K+=1,d}function J(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=n.length-i.length;r&&(e.style.animation=i.join(", "),K-=r,K||T((()=>{K||(Z.forEach((e=>{const{stylesheet:t}=e;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.rules={}})),Z.clear())})))}function ee(e){X=e}function te(){if(!X)throw new Error("Function called outside component initialization");return X}function ne(e){te().$$.on_mount.push(e)}function ie(e){te().$$.on_destroy.push(e)}function re(){const e=te();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const r=W(t,n);i.slice().forEach((t=>{t.call(e,r)}))}}}function se(e,t){te().$$.context.set(e,t)}function oe(e){return te().$$.context.get(e)}function ae(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const le=[],ce=[],ue=[],de=[],he=Promise.resolve();let fe=!1;function pe(){fe||(fe=!0,he.then(we))}function me(){return pe(),he}function ge(e){ue.push(e)}function ve(e){de.push(e)}const ye=new Set;let _e,$e=0;function we(){const e=X;do{for(;$e<le.length;){const e=le[$e];$e++,ee(e),be(e.$$)}for(ee(null),le.length=0,$e=0;ce.length;)ce.pop()();for(let e=0;e<ue.length;e+=1){const t=ue[e];ye.has(t)||(ye.add(t),t())}ue.length=0}while(le.length);for(;de.length;)de.pop()();fe=!1,ye.clear(),ee(e)}function be(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ge)}}function xe(e,t,n){e.dispatchEvent(W(`${t?"intro":"outro"}${n}`))}const Ee=new Set;let Ce;function Te(){Ce={r:0,c:[],p:Ce}}function Se(){Ce.r||s(Ce.c),Ce=Ce.p}function ke(e,t){e&&e.i&&(Ee.delete(e),e.i(t))}function Ae(e,t,n,i){if(e&&e.o){if(Ee.has(e))return;Ee.add(e),Ce.c.push((()=>{Ee.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}const Oe={duration:0};function Le(n,i,r,a){let l=i(n,r),c=a?0:1,u=null,d=null,h=null;function f(){h&&J(n,h)}function p(e,t){const n=e.b-c;return t*=Math.abs(n),{a:c,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function m(i){const{delay:r=0,duration:o=300,easing:a=t,tick:m=e,css:g}=l||Oe,v={start:C()+r,b:i};i||(v.group=Ce,Ce.r+=1),u||d?d=v:(g&&(f(),h=Q(n,c,i,o,r,a,g)),i&&m(0,1),u=p(v,o),ge((()=>xe(n,i,"start"))),function(e){let t;0===S.size&&T(k),new Promise((n=>{S.add(t={c:e,f:n})}))}((e=>{if(d&&e>d.start&&(u=p(d,o),d=null,xe(n,u.b,"start"),g&&(f(),h=Q(n,c,u.b,u.duration,0,a,l.css))),u)if(e>=u.end)m(c=u.b,1-c),xe(n,u.b,"end"),d||(u.b?f():--u.group.r||s(u.group.c)),u=null;else if(e>=u.start){const t=e-u.start;c=u.a+u.d*a(t/u.duration),m(c,1-c)}return!(!u&&!d)})))}return{run(e){o(l)?(_e||(_e=Promise.resolve(),_e.then((()=>{_e=null}))),_e).then((()=>{l=l(),m(e)})):m(e)},end(){f(),u=d=null}}}const Ie="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Me(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[s];if(a){for(const e in o)e in a||(i[e]=1);for(const e in a)r[e]||(n[e]=a[e],r[e]=1);e[s]=a}else for(const e in o)r[e]=1}for(const e in i)e in n||(n[e]=void 0);return n}function Ne(e){return"object"==typeof e&&null!==e?e:{}}function De(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function Pe(e){e&&e.c()}function Re(e,t,n,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=e.$$;a&&a.m(t,n),r||ge((()=>{const t=l.map(i).filter(o);c?c.push(...t):s(t),e.$$.on_mount=[]})),u.forEach(ge)}function Ve(e,t){const n=e.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ue(t,n,i,o,a,l,c,u=[-1]){const d=X;ee(t);const h=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:r(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};c&&c(h.root);let f=!1;if(h.ctx=i?i(t,n.props||{},((e,n,...i)=>{const r=i.length?i[0]:n;return h.ctx&&a(h.ctx[e],h.ctx[e]=r)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](r),f&&function(e,t){-1===e.$$.dirty[0]&&(le.push(e),pe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(t,e)),n})):[],h.update(),f=!0,s(h.before_update),h.fragment=!!o&&o(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(M)}else h.fragment&&h.fragment.c();n.intro&&ke(t.$$.fragment),Re(t,n.target,n.anchor,n.customElement),we()}ee(d)}class Fe{$destroy(){Ve(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ye=[];function He(t,n=e){let i;const r=new Set;function s(e){if(a(t,e)&&(t=e,i)){const e=!Ye.length;for(const e of r)e[1](),Ye.push(e,t);if(e){for(let e=0;e<Ye.length;e+=2)Ye[e][0](Ye[e+1]);Ye.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return r.add(l),1===r.size&&(i=n(s)||e),o(t),()=>{r.delete(l),0===r.size&&(i(),i=null)}}}}function je(t,n,i){const r=!Array.isArray(t),a=r?[t]:t,l=n.length<2;return c=t=>{let i=!1;const c=[];let d=0,h=e;const f=()=>{if(d)return;h();const i=n(r?c[0]:c,t);l?t(i):h=o(i)?i:e},p=a.map(((e,t)=>u(e,(e=>{c[t]=e,d&=~(1<<t),i&&f()}),(()=>{d|=1<<t}))));return i=!0,f(),function(){s(p),h()}},{subscribe:He(i,c).subscribe};var c}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ze(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Be=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ge}(e)}(e)};var Ge="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function We(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Qe((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function qe(e,t,n){return e.concat(t).map((function(e){return We(e,n)}))}function Ze(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Xe(e,t){try{return t in e}catch(e){return!1}}function Ke(e,t,n){var i={};return n.isMergeableObject(e)&&Ze(e).forEach((function(t){i[t]=We(e[t],n)})),Ze(t).forEach((function(r){(function(e,t){return Xe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(Xe(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return Qe;var n=t.customMerge(e);return"function"==typeof n?n:Qe}(r,n)(e[r],t[r],n):i[r]=We(t[r],n))})),i}function Qe(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||qe,n.isMergeableObject=n.isMergeableObject||Be,n.cloneUnlessOtherwiseSpecified=We;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):Ke(e,t,n):We(t,n)}Qe.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Qe(e,n,t)}),{})};var Je=Qe,et=function(e,t){return et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},et(e,t)};function tt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var nt,it,rt,st=function(){return st=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},st.apply(this,arguments)};function ot(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function at(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function lt(e){return e.type===it.literal}function ct(e){return e.type===it.argument}function ut(e){return e.type===it.number}function dt(e){return e.type===it.date}function ht(e){return e.type===it.time}function ft(e){return e.type===it.select}function pt(e){return e.type===it.plural}function mt(e){return e.type===it.pound}function gt(e){return e.type===it.tag}function vt(e){return!(!e||"object"!=typeof e||e.type!==rt.number)}function yt(e){return!(!e||"object"!=typeof e||e.type!==rt.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(nt||(nt={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(it||(it={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(rt||(rt={}));var _t=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,$t=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function wt(e){var t={};return e.replace($t,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var bt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var xt,Et=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ct=/^(@+)?(\+|#+)?[rs]?$/g,Tt=/(\*)(0+)|(#+)(0+)|(0+)/g,St=/^(0+)$/;function kt(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Ct,(function(e,n,i){return"string"!=typeof i?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===i?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof i?i.length:0)),""})),t}function At(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ot(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!St.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Lt(e){var t=At(e);return t||{}}function It(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=st(st(st({},t),{notation:"scientific"}),r.options.reduce((function(e,t){return st(st({},e),Lt(t))}),{}));continue;case"engineering":t=st(st(st({},t),{notation:"engineering"}),r.options.reduce((function(e,t){return st(st({},e),Lt(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Tt,(function(e,n,i,r,s,o){if(n)t.minimumIntegerDigits=i.length;else{if(r&&s)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(St.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(Et.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Et,(function(e,n,i,r,s,o){return"*"===i?t.minimumFractionDigits=n.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:s&&o?(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var s=r.options[0];"w"===s?t=st(st({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=st(st({},t),kt(s)))}else if(Ct.test(r.stem))t=st(st({},t),kt(r.stem));else{var o=At(r.stem);o&&(t=st(st({},t),o));var a=Ot(r.stem);a&&(t=st(st({},t),a))}}return t}var Mt=new RegExp("^".concat(_t.source,"*")),Nt=new RegExp("".concat(_t.source,"*$"));function Dt(e,t){return{start:e,end:t}}var Pt=!!String.prototype.startsWith,Rt=!!String.fromCodePoint,Vt=!!Object.fromEntries,Ut=!!String.prototype.codePointAt,Ft=!!String.prototype.trimStart,Yt=!!String.prototype.trimEnd,Ht=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},jt=!0;try{jt="a"===(null===(xt=Kt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===xt?void 0:xt[0])}catch(e){jt=!1}var zt,Bt=Pt?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Gt=Rt?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,i="",r=e.length,s=0;r>s;){if((n=e[s++])>1114111)throw RangeError(n+" is not a valid code point");i+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return i},Wt=Vt?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],s=r[0],o=r[1];t[s]=o}return t},qt=Ut?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i,r=e.charCodeAt(t);return r<55296||r>56319||t+1===n||(i=e.charCodeAt(t+1))<56320||i>57343?r:i-56320+(r-55296<<10)+65536}},Zt=Ft?function(e){return e.trimStart()}:function(e){return e.replace(Mt,"")},Xt=Yt?function(e){return e.trimEnd()}:function(e){return e.replace(Nt,"")};function Kt(e,t){return new RegExp(e,t)}if(jt){var Qt=Kt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");zt=function(e,t){var n;return Qt.lastIndex=t,null!==(n=Qt.exec(e)[1])&&void 0!==n?n:""}}else zt=function(e,t){for(var n=[];;){var i=qt(e,t);if(void 0===i||nn(i)||rn(i))break;n.push(i),t+=i>=65536?2:1}return Gt.apply(void 0,n)};var Jt=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var i=[];!this.isEOF();){var r=this.char();if(123===r){if((s=this.parseArgument(e,n)).err)return s;i.push(s.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(nt.UNMATCHED_CLOSING_TAG,Dt(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&en(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;i.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;i.push(s.val)}}else{var o=this.clonePosition();this.bump(),i.push({type:it.pound,location:Dt(o,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:it.literal,value:"<".concat(i,"/>"),location:Dt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var s=r.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!en(this.char()))return this.error(nt.INVALID_TAG,Dt(o,this.clonePosition()));var a=this.clonePosition();return i!==this.parseTagName()?this.error(nt.UNMATCHED_CLOSING_TAG,Dt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:it.tag,value:i,children:s,location:Dt(n,this.clonePosition())},err:null}:this.error(nt.INVALID_TAG,Dt(o,this.clonePosition())))}return this.error(nt.UNCLOSED_TAG,Dt(n,this.clonePosition()))}return this.error(nt.INVALID_TAG,Dt(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&tn(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),i="";;){var r=this.tryParseQuote(t);if(r)i+=r;else{var s=this.tryParseUnquoted(e,t);if(s)i+=s;else{var o=this.tryParseLeftAngleBracket();if(!o)break;i+=o}}}var a=Dt(n,this.clonePosition());return{val:{type:it.literal,value:i,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(en(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Gt.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Gt(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(nt.EXPECT_ARGUMENT_CLOSING_BRACE,Dt(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(nt.EMPTY_ARGUMENT,Dt(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(nt.MALFORMED_ARGUMENT,Dt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(nt.EXPECT_ARGUMENT_CLOSING_BRACE,Dt(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:it.argument,value:i,location:Dt(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(nt.EXPECT_ARGUMENT_CLOSING_BRACE,Dt(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(nt.MALFORMED_ARGUMENT,Dt(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=zt(this.message,t),i=t+n.length;return this.bumpTo(i),{value:n,location:Dt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var r,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(nt.EXPECT_ARGUMENT_TYPE,Dt(s,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(h=Xt(g.val)).length)return this.error(nt.EXPECT_ARGUMENT_STYLE,Dt(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Dt(c,this.clonePosition())}}if((v=this.tryParseArgumentClose(i)).err)return v;var u=Dt(i,this.clonePosition());if(l&&Bt(null==l?void 0:l.style,"::",0)){var d=Zt(l.style.slice(2));if("number"===o)return(g=this.parseNumberSkeletonFromString(d,l.styleLocation)).err?g:{val:{type:it.number,value:n,location:u,style:g.val},err:null};if(0===d.length)return this.error(nt.EXPECT_DATE_TIME_SKELETON,u);var h={type:rt.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?wt(d):{}};return{val:{type:"date"===o?it.date:it.time,value:n,location:u,style:h},err:null}}return{val:{type:"number"===o?it.number:"date"===o?it.date:it.time,value:n,location:u,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(nt.EXPECT_SELECT_ARGUMENT_OPTIONS,Dt(f,st({},f)));this.bumpSpace();var p=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===p.value){if(!this.bumpIf(":"))return this.error(nt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Dt(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(nt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,nt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return g;this.bumpSpace(),p=this.parseIdentifierIfPossible(),m=g.val}var v,y=this.tryParsePluralOrSelectOptions(e,o,t,p);if(y.err)return y;if((v=this.tryParseArgumentClose(i)).err)return v;var _=Dt(i,this.clonePosition());return"select"===o?{val:{type:it.select,value:n,options:Wt(y.val),location:_},err:null}:{val:{type:it.plural,value:n,options:Wt(y.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:_},err:null};default:return this.error(nt.INVALID_ARGUMENT_TYPE,Dt(s,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(nt.EXPECT_ARGUMENT_CLOSING_BRACE,Dt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(nt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Dt(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=e.split(bt).filter((function(e){return e.length>0})),n=[],i=0,r=t;i<r.length;i++){var s=r[i].split("/");if(0===s.length)throw new Error("Invalid number skeleton");for(var o=s[0],a=s.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");n.push({stem:o,options:a})}return n}(e)}catch(e){return this.error(nt.INVALID_NUMBER_SKELETON,t)}return{val:{type:rt.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?It(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var r,s=!1,o=[],a=new Set,l=i.value,c=i.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(nt.EXPECT_PLURAL_ARGUMENT_SELECTOR,nt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=Dt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(a.has(l))return this.error("select"===t?nt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:nt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?nt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:nt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Dt(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var p=this.tryParseArgumentClose(h);if(p.err)return p;o.push([l,{value:f.val,location:Dt(h,this.clonePosition())}]),a.add(l),this.bumpSpace(),l=(r=this.parseIdentifierIfPossible()).value,c=r.location}return 0===o.length?this.error("select"===t?nt.EXPECT_SELECT_ARGUMENT_SELECTOR:nt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Dt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(nt.MISSING_OTHER_CLAUSE,Dt(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var r=!1,s=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;r=!0,s=10*s+(o-48),this.bump()}var a=Dt(i,this.clonePosition());return r?Ht(s*=n)?{val:s,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=qt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Bt(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&nn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function en(e){return e>=97&&e<=122||e>=65&&e<=90}function tn(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function nn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function rn(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function sn(e){e.forEach((function(e){if(delete e.location,ft(e)||pt(e))for(var t in e.options)delete e.options[t].location,sn(e.options[t].value);else ut(e)&&vt(e.style)||(dt(e)||ht(e))&&yt(e.style)?delete e.style.location:gt(e)&&sn(e.children)}))}function on(e,t){void 0===t&&(t={}),t=st({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Jt(e,t).parse();if(n.err){var i=SyntaxError(nt[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||sn(n.val),n.val}function an(e,t){var n=t&&t.cache?t.cache:mn,i=t&&t.serializer?t.serializer:hn;return(t&&t.strategy?t.strategy:dn)(e,{cache:n,serializer:i})}function ln(e,t,n,i){var r,s=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:n(i),o=t.get(s);return void 0===o&&(o=e.call(this,i),t.set(s,o)),o}function cn(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return void 0===s&&(s=e.apply(this,i),t.set(r,s)),s}function un(e,t,n,i,r){return n.bind(t,e,i,r)}function dn(e,t){return un(e,this,1===e.length?ln:cn,t.cache.create(),t.serializer)}var hn=function(){return JSON.stringify(arguments)};function fn(){this.cache=Object.create(null)}fn.prototype.get=function(e){return this.cache[e]},fn.prototype.set=function(e,t){this.cache[e]=t};var pn,mn={create:function(){return new fn}},gn={variadic:function(e,t){return un(e,this,cn,t.cache.create(),t.serializer)},monadic:function(e,t){return un(e,this,ln,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(pn||(pn={}));var vn,yn=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=i,r}return tt(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),_n=function(e){function t(t,n,i,r){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),pn.INVALID_VALUE,r)||this}return tt(t,e),t}(yn),$n=function(e){function t(t,n,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),pn.INVALID_VALUE,i)||this}return tt(t,e),t}(yn),wn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),pn.MISSING_VALUE,n)||this}return tt(t,e),t}(yn);function bn(e){return"function"==typeof e}function xn(e,t,n,i,r,s,o){if(1===e.length&<(e[0]))return[{type:vn.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(lt(u))a.push({type:vn.literal,value:u.value});else if(mt(u))"number"==typeof s&&a.push({type:vn.literal,value:n.getNumberFormat(t).format(s)});else{var d=u.value;if(!r||!(d in r))throw new wn(d,o);var h=r[d];if(ct(u))h&&"string"!=typeof h&&"number"!=typeof h||(h="string"==typeof h||"number"==typeof h?String(h):""),a.push({type:"string"==typeof h?vn.literal:vn.object,value:h});else if(dt(u)){var f="string"==typeof u.style?i.date[u.style]:yt(u.style)?u.style.parsedOptions:void 0;a.push({type:vn.literal,value:n.getDateTimeFormat(t,f).format(h)})}else if(ht(u)){f="string"==typeof u.style?i.time[u.style]:yt(u.style)?u.style.parsedOptions:i.time.medium;a.push({type:vn.literal,value:n.getDateTimeFormat(t,f).format(h)})}else if(ut(u)){(f="string"==typeof u.style?i.number[u.style]:vt(u.style)?u.style.parsedOptions:void 0)&&f.scale&&(h*=f.scale||1),a.push({type:vn.literal,value:n.getNumberFormat(t,f).format(h)})}else{if(gt(u)){var p=u.children,m=u.value,g=r[m];if(!bn(g))throw new $n(m,"function",o);var v=g(xn(p,t,n,i,r,s).map((function(e){return e.value})));Array.isArray(v)||(v=[v]),a.push.apply(a,v.map((function(e){return{type:"string"==typeof e?vn.literal:vn.object,value:e}})))}if(ft(u)){if(!(y=u.options[h]||u.options.other))throw new _n(u.value,h,Object.keys(u.options),o);a.push.apply(a,xn(y.value,t,n,i,r))}else if(pt(u)){var y;if(!(y=u.options["=".concat(h)])){if(!Intl.PluralRules)throw new yn('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',pn.MISSING_INTL_API,o);var _=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));y=u.options[_]||u.options.other}if(!y)throw new _n(u.value,h,Object.keys(u.options),o);a.push.apply(a,xn(y.value,t,n,i,r,h-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===vn.literal&&t.type===vn.literal?n.value+=t.value:e.push(t),e}),[])}(a)}function En(e,t){return t?Object.keys(e).reduce((function(n,i){var r,s;return n[i]=(r=e[i],(s=t[i])?st(st(st({},r||{}),s||{}),Object.keys(r).reduce((function(e,t){return e[t]=st(st({},r[t]),s[t]||{}),e}),{})):r),n}),st({},e)):e}function Cn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(vn||(vn={}));var Tn=function(){function e(t,n,i,r){var s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===vn.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return xn(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==r?void 0:r.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=En(e.formats,i),this.locales=n,this.formatters=r&&r.formatters||function(e){return void 0===e&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:an((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,at([void 0],t,!1)))}),{cache:Cn(e.number),strategy:gn.variadic}),getDateTimeFormat:an((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,at([void 0],t,!1)))}),{cache:Cn(e.dateTime),strategy:gn.variadic}),getPluralRules:an((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,at([void 0],t,!1)))}),{cache:Cn(e.pluralRules),strategy:gn.variadic})}}(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.__parse=on,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Sn=Tn;const kn={},An=(e,t,n)=>n?(t in kn||(kn[t]={}),e in kn[t]||(kn[t][e]=n),n):n,On=(e,t)=>{if(null==t)return;if(t in kn&&e in kn[t])return kn[t][e];const n=qn(t);for(let i=0;i<n.length;i++){const r=Nn(n[i],e);if(r)return An(e,t,r)}};let Ln;const In=He({});function Mn(e){return e in Ln}function Nn(e,t){if(!Mn(e))return null;const n=function(e){return Ln[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let i=e;for(let e=0;e<n.length;e++)if("object"==typeof i){if(e>0){const t=n.slice(e,n.length).join(".");if(t in i){i=i[t];break}}i=i[n[e]]}else i=void 0;return i}(n,t)}je([In],(([e])=>Object.keys(e))),In.subscribe((e=>Ln=e));const Dn={};function Pn(e){return Dn[e]}function Rn(e){return null!=e&&qn(e).some((e=>{var t;return null===(t=Pn(e))||void 0===t?void 0:t.size}))}function Vn(e,t){const n=Promise.all(t.map((t=>(function(e,t){Dn[e].delete(t),0===Dn[e].size&&delete Dn[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>function(e,...t){delete kn[e],In.update((n=>(n[e]=Je.all([n[e]||{},...t]),n)))}(e,...t)))}const Un={};function Fn(e){if(!Rn(e))return e in Un?Un[e]:Promise.resolve();const t=function(e){return qn(e).map((e=>{const t=Pn(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Un[e]=Promise.all(t.map((([e,t])=>Vn(e,t)))).then((()=>{if(Rn(e))return Fn(e);delete Un[e]})),Un[e]}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Yn(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}const Hn={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function jn(){return Hn}const zn=He(!1);let Bn;const Gn=He(null);function Wn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function qn(e,t=jn().fallbackLocale){const n=Wn(e);return t?[...new Set([...n,...Wn(t)])]:n}function Zn(){return null!=Bn?Bn:void 0}Gn.subscribe((e=>{Bn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Xn=Object.assign(Object.assign({},Gn),{set:e=>{if(e&&function(e){if(null==e)return;const t=qn(e);for(let e=0;e<t.length;e++){const n=t[e];if(Mn(n))return n}}(e)&&Rn(e)){const{loadingDelay:t}=jn();let n;return"undefined"!=typeof window&&null!=Zn()&&t?n=window.setTimeout((()=>zn.set(!0)),t):zn.set(!0),Fn(e).then((()=>{Gn.set(e)})).finally((()=>{clearTimeout(n),zn.set(!1)}))}return Gn.set(e)}}),Kn=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},Qn=(e,t)=>{const{formats:n}=jn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Jn=Kn((e=>{var{locale:t,format:n}=e,i=Yn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Qn("number",n)),new Intl.NumberFormat(t,i)})),ei=Kn((e=>{var{locale:t,format:n}=e,i=Yn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Qn("date",n):0===Object.keys(i).length&&(i=Qn("date","short")),new Intl.DateTimeFormat(t,i)})),ti=Kn((e=>{var{locale:t,format:n}=e,i=Yn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Qn("time",n):0===Object.keys(i).length&&(i=Qn("time","short")),new Intl.DateTimeFormat(t,i)})),ni=Kn(((e,t=Zn())=>new Sn(e,t,jn().formats,{ignoreTag:jn().ignoreTag}))),ii=(e,t={})=>{var n,i,r,s;let o=t;"object"==typeof e&&(o=e,e=o.id);const{values:a,locale:l=Zn(),default:c}=o;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=On(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(s=null!==(r=null===(i=(n=jn()).handleMissingMessage)||void 0===i?void 0:i.call(n,{locale:l,id:e,defaultValue:c}))&&void 0!==r?r:c)&&void 0!==s?s:e;if(!a)return u;let d=u;try{d=ni(u,l).format(a)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return d},ri=(e,t)=>((e={})=>{var{locale:t=Zn()}=e,n=Yn(e,["locale"]);return ti(Object.assign({locale:t},n))})(t).format(e),si=(e,t)=>((e={})=>{var{locale:t=Zn()}=e,n=Yn(e,["locale"]);return ei(Object.assign({locale:t},n))})(t).format(e),oi=(e,t)=>((e={})=>{var{locale:t=Zn()}=e,n=Yn(e,["locale"]);return Jn(Object.assign({locale:t},n))})(t).format(e),ai=(e,t=Zn())=>On(e,t),li=je([Xn,In],(()=>ii));je([Xn],(()=>ri)),je([Xn],(()=>si)),je([Xn],(()=>oi)),je([Xn,In],(()=>ai));class ci extends Fe{constructor(e){super(),Ue(this,e,null,null,a,{})}}var ui,di={exports:{}};(ui=di).exports=function(){var e,t;function n(){return e.apply(null,arguments)}function i(t){e=t}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function a(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function l(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,i=[],r=e.length;for(n=0;n<r;++n)i.push(t(e[n],n));return i}function h(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,i){return qn(e,t,n,i,!0).utc()}function p(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(e){return null==e._pf&&(e._pf=p()),e._pf}function g(e){if(null==e._isValid){var n=m(e),i=t.call(n.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&i);if(e._strict&&(r=r&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function v(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var y=n.momentProperties=[],_=!1;function $(e,t){var n,i,r,s=y.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)l(r=t[i=y[n]])||(e[i]=r);return e}function w(e){$(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===_&&(_=!0,n.updateOffset(this),_=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var i=!0;return h((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),i){var r,s,a,l=[],c=arguments.length;for(s=0;s<c;s++){if(r="","object"==typeof arguments[s]){for(a in r+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];l.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var C,T={};function S(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),T[e]||(x(t),T[e]=!0)}function k(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e){var t,n;for(n in e)o(e,n)&&(k(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var n,i=h({},e);for(n in t)o(t,n)&&(s(e[n])&&s(t[n])?(i[n]={},h(i[n],e[n]),h(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)o(e,n)&&!o(t,n)&&s(e[n])&&(i[n]=h({},i[n]));return i}function L(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var I={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return k(i)?i.call(t,n):i}function N(e,t,n){var i=""+Math.abs(e),r=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},V={};function U(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(V[e]=r),t&&(V[t[0]]=function(){return N(r.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,n,i=e.match(D);for(t=0,n=i.length;t<n;t++)V[i[t]]?i[t]=V[i[t]]:i[t]=F(i[t]);return function(t){var r,s="";for(r=0;r<n;r++)s+=k(i[r])?i[r].call(t,e):i[r];return s}}function H(e,t){return e.isValid()?(t=j(t,e.localeData()),R[t]=R[t]||Y(t),R[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;n>=0&&P.test(e);)e=e.replace(P,i),P.lastIndex=0,n-=1;return e}var z={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function B(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(D).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function W(){return this._invalidDate}var q="%d",Z=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var K={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,n,i){var r=this._relativeTime[n];return k(r)?r(e,t,n,i):r.replace(/%d/i,e)}function J(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}var ee={};function te(e,t){var n=e.toLowerCase();ee[n]=ee[n+"s"]=ee[t]=e}function ne(e){return"string"==typeof e?ee[e]||ee[e.toLowerCase()]:void 0}function ie(e){var t,n,i={};for(n in e)o(e,n)&&(t=ne(n))&&(i[t]=e[n]);return i}var re={};function se(e,t){re[e]=t}function oe(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:re[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ae(e){return e%4==0&&e%100!=0||e%400==0}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=le(t)),n}function ue(e,t){return function(i){return null!=i?(he(this,e,i),n.updateOffset(this,t),this):de(this,e)}}function de(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ae(e.year())&&1===e.month()&&29===e.date()?(n=ce(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Je(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function fe(e){return k(this[e=ne(e)])?this[e]():this}function pe(e,t){if("object"==typeof e){var n,i=oe(e=ie(e)),r=i.length;for(n=0;n<r;n++)this[i[n].unit](e[i[n].unit])}else if(k(this[e=ne(e)]))return this[e](t);return this}var me,ge=/\d/,ve=/\d\d/,ye=/\d{3}/,_e=/\d{4}/,$e=/[+-]?\d{6}/,we=/\d\d?/,be=/\d\d\d\d?/,xe=/\d\d\d\d\d\d?/,Ee=/\d{1,3}/,Ce=/\d{1,4}/,Te=/[+-]?\d{1,6}/,Se=/\d+/,ke=/[+-]?\d+/,Ae=/Z|[+-]\d\d:?\d\d/gi,Oe=/Z|[+-]\d\d(?::?\d\d)?/gi,Le=/[+-]?\d+(\.\d{1,3})?/,Ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Me(e,t,n){me[e]=k(t)?t:function(e,i){return e&&n?n:t}}function Ne(e,t){return o(me,e)?me[e](t._strict,t._locale):new RegExp(De(e))}function De(e){return Pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r})))}function Pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}me={};var Re={};function Ve(e,t){var n,i,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=ce(e)}),i=e.length,n=0;n<i;n++)Re[e[n]]=r}function Ue(e,t){Ve(e,(function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)}))}function Fe(e,t,n){null!=t&&o(Re,e)&&Re[e](t,n._a,n,e)}var Ye,He=0,je=1,Be=2,Ge=3,We=4,qe=5,Ze=6,Xe=7,Ke=8;function Qe(e,t){return(e%t+t)%t}function Je(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Qe(t,12);return e+=(t-n)/12,1===n?ae(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),te("month","M"),se("month",8),Me("M",we),Me("MM",we,ve),Me("MMM",(function(e,t){return t.monthsShortRegex(e)})),Me("MMMM",(function(e,t){return t.monthsRegex(e)})),Ve(["M","MM"],(function(e,t){t[je]=ce(e)-1})),Ve(["MMM","MMMM"],(function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[je]=r:m(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Ie,rt=Ie;function st(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone}function ot(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function at(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=Ye.call(this._shortMonthsParse,o))?r:null:-1!==(r=Ye.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=Ye.call(this._shortMonthsParse,o))||-1!==(r=Ye.call(this._longMonthsParse,o))?r:null:-1!==(r=Ye.call(this._longMonthsParse,o))||-1!==(r=Ye.call(this._shortMonthsParse,o))?r:null}function lt(e,t,n){var i,r,s;if(this._monthsParseExact)return at.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=f([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ce(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Je(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(ct(this,e),n.updateOffset(this,!0),this):de(this,"Month")}function dt(){return Je(this.year(),this.month())}function ht(e){return this._monthsParseExact?(o(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(o(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=rt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],s=[];for(t=0;t<12;t++)n=f([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)i[t]=Pe(i[t]),r[t]=Pe(r[t]);for(t=0;t<24;t++)s[t]=Pe(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function mt(e){return ae(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),te("year","y"),se("year",1),Me("Y",ke),Me("YY",we,ve),Me("YYYY",Ce,_e),Me("YYYYY",Te,$e),Me("YYYYYY",Te,$e),Ve(["YYYYY","YYYYYY"],He),Ve("YYYY",(function(e,t){t[He]=2===e.length?n.parseTwoDigitYear(e):ce(e)})),Ve("YY",(function(e,t){t[He]=n.parseTwoDigitYear(e)})),Ve("Y",(function(e,t){t[He]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return ce(e)+(ce(e)>68?1900:2e3)};var gt=ue("FullYear",!0);function vt(){return ae(this.year())}function yt(e,t,n,i,r,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,i,r,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,s,o),a}function _t(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function $t(e,t,n){var i=7+t-n;return-(7+_t(e,0,i).getUTCDay()-t)%7+i-1}function wt(e,t,n,i,r){var s,o,a=1+7*(t-1)+(7+n-i)%7+$t(e,i,r);return a<=0?o=mt(s=e-1)+a:a>mt(e)?(s=e+1,o=a-mt(e)):(s=e,o=a),{year:s,dayOfYear:o}}function bt(e,t,n){var i,r,s=$t(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?i=o+xt(r=e.year()-1,t,n):o>xt(e.year(),t,n)?(i=o-xt(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function xt(e,t,n){var i=$t(e,t,n),r=$t(e+1,t,n);return(mt(e)-i+r)/7}function Et(e){return bt(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),te("week","w"),te("isoWeek","W"),se("week",5),se("isoWeek",5),Me("w",we),Me("ww",we,ve),Me("W",we),Me("WW",we,ve),Ue(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=ce(e)}));var Ct={dow:0,doy:6};function Tt(){return this._week.dow}function St(){return this._week.doy}function kt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=bt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Lt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function It(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),te("day","d"),te("weekday","e"),te("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Me("d",we),Me("e",we),Me("E",we),Me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Me("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ue(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e})),Ue(["d","e","E"],(function(e,t,n,i){t[i]=ce(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Nt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Dt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Pt=Ie,Rt=Ie,Vt=Ie;function Ut(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?It(n,this._week.dow):e?n[e.day()]:n}function Ft(e){return!0===e?It(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Yt(e){return!0===e?It(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=Ye.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ye.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=Ye.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=Ye.call(this._weekdaysParse,o))||-1!==(r=Ye.call(this._shortWeekdaysParse,o))||-1!==(r=Ye.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ye.call(this._shortWeekdaysParse,o))||-1!==(r=Ye.call(this._weekdaysParse,o))||-1!==(r=Ye.call(this._minWeekdaysParse,o))?r:null:-1!==(r=Ye.call(this._minWeekdaysParse,o))||-1!==(r=Ye.call(this._weekdaysParse,o))||-1!==(r=Ye.call(this._shortWeekdaysParse,o))?r:null}function jt(e,t,n){var i,r,s;if(this._weekdaysParseExact)return Ht.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function zt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function Bt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Lt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Pt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Rt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Zt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xt(){function e(e,t){return t.length-e.length}var t,n,i,r,s,o=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),i=Pe(this.weekdaysMin(n,"")),r=Pe(this.weekdaysShort(n,"")),s=Pe(this.weekdays(n,"")),o.push(i),a.push(r),l.push(s),c.push(i),c.push(r),c.push(s);o.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function Jt(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Kt),U("k",["kk",2],0,Qt),U("hmm",0,0,(function(){return""+Kt.apply(this)+N(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Kt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Jt("a",!0),Jt("A",!1),te("hour","h"),se("hour",13),Me("a",en),Me("A",en),Me("H",we),Me("h",we),Me("k",we),Me("HH",we,ve),Me("hh",we,ve),Me("kk",we,ve),Me("hmm",be),Me("hmmss",xe),Me("Hmm",be),Me("Hmmss",xe),Ve(["H","HH"],Ge),Ve(["k","kk"],(function(e,t,n){var i=ce(e);t[Ge]=24===i?0:i})),Ve(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ve(["h","hh"],(function(e,t,n){t[Ge]=ce(e),m(n).bigHour=!0})),Ve("hmm",(function(e,t,n){var i=e.length-2;t[Ge]=ce(e.substr(0,i)),t[We]=ce(e.substr(i)),m(n).bigHour=!0})),Ve("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[Ge]=ce(e.substr(0,i)),t[We]=ce(e.substr(i,2)),t[qe]=ce(e.substr(r)),m(n).bigHour=!0})),Ve("Hmm",(function(e,t,n){var i=e.length-2;t[Ge]=ce(e.substr(0,i)),t[We]=ce(e.substr(i))})),Ve("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[Ge]=ce(e.substr(0,i)),t[We]=ce(e.substr(i,2)),t[qe]=ce(e.substr(r))}));var nn=/[ap]\.?m?\.?/i,rn=ue("Hours",!0);function sn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var on,an={calendar:I,longDateFormat:z,invalidDate:G,ordinal:q,dayOfMonthOrdinalParse:Z,relativeTime:K,months:et,monthsShort:tt,week:Ct,weekdays:Mt,weekdaysMin:Dt,weekdaysShort:Nt,meridiemParse:nn},ln={},cn={};function un(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function hn(e){for(var t,n,i,r,s=0;s<e.length;){for(t=(r=dn(e[s]).split("-")).length,n=(n=dn(e[s+1]))?n.split("-"):null;t>0;){if(i=pn(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&un(r,n)>=t-1)break;t--}s++}return on}function fn(e){return null!=e.match("^[^/\\\\]*$")}function pn(e){var t=null;if(void 0===ln[e]&&ui&&ui.exports&&fn(e))try{t=on._abbr,ze("./locale/"+e),mn(t)}catch(t){ln[e]=null}return ln[e]}function mn(e,t){var n;return e&&((n=l(t)?yn(e):gn(e,t))?on=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),on._abbr}function gn(e,t){if(null!==t){var n,i=an;if(t.abbr=e,null!=ln[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])i=ln[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;i=n._config}return ln[e]=new L(O(i,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,i,r=an;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(O(ln[e]._config,t)):(null!=(i=pn(e))&&(r=i._config),t=O(r,t),null==i&&(t.abbr=e),(n=new L(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return on;if(!r(e)){if(t=pn(e))return t;e=[e]}return hn(e)}function _n(){return C(ln)}function $n(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[je]<0||n[je]>11?je:n[Be]<1||n[Be]>Je(n[He],n[je])?Be:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[We]||0!==n[qe]||0!==n[Ze])?Ge:n[We]<0||n[We]>59?We:n[qe]<0||n[qe]>59?qe:n[Ze]<0||n[Ze]>999?Ze:-1,m(e)._overflowDayOfYear&&(t<He||t>Be)&&(t=Be),m(e)._overflowWeeks&&-1===t&&(t=Xe),m(e)._overflowWeekday&&-1===t&&(t=Ke),m(e).overflow=t),e}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xn=/Z|[+-]\d\d(?::?\d\d)?/,En=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Cn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tn=/^\/?Date\((-?\d+)/i,Sn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function An(e){var t,n,i,r,s,o,a=e._i,l=wn.exec(a)||bn.exec(a),c=En.length,u=Cn.length;if(l){for(m(e).iso=!0,t=0,n=c;t<n;t++)if(En[t][1].exec(l[1])){r=En[t][0],i=!1!==En[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Cn[t][1].exec(l[3])){s=(l[2]||" ")+Cn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!i&&null!=s)return void(e._isValid=!1);if(l[4]){if(!xn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=r+(s||"")+(o||""),Yn(e)}else e._isValid=!1}function On(e,t,n,i,r,s){var o=[Ln(e),tt.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return s&&o.push(parseInt(s,10)),o}function Ln(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function In(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Mn(e,t,n){return!e||Nt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Nn(e,t,n){if(e)return kn[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}function Dn(e){var t,n=Sn.exec(In(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!Mn(n[1],t,e))return;e._a=t,e._tzm=Nn(n[8],n[9],n[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Pn(e){var t=Tn.exec(e._i);null===t?(An(e),!1===e._isValid&&(delete e._isValid,Dn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Rn(e,t,n){return null!=e?e:null!=t?t:n}function Vn(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Un(e){var t,n,i,r,s,o=[];if(!e._d){for(i=Vn(e),e._w&&null==e._a[Be]&&null==e._a[je]&&Fn(e),null!=e._dayOfYear&&(s=Rn(e._a[He],i[He]),(e._dayOfYear>mt(s)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=_t(s,0,e._dayOfYear),e._a[je]=n.getUTCMonth(),e._a[Be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[We]&&0===e._a[qe]&&0===e._a[Ze]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?_t:yt).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Fn(e){var t,n,i,r,s,o,a,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,o=4,n=Rn(t.GG,e._a[He],bt(Zn(),1,4).year),i=Rn(t.W,1),((r=Rn(t.E,1))<1||r>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,c=bt(Zn(),s,o),n=Rn(t.gg,e._a[He],c.year),i=Rn(t.w,c.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(l=!0)):r=s),i<1||i>xt(n,s,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(a=wt(n,i,r,s,o),e._a[He]=a.year,e._dayOfYear=a.dayOfYear)}function Yn(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],m(e).empty=!0;var t,i,r,s,o,a,l,c=""+e._i,u=c.length,d=0;for(l=(r=j(e._f,e._locale).match(D)||[]).length,t=0;t<l;t++)s=r[t],(i=(c.match(Ne(s,e))||[])[0])&&((o=c.substr(0,c.indexOf(i))).length>0&&m(e).unusedInput.push(o),c=c.slice(c.indexOf(i)+i.length),d+=i.length),V[s]?(i?m(e).empty=!1:m(e).unusedTokens.push(s),Fe(s,i,e)):e._strict&&!i&&m(e).unusedTokens.push(s);m(e).charsLeftOver=u-d,c.length>0&&m(e).unusedInput.push(c),e._a[Ge]<=12&&!0===m(e).bigHour&&e._a[Ge]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Ge]=Hn(e._locale,e._a[Ge],e._meridiem),null!==(a=m(e).era)&&(e._a[He]=e._locale.erasConvertYear(a,e._a[He])),Un(e),$n(e)}else Dn(e);else An(e)}function Hn(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function jn(e){var t,n,i,r,s,o,a=!1,l=e._f.length;if(0===l)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<l;r++)s=0,o=!1,t=$({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Yn(t),g(t)&&(o=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,a?s<i&&(i=s,n=t):(null==i||s<i||o)&&(i=s,n=t,o&&(a=!0));h(e,n||t)}function zn(e){if(!e._d){var t=ie(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Un(e)}}function Bn(e){var t=new w($n(Gn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Gn(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w($n(t)):(u(t)?e._d=t:r(n)?jn(e):n?Yn(e):Wn(e),g(e)||(e._d=null),e))}function Wn(e){var t=e._i;l(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Pn(e):r(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Un(e)):s(t)?zn(e):c(t)?e._d=new Date(t):n.createFromInputFallback(e)}function qn(e,t,n,i,o){var l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(s(e)&&a(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=i,Bn(l)}function Zn(e,t,n,i){return qn(e,t,n,i,!1)}n.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Xn=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Kn=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function Qn(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Zn();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function Jn(){return Qn("isBefore",[].slice.call(arguments,0))}function ei(){return Qn("isAfter",[].slice.call(arguments,0))}var ti=function(){return Date.now?Date.now():+new Date},ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ii(e){var t,n,i=!1,r=ni.length;for(t in e)if(o(e,t)&&(-1===Ye.call(ni,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<r;++n)if(e[ni[n]]){if(i)return!1;parseFloat(e[ni[n]])!==ce(e[ni[n]])&&(i=!0)}return!0}function ri(){return this._isValid}function si(){return Ai(NaN)}function oi(e){var t=ie(e),n=t.year||0,i=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=ii(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+o+7*s,this._months=+r+3*i+12*n,this._data={},this._locale=yn(),this._bubble()}function ai(e){return e instanceof oi}function li(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ci(e,t,n){var i,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&ce(e[i])!==ce(t[i]))&&o++;return o+s}function di(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)}))}di("Z",":"),di("ZZ",""),Me("Z",Oe),Me("ZZ",Oe),Ve(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fi(Oe,e)}));var hi=/([\+\-]|\d\d)/gi;function fi(e,t){var n,i,r=(t||"").match(e);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(hi)||["-",0,0])[1]+ce(n[2]))?0:"+"===n[0]?i:-i}function pi(e,t){var i,r;return t._isUTC?(i=t.clone(),r=(b(e)||u(e)?e.valueOf():Zn(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+r),n.updateOffset(i,!1),i):Zn(e).local()}function mi(e){return-Math.round(e._d.getTimezoneOffset())}function gi(e,t,i){var r,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fi(Oe,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(r=mi(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),s!==e&&(!t||this._changeInProgress?Ni(this,Ai(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:mi(this)}function vi(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yi(e){return this.utcOffset(0,e)}function _i(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mi(this),"m")),this}function $i(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fi(Ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wi(e){return!!this.isValid()&&(e=e?Zn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function bi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function xi(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Gn(t))._a?(e=t._isUTC?f(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&ci(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ei(){return!!this.isValid()&&!this._isUTC}function Ci(){return!!this.isValid()&&this._isUTC}function Ti(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Si=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ki=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ai(e,t){var n,i,r,s=e,a=null;return ai(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=Si.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:ce(a[Be])*n,h:ce(a[Ge])*n,m:ce(a[We])*n,s:ce(a[qe])*n,ms:ce(li(1e3*a[Ze]))*n}):(a=ki.exec(e))?(n="-"===a[1]?-1:1,s={y:Oi(a[2],n),M:Oi(a[3],n),w:Oi(a[4],n),d:Oi(a[5],n),h:Oi(a[6],n),m:Oi(a[7],n),s:Oi(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=Ii(Zn(s.from),Zn(s.to)),(s={}).ms=r.milliseconds,s.M=r.months),i=new oi(s),ai(e)&&o(e,"_locale")&&(i._locale=e._locale),ai(e)&&o(e,"_isValid")&&(i._isValid=e._isValid),i}function Oi(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Li(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ii(e,t){var n;return e.isValid()&&t.isValid()?(t=pi(t,e),e.isBefore(t)?n=Li(e,t):((n=Li(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Mi(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),Ni(this,Ai(n,i),e),this}}function Ni(e,t,i,r){var s=t._milliseconds,o=li(t._days),a=li(t._months);e.isValid()&&(r=null==r||r,a&&ct(e,de(e,"Month")+a*i),o&&he(e,"Date",de(e,"Date")+o*i),s&&e._d.setTime(e._d.valueOf()+s*i),r&&n.updateOffset(e,o||a))}Ai.fn=oi.prototype,Ai.invalid=si;var Di=Mi(1,"add"),Pi=Mi(-1,"subtract");function Ri(e){return"string"==typeof e||e instanceof String}function Vi(e){return b(e)||u(e)||Ri(e)||c(e)||Fi(e)||Ui(e)||null==e}function Ui(e){var t,n,i=s(e)&&!a(e),r=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(t=0;t<c;t+=1)n=l[t],r=r||o(e,n);return i&&r}function Fi(e){var t=r(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Ri(e)})).length),t&&n}function Yi(e){var t,n,i=s(e)&&!a(e),r=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)n=l[t],r=r||o(e,n);return i&&r}function Hi(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function ji(e,t){1===arguments.length&&(arguments[0]?Vi(arguments[0])?(e=arguments[0],t=void 0):Yi(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var i=e||Zn(),r=pi(i,this).startOf("day"),s=n.calendarFormat(this,r)||"sameElse",o=t&&(k(t[s])?t[s].call(this,i):t[s]);return this.format(o||this.localeData().calendar(s,this,Zn(i)))}function zi(){return new w(this)}function Bi(e,t){var n=b(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Gi(e,t){var n=b(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Wi(e,t,n,i){var r=b(e)?e:Zn(e),s=b(t)?t:Zn(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(s,n):!this.isAfter(s,n))}function qi(e,t){var n,i=b(e)?e:Zn(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Zi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Xi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ki(e,t,n){var i,r,s;if(!this.isValid())return NaN;if(!(i=pi(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=ne(t)){case"year":s=Qi(this,i)/12;break;case"month":s=Qi(this,i);break;case"quarter":s=Qi(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return n?s:le(s)}function Qi(e,t){if(e.date()<t.date())return-Qi(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Ji(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function er(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function tr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,r="moment",s="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=s+'[")]',this.format(e+t+n+i)}function nr(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=H(this,e);return this.localeData().postformat(t)}function ir(e,t){return this.isValid()&&(b(e)&&e.isValid()||Zn(e).isValid())?Ai({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rr(e){return this.from(Zn(),e)}function sr(e,t){return this.isValid()&&(b(e)&&e.isValid()||Zn(e).isValid())?Ai({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function or(e){return this.to(Zn(),e)}function ar(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lr=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function cr(){return this._locale}var ur=1e3,dr=60*ur,hr=60*dr,fr=3506328*hr;function pr(e,t){return(e%t+t)%t}function mr(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fr:new Date(e,t,n).valueOf()}function gr(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fr:Date.UTC(e,t,n)}function vr(e){var t,i;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?gr:mr,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pr(t+(this._isUTC?0:this.utcOffset()*dr),hr);break;case"minute":t=this._d.valueOf(),t-=pr(t,dr);break;case"second":t=this._d.valueOf(),t-=pr(t,ur)}return this._d.setTime(t),n.updateOffset(this,!0),this}function yr(e){var t,i;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?gr:mr,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hr-pr(t+(this._isUTC?0:this.utcOffset()*dr),hr)-1;break;case"minute":t=this._d.valueOf(),t+=dr-pr(t,dr)-1;break;case"second":t=this._d.valueOf(),t+=ur-pr(t,ur)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function _r(){return this._d.valueOf()-6e4*(this._offset||0)}function $r(){return Math.floor(this.valueOf()/1e3)}function wr(){return new Date(this.valueOf())}function br(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function xr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Er(){return this.isValid()?this.toISOString():null}function Cr(){return g(this)}function Tr(){return h({},m(this))}function Sr(){return m(this).overflow}function kr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ar(e,t){var i,r,s,o=this._eras||yn("en")._eras;for(i=0,r=o.length;i<r;++i)switch("string"==typeof o[i].since&&(s=n(o[i].since).startOf("day"),o[i].since=s.valueOf()),typeof o[i].until){case"undefined":o[i].until=1/0;break;case"string":s=n(o[i].until).startOf("day").valueOf(),o[i].until=s.valueOf()}return o}function Or(e,t,n){var i,r,s,o,a,l=this.eras();for(e=e.toUpperCase(),i=0,r=l.length;i<r;++i)if(s=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),a=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[i];break;case"NNNN":if(s===e)return l[i];break;case"NNNNN":if(a===e)return l[i]}else if([s,o,a].indexOf(e)>=0)return l[i]}function Lr(e,t){var i=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*i}function Ir(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""}function Mr(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""}function Nr(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""}function Dr(){var e,t,i,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(i=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-n(s[e].since).year())*i+s[e].offset;return this.year()}function Pr(e){return o(this,"_erasNameRegex")||jr.call(this),e?this._erasNameRegex:this._erasRegex}function Rr(e){return o(this,"_erasAbbrRegex")||jr.call(this),e?this._erasAbbrRegex:this._erasRegex}function Vr(e){return o(this,"_erasNarrowRegex")||jr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ur(e,t){return t.erasAbbrRegex(e)}function Fr(e,t){return t.erasNameRegex(e)}function Yr(e,t){return t.erasNarrowRegex(e)}function Hr(e,t){return t._eraYearOrdinalRegex||Se}function jr(){var e,t,n=[],i=[],r=[],s=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(Pe(o[e].name)),n.push(Pe(o[e].abbr)),r.push(Pe(o[e].narrow)),s.push(Pe(o[e].name)),s.push(Pe(o[e].abbr)),s.push(Pe(o[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function zr(e,t){U(0,[e,e.length],0,t)}function Br(e){return Kr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Gr(e){return Kr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Wr(){return xt(this.year(),1,4)}function qr(){return xt(this.isoWeekYear(),1,4)}function Zr(){var e=this.localeData()._week;return xt(this.year(),e.dow,e.doy)}function Xr(){var e=this.localeData()._week;return xt(this.weekYear(),e.dow,e.doy)}function Kr(e,t,n,i,r){var s;return null==e?bt(this,i,r).year:(t>(s=xt(e,i,r))&&(t=s),Qr.call(this,e,t,n,i,r))}function Qr(e,t,n,i,r){var s=wt(e,t,n,i,r),o=_t(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Jr(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),Me("N",Ur),Me("NN",Ur),Me("NNN",Ur),Me("NNNN",Fr),Me("NNNNN",Yr),Ve(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?m(n).era=r:m(n).invalidEra=e})),Me("y",Se),Me("yy",Se),Me("yyy",Se),Me("yyyy",Se),Me("yo",Hr),Ve(["y","yy","yyy","yyyy"],He),Ve(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[He]=n._locale.eraYearOrdinalParse(e,r):t[He]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zr("gggg","weekYear"),zr("ggggg","weekYear"),zr("GGGG","isoWeekYear"),zr("GGGGG","isoWeekYear"),te("weekYear","gg"),te("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Me("G",ke),Me("g",ke),Me("GG",we,ve),Me("gg",we,ve),Me("GGGG",Ce,_e),Me("gggg",Ce,_e),Me("GGGGG",Te,$e),Me("ggggg",Te,$e),Ue(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=ce(e)})),Ue(["gg","GG"],(function(e,t,i,r){t[r]=n.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),te("quarter","Q"),se("quarter",7),Me("Q",ge),Ve("Q",(function(e,t){t[je]=3*(ce(e)-1)})),U("D",["DD",2],"Do","date"),te("date","D"),se("date",9),Me("D",we),Me("DD",we,ve),Me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ve(["D","DD"],Be),Ve("Do",(function(e,t){t[Be]=ce(e.match(we)[0])}));var es=ue("Date",!0);function ts(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}U("DDD",["DDDD",3],"DDDo","dayOfYear"),te("dayOfYear","DDD"),se("dayOfYear",4),Me("DDD",Ee),Me("DDDD",ye),Ve(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ce(e)})),U("m",["mm",2],0,"minute"),te("minute","m"),se("minute",14),Me("m",we),Me("mm",we,ve),Ve(["m","mm"],We);var ns=ue("Minutes",!1);U("s",["ss",2],0,"second"),te("second","s"),se("second",15),Me("s",we),Me("ss",we,ve),Ve(["s","ss"],qe);var is,rs,ss=ue("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),te("millisecond","ms"),se("millisecond",16),Me("S",Ee,ge),Me("SS",Ee,ve),Me("SSS",Ee,ye),is="SSSS";is.length<=9;is+="S")Me(is,Se);function os(e,t){t[Ze]=ce(1e3*("0."+e))}for(is="S";is.length<=9;is+="S")Ve(is,os);function as(){return this._isUTC?"UTC":""}function ls(){return this._isUTC?"Coordinated Universal Time":""}rs=ue("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var cs=w.prototype;function us(e){return Zn(1e3*e)}function ds(){return Zn.apply(null,arguments).parseZone()}function hs(e){return e}cs.add=Di,cs.calendar=ji,cs.clone=zi,cs.diff=Ki,cs.endOf=yr,cs.format=nr,cs.from=ir,cs.fromNow=rr,cs.to=sr,cs.toNow=or,cs.get=fe,cs.invalidAt=Sr,cs.isAfter=Bi,cs.isBefore=Gi,cs.isBetween=Wi,cs.isSame=qi,cs.isSameOrAfter=Zi,cs.isSameOrBefore=Xi,cs.isValid=Cr,cs.lang=lr,cs.locale=ar,cs.localeData=cr,cs.max=Kn,cs.min=Xn,cs.parsingFlags=Tr,cs.set=pe,cs.startOf=vr,cs.subtract=Pi,cs.toArray=br,cs.toObject=xr,cs.toDate=wr,cs.toISOString=er,cs.inspect=tr,"undefined"!=typeof Symbol&&null!=Symbol.for&&(cs[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cs.toJSON=Er,cs.toString=Ji,cs.unix=$r,cs.valueOf=_r,cs.creationData=kr,cs.eraName=Ir,cs.eraNarrow=Mr,cs.eraAbbr=Nr,cs.eraYear=Dr,cs.year=gt,cs.isLeapYear=vt,cs.weekYear=Br,cs.isoWeekYear=Gr,cs.quarter=cs.quarters=Jr,cs.month=ut,cs.daysInMonth=dt,cs.week=cs.weeks=kt,cs.isoWeek=cs.isoWeeks=At,cs.weeksInYear=Zr,cs.weeksInWeekYear=Xr,cs.isoWeeksInYear=Wr,cs.isoWeeksInISOWeekYear=qr,cs.date=es,cs.day=cs.days=zt,cs.weekday=Bt,cs.isoWeekday=Gt,cs.dayOfYear=ts,cs.hour=cs.hours=rn,cs.minute=cs.minutes=ns,cs.second=cs.seconds=ss,cs.millisecond=cs.milliseconds=rs,cs.utcOffset=gi,cs.utc=yi,cs.local=_i,cs.parseZone=$i,cs.hasAlignedHourOffset=wi,cs.isDST=bi,cs.isLocal=Ei,cs.isUtcOffset=Ci,cs.isUtc=Ti,cs.isUTC=Ti,cs.zoneAbbr=as,cs.zoneName=ls,cs.dates=E("dates accessor is deprecated. Use date instead.",es),cs.months=E("months accessor is deprecated. Use month instead",ut),cs.years=E("years accessor is deprecated. Use year instead",gt),cs.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vi),cs.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",xi);var fs=L.prototype;function ps(e,t,n,i){var r=yn(),s=f().set(i,t);return r[n](s,e)}function ms(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return ps(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=ps(e,i,n,"month");return r}function gs(e,t,n,i){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var r,s=yn(),o=e?s._week.dow:0,a=[];if(null!=n)return ps(t,(n+o)%7,i,"day");for(r=0;r<7;r++)a[r]=ps(t,(r+o)%7,i,"day");return a}function vs(e,t){return ms(e,t,"months")}function ys(e,t){return ms(e,t,"monthsShort")}function _s(e,t,n){return gs(e,t,n,"weekdays")}function $s(e,t,n){return gs(e,t,n,"weekdaysShort")}function ws(e,t,n){return gs(e,t,n,"weekdaysMin")}fs.calendar=M,fs.longDateFormat=B,fs.invalidDate=W,fs.ordinal=X,fs.preparse=hs,fs.postformat=hs,fs.relativeTime=Q,fs.pastFuture=J,fs.set=A,fs.eras=Ar,fs.erasParse=Or,fs.erasConvertYear=Lr,fs.erasAbbrRegex=Rr,fs.erasNameRegex=Pr,fs.erasNarrowRegex=Vr,fs.months=st,fs.monthsShort=ot,fs.monthsParse=lt,fs.monthsRegex=ft,fs.monthsShortRegex=ht,fs.week=Et,fs.firstDayOfYear=St,fs.firstDayOfWeek=Tt,fs.weekdays=Ut,fs.weekdaysMin=Yt,fs.weekdaysShort=Ft,fs.weekdaysParse=jt,fs.weekdaysRegex=Wt,fs.weekdaysShortRegex=qt,fs.weekdaysMinRegex=Zt,fs.isPM=tn,fs.meridiem=sn,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=E("moment.lang is deprecated. Use moment.locale instead.",mn),n.langData=E("moment.langData is deprecated. Use moment.localeData instead.",yn);var bs=Math.abs;function xs(){var e=this._data;return this._milliseconds=bs(this._milliseconds),this._days=bs(this._days),this._months=bs(this._months),e.milliseconds=bs(e.milliseconds),e.seconds=bs(e.seconds),e.minutes=bs(e.minutes),e.hours=bs(e.hours),e.months=bs(e.months),e.years=bs(e.years),this}function Es(e,t,n,i){var r=Ai(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Cs(e,t){return Es(this,e,t,1)}function Ts(e,t){return Es(this,e,t,-1)}function Ss(e){return e<0?Math.floor(e):Math.ceil(e)}function ks(){var e,t,n,i,r,s=this._milliseconds,o=this._days,a=this._months,l=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Ss(Os(a)+o),o=0,a=0),l.milliseconds=s%1e3,e=le(s/1e3),l.seconds=e%60,t=le(e/60),l.minutes=t%60,n=le(t/60),l.hours=n%24,o+=le(n/24),a+=r=le(As(o)),o-=Ss(Os(r)),i=le(a/12),a%=12,l.days=o,l.months=a,l.years=i,this}function As(e){return 4800*e/146097}function Os(e){return 146097*e/4800}function Ls(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+As(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Os(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function Is(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function Ms(e){return function(){return this.as(e)}}var Ns=Ms("ms"),Ds=Ms("s"),Ps=Ms("m"),Rs=Ms("h"),Vs=Ms("d"),Us=Ms("w"),Fs=Ms("M"),Ys=Ms("Q"),Hs=Ms("y");function js(){return Ai(this)}function zs(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Bs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Gs=Bs("milliseconds"),Ws=Bs("seconds"),qs=Bs("minutes"),Zs=Bs("hours"),Xs=Bs("days"),Ks=Bs("months"),Qs=Bs("years");function Js(){return le(this.days()/7)}var eo=Math.round,to={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function no(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function io(e,t,n,i){var r=Ai(e).abs(),s=eo(r.as("s")),o=eo(r.as("m")),a=eo(r.as("h")),l=eo(r.as("d")),c=eo(r.as("M")),u=eo(r.as("w")),d=eo(r.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=i,no.apply(null,h)}function ro(e){return void 0===e?eo:"function"==typeof e&&(eo=e,!0)}function so(e,t){return void 0!==to[e]&&(void 0===t?to[e]:(to[e]=t,"s"===e&&(to.ss=t-1),!0))}function oo(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,s=to;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(s=Object.assign({},to,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),i=io(this,!r,s,n=this.localeData()),r&&(i=n.pastFuture(+this,i)),n.postformat(i)}var ao=Math.abs;function lo(e){return(e>0)-(e<0)||+e}function co(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,r,s,o,a,l=ao(this._milliseconds)/1e3,c=ao(this._days),u=ao(this._months),d=this.asSeconds();return d?(e=le(l/60),t=le(e/60),l%=60,e%=60,n=le(u/12),u%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",s=lo(this._months)!==lo(d)?"-":"",o=lo(this._days)!==lo(d)?"-":"",a=lo(this._milliseconds)!==lo(d)?"-":"",r+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+i+"S":"")):"P0D"}var uo=oi.prototype;return uo.isValid=ri,uo.abs=xs,uo.add=Cs,uo.subtract=Ts,uo.as=Ls,uo.asMilliseconds=Ns,uo.asSeconds=Ds,uo.asMinutes=Ps,uo.asHours=Rs,uo.asDays=Vs,uo.asWeeks=Us,uo.asMonths=Fs,uo.asQuarters=Ys,uo.asYears=Hs,uo.valueOf=Is,uo._bubble=ks,uo.clone=js,uo.get=zs,uo.milliseconds=Gs,uo.seconds=Ws,uo.minutes=qs,uo.hours=Zs,uo.days=Xs,uo.weeks=Js,uo.months=Ks,uo.years=Qs,uo.humanize=oo,uo.toISOString=co,uo.toString=co,uo.toJSON=co,uo.locale=ar,uo.localeData=cr,uo.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",co),uo.lang=lr,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Me("x",ke),Me("X",Le),Ve("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ve("x",(function(e,t,n){n._d=new Date(ce(e))})),
//! moment.js
n.version="2.29.3",i(Zn),n.fn=cs,n.min=Jn,n.max=ei,n.now=ti,n.utc=f,n.unix=us,n.months=vs,n.isDate=u,n.locale=mn,n.invalid=v,n.duration=Ai,n.isMoment=b,n.weekdays=_s,n.parseZone=ds,n.localeData=yn,n.isDuration=ai,n.monthsShort=ys,n.weekdaysMin=ws,n.defineLocale=gn,n.updateLocale=vn,n.locales=_n,n.weekdaysShort=$s,n.normalizeUnits=ne,n.relativeTimeRounding=ro,n.relativeTimeThreshold=so,n.calendarFormat=Hi,n.prototype=cs,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}();var hi=di.exports;function fi(e){const t=e-1;return t*t*t+1}function pi(e,{delay:n=0,duration:i=400,easing:r=t}={}){const s=+getComputedStyle(e).opacity;return{delay:n,duration:i,easing:r,css:e=>"opacity: "+e*s}}function mi(e,{delay:t=0,duration:n=400,easing:i=fi}={}){const r=getComputedStyle(e),s=+r.opacity,o=parseFloat(r.height),a=parseFloat(r.paddingTop),l=parseFloat(r.paddingBottom),c=parseFloat(r.marginTop),u=parseFloat(r.marginBottom),d=parseFloat(r.borderTopWidth),h=parseFloat(r.borderBottomWidth);return{delay:t,duration:n,easing:i,css:e=>`overflow: hidden;opacity: ${Math.min(20*e,1)*s};height: ${e*o}px;padding-top: ${e*a}px;padding-bottom: ${e*l}px;margin-top: ${e*c}px;margin-bottom: ${e*u}px;border-top-width: ${e*d}px;border-bottom-width: ${e*h}px;`}}const gi=He(!1);function vi(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function yi(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 25 25"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class _i extends Fe{constructor(e){super(),Ue(this,e,yi,vi,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function $i(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M12,4L9.91,6.09L12,8.18M4.27,3L3,4.27L7.73,9H3V15H7L12,20V13.27L16.25,17.53C15.58,18.04 14.83,18.46 14,18.7V20.77C15.38,20.45 16.63,19.82 17.68,18.96L19.73,21L21,19.73L12,10.73M19,12C19,12.94 18.8,13.82 18.46,14.64L19.97,16.15C20.62,14.91 21,13.5 21,12C21,7.72 18,4.14 14,3.23V5.29C16.89,6.15 19,8.83 19,12M16.5,12C16.5,10.23 15.5,8.71 14,7.97V10.18L16.45,12.63C16.5,12.43 16.5,12.21 16.5,12Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function wi(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 25 25"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class bi extends Fe{constructor(e){super(),Ue(this,e,wi,$i,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function xi(t){let n,i,r,s,o;return{c(){n=P("svg"),i=P("path"),r=P("path"),s=P("path"),o=P("path"),Y(i,"d","M21.6311 7.14844L20.3213 8.4887L23.3311 11.5684L20.3213 14.648L21.6311 15.9883L25.9501 11.569L25.9494 11.5684L25.9501 11.5677L21.6311 7.14844Z"),Y(i,"fill",t[2]),Y(r,"d","M10.0625 15.9883V11.5684H23.0213"),Y(r,"stroke",t[2]),Y(r,"stroke-width","2"),Y(r,"stroke-linecap","square"),Y(s,"d","M13.3015 28.1445L14.6113 26.8043L11.6016 23.7246L14.6113 20.6449L13.3015 19.3047L8.98254 23.7239L8.9832 23.7246L8.98254 23.7253L13.3015 28.1445Z"),Y(s,"fill",t[2]),Y(o,"d","M24.8701 19.3047V23.7246H11.9113"),Y(o,"stroke",t[2]),Y(o,"stroke-width","2"),Y(o,"stroke-linecap","square"),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"fill","none"),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o)},p(e,[t]){4&t&&Y(i,"fill",e[2]),4&t&&Y(r,"stroke",e[2]),4&t&&Y(s,"fill",e[2]),4&t&&Y(o,"stroke",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Ei(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="5 5 25 25"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Ci extends Fe{constructor(e){super(),Ue(this,e,Ei,xi,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Ti(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M12.3726 9.49033C12.5713 9.381 12.7944 9.33236 13.0173 9.34976C13.2402 9.36717 13.4543 9.44994 13.636 9.58898L20.2178 14.6125V10.6456C20.2178 10.3013 20.3458 9.97117 20.5737 9.72774C20.8015 9.4843 21.1105 9.34754 21.4327 9.34754C21.7548 9.34754 22.0638 9.4843 22.2917 9.72774C22.5195 9.97117 22.6475 10.3013 22.6475 10.6456V23.6262C22.6475 23.9705 22.5195 24.3007 22.2917 24.5441C22.0638 24.7875 21.7548 24.9243 21.4327 24.9243C21.1105 24.9243 20.8015 24.7875 20.5737 24.5441C20.3458 24.3007 20.2178 23.9705 20.2178 23.6262V19.6593L13.6336 24.6828C13.4519 24.821 13.2382 24.9031 13.0158 24.9202C12.7934 24.9372 12.5709 24.8885 12.3726 24.7793C12.1744 24.6702 12.0081 24.5049 11.892 24.3015C11.7758 24.0981 11.7143 23.8645 11.7142 23.6262V10.6456C11.714 10.407 11.7753 10.1729 11.8915 9.96909C12.0076 9.76528 12.1741 9.59962 12.3726 9.49033Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Si(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="5 5 25 25"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class ki extends Fe{constructor(e){super(),Ue(this,e,Si,Ti,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Ai(e){let t,n;return t=new bi({props:{size:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.size=e[0]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Oi(e){let t,n;return t=new _i({props:{size:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.size=e[0]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Li(e){let t,n,i,r,o,a,l,c,u,d,h,f;n=new Ci({props:{size:e[0]}});const p=[Oi,Ai],m=[];function g(e,t){return e[1]?1:0}return o=g(e),a=m[o]=p[o](e),u=new ki({props:{size:e[0]}}),{c(){t=D("button"),Pe(n.$$.fragment),i=V(),r=D("button"),a.c(),l=V(),c=D("button"),Pe(u.$$.fragment),Y(t,"class","svelte-components-Controls"),Y(r,"class","mute svelte-components-Controls"),Y(c,"class","svelte-components-Controls")},m(s,a){I(s,t,a),Re(n,t,null),I(s,i,a),I(s,r,a),m[o].m(r,null),I(s,l,a),I(s,c,a),Re(u,c,null),d=!0,h||(f=[F(t,"click",e[3]),F(r,"click",e[4]),F(c,"click",e[5])],h=!0)},p(e,[t]){const i={};1&t&&(i.size=e[0]),n.$set(i);let s=o;o=g(e),o===s?m[o].p(e,t):(Te(),Ae(m[s],1,1,(()=>{m[s]=null})),Se(),a=m[o],a?a.p(e,t):(a=m[o]=p[o](e),a.c()),ke(a,1),a.m(r,null));const l={};1&t&&(l.size=e[0]),u.$set(l)},i(e){d||(ke(n.$$.fragment,e),ke(a),ke(u.$$.fragment,e),d=!0)},o(e){Ae(n.$$.fragment,e),Ae(a),Ae(u.$$.fragment,e),d=!1},d(e){e&&M(t),Ve(n),e&&M(i),e&&M(r),m[o].d(),e&&M(l),e&&M(c),Ve(u),h=!1,s(f)}}}function Ii(e,t,n){let i;h(e,gi,(e=>n(1,i=e)));let{size:r}=t;const s=re();return e.$$set=e=>{"size"in e&&n(0,r=e.size)},[r,i,s,()=>s("replay"),()=>{b(gi,i=!i,i)},()=>s("skip")]}class Mi extends Fe{constructor(e){super(),Ue(this,e,Ii,Li,a,{size:0})}}const Ni=He(),Di=He(!1),Pi=He(!1),Ri=He(!1);function Vi(t){let n,i,r,s=t[0].toFixed(0)+"";return{c(){n=D("div"),i=D("p"),r=R(s),Y(i,"class","svelte-components-CircularTimer"),Y(n,"class","pie-pressure svelte-components-CircularTimer"),Y(n,"style",t[1])},m(e,t){I(e,n,t),A(n,i),A(i,r)},p(e,[t]){1&t&&s!==(s=e[0].toFixed(0)+"")&&j(r,s),2&t&&Y(n,"style",e[1])},i:e,o:e,d(e){e&&M(n)}}}function Ui(e,t,n){let i,r,s;h(e,Ri,(e=>n(4,i=e))),h(e,Di,(e=>n(5,r=e))),h(e,Ni,(e=>n(6,s=e)));let{isAboutToEnd:o=!1}=t;const a=re(),l=1/60,c=s.background?s.background.replaceAll(" ","").split(",").map(Number):[0,0,0],u=[255,0,0];let d,f=15,p="";return e.$$set=e=>{"isAboutToEnd"in e&&n(2,o=e.isAboutToEnd)},e.$$.update=()=>{32&e.$$.dirty&&r&&(n(0,f=15),b(Di,r=!1,r)),1&e.$$.dirty&&!f&&a("timerEnded"),1&e.$$.dirty&&n(2,o=f<5),24&e.$$.dirty&&(i?clearInterval(d):n(3,d=setInterval((()=>{n(0,f=Math.max(f-l,0)),0===f&&(clearInterval(d),n(3,d=null));const e=Math.min(1,2.5*f/15);let t=[];for(let n=0;n<3;n++)t.push(e*c[n]+(1-e)*u[n]);n(1,p=`--gradient: conic-gradient(\n rgb(${t.join(",")}) ${f*(100/15)}%,\n rgba(var(--body), 0) ${f*(100/15)}%,\n rgba(var(--body),0 )\n );\n`)}),1e3*l)))},[f,p,o,d,i,r]}class Fi extends Fe{constructor(e){super(),Ue(this,e,Ui,Vi,a,{isAboutToEnd:2})}}function Yi(t){let n,i,r,s,o,a,l,c;return{c(){n=D("div"),i=D("div"),r=V(),s=D("div"),o=V(),a=D("div"),l=V(),c=D("div"),Y(i,"class","svelte-components-Loading"),Y(s,"class","svelte-components-Loading"),Y(a,"class","svelte-components-Loading"),Y(c,"class","svelte-components-Loading"),Y(n,"class","lds-ellipsis svelte-components-Loading"),Y(n,"style",t[0])},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o),A(n,a),A(n,l),A(n,c)},p:e,i:e,o:e,d(e){e&&M(n)}}}function Hi(e,t,n){let{size:i=8}=t;const r=`--size: ${i}`;return e.$$set=e=>{"size"in e&&n(1,i=e.size)},[r,i]}class ji extends Fe{constructor(e){super(),Ue(this,e,Hi,Yi,a,{size:1})}}const zi=He([]),Bi=je(zi,(e=>e)),Gi=He(!0),Wi=He(!1);var qi=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,Xi=Object.prototype.propertyIsEnumerable;function Ki(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Qi=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,r=Ki(e),s=1;s<arguments.length;s++){for(var o in n=Object(arguments[s]))Zi.call(n,o)&&(r[o]=n[o]);if(qi){i=qi(n);for(var a=0;a<i.length;a++)Xi.call(n,i[a])&&(r[i[a]]=n[i[a]])}}return r};function Ji(e,t){return t.encode?t.strict?encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):encodeURIComponent(e):e}function er(e){return Array.isArray(e)?e.sort():"object"==typeof e?er(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}var tr=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,i){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===i[e]&&(i[e]={}),i[e][t[1]]=n):i[e]=n};case"bracket":return function(e,n,i){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t&&void 0!==i[e]?i[e]=[].concat(i[e],n):i[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=Qi({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),r=t.shift(),s=t.length>0?t.join("="):void 0;s=void 0===s?null:decodeURIComponent(s),n(decodeURIComponent(r),s,i)})),Object.keys(i).sort().reduce((function(e,t){var n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=er(n):e[t]=n,e}),Object.create(null))):i},nr=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,i){return null===n?[Ji(t,e),"[",i,"]"].join(""):[Ji(t,e),"[",Ji(i,e),"]=",Ji(n,e)].join("")};case"bracket":return function(t,n){return null===n?Ji(t,e):[Ji(t,e),"[]=",Ji(n,e)].join("")};default:return function(t,n){return null===n?Ji(t,e):[Ji(t,e),"=",Ji(n,e)].join("")}}}(t=Qi({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(i){var r=e[i];if(void 0===r)return"";if(null===r)return Ji(i,t);if(Array.isArray(r)){var s=[];return r.slice().forEach((function(e){void 0!==e&&s.push(n(i,e,s.length))})),s.join("&")}return Ji(i,t)+"="+Ji(r,t)})).filter((function(e){return e.length>0})).join("&"):""};var ir=function(e,t){var n,i=t||{get:function(e){return n[e]},set:function(e,t){n[e]=t},has:function(e){return Object.prototype.hasOwnProperty.call(n,e)},delete:function(e){delete n[e]},object:n=Object.create(null)};function r(e){i.delete(e)}function s(e,t){i.set(e,t)}return{has:function(e){return i.has(e)},get:function(t){return i.has(t)||"function"!=typeof e||i.set(t,e(t)),i.get(t)},remove:r,delete:r,unset:r,set:s,put:s,add:s,getUnderlyingDataStructure:function(){return t||i.object}}},rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr=function(e){return Object.getOwnPropertyNames(e).map((function(t){return e[t]}))},or=function(e,t,n){var i=void 0===t?"undefined":rr(t);if(i!==n)throw new Error("Expected "+e+" to be "+n+" but it was "+i)},ar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.create(null),t=ir((function(){return Object.create(null)}));return e.on=function(e,n){or("event",e,"string"),or("listener",n,"function");var i=Math.random().toString(),r=t.get(e);return r[i]=n,function(){delete r[i]}},e.once=function(t,n){or("event",t,"string"),or("listener",n,"function");var i=e.on(t,(function(){n.apply(void 0,arguments),i()}));return i},e.emit=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];or("event",e,"string");var s=t.get(e);sr(s).forEach((function(e){return e.apply(void 0,i)}))},e},lr=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.apply(window.history,n)};function cr(e){var t=window.history.pushState,n=window.history.replaceState;window.history.replaceState=function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];lr.apply(void 0,[n].concat(i)),e()},window.history.pushState=function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];lr.apply(void 0,[t].concat(i)),e()}}function ur(){}function dr(e,t){for(var n in t)e[n]=t[n];return e}function hr(e,t){t.appendChild(e)}function fr(e,t,n){t.insertBefore(e,n)}function pr(e){e.parentNode.removeChild(e)}function mr(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function gr(e){return document.createElement(e)}function vr(e,t){e._handlers=Object.create(null),e._bind=t._bind,e.options=t,e.root=t.root||e,e.store=t.store||e.root.store}function yr(e){for(;e&&e.length;)e.shift()()}var _r={destroy:function(e){this.destroy=ur,this.fire("destroy"),this.set=ur,this._fragment.d(!1!==e),this._fragment=null,this._state={}},get:function(){return this._state},fire:function(e,t){var n=e in this._handlers&&this._handlers[e].slice();if(n)for(var i=0;i<n.length;i+=1){var r=n[i];r.__calling||(r.__calling=!0,r.call(this,t),r.__calling=!1)}},on:function(e,t){var n=this._handlers[e]||(this._handlers[e]=[]);return n.push(t),{cancel:function(){var e=n.indexOf(t);~e&&n.splice(e,1)}}},set:function(e){this._set(dr({},e)),this.root._lock||(this.root._lock=!0,yr(this.root._beforecreate),yr(this.root._oncreate),yr(this.root._aftercreate),this.root._lock=!1)},_recompute:ur,_set:function(e){var t=this._state,n={},i=!1;for(var r in e)this._differs(e[r],t[r])&&(n[r]=i=!0);i&&(this._state=dr(dr({},t),e),this._recompute(n,this._state),this._bind&&this._bind(n,this._state),this._fragment&&(this.fire("state",{changed:n,current:this._state,previous:t}),this._fragment.p(n,this._state),this.fire("update",{changed:n,current:this._state,previous:t})))},_mount:function(e,t){this._fragment[this._fragment.i?"i":"m"](e,t||null)},_differs:function(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}};var $r={onClick:function(e){if(function(e){return!e.defaultPrevented&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&function(e){return 0===e.button}(e)}(e)){e.preventDefault();var t=this.get(),n=t.querystring,i=t.parameters,r=t.meta,s=t.hash;this.fire("navigate",{querystring:n,parameters:i,meta:r,hash:s})}}};function wr(e,t){var n;function i(e){return e.parameters?br:xr}var r=i(t),s=r(e,t);return{c:function(){s.c(),n=document.createComment("")},m:function(e,t){s.m(e,t),fr(n,e,t)},p:function(t,o){r===(r=i(o))&&s?s.p(t,o):(s.d(1),(s=r(e,o)).c(),s.m(n.parentNode,n))},d:function(e){s.d(e),e&&pr(n)}}}function br(e,t){var n,i,r=e._slotted.default;function s(t){e.onClick(t)}return{c:function(){var e,r;n=gr("a"),e="click",r=s,n.addEventListener(e,r,!1),n.href=i=""+t.querystring+t.hash,n.className=t.className,n.style.cssText=t.style},m:function(t,i){fr(n,t,i),r&&hr(r,n),e.refs.link=n},p:function(e,t){(e.querystring||e.hash)&&i!==(i=""+t.querystring+t.hash)&&(n.href=i),e.className&&(n.className=t.className),e.style&&(n.style.cssText=t.style)},d:function(t){var i,o;t&&pr(n),r&&mr(n,r),i="click",o=s,n.removeEventListener(i,o,!1),e.refs.link===n&&(e.refs.link=null)}}}function xr(e,t){var n,i=e._slotted.default;return{c:function(){(n=gr("a")).className=t.className,n.style.cssText=t.style},m:function(e,t){fr(n,e,t),i&&hr(i,n)},p:function(e,t){e.className&&(n.className=t.className),e.style&&(n.style.cssText=t.style)},d:function(e){e&&pr(n),i&&mr(n,i)}}}function Er(e){vr(this,e),this.refs={},this._state=dr({className:"",style:"",meta:null,anchor:""},e.data),this._recompute({parametersToQuerystring:1,parameters:1,anchor:1},this._state),this._intro=!0,this._slotted=e.slots||{},this.slots={},this._fragment=wr(this,this._state),e.target&&(this._fragment.c(),this._mount(e.target,e.anchor))}function Cr(e,t,n){history.replaceState(e,t,n)}function Tr(e,t,n){history.pushState(e,t,n)}function Sr(){var e=location.search;return{querystring:e,parameters:tr(e)}}function kr(e){window.addEventListener("popstate",e)}function Ar(e){return"?"+nr(e)}function Or(e){return Object.assign({},e,{data:Object.assign({},e.data,{parametersToQuerystring:Ar})})}dr(Er.prototype,_r),dr(Er.prototype,$r),Er.prototype._recompute=function(e,t){var n,i;(e.parametersToQuerystring||e.parameters)&&this._differs(t.querystring,t.querystring=(0,(n=t).parametersToQuerystring)(n.parameters))&&(e.querystring=!0),e.anchor&&this._differs(t.hash,t.hash=(i=t.anchor)?"#"+i:"")&&(e.hash=!0)};var Lr=function(e){return e.replace(/^#/,"")},Ir=function(e){return e.replace(/^\?/,"")},Mr=function(){return Lr(window.location.hash)},Nr=function(e){return e&&e.scrollIntoView()},Dr=function(e){return e&&document.getElementById(e)};var Pr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({pushState:Tr,replaceState:Cr,currentQuerystring:Sr,onPopState:kr,onPushOrReplaceState:cr},e),n=t.pushState,i=t.replaceState,r=t.currentQuerystring,s=t.onPopState,o=t.onPushOrReplaceState,a=ar(),l=!1,c=function(){if(!l){var e=r(),t=e.querystring,n=e.parameters;a.emit("navigate",{querystring:t,parameters:n})}};function u(e){var t=e.querystring,s=e.parameters,o=e.element,c=e.meta,u=e.replace,d=e.hash,h=void 0===d?"":d;function f(e){a.emit(e,{querystring:t,parameters:s,meta:c,element:o,hash:h})}void 0===t&&(t=Ar(s));var p=u?i:n;f("before navigate"),f("navigate"),l=!0;var m=r().querystring,g=Mr();Ir(m)!==Ir(t)?p(s,"",t+h):Lr(h)!==Mr()&&n(s,"",h),Mr()!==g&&Nr(Dr(Lr(h))),l=!1,f("after navigate")}return s(c),o(c),{navigate:u,Link:function(e){var t=new Er(Or(e));return t.on("navigate",(function(e){var n=e.querystring,i=e.parameters,r=e.meta,s=e.hash;u({querystring:n,parameters:i,meta:r,element:t.refs.link,hash:s})})),t},attachQuerystringData:function(e){var t=a.on("navigate",(function(t){var n=t.parameters;e.set({querystringParameters:n})}));e.on("destroy",t),e.set({querystringParameters:r().parameters})},on:function(e,t){return a.on(e,t)},once:function(e,t){return a.once(e,t)},getCurrentQuerystring:function(){return r().querystring},getCurrentParameters:function(){return r().parameters}}};const Rr=Pr().getCurrentParameters(),Vr=He(Rr);Vr.subscribe((()=>{const e=new URLSearchParams;Object.entries(Rr).forEach((([t,n])=>e.append(t,n)));const t=e.toString();t.length>0&&history.pushState({},"",`?${t}`)}));const Ur=d(Vr),Fr={org_id:"cm8",head_id:"alana",theme:"light",language:void 0,api_base:window.location.origin,font:"",vm_version:1,time_pressure:!0,embed:!0,touch_to_start_icon:"https://talking-ui-assets-staging.s3.eu-west-1.amazonaws.com/touch.gif"},Yr=He(Fr),Hr=He(!1),jr=He(!1),zr=He(!1),Br=He(""),Gr=He(0),Wr={};async function qr(e){if(!Wr[e])try{const t=(new Date).getTime(),n=await fetch(e),i=await n.blob(),r=i.size,s=(new Date).getTime(),o=r/((s-t)/1e3)/1048576;Gr.set(o),Wr[e]=i}catch(e){const t=e;if(404===t?.response?.status)return null;t?.response?.data?.detail?Br.set(`Error:\n ${t.response.data.detail}`):Br.set(`${JSON.stringify(t)}`)}return Wr[e]}const Zr=new class{API_ENDPOINT=d(Yr).api_base;async request(e,t){const n=await fetch(e,t);if(n.status>=200&&n.status<=299)return await n.json();throw console.error(n.status,n.statusText),new Error}expandApiError(e){const t=e;t?.response?.data?.detail?Br.set(`Error:\n ${t.response.data.detail}`):Br.set(`${JSON.stringify(t)}`)}async getHead(e,t){const n=`${this.API_ENDPOINT}/api/v1/head/${e}/${t}`;let i;try{i=await this.request(n)}catch(e){return void this.expandApiError(e)}return i}async getVideoId(e,t){const n=`${this.API_ENDPOINT}/api/v1/videos/${e}/${t}`;let i,r;try{i=await this.request(n)}catch(e){return void this.expandApiError(e)}try{r=i[0].video_id}catch{return}return r}async getIdleSrc(e,t,n){const i=`${this.API_ENDPOINT}/api/v1/idle/${e}/${t}/${n}`;let r;try{r=await this.request(i)}catch(e){return void this.expandApiError(e)}const s=await qr(r);if(!s.type.startsWith("video"))return void Br.set("Bad idle video type.");return URL.createObjectURL(s)}async getAvatarSrc(e,t,n){const i=`${this.API_ENDPOINT}/api/v1/avatar/${e}/${t}/${n}`;let r;try{r=await this.request(i)}catch(e){return void this.expandApiError(e)}return r}async getAuthToken(e,t){const n=`${this.API_ENDPOINT}/token`;let i;const r=new FormData;r.append("username",e),r.append("password",t);try{i=await this.request(n,{method:"POST",body:r})}catch(e){return void this.expandApiError(e)}return i}async getAsrToken(e){const t=`${this.API_ENDPOINT}/api/v1/asr_token`;let n,i;try{const r=await this.request(t,{headers:{Authorization:`Bearer ${e}`}});n=r.token,i=r.region}catch(e){return void this.expandApiError(e)}return{token:n,region:i}}async getLocalisationFile(e){const t=`${this.API_ENDPOINT}/bundle/lang/${e}.json`;let n;try{n=await this.request(t)}catch(e){return void this.expandApiError(e)}return n}getWebsocket(e,t){const n=this.API_ENDPOINT.replace("http","ws")+`/api/v1/switch/${e}/${t}`;return new WebSocket(n)}};let Xr=0;const Kr=async(e="en-US")=>{let t;try{if(t=await Zr.getLocalisationFile(e),"Not Found"===t?.detail)throw new Error("");In.set({[e]:t}),await Xn.set(e)}catch(t){Xr+=1,console.error(`Language ${e} not supported`),Xr<2&&await Kr()}},Qr=je(Xn,(e=>"string"==typeof e));function Jr(e,t,n){const i=e.slice();return i[28]=t[n],i[30]=n,i}function es(e){let t,n,i;return n=new ji({props:{size:4}}),{c(){t=D("div"),Pe(n.$$.fragment),Y(t,"class","waiting-response svelte-components-SuggestionContainer")},m(e,r){I(e,t,r),Re(n,t,null),i=!0},i(e){i||(ke(n.$$.fragment,e),i=!0)},o(e){Ae(n.$$.fragment,e),i=!1},d(e){e&&M(t),Ve(n)}}}function ts(t){let n;return{c(){n=D("div"),B(n,"width","35px"),B(n,"height","10px")},m(e,t){I(e,n,t)},p:e,i:e,o:e,d(e){e&&M(n)}}}function ns(e){let t,n,i;function r(t){e[16](t)}let s={};return void 0!==e[3]&&(s.isAboutToEnd=e[3]),t=new Fi({props:s}),ce.push((()=>De(t,"isAboutToEnd",r))),t.$on("timerEnded",e[17]),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,i){const r={};!n&&8&i&&(n=!0,r.isAboutToEnd=e[3],ve((()=>n=!1))),t.$set(r)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(e){Ve(t,e)}}}function is(e){let t,n=e[0],i=[];for(let t=0;t<n.length;t+=1)i[t]=as(Jr(e,n,t));return{c(){t=D("div");for(let e=0;e<i.length;e+=1)i[e].c();Y(t,"class","suggestion-wrapper svelte-components-SuggestionContainer")},m(e,n){I(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null)},p(e,r){if(10309&r){let s;for(n=e[0],s=0;s<n.length;s+=1){const o=Jr(e,n,s);i[s]?i[s].p(o,r):(i[s]=as(o),i[s].c(),i[s].m(t,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},d(e){e&&M(t),N(i,e)}}}function rs(e){let t,n,i,r,o,a,l,c,u,d,h,f=e[30]+1+"";let p=function(e,t){return e[30]===cs?os:ss}(e),m=p(e);function g(){return e[23](e[28])}return{c(){t=D("div"),n=D("p"),i=R(f),r=V(),m.c(),o=V(),a=D("p"),l=V(),Y(n,"class","svelte-components-SuggestionContainer"),Y(a,"class","svelte-components-SuggestionContainer"),Y(t,"class","suggestion selectable svelte-components-SuggestionContainer"),G(t,"past-selected",e[28].selected)},m(s,c){I(s,t,c),A(t,n),A(n,i),A(t,r),m.m(t,null),A(t,o),A(t,a),A(t,l),u=!0,d||(h=[F(t,"introstart",e[19]),F(t,"outrostart",e[20]),F(t,"introend",e[21]),F(t,"outroend",e[22]),F(t,"click",g)],d=!0)},p(n,i){e=n,m.p(e,i),1&i&&G(t,"past-selected",e[28].selected)},i(e){u||(e&&ge((()=>{c||(c=Le(t,mi,{},!0)),c.run(1)})),u=!0)},o(e){e&&(c||(c=Le(t,mi,{},!1)),c.run(0)),u=!1},d(e){e&&M(t),m.d(),e&&c&&c.end(),d=!1,s(h)}}}function ss(e){let t,n,i=e[28].text+"";return{c(){t=D("p"),n=R(i),Y(t,"class","svelte-components-SuggestionContainer")},m(e,i){I(e,t,i),A(t,n)},p(e,t){1&t&&i!==(i=e[28].text+"")&&j(n,i)},d(e){e&&M(t)}}}function os(e){let t,n,i=e[28].text+"";return{c(){t=D("p"),n=R(i),Y(t,"class","svelte-components-SuggestionContainer")},m(i,r){I(i,t,r),A(t,n),e[18](t)},p(e,t){1&t&&i!==(i=e[28].text+"")&&j(n,i)},d(n){n&&M(t),e[18](null)}}}function as(e){let t,n=e[28]?.text&&!e[6]&&rs(e);return{c(){n&&n.c(),t=U()},m(e,i){n&&n.m(e,i),I(e,t,i)},p(e,i){e[28]?.text&&!e[6]?n?(n.p(e,i),65&i&&ke(n,1)):(n=rs(e),n.c(),ke(n,1),n.m(t.parentNode,t)):n&&(Te(),Ae(n,1,1,(()=>{n=null})),Se())},d(e){n&&n.d(e),e&&M(t)}}}function ls(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g=e[10]("chat-component.suggestions.title")+"",v=e[8]&&es();const y=[ns,ts],_=[];function $(e,t){return e[1]&&e[9].time_pressure&&!e[7]?0:1}r=$(e),s=_[r]=y[r](e);let b=e[0]&&is(e);return{c(){t=D("div"),n=D("div"),v&&v.c(),i=V(),s.c(),o=V(),a=D("div"),l=R(g),c=V(),u=D("div"),d=V(),b&&b.c(),Y(a,"class","suggestion-title svelte-components-SuggestionContainer"),G(a,"align-top",e[6]),G(a,"center-title",e[1]&&e[5]&&!e[4]&&!e[7]),B(u,"width","35px"),B(u,"height","10px"),Y(n,"class","suggestion-title-container svelte-components-SuggestionContainer"),G(n,"align-title-paused",e[1]&&e[5]&&!e[4]&&!e[7]),Y(t,"class",h=w("suggestion-container "+(e[6]?"suggestions-hidden":""))+" svelte-components-SuggestionContainer")},m(s,h){I(s,t,h),A(t,n),v&&v.m(n,null),A(n,i),_[r].m(n,null),A(n,o),A(n,a),A(a,l),A(n,c),A(n,u),A(t,d),b&&b.m(t,null),f=!0,p||(m=F(t,"click",e[24]),p=!0)},p(e,[c]){e[8]?v?256&c&&ke(v,1):(v=es(),v.c(),ke(v,1),v.m(n,i)):v&&(Te(),Ae(v,1,1,(()=>{v=null})),Se());let u=r;r=$(e),r===u?_[r].p(e,c):(Te(),Ae(_[u],1,1,(()=>{_[u]=null})),Se(),s=_[r],s?s.p(e,c):(s=_[r]=y[r](e),s.c()),ke(s,1),s.m(n,o)),(!f||1024&c)&&g!==(g=e[10]("chat-component.suggestions.title")+"")&&j(l,g),64&c&&G(a,"align-top",e[6]),178&c&&G(a,"center-title",e[1]&&e[5]&&!e[4]&&!e[7]),178&c&&G(n,"align-title-paused",e[1]&&e[5]&&!e[4]&&!e[7]),e[0]?b?b.p(e,c):(b=is(e),b.c(),b.m(t,null)):b&&(b.d(1),b=null),(!f||64&c&&h!==(h=w("suggestion-container "+(e[6]?"suggestions-hidden":""))+" svelte-components-SuggestionContainer"))&&Y(t,"class",h)},i(e){f||(ke(v),ke(s),f=!0)},o(e){Ae(v),Ae(s),f=!1},d(e){e&&M(t),v&&v.d(),_[r].d(),b&&b.d(),p=!1,m()}}}let cs=0;function us(e,t,n){let i,r,s,o,a,l,c,u,d,f;h(e,Gi,(e=>n(14,r=e))),h(e,jr,(e=>n(4,s=e))),h(e,Ri,(e=>n(5,o=e))),h(e,Bi,(e=>n(15,a=e))),h(e,Pi,(e=>n(7,l=e))),h(e,zr,(e=>n(8,c=e))),h(e,Yr,(e=>n(9,u=e))),h(e,li,(e=>n(10,d=e))),h(e,Wi,(e=>n(11,f=e)));const p=re(),m={next:"default",text:"default",skip:!1,selected:!1};let g,v,y,_,{currentSuggestions:$=Array(3).fill(m)}=t;const w=e=>{b(Gi,r=!0,r),p("optionSelected",e)};return e.$$set=e=>{"currentSuggestions"in e&&n(0,$=e.currentSuggestions)},e.$$.update=()=>{32768&e.$$.dirty&&(g=a[a.length-1],n(1,v="suggestions"===g?.type),v&&n(0,$=g.hook.inputs),r&&b(Pi,l=!0,l)),16434&e.$$.dirty&&n(6,i=!v||o&&!s||r),12&e.$$.dirty&&(_?y?.classList.add("blinking"):y?.classList.remove("blinking"))},[$,v,y,_,s,o,i,l,c,u,d,f,p,w,r,a,function(e){_=e,n(3,_)},()=>{p("optionSelected",$[0]),b(Ri,o=!1,o)},function(e){ce[e?"unshift":"push"]((()=>{y=e,n(2,y)}))},()=>b(Wi,f=!0,f),()=>b(Wi,f=!0,f),()=>b(Wi,f=!0,f),()=>b(Wi,f=!0,f),e=>w(e),()=>v&&b(Ri,o=!o,o)]}class ds extends Fe{constructor(e){super(),Ue(this,e,us,ls,a,{currentSuggestions:0})}}const hs=He(""),fs=He(!1),ps=He(!1),ms=He(!1),gs=He(!1),vs=je([ps,gs],(()=>d(ps)||d(gs))),ys=je([vs,ms],(()=>d(ms)&&!d(vs))),_s=()=>{ps.set(!d(ps))},$s=()=>{ms.set(!d(ms))},{org_id:ws,head_id:bs}=d(Yr),xs=window.localStorage,Es=`chat:${window.location.origin+window.location.pathname}:${ws}:${bs}:`,Cs=e=>{if(void 0!==xs){return xs.getItem(`${Es}${e}`)}},Ts=(e,t)=>{void 0===xs||xs.setItem(`${Es}${e}`,t)};async function Ss(){let e=Cs("asr_token"),t=Cs("asr_region");const{access_token:n}=await(async(e="anonymous",t="Password1")=>{let n=Cs("access_token"),i=Cs("user_id"),r=parseInt(Cs("session_id"))||0,s=!0;if("undefined"!==n&&n&&i&&"number"==typeof r){const e=1e3*JSON.parse(window.atob(n.split(".")[1])).exp;s=hi(new Date).add(15,"m").isAfter(e)}if(s){const s=await Zr.getAuthToken(e,t);s||Br.set("Error: Could not renew authentication token"),n=s.access_token,i=s.user_id,r++,Ts("access_token",n),Ts("user_id",i),Ts("session_id",r.toString())}return e=JSON.parse(window.atob(n.split(".")[1])).username,{access_token:n,user_id:i,session_id:r}})();let i=!0;if(e&&t){const t=1e3*JSON.parse(window.atob(e.split(".")[1])).exp;i=hi(new Date).add(5,"m").isAfter(t)}if(i){const i=await Zr.getAsrToken(n);if(!i)return{token:"",region:""};e=i.token,t=i.region,Ts("asr_token",e),Ts("asr_region",t)}return{token:e,region:t}}let ks,As=!0;const Os=()=>{As=!1,ks.stopContinuousRecognitionAsync((()=>{ks.stopKeywordRecognitionAsync((()=>{ks.close()}))}))};function Ls(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M2,21L23,12L2,3V10L17,12L2,14V21Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3])},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Is(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 24 24"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Ms extends Fe{constructor(e){super(),Ue(this,e,Is,Ls,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Ns(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3])},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Ds(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 24 24"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Ps extends Fe{constructor(e){super(),Ue(this,e,Ds,Ns,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Rs(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M18,18H6V6H18V18Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3])},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Vs(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 24 24"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Us extends Fe{constructor(e){super(),Ue(this,e,Vs,Rs,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Fs(e){let t,n,i,r,s,o;return n=new Ms({props:{size:"1.5em"}}),{c(){t=D("button"),Pe(n.$$.fragment),Y(t,"class","input-button shadow svelte-components-InputContainer"),t.disabled=i=/^\s+$/.test(e[1])||!e[1]},m(i,a){I(i,t,a),Re(n,t,null),r=!0,s||(o=F(t,"click",e[19]),s=!0)},p(e,n){(!r||2&n&&i!==(i=/^\s+$/.test(e[1])||!e[1]))&&(t.disabled=i)},i(e){r||(ke(n.$$.fragment,e),r=!0)},o(e){Ae(n.$$.fragment,e),r=!1},d(e){e&&M(t),Ve(n),s=!1,o()}}}function Ys(e){let t,n,i,r,s,o;const a=[js,Hs],l=[];function c(e,t){return e[4]?0:1}return n=c(e),i=l[n]=a[n](e),{c(){t=D("button"),i.c(),Y(t,"class","input-button svelte-components-InputContainer"),G(t,"recording",e[4])},m(i,a){I(i,t,a),l[n].m(t,null),r=!0,s||(o=F(t,"click",e[18]),s=!0)},p(e,r){let s=n;n=c(e),n!==s&&(Te(),Ae(l[s],1,1,(()=>{l[s]=null})),Se(),i=l[n],i||(i=l[n]=a[n](e),i.c()),ke(i,1),i.m(t,null)),16&r&&G(t,"recording",e[4])},i(e){r||(ke(i),r=!0)},o(e){Ae(i),r=!1},d(e){e&&M(t),l[n].d(),s=!1,o()}}}function Hs(e){let t,n;return t=new Ps({props:{size:"1.5em"}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function js(e){let t,n;return t=new Us({props:{size:"1.5em"}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function zs(t){let n,i,r,s,o;return{c(){n=D("button"),Y(n,"class","progress-bar svelte-components-InputContainer")},m(e,i){I(e,n,i),r=!0,s||(o=F(n,"click",t[11]),s=!0)},p:e,i(e){r||(ge((()=>{i||(i=Le(n,pi,{},!0)),i.run(1)})),r=!0)},o(e){i||(i=Le(n,pi,{},!1)),i.run(0),r=!1},d(e){e&&M(n),e&&i&&i.end(),s=!1,o()}}}function Bs(e){let t,n,i,r,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w;function b(t){e[15](t)}let x={};void 0!==e[3]&&(x.currentSuggestions=e[3]),i=new ds({props:x}),ce.push((()=>De(i,"currentSuggestions",b))),i.$on("optionSelected",e[16]);const E=[Ys,Fs],C=[];function T(e,t){return 146&t&&(d=null),null==d&&(d=!((!e[7]||!/^\s+$/.test(e[1])&&e[1])&&!e[4])),d?0:1}h=T(e,-1),f=C[h]=E[h](e);let S=e[0]&&zs(e);function k(t){e[20](t)}let O={};return void 0!==e[2]&&(O.size=e[2]),v=new Mi({props:O}),ce.push((()=>De(v,"size",k))),v.$on("skip",e[21]),v.$on("replay",e[22]),{c(){t=D("div"),n=D("div"),Pe(i.$$.fragment),o=V(),a=D("div"),l=D("input"),u=V(),f.c(),p=V(),S&&S.c(),m=V(),g=D("div"),Pe(v.$$.fragment),Y(l,"class","text-box svelte-components-InputContainer"),l.disabled=e[5],Y(l,"placeholder",c=e[6]("chat-component.input-placeholder")),Y(a,"class","input-container svelte-components-InputContainer"),Y(g,"class","controls svelte-components-InputContainer"),G(g,"hide-chat-controls",!e[8]&&!e[9]),Y(n,"class","user-input svelte-components-InputContainer"),Y(t,"class","user-input-container svelte-components-InputContainer")},m(r,s){I(r,t,s),A(t,n),Re(i,n,null),A(n,o),A(n,a),A(a,l),z(l,e[1]),A(a,u),C[h].m(a,null),A(n,p),S&&S.m(n,null),A(n,m),A(n,g),Re(v,g,null),_=!0,$||(w=[F(l,"input",e[17]),F(l,"focus",e[11]),F(l,"keypress",e[14])],$=!0)},p(e,[t]){const s={};!r&&8&t&&(r=!0,s.currentSuggestions=e[3],ve((()=>r=!1))),i.$set(s),(!_||32&t)&&(l.disabled=e[5]),(!_||64&t&&c!==(c=e[6]("chat-component.input-placeholder")))&&Y(l,"placeholder",c),2&t&&l.value!==e[1]&&z(l,e[1]);let o=h;h=T(e,t),h===o?C[h].p(e,t):(Te(),Ae(C[o],1,1,(()=>{C[o]=null})),Se(),f=C[h],f?f.p(e,t):(f=C[h]=E[h](e),f.c()),ke(f,1),f.m(a,null)),e[0]?S?(S.p(e,t),1&t&&ke(S,1)):(S=zs(e),S.c(),ke(S,1),S.m(n,m)):S&&(Te(),Ae(S,1,1,(()=>{S=null})),Se());const u={};!y&&4&t&&(y=!0,u.size=e[2],ve((()=>y=!1))),v.$set(u),768&t&&G(g,"hide-chat-controls",!e[8]&&!e[9])},i(e){_||(ke(i.$$.fragment,e),ke(f),ke(S),ke(v.$$.fragment,e),_=!0)},o(e){Ae(i.$$.fragment,e),Ae(f),Ae(S),Ae(v.$$.fragment,e),_=!1},d(e){e&&M(t),Ve(i),C[h].d(),S&&S.d(),Ve(v),$=!1,s(w)}}}function Gs(e,t,n){let i,r,s,o,a,l,c,u;h(e,hs,(e=>n(1,i=e))),h(e,Ri,(e=>n(24,r=e))),h(e,jr,(e=>n(4,s=e))),h(e,fs,(e=>n(5,o=e))),h(e,li,(e=>n(6,a=e))),h(e,Hr,(e=>n(7,l=e))),h(e,vs,(e=>n(8,c=e))),h(e,ys,(e=>n(9,u=e)));let f,{isAsrCancellable:p=!1}=t,m="2em";const g=re();let v;const y=e=>{b(hs,i=e,i)},_=(e,t)=>{b(hs,i=e,i),b(jr,s=!1,s),b(Ri,r=!1,r),t&&(n(0,p=!0),v=setTimeout((()=>{n(0,p=!1),x(),b(Ri,r=!1,r)}),2e3))},$=async()=>{b(jr,s=!0,s),b(Ri,r=!0,r),await(async(e=(e=>{}),t=(e=>{}))=>{const n=await Ss(),i=window.SpeechSDK.SpeechConfig.fromAuthorizationToken(n.token,n.region);i.speechRecognitionLanguage=d(Yr).language;const r=window.SpeechSDK.AudioConfig.fromDefaultMicrophoneInput();ks=new window.SpeechSDK.SpeechRecognizer(i,r),ks.recognizing=(t,n)=>{n.result.text.length>0?e(n.result.text):window.SpeechSDK.ResultReason.NoMatch==n.result.reason&&Os()},ks.recognized=(e,n)=>{window.SpeechSDK.ResultReason.RecognizedSpeech==n.result.reason&&n.result.text.length>0?(t(n.result.text,As),Os()):window.SpeechSDK.ResultReason.NoMatch==n.result.reason&&Os()},ks.canceled=()=>{Os()},ks.sessionStopped=()=>{Os()},As=!0,ks.startContinuousRecognitionAsync()})(y,_)},w=()=>{b(jr,s=!1,s),Os()},x=()=>{for(let e=0;e<f.length;e++){if(f[e].text===i)return void g("processUserInput")}if(null!=f[parseInt(i)-1])return b(hs,i=f[parseInt(i)-1].text,i),void g("processUserInput");g("processUserInput")};return e.$$set=e=>{"isAsrCancellable"in e&&n(0,p=e.isAsrCancellable)},e.$$.update=()=>{2&e.$$.dirty&&i&&b(Ri,r=!1,r)},[p,i,m,f,s,o,a,l,c,u,g,()=>{n(0,p=!1),v&&clearTimeout(v)},$,w,e=>{"Enter"===e.code&&x()},function(e){f=e,n(3,f)},function(t){ae.call(this,e,t)},function(){i=this.value,hs.set(i)},()=>s?w():$(),()=>g("processUserInput"),function(e){m=e,n(2,m)},function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)}]}class Ws extends Fe{constructor(e){super(),Ue(this,e,Gs,Bs,a,{isAsrCancellable:0})}}function qs(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"d","M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3])},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Zs(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 24 24"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Xs extends Fe{constructor(e){super(),Ue(this,e,Zs,qs,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Ks(e){let t,n;return t=new Xs({props:{size:e[1],color:e[3]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};2&n&&(i.size=e[1]),8&n&&(i.color=e[3]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Qs(t){let n,i,r;return{c(){n=D("img"),c(n.src,i=t[0])||Y(n,"src",i),Y(n,"alt","avatar"),Y(n,"style",r=`height: ${t[1]}; width: ${t[1]};`),Y(n,"class","svelte-components-Avatar")},m(e,t){I(e,n,t)},p(e,t){1&t&&!c(n.src,i=e[0])&&Y(n,"src",i),2&t&&r!==(r=`height: ${e[1]}; width: ${e[1]};`)&&Y(n,"style",r)},i:e,o:e,d(e){e&&M(n)}}}function Js(e){let t,n,i,r;const s=[Qs,Ks],o=[];function a(e,t){return e[0]?0:1}return n=a(e),i=o[n]=s[n](e),{c(){t=D("div"),i.c(),Y(t,"style",e[2]),Y(t,"class","svelte-components-Avatar")},m(e,i){I(e,t,i),o[n].m(t,null),r=!0},p(e,[l]){let c=n;n=a(e),n===c?o[n].p(e,l):(Te(),Ae(o[c],1,1,(()=>{o[c]=null})),Se(),i=o[n],i?i.p(e,l):(i=o[n]=s[n](e),i.c()),ke(i,1),i.m(t,null)),(!r||4&l)&&Y(t,"style",e[2])},i(e){r||(ke(i),r=!0)},o(e){Ae(i),r=!1},d(e){e&&M(t),o[n].d()}}}function eo(e,t,n){let{src:i=""}=t,{size:r="2em"}=t,{style:s}=t,{color:o="currentColor"}=t;return e.$$set=e=>{"src"in e&&n(0,i=e.src),"size"in e&&n(1,r=e.size),"style"in e&&n(2,s=e.style),"color"in e&&n(3,o=e.color)},[i,r,s,o]}class to extends Fe{constructor(e){super(),Ue(this,e,eo,Js,a,{src:0,size:1,style:2,color:3})}}var no=e=>e=/^\s+$/.test(e)?"‎":e.replaceAll(">",">").replaceAll("<","<").replaceAll("<br />","<br /><br />").replaceAll(">",">").replaceAll("<","<");function io(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g=no(e[6])+"";return i=new to({props:{src:"backend"===e[0]?e[4]:e[5],size:"32px",style:"align-self: flex-start; margin: 0px 10px;"}}),{c(){t=D("div"),n=D("div"),Pe(i.$$.fragment),r=V(),s=D("div"),o=D("div"),a=D("span"),l=V(),c=D("div"),u=R(e[1]),d=V(),h=D("div"),Y(a,"class","svelte-components-MessageBubble"),Y(o,"class","msg-text svelte-components-MessageBubble"),G(o,"hoverable",e[3]),G(o,"bkd","backend"===e[0]),G(o,"usr","user"===e[0]),Y(c,"class","timestamp svelte-components-MessageBubble"),G(c,"bkd","backend"===e[0]),G(c,"usr","user"===e[0]),Y(s,"class","text-container svelte-components-MessageBubble"),G(s,"bkd","backend"===e[0]),G(s,"usr","user"===e[0]),Y(n,"class","container svelte-components-MessageBubble"),G(n,"bkd","backend"===e[0]),G(n,"usr","user"===e[0]),Y(t,"class","msg svelte-components-MessageBubble"),G(t,"bkd","backend"===e[0]),G(t,"usr","user"===e[0]),G(t,"sent",!e[2])},m(v,y){I(v,t,y),A(t,n),Re(i,n,null),A(n,r),A(n,s),A(s,o),A(o,a),a.innerHTML=g,A(s,l),A(s,c),A(c,u),A(s,d),A(s,h),f=!0,p||(m=F(o,"click",e[9]),p=!0)},p(e,[r]){const l={};49&r&&(l.src="backend"===e[0]?e[4]:e[5]),i.$set(l),(!f||64&r)&&g!==(g=no(e[6])+"")&&(a.innerHTML=g),8&r&&G(o,"hoverable",e[3]),1&r&&G(o,"bkd","backend"===e[0]),1&r&&G(o,"usr","user"===e[0]),(!f||2&r)&&j(u,e[1]),1&r&&G(c,"bkd","backend"===e[0]),1&r&&G(c,"usr","user"===e[0]),1&r&&G(s,"bkd","backend"===e[0]),1&r&&G(s,"usr","user"===e[0]),1&r&&G(n,"bkd","backend"===e[0]),1&r&&G(n,"usr","user"===e[0]),1&r&&G(t,"bkd","backend"===e[0]),1&r&&G(t,"usr","user"===e[0]),4&r&&G(t,"sent",!e[2])},i(e){f||(ke(i.$$.fragment,e),f=!0)},o(e){Ae(i.$$.fragment,e),f=!1},d(e){e&&M(t),Ve(i),p=!1,m()}}}function ro(e,t,n){let{speaker:i}=t,{text:r=""}=t,{timestamp:s=""}=t,{is_sent:o=!0}=t,{clickable:a=!1}=t,{server_avatar:l=""}=t,{user_avatar:c=""}=t,{searchInput:u=""}=t,d="";return e.$$set=e=>{"speaker"in e&&n(0,i=e.speaker),"text"in e&&n(7,r=e.text),"timestamp"in e&&n(1,s=e.timestamp),"is_sent"in e&&n(2,o=e.is_sent),"clickable"in e&&n(3,a=e.clickable),"server_avatar"in e&&n(4,l=e.server_avatar),"user_avatar"in e&&n(5,c=e.user_avatar),"searchInput"in e&&n(8,u=e.searchInput)},e.$$.update=()=>{256&e.$$.dirty&&n(6,d=(e=>{if(e){const t=new RegExp((e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(e),"gi");return r.replace(/(<mark class="highlight">|<\/mark>)/gim,"").replace(t,"<span class='highlight' >$&</span>")}return r})(u))},[i,s,o,a,l,c,d,r,u,function(t){ae.call(this,e,t)}]}class so extends Fe{constructor(e){super(),Ue(this,e,ro,io,a,{speaker:0,text:7,timestamp:1,is_sent:2,clickable:3,server_avatar:4,user_avatar:5,searchInput:8})}}function oo(e){let t,n;return{c(){t=D("div"),n=R(e[0]),Y(t,"class","timestamp svelte-components-MessageInfo"),B(t,"text-align","center")},m(e,i){I(e,t,i),A(t,n)},p(e,t){1&t&&j(n,e[0])},d(e){e&&M(t)}}}function ao(e){let t,n,i,r,s,o,a;const l=e[2].default,c=f(l,e,e[1],null);let u=e[0]&&oo(e);return{c(){t=D("div"),n=D("div"),i=D("div"),c&&c.c(),r=V(),u&&u.c(),s=V(),o=D("div"),Y(i,"class","msg-text svelte-components-MessageInfo"),Y(n,"class","container svelte-components-MessageInfo"),Y(t,"class","msg svelte-components-MessageInfo")},m(e,l){I(e,t,l),A(t,n),A(n,i),c&&c.m(i,null),A(n,r),u&&u.m(n,null),A(n,s),A(n,o),a=!0},p(e,[t]){c&&c.p&&(!a||2&t)&&g(c,l,e,e[1],a?m(l,e[1],t,null):v(e[1]),null),e[0]?u?u.p(e,t):(u=oo(e),u.c(),u.m(n,s)):u&&(u.d(1),u=null)},i(e){a||(ke(c,e),a=!0)},o(e){Ae(c,e),a=!1},d(e){e&&M(t),c&&c.d(e),u&&u.d()}}}function lo(e,t,n){let{$$slots:i={},$$scope:r}=t,{timestamp:s}=t;return e.$$set=e=>{"timestamp"in e&&n(0,s=e.timestamp),"$$scope"in e&&n(1,r=e.$$scope)},[s,r,i]}class co extends Fe{constructor(e){super(),Ue(this,e,lo,ao,a,{timestamp:0})}}function uo(e){let t,n,i,r,s,o,a,l;return n=new ji({props:{size:4}}),{c(){t=D("div"),Pe(n.$$.fragment),i=V(),r=D("img"),Y(t,"class","chat-media placeholder center-text svelte-components-ImageComponent"),G(t,"hidden",!e[2]),c(r.src,s=e[0])||Y(r,"src",s),Y(r,"alt","image"),Y(r,"class","chat-media svelte-components-ImageComponent"),G(r,"hidden",e[2])},m(s,c){I(s,t,c),Re(n,t,null),I(s,i,c),I(s,r,c),o=!0,a||(l=F(r,"load",e[4]),a=!0)},p(e,n){4&n&&G(t,"hidden",!e[2]),(!o||1&n&&!c(r.src,s=e[0]))&&Y(r,"src",s),4&n&&G(r,"hidden",e[2])},i(e){o||(ke(n.$$.fragment,e),o=!0)},o(e){Ae(n.$$.fragment,e),o=!1},d(e){e&&M(t),Ve(n),e&&M(i),e&&M(r),a=!1,l()}}}function ho(e){let t,n;return t=new co({props:{timestamp:e[1]&&hi(e[1]).fromNow(),$$slots:{default:[uo]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,[n]){const i={};2&n&&(i.timestamp=e[1]&&hi(e[1]).fromNow()),45&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function fo(e,t,n){let i;h(e,Wi,(e=>n(3,i=e)));let{media:r}=t,{timestamp:s}=t,o=!0;return e.$$set=e=>{"media"in e&&n(0,r=e.media),"timestamp"in e&&n(1,s=e.timestamp)},[r,s,o,i,()=>{me().then((()=>(n(2,o=!1),b(Wi,i=!0,i))))}]}class po extends Fe{constructor(e){super(),Ue(this,e,fo,ho,a,{media:0,timestamp:1})}}function mo(e,t,n){const i=e.slice();return i[29]=t[n].timestamp,i[30]=t[n].text,i[31]=t[n].type,i[32]=t[n].media,i[33]=t[n].visible,i[34]=t[n].speaker,i[35]=t[n].isSent,i[36]=t[n].url,i}function go(e){let t,n,i,r;function s(t){e[16](t)}function a(t){e[17](t)}function l(){return e[18](e[36])}let c={searchInput:e[4],text:e[30],speaker:e[34],timestamp:hi(e[29]).fromNow(),is_sent:e[35],clickable:!!e[36]};return void 0!==e[0]&&(c.server_avatar=e[0]),void 0!==e[1]&&(c.user_avatar=e[1]),t=new so({props:c}),ce.push((()=>De(t,"server_avatar",s))),ce.push((()=>De(t,"user_avatar",a))),t.$on("click",(function(){o(e[36]&&l)&&(e[36]&&l).apply(this,arguments)})),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),r=!0},p(r,s){e=r;const o={};16&s[0]&&(o.searchInput=e[4]),64&s[0]&&(o.text=e[30]),64&s[0]&&(o.speaker=e[34]),64&s[0]&&(o.timestamp=hi(e[29]).fromNow()),64&s[0]&&(o.is_sent=e[35]),64&s[0]&&(o.clickable=!!e[36]),!n&&1&s[0]&&(n=!0,o.server_avatar=e[0],ve((()=>n=!1))),!i&&2&s[0]&&(i=!0,o.user_avatar=e[1],ve((()=>i=!1))),t.$set(o)},i(e){r||(ke(t.$$.fragment,e),r=!0)},o(e){Ae(t.$$.fragment,e),r=!1},d(e){Ve(t,e)}}}function vo(e){let t,n;return t=new po({props:{media:e[32],timestamp:e[29]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.media=e[32]),64&n[0]&&(i.timestamp=e[29]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function yo(e){let t,n;return t=new co({props:{timestamp:e[29]&&hi(e[29]).fromNow(),$$slots:{default:[_o]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.timestamp=e[29]&&hi(e[29]).fromNow()),64&n[0]|256&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function _o(e){let t,n,i=no(e[30])+"";return{c(){t=new q,n=U(),t.a=n},m(e,r){t.m(i,e,r),I(e,n,r)},p(e,n){64&n[0]&&i!==(i=no(e[30])+"")&&t.p(i)},d(e){e&&M(n),e&&t.d()}}}function $o(e){let t,n,i,r;const s=[yo,vo,go],o=[];function a(e,t){return"info"===e[31]?0:"media"===e[31]?1:e[33]?2:-1}return~(t=a(e))&&(n=o[t]=s[t](e)),{c(){n&&n.c(),i=U()},m(e,n){~t&&o[t].m(e,n),I(e,i,n),r=!0},p(e,r){let l=t;t=a(e),t===l?~t&&o[t].p(e,r):(n&&(Te(),Ae(o[l],1,1,(()=>{o[l]=null})),Se()),~t?(n=o[t],n?n.p(e,r):(n=o[t]=s[t](e),n.c()),ke(n,1),n.m(i.parentNode,i)):n=null)},i(e){r||(ke(n),r=!0)},o(e){Ae(n),r=!1},d(e){~t&&o[t].d(e),e&&M(i)}}}function wo(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w,b;s=new to({props:{src:e[3],size:"1.0em",style:"margin-right: 1em;"}});let x=e[6],E=[];for(let t=0;t<x.length;t+=1)E[t]=$o(mo(e,x,t));const C=e=>Ae(E[e],1,1,(()=>{E[e]=null}));return _=new Ws({}),_.$on("userInput",e[20]),_.$on("skip",e[21]),_.$on("replay",e[22]),_.$on("optionSelected",e[10]),_.$on("processUserInput",e[11]),{c(){t=D("div"),n=D("div"),i=D("div"),r=D("div"),Pe(s.$$.fragment),o=V(),a=D("div"),l=R(e[2]),c=V(),u=D("div"),d=D("input"),f=V(),p=D("div"),m=D("div");for(let e=0;e<E.length;e+=1)E[e].c();g=V(),v=D("div"),y=V(),Pe(_.$$.fragment),B(a,"font-size","small"),B(r,"display","flex"),B(r,"margin-bottom","0.5em"),Y(r,"class","hide-phone"),Y(d,"class","search-field svelte-components-Chat"),Y(d,"placeholder",h=e[9]("chat-component.search-bar.placeholder")),Y(d,"type","search"),Y(u,"class","search svelte-components-Chat"),Y(i,"class","chat-header svelte-components-Chat"),Y(n,"class","header-container svelte-components-Chat"),G(n,"hide-component",e[7]||e[8]),B(v,"height","1px"),Y(m,"class","msgs svelte-components-Chat"),Y(p,"class","msgs-container svelte-components-Chat"),G(p,"hide-component",e[7]||e[8]),Y(t,"class","chat-container svelte-components-Chat")},m(h,x){I(h,t,x),A(t,n),A(n,i),A(i,r),Re(s,r,null),A(r,o),A(r,a),A(a,l),A(i,c),A(i,u),A(u,d),z(d,e[4]),A(t,f),A(t,p),A(p,m);for(let e=0;e<E.length;e+=1)E[e].m(m,null);A(m,g),A(m,v),e[19](p),A(t,y),Re(_,t,null),$=!0,w||(b=F(d,"input",e[15]),w=!0)},p(e,t){const i={};if(8&t[0]&&(i.src=e[3]),s.$set(i),(!$||4&t[0])&&j(l,e[2]),(!$||512&t[0]&&h!==(h=e[9]("chat-component.search-bar.placeholder")))&&Y(d,"placeholder",h),16&t[0]&&z(d,e[4]),384&t[0]&&G(n,"hide-component",e[7]||e[8]),4179&t[0]){let n;for(x=e[6],n=0;n<x.length;n+=1){const i=mo(e,x,n);E[n]?(E[n].p(i,t),ke(E[n],1)):(E[n]=$o(i),E[n].c(),ke(E[n],1),E[n].m(m,g))}for(Te(),n=x.length;n<E.length;n+=1)C(n);Se()}384&t[0]&&G(p,"hide-component",e[7]||e[8])},i(e){if(!$){ke(s.$$.fragment,e);for(let e=0;e<x.length;e+=1)ke(E[e]);ke(_.$$.fragment,e),$=!0}},o(e){Ae(s.$$.fragment,e),E=E.filter(Boolean);for(let e=0;e<E.length;e+=1)Ae(E[e]);Ae(_.$$.fragment,e),$=!1},d(n){n&&M(t),Ve(s),N(E,n),e[19](null),Ve(_),w=!1,b()}}}function bo(e,t,n){let i,r,s,o,a,l,c;h(e,Bi,(e=>n(13,r=e))),h(e,hs,(e=>n(24,s=e))),h(e,Wi,(e=>n(14,o=e))),h(e,vs,(e=>n(7,a=e))),h(e,ys,(e=>n(8,l=e))),h(e,li,(e=>n(9,c=e)));let{name:u}=t,{server_avatar:d=""}=t,{user_avatar:f=""}=t,{header_avatar:p=""}=t;const m=re();let g;function v(){g&&g.scrollTop<g.scrollHeight&&n(5,g.scrollTop=g.scrollHeight+1e3,g)}ne((async()=>{await document.fonts.ready.then((()=>{v(),"smooth"!==g.style.scrollBehavior&&n(5,g.style.scrollBehavior="smooth",g),setTimeout((()=>{v()}),100)}));let e=r.length;Bi.subscribe((t=>{e!==r.length&&r[r.length-1]?.visible&&(b(Wi,o=!0,o),e=t.length)}))}));const y=e=>{m("play",e)};let _="";return e.$$set=e=>{"name"in e&&n(2,u=e.name),"server_avatar"in e&&n(0,d=e.server_avatar),"user_avatar"in e&&n(1,f=e.user_avatar),"header_avatar"in e&&n(3,p=e.header_avatar)},e.$$.update=()=>{16384&e.$$.dirty[0]&&o&&(setTimeout(v,50),b(Wi,o=!1,o)),8208&e.$$.dirty[0]&&n(6,i=r.filter((({text:e})=>!_||!e||e.toLowerCase().includes(_.toLowerCase()))))},[d,f,u,p,_,g,i,a,l,c,e=>{const t=e.detail.text;m("userInput",t),b(Wi,o=!0,o)},()=>{s&&!/^\s+$/.test(s)&&m("userInput",s),b(hs,s="",s)},y,r,o,function(){_=this.value,n(4,_)},function(e){d=e,n(0,d)},function(e){f=e,n(1,f)},e=>y(e),function(e){ce[e?"unshift":"push"]((()=>{g=e,n(5,g)}))},function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)}]}class xo extends Fe{constructor(e){super(),Ue(this,e,bo,wo,a,{name:2,server_avatar:0,user_avatar:1,header_avatar:3},null,[-1,-1])}}function Eo(e){let t,n,i,r,o,a;const l=e[3].default,c=f(l,e,e[2],null);return{c(){t=D("div"),n=D("div"),c&&c.c(),Y(n,"class","container svelte-components-Modal"),Y(t,"class","modal center-text full-screen svelte-components-Modal")},m(i,s){I(i,t,s),A(t,n),c&&c.m(n,null),r=!0,o||(a=[F(window,"keydown",e[0]),F(n,"keydown",e[0])],o=!0)},p(e,[t]){c&&c.p&&(!r||4&t)&&g(c,l,e,e[2],r?m(l,e[2],t,null):v(e[2]),null)},i(e){r||(ke(c,e),ge((()=>{i||(i=Le(t,pi,{},!0)),i.run(1)})),r=!0)},o(e){Ae(c,e),i||(i=Le(t,pi,{},!1)),i.run(0),r=!1},d(e){e&&M(t),c&&c.d(e),e&&i&&i.end(),o=!1,s(a)}}}function Co(e,t,n){let{$$slots:i={},$$scope:r}=t,{onEscCb:s=(()=>null)}=t;return e.$$set=e=>{"onEscCb"in e&&n(1,s=e.onEscCb),"$$scope"in e&&n(2,r=e.$$scope)},[e=>{"Escape"===e.key&&s()},s,r,i]}class To extends Fe{constructor(e){super(),Ue(this,e,Co,Eo,a,{onEscCb:1})}}function So(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w=e[0]("microphone-access.title")+"",b=e[0]("microphone-access.paragraph-1")+"",x=e[0]("microphone-access.paragraph-2")+"",E=e[0]("microphone-access.link")+"",C=e[0]("microphone-access.paragraph-3")+"",T=e[0]("microphone-access.exit")+"";return{c(){t=D("h2"),n=R(w),i=V(),r=D("p"),s=R(b),o=V(),a=D("p"),l=R(x),c=V(),u=D("a"),d=R(E),h=R("\n ."),f=V(),p=D("p"),m=R(C),g=V(),v=D("button"),y=R(T),Y(t,"class","svelte-components-MicrophoneAccess"),Y(r,"class","svelte-components-MicrophoneAccess"),Y(u,"href","https://csi-covid19.github.io/Technology/enable-microphone.pdf"),Y(u,"target","_blank"),Y(u,"rel","noreferrer noopener"),Y(a,"class","svelte-components-MicrophoneAccess"),Y(p,"class","svelte-components-MicrophoneAccess"),Y(v,"class","svelte-components-MicrophoneAccess")},m(w,b){I(w,t,b),A(t,n),I(w,i,b),I(w,r,b),A(r,s),I(w,o,b),I(w,a,b),A(a,l),A(a,c),A(a,u),A(u,d),A(a,h),I(w,f,b),I(w,p,b),A(p,m),I(w,g,b),I(w,v,b),A(v,y),_||($=F(v,"click",e[1]),_=!0)},p(e,t){1&t&&w!==(w=e[0]("microphone-access.title")+"")&&j(n,w),1&t&&b!==(b=e[0]("microphone-access.paragraph-1")+"")&&j(s,b),1&t&&x!==(x=e[0]("microphone-access.paragraph-2")+"")&&j(l,x),1&t&&E!==(E=e[0]("microphone-access.link")+"")&&j(d,E),1&t&&C!==(C=e[0]("microphone-access.paragraph-3")+"")&&j(m,C),1&t&&T!==(T=e[0]("microphone-access.exit")+"")&&j(y,T)},d(e){e&&M(t),e&&M(i),e&&M(r),e&&M(o),e&&M(a),e&&M(f),e&&M(p),e&&M(g),e&&M(v),_=!1,$()}}}function ko(e){let t,n;return t=new To({props:{onEscCb:e[1],$$slots:{default:[So]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,[n]){const i={};17&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Ao(e,t,n){let i,r;h(e,gi,(e=>n(3,i=e))),h(e,li,(e=>n(0,r=e)));let{asrModal:s=!0}=t;return e.$$set=e=>{"asrModal"in e&&n(2,s=e.asrModal)},[r,()=>{n(2,s=!1),b(gi,i=!1,i)},s]}class Oo extends Fe{constructor(e){super(),Ue(this,e,Ao,ko,a,{asrModal:2})}}function Lo(t){let n,i,r,s,o,a,l;return{c(){n=P("svg"),i=P("path"),r=P("path"),s=P("path"),o=P("path"),a=P("path"),l=P("path"),Y(i,"d","M9.93333 9.5333C11.7333 9.5333 13.1333 8.06664 13.1333 6.26664C13.1333 4.46663 11.6667 3.06664 9.86666 3.06664C8.06666 3.06664 6.66666 4.5333 6.66666 6.26664C6.66666 8.06664 8.13333 9.5333 9.93333 9.5333ZM9.86666 4.39997C9.93333 4.39997 9.93333 4.39997 9.86666 4.39997C10.9333 4.39997 11.8 5.26664 11.8 6.3333C11.8 7.39997 10.9333 8.19997 9.86666 8.19997C8.8 8.19997 8 7.3333 8 6.3333C8 5.26664 8.86666 4.39997 9.86666 4.39997V4.39997Z"),Y(i,"fill",t[2]),Y(i,"fill-opacity","0.5"),Y(r,"d","M19.8 9.13337C18.5333 8.00004 16.8667 7.40004 15.1333 7.4667H14.6C14.4667 8.00004 14.2667 8.4667 14 8.8667C14.4 8.80004 14.7333 8.80004 15.1333 8.80004C16.4 8.73337 17.6667 9.13337 18.6667 9.8667V14.6667H20V9.33337L19.8 9.13337Z"),Y(r,"fill","black"),Y(r,"fill-opacity","0.5"),Y(s,"d","M13.6 3.20006C13.9333 2.40006 14.8667 2.00006 15.7333 2.3334C16.5333 2.66673 16.9333 3.60006 16.6 4.46673C16.3333 5.06673 15.7333 5.46673 15.1333 5.46673C15 5.46673 14.8 5.46673 14.6667 5.40006C14.7333 5.7334 14.7333 6.06673 14.7333 6.3334V6.7334C14.8667 6.7334 15 6.80006 15.1333 6.80006C16.8 6.80006 18.1333 5.46673 18.1333 3.86673C18.1333 2.20006 16.8 0.86673 15.2 0.86673C14.1333 0.86673 13.2 1.40006 12.6667 2.3334C13 2.5334 13.3333 2.80006 13.6 3.20006V3.20006Z"),Y(s,"fill","black"),Y(s,"fill-opacity","0.5"),Y(o,"d","M6 8.93333C5.73333 8.53333 5.53333 8.06666 5.4 7.53333H4.86667C3.13333 7.46666 1.46667 8.06666 0.2 9.13333L0 9.33333V14.6667H1.33333V9.86666C2.4 9.13333 3.6 8.73333 4.86667 8.8C5.26667 8.8 5.66667 8.86666 6 8.93333Z"),Y(o,"fill","black"),Y(o,"fill-opacity","0.5"),Y(a,"d","M4.86666 6.73328C5 6.73328 5.13333 6.73328 5.26666 6.66662V6.26662C5.26666 5.93328 5.26666 5.59995 5.33333 5.33328C5.2 5.39995 5 5.39995 4.86666 5.39995C4 5.39995 3.26666 4.66662 3.26666 3.79995C3.26666 2.93328 4 2.19995 4.86666 2.19995C5.53333 2.19995 6.13333 2.59995 6.4 3.19995C6.66666 2.86662 7.06666 2.53328 7.4 2.26662C6.53333 0.866615 4.73333 0.399949 3.33333 1.26662C1.93333 2.13328 1.46666 3.93328 2.33333 5.33328C2.86666 6.19995 3.8 6.73328 4.86666 6.73328V6.73328Z"),Y(a,"fill","black"),Y(a,"fill-opacity","0.5"),Y(l,"d","M15.4 13.1333L15.2667 12.9333C13.9333 11.4667 12.0667 10.6 10.0667 10.6667C8.06667 10.6 6.13333 11.4667 4.8 12.9333L4.66667 13.1333V18.2C4.66667 18.8 5.13333 19.3333 5.8 19.3333H14.3333C14.9333 19.3333 15.4667 18.8 15.4667 18.2V13.1333H15.4ZM14.0667 18H6V13.6C7.06667 12.5333 8.53333 12 10.0667 12C11.5333 11.9333 13 12.5333 14.0667 13.6V18Z"),Y(l,"fill","black"),Y(l,"fill-opacity","0.5"),Y(n,"height",t[1]),Y(n,"width",t[0]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o),A(n,a),A(n,l)},p(e,[t]){4&t&&Y(i,"fill",e[2]),2&t&&Y(n,"height",e[1]),1&t&&Y(n,"width",e[0]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Io(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 20 20"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Mo extends Fe{constructor(e){super(),Ue(this,e,Io,Lo,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function No(e){let t,n,i,r,s,o,a,l,c,u,d,h,f=e[2]("video-component.session-count")+"";return i=new Mo({props:{size:"1.5em"}}),{c(){t=D("div"),n=D("div"),Pe(i.$$.fragment),r=V(),s=D("div"),o=D("span"),a=R(f),l=V(),c=D("span"),u=D("span"),d=R(e[0]),Y(n,"class","icon svelte-components-UserCount"),B(o,"opacity","0.7"),Y(u,"style",""),Y(c,"class","session-counter svelte-components-UserCount"),Y(s,"class","icon user-count-text svelte-components-UserCount"),Y(t,"class","user-count hide-phone svelte-components-UserCount"),G(t,"horizontal-screen",e[1])},m(e,f){I(e,t,f),A(t,n),Re(i,n,null),A(t,r),A(t,s),A(s,o),A(o,a),A(s,l),A(s,c),A(c,u),A(u,d),h=!0},p(e,[n]){(!h||4&n)&&f!==(f=e[2]("video-component.session-count")+"")&&j(a,f),(!h||1&n)&&j(d,e[0]),2&n&&G(t,"horizontal-screen",e[1])},i(e){h||(ke(i.$$.fragment,e),h=!0)},o(e){Ae(i.$$.fragment,e),h=!1},d(e){e&&M(t),Ve(i)}}}function Do(e,t,n){let i,r;h(e,ys,(e=>n(1,i=e))),h(e,li,(e=>n(2,r=e)));let{sessionCount:s=0}=t;return e.$$set=e=>{"sessionCount"in e&&n(0,s=e.sessionCount)},[s,i,r]}class Po extends Fe{constructor(e){super(),Ue(this,e,Do,No,a,{sessionCount:0})}}const Ro=He("");function Vo(t){let n,i,r,s,o,a;return{c(){n=P("svg"),i=P("rect"),r=P("path"),s=P("path"),o=P("path"),a=P("path"),Y(i,"width","26"),Y(i,"height","26"),Y(i,"rx","10"),Y(i,"fill",t[2]),Y(r,"d","M13.3262 21.8462L15.4095 20.1795M13.3262 21.8462V14.3462V21.8462ZM13.3262 21.8462L11.2428 20.1795L13.3262 21.8462Z"),Y(r,"stroke","white"),Y(r,"stroke-width","2"),Y(r,"stroke-linecap","round"),Y(r,"stroke-linejoin","round"),Y(s,"d","M7.52118 11.1103C6.73302 11.3086 6.04441 11.7879 5.58473 12.4582C5.12504 13.1284 4.92592 13.9434 5.02477 14.7501C5.12362 15.5568 5.51365 16.2996 6.12157 16.839C6.72949 17.3785 7.51346 17.6773 8.32618 17.6795H9.15951"),Y(s,"stroke","white"),Y(s,"stroke-width","2"),Y(s,"stroke-linecap","round"),Y(s,"stroke-linejoin","round"),Y(o,"d","M16.5179 9.46112C16.233 8.33326 15.53 7.3559 14.5513 6.72717C13.5726 6.09843 12.3914 5.86536 11.2472 6.07521C10.1031 6.28505 9.08147 6.92211 8.38957 7.85723C7.69768 8.79236 7.38724 9.95559 7.52119 11.1111C7.52119 11.1111 7.64869 11.8461 7.90952 12.2628"),Y(o,"stroke","white"),Y(o,"stroke-width","2"),Y(o,"stroke-linecap","round"),Y(o,"stroke-linejoin","round"),Y(a,"d","M17.4928 17.6795C18.0812 17.6791 18.6628 17.5541 19.1994 17.3127C19.736 17.0713 20.2153 16.719 20.6059 16.279C20.9966 15.8391 21.2896 15.3213 21.4657 14.7599C21.6418 14.1985 21.697 13.6062 21.6277 13.0219C21.5583 12.4377 21.3661 11.8747 21.0635 11.3701C20.7609 10.8655 20.3549 10.4307 19.8722 10.0943C19.3895 9.75792 18.841 9.52758 18.2628 9.41845C17.6847 9.30932 17.09 9.32388 16.5178 9.46115L15.4095 9.76282"),Y(a,"stroke","white"),Y(a,"stroke-width","2"),Y(a,"stroke-linecap","round"),Y(a,"stroke-linejoin","round"),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"fill",t[2]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o),A(n,a)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3]),4&t&&Y(n,"fill",e[2])},i:e,o:e,d(e){e&&M(n)}}}function Uo(e,t,n){let{size:i="1em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 26 26"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Fo extends Fe{constructor(e){super(),Ue(this,e,Uo,Vo,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Yo(e){let t,n,i,r,s,o,a,l,c,u,d=e[2]("video-component.download")+"";return r=new Fo({props:{size:"1.5em"}}),{c(){t=D("div"),n=D("div"),i=D("div"),Pe(r.$$.fragment),s=V(),o=D("div"),a=R(d),Y(i,"class","icon download hide-phone svelte-components-DownloadButton"),G(i,"hidden",!e[1]),B(o,"color","rgb(var(--download-button-font))"),Y(n,"class","download-area svelte-components-DownloadButton"),Y(t,"class","download-container svelte-components-DownloadButton"),G(t,"download-horizontal",e[0])},m(d,h){I(d,t,h),A(t,n),A(n,i),Re(r,i,null),A(n,s),A(n,o),A(o,a),l=!0,c||(u=F(n,"click",e[3]),c=!0)},p(e,[n]){2&n&&G(i,"hidden",!e[1]),(!l||4&n)&&d!==(d=e[2]("video-component.download")+"")&&j(a,d),1&n&&G(t,"download-horizontal",e[0])},i(e){l||(ke(r.$$.fragment,e),l=!0)},o(e){Ae(r.$$.fragment,e),l=!1},d(e){e&&M(t),Ve(r),c=!1,u()}}}function Ho(e,t,n){let i,r,s;h(e,ys,(e=>n(0,i=e))),h(e,Ro,(e=>n(1,r=e))),h(e,li,(e=>n(2,s=e)));return[i,r,s,()=>(async(e,t="video.mp4")=>{const n=await fetch(e+"?nocache"),i=await n.blob(),r=URL.createObjectURL(i),s=document.createElement("a");s.style.display="none",s.href=r,s.download=t,s.click(),s.remove()})(r)]}class jo extends Fe{constructor(e){super(),Ue(this,e,Ho,Yo,a,{})}}function zo(t){let n,i;return{c(){n=P("svg"),i=P("circle"),Y(i,"cx","5"),Y(i,"cy","5"),Y(i,"r","5"),Y(i,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){4&t&&Y(i,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Bo(e,t,n){let{size:i="0.6em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 10 10"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Go extends Fe{constructor(e){super(),Ue(this,e,Bo,zo,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Wo(t){let n,i,r,s,o,a;return{c(){n=P("svg"),i=P("path"),r=P("path"),s=P("path"),o=P("path"),a=P("path"),Y(i,"class","logo-letter"),Y(i,"d","M0,59.61C0,21.58,22,0,57.22,0c30.44,0,53.46,19.82,53.54,48.43H78.31C77.51,35.32,69,26.61,57.22,26.61c-13.91,0-22.7,12.31-22.7,32.92,0,20.86,8.71,33.17,22.78,33.17,11.66,0,20.13-8.55,21.17-21.9h32.45c-.16,28.77-22.62,48.51-53.7,48.51C21.9,119.31,0,97.65,0,59.61Z"),Y(r,"class","logo-letter"),Y(r,"d","M192.3,117.31H158.42V2h51.22c30.77,0,46.59,14.46,46.59,39.15,0,13.59-6.55,26.69-18.62,32.45l21.9,43.71H221.63L203.41,78.63H192.3Zm0-61h14c9.5,0,15.34-5.84,15.34-14.55,0-8.55-6.16-14.7-15.27-14.7H192.3Z"),Y(s,"class","logo-letter"),Y(s,"d","M418,59.69c0,36.84-22.46,59.62-58.1,59.62s-58.09-22.78-58.09-59.62S324.27,0,359.91,0,418,22.85,418,59.69Zm-81.67,0c0,19.9,9.35,32.61,23.57,32.61s23.58-12.71,23.58-32.61S374.06,27,359.91,27,336.34,39.72,336.34,59.69Z"),Y(o,"class","logo-letter"),Y(o,"d","M518.81,117.31h-32L457.12,2h35l13.27,72.88H506L523.21,2h26.21L566.6,74.88h.64L580.5,2h35L585.78,117.31h-32l-17.18-66H536Z"),Y(a,"class","logo-letter"),Y(a,"d","M710.7,2c35,0,55.54,19.9,55.54,56.81s-20.61,58.5-55.54,58.5H661.4V2ZM695.28,90.38h10.63c16.94,0,25.81-10.31,25.81-31.57,0-19.41-9.59-29.88-25.81-29.88H695.28Z"),Y(n,"viewBox",t[3]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"fill",t[2])},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o),A(n,a)},p(e,[t]){8&t&&Y(n,"viewBox",e[3]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),4&t&&Y(n,"fill",e[2])},i:e,o:e,d(e){e&&M(n)}}}function qo(e,t,n){let{size:i="2em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 766.24 119.31"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Zo extends Fe{constructor(e){super(),Ue(this,e,qo,Wo,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Xo(t){let n,i,r;return{c(){n=P("svg"),i=P("path"),r=P("path"),Y(i,"d","M19.9294 11.5064L19.9294 15.3659L28.7978 15.3659L28.7978 24.2343L32.6573 24.2343L32.6573 11.5084L32.6553 11.5084L32.6553 11.5064L19.9294 11.5064Z"),Y(i,"fill",t[2]),Y(r,"d","M24.2532 32.1537L24.2532 28.2942L15.3848 28.2942L15.3848 19.4258L11.5253 19.4258L11.5253 32.1518L11.5273 32.1517L11.5273 32.1537L24.2532 32.1537Z"),Y(r,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i),A(n,r)},p(e,[t]){4&t&&Y(i,"fill",e[2]),4&t&&Y(r,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function Ko(e,t,n){let{size:i="2.5em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 45 45"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class Qo extends Fe{constructor(e){super(),Ue(this,e,Ko,Xo,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function Jo(e){let t,n,i,r,s,o,a,l,u=e[6]("video-component.touch-to-start")+"";return{c(){t=D("div"),n=D("img"),r=V(),s=D("div"),o=R(u),Y(n,"alt","touch icon"),c(n.src,i=e[5].touch_to_start_icon)||Y(n,"src",i),Y(n,"class","touch-icon svelte-components-VideoMixerPlaceholder"),Y(s,"class","svelte-components-VideoMixerPlaceholder"),Y(t,"class","video-item start center-text full-screen-video svelte-components-VideoMixerPlaceholder")},m(e,i){I(e,t,i),A(t,n),A(t,r),A(t,s),A(s,o),l=!0},p(e,t){(!l||32&t&&!c(n.src,i=e[5].touch_to_start_icon))&&Y(n,"src",i),(!l||64&t)&&u!==(u=e[6]("video-component.touch-to-start")+"")&&j(o,u)},i(e){l||(ge((()=>{a||(a=Le(t,pi,{},!0)),a.run(1)})),l=!0)},o(e){a||(a=Le(t,pi,{},!1)),a.run(0),l=!1},d(e){e&&M(t),e&&a&&a.end()}}}function ea(e){let t,n,i,r,s=e[1]&&ta(e);return i=new jo({}),{c(){t=D("div"),s&&s.c(),n=V(),Pe(i.$$.fragment),Y(t,"class","video-header-right svelte-components-VideoMixerPlaceholder")},m(e,o){I(e,t,o),s&&s.m(t,null),A(t,n),Re(i,t,null),r=!0},p(e,i){e[1]?s?(s.p(e,i),2&i&&ke(s,1)):(s=ta(e),s.c(),ke(s,1),s.m(t,n)):s&&(Te(),Ae(s,1,1,(()=>{s=null})),Se())},i(e){r||(ke(s),ke(i.$$.fragment,e),r=!0)},o(e){Ae(s),Ae(i.$$.fragment,e),r=!1},d(e){e&&M(t),s&&s.d(),Ve(i)}}}function ta(e){let t,n;return t=new Po({props:{sessionCount:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.sessionCount=e[0]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function na(t){let n,i,r,s,o;return i=new Qo({}),{c(){n=D("div"),Pe(i.$$.fragment),Y(n,"class","full-screen-button svelte-components-VideoMixerPlaceholder")},m(e,t){I(e,n,t),Re(i,n,null),r=!0,s||(o=F(n,"click",_s),s=!0)},p:e,i(e){r||(ke(i.$$.fragment,e),r=!0)},o(e){Ae(i.$$.fragment,e),r=!1},d(e){e&&M(n),Ve(i),s=!1,o()}}}function ia(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g,v,y=e[6]("video-component.title")+"";r=new Go({}),m=new jo({});let _=e[1]&&ra(e);return{c(){t=D("div"),n=D("div"),i=D("div"),Pe(r.$$.fragment),s=V(),o=D("div"),a=D("span"),l=R(e[2]),c=V(),u=D("span"),u.textContent="BETA",d=V(),h=D("div"),f=R(y),p=V(),Pe(m.$$.fragment),g=V(),_&&_.c(),Y(i,"class","bulletpoint svelte-components-VideoMixerPlaceholder"),B(a,"opacity","0.9"),Y(a,"class","svelte-components-VideoMixerPlaceholder"),Y(u,"class","highlight svelte-components-VideoMixerPlaceholder"),B(h,"opacity","0.9"),h.hidden=!0,Y(h,"class","svelte-components-VideoMixerPlaceholder"),Y(o,"class","title-text svelte-components-VideoMixerPlaceholder"),Y(n,"class","hide-phone title svelte-components-VideoMixerPlaceholder"),Y(t,"class","video-bottom svelte-components-VideoMixerPlaceholder")},m(e,y){I(e,t,y),A(t,n),A(n,i),Re(r,i,null),A(n,s),A(n,o),A(o,a),A(a,l),A(o,c),A(o,u),A(o,d),A(o,h),A(h,f),A(n,p),Re(m,n,null),A(t,g),_&&_.m(t,null),v=!0},p(e,n){(!v||4&n)&&j(l,e[2]),(!v||64&n)&&y!==(y=e[6]("video-component.title")+"")&&j(f,y),e[1]?_?(_.p(e,n),2&n&&ke(_,1)):(_=ra(e),_.c(),ke(_,1),_.m(t,null)):_&&(Te(),Ae(_,1,1,(()=>{_=null})),Se())},i(e){v||(ke(r.$$.fragment,e),ke(m.$$.fragment,e),ke(_),v=!0)},o(e){Ae(r.$$.fragment,e),Ae(m.$$.fragment,e),Ae(_),v=!1},d(e){e&&M(t),Ve(r),Ve(m),_&&_.d()}}}function ra(e){let t,n;return t=new Po({props:{sessionCount:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.sessionCount=e[0]),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function sa(e){let t,n,i,r,s,o,a,l,c,u,d,h,p,y,_,$,w,b,x,E=e[3]&&Jo(e);o=new Zo({props:{size:"3em"}});let C=e[8]&&ea(e);const T=e[11].default,S=f(T,e,e[10],null);let k=!e[9]&&na();function O(t){e[12](t)}let L={};void 0!==e[4]&&(L.size=e[4]),y=new Mi({props:L}),ce.push((()=>De(y,"size",O))),y.$on("skip",e[13]),y.$on("replay",e[14]);let N=!e[8]&&!e[7]&&ia(e);return{c(){E&&E.c(),t=V(),n=D("div"),i=D("div"),r=D("div"),s=D("div"),Pe(o.$$.fragment),a=V(),l=D("span"),l.innerHTML='CROWD MEDIA - <em style="font-style: italic; opacity: 0.75;" class="svelte-components-VideoMixerPlaceholder">"We Ship"</em>',c=V(),C&&C.c(),u=V(),S&&S.c(),d=V(),k&&k.c(),h=V(),p=D("div"),Pe(y.$$.fragment),$=V(),w=D("div"),b=V(),N&&N.c(),B(l,"margin-left","3em"),B(l,"font-weight","200"),B(l,"opacity","0.9"),Y(l,"class","hide-phone svelte-components-VideoMixerPlaceholder"),Y(s,"class","video-header-left svelte-components-VideoMixerPlaceholder"),Y(r,"class","video-header svelte-components-VideoMixerPlaceholder"),G(r,"full-screen-hide",e[7]),Y(p,"class","controls backdrop-blur svelte-components-VideoMixerPlaceholder"),G(p,"full-screen-hide",e[7]||e[8]),Y(i,"class","video-container svelte-components-VideoMixerPlaceholder"),G(i,"is-full-screen-video",e[7]),Y(w,"class","rectangle svelte-components-VideoMixerPlaceholder"),Y(n,"class","video-container-container svelte-components-VideoMixerPlaceholder")},m(e,f){E&&E.m(e,f),I(e,t,f),I(e,n,f),A(n,i),A(i,r),A(r,s),Re(o,s,null),A(s,a),A(s,l),A(r,c),C&&C.m(r,null),A(i,u),S&&S.m(i,null),A(i,d),k&&k.m(i,null),A(i,h),A(i,p),Re(y,p,null),A(n,$),A(n,w),A(n,b),N&&N.m(n,null),x=!0},p(e,[s]){e[3]?E?(E.p(e,s),8&s&&ke(E,1)):(E=Jo(e),E.c(),ke(E,1),E.m(t.parentNode,t)):E&&(Te(),Ae(E,1,1,(()=>{E=null})),Se()),e[8]?C?(C.p(e,s),256&s&&ke(C,1)):(C=ea(e),C.c(),ke(C,1),C.m(r,null)):C&&(Te(),Ae(C,1,1,(()=>{C=null})),Se()),128&s&&G(r,"full-screen-hide",e[7]),S&&S.p&&(!x||1024&s)&&g(S,T,e,e[10],x?m(T,e[10],s,null):v(e[10]),null),e[9]?k&&(Te(),Ae(k,1,1,(()=>{k=null})),Se()):k?(k.p(e,s),512&s&&ke(k,1)):(k=na(),k.c(),ke(k,1),k.m(i,h));const o={};!_&&16&s&&(_=!0,o.size=e[4],ve((()=>_=!1))),y.$set(o),384&s&&G(p,"full-screen-hide",e[7]||e[8]),128&s&&G(i,"is-full-screen-video",e[7]),e[8]||e[7]?N&&(Te(),Ae(N,1,1,(()=>{N=null})),Se()):N?(N.p(e,s),384&s&&ke(N,1)):(N=ia(e),N.c(),ke(N,1),N.m(n,null))},i(e){x||(ke(E),ke(o.$$.fragment,e),ke(C),ke(S,e),ke(k),ke(y.$$.fragment,e),ke(N),x=!0)},o(e){Ae(E),Ae(o.$$.fragment,e),Ae(C),Ae(S,e),Ae(k),Ae(y.$$.fragment,e),Ae(N),x=!1},d(e){E&&E.d(e),e&&M(t),e&&M(n),Ve(o),C&&C.d(),S&&S.d(e),k&&k.d(),Ve(y),N&&N.d()}}}function oa(e,t,n){let i,r,s,o,a;h(e,Yr,(e=>n(5,i=e))),h(e,li,(e=>n(6,r=e))),h(e,vs,(e=>n(7,s=e))),h(e,ys,(e=>n(8,o=e))),h(e,gs,(e=>n(9,a=e)));let{$$slots:l={},$$scope:c}=t,{sessionCount:u=0}=t,{show_count:d=!1}=t,{name:f}=t,{start:p=!0}=t,m="2em";return e.$$set=e=>{"sessionCount"in e&&n(0,u=e.sessionCount),"show_count"in e&&n(1,d=e.show_count),"name"in e&&n(2,f=e.name),"start"in e&&n(3,p=e.start),"$$scope"in e&&n(10,c=e.$$scope)},[u,d,f,p,m,i,r,s,o,a,c,l,function(e){m=e,n(4,m)},function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)}]}class aa extends Fe{constructor(e){super(),Ue(this,e,oa,sa,a,{sessionCount:0,show_count:1,name:2,start:3})}}const la=He({x:0,y:0,distanceToBottom:0,distanceToRight:0});function ca(e){let t,n,i,r,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w,b,x,E,C,T,S,k,A,O,L,N,P,U,H,j,B,G,W;return{c(){t=D("br"),n=R("\n currentTime"),i=D("input"),r=R("\n duration"),o=D("input"),a=R("\n playDrift"),l=D("input"),c=V(),u=D("br"),d=R("\n src"),h=D("input"),f=V(),p=D("br"),m=R("\n src"),g=D("input"),v=V(),y=D("br"),_=R("\n\n paused"),$=D("input"),w=R("\n pausing"),b=D("input"),x=R("\n\n start"),E=D("input"),C=R("\n muted"),T=D("input"),S=R("\n loop"),k=D("input"),A=V(),O=D("br"),L=V(),N=D("input"),U=V(),H=D("input"),j=V(),B=D("input"),Y(i,"type","text"),Y(i,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(o,"type","text"),Y(o,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(l,"type","text"),Y(l,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(h,"class","lg svelte-components-VideoMixer1-VideoPlayer"),Y(h,"type","text"),Y(g,"class","lg svelte-components-VideoMixer1-VideoPlayer"),Y(g,"type","text"),Y($,"type","checkbox"),Y($,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(b,"type","checkbox"),Y(b,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(E,"type","checkbox"),Y(E,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(T,"type","checkbox"),Y(T,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(k,"type","checkbox"),Y(k,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(N,"type","button"),N.value=P=e[1]?"PLAY":"PAUSE",Y(N,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(H,"type","button"),H.value="set to 0",Y(H,"class","svelte-components-VideoMixer1-VideoPlayer"),Y(B,"type","button"),B.value="set to 2",Y(B,"class","svelte-components-VideoMixer1-VideoPlayer")},m(s,M){I(s,t,M),I(s,n,M),I(s,i,M),z(i,e[2]),I(s,r,M),I(s,o,M),z(o,e[3]),I(s,a,M),I(s,l,M),z(l,e[14]),I(s,c,M),I(s,u,M),I(s,d,M),I(s,h,M),z(h,e[10]),I(s,f,M),I(s,p,M),I(s,m,M),I(s,g,M),z(g,e[10]),I(s,v,M),I(s,y,M),I(s,_,M),I(s,$,M),$.checked=e[1],I(s,w,M),I(s,b,M),b.checked=e[9],I(s,x,M),I(s,E,M),E.checked=e[0],I(s,C,M),I(s,T,M),T.checked=e[18],I(s,S,M),I(s,k,M),k.checked=e[4],I(s,A,M),I(s,O,M),I(s,L,M),I(s,N,M),I(s,U,M),I(s,H,M),I(s,j,M),I(s,B,M),G||(W=[F(i,"input",e[35]),F(o,"input",e[36]),F(l,"input",e[37]),F(h,"input",e[38]),F(g,"input",e[39]),F($,"change",e[40]),F(b,"change",e[41]),F(E,"change",e[42]),F(T,"change",e[43]),F(k,"change",e[44]),F(N,"click",e[45]),F(H,"click",e[46]),F(B,"click",e[47])],G=!0)},p(e,t){4&t[0]&&i.value!==e[2]&&z(i,e[2]),8&t[0]&&o.value!==e[3]&&z(o,e[3]),16384&t[0]&&l.value!==e[14]&&z(l,e[14]),1024&t[0]&&h.value!==e[10]&&z(h,e[10]),1024&t[0]&&g.value!==e[10]&&z(g,e[10]),2&t[0]&&($.checked=e[1]),512&t[0]&&(b.checked=e[9]),1&t[0]&&(E.checked=e[0]),262144&t[0]&&(T.checked=e[18]),16&t[0]&&(k.checked=e[4]),2&t[0]&&P!==(P=e[1]?"PLAY":"PAUSE")&&(N.value=P)},d(e){e&&M(t),e&&M(n),e&&M(i),e&&M(r),e&&M(o),e&&M(a),e&&M(l),e&&M(c),e&&M(u),e&&M(d),e&&M(h),e&&M(f),e&&M(p),e&&M(m),e&&M(g),e&&M(v),e&&M(y),e&&M(_),e&&M($),e&&M(w),e&&M(b),e&&M(x),e&&M(E),e&&M(C),e&&M(T),e&&M(S),e&&M(k),e&&M(A),e&&M(O),e&&M(L),e&&M(N),e&&M(U),e&&M(H),e&&M(j),e&&M(B),G=!1,s(W)}}}function ua(t){let n,i,r,a,l,u,d,h,f,p,m,g,v,y=!1,_=!0;function $(){cancelAnimationFrame(f),n.paused||(f=T($),y=!0),t[27].call(n)}let b=t[8]&&ca(t);return{c(){n=D("video"),i=D("track"),p=V(),b&&b.c(),m=U(),Y(i,"kind","captions"),Y(n,"width",r=t[15].x),Y(n,"height",a=t[15].y),n.playsInline=!0,Y(n,"class",l=w(t[23].class)+" svelte-components-VideoMixer1-VideoPlayer"),Y(n,"style",u=`--fade-time: ${t[7]}s; ${!t[12]&&t[0]?"cursor: pointer":""}; ${t[11]?"opacity: 0":""}; ${t[5]};`),c(n.src,d=t[13])||Y(n,"src",d),n.muted=t[18],n.autoplay=h=!t[1]||t[0]&&t[18],n.loop=t[4],n.controls=!1,void 0===t[3]&&ge((()=>t[28].call(n))),G(n,"fade-out",t[6]&&(t[1]||t[9])),G(n,"full-screen",t[16]),G(n,"object-fit-cover",t[16]||t[17]),G(n,"outline",!vs)},m(e,r){I(e,n,r),A(n,i),I(e,p,r),b&&b.m(e,r),I(e,m,r),g||(v=[F(n,"canplay",t[25],{once:!0}),F(n,"loadedmetadata",t[26],{once:!0}),F(n,"timeupdate",$),F(n,"durationchange",t[28]),F(n,"play",t[29]),F(n,"pause",t[29]),F(n,"click",(function(){o(t[0]&&t[30])&&(t[0]&&t[30]).apply(this,arguments)}),{once:!0}),F(n,"pause",t[31]),F(n,"play",t[32]),F(n,"seeked",t[33]),F(n,"ended",t[34])],g=!0)},p(e,i){t=e,32768&i[0]&&r!==(r=t[15].x)&&Y(n,"width",r),32768&i[0]&&a!==(a=t[15].y)&&Y(n,"height",a),8388608&i[0]&&l!==(l=w(t[23].class)+" svelte-components-VideoMixer1-VideoPlayer")&&Y(n,"class",l),6305&i[0]&&u!==(u=`--fade-time: ${t[7]}s; ${!t[12]&&t[0]?"cursor: pointer":""}; ${t[11]?"opacity: 0":""}; ${t[5]};`)&&Y(n,"style",u),8192&i[0]&&!c(n.src,d=t[13])&&Y(n,"src",d),262144&i[0]&&(n.muted=t[18]),262147&i[0]&&h!==(h=!t[1]||t[0]&&t[18])&&(n.autoplay=h),16&i[0]&&(n.loop=t[4]),!y&&4&i[0]&&!isNaN(t[2])&&(n.currentTime=t[2]),y=!1,2&i[0]&&_!==(_=t[1])&&n[_?"pause":"play"](),8389186&i[0]&&G(n,"fade-out",t[6]&&(t[1]||t[9])),8454144&i[0]&&G(n,"full-screen",t[16]),8585216&i[0]&&G(n,"object-fit-cover",t[16]||t[17]),8388608&i[0]&&G(n,"outline",!vs),t[8]?b?b.p(t,i):(b=ca(t),b.c(),b.m(m.parentNode,m)):b&&(b.d(1),b=null)},i:e,o:e,d(e){e&&M(n),e&&M(p),b&&b.d(e),e&&M(m),g=!1,s(v)}}}function da(e,t,i){let r,s,o,a,l;h(e,Ro,(e=>i(10,r=e))),h(e,la,(e=>i(15,s=e))),h(e,vs,(e=>i(16,o=e))),h(e,ys,(e=>i(17,a=e))),h(e,gi,(e=>i(18,l=e)));let c,{start:u=!0}=t,{loop:d=!1}=t,{style:f=""}=t,{fadeOutPaused:p=!0}=t,{fadeTime:m=.3}=t,{paused:g=!0}=t,{currentTime:v=0}=t,{duration:_=0}=t,$=!1,w=!0,{debug:x=!1}=t,E=!1;const C=re(),T=e=>{i(2,v=e),!g&&O(1e3*v)},S=()=>{g&&(O(1e3*v),i(1,g=!1))},k=()=>window.performance.now();let A;const O=(e=0)=>i(24,A=k()-e);let L;return e.$$set=e=>{i(23,t=n(n({},t),y(e))),"start"in e&&i(0,u=e.start),"loop"in e&&i(4,d=e.loop),"style"in e&&i(5,f=e.style),"fadeOutPaused"in e&&i(6,p=e.fadeOutPaused),"fadeTime"in e&&i(7,m=e.fadeTime),"paused"in e&&i(1,g=e.paused),"currentTime"in e&&i(2,v=e.currentTime),"duration"in e&&i(3,_=e.duration),"debug"in e&&i(8,x=e.debug)},e.$$.update=()=>{1025&e.$$.dirty[0]&&(r?(i(1,g=!0),i(9,$=!1),qr(r).then((e=>{i(13,c=URL.createObjectURL(e)),C("displayChatMessage"),E&&u&&i(1,g=!1),i(11,w=!1)}))):u&&(i(11,w=!0),i(13,c="https://talking-ui-assets-staging.s3.eu-west-1.amazonaws.com/blank.mp4"))),654&e.$$.dirty[0]&&_>0&&!g&&!$&&v+m>=_&&i(9,$=!0),16777222&e.$$.dirty[0]&&!g&&i(14,L=k()-A-1e3*v)},t=y(t),[u,g,v,_,d,f,p,m,x,$,r,w,E,c,L,s,o,a,l,C,T,S,O,t,A,()=>C("ready"),()=>C("ready"),function(){v=this.currentTime,i(2,v)},function(){_=this.duration,i(3,_)},function(){g=this.paused,i(1,g),i(10,r),i(0,u)},()=>{b(gi,l=!1,l),i(12,E=!0),S(),C("firstClick")},()=>{C("pause"),i(2,v=0),i(9,$=!1)},()=>{O(1e3*v),i(9,$=!1)},()=>{O(1e3*v),i(9,$=!1)},()=>{C("ended"),i(2,v=0),i(9,$=!1)},function(){v=this.value,i(2,v)},function(){_=this.value,i(3,_)},function(){L=this.value,i(14,L),i(1,g),i(24,A),i(2,v),i(10,r),i(0,u)},function(){r=this.value,Ro.set(r)},function(){r=this.value,Ro.set(r)},function(){g=this.checked,i(1,g),i(10,r),i(0,u)},function(){$=this.checked,i(9,$),i(10,r),i(0,u),i(3,_),i(1,g),i(2,v),i(7,m)},function(){u=this.checked,i(0,u)},function(){l=this.checked,gi.set(l)},function(){d=this.checked,i(4,d)},()=>i(1,g=!g),()=>T(0),()=>T(2)]}class ha extends Fe{constructor(e){super(),Ue(this,e,da,ua,a,{start:0,loop:4,style:5,fadeOutPaused:6,fadeTime:7,paused:1,currentTime:2,duration:3,debug:8},null,[-1,-1])}}const{window:fa}=Ie;function pa(t){let n,i,r,o,a,l,u;return{c(){n=D("video"),i=D("track"),Y(i,"kind","captions"),n.playsInline=!0,Y(n,"class",r=w(t[7].class)+" svelte-components-VideoMixer1-VideoPlayerIdle"),Y(n,"style",o=`cursor: pointer; ${t[0]};`),c(n.src,a=t[1])||Y(n,"src",a),n.muted=!0,n.autoplay=!0,n.loop=!0,n.controls=!1,G(n,"full-screen",t[4]),G(n,"horizontal-screen",t[3])},m(e,r){I(e,n,r),A(n,i),t[8](n),l||(u=[F(fa,"resize",t[6]),F(n,"canplay",t[5],{once:!0})],l=!0)},p(e,[t]){128&t&&r!==(r=w(e[7].class)+" svelte-components-VideoMixer1-VideoPlayerIdle")&&Y(n,"class",r),1&t&&o!==(o=`cursor: pointer; ${e[0]};`)&&Y(n,"style",o),2&t&&!c(n.src,a=e[1])&&Y(n,"src",a),144&t&&G(n,"full-screen",e[4]),136&t&&G(n,"horizontal-screen",e[3])},i:e,o:e,d(e){e&&M(n),t[8](null),l=!1,s(u)}}}function ma(e,t,i){let r,s,o;h(e,ys,(e=>i(3,r=e))),h(e,vs,(e=>i(4,s=e))),h(e,la,(e=>i(9,o=e)));const a=re();let l,{style:c=""}=t,{src:u}=t;const d=()=>{const e=l.getBoundingClientRect(),t=window.innerHeight-e.bottom,n=window.innerWidth-e.right;b(la,o={x:l.clientWidth,y:l.clientHeight,distanceToBottom:t,distanceToRight:n},o)};return e.$$set=e=>{i(7,t=n(n({},t),y(e))),"style"in e&&i(0,c=e.style),"src"in e&&i(1,u=e.src)},e.$$.update=()=>{28&e.$$.dirty&&l&&me().then((()=>d()))},t=y(t),[c,u,l,r,s,()=>{d(),a("ready")},d,t,function(e){ce[e?"unshift":"push"]((()=>{l=e,i(2,l)}))}]}class ga extends Fe{constructor(e){super(),Ue(this,e,ma,pa,a,{style:0,src:1})}}const va=He(!1);function ya(e){let t,n,i,r,s,o,a,l,c;function u(t){e[20](t)}function d(t){e[21](t)}let h={class:"video-item",fadeOutPaused:!1,start:!0,muted:!0,loop:!0};function f(t){e[23](t)}function p(t){e[24](t)}function m(t){e[25](t)}void 0!==e[5]&&(h.src=e[5]),void 0!==e[10]&&(h.currentTime=e[10]),t=new ga({props:h}),ce.push((()=>De(t,"src",u))),ce.push((()=>De(t,"currentTime",d))),t.$on("ready",$(e[22]));let g={class:"video-item "+(e[9]?"full-screen-video":""),fadeOutPaused:!0,start:!0,loop:!1,debug:!1};return void 0!==e[8]&&(g.src=e[8]),void 0!==e[0]&&(g.paused=e[0]),void 0!==e[1]&&(g.currentTime=e[1]),s=new ha({props:g}),ce.push((()=>De(s,"src",f))),ce.push((()=>De(s,"paused",p))),ce.push((()=>De(s,"currentTime",m))),s.$on("play",e[26]),s.$on("ready",$(e[27])),s.$on("ended",e[28]),s.$on("pause",e[29]),s.$on("firstClick",e[30]),s.$on("displayChatMessage",e[12]),{c(){Pe(t.$$.fragment),r=V(),Pe(s.$$.fragment)},m(e,n){Re(t,e,n),I(e,r,n),Re(s,e,n),c=!0},p(e,r){const c={};!n&&32&r[0]&&(n=!0,c.src=e[5],ve((()=>n=!1))),!i&&1024&r[0]&&(i=!0,c.currentTime=e[10],ve((()=>i=!1))),t.$set(c);const u={};512&r[0]&&(u.class="video-item "+(e[9]?"full-screen-video":"")),!o&&256&r[0]&&(o=!0,u.src=e[8],ve((()=>o=!1))),!a&&1&r[0]&&(a=!0,u.paused=e[0],ve((()=>a=!1))),!l&&2&r[0]&&(l=!0,u.currentTime=e[1],ve((()=>l=!1))),s.$set(u)},i(e){c||(ke(t.$$.fragment,e),ke(s.$$.fragment,e),c=!0)},o(e){Ae(t.$$.fragment,e),Ae(s.$$.fragment,e),c=!1},d(e){Ve(t,e),e&&M(r),Ve(s,e)}}}function _a(e){let t,n,i,r,s,o;function a(t){e[31](t)}function l(t){e[32](t)}function c(t){e[33](t)}function u(t){e[34](t)}let d={$$slots:{default:[ya]},$$scope:{ctx:e}};return void 0!==e[2]&&(d.sessionCount=e[2]),void 0!==e[3]&&(d.show_count=e[3]),void 0!==e[4]&&(d.name=e[4]),void 0!==e[9]&&(d.start=e[9]),t=new aa({props:d}),ce.push((()=>De(t,"sessionCount",a))),ce.push((()=>De(t,"show_count",l))),ce.push((()=>De(t,"name",c))),ce.push((()=>De(t,"start",u))),t.$on("skip",e[35]),t.$on("replay",e[36]),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),o=!0},p(e,o){const a={};2019&o[0]|256&o[1]&&(a.$$scope={dirty:o,ctx:e}),!n&&4&o[0]&&(n=!0,a.sessionCount=e[2],ve((()=>n=!1))),!i&&8&o[0]&&(i=!0,a.show_count=e[3],ve((()=>i=!1))),!r&&16&o[0]&&(r=!0,a.name=e[4],ve((()=>r=!1))),!s&&512&o[0]&&(s=!0,a.start=e[9],ve((()=>s=!1))),t.$set(a)},i(e){o||(ke(t.$$.fragment,e),o=!0)},o(e){Ae(t.$$.fragment,e),o=!1},d(e){Ve(t,e)}}}function $a(e,t,n){let i,r,s;h(e,zr,(e=>n(37,i=e))),h(e,Ro,(e=>n(38,r=e))),h(e,va,(e=>n(19,s=e)));const o=re();let a,{paused:l=!0}=t,{currentTime:c=0}=t,{sessionCount:u=0}=t,{show_count:d=!1}=t,{name:f}=t,{idleVideoSrc:p}=t;const m=()=>{n(0,l=!0),n(1,c=0)};let g=null;let v=!0,y=0,_=!1,$=!1;return e.$$set=e=>{"paused"in e&&n(0,l=e.paused),"currentTime"in e&&n(1,c=e.currentTime),"sessionCount"in e&&n(2,u=e.sessionCount),"show_count"in e&&n(3,d=e.show_count),"name"in e&&n(4,f=e.name),"idleVideoSrc"in e&&n(5,p=e.idleVideoSrc)},e.$$.update=()=>{786432&e.$$.dirty[0]&&s&&(clearTimeout(g),b(va,s=!1,s)),192&e.$$.dirty[0]&&$&&_&&o("ready")},[l,c,u,d,f,p,_,$,a,v,y,o,()=>{o("displayChatMessage",r),b(zr,i=!1,i)},e=>{if(b(zr,i=!1,i),g&&(clearTimeout(g),n(18,g=null)),e){m();const e=r;b(Ro,r=void 0,r),b(Ro,r=e,r)}},undefined,m,()=>{b(zr,i=!1,i),g&&(clearTimeout(g),n(18,g=null)),b(zr,i=!1,i)},()=>{n(18,g=setTimeout((()=>{b(zr,i=!0,i)}),1e3))},g,s,function(e){p=e,n(5,p)},function(e){y=e,n(10,y)},()=>{n(6,_=!0)},function(e){a=e,n(8,a)},function(e){l=e,n(0,l)},function(e){c=e,n(1,c)},()=>{setTimeout((()=>{n(10,y=c)}),400)},()=>{n(7,$=!0)},()=>o("talking_end"),function(t){ae.call(this,e,t)},()=>{n(9,v=!1)},function(e){u=e,n(2,u)},function(e){d=e,n(3,d)},function(e){f=e,n(4,f)},function(e){v=e,n(9,v)},function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)}]}class wa extends Fe{constructor(e){super(),Ue(this,e,$a,_a,a,{paused:0,currentTime:1,sessionCount:2,show_count:3,name:4,idleVideoSrc:5,on_video_received:13,on_cache_check:14,skipTalkingVideo:15,on_video_synth_error:16,on_enter:17},null,[-1,-1])}get on_video_received(){return this.$$.ctx[13]}get on_cache_check(){return this.$$.ctx[14]}get skipTalkingVideo(){return this.$$.ctx[15]}get on_video_synth_error(){return this.$$.ctx[16]}get on_enter(){return this.$$.ctx[17]}}function ba(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g,v,y=e[0]("error.title")+"",_=e[0]("error.description")+"",$=e[1].replaceAll("\n","<br />")+"";return d=new Zo({}),{c(){t=D("div"),n=D("div"),i=R(y),r=V(),s=D("div"),o=R(_),a=V(),l=D("div"),c=V(),u=D("div"),Pe(d.$$.fragment),h=V(),f=D("div"),p=V(),m=D("div"),Y(n,"class","title svelte-components-Error"),Y(s,"class","svelte-components-Error"),Y(l,"class","error-msg svelte-components-Error"),Y(u,"class","decoration logo svelte-components-Error"),Y(f,"class","decoration rectangle one svelte-components-Error"),Y(m,"class","decoration rectangle two svelte-components-Error"),Y(t,"class","error center-text full-screen svelte-components-Error")},m(e,g){I(e,t,g),A(t,n),A(n,i),A(t,r),A(t,s),A(s,o),A(t,a),A(t,l),l.innerHTML=$,A(t,c),A(t,u),Re(d,u,null),A(t,h),A(t,f),A(t,p),A(t,m),v=!0},p(e,[t]){(!v||1&t)&&y!==(y=e[0]("error.title")+"")&&j(i,y),(!v||1&t)&&_!==(_=e[0]("error.description")+"")&&j(o,_),(!v||2&t)&&$!==($=e[1].replaceAll("\n","<br />")+"")&&(l.innerHTML=$)},i(e){v||(ke(d.$$.fragment,e),ge((()=>{g||(g=Le(t,pi,{},!0)),g.run(1)})),v=!0)},o(e){Ae(d.$$.fragment,e),g||(g=Le(t,pi,{},!1)),g.run(0),v=!1},d(e){e&&M(t),Ve(d),e&&g&&g.end()}}}function xa(e,t,n){let i,r;return h(e,li,(e=>n(0,i=e))),h(e,Br,(e=>n(1,r=e))),[i,r]}class Ea extends Fe{constructor(e){super(),Ue(this,e,xa,ba,a,{})}}const Ca="anonymous";function Ta(e,t,n){let i,r,{logged_username:s=Ca}=t,{access_token:o=""}=t,{_user_id:a=""}=t,{decoded_token:l}=t,c=Ca;const u=async()=>(c=Ca,i="Password1",await d()),d=async e=>{try{const e=await Zr.getAuthToken(c,i);n(0,o=e.access_token),n(2,a=e.user_id),await me()}catch(t){const n=t;if(401!==n?.response?.status_code||c===Ca){let t="";if(n?.response?.data?.detail){const e=n.response.data.detail;if("string"==typeof e)t=`${e}`;else if("object"==typeof e){const n=e;for(let e=0;e<n.length;e++){const i=n[e];e>0&&(t+="\n"),t+=i.msg+": "+i.loc[1]}}}else t=`${JSON.stringify(n)}`;e?e(t):Br.set(t)}return}if(o){n(1,s=c),r&&(clearTimeout(r),r=void 0);const e=hi(1e3*l.exp).valueOf()-hi().valueOf();r=setTimeout((()=>{r=void 0,d()}),Math.floor(.8*e))}return{access_token:o,typed_token:l,_user_id:a}};return ne((async()=>{await u()})),e.$$set=e=>{"logged_username"in e&&n(1,s=e.logged_username),"access_token"in e&&n(0,o=e.access_token),"_user_id"in e&&n(2,a=e._user_id),"decoded_token"in e&&n(3,l=e.decoded_token)},e.$$.update=()=>{1&e.$$.dirty&&n(3,l=o&&JSON.parse(window.atob(o.split(".")[1])))},[o,s,a,l,async(e,t,n)=>(c=e,i=t,await d(n)),u]}class Sa extends Fe{constructor(e){super(),Ue(this,e,Ta,null,a,{logged_username:1,access_token:0,_user_id:2,decoded_token:3,login:4,logout:5})}get login(){return this.$$.ctx[4]}get logout(){return this.$$.ctx[5]}}
/**
* @license
* Copyright 2016 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var ka=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}();
/**
* @license
* Copyright 2019 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var Aa=Object.freeze({__proto__:null,applyPassive:function(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(e){t=!1}return t}(e)&&{passive:!0}}});
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/function Oa(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var La,Ia=Object.freeze({__proto__:null,closest:function(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(Oa(n,t))return n;n=n.parentElement}return null},matches:Oa,estimateScrollWidth:function(e){var t=e;if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}}),Ma={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Na=function(e){function t(n){var i=e.call(this,st(st({},t.defaultAdapter),n))||this;return i.shakeAnimationEndHandler=function(){i.handleShakeAnimationEnd()},i}return tt(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ma},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},t.prototype.setRequired=function(e){var n=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleShakeAnimationEnd=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(ka),Da={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},Pa=function(e){function t(n){var i=e.call(this,st(st({},t.defaultAdapter),n))||this;return i.transitionEndHandler=function(e){i.handleTransitionEnd(e)},i}return tt(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Da},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},t.prototype.activate=function(){this.adapter.removeClass(Da.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Da.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(Da.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(Da.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(Da.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Da.LINE_RIPPLE_DEACTIVATING))},t}(ka),Ra={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},Va={NOTCH_ELEMENT_PADDING:8},Ua={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},Fa=function(e){function t(n){return e.call(this,st(st({},t.defaultAdapter),n))||this}return tt(t,e),Object.defineProperty(t,"strings",{get:function(){return Ra},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return Ua},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Va},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),t.prototype.notch=function(e){var n=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=Va.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(n)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(ka),Ya={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Ha={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},ja={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
/**
* @license
* Copyright 2016 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* @license
* Copyright 2016 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var za=["touchstart","pointerdown","mousedown","keydown"],Ba=["touchend","pointerup","mouseup","contextmenu"],Ga=[],Wa=function(e){function t(n){var i=e.call(this,st(st({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(e){i.activateImpl(e)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return tt(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Ya},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Ha},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ja},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=t.cssClasses,r=i.ROOT,s=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(s),e.layoutInternal())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(r),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},t.prototype.activate=function(e){this.activateImpl(e)},t.prototype.deactivate=function(){this.deactivateImpl()},t.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers=function(e){var t,n;if(e){try{for(var i=ot(za),r=i.next();!r.done;r=i.next()){var s=r.value;this.adapter.registerInteractionHandler(s,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},t.prototype.registerDeactivationHandlers=function(e){var t,n;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=ot(Ba),r=i.next();!r.done;r=i.next()){var s=r.value;this.adapter.registerDocumentInteractionHandler(s,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.deregisterRootHandlers=function(){var e,t;try{for(var n=ot(za),i=n.next();!i.done;i=n.next()){var r=i.value;this.adapter.deregisterInteractionHandler(r,this.activateHandler)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},t.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=ot(Ba),i=n.next();!i.done;i=n.next()){var r=i.value;this.adapter.deregisterDocumentInteractionHandler(r,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.removeCssVars=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)}))},t.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==e&&i.type!==e.type)){n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type));var r=void 0!==e&&Ga.length>0&&Ga.some((function(e){return t.adapter.containsEventTarget(e)}));r?this.resetActivationState():(void 0!==e&&(Ga.push(e.target),this.registerDeactivationHandlers(e)),n.wasElementMadeActive=this.checkElementMadeActive(e),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Ga=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive(e),n.wasElementMadeActive&&t.animateActivation()),n.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}}},t.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,s=t.cssClasses,o=s.FG_DEACTIVATION,a=s.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",u="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),h=d.startPoint,f=d.endPoint;c=h.x+"px, "+h.y+"px",u=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(r,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),l)},t.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,n=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,r,s=t.x,o=t.y,a=s+n.left,l=o+n.top;if("touchstart"===e.type){var c=e;i=c.changedTouches[0].pageX-a,r=c.changedTouches[0].pageY-l}else{var u=e;i=u.pageX-a,r=u.pageY-l}return{x:i,y:r}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:e={x:e.x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},t.prototype.runDeactivationUXLogicIfReady=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState,r=i.hasDeactivationUXRun,s=i.isActivated;(r||!s)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(n)}),ja.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var n=st({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(n),e.resetActivationState()})))}},t.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady()},t.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var n=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?n:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+t.numbers.PADDING;var i=Math.floor(n*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},t.prototype.updateLayoutCssVars=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,r=e.VAR_TOP,s=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(s,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(r,this.unboundedCoords.top+"px"))},t}(ka),qa={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},Za={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},Xa={LABEL_SCALE:.75},Ka=["pattern","min","max","required","step","minlength","maxlength"],Qa=["color","date","datetime-local","month","range","time","week"],Ja=["mousedown","touchstart"],el=["click","keydown"],tl=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,st(st({},t.defaultAdapter),n))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=i.helperText,r.characterCounter=i.characterCounter,r.leadingIcon=i.leadingIcon,r.trailingIcon=i.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(e){r.setTransformOrigin(e)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(e){r.handleValidationAttributeChange(e)},r}return tt(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Za},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return qa},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Xa},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return Qa.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e,t,n,i;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var r=ot(Ja),s=r.next();!s.done;s=r.next()){var o=s.value;this.adapter.registerInputInteractionHandler(o,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}try{for(var a=ot(el),l=a.next();!l.done;l=a.next()){o=l.value;this.adapter.registerTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},t.prototype.destroy=function(){var e,t,n,i;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=ot(Ja),s=r.next();!s.done;s=r.next()){var o=s.value;this.adapter.deregisterInputInteractionHandler(o,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}try{for(var a=ot(el),l=a.next();!l.done;l=a.next()){o=l.value;this.adapter.deregisterTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return Ka.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)})),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*Xa.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,n=t?t[0]:e,i=n.target.getBoundingClientRect(),r=n.clientX-i.left;this.adapter.setLineRippleTransformOrigin(r)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},t.prototype.getValue=function(){return this.getNativeInput().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},t.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},t.prototype.isDisabled=function(){return this.getNativeInput().disabled},t.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},t.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},t.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},t.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},t.prototype.styleValidity=function(e){var n=t.cssClasses.INVALID;if(e?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),r=this.helperText.getId();i&&r?this.adapter.setInputAttr(qa.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(qa.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused=function(e){var n=t.cssClasses.FOCUSED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.styleDisabled=function(e){var n=t.cssClasses,i=n.DISABLED,r=n.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},t.prototype.styleFloating=function(e){var n=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(ka);function nl(e){return Object.entries(e).filter((([e,t])=>""!==e&&t)).map((([e])=>e)).join(" ")}function il(e,t,n,i={bubbles:!0},r=!1){if("undefined"!=typeof Event&&e){const s=new CustomEvent(t,Object.assign(Object.assign({},i),{detail:n}));if(null==e||e.dispatchEvent(s),r&&t.startsWith("SMUI")){const r=new CustomEvent(t.replace(/^SMUI/g,(()=>"MDC")),Object.assign(Object.assign({},i),{detail:n}));null==e||e.dispatchEvent(r),r.defaultPrevented&&s.preventDefault()}return s}}function rl(e,t){let n=Object.getOwnPropertyNames(e);const i={};for(let r=0;r<n.length;r++){const s=n[r],o=s.indexOf("$");-1!==o&&-1!==t.indexOf(s.substring(0,o+1))||-1===t.indexOf(s)&&(i[s]=e[s])}return i}const sl=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,ol=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function al(e){let t,n=[];function i(t){ae(e,t)}return e.$on=(e,i)=>{let r=e,s=()=>{};t?s=t(r,i):n.push([r,i]);return r.match(sl)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',r),()=>{s()}},e=>{const r=[],s={};t=(t,n)=>{let o=t,a=n,l=!1;const c=o.match(sl),u=o.match(ol),d=c||u;if(o.match(/^SMUI:\w+:/)){const e=o.split(":");let t="";for(let n=0;n<e.length;n++)t+=n===e.length-1?":"+e[n]:e[n].split("-").map((e=>e.slice(0,1).toUpperCase()+e.slice(1))).join("");console.warn(`The event ${o.split("$")[0]} has been renamed to ${t.split("$")[0]}.`),o=t}if(d){const e=o.split(c?":":"$");o=e[0];const t=Object.fromEntries(e.slice(1).map((e=>[e,!0])));t.passive&&(l=l||{},l.passive=!0),t.nonpassive&&(l=l||{},l.passive=!1),t.capture&&(l=l||{},l.capture=!0),t.once&&(l=l||{},l.once=!0),t.preventDefault&&(h=a,a=function(e){return e.preventDefault(),h.call(this,e)}),t.stopPropagation&&(a=function(e){return function(t){return t.stopPropagation(),e.call(this,t)}}(a))}var h;const f=F(e,o,a,l),p=()=>{f();const e=r.indexOf(p);e>-1&&r.splice(e,1)};return r.push(p),o in s||(s[o]=F(e,o,i)),p};for(let e=0;e<n.length;e++)t(n[e][0],n[e][1]);return{destroy:()=>{for(let e=0;e<r.length;e++)r[e]();for(let e of Object.entries(s))e[1]()}}}}function ll(e,t){let n=Object.getOwnPropertyNames(e);const i={};for(let r=0;r<n.length;r++){const s=n[r];s.substring(0,t.length)===t&&(i[s.substring(t.length)]=e[s])}return i}function cl(e,t){let n=[];if(t)for(let i=0;i<t.length;i++){const r=t[i],s=Array.isArray(r)?r[0]:r;Array.isArray(r)&&r.length>1?n.push(s(e,r[1])):n.push(s(e))}return{update(e){if((e&&e.length||0)!=n.length)throw new Error("You must not change the length of an actions array.");if(e)for(let t=0;t<e.length;t++){const i=n[t];if(i&&i.update){const n=e[t];Array.isArray(n)&&n.length>1?i.update(n[1]):i.update()}}},destroy(){for(let e=0;e<n.length;e++){const t=n[e];t&&t.destroy&&t.destroy()}}}}function ul(e){let t,i,r,a,l;const c=e[6].default,u=f(c,e,e[5],null);let d=[e[3]],h={};for(let e=0;e<d.length;e+=1)h=n(h,d[e]);return{c(){t=D("span"),u&&u.c(),H(t,h)},m(n,s){I(n,t,s),u&&u.m(t,null),e[7](t),r=!0,a||(l=[x(i=cl.call(null,t,e[0])),x(e[2].call(null,t))],a=!0)},p(e,[n]){u&&u.p&&(!r||32&n)&&g(u,c,e,e[5],r?m(c,e[5],n,null):v(e[5]),null),H(t,h=Me(d,[8&n&&e[3]])),i&&o(i.update)&&1&n&&i.update.call(null,e[0])},i(e){r||(ke(u,e),r=!0)},o(e){Ae(u,e),r=!1},d(n){n&&M(t),u&&u.d(n),e[7](null),a=!1,s(l)}}}function dl(e,t,i){const r=["use","getElement"];let s=_(t,r),{$$slots:o={},$$scope:a}=t,{use:l=[]}=t;const c=al(te());let u;return e.$$set=e=>{t=n(n({},t),y(e)),i(3,s=_(t,r)),"use"in e&&i(0,l=e.use),"$$scope"in e&&i(5,a=e.$$scope)},[l,u,c,s,function(){return u},a,o,function(e){ce[e?"unshift":"push"]((()=>{u=e,i(1,u)}))}]}function hl(e){let t;const n=e[4].default,i=f(n,e,e[3],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,[r]){i&&i.p&&(!t||8&r)&&g(i,n,e,e[3],t?m(n,e[3],r,null):v(e[3]),null)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function fl(e,t,n){let i,{$$slots:r={},$$scope:s}=t,{key:o}=t,{value:a}=t;const l=He(a);return h(e,l,(e=>n(5,i=e))),se(o,l),ie((()=>{l.set(void 0)})),e.$$set=e=>{"key"in e&&n(1,o=e.key),"value"in e&&n(2,a=e.value),"$$scope"in e&&n(3,s=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty&&b(l,i=a,i)},[l,o,a,s,r]}class pl extends Fe{constructor(e){super(),Ue(this,e,fl,hl,a,{key:1,value:2})}}const{applyPassive:ml}=Aa,{matches:gl}=Ia;function vl(e,{ripple:t=!0,surface:n=!1,unbounded:i=!1,disabled:r=!1,color:s,active:o,rippleElement:a,eventTarget:l,activeTarget:c,addClass:u=(t=>e.classList.add(t)),removeClass:d=(t=>e.classList.remove(t)),addStyle:h=((t,n)=>e.style.setProperty(t,n)),initPromise:f=Promise.resolve()}={}){let p,m,g=oe("SMUI:addLayoutListener"),v=o,y=l,_=c;function $(){n?(u("mdc-ripple-surface"),"primary"===s?(u("smui-ripple-surface--primary"),d("smui-ripple-surface--secondary")):"secondary"===s?(d("smui-ripple-surface--primary"),u("smui-ripple-surface--secondary")):(d("smui-ripple-surface--primary"),d("smui-ripple-surface--secondary"))):(d("mdc-ripple-surface"),d("smui-ripple-surface--primary"),d("smui-ripple-surface--secondary")),p&&v!==o&&(v=o,o?p.activate():!1===o&&p.deactivate()),t&&!p?(p=new Wa({addClass:u,browserSupportsCssVars:()=>function(e,t){void 0===t&&(t=!1);var n,i=e.CSS;if("boolean"==typeof La&&!t)return La;if(!i||"function"!=typeof i.supports)return!1;var r=i.supports("--css-vars","yes"),s=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=r||s,t||(La=n),n}(window),computeBoundingRect:()=>(a||e).getBoundingClientRect(),containsEventTarget:t=>e.contains(t),deregisterDocumentInteractionHandler:(e,t)=>document.documentElement.removeEventListener(e,t,ml()),deregisterInteractionHandler:(t,n)=>(l||e).removeEventListener(t,n,ml()),deregisterResizeHandler:e=>window.removeEventListener("resize",e),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>null==o?gl(c||e,":active"):o,isSurfaceDisabled:()=>!!r,isUnbounded:()=>!!i,registerDocumentInteractionHandler:(e,t)=>document.documentElement.addEventListener(e,t,ml()),registerInteractionHandler:(t,n)=>(l||e).addEventListener(t,n,ml()),registerResizeHandler:e=>window.addEventListener("resize",e),removeClass:d,updateCssVariable:h}),f.then((()=>{p&&(p.init(),p.setUnbounded(i))}))):p&&!t&&f.then((()=>{p&&(p.destroy(),p=void 0)})),!p||y===l&&_===c||(y=l,_=c,p.destroy(),requestAnimationFrame((()=>{p&&(p.init(),p.setUnbounded(i))}))),!t&&i&&u("mdc-ripple-upgraded--unbounded")}return $(),g&&(m=g((function(){p&&p.layout()}))),{update(p){({ripple:t,surface:n,unbounded:i,disabled:r,color:s,active:o,rippleElement:a,eventTarget:l,activeTarget:c,addClass:u,removeClass:d,addStyle:h,initPromise:f}=Object.assign({ripple:!0,surface:!1,unbounded:!1,disabled:!1,color:void 0,active:void 0,rippleElement:void 0,eventTarget:void 0,activeTarget:void 0,addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),addStyle:(t,n)=>e.style.setProperty(t,n),initPromise:Promise.resolve()},p)),$()},destroy(){p&&(p.destroy(),p=void 0,d("mdc-ripple-surface"),d("smui-ripple-surface--primary"),d("smui-ripple-surface--secondary")),m&&m()}}}function yl(e){let t,i,r,a,l,c,u,d;const h=e[22].default,p=f(h,e,e[21],null);let y=[{class:i=nl({[e[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":e[0],"mdc-floating-label--required":e[1],...e[8]})},{style:r=Object.entries(e[9]).map(bl).concat([e[4]]).join(" ")},{for:a=e[5]||(e[11]?e[11].id:void 0)},e[12]],_={};for(let e=0;e<y.length;e+=1)_=n(_,y[e]);return{c(){t=D("label"),p&&p.c(),H(t,_)},m(n,i){I(n,t,i),p&&p.m(t,null),e[24](t),c=!0,u||(d=[x(l=cl.call(null,t,e[2])),x(e[10].call(null,t))],u=!0)},p(e,n){p&&p.p&&(!c||2097152&n)&&g(p,h,e,e[21],c?m(h,e[21],n,null):v(e[21]),null),H(t,_=Me(y,[(!c||267&n&&i!==(i=nl({[e[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":e[0],"mdc-floating-label--required":e[1],...e[8]})))&&{class:i},(!c||528&n&&r!==(r=Object.entries(e[9]).map(bl).concat([e[4]]).join(" ")))&&{style:r},(!c||32&n&&a!==(a=e[5]||(e[11]?e[11].id:void 0)))&&{for:a},4096&n&&e[12]])),l&&o(l.update)&&4&n&&l.update.call(null,e[2])},i(e){c||(ke(p,e),c=!0)},o(e){Ae(p,e),c=!1},d(n){n&&M(t),p&&p.d(n),e[24](null),u=!1,s(d)}}}function _l(e){let t,i,r,a,l,c,u;const d=e[22].default,h=f(d,e,e[21],null);let p=[{class:i=nl({[e[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":e[0],"mdc-floating-label--required":e[1],...e[8]})},{style:r=Object.entries(e[9]).map(wl).concat([e[4]]).join(" ")},e[12]],y={};for(let e=0;e<p.length;e+=1)y=n(y,p[e]);return{c(){t=D("span"),h&&h.c(),H(t,y)},m(n,i){I(n,t,i),h&&h.m(t,null),e[23](t),l=!0,c||(u=[x(a=cl.call(null,t,e[2])),x(e[10].call(null,t))],c=!0)},p(e,n){h&&h.p&&(!l||2097152&n)&&g(h,d,e,e[21],l?m(d,e[21],n,null):v(e[21]),null),H(t,y=Me(p,[(!l||267&n&&i!==(i=nl({[e[3]]:!0,"mdc-floating-label":!0,"mdc-floating-label--float-above":e[0],"mdc-floating-label--required":e[1],...e[8]})))&&{class:i},(!l||528&n&&r!==(r=Object.entries(e[9]).map(wl).concat([e[4]]).join(" ")))&&{style:r},4096&n&&e[12]])),a&&o(a.update)&&4&n&&a.update.call(null,e[2])},i(e){l||(ke(h,e),l=!0)},o(e){Ae(h,e),l=!1},d(n){n&&M(t),h&&h.d(n),e[23](null),c=!1,s(u)}}}function $l(e){let t,n,i,r;const s=[_l,yl],o=[];function a(e,t){return e[6]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=U()},m(e,n){o[t].m(e,n),I(e,i,n),r=!0},p(e,[r]){let l=t;t=a(e),t===l?o[t].p(e,r):(Te(),Ae(o[l],1,1,(()=>{o[l]=null})),Se(),n=o[t],n?n.p(e,r):(n=o[t]=s[t](e),n.c()),ke(n,1),n.m(i.parentNode,i))},i(e){r||(ke(n),r=!0)},o(e){Ae(n),r=!1},d(e){o[t].d(e),e&&M(i)}}}const wl=([e,t])=>`${e}: ${t};`,bl=([e,t])=>`${e}: ${t};`;function xl(e,t,i){const r=["use","class","style","for","floatAbove","required","wrapped","shake","float","setRequired","getWidth","getElement"];let s=_(t,r),{$$slots:o={},$$scope:a}=t;var l;const c=al(te());let u,d,{use:h=[]}=t,{class:f=""}=t,{style:p=""}=t,{for:m}=t,{floatAbove:g=!1}=t,{required:v=!1}=t,{wrapped:$=!1}=t,w={},b={},x=null!==(l=oe("SMUI:generic:input:props"))&&void 0!==l?l:{},E=g,C=v;function T(e){w[e]||i(8,w[e]=!0,w)}function S(e){e in w&&!w[e]||i(8,w[e]=!1,w)}function k(e,t){b[e]!=t&&(""===t||null==t?(delete b[e],i(9,b)):i(9,b[e]=t,b))}function A(e){e in b&&(delete b[e],i(9,b))}function O(){return u}return ne((()=>{i(18,d=new Na({addClass:T,removeClass:S,getWidth:()=>{var e,t;const n=O(),i=n.cloneNode(!0);null===(e=n.parentNode)||void 0===e||e.appendChild(i),i.classList.add("smui-floating-label--remove-transition"),i.classList.add("smui-floating-label--force-size"),i.classList.remove("mdc-floating-label--float-above");const r=i.scrollWidth;return null===(t=n.parentNode)||void 0===t||t.removeChild(i),r},registerInteractionHandler:(e,t)=>O().addEventListener(e,t),deregisterInteractionHandler:(e,t)=>O().removeEventListener(e,t)}));const e={get element(){return O()},addStyle:k,removeStyle:A};return il(u,"SMUIFloatingLabel:mount",e),d.init(),()=>{il(u,"SMUIFloatingLabel:unmount",e),d.destroy()}})),e.$$set=e=>{t=n(n({},t),y(e)),i(12,s=_(t,r)),"use"in e&&i(2,h=e.use),"class"in e&&i(3,f=e.class),"style"in e&&i(4,p=e.style),"for"in e&&i(5,m=e.for),"floatAbove"in e&&i(0,g=e.floatAbove),"required"in e&&i(1,v=e.required),"wrapped"in e&&i(6,$=e.wrapped),"$$scope"in e&&i(21,a=e.$$scope)},e.$$.update=()=>{786433&e.$$.dirty&&d&&E!==g&&(i(19,E=g),d.float(g)),1310722&e.$$.dirty&&d&&C!==v&&(i(20,C=v),d.setRequired(v))},[g,v,h,f,p,m,$,u,w,b,c,x,s,function(e){d.shake(e)},function(e){i(0,g=e)},function(e){i(1,v=e)},function(){return d.getWidth()},O,d,E,C,a,o,function(e){ce[e?"unshift":"push"]((()=>{u=e,i(7,u)}))},function(e){ce[e?"unshift":"push"]((()=>{u=e,i(7,u)}))}]}class El extends Fe{constructor(e){super(),Ue(this,e,xl,$l,a,{use:2,class:3,style:4,for:5,floatAbove:0,required:1,wrapped:6,shake:13,float:14,setRequired:15,getWidth:16,getElement:17})}get shake(){return this.$$.ctx[13]}get float(){return this.$$.ctx[14]}get setRequired(){return this.$$.ctx[15]}get getWidth(){return this.$$.ctx[16]}get getElement(){return this.$$.ctx[17]}}function Cl(t){let i,r,a,l,c,u,d=[{class:r=nl({[t[1]]:!0,"mdc-line-ripple":!0,"mdc-line-ripple--active":t[3],...t[5]})},{style:a=Object.entries(t[6]).map(Tl).concat([t[2]]).join(" ")},t[8]],h={};for(let e=0;e<d.length;e+=1)h=n(h,d[e]);return{c(){i=D("div"),H(i,h)},m(e,n){I(e,i,n),t[13](i),c||(u=[x(l=cl.call(null,i,t[0])),x(t[7].call(null,i))],c=!0)},p(e,[t]){H(i,h=Me(d,[42&t&&r!==(r=nl({[e[1]]:!0,"mdc-line-ripple":!0,"mdc-line-ripple--active":e[3],...e[5]}))&&{class:r},68&t&&a!==(a=Object.entries(e[6]).map(Tl).concat([e[2]]).join(" "))&&{style:a},256&t&&e[8]])),l&&o(l.update)&&1&t&&l.update.call(null,e[0])},i:e,o:e,d(e){e&&M(i),t[13](null),c=!1,s(u)}}}const Tl=([e,t])=>`${e}: ${t};`;function Sl(e,t,i){const r=["use","class","style","active","activate","deactivate","setRippleCenter","getElement"];let s=_(t,r);const o=al(te());let a,l,{use:c=[]}=t,{class:u=""}=t,{style:d=""}=t,{active:h=!1}=t,f={},p={};function m(e){return e in f?f[e]:w().classList.contains(e)}function g(e){f[e]||i(5,f[e]=!0,f)}function v(e){e in f&&!f[e]||i(5,f[e]=!1,f)}function $(e,t){p[e]!=t&&(""===t||null==t?(delete p[e],i(6,p)):i(6,p[e]=t,p))}function w(){return a}return ne((()=>(l=new Pa({addClass:g,removeClass:v,hasClass:m,setStyle:$,registerEventHandler:(e,t)=>w().addEventListener(e,t),deregisterEventHandler:(e,t)=>w().removeEventListener(e,t)}),l.init(),()=>{l.destroy()}))),e.$$set=e=>{t=n(n({},t),y(e)),i(8,s=_(t,r)),"use"in e&&i(0,c=e.use),"class"in e&&i(1,u=e.class),"style"in e&&i(2,d=e.style),"active"in e&&i(3,h=e.active)},[c,u,d,h,a,f,p,o,s,function(){l.activate()},function(){l.deactivate()},function(e){l.setRippleCenter(e)},w,function(e){ce[e?"unshift":"push"]((()=>{a=e,i(4,a)}))}]}class kl extends Fe{constructor(e){super(),Ue(this,e,Sl,Cl,a,{use:0,class:1,style:2,active:3,activate:9,deactivate:10,setRippleCenter:11,getElement:12})}get activate(){return this.$$.ctx[9]}get deactivate(){return this.$$.ctx[10]}get setRippleCenter(){return this.$$.ctx[11]}get getElement(){return this.$$.ctx[12]}}function Al(e){let t,n,i;const r=e[14].default,s=f(r,e,e[13],null);return{c(){t=D("div"),s&&s.c(),Y(t,"class","mdc-notched-outline__notch"),Y(t,"style",n=Object.entries(e[7]).map(Ll).join(" "))},m(e,n){I(e,t,n),s&&s.m(t,null),i=!0},p(e,o){s&&s.p&&(!i||8192&o)&&g(s,r,e,e[13],i?m(r,e[13],o,null):v(e[13]),null),(!i||128&o&&n!==(n=Object.entries(e[7]).map(Ll).join(" ")))&&Y(t,"style",n)},i(e){i||(ke(s,e),i=!0)},o(e){Ae(s,e),i=!1},d(e){e&&M(t),s&&s.d(e)}}}function Ol(e){let t,i,r,a,l,c,u,d,h,f,p=!e[3]&&Al(e),m=[{class:c=nl({[e[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":e[2],"mdc-notched-outline--no-label":e[3],...e[6]})},e[9]],g={};for(let e=0;e<m.length;e+=1)g=n(g,m[e]);return{c(){t=D("div"),i=D("div"),r=V(),p&&p.c(),a=V(),l=D("div"),Y(i,"class","mdc-notched-outline__leading"),Y(l,"class","mdc-notched-outline__trailing"),H(t,g)},m(n,s){I(n,t,s),A(t,i),A(t,r),p&&p.m(t,null),A(t,a),A(t,l),e[15](t),d=!0,h||(f=[x(u=cl.call(null,t,e[0])),x(e[8].call(null,t)),F(t,"SMUIFloatingLabel:mount",e[16]),F(t,"SMUIFloatingLabel:unmount",e[17])],h=!0)},p(e,[n]){e[3]?p&&(Te(),Ae(p,1,1,(()=>{p=null})),Se()):p?(p.p(e,n),8&n&&ke(p,1)):(p=Al(e),p.c(),ke(p,1),p.m(t,a)),H(t,g=Me(m,[(!d||78&n&&c!==(c=nl({[e[1]]:!0,"mdc-notched-outline":!0,"mdc-notched-outline--notched":e[2],"mdc-notched-outline--no-label":e[3],...e[6]})))&&{class:c},512&n&&e[9]])),u&&o(u.update)&&1&n&&u.update.call(null,e[0])},i(e){d||(ke(p),d=!0)},o(e){Ae(p),d=!1},d(n){n&&M(t),p&&p.d(),e[15](null),h=!1,s(f)}}}const Ll=([e,t])=>`${e}: ${t};`;function Il(e,t,i){const r=["use","class","notched","noLabel","notch","closeNotch","getElement"];let s=_(t,r),{$$slots:o={},$$scope:a}=t;const l=al(te());let c,u,d,{use:h=[]}=t,{class:f=""}=t,{notched:p=!1}=t,{noLabel:m=!1}=t,g={},v={};function $(e){g[e]||i(6,g[e]=!0,g)}function w(e){e in g&&!g[e]||i(6,g[e]=!1,g)}ne((()=>(u=new Fa({addClass:$,removeClass:w,setNotchWidthProperty:e=>{return n=e+"px",void(v[t="width"]!=n&&(""===n||null==n?(delete v[t],i(7,v)):i(7,v[t]=n,v)));var t,n},removeNotchWidthProperty:()=>{var e;(e="width")in v&&(delete v[e],i(7,v))}}),u.init(),()=>{u.destroy()})));return e.$$set=e=>{t=n(n({},t),y(e)),i(9,s=_(t,r)),"use"in e&&i(0,h=e.use),"class"in e&&i(1,f=e.class),"notched"in e&&i(2,p=e.notched),"noLabel"in e&&i(3,m=e.noLabel),"$$scope"in e&&i(13,a=e.$$scope)},e.$$.update=()=>{16&e.$$.dirty&&(d?(d.addStyle("transition-duration","0s"),$("mdc-notched-outline--upgraded"),requestAnimationFrame((()=>{d&&d.removeStyle("transition-duration")}))):w("mdc-notched-outline--upgraded"))},[h,f,p,m,d,c,g,v,l,s,function(e){u.notch(e)},function(){u.closeNotch()},function(){return c},a,o,function(e){ce[e?"unshift":"push"]((()=>{c=e,i(5,c)}))},e=>i(4,d=e.detail),()=>i(4,d=void 0)]}class Ml extends Fe{constructor(e){super(),Ue(this,e,Il,Ol,a,{use:0,class:1,notched:2,noLabel:3,notch:10,closeNotch:11,getElement:12})}get notch(){return this.$$.ctx[10]}get closeNotch(){return this.$$.ctx[11]}get getElement(){return this.$$.ctx[12]}}function Nl(e){let t,i,r,a,l;const c=e[6].default,u=f(c,e,e[5],null);let d=[e[3]],h={};for(let e=0;e<d.length;e+=1)h=n(h,d[e]);return{c(){t=D("div"),u&&u.c(),H(t,h)},m(n,s){I(n,t,s),u&&u.m(t,null),e[7](t),r=!0,a||(l=[x(i=cl.call(null,t,e[0])),x(e[2].call(null,t))],a=!0)},p(e,[n]){u&&u.p&&(!r||32&n)&&g(u,c,e,e[5],r?m(c,e[5],n,null):v(e[5]),null),H(t,h=Me(d,[8&n&&e[3]])),i&&o(i.update)&&1&n&&i.update.call(null,e[0])},i(e){r||(ke(u,e),r=!0)},o(e){Ae(u,e),r=!1},d(n){n&&M(t),u&&u.d(n),e[7](null),a=!1,s(l)}}}function Dl(e,t,i){const r=["use","getElement"];let s=_(t,r),{$$slots:o={},$$scope:a}=t,{use:l=[]}=t;const c=al(te());let u;return e.$$set=e=>{t=n(n({},t),y(e)),i(3,s=_(t,r)),"use"in e&&i(0,l=e.use),"$$scope"in e&&i(5,a=e.$$scope)},[l,u,c,s,function(){return u},a,o,function(e){ce[e?"unshift":"push"]((()=>{u=e,i(1,u)}))}]}class Pl extends Fe{constructor(e){super(),Ue(this,e,Dl,Nl,a,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}}function Rl(e){let t;const n=e[10].default,i=f(n,e,e[12],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||4096&r)&&g(i,n,e,e[12],t?m(n,e[12],r,null):v(e[12]),null)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function Vl(e){let t,i,r;const s=[{use:[e[7],...e[0]]},{class:nl({[e[1]]:!0,[e[5]]:!0,...e[4]})},e[6],e[8]];var o=e[2];function a(e){let t={$$slots:{default:[Rl]},$$scope:{ctx:e}};for(let e=0;e<s.length;e+=1)t=n(t,s[e]);return{props:t}}return o&&(t=new o(a(e)),e[11](t)),{c(){t&&Pe(t.$$.fragment),i=U()},m(e,n){t&&Re(t,e,n),I(e,i,n),r=!0},p(e,[n]){const r=499&n?Me(s,[129&n&&{use:[e[7],...e[0]]},50&n&&{class:nl({[e[1]]:!0,[e[5]]:!0,...e[4]})},64&n&&Ne(e[6]),256&n&&Ne(e[8])]):{};if(4096&n&&(r.$$scope={dirty:n,ctx:e}),o!==(o=e[2])){if(t){Te();const e=t;Ae(e.$$.fragment,1,0,(()=>{Ve(e,1)})),Se()}o?(t=new o(a(e)),e[11](t),Pe(t.$$.fragment),ke(t.$$.fragment,1),Re(t,i.parentNode,i)):t=null}else o&&t.$set(r)},i(e){r||(t&&ke(t.$$.fragment,e),r=!0)},o(e){t&&Ae(t.$$.fragment,e),r=!1},d(n){e[11](null),n&&M(i),t&&Ve(t,n)}}}const Ul={component:Pl,class:"",classMap:{},contexts:{},props:{}};function Fl(e,t,i){const r=["use","class","component","getElement"];let s,o=_(t,r),{$$slots:a={},$$scope:l}=t,{use:c=[]}=t,{class:u=""}=t;const d=Ul.class,h={},f=[],p=Ul.contexts,m=Ul.props;let{component:g=Ul.component}=t;Object.entries(Ul.classMap).forEach((([e,t])=>{const n=oe(t);n&&"subscribe"in n&&f.push(n.subscribe((t=>{i(4,h[e]=t,h)})))}));const v=al(te());for(let e in p)p.hasOwnProperty(e)&&se(e,p[e]);return ie((()=>{for(const e of f)e()})),e.$$set=e=>{t=n(n({},t),y(e)),i(8,o=_(t,r)),"use"in e&&i(0,c=e.use),"class"in e&&i(1,u=e.class),"component"in e&&i(2,g=e.component),"$$scope"in e&&i(12,l=e.$$scope)},[c,u,g,s,h,d,m,v,o,function(){return s.getElement()},a,function(e){ce[e?"unshift":"push"]((()=>{s=e,i(3,s)}))},l]}class Yl extends Fe{constructor(e){super(),Ue(this,e,Fl,Vl,a,{use:0,class:1,component:2,getElement:9})}get getElement(){return this.$$.ctx[9]}}const Hl=Object.assign({},Ul);function jl(e){return new Proxy(Yl,{construct:function(t,n){return Object.assign(Ul,Hl,e),new t(...n)},get:function(t,n){return Object.assign(Ul,Hl,e),t[n]}})}const zl=Pl,Bl=class extends Fe{constructor(e){super(),Ue(this,e,dl,ul,a,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}};var Gl=jl({class:"mdc-text-field-helper-line",component:zl}),Wl=jl({class:"mdc-text-field__affix mdc-text-field__affix--prefix",component:Bl}),ql=jl({class:"mdc-text-field__affix mdc-text-field__affix--suffix",component:Bl});function Zl(t){let i,r,a,l,c,u=[{class:r=nl({[t[1]]:!0,"mdc-text-field__input":!0})},{type:t[2]},{placeholder:t[3]},t[4],t[6],t[10]],d={};for(let e=0;e<u.length;e+=1)d=n(d,u[e]);return{c(){i=D("input"),H(i,d)},m(e,n){I(e,i,n),i.autofocus&&i.focus(),t[26](i),l||(c=[x(a=cl.call(null,i,t[0])),x(t[7].call(null,i)),F(i,"input",t[27]),F(i,"change",t[9]),F(i,"blur",t[24]),F(i,"focus",t[25])],l=!0)},p(e,[t]){H(i,d=Me(u,[2&t&&r!==(r=nl({[e[1]]:!0,"mdc-text-field__input":!0}))&&{class:r},4&t&&{type:e[2]},8&t&&{placeholder:e[3]},16&t&&e[4],64&t&&e[6],1024&t&&e[10]])),a&&o(a.update)&&1&t&&a.update.call(null,e[0])},i:e,o:e,d(e){e&&M(i),t[26](null),l=!1,s(c)}}}function Xl(e,t,i){const r=["use","class","type","placeholder","value","files","dirty","invalid","updateInvalid","emptyValueNull","emptyValueUndefined","getAttr","addAttr","removeAttr","focus","blur","getElement"];let s=_(t,r);const o=al(te());let a=()=>{};let{use:l=[]}=t,{class:c=""}=t,{type:u="text"}=t,{placeholder:d=" "}=t,{value:h=a}=t;const f=function(e){return e===a}(h);f&&(h="");let{files:p=null}=t,{dirty:m=!1}=t,{invalid:g=!1}=t,{updateInvalid:v=!0}=t,{emptyValueNull:$=null===h}=t;f&&$&&(h=null);let w,{emptyValueUndefined:b=void 0===h}=t;f&&b&&(h=void 0);let x={},E={};function C(e){if("file"!==u)if(""===e.currentTarget.value&&$)i(11,h=null);else if(""===e.currentTarget.value&&b)i(11,h=void 0);else switch(u){case"number":case"range":i(11,h=function(e){if(""===e){const e=new Number(Number.NaN);return e.length=0,e}return+e}(e.currentTarget.value));break;default:i(11,h=e.currentTarget.value)}else i(12,p=e.currentTarget.files)}function T(){return w}ne((()=>{v&&i(14,g=w.matches(":invalid"))}));return e.$$set=e=>{t=n(n({},t),y(e)),i(10,s=_(t,r)),"use"in e&&i(0,l=e.use),"class"in e&&i(1,c=e.class),"type"in e&&i(2,u=e.type),"placeholder"in e&&i(3,d=e.placeholder),"value"in e&&i(11,h=e.value),"files"in e&&i(12,p=e.files),"dirty"in e&&i(13,m=e.dirty),"invalid"in e&&i(14,g=e.invalid),"updateInvalid"in e&&i(15,v=e.updateInvalid),"emptyValueNull"in e&&i(16,$=e.emptyValueNull),"emptyValueUndefined"in e&&i(17,b=e.emptyValueUndefined)},e.$$.update=()=>{2068&e.$$.dirty&&("file"===u?(delete E.value,i(4,E),i(2,u),i(11,h)):i(4,E.value=null==h?"":h,E))},[l,c,u,d,E,w,x,o,C,function(e){"file"!==u&&"range"!==u||C(e),i(13,m=!0),v&&i(14,g=w.matches(":invalid"))},s,h,p,m,g,v,$,b,function(e){var t;return e in x?null!==(t=x[e])&&void 0!==t?t:null:T().getAttribute(e)},function(e,t){x[e]!==t&&i(6,x[e]=t,x)},function(e){e in x&&null==x[e]||i(6,x[e]=void 0,x)},function(){T().focus()},function(){T().blur()},T,function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)},function(e){ce[e?"unshift":"push"]((()=>{w=e,i(5,w)}))},e=>"file"!==u&&C(e)]}class Kl extends Fe{constructor(e){super(),Ue(this,e,Xl,Zl,a,{use:0,class:1,type:2,placeholder:3,value:11,files:12,dirty:13,invalid:14,updateInvalid:15,emptyValueNull:16,emptyValueUndefined:17,getAttr:18,addAttr:19,removeAttr:20,focus:21,blur:22,getElement:23})}get getAttr(){return this.$$.ctx[18]}get addAttr(){return this.$$.ctx[19]}get removeAttr(){return this.$$.ctx[20]}get focus(){return this.$$.ctx[21]}get blur(){return this.$$.ctx[22]}get getElement(){return this.$$.ctx[23]}}function Ql(t){let i,r,a,l,c,u,d=[{class:r=nl({[t[2]]:!0,"mdc-text-field__input":!0})},{style:a=`${t[4]?"":"resize: none; "}${t[3]}`},t[6],t[9]],h={};for(let e=0;e<d.length;e+=1)h=n(h,d[e]);return{c(){i=D("textarea"),H(i,h)},m(e,n){I(e,i,n),i.autofocus&&i.focus(),t[21](i),z(i,t[0]),c||(u=[x(l=cl.call(null,i,t[1])),x(t[7].call(null,i)),F(i,"change",t[8]),F(i,"blur",t[19]),F(i,"focus",t[20]),F(i,"input",t[22])],c=!0)},p(e,[t]){H(i,h=Me(d,[4&t&&r!==(r=nl({[e[2]]:!0,"mdc-text-field__input":!0}))&&{class:r},24&t&&a!==(a=`${e[4]?"":"resize: none; "}${e[3]}`)&&{style:a},64&t&&e[6],512&t&&e[9]])),l&&o(l.update)&&2&t&&l.update.call(null,e[1]),1&t&&z(i,e[0])},i:e,o:e,d(e){e&&M(i),t[21](null),c=!1,s(u)}}}function Jl(e,t,i){const r=["use","class","style","value","dirty","invalid","updateInvalid","resizable","getAttr","addAttr","removeAttr","focus","blur","getElement"];let s=_(t,r);const o=al(te());let a,{use:l=[]}=t,{class:c=""}=t,{style:u=""}=t,{value:d=""}=t,{dirty:h=!1}=t,{invalid:f=!1}=t,{updateInvalid:p=!0}=t,{resizable:m=!0}=t,g={};function v(){return a}return ne((()=>{p&&i(11,f=a.matches(":invalid"))})),e.$$set=e=>{t=n(n({},t),y(e)),i(9,s=_(t,r)),"use"in e&&i(1,l=e.use),"class"in e&&i(2,c=e.class),"style"in e&&i(3,u=e.style),"value"in e&&i(0,d=e.value),"dirty"in e&&i(10,h=e.dirty),"invalid"in e&&i(11,f=e.invalid),"updateInvalid"in e&&i(12,p=e.updateInvalid),"resizable"in e&&i(4,m=e.resizable)},[d,l,c,u,m,a,g,o,function(){i(10,h=!0),p&&i(11,f=a.matches(":invalid"))},s,h,f,p,function(e){var t;return e in g?null!==(t=g[e])&&void 0!==t?t:null:v().getAttribute(e)},function(e,t){g[e]!==t&&i(6,g[e]=t,g)},function(e){e in g&&null==g[e]||i(6,g[e]=void 0,g)},function(){v().focus()},function(){v().blur()},v,function(t){ae.call(this,e,t)},function(t){ae.call(this,e,t)},function(e){ce[e?"unshift":"push"]((()=>{a=e,i(5,a)}))},function(){d=this.value,i(0,d)}]}class ec extends Fe{constructor(e){super(),Ue(this,e,Jl,Ql,a,{use:1,class:2,style:3,value:0,dirty:10,invalid:11,updateInvalid:12,resizable:4,getAttr:13,addAttr:14,removeAttr:15,focus:16,blur:17,getElement:18})}get getAttr(){return this.$$.ctx[13]}get addAttr(){return this.$$.ctx[14]}get removeAttr(){return this.$$.ctx[15]}get focus(){return this.$$.ctx[16]}get blur(){return this.$$.ctx[17]}get getElement(){return this.$$.ctx[18]}}const tc=e=>({}),nc=e=>({}),ic=e=>({}),rc=e=>({}),sc=e=>({}),oc=e=>({}),ac=e=>({}),lc=e=>({}),cc=e=>({}),uc=e=>({}),dc=e=>({}),hc=e=>({}),fc=e=>({}),pc=e=>({}),mc=e=>({}),gc=e=>({}),vc=e=>({}),yc=e=>({}),_c=e=>({}),$c=e=>({}),wc=e=>({}),bc=e=>({}),xc=e=>({}),Ec=e=>({});function Cc(e){let t,i,r,a,l,c,u,d,h,p,y,_,$,w;const b=e[51].label,E=f(b,e,e[90],uc);r=new pl({props:{key:"SMUI:textfield:icon:leading",value:!0,$$slots:{default:[Sc]},$$scope:{ctx:e}}});const C=e[51].default,T=f(C,e,e[90],null);c=new pl({props:{key:"SMUI:textfield:icon:leading",value:!1,$$slots:{default:[kc]},$$scope:{ctx:e}}});const S=e[51].ripple,k=f(S,e,e[90],rc);let O=[{class:d=nl({[e[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":e[12],"mdc-text-field--textarea":e[14],"mdc-text-field--filled":"filled"===e[15],"mdc-text-field--outlined":"outlined"===e[15],"smui-text-field--standard":"standard"===e[15]&&!e[14],"mdc-text-field--no-label":e[16]||!e[42].label,"mdc-text-field--with-leading-icon":e[42].leadingIcon,"mdc-text-field--with-trailing-icon":e[42].trailingIcon,"mdc-text-field--invalid":e[1],...e[25]})},{style:h=Object.entries(e[26]).map(Xc).concat([e[10]]).join(" ")},rl(e[41],["input$","label$","ripple$","outline$","helperLine$"])],L={};for(let e=0;e<O.length;e+=1)L=n(L,O[e]);return{c(){t=D("div"),E&&E.c(),i=V(),Pe(r.$$.fragment),a=V(),T&&T.c(),l=V(),Pe(c.$$.fragment),u=V(),k&&k.c(),H(t,L)},m(n,s){I(n,t,s),E&&E.m(t,null),A(t,i),Re(r,t,null),A(t,a),T&&T.m(t,null),A(t,l),Re(c,t,null),A(t,u),k&&k.m(t,null),e[80](t),_=!0,$||(w=[x(p=vl.call(null,t,{ripple:e[11],unbounded:!1,addClass:e[38],removeClass:e[39],addStyle:e[40]})),x(y=cl.call(null,t,e[8])),x(e[34].call(null,t)),F(t,"SMUITextfieldLeadingIcon:mount",e[81]),F(t,"SMUITextfieldLeadingIcon:unmount",e[82]),F(t,"SMUITextfieldTrailingIcon:mount",e[83]),F(t,"SMUITextfieldTrailingIcon:unmount",e[84])],$=!0)},p(e,n){E&&E.p&&(!_||268435456&n[2])&&g(E,b,e,e[90],_?m(b,e[90],n,cc):v(e[90]),uc);const i={};268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),r.$set(i),T&&T.p&&(!_||268435456&n[2])&&g(T,C,e,e[90],_?m(C,e[90],n,null):v(e[90]),null);const s={};268435456&n[2]&&(s.$$scope={dirty:n,ctx:e}),c.$set(s),k&&k.p&&(!_||268435456&n[2])&&g(k,S,e,e[90],_?m(S,e[90],n,ic):v(e[90]),rc),H(t,L=Me(O,[(!_||33673730&n[0]|2048&n[1]&&d!==(d=nl({[e[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":e[12],"mdc-text-field--textarea":e[14],"mdc-text-field--filled":"filled"===e[15],"mdc-text-field--outlined":"outlined"===e[15],"smui-text-field--standard":"standard"===e[15]&&!e[14],"mdc-text-field--no-label":e[16]||!e[42].label,"mdc-text-field--with-leading-icon":e[42].leadingIcon,"mdc-text-field--with-trailing-icon":e[42].trailingIcon,"mdc-text-field--invalid":e[1],...e[25]})))&&{class:d},(!_||67109888&n[0]&&h!==(h=Object.entries(e[26]).map(Xc).concat([e[10]]).join(" ")))&&{style:h},1024&n[1]&&rl(e[41],["input$","label$","ripple$","outline$","helperLine$"])])),p&&o(p.update)&&2048&n[0]&&p.update.call(null,{ripple:e[11],unbounded:!1,addClass:e[38],removeClass:e[39],addStyle:e[40]}),y&&o(y.update)&&256&n[0]&&y.update.call(null,e[8])},i(e){_||(ke(E,e),ke(r.$$.fragment,e),ke(T,e),ke(c.$$.fragment,e),ke(k,e),_=!0)},o(e){Ae(E,e),Ae(r.$$.fragment,e),Ae(T,e),Ae(c.$$.fragment,e),Ae(k,e),_=!1},d(n){n&&M(t),E&&E.d(n),Ve(r),T&&T.d(n),Ve(c),k&&k.d(n),e[80](null),$=!1,s(w)}}}function Tc(e){let t,i,r,a,l,c,u,d,h,p,y,_,$,w,b,E,C,T,S=!e[14]&&"outlined"!==e[15]&&Ac(e),k=(e[14]||"outlined"===e[15])&&Mc(e);a=new pl({props:{key:"SMUI:textfield:icon:leading",value:!0,$$slots:{default:[Rc]},$$scope:{ctx:e}}});const O=e[51].default,L=f(O,e,e[90],null),N=[Uc,Vc],P=[];function R(e,t){return e[14]&&"string"==typeof e[0]?0:1}u=R(e),d=P[u]=N[u](e),p=new pl({props:{key:"SMUI:textfield:icon:leading",value:!1,$$slots:{default:[zc]},$$scope:{ctx:e}}});let U=!e[14]&&"outlined"!==e[15]&&e[11]&&Bc(e),Y=[{class:_=nl({[e[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":e[12],"mdc-text-field--textarea":e[14],"mdc-text-field--filled":"filled"===e[15],"mdc-text-field--outlined":"outlined"===e[15],"smui-text-field--standard":"standard"===e[15]&&!e[14],"mdc-text-field--no-label":e[16]||null==e[17]&&!e[42].label,"mdc-text-field--label-floating":e[28]||null!=e[0]&&""!==e[0],"mdc-text-field--with-leading-icon":e[35](e[22])?e[42].leadingIcon:e[22],"mdc-text-field--with-trailing-icon":e[35](e[23])?e[42].trailingIcon:e[23],"mdc-text-field--with-internal-counter":e[14]&&e[42].internalCounter,"mdc-text-field--invalid":e[1],...e[25]})},{style:$=Object.entries(e[26]).map(Zc).concat([e[10]]).join(" ")},{for:void 0},rl(e[41],["input$","label$","ripple$","outline$","helperLine$"])],j={};for(let e=0;e<Y.length;e+=1)j=n(j,Y[e]);return{c(){t=D("label"),S&&S.c(),i=V(),k&&k.c(),r=V(),Pe(a.$$.fragment),l=V(),L&&L.c(),c=V(),d.c(),h=V(),Pe(p.$$.fragment),y=V(),U&&U.c(),H(t,j)},m(n,s){I(n,t,s),S&&S.m(t,null),A(t,i),k&&k.m(t,null),A(t,r),Re(a,t,null),A(t,l),L&&L.m(t,null),A(t,c),P[u].m(t,null),A(t,h),Re(p,t,null),A(t,y),U&&U.m(t,null),e[73](t),E=!0,C||(T=[x(w=vl.call(null,t,{ripple:!e[14]&&"filled"===e[15],unbounded:!1,addClass:e[38],removeClass:e[39],addStyle:e[40],eventTarget:e[33],activeTarget:e[33],initPromise:e[37]})),x(b=cl.call(null,t,e[8])),x(e[34].call(null,t)),F(t,"SMUITextfieldLeadingIcon:mount",e[74]),F(t,"SMUITextfieldLeadingIcon:unmount",e[75]),F(t,"SMUITextfieldTrailingIcon:mount",e[76]),F(t,"SMUITextfieldTrailingIcon:unmount",e[77]),F(t,"SMUITextfieldCharacterCounter:mount",e[78]),F(t,"SMUITextfieldCharacterCounter:unmount",e[79])],C=!0)},p(e,n){e[14]||"outlined"===e[15]?S&&(Te(),Ae(S,1,1,(()=>{S=null})),Se()):S?(S.p(e,n),49152&n[0]&&ke(S,1)):(S=Ac(e),S.c(),ke(S,1),S.m(t,i)),e[14]||"outlined"===e[15]?k?(k.p(e,n),49152&n[0]&&ke(k,1)):(k=Mc(e),k.c(),ke(k,1),k.m(t,r)):k&&(Te(),Ae(k,1,1,(()=>{k=null})),Se());const s={};268435456&n[2]&&(s.$$scope={dirty:n,ctx:e}),a.$set(s),L&&L.p&&(!E||268435456&n[2])&&g(L,O,e,e[90],E?m(O,e[90],n,null):v(e[90]),null);let l=u;u=R(e),u===l?P[u].p(e,n):(Te(),Ae(P[l],1,1,(()=>{P[l]=null})),Se(),d=P[u],d?d.p(e,n):(d=P[u]=N[u](e),d.c()),ke(d,1),d.m(t,h));const c={};268435456&n[2]&&(c.$$scope={dirty:n,ctx:e}),p.$set(c),!e[14]&&"outlined"!==e[15]&&e[11]?U?(U.p(e,n),51200&n[0]&&ke(U,1)):(U=Bc(e),U.c(),ke(U,1),U.m(t,null)):U&&(Te(),Ae(U,1,1,(()=>{U=null})),Se()),H(t,j=Me(Y,[(!E||314823171&n[0]|2048&n[1]&&_!==(_=nl({[e[9]]:!0,"mdc-text-field":!0,"mdc-text-field--disabled":e[12],"mdc-text-field--textarea":e[14],"mdc-text-field--filled":"filled"===e[15],"mdc-text-field--outlined":"outlined"===e[15],"smui-text-field--standard":"standard"===e[15]&&!e[14],"mdc-text-field--no-label":e[16]||null==e[17]&&!e[42].label,"mdc-text-field--label-floating":e[28]||null!=e[0]&&""!==e[0],"mdc-text-field--with-leading-icon":e[35](e[22])?e[42].leadingIcon:e[22],"mdc-text-field--with-trailing-icon":e[35](e[23])?e[42].trailingIcon:e[23],"mdc-text-field--with-internal-counter":e[14]&&e[42].internalCounter,"mdc-text-field--invalid":e[1],...e[25]})))&&{class:_},(!E||67109888&n[0]&&$!==($=Object.entries(e[26]).map(Zc).concat([e[10]]).join(" ")))&&{style:$},{for:void 0},1024&n[1]&&rl(e[41],["input$","label$","ripple$","outline$","helperLine$"])])),w&&o(w.update)&&49152&n[0]|4&n[1]&&w.update.call(null,{ripple:!e[14]&&"filled"===e[15],unbounded:!1,addClass:e[38],removeClass:e[39],addStyle:e[40],eventTarget:e[33],activeTarget:e[33],initPromise:e[37]}),b&&o(b.update)&&256&n[0]&&b.update.call(null,e[8])},i(e){E||(ke(S),ke(k),ke(a.$$.fragment,e),ke(L,e),ke(d),ke(p.$$.fragment,e),ke(U),E=!0)},o(e){Ae(S),Ae(k),Ae(a.$$.fragment,e),Ae(L,e),Ae(d),Ae(p.$$.fragment,e),Ae(U),E=!1},d(n){n&&M(t),S&&S.d(),k&&k.d(),Ve(a),L&&L.d(n),P[u].d(),Ve(p),U&&U.d(),e[73](null),C=!1,s(T)}}}function Sc(e){let t;const n=e[51].leadingIcon,i=f(n,e,e[90],lc);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||268435456&r[2])&&g(i,n,e,e[90],t?m(n,e[90],r,ac):v(e[90]),lc)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function kc(e){let t;const n=e[51].trailingIcon,i=f(n,e,e[90],oc);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||268435456&r[2])&&g(i,n,e,e[90],t?m(n,e[90],r,sc):v(e[90]),oc)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function Ac(e){let t,n,i,r="filled"===e[15]&&Oc(),s=!e[16]&&(null!=e[17]||e[42].label)&&Lc(e);return{c(){r&&r.c(),t=V(),s&&s.c(),n=U()},m(e,o){r&&r.m(e,o),I(e,t,o),s&&s.m(e,o),I(e,n,o),i=!0},p(e,i){"filled"===e[15]?r||(r=Oc(),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),e[16]||null==e[17]&&!e[42].label?s&&(Te(),Ae(s,1,1,(()=>{s=null})),Se()):s?(s.p(e,i),196608&i[0]|2048&i[1]&&ke(s,1)):(s=Lc(e),s.c(),ke(s,1),s.m(n.parentNode,n))},i(e){i||(ke(s),i=!0)},o(e){Ae(s),i=!1},d(e){r&&r.d(e),e&&M(t),s&&s.d(e),e&&M(n)}}}function Oc(e){let t;return{c(){t=D("span"),Y(t,"class","mdc-text-field__ripple")},m(e,n){I(e,t,n)},d(e){e&&M(t)}}}function Lc(e){let t,i;const r=[{floatAbove:e[28]||null!=e[0]&&""!==e[0]},{required:e[13]},{wrapped:!0},ll(e[41],"label$")];let s={$$slots:{default:[Ic]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)s=n(s,r[e]);return t=new El({props:s}),e[52](t),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,n){const i=268443649&n[0]|1024&n[1]?Me(r,[268435457&n[0]&&{floatAbove:e[28]||null!=e[0]&&""!==e[0]},8192&n[0]&&{required:e[13]},r[2],1024&n[1]&&Ne(ll(e[41],"label$"))]):{};131072&n[0]|268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(n){e[52](null),Ve(t,n)}}}function Ic(e){let t,n,i=(null==e[17]?"":e[17])+"";const r=e[51].label,s=f(r,e,e[90],Ec);return{c(){t=R(i),s&&s.c()},m(e,i){I(e,t,i),s&&s.m(e,i),n=!0},p(e,o){(!n||131072&o[0])&&i!==(i=(null==e[17]?"":e[17])+"")&&j(t,i),s&&s.p&&(!n||268435456&o[2])&&g(s,r,e,e[90],n?m(r,e[90],o,xc):v(e[90]),Ec)},i(e){n||(ke(s,e),n=!0)},o(e){Ae(s,e),n=!1},d(e){e&&M(t),s&&s.d(e)}}}function Mc(e){let t,i;const r=[{noLabel:e[16]||null==e[17]&&!e[42].label},ll(e[41],"outline$")];let s={$$slots:{default:[Pc]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)s=n(s,r[e]);return t=new Ml({props:s}),e[54](t),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,n){const i=196608&n[0]|3072&n[1]?Me(r,[196608&n[0]|2048&n[1]&&{noLabel:e[16]||null==e[17]&&!e[42].label},1024&n[1]&&Ne(ll(e[41],"outline$"))]):{};268640289&n[0]|3072&n[1]|268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(n){e[54](null),Ve(t,n)}}}function Nc(e){let t,i;const r=[{floatAbove:e[28]||null!=e[0]&&""!==e[0]},{required:e[13]},{wrapped:!0},ll(e[41],"label$")];let s={$$slots:{default:[Dc]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)s=n(s,r[e]);return t=new El({props:s}),e[53](t),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,n){const i=268443649&n[0]|1024&n[1]?Me(r,[268435457&n[0]&&{floatAbove:e[28]||null!=e[0]&&""!==e[0]},8192&n[0]&&{required:e[13]},r[2],1024&n[1]&&Ne(ll(e[41],"label$"))]):{};131072&n[0]|268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(n){e[53](null),Ve(t,n)}}}function Dc(e){let t,n,i=(null==e[17]?"":e[17])+"";const r=e[51].label,s=f(r,e,e[90],bc);return{c(){t=R(i),s&&s.c()},m(e,i){I(e,t,i),s&&s.m(e,i),n=!0},p(e,o){(!n||131072&o[0])&&i!==(i=(null==e[17]?"":e[17])+"")&&j(t,i),s&&s.p&&(!n||268435456&o[2])&&g(s,r,e,e[90],n?m(r,e[90],o,wc):v(e[90]),bc)},i(e){n||(ke(s,e),n=!0)},o(e){Ae(s,e),n=!1},d(e){e&&M(t),s&&s.d(e)}}}function Pc(e){let t,n,i=!e[16]&&(null!=e[17]||e[42].label)&&Nc(e);return{c(){i&&i.c(),t=U()},m(e,r){i&&i.m(e,r),I(e,t,r),n=!0},p(e,n){e[16]||null==e[17]&&!e[42].label?i&&(Te(),Ae(i,1,1,(()=>{i=null})),Se()):i?(i.p(e,n),196608&n[0]|2048&n[1]&&ke(i,1)):(i=Nc(e),i.c(),ke(i,1),i.m(t.parentNode,t))},i(e){n||(ke(i),n=!0)},o(e){Ae(i),n=!1},d(e){i&&i.d(e),e&&M(t)}}}function Rc(e){let t;const n=e[51].leadingIcon,i=f(n,e,e[90],$c);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||268435456&r[2])&&g(i,n,e,e[90],t?m(n,e[90],r,_c):v(e[90]),$c)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function Vc(e){let t,i,r,s,o,a,l,c,u,d;const h=e[51].prefix,p=f(h,e,e[90],gc);let y=null!=e[20]&&Fc(e);const _=[{type:e[18]},{disabled:e[12]},{required:e[13]},{updateInvalid:e[19]},{"aria-controls":e[27]},{"aria-describedby":e[27]},e[16]&&null!=e[17]?{placeholder:e[17]}:{},ll(e[41],"input$")];function $(t){e[64](t)}function w(t){e[65](t)}function b(t){e[66](t)}function x(t){e[67](t)}let E={};for(let e=0;e<_.length;e+=1)E=n(E,_[e]);void 0!==e[0]&&(E.value=e[0]),void 0!==e[3]&&(E.files=e[3]),void 0!==e[4]&&(E.dirty=e[4]),void 0!==e[1]&&(E.invalid=e[1]),r=new Kl({props:E}),e[63](r),ce.push((()=>De(r,"value",$))),ce.push((()=>De(r,"files",w))),ce.push((()=>De(r,"dirty",b))),ce.push((()=>De(r,"invalid",x))),r.$on("blur",e[68]),r.$on("focus",e[69]),r.$on("blur",e[70]),r.$on("focus",e[71]);let C=null!=e[21]&&Hc(e);const T=e[51].suffix,S=f(T,e,e[90],pc);return{c(){p&&p.c(),t=V(),y&&y.c(),i=V(),Pe(r.$$.fragment),c=V(),C&&C.c(),u=V(),S&&S.c()},m(e,n){p&&p.m(e,n),I(e,t,n),y&&y.m(e,n),I(e,i,n),Re(r,e,n),I(e,c,n),C&&C.m(e,n),I(e,u,n),S&&S.m(e,n),d=!0},p(e,t){p&&p.p&&(!d||268435456&t[2])&&g(p,h,e,e[90],d?m(h,e[90],t,mc):v(e[90]),gc),null!=e[20]?y?(y.p(e,t),1048576&t[0]&&ke(y,1)):(y=Fc(e),y.c(),ke(y,1),y.m(i.parentNode,i)):y&&(Te(),Ae(y,1,1,(()=>{y=null})),Se());const n=135213056&t[0]|1024&t[1]?Me(_,[262144&t[0]&&{type:e[18]},4096&t[0]&&{disabled:e[12]},8192&t[0]&&{required:e[13]},524288&t[0]&&{updateInvalid:e[19]},134217728&t[0]&&{"aria-controls":e[27]},134217728&t[0]&&{"aria-describedby":e[27]},196608&t[0]&&Ne(e[16]&&null!=e[17]?{placeholder:e[17]}:{}),1024&t[1]&&Ne(ll(e[41],"input$"))]):{};!s&&1&t[0]&&(s=!0,n.value=e[0],ve((()=>s=!1))),!o&&8&t[0]&&(o=!0,n.files=e[3],ve((()=>o=!1))),!a&&16&t[0]&&(a=!0,n.dirty=e[4],ve((()=>a=!1))),!l&&2&t[0]&&(l=!0,n.invalid=e[1],ve((()=>l=!1))),r.$set(n),null!=e[21]?C?(C.p(e,t),2097152&t[0]&&ke(C,1)):(C=Hc(e),C.c(),ke(C,1),C.m(u.parentNode,u)):C&&(Te(),Ae(C,1,1,(()=>{C=null})),Se()),S&&S.p&&(!d||268435456&t[2])&&g(S,T,e,e[90],d?m(T,e[90],t,fc):v(e[90]),pc)},i(e){d||(ke(p,e),ke(y),ke(r.$$.fragment,e),ke(C),ke(S,e),d=!0)},o(e){Ae(p,e),Ae(y),Ae(r.$$.fragment,e),Ae(C),Ae(S,e),d=!1},d(n){p&&p.d(n),n&&M(t),y&&y.d(n),n&&M(i),e[63](null),Ve(r,n),n&&M(c),C&&C.d(n),n&&M(u),S&&S.d(n)}}}function Uc(e){let t,i,r,s,o,a,l,c;const u=[{disabled:e[12]},{required:e[13]},{updateInvalid:e[19]},{"aria-controls":e[27]},{"aria-describedby":e[27]},ll(e[41],"input$")];function d(t){e[56](t)}function h(t){e[57](t)}function p(t){e[58](t)}let y={};for(let e=0;e<u.length;e+=1)y=n(y,u[e]);void 0!==e[0]&&(y.value=e[0]),void 0!==e[4]&&(y.dirty=e[4]),void 0!==e[1]&&(y.invalid=e[1]),i=new ec({props:y}),e[55](i),ce.push((()=>De(i,"value",d))),ce.push((()=>De(i,"dirty",h))),ce.push((()=>De(i,"invalid",p))),i.$on("blur",e[59]),i.$on("focus",e[60]),i.$on("blur",e[61]),i.$on("focus",e[62]);const _=e[51].internalCounter,$=f(_,e,e[90],yc);return{c(){t=D("span"),Pe(i.$$.fragment),a=V(),$&&$.c(),Y(t,"class",l=nl({"mdc-text-field__resizer":!("input$resizable"in e[41])||e[41].input$resizable}))},m(e,n){I(e,t,n),Re(i,t,null),A(t,a),$&&$.m(t,null),c=!0},p(e,n){const a=134754304&n[0]|1024&n[1]?Me(u,[4096&n[0]&&{disabled:e[12]},8192&n[0]&&{required:e[13]},524288&n[0]&&{updateInvalid:e[19]},134217728&n[0]&&{"aria-controls":e[27]},134217728&n[0]&&{"aria-describedby":e[27]},1024&n[1]&&Ne(ll(e[41],"input$"))]):{};!r&&1&n[0]&&(r=!0,a.value=e[0],ve((()=>r=!1))),!s&&16&n[0]&&(s=!0,a.dirty=e[4],ve((()=>s=!1))),!o&&2&n[0]&&(o=!0,a.invalid=e[1],ve((()=>o=!1))),i.$set(a),$&&$.p&&(!c||268435456&n[2])&&g($,_,e,e[90],c?m(_,e[90],n,vc):v(e[90]),yc),(!c||1024&n[1]&&l!==(l=nl({"mdc-text-field__resizer":!("input$resizable"in e[41])||e[41].input$resizable})))&&Y(t,"class",l)},i(e){c||(ke(i.$$.fragment,e),ke($,e),c=!0)},o(e){Ae(i.$$.fragment,e),Ae($,e),c=!1},d(n){n&&M(t),e[55](null),Ve(i),$&&$.d(n)}}}function Fc(e){let t,n;return t=new Wl({props:{$$slots:{default:[Yc]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};1048576&n[0]|268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Yc(e){let t;return{c(){t=R(e[20])},m(e,n){I(e,t,n)},p(e,n){1048576&n[0]&&j(t,e[20])},d(e){e&&M(t)}}}function Hc(e){let t,n;return t=new ql({props:{$$slots:{default:[jc]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,n){const i={};2097152&n[0]|268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function jc(e){let t;return{c(){t=R(e[21])},m(e,n){I(e,t,n)},p(e,n){2097152&n[0]&&j(t,e[21])},d(e){e&&M(t)}}}function zc(e){let t;const n=e[51].trailingIcon,i=f(n,e,e[90],hc);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||268435456&r[2])&&g(i,n,e,e[90],t?m(n,e[90],r,dc):v(e[90]),hc)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function Bc(e){let t,i;const r=[ll(e[41],"ripple$")];let s={};for(let e=0;e<r.length;e+=1)s=n(s,r[e]);return t=new kl({props:s}),e[72](t),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,n){const i=1024&n[1]?Me(r,[Ne(ll(e[41],"ripple$"))]):{};t.$set(i)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(n){e[72](null),Ve(t,n)}}}function Gc(e){let t,i;const r=[ll(e[41],"helperLine$")];let s={$$slots:{default:[Wc]},$$scope:{ctx:e}};for(let e=0;e<r.length;e+=1)s=n(s,r[e]);return t=new Gl({props:s}),t.$on("SMUITextfieldHelperText:id",e[85]),t.$on("SMUITextfieldHelperText:mount",e[86]),t.$on("SMUITextfieldHelperText:unmount",e[87]),t.$on("SMUITextfieldCharacterCounter:mount",e[88]),t.$on("SMUITextfieldCharacterCounter:unmount",e[89]),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,n){const i=1024&n[1]?Me(r,[Ne(ll(e[41],"helperLine$"))]):{};268435456&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(e){Ve(t,e)}}}function Wc(e){let t;const n=e[51].helper,i=f(n,e,e[90],nc);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,r){i&&i.p&&(!t||268435456&r[2])&&g(i,n,e,e[90],t?m(n,e[90],r,tc):v(e[90]),nc)},i(e){t||(ke(i,e),t=!0)},o(e){Ae(i,e),t=!1},d(e){i&&i.d(e)}}}function qc(e){let t,n,i,r,s;const o=[Tc,Cc],a=[];t=function(e,t){return e[36]?0:1}(e),n=a[t]=o[t](e);let l=e[42].helper&&Gc(e);return{c(){n.c(),i=V(),l&&l.c(),r=U()},m(e,n){a[t].m(e,n),I(e,i,n),l&&l.m(e,n),I(e,r,n),s=!0},p(e,t){n.p(e,t),e[42].helper?l?(l.p(e,t),2048&t[1]&&ke(l,1)):(l=Gc(e),l.c(),ke(l,1),l.m(r.parentNode,r)):l&&(Te(),Ae(l,1,1,(()=>{l=null})),Se())},i(e){s||(ke(n),ke(l),s=!0)},o(e){Ae(n),Ae(l),s=!1},d(e){a[t].d(e),e&&M(i),l&&l.d(e),e&&M(r)}}}const Zc=([e,t])=>`${e}: ${t};`,Xc=([e,t])=>`${e}: ${t};`;function Kc(e,t,i){let r;const s=["use","class","style","ripple","disabled","required","textarea","variant","noLabel","label","type","value","files","invalid","updateInvalid","dirty","prefix","suffix","validateOnValueChange","useNativeValidation","withLeadingIcon","withTrailingIcon","input","floatingLabel","lineRipple","notchedOutline","focus","blur","layout","getElement"];let o=_(t,s),{$$slots:a={},$$scope:l}=t;const c=function(e){const t={};for(const n in e)t[n]=!0;return t}(a),{applyPassive:u}=Aa,d=al(te());let h=()=>{};function f(e){return e===h}let{use:p=[]}=t,{class:m=""}=t,{style:g=""}=t,{ripple:v=!0}=t,{disabled:$=!1}=t,{required:w=!1}=t,{textarea:b=!1}=t,{variant:x=(b?"outlined":"standard")}=t,{noLabel:E=!1}=t,{label:C}=t,{type:T="text"}=t,{value:S=(o.input$emptyValueUndefined?void 0:h)}=t,{files:k=h}=t;const A=!f(S)||!f(k);f(S)&&(S=void 0),f(k)&&(k=null);let{invalid:O=h}=t,{updateInvalid:L=f(O)}=t;f(O)&&(O=!1);let I,M,N,D,P,R,V,U,F,{dirty:Y=!1}=t,{prefix:H}=t,{suffix:j}=t,{validateOnValueChange:z=L}=t,{useNativeValidation:B=L}=t,{withLeadingIcon:G=h}=t,{withTrailingIcon:W=h}=t,{input:q}=t,{floatingLabel:Z}=t,{lineRipple:X}=t,{notchedOutline:K}=t,Q={},J={},ee=!1,re=oe("SMUI:addLayoutListener"),se=new Promise((e=>P=e)),ae=S;function le(e){var t;return e in Q?null!==(t=Q[e])&&void 0!==t?t:null:fe().classList.contains(e)}function ue(e){Q[e]||i(25,Q[e]=!0,Q)}function de(e){e in Q&&!Q[e]||i(25,Q[e]=!1,Q)}function he(){if(M){const e=M.shouldFloat;M.notchOutline(e)}}function fe(){return I}re&&(D=re(he)),ne((()=>{if(i(49,M=new tl({addClass:ue,removeClass:de,hasClass:le,registerTextFieldInteractionHandler:(e,t)=>fe().addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>fe().removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver((t=>{B&&e((e=>e.map((e=>e.attributeName)).filter((e=>e)))(t))})),n={attributes:!0};return q&&t.observe(q.getElement(),n),t},deregisterValidationAttributeChangeHandler:e=>{e.disconnect()},getNativeInput:()=>{var e;return null!==(e=null==q?void 0:q.getElement())&&void 0!==e?e:null},setInputAttr:(e,t)=>{null==q||q.addAttr(e,t)},removeInputAttr:e=>{null==q||q.removeAttr(e)},isFocused:()=>document.activeElement===(null==q?void 0:q.getElement()),registerInputInteractionHandler:(e,t)=>{null==q||q.getElement().addEventListener(e,t,u())},deregisterInputInteractionHandler:(e,t)=>{null==q||q.getElement().removeEventListener(e,t,u())},floatLabel:e=>Z&&Z.float(e),getLabelWidth:()=>Z?Z.getWidth():0,hasLabel:()=>!!Z,shakeLabel:e=>Z&&Z.shake(e),setLabelRequired:e=>Z&&Z.setRequired(e),activateLineRipple:()=>X&&X.activate(),deactivateLineRipple:()=>X&&X.deactivate(),setLineRippleTransformOrigin:e=>X&&X.setRippleCenter(e),closeOutline:()=>K&&K.closeNotch(),hasOutline:()=>!!K,notchOutline:e=>K&&K.notch(e)},{get helperText(){return U},get characterCounter(){return F},get leadingIcon(){return R},get trailingIcon(){return V}})),A){if(null==q)throw new Error("SMUI Textfield initialized without Input component.");M.init()}else me().then((()=>{if(null==q)throw new Error("SMUI Textfield initialized without Input component.");M.init()}));return P(),()=>{M.destroy()}})),ie((()=>{D&&D()}));return e.$$set=e=>{t=n(n({},t),y(e)),i(41,o=_(t,s)),"use"in e&&i(8,p=e.use),"class"in e&&i(9,m=e.class),"style"in e&&i(10,g=e.style),"ripple"in e&&i(11,v=e.ripple),"disabled"in e&&i(12,$=e.disabled),"required"in e&&i(13,w=e.required),"textarea"in e&&i(14,b=e.textarea),"variant"in e&&i(15,x=e.variant),"noLabel"in e&&i(16,E=e.noLabel),"label"in e&&i(17,C=e.label),"type"in e&&i(18,T=e.type),"value"in e&&i(0,S=e.value),"files"in e&&i(3,k=e.files),"invalid"in e&&i(1,O=e.invalid),"updateInvalid"in e&&i(19,L=e.updateInvalid),"dirty"in e&&i(4,Y=e.dirty),"prefix"in e&&i(20,H=e.prefix),"suffix"in e&&i(21,j=e.suffix),"validateOnValueChange"in e&&i(43,z=e.validateOnValueChange),"useNativeValidation"in e&&i(44,B=e.useNativeValidation),"withLeadingIcon"in e&&i(22,G=e.withLeadingIcon),"withTrailingIcon"in e&&i(23,W=e.withTrailingIcon),"input"in e&&i(2,q=e.input),"floatingLabel"in e&&i(5,Z=e.floatingLabel),"lineRipple"in e&&i(6,X=e.lineRipple),"notchedOutline"in e&&i(7,K=e.notchedOutline),"$$scope"in e&&i(90,l=e.$$scope)},e.$$.update=()=>{if(4&e.$$.dirty[0]&&i(33,r=q&&q.getElement()),524290&e.$$.dirty[0]|262144&e.$$.dirty[1]&&M&&M.isValid()!==!O&&(L?i(1,O=!M.isValid()):M.setValid(!O)),266240&e.$$.dirty[1]&&M&&M.getValidateOnValueChange()!==z&&M.setValidateOnValueChange(!f(z)&&z),270336&e.$$.dirty[1]&&M&&M.setUseNativeValidation(!!f(B)||B),4096&e.$$.dirty[0]|262144&e.$$.dirty[1]&&M&&M.setDisabled($),1&e.$$.dirty[0]|786432&e.$$.dirty[1]&&M&&A&&ae!==S){i(50,ae=S);const e=`${S}`;M.getValue()!==e&&M.setValue(e)}},[S,O,q,k,Y,Z,X,K,p,m,g,v,$,w,b,x,E,C,T,L,H,j,G,W,I,Q,J,N,ee,R,V,U,F,r,d,f,A,se,ue,de,function(e,t){J[e]!=t&&(""===t||null==t?(delete J[e],i(26,J)):i(26,J[e]=t,J))},o,c,z,B,function(){null==q||q.focus()},function(){null==q||q.blur()},he,fe,M,ae,a,function(e){ce[e?"unshift":"push"]((()=>{Z=e,i(5,Z)}))},function(e){ce[e?"unshift":"push"]((()=>{Z=e,i(5,Z)}))},function(e){ce[e?"unshift":"push"]((()=>{K=e,i(7,K)}))},function(e){ce[e?"unshift":"push"]((()=>{q=e,i(2,q)}))},function(e){S=e,i(0,S)},function(e){Y=e,i(4,Y)},function(e){O=e,i(1,O),i(49,M),i(19,L)},()=>i(28,ee=!1),()=>i(28,ee=!0),e=>il(I,"blur",e),e=>il(I,"focus",e),function(e){ce[e?"unshift":"push"]((()=>{q=e,i(2,q)}))},function(e){S=e,i(0,S)},function(e){k=e,i(3,k)},function(e){Y=e,i(4,Y)},function(e){O=e,i(1,O),i(49,M),i(19,L)},()=>i(28,ee=!1),()=>i(28,ee=!0),e=>il(I,"blur",e),e=>il(I,"focus",e),function(e){ce[e?"unshift":"push"]((()=>{X=e,i(6,X)}))},function(e){ce[e?"unshift":"push"]((()=>{I=e,i(24,I)}))},e=>i(29,R=e.detail),()=>i(29,R=void 0),e=>i(30,V=e.detail),()=>i(30,V=void 0),e=>i(32,F=e.detail),()=>i(32,F=void 0),function(e){ce[e?"unshift":"push"]((()=>{I=e,i(24,I)}))},e=>i(29,R=e.detail),()=>i(29,R=void 0),e=>i(30,V=e.detail),()=>i(30,V=void 0),e=>i(27,N=e.detail),e=>i(31,U=e.detail),()=>{i(27,N=void 0),i(31,U=void 0)},e=>i(32,F=e.detail),()=>i(32,F=void 0),l]}class Qc extends Fe{constructor(e){super(),Ue(this,e,Kc,qc,a,{use:8,class:9,style:10,ripple:11,disabled:12,required:13,textarea:14,variant:15,noLabel:16,label:17,type:18,value:0,files:3,invalid:1,updateInvalid:19,dirty:4,prefix:20,suffix:21,validateOnValueChange:43,useNativeValidation:44,withLeadingIcon:22,withTrailingIcon:23,input:2,floatingLabel:5,lineRipple:6,notchedOutline:7,focus:45,blur:46,layout:47,getElement:48},null,[-1,-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get layout(){return this.$$.ctx[47]}get getElement(){return this.$$.ctx[48]}}function Jc(e){let t,n,i,r=e[3].replaceAll("\n","<br />")+"";return{c(){t=D("div"),Y(t,"class","auth-error svelte-components-Login")},m(e,n){I(e,t,n),t.innerHTML=r,i=!0},p(e,n){(!i||8&n)&&r!==(r=e[3].replaceAll("\n","<br />")+"")&&(t.innerHTML=r)},i(e){i||(ge((()=>{n||(n=Le(t,pi,{},!0)),n.run(1)})),i=!0)},o(e){n||(n=Le(t,pi,{},!1)),n.run(0),i=!1},d(e){e&&M(t),e&&n&&n.end()}}}function eu(e){let t,n,i,r,s,o,a,l;function c(t){e[9](t)}let u={type:"text",disabled:!!e[0],label:e[4]("login.username-placeholder")};function d(t){e[10](t)}void 0!==e[1]&&(u.value=e[1]),n=new Qc({props:u}),ce.push((()=>De(n,"value",c)));let h={type:"password",disabled:!!e[0],label:e[4]("login.password-placeholder")};return void 0!==e[2]&&(h.value=e[2]),o=new Qc({props:h}),ce.push((()=>De(o,"value",d))),{c(){t=D("div"),Pe(n.$$.fragment),r=V(),s=D("div"),Pe(o.$$.fragment),Y(t,"class","custom-input svelte-components-Login"),Y(s,"class","custom-input svelte-components-Login")},m(e,i){I(e,t,i),Re(n,t,null),I(e,r,i),I(e,s,i),Re(o,s,null),l=!0},p(e,t){const r={};1&t&&(r.disabled=!!e[0]),16&t&&(r.label=e[4]("login.username-placeholder")),!i&&2&t&&(i=!0,r.value=e[1],ve((()=>i=!1))),n.$set(r);const s={};1&t&&(s.disabled=!!e[0]),16&t&&(s.label=e[4]("login.password-placeholder")),!a&&4&t&&(a=!0,s.value=e[2],ve((()=>a=!1))),o.$set(s)},i(e){l||(ke(n.$$.fragment,e),ke(o.$$.fragment,e),l=!0)},o(e){Ae(n.$$.fragment,e),Ae(o.$$.fragment,e),l=!1},d(e){e&&M(t),Ve(n),e&&M(r),e&&M(s),Ve(o)}}}function tu(t){let n,i,r,s,o=t[4]("login.username")+"";return{c(){n=D("div"),i=R(o),r=V(),s=R(t[0])},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s)},p(e,t){16&t&&o!==(o=e[4]("login.username")+"")&&j(i,o),1&t&&j(s,e[0])},i:e,o:e,d(e){e&&M(n)}}}function nu(e){let t,n,i,r,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w,b=e[4]("login.title")+"",x=e[4]("login.description")+"",E=(e[0]?e[4]("login.logout"):e[4]("login.login"))+"",C=e[4]("login.cancel")+"";t=new Zo({props:{size:"4em"}});let T=e[3]&&Jc(e);const S=[tu,eu],k=[];function O(e,t){return e[0]?0:1}return d=O(e),h=k[d]=S[d](e),{c(){Pe(t.$$.fragment),n=V(),i=D("h4"),r=R(b),o=V(),a=D("div"),l=R(x),c=V(),T&&T.c(),u=V(),h.c(),f=V(),p=D("button"),m=R(E),g=V(),v=D("button"),y=R(C),B(i,"width","85%"),B(i,"text-align","center"),B(a,"width","85%"),B(a,"padding","1em"),B(a,"text-align","center"),Y(p,"class","login svelte-components-Login"),Y(v,"class","cancel svelte-components-Login")},m(s,h){Re(t,s,h),I(s,n,h),I(s,i,h),A(i,r),I(s,o,h),I(s,a,h),A(a,l),I(s,c,h),T&&T.m(s,h),I(s,u,h),k[d].m(s,h),I(s,f,h),I(s,p,h),A(p,m),I(s,g,h),I(s,v,h),A(v,y),_=!0,$||(w=[F(p,"click",e[11]),F(v,"click",e[5])],$=!0)},p(e,t){(!_||16&t)&&b!==(b=e[4]("login.title")+"")&&j(r,b),(!_||16&t)&&x!==(x=e[4]("login.description")+"")&&j(l,x),e[3]?T?(T.p(e,t),8&t&&ke(T,1)):(T=Jc(e),T.c(),ke(T,1),T.m(u.parentNode,u)):T&&(Te(),Ae(T,1,1,(()=>{T=null})),Se());let n=d;d=O(e),d===n?k[d].p(e,t):(Te(),Ae(k[n],1,1,(()=>{k[n]=null})),Se(),h=k[d],h?h.p(e,t):(h=k[d]=S[d](e),h.c()),ke(h,1),h.m(f.parentNode,f)),(!_||17&t)&&E!==(E=(e[0]?e[4]("login.logout"):e[4]("login.login"))+"")&&j(m,E),(!_||16&t)&&C!==(C=e[4]("login.cancel")+"")&&j(y,C)},i(e){_||(ke(t.$$.fragment,e),ke(T),ke(h),_=!0)},o(e){Ae(t.$$.fragment,e),Ae(T),Ae(h),_=!1},d(e){Ve(t,e),e&&M(n),e&&M(i),e&&M(o),e&&M(a),e&&M(c),T&&T.d(e),e&&M(u),k[d].d(e),e&&M(f),e&&M(p),e&&M(g),e&&M(v),$=!1,s(w)}}}function iu(e){let t,n;return t=new To({props:{onEscCb:e[5],$$slots:{default:[nu]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},p(e,[n]){const i={};16415&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function ru(e,t,n){let i;h(e,li,(e=>n(4,i=e)));let{logged_username:r}=t,{auth_controller:s}=t,o="",a="",l="";const c=re(),u=()=>{s.logout(),n(2,a="")},d=e=>{n(3,l=e),n(1,o=""),n(2,a="")},f=()=>{s.login(o,a,d),n(2,a=a.replaceAll(/./g,"*"))};return e.$$set=e=>{"logged_username"in e&&n(0,r=e.logged_username),"auth_controller"in e&&n(8,s=e.auth_controller)},e.$$.update=()=>{1&e.$$.dirty&&r&&(n(1,o=r),n(2,a="**************")),6&e.$$.dirty&&(o||a)&&n(3,l="")},[r,o,a,l,i,()=>c("cancel"),u,f,s,function(e){o=e,n(1,o),n(0,r)},function(e){a=e,n(2,a),n(0,r)},()=>r?u():f()]}class su extends Fe{constructor(e){super(),Ue(this,e,ru,iu,a,{logged_username:0,auth_controller:8})}}function ou(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"fill-rule","evenodd"),Y(i,"clip-rule","evenodd"),Y(i,"d","M2 0C0.895386 0 0 0.895416 0 2V33C0 34.1046 0.895386 35 2 35H35V0H2ZM10 7.94202L13.942 4L26.9399 16.998L26.938 17L26.9399 17.002L13.942 30L10 26.058L19.058 17L10 7.94202Z"),Y(i,"fill",t[0]),Y(n,"width",t[1]),Y(n,"height",t[2]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){1&t&&Y(i,"fill",e[0]),2&t&&Y(n,"width",e[1]),4&t&&Y(n,"height",e[2]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function au(e,t,n){let{color:i="currentColor"}=t,{size:r="2.5em"}=t,{width:s=r}=t,{height:o=r}=t,{viewBox:a="0 0 35 35"}=t;return e.$$set=e=>{"color"in e&&n(0,i=e.color),"size"in e&&n(4,r=e.size),"width"in e&&n(1,s=e.width),"height"in e&&n(2,o=e.height),"viewBox"in e&&n(3,a=e.viewBox)},[i,s,o,a,r]}class lu extends Fe{constructor(e){super(),Ue(this,e,au,ou,a,{color:0,size:4,width:1,height:2,viewBox:3})}}function cu(t){let n,i;return{c(){n=P("svg"),i=P("path"),Y(i,"fill-rule","evenodd"),Y(i,"clip-rule","evenodd"),Y(i,"d","M2 35L35 35L35 4.17233e-06L2 4.17233e-06C0.895436 4.17233e-06 4.17233e-06 0.895436 4.17233e-06 2L4.17233e-06 33C4.17233e-06 34.1046 0.895436 35 2 35ZM25 27.058L21.058 31L8.06 18.002L8.062 18L8.06 17.998L21.058 5L25 8.942L15.942 18L25 27.058Z"),Y(i,"fill",t[0]),Y(n,"width",t[1]),Y(n,"height",t[2]),Y(n,"viewBox",t[3]),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i)},p(e,[t]){1&t&&Y(i,"fill",e[0]),2&t&&Y(n,"width",e[1]),4&t&&Y(n,"height",e[2]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function uu(e,t,n){let{color:i="currentColor"}=t,{size:r="2.5em"}=t,{width:s=r}=t,{height:o=r}=t,{viewBox:a="0 0 35 35"}=t;return e.$$set=e=>{"color"in e&&n(0,i=e.color),"size"in e&&n(4,r=e.size),"width"in e&&n(1,s=e.width),"height"in e&&n(2,o=e.height),"viewBox"in e&&n(3,a=e.viewBox)},[i,s,o,a,r]}class du extends Fe{constructor(e){super(),Ue(this,e,uu,cu,a,{color:0,size:4,width:1,height:2,viewBox:3})}}function hu(e){let t,n;return t=new lu({}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function fu(e){let t,n;return t=new du({}),{c(){Pe(t.$$.fragment)},m(e,i){Re(t,e,i),n=!0},i(e){n||(ke(t.$$.fragment,e),n=!0)},o(e){Ae(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function pu(e){let t,n,i,r,s,o;const a=[fu,hu],l=[];function c(e,t){return e[1]?0:1}return n=c(e),i=l[n]=a[n](e),{c(){t=D("button"),i.c(),Y(t,"class","hide-chat svelte-components-ToggleChatButton"),G(t,"full-screen-hide",e[0]),G(t,"horizontal-hide-chat-button",e[1])},m(e,i){I(e,t,i),l[n].m(t,null),r=!0,s||(o=F(t,"click",$s),s=!0)},p(e,[r]){let s=n;n=c(e),n!==s&&(Te(),Ae(l[s],1,1,(()=>{l[s]=null})),Se(),i=l[n],i||(i=l[n]=a[n](e),i.c()),ke(i,1),i.m(t,null)),1&r&&G(t,"full-screen-hide",e[0]),2&r&&G(t,"horizontal-hide-chat-button",e[1])},i(e){r||(ke(i),r=!0)},o(e){Ae(i),r=!1},d(e){e&&M(t),l[n].d(),s=!1,o()}}}function mu(e,t,n){let i,r;return h(e,vs,(e=>n(0,i=e))),h(e,ys,(e=>n(1,r=e))),[i,r]}class gu extends Fe{constructor(e){super(),Ue(this,e,mu,pu,a,{})}}function vu(t){let n,i,r,s,o,a;return{c(){n=P("svg"),i=P("path"),r=P("path"),s=P("path"),o=P("path"),a=P("path"),Y(i,"d","M2.53469 38.6064L2.88379 38.2484C1.00975 36.4208 1.02996 33.3454 3.00011 31.7287L3.00012 31.7287C7.86239 27.7384 13.3326 24.4923 19.2238 22.1124C26.7615 19.0674 34.8406 17.5 43 17.5C51.1593 17.5 59.2385 19.0674 66.776 22.1124C72.6674 24.4923 78.1373 27.7384 82.9998 31.7287C84.9698 33.3455 84.9904 36.4208 83.1166 38.2485C81.4294 39.8938 78.7911 39.8956 76.9271 38.3795C72.8245 35.0424 68.2211 32.324 63.2694 30.3237C56.8428 27.7276 49.9553 26.3915 43 26.3915C36.0446 26.3915 29.1571 27.7276 22.7306 30.3237C17.7789 32.324 13.1755 35.0424 9.07277 38.3795L9.07276 38.3795C7.20894 39.8956 4.57093 39.8938 2.88379 38.2484L2.53469 38.6064Z"),Y(i,"fill",t[2]),Y(r,"d","M52.2373 63.7744L52.4821 63.3404L52.2373 63.7745C53.0564 64.2364 53.4653 65.019 53.4979 65.8677C53.5308 66.7252 53.1761 67.6463 52.4537 68.3259L52.791 68.6845L52.4537 68.3259L45.8012 74.5844C44.5036 75.8052 42.4964 75.8052 41.1988 74.5844L34.5463 68.3259L34.5463 68.3259C33.8239 67.6463 33.4692 66.7252 33.5021 65.8677C33.5347 65.019 33.9436 64.2364 34.7627 63.7745L34.7627 63.7744C35.4766 63.3718 36.2228 63.0181 36.9957 62.717L36.9958 62.7169C39.0571 61.9137 41.2673 61.5 43.5 61.5C45.7327 61.5 47.9429 61.9137 50.0042 62.7169L50.0043 62.717C50.7772 63.0181 51.5234 63.3718 52.2373 63.7744Z"),Y(r,"fill",t[2]),Y(s,"d","M77.755 15.2836C78.5171 14.5456 78.197 13.0391 77.0401 11.9187C75.8831 10.7984 74.3274 10.4884 73.5652 11.2264L14.8776 68.0574C14.1155 68.7954 14.4356 70.3019 15.5925 71.4223C16.7495 72.5426 18.3052 72.8526 19.0674 72.1146L77.755 15.2836Z"),Y(s,"fill",t[2]),Y(o,"d","M60.7628 35.8959L60.9153 35.5129L60.7628 35.8959C64.8359 37.5174 68.6391 39.685 72.0621 42.3274L72.3676 41.9316L72.0621 42.3274C73.942 43.7784 73.9696 46.6177 72.1987 48.3198C70.5927 49.8634 68.0616 49.8655 66.2267 48.4869L65.9263 48.8866L66.2267 48.4869C63.5453 46.4723 60.5875 44.812 57.4313 43.5555C52.8555 41.7338 47.9518 40.7963 43 40.7963C38.0482 40.7963 33.1445 41.7338 28.5687 43.5555L28.7484 44.0068L28.5687 43.5555C25.4125 44.812 22.4547 46.4723 19.7733 48.4869C17.9383 49.8655 15.4073 49.8634 13.8013 48.3198C12.0304 46.6177 12.0581 43.7784 13.9379 42.3274L13.9379 42.3274C17.3608 39.685 21.1641 37.5174 25.2372 35.8959L25.2372 35.8959C30.8681 33.654 36.904 32.5 43 32.5C49.0959 32.5 55.1319 33.654 60.7628 35.8959Z"),Y(o,"fill",t[2]),Y(a,"d","M24.8407 52.24L24.5566 51.8285L24.8407 52.24C30.2043 48.5362 36.738 46.5 43.5 46.5C50.262 46.5 56.7957 48.5362 62.1593 52.24C63.8968 53.4398 63.9407 55.9425 62.321 57.4532C60.8671 58.8092 58.5643 58.8101 56.803 57.6754C52.9169 55.1716 48.2825 53.8058 43.5 53.8058C38.7175 53.8058 34.0831 55.1716 30.197 57.6754C28.4357 58.8101 26.1329 58.8092 24.679 57.4532C23.0593 55.9425 23.1032 53.4397 24.8407 52.24Z"),Y(a,"fill",t[2]),Y(n,"width",t[0]),Y(n,"height",t[1]),Y(n,"viewBox",t[3]),Y(n,"fill","none"),Y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){I(e,n,t),A(n,i),A(n,r),A(n,s),A(n,o),A(n,a)},p(e,[t]){4&t&&Y(i,"fill",e[2]),4&t&&Y(r,"fill",e[2]),4&t&&Y(s,"fill",e[2]),4&t&&Y(o,"fill",e[2]),4&t&&Y(a,"fill",e[2]),1&t&&Y(n,"width",e[0]),2&t&&Y(n,"height",e[1]),8&t&&Y(n,"viewBox",e[3])},i:e,o:e,d(e){e&&M(n)}}}function yu(e,t,n){let{size:i="2.5em"}=t,{width:r=i}=t,{height:s=i}=t,{color:o="currentColor"}=t,{viewBox:a="0 0 86 91"}=t;return e.$$set=e=>{"size"in e&&n(4,i=e.size),"width"in e&&n(0,r=e.width),"height"in e&&n(1,s=e.height),"color"in e&&n(2,o=e.color),"viewBox"in e&&n(3,a=e.viewBox)},[r,s,o,a,i]}class _u extends Fe{constructor(e){super(),Ue(this,e,yu,vu,a,{size:4,width:0,height:1,color:2,viewBox:3})}}function $u(e){let t,n,i,r,s,o,a=e[2]("connection-issues.low-bandwidth")+"";return s=new _u({}),{c(){t=D("div"),n=D("span"),i=R(a),r=V(),Pe(s.$$.fragment),Y(n,"class","svelte-components-InternetConnectionStatus"),Y(t,"class","svelte-components-InternetConnectionStatus")},m(e,a){I(e,t,a),A(t,n),A(n,i),A(t,r),Re(s,t,null),o=!0},p(e,t){(!o||4&t)&&a!==(a=e[2]("connection-issues.low-bandwidth")+"")&&j(i,a)},i(e){o||(ke(s.$$.fragment,e),o=!0)},o(e){Ae(s.$$.fragment,e),o=!1},d(e){e&&M(t),Ve(s)}}}function wu(e){let t,n,i=e[0]>=xu&&e[1]<=bu&&$u(e);return{c(){i&&i.c(),t=U()},m(e,r){i&&i.m(e,r),I(e,t,r),n=!0},p(e,[n]){e[0]>=xu&&e[1]<=bu?i?(i.p(e,n),3&n&&ke(i,1)):(i=$u(e),i.c(),ke(i,1),i.m(t.parentNode,t)):i&&(Te(),Ae(i,1,1,(()=>{i=null})),Se())},i(e){n||(ke(i),n=!0)},o(e){Ae(i),n=!1},d(e){i&&i.d(e),e&&M(t)}}}const bu=.5,xu=3;function Eu(e,t,n){let i,r,s;h(e,Gr,(e=>n(4,r=e))),h(e,li,(e=>n(2,s=e)));let o=0,a=Array(xu).fill(0),l=!0;return e.$$.update=()=>{16&e.$$.dirty&&(l?l=!1:(n(0,o++,o),n(3,a[o%xu]=r,a))),8&e.$$.dirty&&n(1,i=a.reduce(((e,t)=>e+t),0)/xu)},[o,i,s,a,r]}class Cu extends Fe{constructor(e){super(),Ue(this,e,Eu,wu,a,{})}}const Tu="1.0.4",{org_id:Su,head_id:ku}=d(Yr);let Au;let Ou,Lu,Iu=8e3,Mu=0,Nu=parseInt(Cs("session_id"))||0;Nu++,Ts("session_id",Nu.toString());let Du="",Pu="";Mu=parseInt(Cs("message_counter"))||0;const Ru=e=>{if(!e)return"";const t=e.split(" ");let n="";return t.forEach((e=>{if(e.length>15&&!e.includes("<br")&&!e.includes("href")&&!e.includes("_blank"))for(let t=e.length+1;t>0;t--)t%15==0&&(e=e.substring(0,t)+"­"+e.substring(t));n+=" "+e})),n.trim()},Vu=(e,t,n)=>{Du=e,t&&(Ou=t),n&&(Lu=n),Au&&Au.close()},Uu=(e,t,n,i,r,s=(()=>null),o=(()=>null),a=(e=>{}),l=(e=>{}),c=(()=>null),u=(()=>null),h)=>{Ou=t,Du=e,Lu=n,Au=Zr.getWebsocket(i,r),Au.onmessage=function(e){const t=JSON.parse(e.data),{user_id:n,id:i,username:r,text:o,timestamp:f,event:p,video:m,op:g,users:v,hook:y,media:_,cached:$,error_reason:w,version:b}=t,x=d(zi);switch(p){case"text":if(r===Du&&n===Lu)for(let e=x.length-1;e>=0;e--){const t=x[e];if(t.event===p&&t.id===i&&t.user_id===n&&t.text===o&&t.username===r){t.isSent=!0,m&&(t.url=m);break}}else{const e={id:i,user_id:n,username:r,timestamp:new Date(Date.parse(f)),speaker:"backend",text:Ru(o),isSent:!0,event:p,url:m,visible:!1};x.push(e)}m&&(Pu=m,s(m));break;case"hook":{va.set(!0);const e={type:"suggestions",hook:y,disabled:!1};"options"===y.inputType&&(y.text||"voiceflowOptions"==y.hookname?Gi.set(!0):Gi.set(!1),x.push(e));break}case"media":{const e={type:"media",media:_,timestamp:new Date(Date.parse(f))};x.push(e);break}case"cache":u(!!$);break;case"aggregator_error":Yu(w||"There was an error processing your message",!0),h();break;case"conversation_end":Yu("Conversation ended",!0),c(),va.set(!0);break;case"join":l(g);break;case"count":a(v);break;case"unrecoverable_error":Br.set(w),Au.close();break;case"minimum_supported_version":Tu<(E=b)&&Br.set(`\nLowest supported version is ${E}\nYou are using version 1.0.4\n`);break;default:console.info("Got an unexpected event",p)}var E;zi.set(x)},Au.onopen=()=>{console.info("Websocket connection open"),Au.send(Ou),Iu=8e3,o()};const f=()=>Uu(Du,Ou,Lu,i,r,s,o,a,l,c,u,h);Au.onclose=()=>{console.info("Websocket connection closed");try{console.info("Reconnecting after websocket closed"),f()}catch(e){Iu=Math.max(2*Iu,64e3),setTimeout((()=>f()),Iu)}},Au.onerror=()=>{console.info("Websocket error");try{console.info("Reconnecting after websocket error"),f()}catch(e){Iu=Math.max(2*Iu,64e3),setTimeout((()=>f()),Iu)}}},Fu=e=>{const t=e.detail,n={id:++Mu,timestamp:new Date,speaker:"user",text:Ru(t),isSent:!1,user_id:Lu,username:Du,event:"text",session_id:`${Lu}::${Su}::${ku}::${Nu.toString().padStart(5,"0")}`,visible:!0};Ts("message_counter",Mu.toString());const i=d(zi);let r=i.length-1;for(;r>0;){const t=i[r];if("suggestions"===t.type&&!t.disabled){t.disabled=!0;const n=t.hook.inputs;for(let t=0;t<n.length;t++)n[t].text===e.detail&&(n[t].selected=!0);break}r--}zi.set([...i,n]),Au&&(n.text=t,Au.send(JSON.stringify(n)))},Yu=(e,t=!1)=>{const n={text:e,type:"info"};t&&(n.timestamp=new Date);const i=d(zi);i.push(n),zi.set(i)},Hu="MediaSource"in window&&"addSourceBuffer"in window.MediaSource.prototype&&"appendBuffer"in window.SourceBuffer.prototype&&"onupdateend"in window.SourceBuffer.prototype&&MediaSource.isTypeSupported('video/mp4; codecs="avc1.64001F, mp4a.40.2"');var ju="0, 224, 188",zu="250, 122, 80",Bu="249, 219, 223",Gu="100, 100, 100",Wu="40, 40, 40",qu="250, 250, 250",Zu={primary:ju,"primary-dimmed":"131, 205, 193",secondary:zu,danger:Bu,shadow:Gu,body:Wu,background:qu,"chat-background":"linear-gradient(0deg,rgba(var(--background), 0.8) 0%,rgba(var(--background), 0.1) 100%)","download-button-font":"0, 163, 137","download-button-background":"255, 255, 255"},Xu=Object.freeze({__proto__:null,primary:ju,secondary:zu,danger:Bu,shadow:Gu,body:Wu,background:qu,default:Zu});const Ku=async e=>{try{return(await function(e){switch(e){case"./themes/dark.json":return Promise.resolve().then((function(){return pd}));case"./themes/light.json":return Promise.resolve().then((function(){return Xu}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./themes/${e}.json`)).default}catch{return Zu}};function Qu(e){let t,n,i;function r(t){e[59](t)}let s={logged_username:"anonymous"!==(e[1]&&e[1])?e[1]:void 0};return void 0!==e[5]&&(s.auth_controller=e[5]),t=new su({props:s}),ce.push((()=>De(t,"auth_controller",r))),t.$on("cancel",e[60]),{c(){Pe(t.$$.fragment)},m(e,n){Re(t,e,n),i=!0},p(e,i){const r={};2&i[0]&&(r.logged_username="anonymous"!==(e[1]&&e[1])?e[1]:void 0),!n&&32&i[0]&&(n=!0,r.auth_controller=e[5],ve((()=>n=!1))),t.$set(r)},i(e){i||(ke(t.$$.fragment,e),i=!0)},o(e){Ae(t.$$.fragment,e),i=!1},d(e){Ve(t,e)}}}function Ju(e){let t,n,i;return n=new ji({}),{c(){t=D("div"),Pe(n.$$.fragment),Y(t,"class","center-text loading full-screen svelte-App")},m(e,r){I(e,t,r),Re(n,t,null),i=!0},i(e){i||(ke(n.$$.fragment,e),i=!0)},o(e){Ae(n.$$.fragment,e),i=!1},d(e){e&&M(t),Ve(n)}}}function ed(e){let t,n,i,r;function s(t){e[61](t)}let o={};return void 0!==e[17]&&(o.asrModal=e[17]),n=new Oo({props:o}),ce.push((()=>De(n,"asrModal",s))),{c(){t=D("div"),Pe(n.$$.fragment),Y(t,"class","mic-access-modal svelte-App")},m(e,i){I(e,t,i),Re(n,t,null),r=!0},p(e,t){const r={};!i&&131072&t[0]&&(i=!0,r.asrModal=e[17],ve((()=>i=!1))),n.$set(r)},i(e){r||(ke(n.$$.fragment,e),r=!0)},o(e){Ae(n.$$.fragment,e),r=!1},d(e){e&&M(t),Ve(n)}}}function td(e){let t,n,i;return n=new Ea({}),{c(){t=D("div"),Pe(n.$$.fragment),Y(t,"class","loading svelte-App")},m(e,r){I(e,t,r),Re(n,t,null),i=!0},i(e){i||(ke(n.$$.fragment,e),i=!0)},o(e){Ae(n.$$.fragment,e),i=!1},d(e){e&&M(t),Ve(n)}}}function nd(e){let t,n,i,r,s,o,a,l,c,u,d,h,f,p,m,g,v,y,_,$,w,b,x,E,C,T,S,k,O,L,N,P,U,F,H,z,B,W,q;function Z(t){e[39](t)}function X(t){e[40](t)}function K(t){e[41](t)}s=new ci({});let Q={};function J(t){e[42](t)}function ee(t){e[43](t)}function te(t){e[44](t)}function ne(t){e[45](t)}function ie(t){e[46](t)}function re(t){e[47](t)}function se(t){e[48](t)}function oe(t){e[49](t)}void 0!==e[1]&&(Q.logged_username=e[1]),void 0!==e[3]&&(Q.access_token=e[3]),void 0!==e[4]&&(Q._user_id=e[4]),a=new Sa({props:Q}),e[38](a),ce.push((()=>De(a,"logged_username",Z))),ce.push((()=>De(a,"access_token",X))),ce.push((()=>De(a,"_user_id",K)));var ae=e[22];function le(e){let t={show_count:"opsp"===e[0]&&e[2]};return void 0!==e[11]&&(t.idleVideoSrc=e[11]),void 0!==e[20]&&(t.sessionCount=e[20]),void 0!==e[7]&&(t.name=e[7]),void 0!==e[15]&&(t.skipTalkingVideo=e[15]),void 0!==e[16]&&(t.on_video_synth_error=e[16]),void 0!==e[12]&&(t.on_video_received=e[12]),void 0!==e[13]&&(t.on_enter=e[13]),void 0!==e[14]&&(t.on_cache_check=e[14]),{props:t}}function ue(t){e[54](t)}function de(t){e[55](t)}function he(t){e[56](t)}function fe(t){e[57](t)}ae&&(p=new ae(le(e)),ce.push((()=>De(p,"idleVideoSrc",J))),ce.push((()=>De(p,"sessionCount",ee))),ce.push((()=>De(p,"name",te))),ce.push((()=>De(p,"skipTalkingVideo",ne))),ce.push((()=>De(p,"on_video_synth_error",ie))),ce.push((()=>De(p,"on_video_received",re))),ce.push((()=>De(p,"on_enter",se))),ce.push((()=>De(p,"on_cache_check",oe))),p.$on("ready",e[50]),p.$on("talking_end",e[51]),p.$on("pause",e[31]),p.$on("displayChatMessage",e[35]),p.$on("skip",e[34]),p.$on("replay",e[52]),p.$on("avatarClick",e[53])),E=new Cu({}),T=new gu({});let pe={};void 0!==e[7]&&(pe.name=e[7]),void 0!==e[8]&&(pe.server_avatar=e[8]),void 0!==e[10]&&(pe.header_avatar=e[10]),void 0!==e[9]&&(pe.user_avatar=e[9]),O=new xo({props:pe}),ce.push((()=>De(O,"name",ue))),ce.push((()=>De(O,"server_avatar",de))),ce.push((()=>De(O,"header_avatar",he))),ce.push((()=>De(O,"user_avatar",fe))),O.$on("userInput",e[33]),O.$on("play",e[32]),O.$on("skip",e[34]),O.$on("replay",e[58]),O.$on("processUserInput",e[33]);let me=e[6]&&Qu(e),ge=(!e[19]||!e[18]||!e[29])&&Ju(),ye=!e[24]&&e[17]&&ed(e),_e=e[23]&&td();return{c(){t=D("head"),n=D("title"),i=R(e[7]),r=V(),Pe(s.$$.fragment),o=V(),Pe(a.$$.fragment),d=V(),h=D("div"),f=D("div"),p&&Pe(p.$$.fragment),x=V(),Pe(E.$$.fragment),C=V(),Pe(T.$$.fragment),S=V(),k=D("div"),Pe(O.$$.fragment),H=V(),me&&me.c(),z=V(),ge&&ge.c(),B=V(),ye&&ye.c(),W=V(),_e&&_e.c(),Y(n,"class","svelte-App"),Y(t,"class","svelte-App"),Y(f,"class","video svelte-App"),Y(k,"style",F=e[27]?`margin-bottom: ${e[28].distanceToBottom}px;\n margin-right: ${e[28].distanceToRight}px;`:""),Y(k,"class","svelte-App"),G(k,"chat",!e[26]&&!e[27]),G(k,"position-absolute-chat",e[26]||e[27]),Y(h,"class","app-container svelte-App"),Y(h,"style",e[21])},m(e,l){I(e,t,l),A(t,n),A(n,i),I(e,r,l),Re(s,e,l),I(e,o,l),Re(a,e,l),I(e,d,l),I(e,h,l),A(h,f),p&&Re(p,f,null),A(h,x),Re(E,h,null),A(h,C),Re(T,h,null),A(h,S),A(h,k),Re(O,k,null),A(h,H),me&&me.m(h,null),A(h,z),ge&&ge.m(h,null),A(h,B),ye&&ye.m(h,null),A(h,W),_e&&_e.m(h,null),q=!0},p(e,t){(!q||128&t[0])&&j(i,e[7]);const n={};!l&&2&t[0]&&(l=!0,n.logged_username=e[1],ve((()=>l=!1))),!c&&8&t[0]&&(c=!0,n.access_token=e[3],ve((()=>c=!1))),!u&&16&t[0]&&(u=!0,n._user_id=e[4],ve((()=>u=!1))),a.$set(n);const r={};if(5&t[0]&&(r.show_count="opsp"===e[0]&&e[2]),!m&&2048&t[0]&&(m=!0,r.idleVideoSrc=e[11],ve((()=>m=!1))),!g&&1048576&t[0]&&(g=!0,r.sessionCount=e[20],ve((()=>g=!1))),!v&&128&t[0]&&(v=!0,r.name=e[7],ve((()=>v=!1))),!y&&32768&t[0]&&(y=!0,r.skipTalkingVideo=e[15],ve((()=>y=!1))),!_&&65536&t[0]&&(_=!0,r.on_video_synth_error=e[16],ve((()=>_=!1))),!$&&4096&t[0]&&($=!0,r.on_video_received=e[12],ve((()=>$=!1))),!w&&8192&t[0]&&(w=!0,r.on_enter=e[13],ve((()=>w=!1))),!b&&16384&t[0]&&(b=!0,r.on_cache_check=e[14],ve((()=>b=!1))),ae!==(ae=e[22])){if(p){Te();const e=p;Ae(e.$$.fragment,1,0,(()=>{Ve(e,1)})),Se()}ae?(p=new ae(le(e)),ce.push((()=>De(p,"idleVideoSrc",J))),ce.push((()=>De(p,"sessionCount",ee))),ce.push((()=>De(p,"name",te))),ce.push((()=>De(p,"skipTalkingVideo",ne))),ce.push((()=>De(p,"on_video_synth_error",ie))),ce.push((()=>De(p,"on_video_received",re))),ce.push((()=>De(p,"on_enter",se))),ce.push((()=>De(p,"on_cache_check",oe))),p.$on("ready",e[50]),p.$on("talking_end",e[51]),p.$on("pause",e[31]),p.$on("displayChatMessage",e[35]),p.$on("skip",e[34]),p.$on("replay",e[52]),p.$on("avatarClick",e[53]),Pe(p.$$.fragment),ke(p.$$.fragment,1),Re(p,f,null)):p=null}else ae&&p.$set(r);const s={};!L&&128&t[0]&&(L=!0,s.name=e[7],ve((()=>L=!1))),!N&&256&t[0]&&(N=!0,s.server_avatar=e[8],ve((()=>N=!1))),!P&&1024&t[0]&&(P=!0,s.header_avatar=e[10],ve((()=>P=!1))),!U&&512&t[0]&&(U=!0,s.user_avatar=e[9],ve((()=>U=!1))),O.$set(s),(!q||402653184&t[0]&&F!==(F=e[27]?`margin-bottom: ${e[28].distanceToBottom}px;\n margin-right: ${e[28].distanceToRight}px;`:""))&&Y(k,"style",F),201326592&t[0]&&G(k,"chat",!e[26]&&!e[27]),201326592&t[0]&&G(k,"position-absolute-chat",e[26]||e[27]),e[6]?me?(me.p(e,t),64&t[0]&&ke(me,1)):(me=Qu(e),me.c(),ke(me,1),me.m(h,z)):me&&(Te(),Ae(me,1,1,(()=>{me=null})),Se()),e[19]&&e[18]&&e[29]?ge&&(Te(),Ae(ge,1,1,(()=>{ge=null})),Se()):ge?537657344&t[0]&&ke(ge,1):(ge=Ju(),ge.c(),ke(ge,1),ge.m(h,B)),!e[24]&&e[17]?ye?(ye.p(e,t),16908288&t[0]&&ke(ye,1)):(ye=ed(e),ye.c(),ke(ye,1),ye.m(h,W)):ye&&(Te(),Ae(ye,1,1,(()=>{ye=null})),Se()),e[23]?_e?8388608&t[0]&&ke(_e,1):(_e=td(),_e.c(),ke(_e,1),_e.m(h,null)):_e&&(Te(),Ae(_e,1,1,(()=>{_e=null})),Se()),(!q||2097152&t[0])&&Y(h,"style",e[21])},i(e){q||(ke(s.$$.fragment,e),ke(a.$$.fragment,e),p&&ke(p.$$.fragment,e),ke(E.$$.fragment,e),ke(T.$$.fragment,e),ke(O.$$.fragment,e),ke(me),ke(ge),ke(ye),ke(_e),q=!0)},o(e){Ae(s.$$.fragment,e),Ae(a.$$.fragment,e),p&&Ae(p.$$.fragment,e),Ae(E.$$.fragment,e),Ae(T.$$.fragment,e),Ae(O.$$.fragment,e),Ae(me),Ae(ge),Ae(ye),Ae(_e),q=!1},d(n){n&&M(t),n&&M(r),Ve(s,n),n&&M(o),e[38](null),Ve(a,n),n&&M(d),n&&M(h),p&&Ve(p),Ve(E),Ve(T),Ve(O),me&&me.d(),ge&&ge.d(),ye&&ye.d(),_e&&_e.d()}}}const id="en-US";function rd(e,t,n){let i,r,s,o,a,l,c,u,f,p,m,g,v,y,_;h(e,Wi,(e=>n(65,i=e))),h(e,fs,(e=>n(66,r=e))),h(e,li,(e=>n(67,s=e))),h(e,Br,(e=>n(23,o=e))),h(e,Yr,(e=>n(68,a=e))),h(e,Ni,(e=>n(69,l=e))),h(e,Hr,(e=>n(24,c=e))),h(e,Pi,(e=>n(25,u=e))),h(e,Ro,(e=>n(70,f=e))),h(e,Di,(e=>n(71,p=e))),h(e,Gi,(e=>n(72,m=e))),h(e,vs,(e=>n(26,g=e))),h(e,ys,(e=>n(27,v=e))),h(e,la,(e=>n(28,y=e))),h(e,Qr,(e=>n(29,_=e)));let{body_DOMStringMap:$}=t;console.info({version:"1.0.4"}),Xn.set(id),gs.set(!0);let w,x,E,C,T="ttt",S=!1,k=!1,A="Talking Heads";s("peer-status.online");let O,L="",I="",M="",N="";const D=()=>{f===Pu&&Au&&Au.send(JSON.stringify({event:"request_next_video"}))},P=()=>{b(Gi,m=!1,m),b(Pi,u=!1,u),b(Di,p=!0,p),b(Wi,i=!0,i)};let R,V,U,F,Y,H=!1,j=!1,z=!1,B=0;const G=(e,t=!1)=>{e===f&&b(Ro,f="",f),b(Ro,f=e,f),R(t)};let W,q;const Z=()=>{clearInterval(q),W=setTimeout((()=>{n(17,H=!0)}),1e3),async function(){if(!navigator.mediaDevices)throw console.warn("there are no mediadevices"),new Error;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach((e=>e.stop()));const{token:e}=await Ss();return!!e}catch(e){throw"NotAllowedError"===e.name?console.warn("microphone access is blocked, no ASR available"):console.warn("some other error in microphone access"),new Error}}().then((e=>{b(Hr,c=e,c),n(17,H=!1)})).catch((()=>{W&&clearTimeout(W),n(17,H=!1)}))},X=()=>{n(18,j=!0),q=setInterval((()=>{document.hasFocus()&&Z()}),500)};let K,Q="";const J=Hu?$.vm_version:"1";K=wa;ne((async()=>{(e=>{const t=Fr;for(let n=0;n<Object.keys(e).length;n++){const i=Object.keys(e)[n],r=e[i];Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=r)}const n=["Nunito","Helvetica","serif"].join(", ");t.font+=t?.font?", "+n:n,t.time_pressure="1"===e?.time_pressure||"true"===e?.time_pressure,["org_id","head_id","embed"].forEach((e=>{const n=Ur[e]??t[e];n&&(t[e]=n)})),Yr.set(t)})($),await Kr(id);const{org_id:e,head_id:t}=a;b(Ni,l=await Ku(a.theme||""),l),b(Ni,l.font=a.font,l),n(21,Q=Object.entries(l).map((([e,t])=>`--${e}:${t}`)).join(";"));const c=await Zr.getHead(e,t);if(!c)return void b(Br,o="Error: head does not exist",o);n(7,A=c.name),n(0,T=c.operation_mode),b(Yr,a.language=a.language||c.language||id,a),await Kr(a.language);const u=await Zr.getVideoId(e,t);u?(n(11,O=await Zr.getIdleSrc(e,t,u)),n(37,N=await Zr.getAvatarSrc(e,t,u)),Uu(x,E,C,e,t,G,X,(e=>{n(20,B=e)}),(e=>{s(e||"opsp"!==T?"peer-status.online":"peer-status.away")}),(()=>{"2"===J&&b(fs,r=!0,r)}),U,(()=>{Y(),b(Wi,i=!0,i)}))):b(Br,o=s("error-reasons.video-not-found"),o)}));return e.$$set=e=>{"body_DOMStringMap"in e&&n(36,$=e.body_DOMStringMap)},e.$$.update=()=>{2&e.$$.dirty[0]&&n(2,k="admin"===x),2&e.$$.dirty[0]&&"anonymous"!==x&&n(6,S=!1),26&e.$$.dirty[0]&&x&&Vu(x,E,C),5&e.$$.dirty[0]|64&e.$$.dirty[1]&&("opsp"===T&&k?(n(9,I=N),n(10,M=N),n(8,L="")):(n(9,I=""),n(10,M=N),n(8,L=N)))},[T,x,k,E,C,w,S,A,L,I,M,O,R,V,U,F,Y,H,j,z,B,Q,K,o,c,u,g,v,y,_,D,P,e=>{const t=e.detail;b(Pi,u=!0,u),G(t,!0)},e=>{Fu(e),V()},()=>{F(),D(),b(Pi,u=!1,u)},e=>{(e=>{const t=e.detail,n=d(zi);for(let e=n.length-1;e>=0;e--)if(n[e].url===t){n[e].visible=!0;break}zi.set(n)})(e),b(Wi,i=!0,i)},$,N,function(e){ce[e?"unshift":"push"]((()=>{w=e,n(5,w)}))},function(e){x=e,n(1,x)},function(e){E=e,n(3,E)},function(e){C=e,n(4,C)},function(e){O=e,n(11,O)},function(e){B=e,n(20,B)},function(e){A=e,n(7,A)},function(e){F=e,n(15,F)},function(e){Y=e,n(16,Y)},function(e){R=e,n(12,R)},function(e){V=e,n(13,V)},function(e){U=e,n(14,U)},()=>n(19,z=!0),()=>(P(),D()),()=>(R(!0),b(Pi,u=!0,u)),()=>n(6,S=!0),function(e){A=e,n(7,A)},function(e){L=e,n(8,L),n(0,T),n(2,k),n(37,N),n(1,x)},function(e){M=e,n(10,M),n(0,T),n(2,k),n(37,N),n(1,x)},function(e){I=e,n(9,I),n(0,T),n(2,k),n(37,N),n(1,x)},()=>(R(!0),b(Pi,u=!0,u)),function(e){w=e,n(5,w)},()=>n(6,S=!1),function(e){H=e,n(17,H)}]}const sd=document.getElementById("talking-head"),od=new class extends Fe{constructor(e){super(),Ue(this,e,rd,nd,a,{body_DOMStringMap:36},null,[-1,-1,-1])}}({target:sd,props:{body_DOMStringMap:sd.dataset}});var ad="130, 80, 223",ld="0, 122, 80",cd="249, 219, 223",ud="200, 200, 200",dd="240, 240, 240",hd="30, 30, 30",fd={primary:ad,"primary-dimmed":"94, 52, 170",secondary:ld,danger:cd,shadow:ud,body:dd,background:hd,"chat-background":"rgba(var(--primary), 0.6)","download-button-font":"0, 163, 137","download-button-background":"255, 255, 255"},pd=Object.freeze({__proto__:null,primary:ad,secondary:ld,danger:cd,shadow:ud,body:dd,background:hd,default:fd});return od}();