@everymatrix/general-registration 1.36.0 → 1.37.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 -4
- package/dist/collection/components/general-registration/general-registration.js +3 -2
- package/dist/collection/utils/locale.utils.js +4 -4
- package/dist/components/general-registration.js +5 -4
- package/dist/esm/checkbox-group-input_13.entry.js +5 -4
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-598a7b37.entry.js → p-6494da98.entry.js} +1 -1
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -30154,7 +30154,7 @@ const TRANSLATIONS = {
|
|
|
30154
30154
|
"GmErr_UnexpectedException": 'Algo salió mal... Por favor intente de nuevo',
|
|
30155
30155
|
"generalError": 'Algo salió mal... Por favor intente de nuevo',
|
|
30156
30156
|
"successMessage": 'Registro exitoso'
|
|
30157
|
-
}
|
|
30157
|
+
},
|
|
30158
30158
|
};
|
|
30159
30159
|
const getTranslations = (url) => {
|
|
30160
30160
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
@@ -30172,8 +30172,8 @@ const getTranslations = (url) => {
|
|
|
30172
30172
|
});
|
|
30173
30173
|
};
|
|
30174
30174
|
const translate = (key, customLang, values) => {
|
|
30175
|
-
|
|
30176
|
-
let translation = TRANSLATIONS[lang
|
|
30175
|
+
let lang = TRANSLATIONS[customLang] ? customLang : DEFAULT_LANGUAGE;
|
|
30176
|
+
let translation = TRANSLATIONS[lang][key];
|
|
30177
30177
|
if (values !== undefined) {
|
|
30178
30178
|
for (const [key, value] of Object.entries(values.values)) {
|
|
30179
30179
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -30669,7 +30669,8 @@ const GeneralRegistration = class {
|
|
|
30669
30669
|
}
|
|
30670
30670
|
}
|
|
30671
30671
|
addTranslation(field) {
|
|
30672
|
-
|
|
30672
|
+
const lang = TRANSLATIONS[this.language] ? this.language : DEFAULT_LANGUAGE;
|
|
30673
|
+
if (TRANSLATIONS[lang][field.name]) {
|
|
30673
30674
|
Object.keys(TRANSLATIONS[this.language][field.name]).forEach((key) => {
|
|
30674
30675
|
field[key] = TRANSLATIONS[this.language][field.name][key];
|
|
30675
30676
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, h, Listen, Prop, State, Watch, Event, Element } from '@stencil/core';
|
|
2
|
-
import { getTranslations, translate, TRANSLATIONS } from '../../utils/locale.utils';
|
|
2
|
+
import { getTranslations, translate, TRANSLATIONS, DEFAULT_LANGUAGE } from '../../utils/locale.utils';
|
|
3
3
|
import '@everymatrix/general-input';
|
|
4
4
|
export class GeneralRegistration {
|
|
5
5
|
constructor() {
|
|
@@ -483,7 +483,8 @@ export class GeneralRegistration {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
addTranslation(field) {
|
|
486
|
-
|
|
486
|
+
const lang = TRANSLATIONS[this.language] ? this.language : DEFAULT_LANGUAGE;
|
|
487
|
+
if (TRANSLATIONS[lang][field.name]) {
|
|
487
488
|
Object.keys(TRANSLATIONS[this.language][field.name]).forEach((key) => {
|
|
488
489
|
field[key] = TRANSLATIONS[this.language][field.name][key];
|
|
489
490
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
1
|
+
export const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
export const TRANSLATIONS = {
|
|
3
3
|
"en": {
|
|
4
4
|
"nextButton": 'Next',
|
|
@@ -78,7 +78,7 @@ export const TRANSLATIONS = {
|
|
|
78
78
|
"GmErr_UnexpectedException": 'Algo salió mal... Por favor intente de nuevo',
|
|
79
79
|
"generalError": 'Algo salió mal... Por favor intente de nuevo',
|
|
80
80
|
"successMessage": 'Registro exitoso'
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
82
|
};
|
|
83
83
|
export const getTranslations = (url) => {
|
|
84
84
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
@@ -96,8 +96,8 @@ export const getTranslations = (url) => {
|
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
98
|
export const translate = (key, customLang, values) => {
|
|
99
|
-
|
|
100
|
-
let translation = TRANSLATIONS[lang
|
|
99
|
+
let lang = TRANSLATIONS[customLang] ? customLang : DEFAULT_LANGUAGE;
|
|
100
|
+
let translation = TRANSLATIONS[lang][key];
|
|
101
101
|
if (values !== undefined) {
|
|
102
102
|
for (const [key, value] of Object.entries(values.values)) {
|
|
103
103
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -91,7 +91,7 @@ const TRANSLATIONS = {
|
|
|
91
91
|
"GmErr_UnexpectedException": 'Algo salió mal... Por favor intente de nuevo',
|
|
92
92
|
"generalError": 'Algo salió mal... Por favor intente de nuevo',
|
|
93
93
|
"successMessage": 'Registro exitoso'
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
95
|
};
|
|
96
96
|
const getTranslations = (url) => {
|
|
97
97
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
@@ -109,8 +109,8 @@ const getTranslations = (url) => {
|
|
|
109
109
|
});
|
|
110
110
|
};
|
|
111
111
|
const translate = (key, customLang, values) => {
|
|
112
|
-
|
|
113
|
-
let translation = TRANSLATIONS[lang
|
|
112
|
+
let lang = TRANSLATIONS[customLang] ? customLang : DEFAULT_LANGUAGE;
|
|
113
|
+
let translation = TRANSLATIONS[lang][key];
|
|
114
114
|
if (values !== undefined) {
|
|
115
115
|
for (const [key, value] of Object.entries(values.values)) {
|
|
116
116
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -608,7 +608,8 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
addTranslation(field) {
|
|
611
|
-
|
|
611
|
+
const lang = TRANSLATIONS[this.language] ? this.language : DEFAULT_LANGUAGE;
|
|
612
|
+
if (TRANSLATIONS[lang][field.name]) {
|
|
612
613
|
Object.keys(TRANSLATIONS[this.language][field.name]).forEach((key) => {
|
|
613
614
|
field[key] = TRANSLATIONS[this.language][field.name][key];
|
|
614
615
|
});
|
|
@@ -30150,7 +30150,7 @@ const TRANSLATIONS = {
|
|
|
30150
30150
|
"GmErr_UnexpectedException": 'Algo salió mal... Por favor intente de nuevo',
|
|
30151
30151
|
"generalError": 'Algo salió mal... Por favor intente de nuevo',
|
|
30152
30152
|
"successMessage": 'Registro exitoso'
|
|
30153
|
-
}
|
|
30153
|
+
},
|
|
30154
30154
|
};
|
|
30155
30155
|
const getTranslations = (url) => {
|
|
30156
30156
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
@@ -30168,8 +30168,8 @@ const getTranslations = (url) => {
|
|
|
30168
30168
|
});
|
|
30169
30169
|
};
|
|
30170
30170
|
const translate = (key, customLang, values) => {
|
|
30171
|
-
|
|
30172
|
-
let translation = TRANSLATIONS[lang
|
|
30171
|
+
let lang = TRANSLATIONS[customLang] ? customLang : DEFAULT_LANGUAGE;
|
|
30172
|
+
let translation = TRANSLATIONS[lang][key];
|
|
30173
30173
|
if (values !== undefined) {
|
|
30174
30174
|
for (const [key, value] of Object.entries(values.values)) {
|
|
30175
30175
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -30665,7 +30665,8 @@ const GeneralRegistration = class {
|
|
|
30665
30665
|
}
|
|
30666
30666
|
}
|
|
30667
30667
|
addTranslation(field) {
|
|
30668
|
-
|
|
30668
|
+
const lang = TRANSLATIONS[this.language] ? this.language : DEFAULT_LANGUAGE;
|
|
30669
|
+
if (TRANSLATIONS[lang][field.name]) {
|
|
30669
30670
|
Object.keys(TRANSLATIONS[this.language][field.name]).forEach((key) => {
|
|
30670
30671
|
field[key] = TRANSLATIONS[this.language][field.name][key];
|
|
30671
30672
|
});
|
|
@@ -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-6494da98",[[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"],btag:[513],emitOnClick:[516,"emit-on-click"],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"],emitOnClick:[516,"emit-on-click"]}],[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)));
|
|
@@ -3163,7 +3163,7 @@ vt("vaadin-date-picker",[en,f`
|
|
|
3163
3163
|
></vaadin-date-picker-overlay>
|
|
3164
3164
|
|
|
3165
3165
|
<slot name="tooltip"></slot>
|
|
3166
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Zs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new rr(this.inputElement,this._labelController)),this._tooltipController=new hs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),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.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function an(t){return(an="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 ln(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function hn(t){return ln(1,arguments),t instanceof Date||"object"===an(t)&&"[object Date]"===Object.prototype.toString.call(t)}function cn(t){ln(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===an(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 un(t){if(ln(1,arguments),!hn(t)&&"number"!=typeof t)return!1;var e=cn(t);return!isNaN(Number(e))}function dn(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 pn(t,e){ln(2,arguments);var i=cn(t).getTime(),s=dn(e);return new Date(i+s)}function mn(t,e){ln(2,arguments);var i=dn(e);return pn(t,-i)}function fn(t){ln(1,arguments);var e=1,i=cn(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 vn(t){ln(1,arguments);var e=cn(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=fn(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=fn(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function gn(t){ln(1,arguments);var e=vn(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=fn(i);return s}function bn(t){ln(1,arguments);var e=cn(t),i=fn(e).getTime()-gn(e).getTime();return Math.round(i/6048e5)+1}l(nn);var yn={};function wn(){return yn}function _n(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=wn(),u=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=cn(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 xn(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=cn(t),u=c.getUTCFullYear(),d=wn(),p=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.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=_n(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var g=_n(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function kn(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=wn(),u=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=xn(t,e),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var m=_n(p,e);return m}function Cn(t,e){ln(1,arguments);var i=cn(t),s=_n(i,e).getTime()-kn(i,e).getTime();return Math.round(s/6048e5)+1}function An(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var En={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 An("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=xn(t,s),o=r>0?r:1-r;return"YY"===e?An(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):An(o,e.length)},R:function(t,e){return An(vn(t),e.length)},u:function(t,e){return An(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 An(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 An(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):An(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 An(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=Cn(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):An(r,e.length)},I:function(t,e,i){var s=bn(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):An(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return An(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){ln(1,arguments);var e=cn(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"}):An(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(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return An(o,2);case"eo":return i.ordinalNumber(o,{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(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return An(o,e.length);case"co":return i.ordinalNumber(o,{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 An(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 An(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 An(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):An(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):An(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return An(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return An(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return An(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 Tn(r);case"XXXX":case"XX":return Dn(r);case"XXXXX":case"XXX":default:return Dn(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return Tn(r);case"xxxx":case"xx":return Dn(r);case"xxxxx":case"xxx":default:return Dn(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Sn(r,":");case"OOOO":default:return"GMT"+Dn(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Sn(r,":");case"zzzz":default:return"GMT"+Dn(r,":")}},t:function(t,e,i,s){return An(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return An((s._originalDate||t).getTime(),e.length)}};function Sn(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+An(o,2)}function Tn(t,e){return t%60==0?(t>0?"-":"+")+An(Math.abs(t)/60,2):Dn(t,e)}function Dn(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+An(Math.floor(r/60),2)+i+An(r%60,2)}var Mn=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"})}},zn=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"})}},In={p:zn,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return Mn(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}}",Mn(r,e)).replace("{{time}}",zn(o,e))}};function Pn(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 Fn=["D","DD"],On=["YY","YYYY"];function Nn(t){return-1!==Fn.indexOf(t)}function Bn(t){return-1!==On.indexOf(t)}function jn(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 Ln={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 Vn(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 Rn={date:Vn({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vn({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:Vn({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function $n(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,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Hn(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],o=e.match(r);if(!o)return null;var n,a=o[0],l=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(l)?Un(l,(function(t){return t.test(a)})):Gn(l,(function(t){return t.test(a)}));n=t.valueCallback?t.valueCallback(h):h,n=i.valueCallback?i.valueCallback(n):n;var c=e.slice(a.length);return{value:n,rest:c}}}function Gn(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Un(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var Wn,Yn={code:"en-US",formatDistance:function(t,e,i){var s,r=Ln[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:Rn,formatRelative:function(t){return qn[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:$n({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:$n({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:$n({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:$n({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:$n({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:(Wn={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(Wn.matchPattern);if(!i)return null;var s=i[0],r=t.match(Wn.parsePattern);if(!r)return null;var o=Wn.valueCallback?Wn.valueCallback(r[0]):r[0];o=e.valueCallback?e.valueCallback(o):o;var n=t.slice(s.length);return{value:o,rest:n}}),era:Hn({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:Hn({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:Hn({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:Hn({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:Hn({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}},Qn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kn=/^'([^]*?)'?$/,Xn=/''/g,Zn=/[a-zA-Z]/;function ta(t){var e=t.match(Kn);return e?e[1].replace(Xn,"'"):t}function ea(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 ia(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 ea(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)?ea(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 o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function sa(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 ra(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oa(t,e){return(oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function na(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&&oa(t,e)}function aa(t){return(aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function la(t,e){if(e&&("object"===an(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ra(t)}function ha(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=aa(t);if(e){var r=aa(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return la(this,i)}}function ca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ua(t){var e=function(t,e){if("object"!==an(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==an(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===an(e)?e:String(e)}function da(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,ua(s.key),s)}}function pa(t,e,i){return e&&da(t.prototype,e),i&&da(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ma(t,e,i){return(e=ua(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var fa=function(){function t(){ca(this,t),ma(this,"priority",void 0),ma(this,"subPriority",0)}return pa(t,[{key:"validate",value:function(){return!0}}]),t}(),va=function(){na(e,fa);var t=ha(e);function e(i,s,r,o,n){var a;return ca(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return pa(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}(),ga=function(){na(e,fa);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"subPriority",-1),i}return pa(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}(),ba=function(){function t(){ca(this,t),ma(this,"incompatibleTokens",void 0),ma(this,"priority",void 0),ma(this,"subPriority",void 0)}return pa(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new va(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),ya=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",140),ma(ra(i),"incompatibleTokens",["R","u","t","T"]),i}return pa(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}(),wa=/^(1[0-2]|0?\d)/,_a=/^(3[0-1]|[0-2]?\d)/,xa=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,ka=/^(5[0-3]|[0-4]?\d)/,Ca=/^(2[0-3]|[0-1]?\d)/,Aa=/^(2[0-4]|[0-1]?\d)/,Ea=/^(1[0-1]|0?\d)/,Sa=/^(1[0-2]|0?\d)/,Ta=/^[0-5]?\d/,Da=/^[0-5]?\d/,Ma=/^\d/,za=/^\d{1,2}/,Ia=/^\d{1,3}/,Pa=/^\d{1,4}/,Fa=/^-?\d+/,Oa=/^-?\d/,Na=/^-?\d{1,2}/,Ba=/^-?\d{1,3}/,ja=/^-?\d{1,4}/,La=/^([+-])(\d{2})(\d{2})?|Z/,Va=/^([+-])(\d{2})(\d{2})|Z/,Ra=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,qa=/^([+-])(\d{2}):(\d{2})|Z/,$a=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ha(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Ga(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Ua(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 Wa(t){return Ga(Fa,t)}function Ya(t,e){switch(t){case 1:return Ga(Ma,e);case 2:return Ga(za,e);case 3:return Ga(Ia,e);case 4:return Ga(Pa,e);default:return Ga(new RegExp("^\\d{1,"+t+"}"),e)}}function Qa(t,e){switch(t){case 1:return Ga(Oa,e);case 2:return Ga(Na,e);case 3:return Ga(Ba,e);case 4:return Ga(ja,e);default:return Ga(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ja(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 Ka(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Xa(t){return t%400==0||t%4==0&&t%100!=0}var Za=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Ha(Ya(4,t),s);case"yo":return Ha(i.ordinalNumber(t,{unit:"year"}),s);default:return Ha(Ya(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=Ka(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}(),tl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Ha(Ya(4,t),s);case"Yo":return Ha(i.ordinalNumber(t,{unit:"year"}),s);default:return Ha(Ya(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=xn(t,s);if(i.isTwoDigitYear){var o=Ka(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_n(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),_n(t,s)}}]),e}(),el=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Qa("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),fn(s)}}]),e}(),il=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Qa("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}(),sl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",120),ma(ra(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ya(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}(),rl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",120),ma(ra(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ya(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}(),ol=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ma(ra(i),"priority",110),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Ha(Ga(wa,t),s);case"MM":return Ha(Ya(2,t),s);case"Mo":return Ha(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}(),nl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",110),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Ha(Ga(wa,t),s);case"LL":return Ha(Ya(2,t),s);case"Lo":return Ha(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}(),al=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",100),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Ga(ka,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return _n(function(t,e,i){ln(2,arguments);var s=cn(t),r=dn(e),o=Cn(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),ll=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",100),ma(ra(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Ga(ka,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return fn(function(t,e){ln(2,arguments);var i=cn(t),s=dn(e),r=bn(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),hl=[31,28,31,30,31,30,31,31,30,31,30,31],cl=[31,29,31,30,31,30,31,31,30,31,30,31],ul=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"subPriority",1),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Ga(_a,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){var i=Xa(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=cl[s]:e>=1&&e<=hl[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),dl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"subpriority",1),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Ga(xa,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return Xa(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 pl(t,e,i){var s,r,o,n,a,l,h,c;ln(2,arguments);var u=wn(),d=dn(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.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=cn(t),m=dn(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 ml=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return pa(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),fl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return pa(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 Ha(Ya(e.length,t),r);case"eo":return Ha(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),vl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return pa(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 Ha(Ya(e.length,t),r);case"co":return Ha(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),gl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ya(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Ha(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 Ha(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ha(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ha(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){ln(2,arguments);var i=dn(e);i%7==0&&(i-=7);var s=1,r=cn(t),o=r.getUTCDay(),n=((i%7+7)%7<s?7:0)+i-o;return r.setUTCDate(r.getUTCDate()+n),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),bl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),yl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),wl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["a","b","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),_l=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["H","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Ga(Sa,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),xl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Ga(Ca,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),kl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["h","H","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Ga(Ea,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),Cl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Ga(Aa,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),Al=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",60),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Ga(Ta,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ya(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}(),El=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",50),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Ga(Da,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ya(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}(),Sl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",30),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Ha(Ya(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}(),Tl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"incompatibleTokens",["t","T","x"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Ua(La,t);case"XX":return Ua(Va,t);case"XXXX":return Ua(Ra,t);case"XXXXX":return Ua($a,t);case"XXX":default:return Ua(qa,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Dl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"incompatibleTokens",["t","T","X"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Ua(La,t);case"xx":return Ua(Va,t);case"xxxx":return Ua(Ra,t);case"xxxxx":return Ua($a,t);case"xxx":default:return Ua(qa,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ml=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",40),ma(ra(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),zl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",20),ma(ra(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Il={G:new ya,y:new Za,Y:new tl,R:new el,u:new il,Q:new sl,q:new rl,M:new ol,L:new nl,w:new al,I:new ll,d:new ul,D:new dl,E:new ml,e:new fl,c:new vl,i:new gl,a:new bl,b:new yl,B:new wl,h:new _l,H:new xl,K:new kl,k:new Cl,m:new Al,s:new El,S:new Sl,X:new Tl,x:new Dl,t:new Ml,T:new zl},Pl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ol=/^'([^]*?)'?$/,Nl=/''/g,Bl=/\S/,jl=/[a-zA-Z]/;function Ll(t,e,i,s){var r,o,n,a,l,h,c,u,d,p,m,f,v,g,b,y,w,_;ln(3,arguments);var x=String(t),k=String(e),C=wn(),A=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:Yn;if(!A.match)throw new RangeError("locale must contain match property");var E=dn(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(c=s.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l: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!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=dn(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?cn(i):new Date(NaN);var T,D={firstWeekContainsDate:E,weekStartsOn:S,locale:A},M=[new ga],z=k.match(Fl).map((function(t){var e=t[0];return e in In?(0,In[e])(t,A.formatLong):t})).join("").match(Pl),I=[],P=ia(z);try{var F=function(){var e=T.value;null!=s&&s.useAdditionalWeekYearTokens||!Bn(e)||jn(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!Nn(e)||jn(e,k,t);var i=e[0],r=Il[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=I.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var a=r.run(x,e,A.match,D);if(!a)return{v:new Date(NaN)};M.push(a.setter),x=a.rest}else{if(i.match(jl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Vl(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(T=P.n()).done;){var O=F();if("object"===an(O))return O.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&Bl.test(x))return new Date(NaN);var N=M.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 M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),B=cn(i);if(isNaN(B.getTime()))return new Date(NaN);var j,L=mn(B,Pn(B)),V={},R=ia(N);try{for(R.s();!(j=R.n()).done;){var q=j.value;if(!q.validate(L,D))return new Date(NaN);var $=q.set(L,V,D);Array.isArray($)?(L=$[0],sa(V,$[1])):L=$}}catch(t){R.e(t)}finally{R.f()}return L}function Vl(t){return t.match(Ol)[1].replace(Nl,"'")}function Rl(t,e){ln(2,arguments);var i=cn(t),s=cn(e);return i.getTime()>s.getTime()}function ql(t,e){ln(2,arguments);var i=cn(t),s=cn(e);return i.getTime()<s.getTime()}const $l=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,o,n,a,l,h,c,u,d,p,m,f,v,g,b,y,w;ln(2,arguments);var _=String(e),x=wn(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:Yn,C=dn(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=dn(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=cn(t);if(!un(E))throw new RangeError("Invalid time value");var S=Pn(E),T=mn(E,S),D={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return _.match(Jn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,In[e])(t,k.formatLong):t})).join("").match(Qn).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return ta(s);var o=En[r];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!Bn(s)||jn(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!Nn(s)||jn(s,e,String(t)),o(T,s,k.localize,D);if(r.match(Zn))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=Ll(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=Ll((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ll((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=Ll(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!ql(this.valueAsDate,this.minDate)&&!Rl(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return ql(this.valueAsDate,this.minDate)||Rl(this.valueAsDate,this.maxDate)?n("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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"]}}};$l.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.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:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__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.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 n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("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 n(`${t}`,this.language)?n(`${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"]}}};Hl.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Gl=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.translationUrl="",this.emitOnClick=!1,this.handleClick=()=>{this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}}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])o[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}`,onClick:this.handleClick},this.renderInput())}};Gl.style=":host{display:block;height:100%}";const Ul={en:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",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.",successMessage:"Register successful"},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_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",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.",successMessage:"Sikeres regisztráció"},hr:{nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",GmErr_BadRequest_Duplicate_User:"Korisnik s ovim podacima već postoji.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"Korisnik je NAV isključen. Registracija je odbijena.",GmErr_BadRequest_ModelValidationFailed:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_BadInternalConfigs:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_Unauthorized:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_NotFound:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_UnexpectedException:"Nešto nije u redu... Molimo pokušajte ponovo",generalError:"Nešto nije u redu... Molimo pokušajte ponovo",successMessage:"Register successful"},"pt-br":{nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",GmErr_BadRequest_Duplicate_User:"Já existe um usuário com esta informação",GmErr_Forbidden_UserAccount_NavExcluded:"O usuário está excluído NAV. O registro foi negado",GmErr_BadRequest_ModelValidationFailed:"Alguma coisa deu errado. Por favor tente outra vez.",GmErr_BadInternalConfigs:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_Unauthorized:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_NotFound:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_UnexpectedException:"Alguma coisa deu errado. Por favor tente outra vez",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",GmErr_BadRequest_Duplicate_User:"Un usuario con esta información ya existe",GmErr_Forbidden_UserAccount_NavExcluded:"Usuario es Excluído NA. Registro fue negado",GmErr_BadRequest_ModelValidationFailed:"Algo salió mal…por favor intente de nuevo.",GmErr_BadInternalConfigs:"Algo salió mal... Por favor intente de nuevo",GmErr_Unauthorized:"Algo salió mal... Por favor intente de nuevo",GmErr_NotFound:"Algo salió mal... Por favor intente de nuevo",GmErr_UnexpectedException:"Algo salió mal... Por favor intente de nuevo",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"}},Wl=(t,e,i)=>{let s=Ul[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},Yl=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.btag=null,this.emitOnClick=!1,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.extraActions=[],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)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}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"})}dispatchRegisterCredentialsEvent(){this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:this.registrationStepsState.Step1.registerUserData.Email.value,userPassword:this.registrationStepsState.Step1.registerUserData.Password.value}}),window.dispatchEvent(this.registerCredentialsEvent)}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?Wl(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Wl(`${this.errorCode}`,this.language)||Wl("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),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:Wl(`${this.errorCode}`,this.language)||Wl("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:Wl("successMessage",this.language)}},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.btag&&this.addBtagValue(),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])Ul[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:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){Ul[this.language][t.name]&&Object.keys(Ul[this.language][t.name]).forEach((e=>{t[e]=Ul[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,emitOnClick:this.emitOnClick}))),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},Wl(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)},Wl("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"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};Yl.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: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\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-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\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: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\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 Ql=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 n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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"]}}};Ql.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-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:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3166
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Zs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new rr(this.inputElement,this._labelController)),this._tooltipController=new hs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),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.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function an(t){return(an="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 ln(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function hn(t){return ln(1,arguments),t instanceof Date||"object"===an(t)&&"[object Date]"===Object.prototype.toString.call(t)}function cn(t){ln(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===an(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 un(t){if(ln(1,arguments),!hn(t)&&"number"!=typeof t)return!1;var e=cn(t);return!isNaN(Number(e))}function dn(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 pn(t,e){ln(2,arguments);var i=cn(t).getTime(),s=dn(e);return new Date(i+s)}function mn(t,e){ln(2,arguments);var i=dn(e);return pn(t,-i)}function fn(t){ln(1,arguments);var e=1,i=cn(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 vn(t){ln(1,arguments);var e=cn(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=fn(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=fn(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function gn(t){ln(1,arguments);var e=vn(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=fn(i);return s}function bn(t){ln(1,arguments);var e=cn(t),i=fn(e).getTime()-gn(e).getTime();return Math.round(i/6048e5)+1}l(nn);var yn={};function wn(){return yn}function _n(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=wn(),u=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=cn(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 xn(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=cn(t),u=c.getUTCFullYear(),d=wn(),p=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.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=_n(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var g=_n(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function kn(t,e){var i,s,r,o,n,a,l,h;ln(1,arguments);var c=wn(),u=dn(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=xn(t,e),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var m=_n(p,e);return m}function Cn(t,e){ln(1,arguments);var i=cn(t),s=_n(i,e).getTime()-kn(i,e).getTime();return Math.round(s/6048e5)+1}function An(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var En={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 An("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=xn(t,s),o=r>0?r:1-r;return"YY"===e?An(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):An(o,e.length)},R:function(t,e){return An(vn(t),e.length)},u:function(t,e){return An(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 An(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 An(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):An(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 An(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=Cn(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):An(r,e.length)},I:function(t,e,i){var s=bn(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):An(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return An(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){ln(1,arguments);var e=cn(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"}):An(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(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return An(o,2);case"eo":return i.ordinalNumber(o,{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(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return An(o,e.length);case"co":return i.ordinalNumber(o,{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 An(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 An(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 An(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):An(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):An(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return An(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return An(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return An(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 Tn(r);case"XXXX":case"XX":return Dn(r);case"XXXXX":case"XXX":default:return Dn(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return Tn(r);case"xxxx":case"xx":return Dn(r);case"xxxxx":case"xxx":default:return Dn(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Sn(r,":");case"OOOO":default:return"GMT"+Dn(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Sn(r,":");case"zzzz":default:return"GMT"+Dn(r,":")}},t:function(t,e,i,s){return An(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return An((s._originalDate||t).getTime(),e.length)}};function Sn(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+An(o,2)}function Tn(t,e){return t%60==0?(t>0?"-":"+")+An(Math.abs(t)/60,2):Dn(t,e)}function Dn(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+An(Math.floor(r/60),2)+i+An(r%60,2)}var Mn=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"})}},zn=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"})}},In={p:zn,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return Mn(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}}",Mn(r,e)).replace("{{time}}",zn(o,e))}};function Pn(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 Fn=["D","DD"],On=["YY","YYYY"];function Nn(t){return-1!==Fn.indexOf(t)}function Bn(t){return-1!==On.indexOf(t)}function jn(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 Ln={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 Vn(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 Rn={date:Vn({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vn({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:Vn({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function $n(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,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Hn(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],o=e.match(r);if(!o)return null;var n,a=o[0],l=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(l)?Un(l,(function(t){return t.test(a)})):Gn(l,(function(t){return t.test(a)}));n=t.valueCallback?t.valueCallback(h):h,n=i.valueCallback?i.valueCallback(n):n;var c=e.slice(a.length);return{value:n,rest:c}}}function Gn(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Un(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var Wn,Yn={code:"en-US",formatDistance:function(t,e,i){var s,r=Ln[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:Rn,formatRelative:function(t){return qn[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:$n({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:$n({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:$n({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:$n({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:$n({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:(Wn={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(Wn.matchPattern);if(!i)return null;var s=i[0],r=t.match(Wn.parsePattern);if(!r)return null;var o=Wn.valueCallback?Wn.valueCallback(r[0]):r[0];o=e.valueCallback?e.valueCallback(o):o;var n=t.slice(s.length);return{value:o,rest:n}}),era:Hn({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:Hn({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:Hn({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:Hn({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:Hn({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}},Qn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kn=/^'([^]*?)'?$/,Xn=/''/g,Zn=/[a-zA-Z]/;function ta(t){var e=t.match(Kn);return e?e[1].replace(Xn,"'"):t}function ea(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 ia(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 ea(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)?ea(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 o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function sa(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 ra(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oa(t,e){return(oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function na(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&&oa(t,e)}function aa(t){return(aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function la(t,e){if(e&&("object"===an(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ra(t)}function ha(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=aa(t);if(e){var r=aa(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return la(this,i)}}function ca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ua(t){var e=function(t,e){if("object"!==an(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==an(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===an(e)?e:String(e)}function da(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,ua(s.key),s)}}function pa(t,e,i){return e&&da(t.prototype,e),i&&da(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ma(t,e,i){return(e=ua(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var fa=function(){function t(){ca(this,t),ma(this,"priority",void 0),ma(this,"subPriority",0)}return pa(t,[{key:"validate",value:function(){return!0}}]),t}(),va=function(){na(e,fa);var t=ha(e);function e(i,s,r,o,n){var a;return ca(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return pa(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}(),ga=function(){na(e,fa);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"subPriority",-1),i}return pa(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}(),ba=function(){function t(){ca(this,t),ma(this,"incompatibleTokens",void 0),ma(this,"priority",void 0),ma(this,"subPriority",void 0)}return pa(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new va(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),ya=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",140),ma(ra(i),"incompatibleTokens",["R","u","t","T"]),i}return pa(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}(),wa=/^(1[0-2]|0?\d)/,_a=/^(3[0-1]|[0-2]?\d)/,xa=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,ka=/^(5[0-3]|[0-4]?\d)/,Ca=/^(2[0-3]|[0-1]?\d)/,Aa=/^(2[0-4]|[0-1]?\d)/,Ea=/^(1[0-1]|0?\d)/,Sa=/^(1[0-2]|0?\d)/,Ta=/^[0-5]?\d/,Da=/^[0-5]?\d/,Ma=/^\d/,za=/^\d{1,2}/,Ia=/^\d{1,3}/,Pa=/^\d{1,4}/,Fa=/^-?\d+/,Oa=/^-?\d/,Na=/^-?\d{1,2}/,Ba=/^-?\d{1,3}/,ja=/^-?\d{1,4}/,La=/^([+-])(\d{2})(\d{2})?|Z/,Va=/^([+-])(\d{2})(\d{2})|Z/,Ra=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,qa=/^([+-])(\d{2}):(\d{2})|Z/,$a=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ha(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Ga(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Ua(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 Wa(t){return Ga(Fa,t)}function Ya(t,e){switch(t){case 1:return Ga(Ma,e);case 2:return Ga(za,e);case 3:return Ga(Ia,e);case 4:return Ga(Pa,e);default:return Ga(new RegExp("^\\d{1,"+t+"}"),e)}}function Qa(t,e){switch(t){case 1:return Ga(Oa,e);case 2:return Ga(Na,e);case 3:return Ga(Ba,e);case 4:return Ga(ja,e);default:return Ga(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ja(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 Ka(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Xa(t){return t%400==0||t%4==0&&t%100!=0}var Za=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Ha(Ya(4,t),s);case"yo":return Ha(i.ordinalNumber(t,{unit:"year"}),s);default:return Ha(Ya(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=Ka(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}(),tl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Ha(Ya(4,t),s);case"Yo":return Ha(i.ordinalNumber(t,{unit:"year"}),s);default:return Ha(Ya(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=xn(t,s);if(i.isTwoDigitYear){var o=Ka(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_n(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),_n(t,s)}}]),e}(),el=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Qa("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),fn(s)}}]),e}(),il=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",130),ma(ra(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Qa("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}(),sl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",120),ma(ra(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ya(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}(),rl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",120),ma(ra(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ya(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}(),ol=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ma(ra(i),"priority",110),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Ha(Ga(wa,t),s);case"MM":return Ha(Ya(2,t),s);case"Mo":return Ha(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}(),nl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",110),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Ha(Ga(wa,t),s);case"LL":return Ha(Ya(2,t),s);case"Lo":return Ha(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}(),al=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",100),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Ga(ka,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return _n(function(t,e,i){ln(2,arguments);var s=cn(t),r=dn(e),o=Cn(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),ll=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",100),ma(ra(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Ga(ka,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return fn(function(t,e){ln(2,arguments);var i=cn(t),s=dn(e),r=bn(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),hl=[31,28,31,30,31,30,31,31,30,31,30,31],cl=[31,29,31,30,31,30,31,31,30,31,30,31],ul=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"subPriority",1),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Ga(_a,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){var i=Xa(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=cl[s]:e>=1&&e<=hl[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),dl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"subpriority",1),ma(ra(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Ga(xa,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return Xa(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 pl(t,e,i){var s,r,o,n,a,l,h,c;ln(2,arguments);var u=wn(),d=dn(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.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=cn(t),m=dn(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 ml=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return pa(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),fl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return pa(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 Ha(Ya(e.length,t),r);case"eo":return Ha(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),vl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return pa(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 Ha(Ya(e.length,t),r);case"co":return Ha(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=pl(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),gl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",90),ma(ra(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ya(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Ha(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 Ha(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ha(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ha(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){ln(2,arguments);var i=dn(e);i%7==0&&(i-=7);var s=1,r=cn(t),o=r.getUTCDay(),n=((i%7+7)%7<s?7:0)+i-o;return r.setUTCDate(r.getUTCDate()+n),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),bl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),yl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),wl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",80),ma(ra(i),"incompatibleTokens",["a","b","t","T"]),i}return pa(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(Ja(i),0,0,0),t}}]),e}(),_l=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["H","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Ga(Sa,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),xl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Ga(Ca,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),kl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["h","H","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Ga(Ea,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),Cl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",70),ma(ra(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Ga(Aa,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),Al=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",60),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Ga(Ta,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ya(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}(),El=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",50),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Ga(Da,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ya(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}(),Sl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",30),ma(ra(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Ha(Ya(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}(),Tl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"incompatibleTokens",["t","T","x"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Ua(La,t);case"XX":return Ua(Va,t);case"XXXX":return Ua(Ra,t);case"XXXXX":return Ua($a,t);case"XXX":default:return Ua(qa,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Dl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",10),ma(ra(i),"incompatibleTokens",["t","T","X"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Ua(La,t);case"xx":return Ua(Va,t);case"xxxx":return Ua(Ra,t);case"xxxxx":return Ua($a,t);case"xxx":default:return Ua(qa,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ml=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",40),ma(ra(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),zl=function(){na(e,ba);var t=ha(e);function e(){var i;ca(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return ma(ra(i=t.call.apply(t,[this].concat(r))),"priority",20),ma(ra(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Il={G:new ya,y:new Za,Y:new tl,R:new el,u:new il,Q:new sl,q:new rl,M:new ol,L:new nl,w:new al,I:new ll,d:new ul,D:new dl,E:new ml,e:new fl,c:new vl,i:new gl,a:new bl,b:new yl,B:new wl,h:new _l,H:new xl,K:new kl,k:new Cl,m:new Al,s:new El,S:new Sl,X:new Tl,x:new Dl,t:new Ml,T:new zl},Pl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ol=/^'([^]*?)'?$/,Nl=/''/g,Bl=/\S/,jl=/[a-zA-Z]/;function Ll(t,e,i,s){var r,o,n,a,l,h,c,u,d,p,m,f,v,g,b,y,w,_;ln(3,arguments);var x=String(t),k=String(e),C=wn(),A=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:Yn;if(!A.match)throw new RangeError("locale must contain match property");var E=dn(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(c=s.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l: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!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=dn(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?cn(i):new Date(NaN);var T,D={firstWeekContainsDate:E,weekStartsOn:S,locale:A},M=[new ga],z=k.match(Fl).map((function(t){var e=t[0];return e in In?(0,In[e])(t,A.formatLong):t})).join("").match(Pl),I=[],P=ia(z);try{var F=function(){var e=T.value;null!=s&&s.useAdditionalWeekYearTokens||!Bn(e)||jn(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!Nn(e)||jn(e,k,t);var i=e[0],r=Il[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=I.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var a=r.run(x,e,A.match,D);if(!a)return{v:new Date(NaN)};M.push(a.setter),x=a.rest}else{if(i.match(jl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Vl(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(T=P.n()).done;){var O=F();if("object"===an(O))return O.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&Bl.test(x))return new Date(NaN);var N=M.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 M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),B=cn(i);if(isNaN(B.getTime()))return new Date(NaN);var j,L=mn(B,Pn(B)),V={},R=ia(N);try{for(R.s();!(j=R.n()).done;){var q=j.value;if(!q.validate(L,D))return new Date(NaN);var $=q.set(L,V,D);Array.isArray($)?(L=$[0],sa(V,$[1])):L=$}}catch(t){R.e(t)}finally{R.f()}return L}function Vl(t){return t.match(Ol)[1].replace(Nl,"'")}function Rl(t,e){ln(2,arguments);var i=cn(t),s=cn(e);return i.getTime()>s.getTime()}function ql(t,e){ln(2,arguments);var i=cn(t),s=cn(e);return i.getTime()<s.getTime()}const $l=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,o,n,a,l,h,c,u,d,p,m,f,v,g,b,y,w;ln(2,arguments);var _=String(e),x=wn(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:Yn,C=dn(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=dn(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=cn(t);if(!un(E))throw new RangeError("Invalid time value");var S=Pn(E),T=mn(E,S),D={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return _.match(Jn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,In[e])(t,k.formatLong):t})).join("").match(Qn).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return ta(s);var o=En[r];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!Bn(s)||jn(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!Nn(s)||jn(s,e,String(t)),o(T,s,k.localize,D);if(r.match(Zn))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=Ll(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=Ll((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ll((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=Ll(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!ql(this.valueAsDate,this.minDate)&&!Rl(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return ql(this.valueAsDate,this.minDate)||Rl(this.valueAsDate,this.maxDate)?n("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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"]}}};$l.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.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:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__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.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 n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("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 n(`${t}`,this.language)?n(`${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"]}}};Hl.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Gl=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.translationUrl="",this.emitOnClick=!1,this.handleClick=()=>{this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}}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])o[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}`,onClick:this.handleClick},this.renderInput())}};Gl.style=":host{display:block;height:100%}";const Ul={en:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",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.",successMessage:"Register successful"},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_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",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.",successMessage:"Sikeres regisztráció"},hr:{nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",GmErr_BadRequest_Duplicate_User:"Korisnik s ovim podacima već postoji.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"Korisnik je NAV isključen. Registracija je odbijena.",GmErr_BadRequest_ModelValidationFailed:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_BadInternalConfigs:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_Unauthorized:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_NotFound:"Nešto nije u redu... Molimo pokušajte ponovo",GmErr_UnexpectedException:"Nešto nije u redu... Molimo pokušajte ponovo",generalError:"Nešto nije u redu... Molimo pokušajte ponovo",successMessage:"Register successful"},"pt-br":{nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",GmErr_BadRequest_Duplicate_User:"Já existe um usuário com esta informação",GmErr_Forbidden_UserAccount_NavExcluded:"O usuário está excluído NAV. O registro foi negado",GmErr_BadRequest_ModelValidationFailed:"Alguma coisa deu errado. Por favor tente outra vez.",GmErr_BadInternalConfigs:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_Unauthorized:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_NotFound:"Alguma coisa deu errado. Por favor tente outra vez",GmErr_UnexpectedException:"Alguma coisa deu errado. Por favor tente outra vez",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",GmErr_BadRequest_Duplicate_User:"Un usuario con esta información ya existe",GmErr_Forbidden_UserAccount_NavExcluded:"Usuario es Excluído NA. Registro fue negado",GmErr_BadRequest_ModelValidationFailed:"Algo salió mal…por favor intente de nuevo.",GmErr_BadInternalConfigs:"Algo salió mal... Por favor intente de nuevo",GmErr_Unauthorized:"Algo salió mal... Por favor intente de nuevo",GmErr_NotFound:"Algo salió mal... Por favor intente de nuevo",GmErr_UnexpectedException:"Algo salió mal... Por favor intente de nuevo",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"}},Wl=(t,e,i)=>{let s=Ul[Ul[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},Yl=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.btag=null,this.emitOnClick=!1,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.extraActions=[],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)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}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"})}dispatchRegisterCredentialsEvent(){this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:this.registrationStepsState.Step1.registerUserData.Email.value,userPassword:this.registrationStepsState.Step1.registerUserData.Password.value}}),window.dispatchEvent(this.registerCredentialsEvent)}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?Wl(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Wl(`${this.errorCode}`,this.language)||Wl("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),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:Wl(`${this.errorCode}`,this.language)||Wl("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:Wl("successMessage",this.language)}},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.btag&&this.addBtagValue(),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])Ul[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:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){Ul[Ul[this.language]?this.language:"en"][t.name]&&Object.keys(Ul[this.language][t.name]).forEach((e=>{t[e]=Ul[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,emitOnClick:this.emitOnClick}))),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},Wl(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)},Wl("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"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};Yl.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: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\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-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\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: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\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 Ql=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 n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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"]}}};Ql.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.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:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-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:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3167
3167
|
/**
|
|
3168
3168
|
* @license
|
|
3169
3169
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -11,6 +11,7 @@ interface Translations {
|
|
|
11
11
|
'pt-br': Translation;
|
|
12
12
|
'es-mx': Translation;
|
|
13
13
|
}
|
|
14
|
+
export declare const DEFAULT_LANGUAGE: 'en';
|
|
14
15
|
export declare const TRANSLATIONS: Translations;
|
|
15
16
|
export declare const getTranslations: (url: string) => Promise<unknown>;
|
|
16
17
|
export declare const translate: (key: string, customLang?: any, values?: TranslationValues) => string;
|