@everymatrix/general-registration 1.16.2 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +5 -1
- package/dist/components/text-input2.js +5 -1
- package/dist/esm/checkbox-group-input_13.entry.js +5 -1
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-2226774b.entry.js → p-287793f2.entry.js} +16 -16
- package/package.json +1 -1
|
@@ -36142,6 +36142,10 @@ const TextInput = class {
|
|
|
36142
36142
|
}
|
|
36143
36143
|
this.isValid = this.setValidity();
|
|
36144
36144
|
}
|
|
36145
|
+
handleClick() {
|
|
36146
|
+
if (this.name.toLowerCase() === 'username')
|
|
36147
|
+
window.postMessage({ type: 'registrationUsernameClicked' }, window.location.href);
|
|
36148
|
+
}
|
|
36145
36149
|
setValidity() {
|
|
36146
36150
|
var _a;
|
|
36147
36151
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
@@ -36188,7 +36192,7 @@ const TextInput = class {
|
|
|
36188
36192
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
36189
36193
|
}
|
|
36190
36194
|
return index.h("div", { class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'text__wrapper--flex' }, index.h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'text__wrapper--relative' }, this.tooltip &&
|
|
36191
|
-
index.h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
36195
|
+
index.h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur, onClick: this.handleClick }), index.h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
36192
36196
|
}
|
|
36193
36197
|
static get watchers() { return {
|
|
36194
36198
|
"isValid": ["validityChanged"],
|
|
@@ -111,6 +111,10 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
111
111
|
}
|
|
112
112
|
this.isValid = this.setValidity();
|
|
113
113
|
}
|
|
114
|
+
handleClick() {
|
|
115
|
+
if (this.name.toLowerCase() === 'username')
|
|
116
|
+
window.postMessage({ type: 'registrationUsernameClicked' }, window.location.href);
|
|
117
|
+
}
|
|
114
118
|
setValidity() {
|
|
115
119
|
var _a;
|
|
116
120
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
@@ -157,7 +161,7 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
157
161
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
158
162
|
}
|
|
159
163
|
return h("div", { class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { class: 'text__wrapper--flex' }, h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'text__wrapper--relative' }, this.tooltip &&
|
|
160
|
-
h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
164
|
+
h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur, onClick: this.handleClick }), h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
161
165
|
}
|
|
162
166
|
static get watchers() { return {
|
|
163
167
|
"isValid": ["validityChanged"],
|
|
@@ -36138,6 +36138,10 @@ const TextInput = class {
|
|
|
36138
36138
|
}
|
|
36139
36139
|
this.isValid = this.setValidity();
|
|
36140
36140
|
}
|
|
36141
|
+
handleClick() {
|
|
36142
|
+
if (this.name.toLowerCase() === 'username')
|
|
36143
|
+
window.postMessage({ type: 'registrationUsernameClicked' }, window.location.href);
|
|
36144
|
+
}
|
|
36141
36145
|
setValidity() {
|
|
36142
36146
|
var _a;
|
|
36143
36147
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
@@ -36184,7 +36188,7 @@ const TextInput = class {
|
|
|
36184
36188
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
36185
36189
|
}
|
|
36186
36190
|
return h$2("div", { class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h$2("div", { class: 'text__wrapper--flex' }, h$2("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { class: 'text__wrapper--relative' }, this.tooltip &&
|
|
36187
|
-
h$2("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h$2("small", { class: 'text__error-message' }, this.errorMessage));
|
|
36191
|
+
h$2("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur, onClick: this.handleClick }), h$2("small", { class: 'text__error-message' }, this.errorMessage));
|
|
36188
36192
|
}
|
|
36189
36193
|
static get watchers() { return {
|
|
36190
36194
|
"isValid": ["validityChanged"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as l,b as e}from"./p-4ff02444.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),l(i)})().then((l=>e([["p-
|
|
1
|
+
import{p as l,b as e}from"./p-4ff02444.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),l(i)})().then((l=>e([["p-287793f2",[[1,"general-registration",{endpoint:[513],language:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],dateFormat:[513,"date-format"],buttonInsideForm:[516,"button-inside-form"],errorMessage:[32],isFormValid:[32],isLoading:[32],isLoadingPOST:[32],registrationStep:[32],forms:[32],limitStylingAppends:[32],autofilled:[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{type:[513],name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],validation:[16],options:[520],language:[513],autofilled:[516],tooltip:[513],defaultValue:[520,"default-value"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[520,"client-styling"],dateFormat:[513,"date-format"],translationUrl:[513,"translation-url"]}],[1,"toggle-checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],options:[16],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],showFields:[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],selectedValues:[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],dateFormat:[513,"date-format"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],passwordComplexity:[32],showPopup:[32],value:[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{name:[513],displayName:[513,"display-name"],optionsGroup:[16],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],showLabels:[516,"show-labels"],action:[513],validation:[16],defaultValue:[520,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],checkValidity:[516,"check-validity"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]],l)));
|
|
@@ -15,13 +15,13 @@ const l=window,c=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"
|
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/;var v;const g=window,b=g.trustedTypes,y=b?b.emptyScript:"",
|
|
18
|
+
*/;var v;const g=window,b=g.trustedTypes,y=b?b.emptyScript:"",w=g.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},x=(t,e)=>e!==t&&(e==e||t==t),k={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:x},C="finalized";class A extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),t}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||k}static finalize(){if(this.hasOwnProperty(C))return!1;this[C]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=l.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=k){var s;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,r=s._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=s.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||x)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var E;A[C]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==
|
|
24
|
+
var E;A[C]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:A}),(null!==(v=g.reactiveElementVersions)&&void 0!==v?v:g.reactiveElementVersions=[]).push("1.6.2");const S=window,T=S.trustedTypes,D=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,I=`lit$${(Math.random()+"").slice(9)}$`,z="?"+I,M=`<${z}>`,P=document,B=()=>P.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,F=Array.isArray,N="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,V=/>/g,$=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,q=/"/g,H=/^(?:script|style|textarea|title)$/i,W=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Y=new WeakMap,U=P.createTreeWalker(P,129,null,!1),Q=(t,e)=>{const i=t.length-1,s=[];let r,n=2===e?"<svg>":"",o=L;for(let e=0;e<i;e++){const i=t[e];let a,h,l=-1,c=0;for(;c<i.length&&(o.lastIndex=c,h=o.exec(i),null!==h);)c=o.lastIndex,o===L?"!--"===h[1]?o=j:void 0!==h[1]?o=V:void 0!==h[2]?(H.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=$):void 0!==h[3]&&(o=$):o===$?">"===h[0]?(o=null!=r?r:L,l=-1):void 0===h[1]?l=-2:(l=o.lastIndex-h[2].length,a=h[1],o=void 0===h[3]?$:'"'===h[3]?q:R):o===q||o===R?o=$:o===j||o===V?o=L:(o=$,r=void 0);const u=o===$&&t[e+1].startsWith("/>")?" ":"";n+=o===L?i+M:l>=0?(s.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+I+u):i+I+(-2===l?(s.push(void 0),e):u)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==D?D.createHTML(a):a,s]};class K{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,n=0;const o=t.length-1,a=this.parts,[h,l]=Q(t,e);if(this.el=K.createElement(h,i),U.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=U.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(I)){const i=l[n++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(I),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?et:"?"===e[1]?st:"@"===e[1]?rt:tt})}else a.push({type:6,index:r})}for(const e of t)s.removeAttribute(e)}if(H.test(s.tagName)){const t=s.textContent.split(I),e=t.length-1;if(e>0){s.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],B()),U.nextNode(),a.push({type:2,index:++r});s.append(t[e],B())}}}else if(8===s.nodeType)if(s.data===z)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(I,t+1));)a.push({type:7,index:r}),t+=I.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function X(t,e,i=t,s){var r,n,o,a;if(e===W)return e;let h=void 0!==s?null===(r=i._$Co)||void 0===r?void 0:r[s]:i._$Cl;const l=O(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==l&&(null===(n=null==h?void 0:h._$AO)||void 0===n||n.call(h,!1),void 0===l?h=void 0:(h=new l(t),h._$AT(t,i,s)),void 0!==s?(null!==(o=(a=i)._$Co)&&void 0!==o?o:a._$Co=[])[s]=h:i._$Cl=h),void 0!==h&&(e=X(t,h._$AS(t,e.values),h,s)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);U.currentNode=r;let n=U.nextNode(),o=0,a=0,h=s[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new Z(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new nt(n,this,t)),this._$AV.push(e),h=s[++a]}o!==(null==h?void 0:h.index)&&(n=U.nextNode(),o++)}return U.currentNode=P,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,s){var r;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),O(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==W&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>F(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==G&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=K.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new J(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new K(t)),e}T(t){F(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new Z(this.k(B()),this.k(B()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class tt{constructor(t,e,i,s,r){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const r=this.strings;let n=!1;if(void 0===r)t=X(this,t,e,0),n=!O(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const s=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=X(this,s[i+o],e,o),a===W&&(a=this._$AH[o]),n||(n=!O(a)||a!==this._$AH[o]),a===G?t=G:t!==G&&(t+=(null!=a?a:"")+r[o+1]),this._$AH[o]=a}n&&!s&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const it=T?T.emptyScript:"";class st extends tt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,it):this.element.removeAttribute(this.name)}}class rt extends tt{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=X(this,t,e,0))&&void 0!==i?i:G)===W)return;const s=this._$AH,r=t===G&&s!==G||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==G&&(s===G||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const ot=S.litHtmlPolyfillSupport;
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
@@ -43,7 +43,7 @@ const ut=t=>class extends t{static get properties(){return{theme:{type:String,re
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
45
45
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,
|
|
46
|
+
*/,wt=m`
|
|
47
47
|
:host {
|
|
48
48
|
/* Base (background) */
|
|
49
49
|
--lumo-base-color: #fff;
|
|
@@ -115,7 +115,7 @@ const ut=t=>class extends t{static get properties(){return{theme:{type:String,re
|
|
|
115
115
|
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
116
116
|
--lumo-success-contrast-color: #fff;
|
|
117
117
|
}
|
|
118
|
-
`,
|
|
118
|
+
`,_t=document.createElement("template");_t.innerHTML=`<style>${wt.toString().replace(":host","html")}</style>`,document.head.appendChild(_t.content);const xt=m`
|
|
119
119
|
[theme~='dark'] {
|
|
120
120
|
/* Base (background) */
|
|
121
121
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -642,7 +642,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
642
642
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
643
643
|
Code distributed by Google as part of the polymer project is also
|
|
644
644
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
645
|
-
*/function me(t){return t.indexOf(".")>=0}function fe(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ve(t,e){return 0===t.indexOf(e+".")}function ge(t,e){return 0===e.indexOf(t+".")}function be(t,e,i){return e+i.slice(t.length)}function ye(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function
|
|
645
|
+
*/function me(t){return t.indexOf(".")>=0}function fe(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ve(t,e){return 0===t.indexOf(e+".")}function ge(t,e){return 0===e.indexOf(t+".")}function be(t,e,i){return e+i.slice(t.length)}function ye(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function we(t){return Array.isArray(t)?ye(t).split("."):t.toString().split(".")}function _e(t,e,i){let s=t,r=we(e);for(let t=0;t<r.length;t++){if(!s)return;s=s[r[t]]}return i&&(i.path=r.join(".")),s}function xe(t,e,i){let s=t,r=we(e),n=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(s=s[r[t]],!s)return;s[n]=i}else s[e]=i;return r.join(".")}
|
|
646
646
|
/**
|
|
647
647
|
@license
|
|
648
648
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -671,7 +671,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
671
671
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
672
672
|
* Google as part of the polymer project is also subject to an additional IP
|
|
673
673
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
674
|
-
*/let Je=0;const Ze=[],ti={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ei=/[A-Z]/;function ii(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function si(t,e,i,s,r,n){if(e){let o=!1;const a=Je++;for(let h in i){let l=e[r?fe(h):h];if(l)for(let e,c=0,u=l.length;c<u&&(e=l[c]);c++)e.info&&e.info.lastRun===a||r&&!ni(h,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,r,n),o=!0)}return o}return!1}function ri(t,e,i,s,r,n,o,a){let h=!1,l=e[o?fe(s):s];if(l)for(let e,c=0,u=l.length;c<u&&(e=l[c]);c++)e.info&&e.info.lastRun===i||o&&!ni(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,n,e.info,o,a),h=!0);return h}function ni(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!ve(i,t))||!(!e.wildcard||!ge(i,t))}return!0}function oi(t,e,i,s,r){let n="string"==typeof r.method?t[r.method]:r.method,o=r.property;n?n.call(t,t.__data[o],s[o]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function ai(t,e,i){let s=fe(e);return s!==e&&(hi(t,Se(s)+"-changed",i[e],e),!0)}function hi(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),pe(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function li(t,e,i,s,r,n){let o=(n?fe(e):e)!=e?e:null,a=o?we(t,o):t.__data[e];o&&void 0===a&&(a=i[e]),hi(t,r.eventName,a,o)}function ci(t,e,i,s,r){let n=t.__data[e];Rt&&(n=Rt(n,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,n)}const ui=(t,e,i)=>{let s=0,r=e.length-1,n=-1;for(;s<=r;){const o=s+r>>1,a=i.get(e[o].methodInfo)-i.get(t.methodInfo);if(a<0)s=o+1;else{if(!(a>0)){n=o;break}r=o-1}}n<0&&(n=r+1),e.splice(n,0,t)},di=(t,e,i,s,r)=>{const n=e[r?fe(t):t];if(n)for(let e=0;e<n.length;e++){const o=n[e];o.info.lastRun===Je||r&&!ni(t,o.trigger)||(o.info.lastRun=Je,ui(o.info,i,s))}};function pi(t,e,i,s,r){let n=_i(t,e,i,0,r);if(n===Ze)return!1;let o=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,n,!0):(t[o]=n,!1)}function mi(t,e,i,s,r,n,o){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:n,literal:o,isCompound:1!==n.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Se(r)+"-changed",a.listenerNegate=e}let h=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,fi(t,e,a,s,h)}}function fi(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let n=s.dependencies,o={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<n.length;i++){let s=n[i];"string"==typeof s&&(s=Ai(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:vi,info:o,trigger:s})}}}function vi(t,e,i,s,r,n,o){let a=o[r.index],h=r.binding,l=r.part;if(n&&l.source&&e.length>l.source.length&&"property"==h.kind&&!h.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[h.target]){let s=i[e];e=be(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let o=r.evaluator._evaluateBinding(t,l,e,i,s,n);o!==Ze&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),Rt&&(r=Rt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[ti.READ_ONLY]&&e[ti.READ_ONLY][s]||e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,h,l,o)}}function gi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let n=e.target;i[n]=r,e.literal&&"property"==e.kind&&("className"===n&&(t=pe(t)),t[n]=e.literal)}}function bi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let n,o=t.detail,a=o&&o.path;a?(s=be(i,s,a),n=o&&o.value):n=t.currentTarget[i],n=r?!n:n,e[ti.READ_ONLY]&&e[ti.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,n,!0,Boolean(a))||o&&o.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function yi(t,e,i,s,r,n){let o={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:n=e.static||n&&("object"!=typeof n||n[e.methodName])};for(let r,n=0;n<e.args.length&&(r=e.args[n]);n++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:o,trigger:r});return n&&t._addPropertyEffect(e.methodName,i,{fn:s,info:o}),o}function _i(t,e,i,s,r){let n=t._methodHost||t,o=n[r.methodName];if(o){let s=t._marshalArgs(r.args,e,i);return s===Ze?Ze:o.apply(n,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const wi=[],xi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function ki(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ci(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:wi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ai(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ai(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=fe(e),i.structured=me(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ei(t,e,i){let s=we(t,i);return void 0===s&&(s=e[i]),s}function Si(t,e,i,s){const r={indexSplices:s};Ut&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Ut&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ti(t,e,i,s,r,n){Si(t,e,i,[{index:s,addedCount:r,removed:n,object:e,type:"splice"}])}const Di=ee((t=>{const e=Xe($e(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ti}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Ii.length){let t=Ii[Ii.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ti.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ti.READ_ONLY);let s=ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ii(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ti.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ti.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ti.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ti.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||fe(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=we(this,t);if(!(t=xe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let n in s){let o=s[n];ge(n,e)?(r=be(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0)):ge(o,e)&&(r=be(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=pe(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&me(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[ti.NOTIFY]&&this[ti.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ti.READ_ONLY]&&this[ti.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[ti.COMPUTE];if(r)if(Qt){Je++;const n=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ti.COMPUTE];let s,{counts:r,ready:n,total:o}=function(t){const e=t.__computeInfo,i={},s=t[ti.COMPUTE],r=[];let n=0;for(let t in e){const s=e[t];n+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:n}}(t);for(;s=n.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--r[e]&&n.push(e)}))}0!==o&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)di(t,r,o,n,s);let a;for(;a=o.shift();)pi(t,"",e,0,a)&&di(a.methodInfo,r,o,n,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let n=e;for(;si(t,r,n,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),n=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),si(this,this[ti.REFLECT],e,i,r),si(this,this[ti.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let n,o,a=t[ti.NOTIFY],h=Je++;for(let o in e)e[o]&&(a&&ri(t,a,h,o,i,s,r)||r&&ai(t,o,i))&&(n=!0);n&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ti.PROPAGATE]&&si(this,this[ti.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{si(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=ye(t),e=ye(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ye(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Si(this,we(this,t,i),i.path,e)}get(t,e){return we(e||this,t)}set(t,e,i){i?xe(i,t,e):this[ti.READ_ONLY]&&this[ti.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=we(this,t,i),r=s.length,n=s.push(...e);return e.length&&Ti(this,s,i.path,r,e.length,[]),n}pop(t){let e={path:""},i=we(this,t,e),s=Boolean(i.length),r=i.pop();return s&&Ti(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,n={path:""},o=we(this,t,n);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?o.splice(e):o.splice(e,i,...s),(s.length||r.length)&&Ti(this,o,n.path,e,s.length,r),r}shift(t){let e={path:""},i=we(this,t,e),s=Boolean(i.length),r=i.shift();return s&&Ti(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=we(this,t,i),r=s.unshift(...e);return e.length&&Ti(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=we(this,t,s),i=s.path}else i=Array.isArray(t)?ye(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ti.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ti.OBSERVE,{fn:oi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,ti.OBSERVE,{fn:oi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ci(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");yi(this,i,ti.OBSERVE,_i,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ti.NOTIFY,{fn:li,info:{eventName:Se(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ti.REFLECT,{fn:ci,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Ci(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=yi(this,s,ti.COMPUTE,pi,t,i);ii(this,"__computeInfo")[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let n=0,o=t.length;n<o;n++){let{name:o,structured:a,wildcard:h,value:l,literal:c}=t[n];if(!c)if(h){const t=ge(o,e),r=Ei(s,i,t?e:o);l={path:t?e:o,value:r,base:t?we(s,o):r}}else l=a?Ei(s,i,o):s[o];if(Ut&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Ze;r[n]=l}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ii.push(this);let i=super._stampTemplate(t,e);if(Ii.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],n=s[e].bindings;if(n)for(let e=0;e<n.length;e++){let i=n[e];gi(r,i),bi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let n=e.childNodes;for(let t=0;t<n.length;t++){let e=n[t];pe(pe(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ki(e)||" ",mi(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,n){let o=this._parseBindings(n,i);if(o){let e=r,n="property";ei.test(r)?n="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),n="attribute");let a=ki(o);return a&&"attribute"==n&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==n&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===n&&(r=Ee(r)),mi(this,i,s,n,r,o,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,n)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const n=t.parentNode,o=s.templateInfo,a="dom-if"===n.localName;Kt&&(a||"dom-repeat"===n.localName)&&(n.removeChild(t),(s=s.parentInfo).templateInfo=o,s.noted=!0,r=!1);let h=o.hostProps;if(Xt&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),Kt||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)mi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=xi.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let n=i[1][0],o=Boolean(i[2]),a=i[3].trim(),h=!1,l="",c=-1;"{"==n&&(c=a.indexOf("::"))>0&&(l=a.substring(c+2),a=a.substring(0,c),h=!0);let u=Ci(a),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let s=e.dynamicFns;(s&&s[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);s.push({source:a,mode:n,negate:o,customEvent:h,signature:u,dependencies:d,event:l}),r=xi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,n){let o;return o=e.signature?_i(t,i,s,0,e.signature):i!=e.source?we(t,e.source):n&&me(i)?we(t,i):t.__data[i],e.negate&&(o=!o),o}}})),Ii=[],zi=ee((t=>{const e=Ne(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
674
|
+
*/let Je=0;const Ze=[],ti={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ei=/[A-Z]/;function ii(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function si(t,e,i,s,r,n){if(e){let o=!1;const a=Je++;for(let h in i){let l=e[r?fe(h):h];if(l)for(let e,c=0,u=l.length;c<u&&(e=l[c]);c++)e.info&&e.info.lastRun===a||r&&!ni(h,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,r,n),o=!0)}return o}return!1}function ri(t,e,i,s,r,n,o,a){let h=!1,l=e[o?fe(s):s];if(l)for(let e,c=0,u=l.length;c<u&&(e=l[c]);c++)e.info&&e.info.lastRun===i||o&&!ni(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,n,e.info,o,a),h=!0);return h}function ni(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!ve(i,t))||!(!e.wildcard||!ge(i,t))}return!0}function oi(t,e,i,s,r){let n="string"==typeof r.method?t[r.method]:r.method,o=r.property;n?n.call(t,t.__data[o],s[o]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function ai(t,e,i){let s=fe(e);return s!==e&&(hi(t,Se(s)+"-changed",i[e],e),!0)}function hi(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),pe(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function li(t,e,i,s,r,n){let o=(n?fe(e):e)!=e?e:null,a=o?_e(t,o):t.__data[e];o&&void 0===a&&(a=i[e]),hi(t,r.eventName,a,o)}function ci(t,e,i,s,r){let n=t.__data[e];Rt&&(n=Rt(n,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,n)}const ui=(t,e,i)=>{let s=0,r=e.length-1,n=-1;for(;s<=r;){const o=s+r>>1,a=i.get(e[o].methodInfo)-i.get(t.methodInfo);if(a<0)s=o+1;else{if(!(a>0)){n=o;break}r=o-1}}n<0&&(n=r+1),e.splice(n,0,t)},di=(t,e,i,s,r)=>{const n=e[r?fe(t):t];if(n)for(let e=0;e<n.length;e++){const o=n[e];o.info.lastRun===Je||r&&!ni(t,o.trigger)||(o.info.lastRun=Je,ui(o.info,i,s))}};function pi(t,e,i,s,r){let n=wi(t,e,i,0,r);if(n===Ze)return!1;let o=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,n,!0):(t[o]=n,!1)}function mi(t,e,i,s,r,n,o){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:n,literal:o,isCompound:1!==n.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Se(r)+"-changed",a.listenerNegate=e}let h=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,fi(t,e,a,s,h)}}function fi(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let n=s.dependencies,o={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<n.length;i++){let s=n[i];"string"==typeof s&&(s=Ai(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:vi,info:o,trigger:s})}}}function vi(t,e,i,s,r,n,o){let a=o[r.index],h=r.binding,l=r.part;if(n&&l.source&&e.length>l.source.length&&"property"==h.kind&&!h.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[h.target]){let s=i[e];e=be(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let o=r.evaluator._evaluateBinding(t,l,e,i,s,n);o!==Ze&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),Rt&&(r=Rt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[ti.READ_ONLY]&&e[ti.READ_ONLY][s]||e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,h,l,o)}}function gi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let n=e.target;i[n]=r,e.literal&&"property"==e.kind&&("className"===n&&(t=pe(t)),t[n]=e.literal)}}function bi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let n,o=t.detail,a=o&&o.path;a?(s=be(i,s,a),n=o&&o.value):n=t.currentTarget[i],n=r?!n:n,e[ti.READ_ONLY]&&e[ti.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,n,!0,Boolean(a))||o&&o.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function yi(t,e,i,s,r,n){let o={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:n=e.static||n&&("object"!=typeof n||n[e.methodName])};for(let r,n=0;n<e.args.length&&(r=e.args[n]);n++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:o,trigger:r});return n&&t._addPropertyEffect(e.methodName,i,{fn:s,info:o}),o}function wi(t,e,i,s,r){let n=t._methodHost||t,o=n[r.methodName];if(o){let s=t._marshalArgs(r.args,e,i);return s===Ze?Ze:o.apply(n,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const _i=[],xi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function ki(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ci(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:_i};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ai(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ai(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=fe(e),i.structured=me(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ei(t,e,i){let s=_e(t,i);return void 0===s&&(s=e[i]),s}function Si(t,e,i,s){const r={indexSplices:s};Ut&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Ut&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ti(t,e,i,s,r,n){Si(t,e,i,[{index:s,addedCount:r,removed:n,object:e,type:"splice"}])}const Di=ee((t=>{const e=Xe($e(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ti}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Ii.length){let t=Ii[Ii.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ti.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ti.READ_ONLY);let s=ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ii(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ti.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ti.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ti.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ti.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||fe(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=_e(this,t);if(!(t=xe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let n in s){let o=s[n];ge(n,e)?(r=be(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0)):ge(o,e)&&(r=be(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=pe(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&me(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[ti.NOTIFY]&&this[ti.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ti.READ_ONLY]&&this[ti.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[ti.COMPUTE];if(r)if(Qt){Je++;const n=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ti.COMPUTE];let s,{counts:r,ready:n,total:o}=function(t){const e=t.__computeInfo,i={},s=t[ti.COMPUTE],r=[];let n=0;for(let t in e){const s=e[t];n+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:n}}(t);for(;s=n.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--r[e]&&n.push(e)}))}0!==o&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)di(t,r,o,n,s);let a;for(;a=o.shift();)pi(t,"",e,0,a)&&di(a.methodInfo,r,o,n,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let n=e;for(;si(t,r,n,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),n=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),si(this,this[ti.REFLECT],e,i,r),si(this,this[ti.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let n,o,a=t[ti.NOTIFY],h=Je++;for(let o in e)e[o]&&(a&&ri(t,a,h,o,i,s,r)||r&&ai(t,o,i))&&(n=!0);n&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ti.PROPAGATE]&&si(this,this[ti.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{si(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=ye(t),e=ye(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ye(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Si(this,_e(this,t,i),i.path,e)}get(t,e){return _e(e||this,t)}set(t,e,i){i?xe(i,t,e):this[ti.READ_ONLY]&&this[ti.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=_e(this,t,i),r=s.length,n=s.push(...e);return e.length&&Ti(this,s,i.path,r,e.length,[]),n}pop(t){let e={path:""},i=_e(this,t,e),s=Boolean(i.length),r=i.pop();return s&&Ti(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,n={path:""},o=_e(this,t,n);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?o.splice(e):o.splice(e,i,...s),(s.length||r.length)&&Ti(this,o,n.path,e,s.length,r),r}shift(t){let e={path:""},i=_e(this,t,e),s=Boolean(i.length),r=i.shift();return s&&Ti(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=_e(this,t,i),r=s.unshift(...e);return e.length&&Ti(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=_e(this,t,s),i=s.path}else i=Array.isArray(t)?ye(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ti.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ti.OBSERVE,{fn:oi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,ti.OBSERVE,{fn:oi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ci(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");yi(this,i,ti.OBSERVE,wi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ti.NOTIFY,{fn:li,info:{eventName:Se(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ti.REFLECT,{fn:ci,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Ci(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=yi(this,s,ti.COMPUTE,pi,t,i);ii(this,"__computeInfo")[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let n=0,o=t.length;n<o;n++){let{name:o,structured:a,wildcard:h,value:l,literal:c}=t[n];if(!c)if(h){const t=ge(o,e),r=Ei(s,i,t?e:o);l={path:t?e:o,value:r,base:t?_e(s,o):r}}else l=a?Ei(s,i,o):s[o];if(Ut&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Ze;r[n]=l}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ii.push(this);let i=super._stampTemplate(t,e);if(Ii.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],n=s[e].bindings;if(n)for(let e=0;e<n.length;e++){let i=n[e];gi(r,i),bi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let n=e.childNodes;for(let t=0;t<n.length;t++){let e=n[t];pe(pe(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ki(e)||" ",mi(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,n){let o=this._parseBindings(n,i);if(o){let e=r,n="property";ei.test(r)?n="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),n="attribute");let a=ki(o);return a&&"attribute"==n&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==n&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===n&&(r=Ee(r)),mi(this,i,s,n,r,o,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,n)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const n=t.parentNode,o=s.templateInfo,a="dom-if"===n.localName;Kt&&(a||"dom-repeat"===n.localName)&&(n.removeChild(t),(s=s.parentInfo).templateInfo=o,s.noted=!0,r=!1);let h=o.hostProps;if(Xt&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),Kt||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)mi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=xi.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let n=i[1][0],o=Boolean(i[2]),a=i[3].trim(),h=!1,l="",c=-1;"{"==n&&(c=a.indexOf("::"))>0&&(l=a.substring(c+2),a=a.substring(0,c),h=!0);let u=Ci(a),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let s=e.dynamicFns;(s&&s[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);s.push({source:a,mode:n,negate:o,customEvent:h,signature:u,dependencies:d,event:l}),r=xi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,n){let o;return o=e.signature?wi(t,i,s,0,e.signature):i!=e.source?_e(t,e.source):n&&me(i)?_e(t,i):t.__data[i],e.negate&&(o=!o),o}}})),Ii=[],zi=ee((t=>{const e=Ne(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
675
675
|
/**
|
|
676
676
|
@license
|
|
677
677
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -691,12 +691,12 @@ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{t
|
|
|
691
691
|
* Code distributed by Google as part of the polymer project is also
|
|
692
692
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
693
693
|
*/
|
|
694
|
-
let $i=0,Ri=0;const qi=[];let Hi=0,Wi=!1;const Gi=document.createTextNode("");new window.MutationObserver((function(){Wi=!1;const t=qi.length;for(let e=0;e<t;e++){const t=qi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}qi.splice(0,t),Ri+=t})).observe(Gi,{characterData:!0});const Yi={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ui={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Qi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Ki={run(t){Wi||(Wi=!0,Gi.textContent=Hi,Hi+=1),qi.push(t);const e=$i;return $i+=1,e},cancel(t){const e=t-Ri;if(e>=0){if(!qi[e])throw new Error(`invalid async handle: ${t}`);qi[e]=null}}},Xi="string"==typeof document.head.style.touchAction,Ji="__polymerGesturesHandled",Zi="__polymerGesturesTouchAction",ts=["mousedown","mousemove","mouseup","click"],es=[0,1,4,2],is=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function ss(t){return ts.indexOf(t)>-1}let rs=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){rs=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const ns=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),os={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function as(t){const e=t.type;if(!ss(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!is&&(e=es[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const hs={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function ls(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function cs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const us=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],ds={},ps=[];function ms(t){const e=us(t);return e.length>0?e[0]:t.target}function fs(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Ji]&&(t[Ji]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(hs.touch.id=i.identifier),hs.touch.id!==i.identifier)return;Xi||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)hs.touch.x=e.clientX,hs.touch.y=e.clientY,hs.touch.scrollDecided=!1;else if("touchmove"===i){if(hs.touch.scrollDecided)return;hs.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=us(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Zi]){e=t[Zi];break}return e}(t);let s=!1;const r=Math.abs(hs.touch.x-e.clientX),n=Math.abs(hs.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=n>r:"pan-y"===i&&(s=r>n)),s?t.preventDefault():
|
|
694
|
+
let $i=0,Ri=0;const qi=[];let Hi=0,Wi=!1;const Gi=document.createTextNode("");new window.MutationObserver((function(){Wi=!1;const t=qi.length;for(let e=0;e<t;e++){const t=qi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}qi.splice(0,t),Ri+=t})).observe(Gi,{characterData:!0});const Yi={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ui={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Qi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Ki={run(t){Wi||(Wi=!0,Gi.textContent=Hi,Hi+=1),qi.push(t);const e=$i;return $i+=1,e},cancel(t){const e=t-Ri;if(e>=0){if(!qi[e])throw new Error(`invalid async handle: ${t}`);qi[e]=null}}},Xi="string"==typeof document.head.style.touchAction,Ji="__polymerGesturesHandled",Zi="__polymerGesturesTouchAction",ts=["mousedown","mousemove","mouseup","click"],es=[0,1,4,2],is=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function ss(t){return ts.indexOf(t)>-1}let rs=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){rs=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const ns=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),os={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function as(t){const e=t.type;if(!ss(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!is&&(e=es[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const hs={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function ls(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function cs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const us=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],ds={},ps=[];function ms(t){const e=us(t);return e.length>0?e[0]:t.target}function fs(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Ji]&&(t[Ji]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(hs.touch.id=i.identifier),hs.touch.id!==i.identifier)return;Xi||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)hs.touch.x=e.clientX,hs.touch.y=e.clientY,hs.touch.scrollDecided=!1;else if("touchmove"===i){if(hs.touch.scrollDecided)return;hs.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=us(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Zi]){e=t[Zi];break}return e}(t);let s=!1;const r=Math.abs(hs.touch.x-e.clientX),n=Math.abs(hs.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=n>r:"pan-y"===i&&(s=r>n)),s?t.preventDefault():ws("track")}}(t)}const r=t[Ji];if(!r.skip){for(let e,i=0;i<ps.length;i++)e=ps[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,n=0;n<ps.length;n++)i=ps[n],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function vs(t,e,i){return!!ds[e]&&(function(t,e,i){const s=ds[e],r=s.deps,n=s.name;let o=t.__polymerGestures;o||(t.__polymerGestures=o={});for(let e,i,s=0;s<r.length;s++)e=r[s],ns&&ss(e)&&"click"!==e||(i=o[e],i||(o[e]=i={_count:0}),0===i._count&&t.addEventListener(e,fs,void ss(e)),i[n]=(i[n]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&bs(t,s.touchAction)}(t,e,i),!0)}function gs(t){ps.push(t);for(let e=0;e<t.emits.length;e++)ds[t.emits[e]]=t}function bs(t,e){Xi&&t instanceof HTMLElement&&Ki.run((()=>{t.style.touchAction=e})),t[Zi]=e}function ys(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,t.dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function ws(t){const e=function(t){for(let e,i=0;i<ps.length;i++){e=ps[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function _s(t,e,i,s){e&&ys(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>ws(t)})}function xs(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function ks(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let n,o=0;s&&(n=r.x-s.x,o=r.y-s.y),ys(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:n,ddy:o,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function Cs(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),n=ms(i||e);!n||os[n.localName]&&n.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=ms(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||ys(n,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
695
695
|
/**
|
|
696
696
|
* @license
|
|
697
697
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
698
698
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
699
|
-
*/gs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){cs(this.info)},mousedown(t){if(!as(t))return;const e=ms(t),i=this;ls(this.info,(t=>{as(t)||(
|
|
699
|
+
*/gs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){cs(this.info)},mousedown(t){if(!as(t))return;const e=ms(t),i=this;ls(this.info,(t=>{as(t)||(_s("up",e,t),cs(i.info))}),(t=>{as(t)&&_s("up",e,t),cs(i.info)})),_s("down",e,t)},touchstart(t){_s("down",ms(t),t.changedTouches[0],t)},touchend(t){_s("up",ms(t),t.changedTouches[0],t)}}),gs({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,cs(this.info)},mousedown(t){if(!as(t))return;const e=ms(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;xs(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&ws("tap"),i.info.addMove({x:s,y:r}),as(t)||(i.info.state="end",cs(i.info)),e&&ks(i.info,e,t),i.info.started=!0)};ls(this.info,s,(t=>{i.info.started&&s(t),cs(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=ms(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;xs(this.info,s,r)&&("start"===this.info.state&&ws("tap"),this.info.addMove({x:s,y:r}),ks(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=ms(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),ks(this.info,e,i))}}),gs({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){as(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){as(t)&&Cs(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Cs(this.info,t.changedTouches[0],t)}});const As=ee((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Es=t=>class extends(Vi(As(t))){get _activeKeys(){return[" "]}ready(){super.ready(),vs(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),vs(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
700
700
|
/**
|
|
701
701
|
* @license
|
|
702
702
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -1091,13 +1091,13 @@ class yr extends Js{constructor(t){super(t,"error-message",(()=>document.createE
|
|
|
1091
1091
|
* @license
|
|
1092
1092
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1093
1093
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1094
|
-
*/function
|
|
1094
|
+
*/function wr(t){return t?new Set(t.split(" ")):new Set}function _r(t){return[...t].join(" ")}
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @license
|
|
1097
1097
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1098
1098
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1099
1099
|
*/
|
|
1100
|
-
class xr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const s=
|
|
1100
|
+
class xr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const s=wr(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,_r(s)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const s=wr(t.getAttribute(e));s.add(i),t.setAttribute(e,_r(s))}(this.__target,t,e))}}
|
|
1101
1101
|
/**
|
|
1102
1102
|
* @license
|
|
1103
1103
|
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
@@ -2559,7 +2559,7 @@ const fn=ee((t=>{const e=Pi(t);let i=(t=>{for(;t;){const e=Object.getOwnProperty
|
|
|
2559
2559
|
* @license
|
|
2560
2560
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2561
2561
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2562
|
-
*/,
|
|
2562
|
+
*/,wn=m`
|
|
2563
2563
|
:host([dir='rtl']) [part='input-field'] {
|
|
2564
2564
|
direction: ltr;
|
|
2565
2565
|
}
|
|
@@ -2568,7 +2568,7 @@ const fn=ee((t=>{const e=Pi(t);let i=(t=>{for(;t;){const e=Object.getOwnProperty
|
|
|
2568
2568
|
direction: rtl;
|
|
2569
2569
|
text-align: left;
|
|
2570
2570
|
}
|
|
2571
|
-
`;let
|
|
2571
|
+
`;let _n;
|
|
2572
2572
|
/**
|
|
2573
2573
|
* @license
|
|
2574
2574
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
@@ -2583,7 +2583,7 @@ pt("vaadin-date-picker-overlay",m`
|
|
|
2583
2583
|
[part~='content'] {
|
|
2584
2584
|
flex: auto;
|
|
2585
2585
|
}
|
|
2586
|
-
`,{moduleId:"vaadin-date-picker-overlay-styles"});class xn extends(fn(yn(on))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return
|
|
2586
|
+
`,{moduleId:"vaadin-date-picker-overlay-styles"});class xn extends(fn(yn(on))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return _n||(_n=super.template.cloneNode(!0),_n.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),_n}}customElements.define(xn.is,xn);
|
|
2587
2587
|
/**
|
|
2588
2588
|
@license
|
|
2589
2589
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3060,7 +3060,7 @@ class qn{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
3060
3060
|
* @license
|
|
3061
3061
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
3062
3062
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3063
|
-
*/;pt("vaadin-date-picker",[Rn,
|
|
3063
|
+
*/;pt("vaadin-date-picker",[Rn,wn],{moduleId:"vaadin-date-picker-styles"});class Wn extends(Hn($n(yt(Ws(ji))))){static get is(){return"vaadin-date-picker"}static get template(){return Ni`
|
|
3064
3064
|
<style>
|
|
3065
3065
|
:host([opened]) {
|
|
3066
3066
|
pointer-events: auto;
|
|
@@ -3123,7 +3123,7 @@ class qn{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
3123
3123
|
</vaadin-date-picker-overlay>
|
|
3124
3124
|
|
|
3125
3125
|
<slot name="tooltip"></slot>
|
|
3126
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new mr(this.inputElement,this._labelController)),this._tooltipController=new Zs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Gn(t){return(Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yn(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Un(t){return Yn(1,arguments),t instanceof Date||"object"===Gn(t)&&"[object Date]"===Object.prototype.toString.call(t)}function Qn(t){Yn(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Gn(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Kn(t){if(Yn(1,arguments),!Un(t)&&"number"!=typeof t)return!1;var e=Qn(t);return!isNaN(Number(e))}function Xn(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Jn(t,e){Yn(2,arguments);var i=Qn(t).getTime(),s=Xn(e);return new Date(i+s)}function Zn(t,e){Yn(2,arguments);var i=Xn(e);return Jn(t,-i)}function to(t){Yn(1,arguments);var e=1,i=Qn(t),s=i.getUTCDay(),r=(s<e?7:0)+s-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function eo(t){Yn(1,arguments);var e=Qn(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=to(s),n=new Date(0);n.setUTCFullYear(i,0,4),n.setUTCHours(0,0,0,0);var o=to(n);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function io(t){Yn(1,arguments);var e=eo(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=to(i);return s}function so(t){Yn(1,arguments);var e=Qn(t),i=to(e).getTime()-io(e).getTime();return Math.round(i/6048e5)+1}customElements.define(Wn.is,Wn);var ro={};function no(){return ro}function oo(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=no(),u=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.weekStartsOn)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==s?s:null===(h=c.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Qn(t),p=d.getUTCDay(),m=(p<u?7:0)+p-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function ao(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=Qn(t),u=c.getUTCFullYear(),d=no(),p=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,p),m.setUTCHours(0,0,0,0);var f=oo(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var g=oo(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function ho(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=no(),u=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==s?s:null===(h=c.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),d=ao(t,e),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var m=oo(p,e);return m}function lo(t,e){Yn(1,arguments);var i=Qn(t),s=oo(i,e).getTime()-ho(i,e).getTime();return Math.round(s/6048e5)+1}function co(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var uo={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return co("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=ao(t,s),n=r>0?r:1-r;return"YY"===e?co(n%100,2):"Yo"===e?i.ordinalNumber(n,{unit:"year"}):co(n,e.length)},R:function(t,e){return co(eo(t),e.length)},u:function(t,e){return co(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return co(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return co(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):co(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return co(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=lo(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):co(r,e.length)},I:function(t,e,i){var s=so(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):co(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return co(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){Yn(1,arguments);var e=Qn(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):co(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),n=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(n);case"ee":return co(n,2);case"eo":return i.ordinalNumber(n,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),n=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(n);case"cc":return co(n,e.length);case"co":return i.ordinalNumber(n,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return co(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return function(t,e){return co(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return co(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):co(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):co(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return co(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return co(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return co(Math.floor(s*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return mo(r);case"XXXX":case"XX":return fo(r);case"XXXXX":case"XXX":default:return fo(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return mo(r);case"xxxx":case"xx":return fo(r);case"xxxxx":case"xxx":default:return fo(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+po(r,":");case"OOOO":default:return"GMT"+fo(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+po(r,":");case"zzzz":default:return"GMT"+fo(r,":")}},t:function(t,e,i,s){return co(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return co((s._originalDate||t).getTime(),e.length)}};function po(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),n=s%60;if(0===n)return i+String(r);var o=e||"";return i+String(r)+o+co(n,2)}function mo(t,e){return t%60==0?(t>0?"-":"+")+co(Math.abs(t)/60,2):fo(t,e)}function fo(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+co(Math.floor(r/60),2)+i+co(r%60,2)}var vo=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},go=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},bo={p:go,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],n=s[2];if(!n)return vo(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",vo(r,e)).replace("{{time}}",go(n,e))}};function yo(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var _o=["D","DD"],wo=["YY","YYYY"];function xo(t){return-1!==_o.indexOf(t)}function ko(t){return-1!==wo.indexOf(t)}function Co(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ao={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Eo(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,s=t.formats[i]||t.formats[t.defaultWidth];return s}}var So={date:Eo({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Eo({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Eo({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},To={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Do(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,n=null!=i&&i.width?String(i.width):r;s=t.formattingValues[n]||t.formattingValues[r]}else{var o=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[o]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Io(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],n=e.match(r);if(!n)return null;var o,a=n[0],h=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(h)?Mo(h,(function(t){return t.test(a)})):zo(h,(function(t){return t.test(a)}));o=t.valueCallback?t.valueCallback(l):l,o=i.valueCallback?i.valueCallback(o):o;var c=e.slice(a.length);return{value:o,rest:c}}}function zo(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Mo(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var Po,Bo={code:"en-US",formatDistance:function(t,e,i){var s,r=Ao[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:So,formatRelative:function(t){return To[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Do({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Do({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Do({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Do({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Do({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Po={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Po.matchPattern);if(!i)return null;var s=i[0],r=t.match(Po.parsePattern);if(!r)return null;var n=Po.valueCallback?Po.valueCallback(r[0]):r[0];n=e.valueCallback?e.valueCallback(n):n;var o=t.slice(s.length);return{value:n,rest:o}}),era:Io({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Io({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Io({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Io({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Io({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,No=/^'([^]*?)'?$/,Lo=/''/g,jo=/[a-zA-Z]/;function Vo(t){var e=t.match(No);return e?e[1].replace(Lo,"'"):t}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function Ro(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return $o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw n}}}}function qo(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Ho(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wo(t,e){return(Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Go(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wo(t,e)}function Yo(t){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uo(t,e){if(e&&("object"===Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ho(t)}function Qo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,s=Yo(t);if(e){var r=Yo(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return Uo(this,i)}}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xo(t){var e=function(t,e){if("object"!==Gn(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==Gn(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Gn(e)?e:String(e)}function Jo(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Xo(s.key),s)}}function Zo(t,e,i){return e&&Jo(t.prototype,e),i&&Jo(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ta(t,e,i){return(e=Xo(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ea=function(){function t(){Ko(this,t),ta(this,"priority",void 0),ta(this,"subPriority",0)}return Zo(t,[{key:"validate",value:function(){return!0}}]),t}(),ia=function(){Go(e,ea);var t=Qo(e);function e(i,s,r,n,o){var a;return Ko(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=n,o&&(a.subPriority=o),a}return Zo(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),sa=function(){Go(e,ea);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"subPriority",-1),i}return Zo(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),ra=function(){function t(){Ko(this,t),ta(this,"incompatibleTokens",void 0),ta(this,"priority",void 0),ta(this,"subPriority",void 0)}return Zo(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new ia(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),na=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",140),ta(Ho(i),"incompatibleTokens",["R","u","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),oa=/^(1[0-2]|0?\d)/,aa=/^(3[0-1]|[0-2]?\d)/,ha=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,la=/^(5[0-3]|[0-4]?\d)/,ca=/^(2[0-3]|[0-1]?\d)/,ua=/^(2[0-4]|[0-1]?\d)/,da=/^(1[0-1]|0?\d)/,pa=/^(1[0-2]|0?\d)/,ma=/^[0-5]?\d/,fa=/^[0-5]?\d/,va=/^\d/,ga=/^\d{1,2}/,ba=/^\d{1,3}/,ya=/^\d{1,4}/,_a=/^-?\d+/,wa=/^-?\d/,xa=/^-?\d{1,2}/,ka=/^-?\d{1,3}/,Ca=/^-?\d{1,4}/,Aa=/^([+-])(\d{2})(\d{2})?|Z/,Ea=/^([+-])(\d{2})(\d{2})|Z/,Sa=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ta=/^([+-])(\d{2}):(\d{2})|Z/,Da=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ia(t,e){return t?{value:e(t.value),rest:t.rest}:t}function za(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Ma(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Pa(t){return za(_a,t)}function Ba(t,e){switch(t){case 1:return za(va,e);case 2:return za(ga,e);case 3:return za(ba,e);case 4:return za(ya,e);default:return za(new RegExp("^\\d{1,"+t+"}"),e)}}function Oa(t,e){switch(t){case 1:return za(wa,e);case 2:return za(xa,e);case 3:return za(ka,e);case 4:return za(Ca,e);default:return za(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Fa(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Na(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var n=r+50;i=t+100*Math.floor(n/100)-(t>=n%100?100:0)}return s?i:1-i}function La(t){return t%400==0||t%4==0&&t%100!=0}var ja=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Ia(Ba(4,t),s);case"yo":return Ia(i.ordinalNumber(t,{unit:"year"}),s);default:return Ia(Ba(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Na(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Va=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Ia(Ba(4,t),s);case"Yo":return Ia(i.ordinalNumber(t,{unit:"year"}),s);default:return Ia(Ba(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=ao(t,s);if(i.isTwoDigitYear){var n=Na(i.year,r);return t.setUTCFullYear(n,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),oo(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),oo(t,s)}}]),e}(),$a=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Oa("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),to(s)}}]),e}(),Ra=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Oa("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),qa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",120),ta(Ho(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ba(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ha=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",120),ta(Ho(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ba(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Wa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ta(Ho(i),"priority",110),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Ia(za(oa,t),s);case"MM":return Ia(Ba(2,t),s);case"Mo":return Ia(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ga=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",110),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Ia(za(oa,t),s);case"LL":return Ia(Ba(2,t),s);case"Lo":return Ia(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ya=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",100),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return za(la,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return oo(function(t,e,i){Yn(2,arguments);var s=Qn(t),r=Xn(e),n=lo(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*n),s}(t,i,s),s)}}]),e}(),Ua=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",100),ta(Ho(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return za(la,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return to(function(t,e){Yn(2,arguments);var i=Qn(t),s=Xn(e),r=so(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Qa=[31,28,31,30,31,30,31,31,30,31,30,31],Ka=[31,29,31,30,31,30,31,31,30,31,30,31],Xa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"subPriority",1),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return za(aa,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){var i=La(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Ka[s]:e>=1&&e<=Qa[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ja=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"subpriority",1),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return za(ha,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return La(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Za(t,e,i){var s,r,n,o,a,h,l,c;Yn(2,arguments);var u=no(),d=Xn(null!==(s=null!==(r=null!==(n=null!==(o=null==i?void 0:i.weekStartsOn)&&void 0!==o?o:null==i||null===(a=i.locale)||void 0===a||null===(h=a.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==s?s:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Qn(t),m=Xn(e),f=p.getUTCDay(),v=m%7,g=(v+7)%7,b=(g<d?7:0)+m-f;return p.setUTCDate(p.getUTCDate()+b),p}var th=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),eh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Ia(Ba(e.length,t),r);case"eo":return Ia(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),ih=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Ia(Ba(e.length,t),r);case"co":return Ia(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),sh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ba(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Ia(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ia(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ia(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ia(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return(t=function(t,e){Yn(2,arguments);var i=Xn(e);i%7==0&&(i-=7);var s=1,r=Qn(t),n=r.getUTCDay(),o=((i%7+7)%7<s?7:0)+i-n;return r.setUTCDate(r.getUTCDate()+o),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),rh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),nh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),oh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["a","b","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),ah=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return za(pa,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),hh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return za(ca,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),lh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return za(da,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),ch=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return za(ua,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),uh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",60),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return za(ma,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),dh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",50),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return za(fa,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),ph=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",30),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Ia(Ba(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),mh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"incompatibleTokens",["t","T","x"]),i}return Zo(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Ma(Aa,t);case"XX":return Ma(Ea,t);case"XXXX":return Ma(Sa,t);case"XXXXX":return Ma(Da,t);case"XXX":default:return Ma(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),fh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"incompatibleTokens",["t","T","X"]),i}return Zo(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Ma(Aa,t);case"xx":return Ma(Ea,t);case"xxxx":return Ma(Sa,t);case"xxxxx":return Ma(Da,t);case"xxx":default:return Ma(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),vh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",40),ta(Ho(i),"incompatibleTokens","*"),i}return Zo(e,[{key:"parse",value:function(t){return Pa(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),gh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",20),ta(Ho(i),"incompatibleTokens","*"),i}return Zo(e,[{key:"parse",value:function(t){return Pa(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),bh={G:new na,y:new ja,Y:new Va,R:new $a,u:new Ra,Q:new qa,q:new Ha,M:new Wa,L:new Ga,w:new Ya,I:new Ua,d:new Xa,D:new Ja,E:new th,e:new eh,c:new ih,i:new sh,a:new rh,b:new nh,B:new oh,h:new ah,H:new hh,K:new lh,k:new ch,m:new uh,s:new dh,S:new ph,X:new mh,x:new fh,t:new vh,T:new gh},yh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_h=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wh=/^'([^]*?)'?$/,xh=/''/g,kh=/\S/,Ch=/[a-zA-Z]/;function Ah(t,e,i,s){var r,n,o,a,h,l,c,u,d,p,m,f,v,g,b,y,_,w;Yn(3,arguments);var x=String(t),k=String(e),C=no(),A=null!==(r=null!==(n=null==s?void 0:s.locale)&&void 0!==n?n:C.locale)&&void 0!==r?r:Bo;if(!A.match)throw new RangeError("locale must contain match property");var E=Xn(null!==(o=null!==(a=null!==(h=null!==(l=null==s?void 0:s.firstWeekContainsDate)&&void 0!==l?l:null==s||null===(c=s.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==a?a:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Xn(null!==(m=null!==(f=null!==(v=null!==(g=null==s?void 0:s.weekStartsOn)&&void 0!==g?g:null==s||null===(b=s.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(_=C.locale)||void 0===_||null===(w=_.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==m?m:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Qn(i):new Date(NaN);var T,D={firstWeekContainsDate:E,weekStartsOn:S,locale:A},I=[new sa],z=k.match(_h).map((function(t){var e=t[0];return e in bo?(0,bo[e])(t,A.formatLong):t})).join("").match(yh),M=[],P=Ro(z);try{var B=function(){var e=T.value;null!=s&&s.useAdditionalWeekYearTokens||!ko(e)||Co(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!xo(e)||Co(e,k,t);var i=e[0],r=bh[i];if(r){var n=r.incompatibleTokens;if(Array.isArray(n)){var o=M.find((function(t){return n.includes(t.token)||t.token===i}));if(o)throw new RangeError("The format string mustn't contain `".concat(o.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));M.push({token:i,fullToken:e});var a=r.run(x,e,A.match,D);if(!a)return{v:new Date(NaN)};I.push(a.setter),x=a.rest}else{if(i.match(Ch))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Eh(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(T=P.n()).done;){var O=B();if("object"===Gn(O))return O.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&kh.test(x))return new Date(NaN);var F=I.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return I.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Qn(i);if(isNaN(N.getTime()))return new Date(NaN);var L,j=Zn(N,yo(N)),V={},$=Ro(F);try{for($.s();!(L=$.n()).done;){var R=L.value;if(!R.validate(j,D))return new Date(NaN);var q=R.set(j,V,D);Array.isArray(q)?(j=q[0],qo(V,q[1])):j=q}}catch(t){$.e(t)}finally{$.f()}return j}function Eh(t){return t.match(wh)[1].replace(xh,"'")}function Sh(t,e){Yn(2,arguments);var i=Qn(t),s=Qn(e);return i.getTime()>s.getTime()}function Th(t,e){Yn(2,arguments);var i=Qn(t),s=Qn(e);return i.getTime()<s.getTime()}const Dh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return function(t,e,i){var s,r,n,o,a,h,l,c,u,d,p,m,f,v,g,b,y,_;Yn(2,arguments);var w=String(e),x=no(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:Bo,C=Xn(null!==(n=null!==(o=null!==(a=null!==(h=null==i?void 0:i.firstWeekContainsDate)&&void 0!==h?h:null==i||null===(l=i.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==o?o:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Xn(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Qn(t);if(!Kn(E))throw new RangeError("Invalid time value");var S=yo(E),T=Zn(E,S),D={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return w.match(Fo).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,bo[e])(t,k.formatLong):t})).join("").match(Oo).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return Vo(s);var n=uo[r];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!ko(s)||Co(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!xo(s)||Co(s,e,String(t)),n(T,s,k.localize,D);if(r.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return s})).join("")}(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Ah(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=Ah((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ah((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Ah(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!Th(this.valueAsDate,this.minDate)&&!Sh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return Th(this.valueAsDate,this.minDate)||Sh(this.valueAsDate,this.maxDate)?o("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?o("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"date__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Dh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Ih=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return o("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return o(`${t}`,this.language)?o(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"email__wrapper--flex"},i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"email__wrapper--relative"},this.tooltip&&i("img",{class:"email__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ih.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const zh=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.translationUrl=""}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{class:`general-input--${this.name}`},this.renderInput())}};zh.style=":host{display:block}";const Mh={en:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",generalError:"Something went wrong... Please try again."},hu:{nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",GmErr_BadRequest_Duplicate_User:"Már létezik felhasználó ezzel az információval.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied",GmErr_BadRequest_ModelValidationFailed:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_BadInternalConfigs:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_Unauthorized:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_NotFound:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_UnexpectedException:"Valami hiba történt... Kérjük, próbálja újra.",generalError:"Valami hiba történt... Próbáld újra."}},Ph=(t,e,i)=>{let s=Mh[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},Bh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isLoading=!0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1,this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))}}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].fieldsValidity=this.listOfInputValidity),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value)}))}this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const s={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,s).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const s={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,s).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?Ph(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Ph(`${this.errorCode}`,this.language)||Ph("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?this.setRegister():(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Ph(`${this.errorCode}`,this.language)||Ph("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId},window.location.href)})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i,s,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var s,r;t.push({name:i.name,value:"checkbox"==(null===(s=i.inputType)||void 0===s?void 0:s.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(s=e.inputType)||void 0===s?void 0:s.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":null}),t}),[]),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Mh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addTranslation(t){Mh[this.language][t.name]&&Object.keys(Mh[this.language][t.name]).forEach((e=>{t[e]=Mh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl}))),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},Ph(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},Ph("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return s(this)}static get watchers(){return{registrationStep:["sendStep"],forms:["setFormValidity"]}}};Bh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: #cc0000b3;\n font-size: 13px;\n font-family: "ubuntu";\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const Oh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?o("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"number__wrapper--flex"},i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"number__wrapper--relative"},this.tooltip&&i("img",{class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Oh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3126
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new mr(this.inputElement,this._labelController)),this._tooltipController=new Zs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Gn(t){return(Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yn(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Un(t){return Yn(1,arguments),t instanceof Date||"object"===Gn(t)&&"[object Date]"===Object.prototype.toString.call(t)}function Qn(t){Yn(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Gn(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Kn(t){if(Yn(1,arguments),!Un(t)&&"number"!=typeof t)return!1;var e=Qn(t);return!isNaN(Number(e))}function Xn(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Jn(t,e){Yn(2,arguments);var i=Qn(t).getTime(),s=Xn(e);return new Date(i+s)}function Zn(t,e){Yn(2,arguments);var i=Xn(e);return Jn(t,-i)}function to(t){Yn(1,arguments);var e=1,i=Qn(t),s=i.getUTCDay(),r=(s<e?7:0)+s-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function eo(t){Yn(1,arguments);var e=Qn(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=to(s),n=new Date(0);n.setUTCFullYear(i,0,4),n.setUTCHours(0,0,0,0);var o=to(n);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function io(t){Yn(1,arguments);var e=eo(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=to(i);return s}function so(t){Yn(1,arguments);var e=Qn(t),i=to(e).getTime()-io(e).getTime();return Math.round(i/6048e5)+1}customElements.define(Wn.is,Wn);var ro={};function no(){return ro}function oo(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=no(),u=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.weekStartsOn)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==s?s:null===(h=c.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Qn(t),p=d.getUTCDay(),m=(p<u?7:0)+p-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function ao(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=Qn(t),u=c.getUTCFullYear(),d=no(),p=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,p),m.setUTCHours(0,0,0,0);var f=oo(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var g=oo(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function ho(t,e){var i,s,r,n,o,a,h,l;Yn(1,arguments);var c=no(),u=Xn(null!==(i=null!==(s=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(o=e.locale)||void 0===o||null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==s?s:null===(h=c.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),d=ao(t,e),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var m=oo(p,e);return m}function lo(t,e){Yn(1,arguments);var i=Qn(t),s=oo(i,e).getTime()-ho(i,e).getTime();return Math.round(s/6048e5)+1}function co(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var uo={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return co("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=ao(t,s),n=r>0?r:1-r;return"YY"===e?co(n%100,2):"Yo"===e?i.ordinalNumber(n,{unit:"year"}):co(n,e.length)},R:function(t,e){return co(eo(t),e.length)},u:function(t,e){return co(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return co(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return co(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):co(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return co(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=lo(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):co(r,e.length)},I:function(t,e,i){var s=so(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):co(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return co(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){Yn(1,arguments);var e=Qn(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):co(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),n=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(n);case"ee":return co(n,2);case"eo":return i.ordinalNumber(n,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),n=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(n);case"cc":return co(n,e.length);case"co":return i.ordinalNumber(n,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return co(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return function(t,e){return co(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return co(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):co(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):co(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return co(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return co(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return co(Math.floor(s*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return mo(r);case"XXXX":case"XX":return fo(r);case"XXXXX":case"XXX":default:return fo(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return mo(r);case"xxxx":case"xx":return fo(r);case"xxxxx":case"xxx":default:return fo(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+po(r,":");case"OOOO":default:return"GMT"+fo(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+po(r,":");case"zzzz":default:return"GMT"+fo(r,":")}},t:function(t,e,i,s){return co(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return co((s._originalDate||t).getTime(),e.length)}};function po(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),n=s%60;if(0===n)return i+String(r);var o=e||"";return i+String(r)+o+co(n,2)}function mo(t,e){return t%60==0?(t>0?"-":"+")+co(Math.abs(t)/60,2):fo(t,e)}function fo(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+co(Math.floor(r/60),2)+i+co(r%60,2)}var vo=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},go=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},bo={p:go,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],n=s[2];if(!n)return vo(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",vo(r,e)).replace("{{time}}",go(n,e))}};function yo(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var wo=["D","DD"],_o=["YY","YYYY"];function xo(t){return-1!==wo.indexOf(t)}function ko(t){return-1!==_o.indexOf(t)}function Co(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ao={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Eo(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,s=t.formats[i]||t.formats[t.defaultWidth];return s}}var So={date:Eo({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Eo({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Eo({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},To={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Do(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,n=null!=i&&i.width?String(i.width):r;s=t.formattingValues[n]||t.formattingValues[r]}else{var o=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[o]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Io(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],n=e.match(r);if(!n)return null;var o,a=n[0],h=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(h)?Mo(h,(function(t){return t.test(a)})):zo(h,(function(t){return t.test(a)}));o=t.valueCallback?t.valueCallback(l):l,o=i.valueCallback?i.valueCallback(o):o;var c=e.slice(a.length);return{value:o,rest:c}}}function zo(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Mo(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var Po,Bo={code:"en-US",formatDistance:function(t,e,i){var s,r=Ao[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:So,formatRelative:function(t){return To[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Do({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Do({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Do({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Do({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Do({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Po={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Po.matchPattern);if(!i)return null;var s=i[0],r=t.match(Po.parsePattern);if(!r)return null;var n=Po.valueCallback?Po.valueCallback(r[0]):r[0];n=e.valueCallback?e.valueCallback(n):n;var o=t.slice(s.length);return{value:n,rest:o}}),era:Io({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Io({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Io({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Io({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Io({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,No=/^'([^]*?)'?$/,Lo=/''/g,jo=/[a-zA-Z]/;function Vo(t){var e=t.match(No);return e?e[1].replace(Lo,"'"):t}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function Ro(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return $o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw n}}}}function qo(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Ho(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wo(t,e){return(Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Go(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wo(t,e)}function Yo(t){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uo(t,e){if(e&&("object"===Gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ho(t)}function Qo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,s=Yo(t);if(e){var r=Yo(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return Uo(this,i)}}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xo(t){var e=function(t,e){if("object"!==Gn(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==Gn(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Gn(e)?e:String(e)}function Jo(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Xo(s.key),s)}}function Zo(t,e,i){return e&&Jo(t.prototype,e),i&&Jo(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ta(t,e,i){return(e=Xo(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ea=function(){function t(){Ko(this,t),ta(this,"priority",void 0),ta(this,"subPriority",0)}return Zo(t,[{key:"validate",value:function(){return!0}}]),t}(),ia=function(){Go(e,ea);var t=Qo(e);function e(i,s,r,n,o){var a;return Ko(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=n,o&&(a.subPriority=o),a}return Zo(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),sa=function(){Go(e,ea);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"subPriority",-1),i}return Zo(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),ra=function(){function t(){Ko(this,t),ta(this,"incompatibleTokens",void 0),ta(this,"priority",void 0),ta(this,"subPriority",void 0)}return Zo(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new ia(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),na=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",140),ta(Ho(i),"incompatibleTokens",["R","u","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),oa=/^(1[0-2]|0?\d)/,aa=/^(3[0-1]|[0-2]?\d)/,ha=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,la=/^(5[0-3]|[0-4]?\d)/,ca=/^(2[0-3]|[0-1]?\d)/,ua=/^(2[0-4]|[0-1]?\d)/,da=/^(1[0-1]|0?\d)/,pa=/^(1[0-2]|0?\d)/,ma=/^[0-5]?\d/,fa=/^[0-5]?\d/,va=/^\d/,ga=/^\d{1,2}/,ba=/^\d{1,3}/,ya=/^\d{1,4}/,wa=/^-?\d+/,_a=/^-?\d/,xa=/^-?\d{1,2}/,ka=/^-?\d{1,3}/,Ca=/^-?\d{1,4}/,Aa=/^([+-])(\d{2})(\d{2})?|Z/,Ea=/^([+-])(\d{2})(\d{2})|Z/,Sa=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ta=/^([+-])(\d{2}):(\d{2})|Z/,Da=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ia(t,e){return t?{value:e(t.value),rest:t.rest}:t}function za(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Ma(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Pa(t){return za(wa,t)}function Ba(t,e){switch(t){case 1:return za(va,e);case 2:return za(ga,e);case 3:return za(ba,e);case 4:return za(ya,e);default:return za(new RegExp("^\\d{1,"+t+"}"),e)}}function Oa(t,e){switch(t){case 1:return za(_a,e);case 2:return za(xa,e);case 3:return za(ka,e);case 4:return za(Ca,e);default:return za(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Fa(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Na(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var n=r+50;i=t+100*Math.floor(n/100)-(t>=n%100?100:0)}return s?i:1-i}function La(t){return t%400==0||t%4==0&&t%100!=0}var ja=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Ia(Ba(4,t),s);case"yo":return Ia(i.ordinalNumber(t,{unit:"year"}),s);default:return Ia(Ba(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Na(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Va=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Ia(Ba(4,t),s);case"Yo":return Ia(i.ordinalNumber(t,{unit:"year"}),s);default:return Ia(Ba(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=ao(t,s);if(i.isTwoDigitYear){var n=Na(i.year,r);return t.setUTCFullYear(n,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),oo(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),oo(t,s)}}]),e}(),$a=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Oa("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),to(s)}}]),e}(),Ra=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",130),ta(Ho(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Oa("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),qa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",120),ta(Ho(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ba(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ha=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",120),ta(Ho(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ba(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Wa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ta(Ho(i),"priority",110),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Ia(za(oa,t),s);case"MM":return Ia(Ba(2,t),s);case"Mo":return Ia(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ga=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",110),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Ia(za(oa,t),s);case"LL":return Ia(Ba(2,t),s);case"Lo":return Ia(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ya=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",100),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return za(la,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return oo(function(t,e,i){Yn(2,arguments);var s=Qn(t),r=Xn(e),n=lo(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*n),s}(t,i,s),s)}}]),e}(),Ua=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",100),ta(Ho(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return za(la,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return to(function(t,e){Yn(2,arguments);var i=Qn(t),s=Xn(e),r=so(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Qa=[31,28,31,30,31,30,31,31,30,31,30,31],Ka=[31,29,31,30,31,30,31,31,30,31,30,31],Xa=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"subPriority",1),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return za(aa,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){var i=La(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Ka[s]:e>=1&&e<=Qa[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ja=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"subpriority",1),ta(Ho(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return za(ha,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return La(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Za(t,e,i){var s,r,n,o,a,h,l,c;Yn(2,arguments);var u=no(),d=Xn(null!==(s=null!==(r=null!==(n=null!==(o=null==i?void 0:i.weekStartsOn)&&void 0!==o?o:null==i||null===(a=i.locale)||void 0===a||null===(h=a.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==s?s:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Qn(t),m=Xn(e),f=p.getUTCDay(),v=m%7,g=(v+7)%7,b=(g<d?7:0)+m-f;return p.setUTCDate(p.getUTCDate()+b),p}var th=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),eh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Ia(Ba(e.length,t),r);case"eo":return Ia(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),ih=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Ia(Ba(e.length,t),r);case"co":return Ia(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Za(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),sh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",90),ta(Ho(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ba(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Ia(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ia(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ia(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ia(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return(t=function(t,e){Yn(2,arguments);var i=Xn(e);i%7==0&&(i-=7);var s=1,r=Qn(t),n=r.getUTCDay(),o=((i%7+7)%7<s?7:0)+i-n;return r.setUTCDate(r.getUTCDate()+o),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),rh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),nh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),oh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",80),ta(Ho(i),"incompatibleTokens",["a","b","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Fa(i),0,0,0),t}}]),e}(),ah=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return za(pa,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),hh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return za(ca,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),lh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return za(da,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),ch=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",70),ta(Ho(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return za(ua,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),uh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",60),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return za(ma,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),dh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",50),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return za(fa,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ba(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),ph=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",30),ta(Ho(i),"incompatibleTokens",["t","T"]),i}return Zo(e,[{key:"parse",value:function(t,e){return Ia(Ba(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),mh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"incompatibleTokens",["t","T","x"]),i}return Zo(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Ma(Aa,t);case"XX":return Ma(Ea,t);case"XXXX":return Ma(Sa,t);case"XXXXX":return Ma(Da,t);case"XXX":default:return Ma(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),fh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",10),ta(Ho(i),"incompatibleTokens",["t","T","X"]),i}return Zo(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Ma(Aa,t);case"xx":return Ma(Ea,t);case"xxxx":return Ma(Sa,t);case"xxxxx":return Ma(Da,t);case"xxx":default:return Ma(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),vh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",40),ta(Ho(i),"incompatibleTokens","*"),i}return Zo(e,[{key:"parse",value:function(t){return Pa(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),gh=function(){Go(e,ra);var t=Qo(e);function e(){var i;Ko(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return ta(Ho(i=t.call.apply(t,[this].concat(r))),"priority",20),ta(Ho(i),"incompatibleTokens","*"),i}return Zo(e,[{key:"parse",value:function(t){return Pa(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),bh={G:new na,y:new ja,Y:new Va,R:new $a,u:new Ra,Q:new qa,q:new Ha,M:new Wa,L:new Ga,w:new Ya,I:new Ua,d:new Xa,D:new Ja,E:new th,e:new eh,c:new ih,i:new sh,a:new rh,b:new nh,B:new oh,h:new ah,H:new hh,K:new lh,k:new ch,m:new uh,s:new dh,S:new ph,X:new mh,x:new fh,t:new vh,T:new gh},yh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_h=/^'([^]*?)'?$/,xh=/''/g,kh=/\S/,Ch=/[a-zA-Z]/;function Ah(t,e,i,s){var r,n,o,a,h,l,c,u,d,p,m,f,v,g,b,y,w,_;Yn(3,arguments);var x=String(t),k=String(e),C=no(),A=null!==(r=null!==(n=null==s?void 0:s.locale)&&void 0!==n?n:C.locale)&&void 0!==r?r:Bo;if(!A.match)throw new RangeError("locale must contain match property");var E=Xn(null!==(o=null!==(a=null!==(h=null!==(l=null==s?void 0:s.firstWeekContainsDate)&&void 0!==l?l:null==s||null===(c=s.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==a?a:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Xn(null!==(m=null!==(f=null!==(v=null!==(g=null==s?void 0:s.weekStartsOn)&&void 0!==g?g:null==s||null===(b=s.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(w=C.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Qn(i):new Date(NaN);var T,D={firstWeekContainsDate:E,weekStartsOn:S,locale:A},I=[new sa],z=k.match(wh).map((function(t){var e=t[0];return e in bo?(0,bo[e])(t,A.formatLong):t})).join("").match(yh),M=[],P=Ro(z);try{var B=function(){var e=T.value;null!=s&&s.useAdditionalWeekYearTokens||!ko(e)||Co(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!xo(e)||Co(e,k,t);var i=e[0],r=bh[i];if(r){var n=r.incompatibleTokens;if(Array.isArray(n)){var o=M.find((function(t){return n.includes(t.token)||t.token===i}));if(o)throw new RangeError("The format string mustn't contain `".concat(o.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));M.push({token:i,fullToken:e});var a=r.run(x,e,A.match,D);if(!a)return{v:new Date(NaN)};I.push(a.setter),x=a.rest}else{if(i.match(Ch))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Eh(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(T=P.n()).done;){var O=B();if("object"===Gn(O))return O.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&kh.test(x))return new Date(NaN);var F=I.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return I.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Qn(i);if(isNaN(N.getTime()))return new Date(NaN);var L,j=Zn(N,yo(N)),V={},$=Ro(F);try{for($.s();!(L=$.n()).done;){var R=L.value;if(!R.validate(j,D))return new Date(NaN);var q=R.set(j,V,D);Array.isArray(q)?(j=q[0],qo(V,q[1])):j=q}}catch(t){$.e(t)}finally{$.f()}return j}function Eh(t){return t.match(_h)[1].replace(xh,"'")}function Sh(t,e){Yn(2,arguments);var i=Qn(t),s=Qn(e);return i.getTime()>s.getTime()}function Th(t,e){Yn(2,arguments);var i=Qn(t),s=Qn(e);return i.getTime()<s.getTime()}const Dh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return function(t,e,i){var s,r,n,o,a,h,l,c,u,d,p,m,f,v,g,b,y,w;Yn(2,arguments);var _=String(e),x=no(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:Bo,C=Xn(null!==(n=null!==(o=null!==(a=null!==(h=null==i?void 0:i.firstWeekContainsDate)&&void 0!==h?h:null==i||null===(l=i.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==o?o:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Xn(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Qn(t);if(!Kn(E))throw new RangeError("Invalid time value");var S=yo(E),T=Zn(E,S),D={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return _.match(Fo).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,bo[e])(t,k.formatLong):t})).join("").match(Oo).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return Vo(s);var n=uo[r];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!ko(s)||Co(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!xo(s)||Co(s,e,String(t)),n(T,s,k.localize,D);if(r.match(jo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return s})).join("")}(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Ah(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=Ah((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ah((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Ah(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!Th(this.valueAsDate,this.minDate)&&!Sh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return Th(this.valueAsDate,this.minDate)||Sh(this.valueAsDate,this.maxDate)?o("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?o("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"date__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Dh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Ih=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return o("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return o(`${t}`,this.language)?o(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"email__wrapper--flex"},i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"email__wrapper--relative"},this.tooltip&&i("img",{class:"email__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ih.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const zh=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.translationUrl=""}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{class:`general-input--${this.name}`},this.renderInput())}};zh.style=":host{display:block}";const Mh={en:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",generalError:"Something went wrong... Please try again."},hu:{nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",GmErr_BadRequest_Duplicate_User:"Már létezik felhasználó ezzel az információval.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied",GmErr_BadRequest_ModelValidationFailed:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_BadInternalConfigs:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_Unauthorized:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_NotFound:"Valami hiba történt... Kérjük, próbálja újra.",GmErr_UnexpectedException:"Valami hiba történt... Kérjük, próbálja újra.",generalError:"Valami hiba történt... Próbáld újra."}},Ph=(t,e,i)=>{let s=Mh[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},Bh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isLoading=!0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1,this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))}}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].fieldsValidity=this.listOfInputValidity),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value)}))}this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const s={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,s).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const s={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,s).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?Ph(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Ph(`${this.errorCode}`,this.language)||Ph("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?this.setRegister():(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Ph(`${this.errorCode}`,this.language)||Ph("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId},window.location.href)})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i,s,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var s,r;t.push({name:i.name,value:"checkbox"==(null===(s=i.inputType)||void 0===s?void 0:s.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(s=e.inputType)||void 0===s?void 0:s.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":null}),t}),[]),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Mh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addTranslation(t){Mh[this.language][t.name]&&Object.keys(Mh[this.language][t.name]).forEach((e=>{t[e]=Mh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl}))),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},Ph(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},Ph("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return s(this)}static get watchers(){return{registrationStep:["sendStep"],forms:["setFormValidity"]}}};Bh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: #cc0000b3;\n font-size: 13px;\n font-family: "ubuntu";\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const Oh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?o("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"number__wrapper--flex"},i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"number__wrapper--relative"},this.tooltip&&i("img",{class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Oh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3127
3127
|
/**
|
|
3128
3128
|
* @license
|
|
3129
3129
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -3579,4 +3579,4 @@ function sl(t){return null!=t}function rl(t,e){return t.findIndex((t=>!(t instan
|
|
|
3579
3579
|
></vaadin-combo-box-overlay>
|
|
3580
3580
|
|
|
3581
3581
|
<slot name="tooltip"></slot>
|
|
3582
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new mr(this.inputElement,this._labelController)),this._tooltipController=new Zs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_setFocused(t){super._setFocused(t),t||this.validate()}_shouldRemoveFocus(t){return t.relatedTarget!==this.$.overlay||(t.composedPath()[0].focus(),!1)}_onClearButtonClick(t){t.stopPropagation(),this._handleClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}customElements.define(ol.is,ol);const al=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.handleChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return o("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"select__wrapper--flex"},i("label",{class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{class:"select__wrapper--relative"},this.tooltip&&i("img",{class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{class:"select__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};al.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:#979797}.select__wrapper--autofilled .select__input::part(input-field){color:#979797}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const hl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"tel__wrapper--flex-label"},i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"tel__wrapper--relative"},this.tooltip&&i("img",{class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:#979797}.tel__wrapper--autofilled .tel__input::part(input-field){color:#979797}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const ll=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return o("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return o(`${t}`,this.language)?o(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{class:"text__wrapper--flex"},i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"text__wrapper--relative"},this.tooltip&&i("img",{class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ll.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:#979797}.text__wrapper--autofilled .text__input::part(input-field){color:#979797}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';const cl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity()}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return o("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"togglecheckbox__wrapper--flex"},i("input",{class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{class:"togglecheckbox__error-message"},this.errorMessage),i("div",{class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder})))))}};cl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';export{Sr as checkbox_group_input,Tr as checkbox_input,Dh as date_input,Ih as email_input,zh as general_input,Bh as general_registration,Oh as number_input,qh as password_input,Hh as radio_input,al as select_input,hl as tel_input,ll as text_input,cl as toggle_checkbox_input}
|
|
3582
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new mr(this.inputElement,this._labelController)),this._tooltipController=new Zs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_setFocused(t){super._setFocused(t),t||this.validate()}_shouldRemoveFocus(t){return t.relatedTarget!==this.$.overlay||(t.composedPath()[0].focus(),!1)}_onClearButtonClick(t){t.stopPropagation(),this._handleClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}customElements.define(ol.is,ol);const al=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.handleChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return o("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"select__wrapper--flex"},i("label",{class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{class:"select__wrapper--relative"},this.tooltip&&i("img",{class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{class:"select__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};al.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:#979797}.select__wrapper--autofilled .select__input::part(input-field){color:#979797}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const hl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?o("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"tel__wrapper--flex-label"},i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"tel__wrapper--relative"},this.tooltip&&i("img",{class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:#979797}.tel__wrapper--autofilled .tel__input::part(input-field){color:#979797}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const ll=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}handleClick(){"username"===this.name.toLowerCase()&&window.postMessage({type:"registrationUsernameClicked"},window.location.href)}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return o(`${i}`,this.language)?o(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return o("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return o("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return o(`${t}`,this.language)?o(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{class:"text__wrapper--flex"},i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"text__wrapper--relative"},this.tooltip&&i("img",{class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur,onClick:this.handleClick}),i("small",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ll.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:#979797}.text__wrapper--autofilled .text__input::part(input-field){color:#979797}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';const cl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity()}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return o("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"togglecheckbox__wrapper--flex"},i("input",{class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{class:"togglecheckbox__error-message"},this.errorMessage),i("div",{class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder})))))}};cl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';export{Sr as checkbox_group_input,Tr as checkbox_input,Dh as date_input,Ih as email_input,zh as general_input,Bh as general_registration,Oh as number_input,qh as password_input,Hh as radio_input,al as select_input,hl as tel_input,ll as text_input,cl as toggle_checkbox_input}
|