diff --git a/build/catalyst.esm.js b/build/catalyst.esm.js index 2a0b66fa..c515714f 100644 --- a/build/catalyst.esm.js +++ b/build/catalyst.esm.js @@ -1,2 +1,2 @@ -import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-f4ed5946",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],size:[1],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); +import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-93f91f74",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); //# sourceMappingURL=catalyst.esm.js.map \ No newline at end of file diff --git a/build/catalyst.esm.js.map b/build/catalyst.esm.js.map index e5812817..3d6b0d8c 100644 --- a/build/catalyst.esm.js.map +++ b/build/catalyst.esm.js.map @@ -1 +1 @@ -{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","requiredMarker","horizontal","autoComplete","clearable","disabled","hint","icon","iconRight","identifier","label","labelHidden","max","min","name","placeholder","textPrefix","textSuffix","readonly","required","value","errors","errorUpdate","nativeAttributes","placement","hasSlottedLabel","hasSlottedHint","doFocus","doBlur","clear","step","selectionTime","isAm","select","mode","attachToElement","position","nativePickerAttributes","page","pageCount","activePadding","sidePadding","size","variant","round","compact","iconPrev","iconNext","activeTab","tabsAlign","tabs","setActive","setActiveIndex","color","noIcon","maxLength","minLength","rows","errorMap","pulse","a11yLabel","labelSize","checked","labelLeft","iconOnly","urlTarget","deactivated","error","noValue","resolvedValue","content","showDelay","hideDelay","longTouchDuration","open","multiple","debounce","tags","tagHint","noItems","connector","state","connect","noClear","noToday","weeks","range","viewDate","resetView","initials","src","backgroundImage","indeterminate","noShadowX","noShadowY","noOverflowX","noOverflowY","noOverscroll","noScrolledInit","scrolledBuffer","effect","lines","togglePassword","type","isPasswordShown","mask","noAutoClose","arrowNavigation","noResize","overflow","noInitialFocus","toggle","close","active","loading","submit","noEllipsis","buttonId","a11yCurrent","nativeContentAttributes","buttonGroupPosition","_iconOnly","doClick","iconSrc"],"sources":["../node_modules/.pnpm/@stencil+core@4.12.6/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.12.6 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\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,IAAA,IAAA2C,UAAA,iBAAA1C,KAAA,IAAAC,YAAA,IAAAC,WAAA,kBAAAC,WAAA,kBAAAC,SAAA,IAAAC,SAAA,IAAAyB,MAAA,IAAA2D,KAAA,IAAAnF,MAAA,OAAAC,OAAA,IAAAC,YAAA,mBAAAC,iBAAA,KAAAE,gBAAA,KAAAC,eAAA,KAAA8E,gBAAA,KAAA9C,SAAA,KAAA/B,QAAA,KAAAC,OAAA,KAAAC,MAAA,KAAA4E,KAAA,YAAApF,OAAA,yCAAAG,UAAA,IAAAkF,YAAA,oBAAAC,gBAAA,uBAAAC,SAAA,gBAAAC,SAAA,IAAAC,eAAA,uBAAAC,OAAA,KAAArC,KAAA,KAAAsC,MAAA,wDAAArE,QAAA,IAAAU,MAAA,IAAA4D,OAAA,IAAAvE,KAAA,IAAA5B,KAAA,IAAAM,MAAA,IAAAf,SAAA,IAAA6G,QAAA,IAAAC,OAAA,IAAAC,WAAA,kBAAAxE,MAAA,IAAAtD,IAAA,IAAA2E,UAAA,iBAAA1D,KAAA,IAAAyD,SAAA,gBAAAxD,UAAA,iBAAA6G,SAAA,gBAAAzD,UAAA,iBAAA0D,YAAA,mBAAA/F,iBAAA,KAAAgG,wBAAA,KAAAC,oBAAA,4BAAAC,UAAA,KAAA9F,QAAA,KAAAC,OAAA,KAAA8F,QAAA,0CAAA1D,SAAA,0CAAAtB,KAAA,IAAAkB,UAAA,kCAAArD,KAAA,IAAAoH,QAAA,eAAAjF,KAAA,IAAAkB,UAAA,sBAAA9D,EAAA"} \ No newline at end of file +{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","requiredMarker","horizontal","autoComplete","clearable","disabled","hint","icon","iconRight","identifier","label","labelHidden","max","min","name","placeholder","textPrefix","textSuffix","readonly","required","value","errors","errorUpdate","nativeAttributes","placement","hasSlottedLabel","hasSlottedHint","doFocus","doBlur","clear","step","selectionTime","isAm","select","mode","attachToElement","position","nativePickerAttributes","page","pageCount","activePadding","sidePadding","size","variant","round","compact","iconPrev","iconNext","activeTab","tabsAlign","tabs","setActive","setActiveIndex","color","noIcon","maxLength","minLength","rows","errorMap","pulse","a11yLabel","labelSize","checked","labelLeft","iconOnly","urlTarget","deactivated","error","noValue","resolvedValue","content","showDelay","hideDelay","longTouchDuration","open","multiple","debounce","tags","tagHint","noItems","connector","state","connect","noClear","noToday","weeks","range","viewDate","resetView","initials","src","backgroundImage","indeterminate","noShadowX","noShadowY","noOverflowX","noOverflowY","noOverscroll","noScrolledInit","scrolledBuffer","effect","lines","togglePassword","type","isPasswordShown","mask","noAutoClose","arrowNavigation","noResize","overflow","noInitialFocus","toggle","close","active","loading","submit","noEllipsis","buttonId","a11yCurrent","nativeContentAttributes","buttonGroupPosition","_iconOnly","doClick","iconSrc"],"sources":["../node_modules/.pnpm/@stencil+core@4.12.6/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.12.6 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,sCAAsC,CAAC,cAAAC,eAAA,sBAAAC,WAAA,IAAAC,aAAA,oBAAAC,UAAA,IAAAC,SAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,UAAA,iBAAAC,WAAA,IAAAC,MAAA,IAAAC,YAAA,mBAAAC,IAAA,IAAAC,IAAA,IAAAC,KAAA,IAAAC,YAAA,IAAAC,WAAA,kBAAAC,WAAA,kBAAAC,SAAA,IAAAC,SAAA,IAAAC,MAAA,OAAAC,OAAA,IAAAC,YAAA,mBAAAC,iBAAA,KAAAC,UAAA,IAAAC,gBAAA,KAAAC,eAAA,KAAAC,QAAA,K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AAA,gBAAAzD,UAAA,iBAAA0D,YAAA,mBAAA/F,iBAAA,KAAAgG,wBAAA,KAAAC,oBAAA,4BAAAC,UAAA,KAAA9F,QAAA,KAAAC,OAAA,KAAA8F,QAAA,0CAAA1D,SAAA,0CAAAtB,KAAA,IAAAkB,UAAA,kCAAArD,KAAA,IAAAoH,QAAA,eAAAjF,KAAA,IAAAkB,UAAA,sBAAA9D,EAAA"} \ No newline at end of file diff --git a/build/p-62c724f1.js b/build/p-5848e451.js similarity index 68% rename from build/p-62c724f1.js rename to build/p-5848e451.js index 2a0b66fa..c515714f 100644 --- a/build/p-62c724f1.js +++ b/build/p-5848e451.js @@ -1,2 +1,2 @@ -import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-f4ed5946",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],size:[1],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); +import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-93f91f74",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); //# sourceMappingURL=catalyst.esm.js.map \ No newline at end of file diff --git a/build/p-f4ed5946.entry.js b/build/p-93f91f74.entry.js similarity index 58% rename from build/p-f4ed5946.entry.js rename to build/p-93f91f74.entry.js index 6b37430d..9076a16d 100644 --- a/build/p-f4ed5946.entry.js +++ b/build/p-93f91f74.entry.js @@ -1,4 +1,4 @@ -import{r as t,h as e,H as i,g as a,c as r}from"./p-20919029.js";import{e as n,O as o,f as s,E as c,S as l,g as d,h,i as f,j as u,k as p,l as b,m,n as g,p as v,q as y,r as k,s as x,t as w,u as z,a as D,c as I,d as M,o as R}from"./p-2c8ac8cf.js";const C=n((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class A extends o{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new S(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new C}}next(t){s((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){s((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){s((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:a}=this;if(e||i){return c}this.currentObservers=null;a.push(t);return new l((()=>{this.currentObservers=null;d(a,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:a}=this;if(e){t.error(i)}else if(a){t.complete()}}asObservable(){const t=new o;t.source=this;return t}}A.create=(t,e)=>new S(t,e);class S extends A{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0?void 0:i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0?void 0:i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:c}}const T={now(){return(T.delegate||Date).now()},delegate:undefined};class F extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const B={setInterval(t,e,...i){const{delegate:a}=B;if(a===null||a===void 0?void 0:a.setInterval){return a.setInterval(t,e,...i)}return setInterval(t,e,...i)},clearInterval(t){const{delegate:e}=B;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class $ extends F{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var i;if(this.closed){return this}this.state=t;const a=this.id;const r=this.scheduler;if(a!=null){this.id=this.recycleAsyncId(r,a,e)}this.pending=true;this.delay=e;this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,i=0){return B.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===false){return e}if(e!=null){B.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const i=this._execute(t,e);if(i){return i}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let i=false;let a;try{this.work(t)}catch(t){i=true;a=t?t:new Error("Scheduled action threw falsy error")}if(i){this.unsubscribe();return a}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:i}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(i,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class E{constructor(t,e=E.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}E.now=T.now;class O extends E{constructor(t,e=E.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=true;do{if(i=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(i){while(t=e.shift()){t.unsubscribe()}throw i}}}const N=new O($);const W=N;const L=new o((t=>t.complete()));const j=n((t=>function e(){t(this);this.name="EmptyError";this.message="no elements in sequence"}));function P(t){return t instanceof Date&&!isNaN(t)}function Y(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{a.next(t.call(e,i,r++))})))}))}const{isArray:H}=Array;function U(t,e){return H(e)?t(...e):t(e)}function _(t){return Y((e=>U(t,e)))}function K(t,e,i,a,r,n,o,s){const c=[];let l=0;let d=0;let h=false;const b=()=>{if(h&&!c.length&&!l){e.complete()}};const m=t=>l{n&&e.next(t);l++;let s=false;u(i(t,d++)).subscribe(f(e,(t=>{r===null||r===void 0?void 0:r(t);if(n){m(t)}else{e.next(t)}}),(()=>{s=true}),undefined,(()=>{if(s){try{l--;while(c.length&&lg(t)))}else{g(t)}}b()}catch(t){e.error(t)}}})))};t.subscribe(f(e,m,(()=>{h=true;b()})));return()=>{s===null||s===void 0?void 0:s()}}function V(t,e,i=Infinity){if(b(e)){return V(((i,a)=>Y(((t,r)=>e(i,t,a,r)))(u(t(i,a)))),i)}else if(typeof e==="number"){i=e}return h(((e,a)=>K(e,a,t,i)))}function q(t=Infinity){return V(m,t)}function J(){return q(1)}function G(...t){return J()(g(t,v(t)))}const Z=["addListener","removeListener"];const X=["addEventListener","removeEventListener"];const Q=["on","off"];function tt(t,e,i,a){if(b(i)){a=i;i=undefined}if(a){return tt(t,e,i).pipe(_(a))}const[r,n]=rt(t)?X.map((a=>r=>t[a](e,r,i))):it(t)?Z.map(et(t,e)):at(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,i)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1n(e)}))}function et(t,e){return i=>a=>t[i](e,a)}function it(t){return b(t.addListener)&&b(t.removeListener)}function at(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,i=W){let a=-1;if(e!=null){if(k(e)){i=e}else{a=e}}return new o((e=>{let r=P(t)?+t-i.now():t;if(r<0){r=0}let n=0;return i.schedule((function(){if(!e.closed){e.next(n++);if(0<=a){this.schedule(undefined,a)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const i=x(t,Infinity);const a=t;return!a.length?L:a.length===1?u(a[0]):q(i)(g(a,e))}function st(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>t.call(e,i,r++)&&a.next(i))))}))}function ct(t){return h(((e,i)=>{let a=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}o&&i.complete()};const c=()=>{n=null;o&&i.complete()};e.subscribe(f(i,(e=>{a=true;r=e;if(!n){u(t(e)).subscribe(n=f(i,s,c))}}),(()=>{o=true;(!a||!n||n.closed)&&i.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,i)=>{let a=null;let r=false;let n;a=e.subscribe(f(i,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(a){a.unsubscribe();a=null;n.subscribe(i)}else{r=true}})));if(r){a.unsubscribe();a=null;n.subscribe(i)}}))}function ht(t,e,i,a,r){return(n,o)=>{let s=i;let c=e;let l=0;n.subscribe(f(o,(e=>{const i=l++;c=s?t(c,e,i):(s=true,e);a&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,i)=>{let a=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}};e.subscribe(f(i,(e=>{n===null||n===void 0?void 0:n.unsubscribe();a=true;r=e;n=f(i,o,w);u(t(e)).subscribe(n)}),(()=>{o();i.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>{if(!a){i.next(t)}i.complete()})))}))}function pt(t){return t<=0?()=>L:h(((e,i)=>{let a=0;e.subscribe(f(i,(e=>{if(++a<=t){i.next(e);if(t<=a){i.complete()}}})))}))}function bt(){return h(((t,e)=>{t.subscribe(f(e,w))}))}function mt(t){return Y((()=>t))}function gt(t,e){if(e){return i=>G(e.pipe(pt(1),bt()),i.pipe(gt(t)))}return V(((e,i)=>u(t(e,i)).pipe(pt(1),mt(e))))}function vt(t,e=N){const i=nt(t,e);return gt((()=>i))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((i,a)=>{let r;let n=true;i.subscribe(f(a,(i=>{const o=e(i);if(n||!t(r,o)){n=false;r=o;a.next(i)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>a?i.complete():i.error(t()))))}))}function wt(){return new j}function zt(t,e){const i=arguments.length>=2;return a=>a.pipe(t?st(((e,i)=>t(e,i,a))):m,pt(1),i?ut(e):xt((()=>new j)))}function Dt(t,e){return h(ht(t,e,arguments.length>=2,true))}function It(...t){const e=v(t);return h(((i,a)=>{(e?G(t,i,e):G(t,i)).subscribe(a)}))}function Mt(t,e){return h(((i,a)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&a.complete();i.subscribe(f(a,(i=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(i,c)).subscribe(r=f(a,(t=>a.next(e?e(i,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Rt(t){return h(((e,i)=>{u(t).subscribe(f(i,(()=>i.complete()),w));!i.closed&&e.subscribe(i)}))}function Ct(t,e=false){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{const n=t(i,r++);(n||e)&&a.next(i);!n&&a.complete()})))}))}function At(t,e,i){const a=b(t)||e||i?{next:t,error:e,complete:i}:t;return a?h(((t,e)=>{var i;(i=a.subscribe)===null||i===void 0?void 0:i.call(a);let r=true;t.subscribe(f(e,(t=>{var i;(i=a.next)===null||i===void 0?void 0:i.call(a,t);e.next(t)}),(()=>{var t;r=false;(t=a.complete)===null||t===void 0?void 0:t.call(a);e.complete()}),(t=>{var i;r=false;(i=a.error)===null||i===void 0?void 0:i.call(a,t);e.error(t)}),(()=>{var t,e;if(r){(t=a.unsubscribe)===null||t===void 0?void 0:t.call(a)}(e=a.finalize)===null||e===void 0?void 0:e.call(a)})))})):m}function St(t,e,i){if(!t.hostElement.hasAttribute(e)&&i!=null){t.hostElement.setAttribute(e,String(i))}}const Tt=":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:var(--cat-border-radius-l, 0.5rem)}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.content{align-self:center;width:100%}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=secondary]){background-color:rgb(var(--cat-secondary-bg, 105, 118, 135));color:rgb(var(--cat-secondary-fill, 255, 255, 255));--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=info]){background-color:rgb(var(--cat-info-bg, 0, 115, 230));color:rgb(var(--cat-info-fill, 255, 255, 255));--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=success]){background-color:rgb(var(--cat-success-bg, 0, 132, 88));color:rgb(var(--cat-success-fill, 255, 255, 255));--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=warning]){background-color:rgb(var(--cat-warning-bg, 255, 206, 128));color:rgb(var(--cat-warning-fill, 0, 0, 0));--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}:host([color=danger]){background-color:rgb(var(--cat-danger-bg, 217, 52, 13));color:rgb(var(--cat-danger-fill, 255, 255, 255));--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}";const Ft=Tt;const Bt=class{constructor(e){t(this,e);this.mapIcon=new Map([["primary","$cat:alert-primary"],["secondary","$cat:alert-secondary"],["info","$cat:alert-info"],["success","$cat:alert-success"],["warning","$cat:alert-warning"],["danger","$cat:alert-danger"]]);this.mapRole=new Map([["primary","status"],["secondary","status"],["info","status"],["success","status"],["warning","alert"],["danger","alert"]]);this.color="primary";this.icon=undefined;this.noIcon=false}connectedCallback(){St(this,"tabindex",0);St(this,"role",this.mapRole.get(this.color))}render(){return e(i,{key:"65e08f5679d761056c71407b03b0b22fb5aa5c94"},!this.noIcon&&e("cat-icon",{size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"b85309b1867b896244a0cda0ababb2e66ca2d01a",class:"content"},e("slot",{key:"ed88e2f275b189f5ae75ba3220b6f30be36699b4"})))}get hostElement(){return a(this)}};Bt.style=Ft;const $t=t=>new Promise(((e,i)=>{const a=new Image;a.addEventListener("load",e);a.addEventListener("error",i);a.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:inherit;color:var(--cat-avatar-fill, #515c6c);background-color:var(--cat-avatar-bg, #f2f4f7);background-size:cover;background-position:center;white-space:nowrap;overflow:hidden;vertical-align:middle;font-weight:600;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.avatar:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.avatar-round{border-radius:50%}.avatar-xs{width:var(--cat-avatar-size, 1.5rem);height:var(--cat-avatar-size, 1.5rem);line-height:var(--cat-avatar-size, 1.5rem);font-size:var(--cat-avatar-font-size, 0.75rem)}.avatar-s{width:var(--cat-avatar-size, 2rem);height:var(--cat-avatar-size, 2rem);line-height:var(--cat-avatar-size, 2rem);font-size:var(--cat-avatar-font-size, 0.875rem)}.avatar-m{width:var(--cat-avatar-size, 2.5rem);height:var(--cat-avatar-size, 2.5rem);line-height:var(--cat-avatar-size, 2.5rem);font-size:var(--cat-avatar-font-size, 0.9375rem)}.avatar-l{width:var(--cat-avatar-size, 3rem);height:var(--cat-avatar-size, 3rem);line-height:var(--cat-avatar-size, 3rem);font-size:var(--cat-avatar-font-size, 1.125rem)}.avatar-xl{width:var(--cat-avatar-size, 3.5rem);height:var(--cat-avatar-size, 3.5rem);line-height:var(--cat-avatar-size, 3.5rem);font-size:var(--cat-avatar-font-size, 1.25rem)}";const Ot=Et;const Nt=class{constructor(e){t(this,e);this.backgroundImage=undefined;this.size="m";this.round=false;this.label="";this.initials=undefined;this.src=undefined;this.icon=undefined;this.url=undefined;this.urlTarget=undefined}onSrcChanged(t){if(t){$t(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}componentWillRender(){if(!this.label){z.warn("[A11y] Missing ARIA label on avatar",this)}}render(){if(this.url){return e("a",{href:this.url,target:this.urlTarget,style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}else{return e("span",{style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}}get content(){return!this.backgroundImage?[this.icon?e("cat-icon",{icon:this.icon,size:this.size}):this.getInitials()]:[]}get cssStyle(){return{"background-image":this.backgroundImage}}get cssClass(){return{avatar:true,"avatar-round":this.round,[`avatar-${this.size}`]:Boolean(this.size)}}getInitials(){return this.initials??(this.label??"").split(" ").map((t=>t[0])).join("")}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Wt=":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";const Lt=Wt;const jt=class{constructor(e){t(this,e);this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false}render(){return e("slot",{key:"8254c840d9f008183db57fc58dd3a092c7a0378c"})}get hostElement(){return a(this)}};jt.style=Lt;const Pt=["xs","s","m","l","xl"];const Yt={xs:"(max-width: 539.98px)",s:"(max-width: 767.98px)",m:"(max-width: 991.98px)",l:"(max-width: 1199.98px)",xl:"(max-width: 1399.98px)"};function Ht(t){return typeof t==="string"&&Pt.includes(t)}let Ut;try{Ut=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Ut=false}class _t{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Ut)&&typeof CSS!=="undefined"&&!this.EDGE&&!this.TRIDENT;this.WEBKIT=/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;this.IOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);this.FIREFOX=/(firefox|minefield)/i.test(navigator.userAgent);this.ANDROID=/android/i.test(navigator.userAgent)&&!this.TRIDENT;this.SAFARI=/safari/i.test(navigator.userAgent)&&this.WEBKIT}}const Kt=new Set;let Vt;class qt{constructor(){this._platform=new _t;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Jt(t)}return this._matchMedia(t)}}function Jt(t){if(Kt.has(t)){return}try{if(!Vt){Vt=document.createElement("style");Vt.setAttribute("type","text/css");document.head.appendChild(Vt)}if(Vt.sheet){Vt.sheet.insertRule(`@media ${t} {body{ }}`,0);Kt.add(t)}}catch(t){z.error(t)}}const Gt=':host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/"";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}';const Zt=Gt;const Xt=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._iconOnly=true;this.variant="outlined";this.color="secondary";this.active=false;this.size="m";this.name=undefined;this.value=undefined;this.disabled=false;this.loading=false;this.submit=false;this.noEllipsis=false;this.round=false;this.url=undefined;this.urlTarget=undefined;this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.buttonId=undefined;this.a11yLabel=undefined;this.a11yCurrent=undefined;this.nativeAttributes=undefined;this.nativeContentAttributes=undefined;this.buttonGroupPosition=undefined}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(Ht(t)){this.mediaMatcher??(this.mediaMatcher=new qt);this.mediaQueryList=this.mediaMatcher.matchMedia(Yt[t]);this.mediaQueryListener=t=>this._iconOnly=t.matches;this.mediaQueryList.addEventListener("change",this.mediaQueryListener);this._iconOnly=this.mediaQueryList.matches}else{this._iconOnly=t}}componentWillLoad(){this.onIconOnlyChanged(this.iconOnly)}componentWillRender(){if(this.isIconButton&&!this.a11yLabel){z.warn("[A11y] Missing ARIA label on icon button",this)}}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){if(this.url){return e("a",{...this.nativeAttributes,ref:t=>this.button=t,href:this.disabled?undefined:this.url,target:this.urlTarget,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}else{return e("button",{...this.nativeAttributes,ref:t=>this.button=t,type:this.submit?"submit":"button",name:this.name,value:this.value,disabled:this.disabled,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round??this.isIconButton,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size),[`cat-group-button-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition),"cat-group-button":Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}}get iconSize(){switch(this.size){case"xs":return"s";default:return"l"}}get spinnerSize(){switch(this.size){case"xs":return"xs";default:return"m"}}get isIconButton(){return Boolean(this.icon)&&this._iconOnly}get hasPrefixIcon(){return Boolean(this.icon)&&!this._iconOnly&&!this.iconRight}get hasSuffixIcon(){return Boolean(this.icon)&&!this._iconOnly&&this.iconRight}get content(){return[this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconButton?e("cat-icon",{icon:this.icon,size:this.iconSize}):e("span",{class:"cat-button-content",part:"content",...this.nativeContentAttributes},e("span",{class:"cat-button-content-inner"},e("slot",null))),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"suffix"}):null,this.loading?e("cat-spinner",{size:this.spinnerSize}):null]}onClick(t){this.catClick.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Xt.style=Zt;const Qt=":host{position:relative;display:inline-flex;vertical-align:middle}::slotted(cat-button[variant=outlined]),::slotted(cat-button:not([variant])){margin-right:-1px}::slotted(cat-button[variant=outlined]:last-child),::slotted(cat-button:not([variant]):last-child){margin-right:0}";const te=Qt;const ee=class{constructor(e){t(this,e);this.formElements=[];this.a11yLabel=undefined}render(){return e(i,{key:"736974e0eb79714f8718e90cb4b533cff13e123f",role:"group","aria-label":this.a11yLabel},e("slot",{key:"7894f468e3e265b67b7eb1c670966d4b55c97ce2",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-button"));this.formElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.formElements.length-1?"last":"middle"}))}get hostElement(){return a(this)}};ee.style=te;const ie=":host{display:block;border-radius:var(--cat-border-radius-l, 0.5rem);background-color:white;padding:1.25rem}:host([hidden]){display:none}::slotted(:last-child){margin-bottom:0 !important}::slotted(nav),::slotted(nav:last-child){margin:-1rem -1rem !important}::slotted(.cat-card-pull){margin:-1.25rem !important;width:calc(100% + 2.5rem) !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-h){margin-left:-1.25rem !important;margin-right:-1.25rem !important;width:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-v){margin-top:-1.25rem !important;margin-bottom:-1.25rem !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-t){margin-top:-1.25rem !important}::slotted(.cat-card-pull-l){margin-left:-1.25rem !important}::slotted(.cat-card-pull-r){margin-right:-1.25rem !important}::slotted(.cat-card-pull-b){margin-bottom:-1.25rem !important}";const ae=ie;const re=class{constructor(e){t(this,e)}render(){return e("slot",{key:"58d43efd186dd1e2ee48363f501298ebb761f3ba"})}};re.style=ae;const ne=t=>{const{id:i,hint:a,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:i+"-hint",class:"hint-section"},o.length?o.map((([i,a])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},D.t(`error.${i}`,a)))):[a&&(Array.isArray(a)?a.map((i=>e("p",{class:(t.class??"")+" input-hint"},i))):e("p",{class:(t.class??"")+" input-hint"},a)),r])};const oe=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const se=oe;let ce=0;const le=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-checkbox-${ce++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.indeterminate=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on checkbox",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"4717606c6860aa834b0be517a990e7c9b3d12ca4"},e("label",{key:"f10b076bce44f869fac2ba524c9b84a9d35540d4",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"9c1ce8476f5336e1bda998998233f1576fa04304",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"54bfdef569a5653d8cf49c8138907e17525f282e",class:"box","aria-hidden":"true"},e("svg",{key:"cdd7a17cbd71c788af281f83f936cae6f8ce7e52",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"ee39ce12ece8d32ad5aca05183ab43b49ca278c7",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"5593c28f8cd548031d6b3823e9491a4bcc8246e3",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"49e30776717be8566e6a135bf791918a93a6f429",points:"1.5 5 10.5 5"}))),e("span",{key:"4461a4d9e42548e5acea1e991b044f7b135f9b67",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"box-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.indeterminate=this.input.indeterminate;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};le.style=se;function de(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function he(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function fe(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return{firstDay:i?.firstDay??1,minDays:i?.minDays??4,weekend:i?.weekend??[6,7]}}function ue(t){const e=new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(3456,10,22)).replace("3456","YYYY").replace("56","YY").replace("11","MM").replace("22","DD");return/^(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)$/.test(e)?e:"DD-MM-YYYY"}function pe(t){return{prevYear:D.t("datepicker.prevYear"),nextYear:D.t("datepicker.nextYear"),prevMonth:D.t("datepicker.prevMonth"),nextMonth:D.t("datepicker.nextMonth"),arrowKeys:D.t("datepicker.arrowKeys"),today:D.t("datepicker.today"),change:D.t("datepicker.change"),choose:D.t("datepicker.choose"),clear:D.t("datepicker.clear"),formatStr:ue(t),weekInfo:fe(t),days:{short:de(t,"short"),long:de(t,"long")},months:{short:he(t,"short"),long:he(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,i,a,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(i),Number(a)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const i=(t.getMonth()+1).toString().padStart(2,"0");const a=t.getDate().toString().padStart(2,"0");return`${e}-${i}-${a}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function be(t){return t%4===0&&t%100!==0||t%400===0}function me(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ge(t,e){const[i,a,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,be(i)?29:28,31,30,31,30,31,31,30,31,30,31];const o=new Date(t);o.setDate(1);o.setMonth(o.getMonth()+e);o.setDate(Math.min(r,n[(a+e%12+12)%12]));return o}function ve(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ye(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ve(t,e)}function ke(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ye(t,e)}function xe(t,e,i){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),i?.getTime()??Infinity))}const we=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}cat-date-inline{margin:1rem}";const ze=we;const De=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=pe(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end"}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}get inputValue(){const[t,e,i,a]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(i)-1,Number(a));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:i,datePattern:[e,a,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"d588c96f031fc8ab9518d13dfaac730a0d424caa"},e("cat-input",{key:"f49f0682e2f2fe3dfcd89477bda91fe46ed44dfa",class:"cat-date-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,value:this.inputValue,onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"68ef0708d25128b9a52d60c5b1a7b34e0ffb2ef1",slot:"label"},this.label,e("span",{key:"ac017335567a4e0059631e7535455d52f61f2e43",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"16a6e95f6e4f6a9b0ddd7716f0b713c8fac3fdff",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"cf7f2aaa2c5775b23f3e8826e9b0e722c4ce8be6",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"f90eef976a3102855801df5ffeee770d45e7eaba",slot:"content"},e("cat-date-inline",{key:"2a0ee2889e1077a6e403458bd3e114396590d0ed",ref:t=>this.dateInline=t,min:this.min,max:this.max,value:this.value,hint:true,weeks:true,noClear:true,onCatChange:this.onDateChange.bind(this)})))))}getTriggerA11yLabel(){const t=this.locale.fromLocalISO(this.value);return t?`${this.locale.change}, ${this.locale.toLocalStr(t)}`:this.locale.choose}onInputBlur(t){if(!this.input){return}const e=this.value;const i=this.parse(this.input.value??"");const a=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=i?xe(a,i,r):null;this.value=n?this.locale.toLocalISO(n):undefined;if(e!==this.value){if(n){this.dateInline?.select(n)}else{this.dateInline?.clear()}this.catChange.emit(this.value)}this.input.value=this.inputValue;this.catBlur.emit(t)}onDateChange(t){t.stopPropagation();const e=this.value;const i=t.detail?new Date(t.detail):null;this.value=i?this.locale.toLocalISO(i):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,a,r];const o=t.split(i).map((t=>Number(t||"x")));let s=o[n.indexOf("YYYY")||n.indexOf("YY")]||this.locale.now().getFullYear();const c=o[n.indexOf("MM")];const l=o[n.indexOf("DD")];if(!Number.isInteger(c)||!Number.isInteger(l)){return null}else if(s<100){s+=s<50?2e3:1900}return new Date(s,c-1,l)}reclamp(t,e){const i=this.value;const a=this.locale.fromLocalISO(i);const r=this.locale.fromLocalISO(e);if(!a||!r){return}const n=xe(t==="min"?r:null,a,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(i!==o){this.value=o;this.catChange.emit(o)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=ze;const Ie=':host{display:inline-block}:host([hidden]){display:none}.picker{display:flex;flex-direction:column;min-width:19.5rem;max-width:30rem}.picker.picker-weeks{min-width:17.5rem;max-width:28rem}.picker.picker-small{min-width:16rem;max-width:23rem}.picker.picker-small.picker-weeks{min-width:14rem;max-width:21rem}.picker-head{display:flex;gap:0.5rem;align-items:center}.picker-head h3{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";flex:1;text-align:center;margin:0}.picker-small .picker-head{gap:0.25rem}.picker-small .picker-head h3{font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum"}.picker-grid{display:grid;grid-template-rows:2rem repeat(6, 1fr);grid-template-columns:repeat(7, 1fr);grid-template-areas:"h h h h h h h" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d";margin:1rem 0 0.5rem}.picker-weeks .picker-grid{grid-template-columns:2rem repeat(7, 1fr);grid-template-areas:". h h h h h h h" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d";}.picker-small .picker-grid{margin:0.5rem 0}.picker-grid-head{grid-area:h;display:grid;grid-template-columns:repeat(7, 1fr);place-items:end center;padding-bottom:0.5rem}.picker-grid-weeks{grid-area:w;display:grid;grid-template-rows:repeat(6, 1fr);place-items:center right;padding-right:0.5rem}.picker-grid-days{grid-area:d;display:grid;grid-template-rows:repeat(6, 1fr);grid-template-columns:repeat(7, 1fr)}.picker-grid-head>*,.picker-grid-weeks>*{font-size:0.75rem;line-height:1rem;font-weight:600;color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-decoration:none}.date-other{opacity:0.5}.date-disabled{opacity:0.25}.picker-foot{display:flex;gap:1rem;align-items:center;width:min-content;min-width:100%;justify-content:space-between}.picker-small .picker-foot{gap:0.5rem}.cursor-help{margin:0;font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-align:center;flex:1}.cursor-help:first-child{text-align:left}.cursor-help:last-child{text-align:right}.cursor-help:only-child{text-align:center}.picker-small .cursor-help{font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400)}.cursor-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.date-range{--cat-border-radius-m:0}';const Me=Ie;const Re=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.language=D.getLocale();this.locale=pe(this.language);this.focusDate=null;this.viewDate=this.locale.now();this.noClear=false;this.hint=false;this.noToday=false;this.weeks=false;this.size="m";this.min=undefined;this.max=undefined;this.range=false;this.value=undefined}get focusedDate(){const[t,e,i,a]=this.hostElement.shadowRoot?.querySelector(`[data-date]:focus`)?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return t?new Date(Number(e),Number(i)-1,Number(a)):null}componentWillLoad(){const[t,e]=this.getValue();if(e){this.focus(e)}else if(t){this.focus(t)}}componentDidRender(){if(this.focusDate){this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus();this.focusDate=null}}onKeyDown(t){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){return}const e=this.focusedDate;if(!e){t.preventDefault();const[e]=this.getValue();this.focus(e||this.locale.now())}else if(t.key==="ArrowLeft"){t.preventDefault();this.focus(t.shiftKey?ge(e,-1):me(e,-1))}else if(t.key==="ArrowRight"){t.preventDefault();this.focus(t.shiftKey?ge(e,1):me(e,1))}else if(t.key==="ArrowUp"){t.preventDefault();this.focus(me(e,-7))}else if(t.key==="ArrowDown"){t.preventDefault();this.focus(me(e,7))}}async select(t){if(!t){return this.clear()}const e=this.value;const[i,a]=this.getMinMaxDate();const r=xe(i,new Date(t.getFullYear(),t.getMonth(),t.getDate()),a);this.focus(r);if(this.range){const[t,e]=this.getValue();if(!t||e||rthis.navigate("prev","year"),"data-dropdown-no-close":true}),e("cat-button",{key:"47e4630feba2824141a95b28229ed400f4ca972c",icon:"$cat:datepicker-month-prev",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.prevMonth,disabled:ye(this.viewDate,t),onClick:()=>this.navigate("prev","month"),"data-dropdown-no-close":true}),e("h3",{key:"6b02eacf9fa679cb17ac332fab8e9cca623e60ad"},this.getHeadline()),e("cat-button",{key:"4ff298d17ec5daa7c918805b8adf4649f8e4af52",icon:"$cat:datepicker-month-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextMonth,disabled:ye(this.viewDate,a),onClick:()=>this.navigate("next","month"),"data-dropdown-no-close":true}),e("cat-button",{key:"fec5ae9408975efa9e53da7b1e803b266f945349",icon:"$cat:datepicker-year-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextYear,disabled:ve(this.viewDate,a),onClick:()=>this.navigate("next","year"),"data-dropdown-no-close":true})),e("div",{key:"8f1b9a656ee1c9999f840ebefc4390e46e78a990",class:"picker-grid",onFocusin:()=>this.setAriaLive(this.locale.arrowKeys)},e("div",{key:"4154a8606cf79e32170b22c055d0a2cd05269e89",class:"picker-grid-head"},Array.from(Array(7),((t,i)=>e("abbr",{title:this.locale.days.long[i]},this.locale.days.short[i])))),this.weeks&&e("div",{class:"picker-grid-weeks"},r.filter(((t,e)=>e%7===0)).map((t=>e("div",null,this.getWeekNumber(t))))),e("div",{key:"0d6907829f1995fe8c695b5bc9d1c075324c1eb0",class:"picker-grid-days"},r.map((t=>{const i=ke(n,t);const a=ke(o,t);const r=!!n&&!!o&&t>n&&tthis.select(t),"data-date":this.locale.toLocalISO(t)},t.getDate())})))),e("div",{key:"9d0bfd1e154555afa673555145beb5b2a97e5c61",class:"picker-foot"},!this.noToday&&this.canClick(this.locale.now())&&e("cat-button",{size:"s","data-dropdown-no-close":true,onClick:()=>this.select(this.locale.now())},this.locale.today),this.hint&&e("p",{class:"cursor-help"},this.locale.arrowKeys),!this.noClear&&e("cat-button",{size:"s",disabled:!this.value,"data-dropdown-no-close":true,onClick:()=>this.clear()},this.locale.clear))),e("p",{key:"eb18f8d751a6e95208e5a062820742a407f30efc",class:"cursor-aria","aria-live":"polite"}))}focus(t){const[e,i]=this.getMinMaxDate();this.focusDate=xe(e,t,i);this.viewDate=new Date(this.focusDate.getFullYear(),this.focusDate.getMonth());this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus()}navigate(t,e){this.viewDate=new Date(t==="prev"?e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()-1):this.viewDate.setMonth(this.viewDate.getMonth()-1):e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()+1):this.viewDate.setMonth(this.viewDate.getMonth()+1));this.setAriaLive(this.getHeadline())}setAriaLive(t){const e=this.hostElement.shadowRoot?.querySelector(".cursor-aria");if(e){e.innerHTML=t}}dateGrid(t,e){const i=new Date(t,e,1).getDay();const a=new Date(t,e+1,0).getDate();const r=[...Array(a).keys()];const n=[...Array(i).keys()].map((a=>new Date(t,e,a-i).getDate()));const o=[...Array(42-r.length-n.length).keys()];return[...n.map((i=>new Date(t,e-1,i+1))),...r.map((i=>new Date(t,e,i+1))),...o.map((i=>new Date(t,e+1,i+1)))]}getHeadline(){return`${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`}getWeekNumber(t,e=true){const i=new Date(t.getTime());const a=e?i.getDay()||7:i.getDay();i.setDate(i.getDate()+4-a);const r=new Date(i.getFullYear(),0,1);return Math.ceil(((+i-+r)/864e5+1)/7)}canFocus(t){const e=this.locale.now();const[i]=this.getMinMaxDate();const a=this.focusedDate;const[r]=this.getValue();if(a&&ye(a,this.viewDate)){return ye(a,t)&&ke(a,t)}else if(r&&ye(r,this.viewDate)){return ye(r,t)&&ke(r,t)}else if(ye(this.viewDate,e)&&(!i||i<=e)){return ye(this.viewDate,t)&&ke(e,t)}const n=ye(t,i)?i?.getDate()??1:1;return ye(this.viewDate,t)&&t.getDate()===n}canClick(t){const[e,i]=this.getMinMaxDate();return(!e||e<=t)&&(!i||i>=t)}getMinMaxDate(){const t=this.locale.fromLocalISO(this.min);const e=this.locale.fromLocalISO(this.max);return[t,e]}getValue(){if(this.range){const[t,e]=JSON.parse(this.value||"[]");return[this.locale.fromLocalISO(t),this.locale.fromLocalISO(e)]}else{return[this.locale.fromLocalISO(this.value),null]}}toRangeValue(t,e){return JSON.stringify([t,e].map((t=>t?this.locale.toLocalISO(t):null)))}get hostElement(){return a(this)}};Re.style=Me;var Ce=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var Ae={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(t){return typeof console!=="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);var i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:false,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var Se={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:false};var Te=function(t,e){if(e===void 0){e=2}return("000"+t).slice(e*-1)};var Fe=function(t){return t===true?1:0};function Be(t,e){var i;return function(){var a=this;var r=arguments;clearTimeout(i);i=setTimeout((function(){return t.apply(a,r)}),e)}}var $e=function(t){return t instanceof Array?t:[t]};function Ee(t,e,i){if(i===true)return t.classList.add(e);t.classList.remove(e)}function Oe(t,e,i){var a=window.document.createElement(t);e=e||"";i=i||"";a.className=e;if(i!==undefined)a.textContent=i;return a}function Ne(t){while(t.firstChild)t.removeChild(t.firstChild)}function We(t,e){if(e(t))return t;else if(t.parentNode)return We(t.parentNode,e);return undefined}function Le(t,e){var i=Oe("div","numInputWrapper"),a=Oe("input","numInput "+t),r=Oe("span","arrowUp"),n=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){a.type="number"}else{a.type="text";a.pattern="\\d*"}if(e!==undefined)for(var o in e)a.setAttribute(o,e[o]);i.appendChild(a);i.appendChild(r);i.appendChild(n);return i}function je(t){try{if(typeof t.composedPath==="function"){var e=t.composedPath();return e[0]}return t.target}catch(e){return t.target}}var Pe=function(){return undefined};var Ye=function(t,e,i){return i.months[e?"shorthand":"longhand"][t]};var He={D:Pe,F:function(t,e,i){t.setMonth(i.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,i){t.setHours(t.getHours()%12+12*Fe(new RegExp(i.amPM[1],"i").test(e)))},M:function(t,e,i){t.setMonth(i.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,i){var a=parseInt(e);var r=new Date(t.getFullYear(),0,2+(a-1)*7,0,0,0,0);r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek);return r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Pe,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Pe,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}};var Ue={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"};var _e={Z:function(t){return t.toISOString()},D:function(t,e,i){return e.weekdays.shorthand[_e.w(t,e,i)]},F:function(t,e,i){return Ye(_e.n(t,e,i)-1,false,e)},G:function(t,e,i){return Te(_e.h(t,e,i))},H:function(t){return Te(t.getHours())},J:function(t,e){return e.ordinal!==undefined?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Fe(t.getHours()>11)]},M:function(t,e){return Ye(t.getMonth(),true,e)},S:function(t){return Te(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,i){return i.getWeek(t)},Y:function(t){return Te(t.getFullYear(),4)},d:function(t){return Te(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Te(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Te(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}};var Ke=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a,n=t.isMobile,o=n===void 0?false:n;return function(t,e,a){var n=a||r;if(i.formatDate!==undefined&&!o){return i.formatDate(t,e,n)}return e.split("").map((function(e,a,r){return _e[e]&&r[a-1]!=="\\"?_e[e](t,n,i):e!=="\\"?e:""})).join("")}};var Ve=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a;return function(t,e,a,n){if(t!==0&&!t)return undefined;var o=n||r;var s;var c=t;if(t instanceof Date)s=new Date(t.getTime());else if(typeof t!=="string"&&t.toFixed!==undefined)s=new Date(t);else if(typeof t==="string"){var l=e||(i||Ae).dateFormat;var d=String(t).trim();if(d==="today"){s=new Date;a=true}else if(i&&i.parseDate){s=i.parseDate(t,l)}else if(/Z$/.test(d)||/GMT$/.test(d)){s=new Date(t)}else{var h=void 0,f=[];for(var u=0,p=0,b="";uMath.min(e,i)&&t=0?new Date:new Date(i.config.minDate.getTime());var a=Qe(i.config);e.setHours(a.hours,a.minutes,a.seconds,e.getMilliseconds());i.selectedDates=[e];i.latestSelectedDateObj=e}if(t!==undefined&&t.type!=="blur"){It(t)}var r=i._input.value;h();zt();if(i._input.value!==r){i._debouncedChange()}}function l(t,e){return t%12+12*Fe(e===i.l10n.amPM[1])}function d(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}function h(){if(i.hourElement===undefined||i.minuteElement===undefined)return;var t=(parseInt(i.hourElement.value.slice(-2),10)||0)%24,e=(parseInt(i.minuteElement.value,10)||0)%60,a=i.secondElement!==undefined?(parseInt(i.secondElement.value,10)||0)%60:0;if(i.amPM!==undefined){t=l(t,i.amPM.textContent)}var r=i.config.minTime!==undefined||i.config.minDate&&i.minDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.minDate,true)===0;var n=i.config.maxTime!==undefined||i.config.maxDate&&i.maxDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.maxDate,true)===0;if(i.config.maxTime!==undefined&&i.config.minTime!==undefined&&i.config.minTime>i.config.maxTime){var o=Ge(i.config.minTime.getHours(),i.config.minTime.getMinutes(),i.config.minTime.getSeconds());var s=Ge(i.config.maxTime.getHours(),i.config.maxTime.getMinutes(),i.config.maxTime.getSeconds());var c=Ge(t,e,a);if(c>s&&c=12)];if(i.secondElement!==undefined)i.secondElement.value=Te(a)}function p(t){var e=je(t);var i=parseInt(e.value)+(t.delta||0);if(i/1e3>1||t.key==="Enter"&&!/[^\d]/.test(i.toString())){H(i)}}function b(t,e,a,r){if(e instanceof Array)return e.forEach((function(e){return b(t,e,a,r)}));if(t instanceof Array)return t.forEach((function(t){return b(t,e,a,r)}));t.addEventListener(e,a,r);i._handlers.push({remove:function(){return t.removeEventListener(e,a,r)}})}function m(){gt("onChange")}function g(){if(i.config.wrap){["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(i.element.querySelectorAll("[data-"+t+"]"),(function(e){return b(e,"click",i[t])}))}))}if(i.isMobile){bt();return}var t=Be(J,50);i._debouncedChange=Be(m,ii);if(i.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))b(i.daysContainer,"mouseover",(function(t){if(i.config.mode==="range")q(je(t))}));b(i._input,"keydown",V);if(i.calendarContainer!==undefined){b(i.calendarContainer,"keydown",V)}if(!i.config.inline&&!i.config.static)b(window,"resize",t);if(window.ontouchstart!==undefined)b(window.document,"touchstart",Y);else b(window.document,"mousedown",Y);b(window.document,"focus",Y,{capture:true});if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}if(i.daysContainer!==undefined){b(i.monthNav,"click",Dt);b(i.monthNav,["keyup","increment"],p);b(i.daysContainer,"click",ot)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined){var e=function(t){return je(t).select()};b(i.timeContainer,["increment"],c);b(i.timeContainer,"blur",c,{capture:true});b(i.timeContainer,"click",y);b([i.hourElement,i.minuteElement],["focus","click"],e);if(i.secondElement!==undefined)b(i.secondElement,"focus",(function(){return i.secondElement&&i.secondElement.select()}));if(i.amPM!==undefined){b(i.amPM,"click",(function(t){c(t)}))}}if(i.config.allowInput){b(i._input,"blur",K)}}function v(t,e){var a=t!==undefined?i.parseDate(t):i.latestSelectedDateObj||(i.config.minDate&&i.config.minDate>i.now?i.config.minDate:i.config.maxDate&&i.config.maxDate1);i.calendarContainer.appendChild(t);var n=i.config.appendTo!==undefined&&i.config.appendTo.nodeType!==undefined;if(i.config.inline||i.config.static){i.calendarContainer.classList.add(i.config.inline?"inline":"static");if(i.config.inline){if(!n&&i.element.parentNode)i.element.parentNode.insertBefore(i.calendarContainer,i._input.nextSibling);else if(i.config.appendTo!==undefined)i.config.appendTo.appendChild(i.calendarContainer)}if(i.config.static){var o=Oe("div","flatpickr-wrapper");if(i.element.parentNode)i.element.parentNode.insertBefore(o,i.element);o.appendChild(i.element);if(i.altInput)o.appendChild(i.altInput);o.appendChild(i.calendarContainer)}}if(!i.config.static&&!i.config.inline)(i.config.appendTo!==undefined?i.config.appendTo:window.document.body).appendChild(i.calendarContainer)}function w(t,e,a,r){var n=U(e,true),o=Oe("span",t,e.getDate().toString());o.dateObj=e;o.$i=r;o.setAttribute("aria-label",i.formatDate(e,i.config.ariaDateFormat));if(t.indexOf("hidden")===-1&&qe(e,i.now)===0){i.todayDateElem=o;o.classList.add("today");o.setAttribute("aria-current","date")}if(n){o.tabIndex=-1;if(yt(e)){o.classList.add("selected");i.selectedDateElem=o;if(i.config.mode==="range"){Ee(o,"startRange",i.selectedDates[0]&&qe(e,i.selectedDates[0],true)===0);Ee(o,"endRange",i.selectedDates[1]&&qe(e,i.selectedDates[1],true)===0);if(t==="nextMonthDay")o.classList.add("inRange")}}}else{o.classList.add("flatpickr-disabled")}if(i.config.mode==="range"){if(kt(e)&&!yt(e))o.classList.add("inRange")}if(i.weekNumbers&&i.config.showMonths===1&&t!=="prevMonthDay"&&r%7===6){i.weekNumbers.insertAdjacentHTML("beforeend",""+i.config.getWeek(e)+"")}gt("onDayCreate",o);return o}function z(t){t.focus();if(i.config.mode==="range")q(t)}function D(t){var e=t>0?0:i.config.showMonths-1;var a=t>0?i.config.showMonths:-1;for(var r=e;r!=a;r+=t){var n=i.daysContainer.children[r];var o=t>0?0:n.children.length-1;var s=t>0?n.children.length:-1;for(var c=o;c!=s;c+=t){var l=n.children[c];if(l.className.indexOf("hidden")===-1&&U(l.dateObj))return l}}return undefined}function I(t,e){var a=t.className.indexOf("Month")===-1?t.dateObj.getMonth():i.currentMonth;var r=e>0?i.config.showMonths:-1;var n=e>0?1:-1;for(var o=a-i.currentMonth;o!=r;o+=n){var s=i.daysContainer.children[o];var c=a-i.currentMonth===o?t.$i+e:e<0?s.children.length-1:0;var l=s.children.length;for(var d=c;d>=0&&d0?l:-1);d+=n){var h=s.children[d];if(h.className.indexOf("hidden")===-1&&U(h.dateObj)&&Math.abs(t.$i-d)>=Math.abs(e))return z(h)}}i.changeMonth(n);M(D(n),0);return undefined}function M(t,e){var a=n();var r=_(a||document.body);var o=t!==undefined?t:r?a:i.selectedDateElem!==undefined&&_(i.selectedDateElem)?i.selectedDateElem:i.todayDateElem!==undefined&&_(i.todayDateElem)?i.todayDateElem:D(e>0?1:-1);if(o===undefined){i._input.focus()}else if(!r){z(o)}else{I(o,e)}}function R(t,e){var a=(new Date(t,e,1).getDay()-i.l10n.firstDayOfWeek+7)%7;var r=i.utils.getDaysInMonth((e-1+12)%12,t);var n=i.utils.getDaysInMonth(e,t),o=window.document.createDocumentFragment(),s=i.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay";var d=r+1-a,h=0;for(;d<=r;d++,h++){o.appendChild(w("flatpickr-day "+c,new Date(t,e-1,d),d,h))}for(d=1;d<=n;d++,h++){o.appendChild(w("flatpickr-day",new Date(t,e,d),d,h))}for(var f=n+1;f<=42-a&&(i.config.showMonths===1||h%7!==0);f++,h++){o.appendChild(w("flatpickr-day "+l,new Date(t,e+1,f%n),f,h))}var u=Oe("div","dayContainer");u.appendChild(o);return u}function C(){if(i.daysContainer===undefined){return}Ne(i.daysContainer);if(i.weekNumbers)Ne(i.weekNumbers);var t=document.createDocumentFragment();for(var e=0;e1||i.config.monthSelectorType!=="dropdown")return;var t=function(t){if(i.config.minDate!==undefined&&i.currentYear===i.config.minDate.getFullYear()&&ti.config.maxDate.getMonth())};i.monthsDropdownContainer.tabIndex=-1;i.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++){if(!t(e))continue;var a=Oe("option","flatpickr-monthDropdown-month");a.value=new Date(i.currentYear,e).getMonth().toString();a.textContent=Ye(e,i.config.shorthandCurrentMonth,i.l10n);a.tabIndex=-1;if(i.currentMonth===e){a.selected=true}i.monthsDropdownContainer.appendChild(a)}}function S(){var t=Oe("div","flatpickr-month");var e=window.document.createDocumentFragment();var a;if(i.config.showMonths>1||i.config.monthSelectorType==="static"){a=Oe("span","cur-month")}else{i.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months");i.monthsDropdownContainer.setAttribute("aria-label",i.l10n.monthAriaLabel);b(i.monthsDropdownContainer,"change",(function(t){var e=je(t);var a=parseInt(e.value,10);i.changeMonth(a-i.currentMonth);gt("onMonthChange")}));A();a=i.monthsDropdownContainer}var r=Le("cur-year",{tabindex:"-1"});var n=r.getElementsByTagName("input")[0];n.setAttribute("aria-label",i.l10n.yearAriaLabel);if(i.config.minDate){n.setAttribute("min",i.config.minDate.getFullYear().toString())}if(i.config.maxDate){n.setAttribute("max",i.config.maxDate.getFullYear().toString());n.disabled=!!i.config.minDate&&i.config.minDate.getFullYear()===i.config.maxDate.getFullYear()}var o=Oe("div","flatpickr-current-month");o.appendChild(a);o.appendChild(r);e.appendChild(o);t.appendChild(e);return{container:t,yearElement:n,monthElement:a}}function T(){Ne(i.monthNav);i.monthNav.appendChild(i.prevMonthNav);if(i.config.showMonths){i.yearElements=[];i.monthElements=[]}for(var t=i.config.showMonths;t--;){var e=S();i.yearElements.push(e.yearElement);i.monthElements.push(e.monthElement);i.monthNav.appendChild(e.container)}i.monthNav.appendChild(i.nextMonthNav)}function F(){i.monthNav=Oe("div","flatpickr-months");i.yearElements=[];i.monthElements=[];i.prevMonthNav=Oe("span","flatpickr-prev-month");i.prevMonthNav.innerHTML=i.config.prevArrow;i.nextMonthNav=Oe("span","flatpickr-next-month");i.nextMonthNav.innerHTML=i.config.nextArrow;T();Object.defineProperty(i,"_hidePrevMonthArrow",{get:function(){return i.__hidePrevMonthArrow},set:function(t){if(i.__hidePrevMonthArrow!==t){Ee(i.prevMonthNav,"flatpickr-disabled",t);i.__hidePrevMonthArrow=t}}});Object.defineProperty(i,"_hideNextMonthArrow",{get:function(){return i.__hideNextMonthArrow},set:function(t){if(i.__hideNextMonthArrow!==t){Ee(i.nextMonthNav,"flatpickr-disabled",t);i.__hideNextMonthArrow=t}}});i.currentYearElement=i.yearElements[0];xt();return i.monthNav}function B(){i.calendarContainer.classList.add("hasTime");if(i.config.noCalendar)i.calendarContainer.classList.add("noCalendar");var t=Qe(i.config);i.timeContainer=Oe("div","flatpickr-time");i.timeContainer.tabIndex=-1;var e=Oe("span","flatpickr-time-separator",":");var a=Le("flatpickr-hour",{"aria-label":i.l10n.hourAriaLabel});i.hourElement=a.getElementsByTagName("input")[0];var r=Le("flatpickr-minute",{"aria-label":i.l10n.minuteAriaLabel});i.minuteElement=r.getElementsByTagName("input")[0];i.hourElement.tabIndex=i.minuteElement.tabIndex=-1;i.hourElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getHours():i.config.time_24hr?t.hours:d(t.hours));i.minuteElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getMinutes():t.minutes);i.hourElement.setAttribute("step",i.config.hourIncrement.toString());i.minuteElement.setAttribute("step",i.config.minuteIncrement.toString());i.hourElement.setAttribute("min",i.config.time_24hr?"0":"1");i.hourElement.setAttribute("max",i.config.time_24hr?"23":"12");i.hourElement.setAttribute("maxlength","2");i.minuteElement.setAttribute("min","0");i.minuteElement.setAttribute("max","59");i.minuteElement.setAttribute("maxlength","2");i.timeContainer.appendChild(a);i.timeContainer.appendChild(e);i.timeContainer.appendChild(r);if(i.config.time_24hr)i.timeContainer.classList.add("time24hr");if(i.config.enableSeconds){i.timeContainer.classList.add("hasSeconds");var n=Le("flatpickr-second");i.secondElement=n.getElementsByTagName("input")[0];i.secondElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getSeconds():t.seconds);i.secondElement.setAttribute("step",i.minuteElement.getAttribute("step"));i.secondElement.setAttribute("min","0");i.secondElement.setAttribute("max","59");i.secondElement.setAttribute("maxlength","2");i.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":"));i.timeContainer.appendChild(n)}if(!i.config.time_24hr){i.amPM=Oe("span","flatpickr-am-pm",i.l10n.amPM[Fe((i.latestSelectedDateObj?i.hourElement.value:i.config.defaultHour)>11)]);i.amPM.title=i.l10n.toggleTitle;i.amPM.tabIndex=-1;i.timeContainer.appendChild(i.amPM)}return i.timeContainer}function $(){if(!i.weekdayContainer)i.weekdayContainer=Oe("div","flatpickr-weekdays");else Ne(i.weekdayContainer);for(var t=i.config.showMonths;t--;){var e=Oe("div","flatpickr-weekdaycontainer");i.weekdayContainer.appendChild(e)}E();return i.weekdayContainer}function E(){if(!i.weekdayContainer){return}var t=i.l10n.firstDayOfWeek;var e=ei(i.l10n.weekdays.shorthand);if(t>0&&t\n "+e.join("")+"\n \n "}}function O(){i.calendarContainer.classList.add("hasWeeks");var t=Oe("div","flatpickr-weekwrapper");t.appendChild(Oe("span","flatpickr-weekday",i.l10n.weekAbbreviation));var e=Oe("div","flatpickr-weeks");t.appendChild(e);return{weekWrapper:t,weekNumbers:e}}function N(t,e){if(e===void 0){e=true}var a=e?t:t-i.currentMonth;if(a<0&&i._hidePrevMonthArrow===true||a>0&&i._hideNextMonthArrow===true)return;i.currentMonth+=a;if(i.currentMonth<0||i.currentMonth>11){i.currentYear+=i.currentMonth>11?1:-1;i.currentMonth=(i.currentMonth+12)%12;gt("onYearChange");A()}C();gt("onMonthChange");xt()}function W(t,e){if(t===void 0){t=true}if(e===void 0){e=true}i.input.value="";if(i.altInput!==undefined)i.altInput.value="";if(i.mobileInput!==undefined)i.mobileInput.value="";i.selectedDates=[];i.latestSelectedDateObj=undefined;if(e===true){i.currentYear=i._initialDate.getFullYear();i.currentMonth=i._initialDate.getMonth()}if(i.config.enableTime===true){var a=Qe(i.config),r=a.hours,n=a.minutes,o=a.seconds;u(r,n,o)}i.redraw();if(t)gt("onChange")}function L(){i.isOpen=false;if(!i.isMobile){if(i.calendarContainer!==undefined){i.calendarContainer.classList.remove("open")}if(i._input!==undefined){i._input.classList.remove("active")}}gt("onClose")}function j(){if(i.config!==undefined)gt("onDestroy");for(var t=i._handlers.length;t--;){i._handlers[t].remove()}i._handlers=[];if(i.mobileInput){if(i.mobileInput.parentNode)i.mobileInput.parentNode.removeChild(i.mobileInput);i.mobileInput=undefined}else if(i.calendarContainer&&i.calendarContainer.parentNode){if(i.config.static&&i.calendarContainer.parentNode){var e=i.calendarContainer.parentNode;e.lastChild&&e.removeChild(e.lastChild);if(e.parentNode){while(e.firstChild)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else i.calendarContainer.parentNode.removeChild(i.calendarContainer)}if(i.altInput){i.input.type="text";if(i.altInput.parentNode)i.altInput.parentNode.removeChild(i.altInput);delete i.altInput}if(i.input){i.input.type=i.input._type;i.input.classList.remove("flatpickr-input");i.input.removeAttribute("readonly")}["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete i[t]}catch(t){}}))}function P(t){return i.calendarContainer.contains(t)}function Y(t){if(i.isOpen&&!i.config.inline){var e=je(t);var a=P(e);var r=e===i.input||e===i.altInput||i.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(i.input)||~t.path.indexOf(i.altInput));var n=!r&&!a&&!P(t.relatedTarget);var o=!i.config.ignoredFocusElements.some((function(t){return t.contains(e)}));if(n&&o){if(i.config.allowInput){i.setDate(i._input.value,false,i.config.altInput?i.config.altFormat:i.config.dateFormat)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined&&i.input.value!==""&&i.input.value!==undefined){c()}i.close();if(i.config&&i.config.mode==="range"&&i.selectedDates.length===1)i.clear(false)}}}function H(t){if(!t||i.config.minDate&&ti.config.maxDate.getFullYear())return;var e=t,a=i.currentYear!==e;i.currentYear=e||i.currentYear;if(i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()){i.currentMonth=Math.min(i.config.maxDate.getMonth(),i.currentMonth)}else if(i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()){i.currentMonth=Math.max(i.config.minDate.getMonth(),i.currentMonth)}if(a){i.redraw();gt("onYearChange");A()}}function U(t,e){var a;if(e===void 0){e=true}var r=i.parseDate(t,undefined,e);if(i.config.minDate&&r&&qe(r,i.config.minDate,e!==undefined?e:!i.minDateHasTime)<0||i.config.maxDate&&r&&qe(r,i.config.maxDate,e!==undefined?e:!i.maxDateHasTime)>0)return false;if(!i.config.enable&&i.config.disable.length===0)return true;if(r===undefined)return false;var n=!!i.config.enable,o=(a=i.config.enable)!==null&&a!==void 0?a:i.config.disable;for(var s=0,c=void 0;s=c.from.getTime()&&r.getTime()<=c.to.getTime())return n}return!n}function _(t){if(i.daysContainer!==undefined)return t.className.indexOf("hidden")===-1&&t.className.indexOf("flatpickr-disabled")===-1&&i.daysContainer.contains(t);return false}function K(t){var e=t.target===i._input;var a=i._input.value.trimEnd()!==wt();if(e&&a&&!(t.relatedTarget&&P(t.relatedTarget))){i.setDate(i._input.value,true,t.target===i.altInput?i.config.altFormat:i.config.dateFormat)}}function V(e){var a=je(e);var r=i.config.wrap?t.contains(a):a===i._input;var o=i.config.allowInput;var s=i.isOpen&&(!o||!r);var l=i.config.inline&&r&&!o;if(e.keyCode===13&&r){if(o){i.setDate(i._input.value,true,a===i.altInput?i.config.altFormat:i.config.dateFormat);i.close();return a.blur()}else{i.open()}}else if(P(a)||s||l){var d=!!i.timeContainer&&i.timeContainer.contains(a);switch(e.keyCode){case 13:if(d){e.preventDefault();c();nt()}else ot(e);break;case 27:e.preventDefault();nt();break;case 8:case 46:if(r&&!i.config.allowInput){e.preventDefault();i.clear()}break;case 37:case 39:if(!d&&!r){e.preventDefault();var f=n();if(i.daysContainer!==undefined&&(o===false||f&&_(f))){var u=e.keyCode===39?1:-1;if(!e.ctrlKey)M(undefined,u);else{e.stopPropagation();N(u);M(D(1),0)}}}else if(i.hourElement)i.hourElement.focus();break;case 38:case 40:e.preventDefault();var p=e.keyCode===40?1:-1;if(i.daysContainer&&a.$i!==undefined||a===i.input||a===i.altInput){if(e.ctrlKey){e.stopPropagation();H(i.currentYear-p);M(D(1),0)}else if(!d)M(undefined,p*7)}else if(a===i.currentYearElement){H(i.currentYear-p)}else if(i.config.enableTime){if(!d&&i.hourElement)i.hourElement.focus();c(e);i._debouncedChange()}break;case 9:if(d){var b=[i.hourElement,i.minuteElement,i.secondElement,i.amPM].concat(i.pluginElements).filter((function(t){return t}));var m=b.indexOf(a);if(m!==-1){var g=b[m+(e.shiftKey?-1:1)];e.preventDefault();(g||i._input).focus()}}else if(!i.config.noCalendar&&i.daysContainer&&i.daysContainer.contains(a)&&e.shiftKey){e.preventDefault();i._input.focus()}break}}if(i.amPM!==undefined&&a===i.amPM){switch(e.key){case i.l10n.amPM[0].charAt(0):case i.l10n.amPM[0].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[0];h();zt();break;case i.l10n.amPM[1].charAt(0):case i.l10n.amPM[1].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[1];h();zt();break}}if(r||P(a)){gt("onKeyDown",e)}}function q(t,e){if(e===void 0){e="flatpickr-day"}if(i.selectedDates.length!==1||t&&(!t.classList.contains(e)||t.classList.contains("flatpickr-disabled")))return;var a=t?t.dateObj.getTime():i.days.firstElementChild.dateObj.getTime(),r=i.parseDate(i.selectedDates[0],undefined,true).getTime(),n=Math.min(a,i.selectedDates[0].getTime()),o=Math.max(a,i.selectedDates[0].getTime());var s=false;var c=0,l=0;for(var d=n;dn&&dc))c=d;else if(d>r&&(!l||d ."+e));h.forEach((function(e){var n=e.dateObj;var o=n.getTime();var d=c>0&&o0&&o>l;if(d){e.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));return}else if(s&&!d)return;["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)}));if(t!==undefined){t.classList.add(a<=i.selectedDates[0].getTime()?"startRange":"endRange");if(ra&&o===r)e.classList.add("endRange");if(o>=c&&(l===0||o<=l)&&Je(o,r,a))e.classList.add("inRange")}}))}function J(){if(i.isOpen&&!i.config.static&&!i.config.inline)et()}function G(t,e){if(e===void 0){e=i._positionElement}if(i.isMobile===true){if(t){t.preventDefault();var a=je(t);if(a){a.blur()}}if(i.mobileInput!==undefined){i.mobileInput.focus();i.mobileInput.click()}gt("onOpen");return}else if(i._input.disabled||i.config.inline){return}var r=i.isOpen;i.isOpen=true;if(!r){i.calendarContainer.classList.add("open");i._input.classList.add("active");gt("onOpen");et(e)}if(i.config.enableTime===true&&i.config.noCalendar===true){if(i.config.allowInput===false&&(t===undefined||!i.timeContainer.contains(t.relatedTarget))){setTimeout((function(){return i.hourElement.select()}),50)}}}function Z(t){return function(e){var a=i.config["_"+t+"Date"]=i.parseDate(e,i.config.dateFormat);var r=i.config["_"+(t==="min"?"max":"min")+"Date"];if(a!==undefined){i[t==="min"?"minDateHasTime":"maxDateHasTime"]=a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0}if(i.selectedDates){i.selectedDates=i.selectedDates.filter((function(t){return U(t)}));if(!i.selectedDates.length&&t==="min")f(a);zt()}if(i.daysContainer){rt();if(a!==undefined)i.currentYearElement[t]=a.getFullYear().toString();else i.currentYearElement.removeAttribute(t);i.currentYearElement.disabled=!!r&&a!==undefined&&r.getFullYear()===a.getFullYear()}}}function X(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var r=ti(ti({},JSON.parse(JSON.stringify(t.dataset||{}))),e);var n={};i.config.parseDate=r.parseDate;i.config.formatDate=r.formatDate;Object.defineProperty(i.config,"enable",{get:function(){return i.config._enable},set:function(t){i.config._enable=ht(t)}});Object.defineProperty(i.config,"disable",{get:function(){return i.config._disable},set:function(t){i.config._disable=ht(t)}});var s=r.mode==="time";if(!r.dateFormat&&(r.enableTime||s)){var c=ni.defaultConfig.dateFormat||Ae.dateFormat;n.dateFormat=r.noCalendar||s?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||s)&&!r.altFormat){var l=ni.defaultConfig.altFormat||Ae.altFormat;n.altFormat=r.noCalendar||s?"h:i"+(r.enableSeconds?":S K":" K"):l+(" h:i"+(r.enableSeconds?":S":"")+" K")}Object.defineProperty(i.config,"minDate",{get:function(){return i.config._minDate},set:Z("min")});Object.defineProperty(i.config,"maxDate",{get:function(){return i.config._maxDate},set:Z("max")});var d=function(t){return function(e){i.config[t==="min"?"_minTime":"_maxTime"]=i.parseDate(e,"H:i:S")}};Object.defineProperty(i.config,"minTime",{get:function(){return i.config._minTime},set:d("min")});Object.defineProperty(i.config,"maxTime",{get:function(){return i.config._maxTime},set:d("max")});if(r.mode==="time"){i.config.noCalendar=true;i.config.enableTime=true}Object.assign(i.config,n,r);for(var h=0;h-1){i.config[u]=$e(f[u]).map(o).concat(i.config[u])}else if(typeof r[u]==="undefined")i.config[u]=f[u]}}if(!r.altInputClass){i.config.altInputClass=Q().className+" "+i.config.altInputClass}gt("onParseConfig")}function Q(){return i.config.wrap?t.querySelector("[data-input]"):t}function tt(){if(typeof i.config.locale!=="object"&&typeof ni.l10ns[i.config.locale]==="undefined")i.config.errorHandler(new Error("flatpickr: invalid locale "+i.config.locale));i.l10n=ti(ti({},ni.l10ns.default),typeof i.config.locale==="object"?i.config.locale:i.config.locale!=="default"?ni.l10ns[i.config.locale]:undefined);Ue.D="("+i.l10n.weekdays.shorthand.join("|")+")";Ue.l="("+i.l10n.weekdays.longhand.join("|")+")";Ue.M="("+i.l10n.months.shorthand.join("|")+")";Ue.F="("+i.l10n.months.longhand.join("|")+")";Ue.K="("+i.l10n.amPM[0]+"|"+i.l10n.amPM[1]+"|"+i.l10n.amPM[0].toLowerCase()+"|"+i.l10n.amPM[1].toLowerCase()+")";var a=ti(ti({},e),JSON.parse(JSON.stringify(t.dataset||{})));if(a.time_24hr===undefined&&ni.defaultConfig.time_24hr===undefined){i.config.time_24hr=i.l10n.time_24hr}i.formatDate=Ke(i);i.parseDate=Ve({config:i.config,l10n:i.l10n})}function et(t){if(typeof i.config.position==="function"){return void i.config.position(i,t)}if(i.calendarContainer===undefined)return;gt("onPreCalendarPosition");var e=t||i._positionElement;var a=Array.prototype.reduce.call(i.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=i.calendarContainer.offsetWidth,n=i.config.position.split(" "),o=n[0],s=n.length>1?n[1]:null,c=e.getBoundingClientRect(),l=window.innerHeight-c.bottom,d=o==="above"||o!=="below"&&la;var h=window.pageYOffset+c.top+(!d?e.offsetHeight+2:-a-2);Ee(i.calendarContainer,"arrowTop",!d);Ee(i.calendarContainer,"arrowBottom",d);if(i.config.inline)return;var f=window.pageXOffset+c.left;var u=false;var p=false;if(s==="center"){f-=(r-c.width)/2;u=true}else if(s==="right"){f-=r-c.width;p=true}Ee(i.calendarContainer,"arrowLeft",!u&&!p);Ee(i.calendarContainer,"arrowCenter",u);Ee(i.calendarContainer,"arrowRight",p);var b=window.document.body.offsetWidth-(window.pageXOffset+c.right);var m=f+r>window.document.body.offsetWidth;var g=b+r>window.document.body.offsetWidth;Ee(i.calendarContainer,"rightMost",m);if(i.config.static)return;i.calendarContainer.style.top=h+"px";if(!m){i.calendarContainer.style.left=f+"px";i.calendarContainer.style.right="auto"}else if(!g){i.calendarContainer.style.left="auto";i.calendarContainer.style.right=b+"px"}else{var v=it();if(v===undefined)return;var y=window.document.body.offsetWidth;var k=Math.max(0,y/2-r/2);var x=".flatpickr-calendar.centerMost:before";var w=".flatpickr-calendar.centerMost:after";var z=v.cssRules.length;var D="{left:"+c.left+"px;right:auto;}";Ee(i.calendarContainer,"rightMost",false);Ee(i.calendarContainer,"centerMost",true);v.insertRule(x+","+w+D,z);i.calendarContainer.style.left=k+"px";i.calendarContainer.style.right="auto"}}function it(){var t=null;for(var e=0;ei.currentMonth+i.config.showMonths-1)&&i.config.mode!=="range";i.selectedDateElem=r;if(i.config.mode==="single")i.selectedDates=[n];else if(i.config.mode==="multiple"){var s=yt(n);if(s)i.selectedDates.splice(parseInt(s),1);else i.selectedDates.push(n)}else if(i.config.mode==="range"){if(i.selectedDates.length===2){i.clear(false,false)}i.latestSelectedDateObj=n;i.selectedDates.push(n);if(qe(n,i.selectedDates[0],true)!==0)i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}h();if(o){var c=i.currentYear!==n.getFullYear();i.currentYear=n.getFullYear();i.currentMonth=n.getMonth();if(c){gt("onYearChange");A()}gt("onMonthChange")}xt();C();zt();if(!o&&i.config.mode!=="range"&&i.config.showMonths===1)z(r);else if(i.selectedDateElem!==undefined&&i.hourElement===undefined){i.selectedDateElem&&i.selectedDateElem.focus()}if(i.hourElement!==undefined)i.hourElement!==undefined&&i.hourElement.focus();if(i.config.closeOnSelect){var l=i.config.mode==="single"&&!i.config.enableTime;var d=i.config.mode==="range"&&i.selectedDates.length===2&&!i.config.enableTime;if(l||d){nt()}}m()}var st={locale:[tt,E],showMonths:[T,s,$],minDate:[v],maxDate:[v],positionElement:[pt],clickOpens:[function(){if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}else{i._input.removeEventListener("focus",i.open);i._input.removeEventListener("click",i.open)}}]};function ct(t,e){if(t!==null&&typeof t==="object"){Object.assign(i.config,t);for(var a in t){if(st[a]!==undefined)st[a].forEach((function(t){return t()}))}}else{i.config[t]=e;if(st[t]!==undefined)st[t].forEach((function(t){return t()}));else if(Ce.indexOf(t)>-1)i.config[t]=$e(e)}i.redraw();zt(true)}function lt(t,e){var a=[];if(t instanceof Array)a=t.map((function(t){return i.parseDate(t,e)}));else if(t instanceof Date||typeof t==="number")a=[i.parseDate(t,e)];else if(typeof t==="string"){switch(i.config.mode){case"single":case"time":a=[i.parseDate(t,e)];break;case"multiple":a=t.split(i.config.conjunction).map((function(t){return i.parseDate(t,e)}));break;case"range":a=t.split(i.l10n.rangeSeparator).map((function(t){return i.parseDate(t,e)}));break}}else i.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));i.selectedDates=i.config.allowInvalidPreload?a:a.filter((function(t){return t instanceof Date&&U(t,false)}));if(i.config.mode==="range")i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function dt(t,e,a){if(e===void 0){e=false}if(a===void 0){a=i.config.dateFormat}if(t!==0&&!t||t instanceof Array&&t.length===0)return i.clear(e);lt(t,a);i.latestSelectedDateObj=i.selectedDates[i.selectedDates.length-1];i.redraw();v(undefined,e);f();if(i.selectedDates.length===0){i.clear(false)}zt(e);if(e)gt("onChange")}function ht(t){return t.slice().map((function(t){if(typeof t==="string"||typeof t==="number"||t instanceof Date){return i.parseDate(t,undefined,true)}else if(t&&typeof t==="object"&&t.from&&t.to)return{from:i.parseDate(t.from,undefined),to:i.parseDate(t.to,undefined)};return t})).filter((function(t){return t}))}function ft(){i.selectedDates=[];i.now=i.parseDate(i.config.now)||new Date;var t=i.config.defaultDate||((i.input.nodeName==="INPUT"||i.input.nodeName==="TEXTAREA")&&i.input.placeholder&&i.input.value===i.input.placeholder?null:i.input.value);if(t)lt(t,i.config.dateFormat);i._initialDate=i.selectedDates.length>0?i.selectedDates[0]:i.config.minDate&&i.config.minDate.getTime()>i.now.getTime()?i.config.minDate:i.config.maxDate&&i.config.maxDate.getTime()0)i.latestSelectedDateObj=i.selectedDates[0];if(i.config.minTime!==undefined)i.config.minTime=i.parseDate(i.config.minTime,"H:i");if(i.config.maxTime!==undefined)i.config.maxTime=i.parseDate(i.config.maxTime,"H:i");i.minDateHasTime=!!i.config.minDate&&(i.config.minDate.getHours()>0||i.config.minDate.getMinutes()>0||i.config.minDate.getSeconds()>0);i.maxDateHasTime=!!i.config.maxDate&&(i.config.maxDate.getHours()>0||i.config.maxDate.getMinutes()>0||i.config.maxDate.getSeconds()>0)}function ut(){i.input=Q();if(!i.input){i.config.errorHandler(new Error("Invalid input element specified"));return}i.input._type=i.input.type;i.input.type="text";i.input.classList.add("flatpickr-input");i._input=i.input;if(i.config.altInput){i.altInput=Oe(i.input.nodeName,i.config.altInputClass);i._input=i.altInput;i.altInput.placeholder=i.input.placeholder;i.altInput.disabled=i.input.disabled;i.altInput.required=i.input.required;i.altInput.tabIndex=i.input.tabIndex;i.altInput.type="text";i.input.setAttribute("type","hidden");if(!i.config.static&&i.input.parentNode)i.input.parentNode.insertBefore(i.altInput,i.input.nextSibling)}if(!i.config.allowInput)i._input.setAttribute("readonly","readonly");pt()}function pt(){i._positionElement=i.config.positionElement||i._input}function bt(){var t=i.config.enableTime?i.config.noCalendar?"time":"datetime-local":"date";i.mobileInput=Oe("input",i.input.className+" flatpickr-mobile");i.mobileInput.tabIndex=1;i.mobileInput.type=t;i.mobileInput.disabled=i.input.disabled;i.mobileInput.required=i.input.required;i.mobileInput.placeholder=i.input.placeholder;i.mobileFormatStr=t==="datetime-local"?"Y-m-d\\TH:i:S":t==="date"?"Y-m-d":"H:i:S";if(i.selectedDates.length>0){i.mobileInput.defaultValue=i.mobileInput.value=i.formatDate(i.selectedDates[0],i.mobileFormatStr)}if(i.config.minDate)i.mobileInput.min=i.formatDate(i.config.minDate,"Y-m-d");if(i.config.maxDate)i.mobileInput.max=i.formatDate(i.config.maxDate,"Y-m-d");if(i.input.getAttribute("step"))i.mobileInput.step=String(i.input.getAttribute("step"));i.input.type="hidden";if(i.altInput!==undefined)i.altInput.type="hidden";try{if(i.input.parentNode)i.input.parentNode.insertBefore(i.mobileInput,i.input.nextSibling)}catch(t){}b(i.mobileInput,"change",(function(t){i.setDate(je(t).value,false,i.mobileFormatStr);gt("onChange");gt("onClose")}))}function mt(t){if(i.isOpen===true)return i.close();i.open(t)}function gt(t,e){if(i.config===undefined)return;var a=i.config[t];if(a!==undefined&&a.length>0){for(var r=0;a[r]&&r=0&&qe(t,i.selectedDates[1])<=0}function xt(){if(i.config.noCalendar||i.isMobile||!i.monthNav)return;i.yearElements.forEach((function(t,e){var a=new Date(i.currentYear,i.currentMonth,1);a.setMonth(i.currentMonth+e);if(i.config.showMonths>1||i.config.monthSelectorType==="static"){i.monthElements[e].textContent=Ye(a.getMonth(),i.config.shorthandCurrentMonth,i.l10n)+" "}else{i.monthsDropdownContainer.value=a.getMonth().toString()}t.value=a.getFullYear().toString()}));i._hidePrevMonthArrow=i.config.minDate!==undefined&&(i.currentYear===i.config.minDate.getFullYear()?i.currentMonth<=i.config.minDate.getMonth():i.currentYeari.config.maxDate.getMonth():i.currentYear>i.config.maxDate.getFullYear())}function wt(t){var e=t||(i.config.altInput?i.config.altFormat:i.config.dateFormat);return i.selectedDates.map((function(t){return i.formatDate(t,e)})).filter((function(t,e,a){return i.config.mode!=="range"||i.config.enableTime||a.indexOf(t)===e})).join(i.config.mode!=="range"?i.config.conjunction:i.l10n.rangeSeparator)}function zt(t){if(t===void 0){t=true}if(i.mobileInput!==undefined&&i.mobileFormatStr){i.mobileInput.value=i.latestSelectedDateObj!==undefined?i.formatDate(i.latestSelectedDateObj,i.mobileFormatStr):""}i.input.value=wt(i.config.dateFormat);if(i.altInput!==undefined){i.altInput.value=wt(i.config.altFormat)}if(t!==false)gt("onValueUpdate")}function Dt(t){var e=je(t);var a=i.prevMonthNav.contains(e);var r=i.nextMonthNav.contains(e);if(a||r){N(a?-1:1)}else if(i.yearElements.indexOf(e)>=0){e.select()}else if(e.classList.contains("arrowUp")){i.changeYear(i.currentYear+1)}else if(e.classList.contains("arrowDown")){i.changeYear(i.currentYear-1)}}function It(t){t.preventDefault();var e=t.type==="keydown",a=je(t),r=a;if(i.amPM!==undefined&&a===i.amPM){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}var n=parseFloat(r.getAttribute("min")),o=parseFloat(r.getAttribute("max")),s=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),l=t.delta||(e?t.which===38?1:-1:0);var d=c+s*l;if(typeof r.value!=="undefined"&&r.value.length===2){var h=r===i.hourElement,f=r===i.minuteElement;if(do){d=r===i.hourElement?d-o-Fe(!i.amPM):n;if(f)k(undefined,1,i.hourElement)}if(i.amPM&&h&&(s===1?d+c===23:Math.abs(d-c)>s)){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}r.value=Te(d)}}r();return i}function ri(t,e){var i=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement}));var a=[];for(var r=0;rc||h=e.weekStartDay&&r<=e.weekEndDay)i[a].classList.add("week","selected")}}function r(){var t=e.days.childNodes;for(var i=t.length;i--;)t[i].classList.remove("inRange")}function n(){if(e.daysContainer!==undefined)e.daysContainer.addEventListener("mouseover",i)}function o(){if(e.daysContainer!==undefined)e.daysContainer.removeEventListener("mouseover",i)}return{onValueUpdate:a,onMonthChange:a,onYearChange:a,onOpen:a,onClose:r,onParseConfig:function(){e.config.mode="single";e.config.enableTime=false;e.config.dateFormat=e.config.dateFormat?e.config.dateFormat:"\\W\\e\\e\\k #W, Y";e.config.altFormat=e.config.altFormat?e.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[n,a,function(){e.loadedPlugins.push("weekSelect")}],onDestroy:o}}}return e}))})(si);const ci=si.exports;function li(t,e={}){const i=t.mode==="week"?[new ci({})]:[];const a=di(t.mode);return{...e,locale:t.locale,plugins:i,allowInput:true,altInput:true,prevArrow:"←",nextArrow:"→",dateFormat:a,altFormat:t.format,ariaDateFormat:t.format,mode:t.mode==="daterange"?"range":"single",minDate:t.min,maxDate:t.max,enableTime:t.mode==="time"||t.mode==="datetime",noCalendar:t.mode==="time",weekNumbers:true,minuteIncrement:t.step,clickOpens:!t.disabled&&!t.readonly,appendTo:t.appendTo,position:t.position?t.position:"auto",onReady:(e,i,a)=>{for(const e in t.nativePickerAttributes){const i=t.nativePickerAttributes[e];a.calendarContainer.setAttribute(e,i)}if(t.appendTo&&typeof t.onReady==="function"){t.onReady(e,i,a)}},onClose:function(e,i,a){if(t.mode==="daterange"&&e.length<2){a.clear()}},onChange:(e,i,r)=>{let n=i||undefined;if(t.mode==="daterange"){if(e.length<2){return}else{const t=e[0];const i=e[1];i.setHours(23);i.setMinutes(59);i.setSeconds(59);n=`${r.formatDate(t,a)} - ${r.formatDate(i,a)}`}}else if(t.mode==="week"){n=e[0]?r.config.getWeek(e[0]).toString():undefined}t.applyChange(n)}}}function di(t){if(t==="week"){return"W"}else if(t==="time"){return"H:i"}else{return"Z"}}function hi(t,e){const i=new Date(2e3,1,3,16,5,6);const a={year:"numeric",month:"2-digit",day:"2-digit"};const r={hour:"2-digit",minute:"2-digit"};return e==="week"?"W":new Intl.DateTimeFormat(t,{date:a,time:r,datetime:{...a,...r},daterange:a}[e]).format(i).replace("2000","Y").replace("00","y").replace("02","m").replace("03","d").replace("04","h").replace("16","H").replace("05","i").replace(/AM|PM/i,"K")}function fi(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ui(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return i?.firstDay??1}function pi(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function bi(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function mi(t){return{firstDayOfWeek:ui(t),rangeSeparator:" - ",weekAbbreviation:"",yearAriaLabel:D.t("datepicker.year"),monthAriaLabel:D.t("datepicker.month"),hourAriaLabel:D.t("datepicker.hour"),minuteAriaLabel:D.t("datepicker.minute"),toggleTitle:D.t("datepicker.toggle"),scrollTitle:D.t("datepicker.scroll"),time_24hr:!fi(t),weekdays:{shorthand:pi(t,"short"),longhand:pi(t,"long")},months:{shorthand:bi(t,"short"),longhand:bi(t,"long")}}}const gi=Math.min;const vi=Math.max;const yi=Math.round;const ki=Math.floor;const xi=t=>({x:t,y:t});const wi={left:"right",right:"left",bottom:"top",top:"bottom"};const zi={start:"end",end:"start"};function Di(t,e,i){return vi(t,gi(e,i))}function Ii(t,e){return typeof t==="function"?t(e):t}function Mi(t){return t.split("-")[0]}function Ri(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Ai(t){return t==="y"?"height":"width"}function Si(t){return["top","bottom"].includes(Mi(t))?"y":"x"}function Ti(t){return Ci(Si(t))}function Fi(t,e,i){if(i===void 0){i=false}const a=Ri(t);const r=Ti(t);const n=Ai(r);let o=r==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(e.reference[n]>e.floating[n]){o=Ni(o)}return[o,Ni(o)]}function Bi(t){const e=Ni(t);return[$i(t),e,$i(e)]}function $i(t){return t.replace(/start|end/g,(t=>zi[t]))}function Ei(t,e,i){const a=["left","right"];const r=["right","left"];const n=["top","bottom"];const o=["bottom","top"];switch(t){case"top":case"bottom":if(i)return e?r:a;return e?a:r;case"left":case"right":return e?n:o;default:return[]}}function Oi(t,e,i,a){const r=Ri(t);let n=Ei(Mi(t),i==="start",a);if(r){n=n.map((t=>t+"-"+r));if(e){n=n.concat(n.map($i))}}return n}function Ni(t){return t.replace(/left|right|bottom|top/g,(t=>wi[t]))}function Wi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Li(t){return typeof t!=="number"?Wi(t):{top:t,right:t,bottom:t,left:t}}function ji(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Pi(t,e,i){let{reference:a,floating:r}=t;const n=Si(e);const o=Ti(e);const s=Ai(o);const c=Mi(e);const l=n==="y";const d=a.x+a.width/2-r.width/2;const h=a.y+a.height/2-r.height/2;const f=a[s]/2-r[s]/2;let u;switch(c){case"top":u={x:d,y:a.y-r.height};break;case"bottom":u={x:d,y:a.y+a.height};break;case"right":u={x:a.x+a.width,y:h};break;case"left":u={x:a.x-r.width,y:h};break;default:u={x:a.x,y:a.y}}switch(Ri(e)){case"start":u[o]-=f*(i&&l?-1:1);break;case"end":u[o]+=f*(i&&l?-1:1);break}return u}const Yi=async(t,e,i)=>{const{placement:a="bottom",strategy:r="absolute",middleware:n=[],platform:o}=i;const s=n.filter(Boolean);const c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:r});let{x:d,y:h}=Pi(l,a,c);let f=a;let u={};let p=0;for(let i=0;it<=0))){var I,M;const t=(((I=n.flip)==null?void 0:I.index)||0)+1;const e=x[t];if(e){return{data:{index:t,overflows:D},reset:{placement:e}}}let i=(M=D.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:M.placement;if(!i){switch(u){case"bestFit":{var R;const t=(R=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:R[0];if(t){i=t}break}case"initialPlacement":i=s;break}}if(r!==i){return{reset:{placement:i}}}}return{}}}};async function _i(t,e){const{placement:i,platform:a,elements:r}=t;const n=await(a.isRTL==null?void 0:a.isRTL(r.floating));const o=Mi(i);const s=Ri(i);const c=Si(i)==="y";const l=["left","top"].includes(o)?-1:1;const d=n&&c?-1:1;const h=Ii(e,t);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(s&&typeof p==="number"){u=s==="end"?p*-1:p}return c?{x:u*d,y:f*l}:{x:f*l,y:u*d}}const Ki=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){var i,a;const{x:r,y:n,placement:o,middlewareData:s}=e;const c=await _i(e,t);if(o===((i=s.offset)==null?void 0:i.placement)&&(a=s.arrow)!=null&&a.alignmentOffset){return{}}return{x:r+c.x,y:n+c.y,data:{...c,placement:o}}}}};const Vi=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:i,y:a,placement:r}=e;const{mainAxis:n=true,crossAxis:o=false,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...c}=Ii(t,e);const l={x:i,y:a};const d=await Hi(e,c);const h=Si(Mi(r));const f=Ci(h);let u=l[f];let p=l[h];if(n){const t=f==="y"?"top":"left";const e=f==="y"?"bottom":"right";const i=u+d[t];const a=u-d[e];u=Di(i,u,a)}if(o){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const i=p+d[t];const a=p-d[e];p=Di(i,p,a)}const b=s.fn({...e,[f]:u,[h]:p});return{...b,data:{x:b.x-i,y:b.y-a}}}}};const qi=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(e){const{placement:i,rects:a,platform:r,elements:n}=e;const{apply:o=(()=>{}),...s}=Ii(t,e);const c=await Hi(e,s);const l=Mi(i);const d=Ri(i);const h=Si(i)==="y";const{width:f,height:u}=a.floating;let p;let b;if(l==="top"||l==="bottom"){p=l;b=d===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"}else{b=l;p=d==="end"?"top":"bottom"}const m=u-c[p];const g=f-c[b];const v=!e.middlewareData.shift;let y=m;let k=g;if(h){const t=f-c.left-c.right;k=d||v?gi(g,t):t}else{const t=u-c.top-c.bottom;y=d||v?gi(m,t):t}if(v&&!d){const t=vi(c.left,0);const e=vi(c.right,0);const i=vi(c.top,0);const a=vi(c.bottom,0);if(h){k=f-2*(t!==0||e!==0?t+e:vi(c.left,c.right))}else{y=u-2*(i!==0||a!==0?i+a:vi(c.top,c.bottom))}}await o({...e,availableWidth:k,availableHeight:y});const x=await r.getDimensions(n.floating);if(f!==x.width||u!==x.height){return{reset:{rects:true}}}return{}}}};function Ji(t){if(Xi(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function Gi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zi(t){var e;return(e=(Xi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xi(t){return t instanceof Node||t instanceof Gi(t).Node}function Qi(t){return t instanceof Element||t instanceof Gi(t).Element}function ta(t){return t instanceof HTMLElement||t instanceof Gi(t).HTMLElement}function ea(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof Gi(t).ShadowRoot}function ia(t){const{overflow:e,overflowX:i,overflowY:a,display:r}=ca(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+i)&&!["inline","contents"].includes(r)}function aa(t){return["table","td","th"].includes(Ji(t))}function ra(t){const e=oa();const i=ca(t);return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":false)||!e&&(i.backdropFilter?i.backdropFilter!=="none":false)||!e&&(i.filter?i.filter!=="none":false)||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function na(t){let e=da(t);while(ta(e)&&!sa(e)){if(ra(e)){return e}else{e=da(e)}}return null}function oa(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function sa(t){return["html","body","#document"].includes(Ji(t))}function ca(t){return Gi(t).getComputedStyle(t)}function la(t){if(Qi(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function da(t){if(Ji(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||ea(t)&&t.host||Zi(t);return ea(e)?e.host:e}function ha(t){const e=da(t);if(sa(e)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ta(e)&&ia(e)){return e}return ha(e)}function fa(t,e,i){var a;if(e===void 0){e=[]}if(i===void 0){i=true}const r=ha(t);const n=r===((a=t.ownerDocument)==null?void 0:a.body);const o=Gi(r);if(n){return e.concat(o,o.visualViewport||[],ia(r)?r:[],o.frameElement&&i?fa(o.frameElement):[])}return e.concat(r,fa(r,[],i))}function ua(t){const e=ca(t);let i=parseFloat(e.width)||0;let a=parseFloat(e.height)||0;const r=ta(t);const n=r?t.offsetWidth:i;const o=r?t.offsetHeight:a;const s=yi(i)!==n||yi(a)!==o;if(s){i=n;a=o}return{width:i,height:a,$:s}}function pa(t){return!Qi(t)?t.contextElement:t}function ba(t){const e=pa(t);if(!ta(e)){return xi(1)}const i=e.getBoundingClientRect();const{width:a,height:r,$:n}=ua(e);let o=(n?yi(i.width):i.width)/a;let s=(n?yi(i.height):i.height)/r;if(!o||!Number.isFinite(o)){o=1}if(!s||!Number.isFinite(s)){s=1}return{x:o,y:s}}const ma=xi(0);function ga(t){const e=Gi(t);if(!oa()||!e.visualViewport){return ma}return{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function va(t,e,i){if(e===void 0){e=false}if(!i||e&&i!==Gi(t)){return false}return e}function ya(t,e,i,a){if(e===void 0){e=false}if(i===void 0){i=false}const r=t.getBoundingClientRect();const n=pa(t);let o=xi(1);if(e){if(a){if(Qi(a)){o=ba(a)}}else{o=ba(t)}}const s=va(n,i,a)?ga(n):xi(0);let c=(r.left+s.x)/o.x;let l=(r.top+s.y)/o.y;let d=r.width/o.x;let h=r.height/o.y;if(n){const t=Gi(n);const e=a&&Qi(a)?Gi(a):a;let i=t;let r=i.frameElement;while(r&&a&&e!==i){const t=ba(r);const e=r.getBoundingClientRect();const a=ca(r);const n=e.left+(r.clientLeft+parseFloat(a.paddingLeft))*t.x;const o=e.top+(r.clientTop+parseFloat(a.paddingTop))*t.y;c*=t.x;l*=t.y;d*=t.x;h*=t.y;c+=n;l+=o;i=Gi(r);r=i.frameElement}}return ji({width:d,height:h,x:c,y:l})}const ka=[":popover-open",":modal"];function xa(t){return ka.some((e=>{try{return t.matches(e)}catch(t){return false}}))}function wa(t){let{elements:e,rect:i,offsetParent:a,strategy:r}=t;const n=r==="fixed";const o=Zi(a);const s=e?xa(e.floating):false;if(a===o||s&&n){return i}let c={scrollLeft:0,scrollTop:0};let l=xi(1);const d=xi(0);const h=ta(a);if(h||!h&&!n){if(Ji(a)!=="body"||ia(o)){c=la(a)}if(ta(a)){const t=ya(a);l=ba(a);d.x=t.x+a.clientLeft;d.y=t.y+a.clientTop}}return{width:i.width*l.x,height:i.height*l.y,x:i.x*l.x-c.scrollLeft*l.x+d.x,y:i.y*l.y-c.scrollTop*l.y+d.y}}function za(t){return Array.from(t.getClientRects())}function Da(t){return ya(Zi(t)).left+la(t).scrollLeft}function Ia(t){const e=Zi(t);const i=la(t);const a=t.ownerDocument.body;const r=vi(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth);const n=vi(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let o=-i.scrollLeft+Da(t);const s=-i.scrollTop;if(ca(a).direction==="rtl"){o+=vi(e.clientWidth,a.clientWidth)-r}return{width:r,height:n,x:o,y:s}}function Ma(t,e){const i=Gi(t);const a=Zi(t);const r=i.visualViewport;let n=a.clientWidth;let o=a.clientHeight;let s=0;let c=0;if(r){n=r.width;o=r.height;const t=oa();if(!t||t&&e==="fixed"){s=r.offsetLeft;c=r.offsetTop}}return{width:n,height:o,x:s,y:c}}function Ra(t,e){const i=ya(t,true,e==="fixed");const a=i.top+t.clientTop;const r=i.left+t.clientLeft;const n=ta(t)?ba(t):xi(1);const o=t.clientWidth*n.x;const s=t.clientHeight*n.y;const c=r*n.x;const l=a*n.y;return{width:o,height:s,x:c,y:l}}function Ca(t,e,i){let a;if(e==="viewport"){a=Ma(t,i)}else if(e==="document"){a=Ia(Zi(t))}else if(Qi(e)){a=Ra(e,i)}else{const i=ga(t);a={...e,x:e.x-i.x,y:e.y-i.y}}return ji(a)}function Aa(t,e){const i=da(t);if(i===e||!Qi(i)||sa(i)){return false}return ca(i).position==="fixed"||Aa(i,e)}function Sa(t,e){const i=e.get(t);if(i){return i}let a=fa(t,[],false).filter((t=>Qi(t)&&Ji(t)!=="body"));let r=null;const n=ca(t).position==="fixed";let o=n?da(t):t;while(Qi(o)&&!sa(o)){const e=ca(o);const i=ra(o);if(!i&&e.position==="fixed"){r=null}const s=n?!i&&!r:!i&&e.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ia(o)&&!i&&Aa(t,o);if(s){a=a.filter((t=>t!==o))}else{r=e}o=da(o)}e.set(t,a);return a}function Ta(t){let{element:e,boundary:i,rootBoundary:a,strategy:r}=t;const n=i==="clippingAncestors"?Sa(e,this._c):[].concat(i);const o=[...n,a];const s=o[0];const c=o.reduce(((t,i)=>{const a=Ca(e,i,r);t.top=vi(a.top,t.top);t.right=gi(a.right,t.right);t.bottom=gi(a.bottom,t.bottom);t.left=vi(a.left,t.left);return t}),Ca(e,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fa(t){const{width:e,height:i}=ua(t);return{width:e,height:i}}function Ba(t,e,i){const a=ta(e);const r=Zi(e);const n=i==="fixed";const o=ya(t,true,n,e);let s={scrollLeft:0,scrollTop:0};const c=xi(0);if(a||!a&&!n){if(Ji(e)!=="body"||ia(r)){s=la(e)}if(a){const t=ya(e,true,n,e);c.x=t.x+e.clientLeft;c.y=t.y+e.clientTop}else if(r){c.x=Da(r)}}const l=o.left+s.scrollLeft-c.x;const d=o.top+s.scrollTop-c.y;return{x:l,y:d,width:o.width,height:o.height}}function $a(t,e){if(!ta(t)||ca(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function Ea(t,e){const i=Gi(t);if(!ta(t)||xa(t)){return i}let a=$a(t,e);while(a&&aa(a)&&ca(a).position==="static"){a=$a(a,e)}if(a&&(Ji(a)==="html"||Ji(a)==="body"&&ca(a).position==="static"&&!ra(a))){return i}return a||na(t)||i}const Oa=async function(t){const e=this.getOffsetParent||Ea;const i=this.getDimensions;return{reference:Ba(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}};function Na(t){return ca(t).direction==="rtl"}const Wa={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Zi,getClippingRect:Ta,getOffsetParent:Ea,getElementRects:Oa,getClientRects:za,getDimensions:Fa,getScale:ba,isElement:Qi,isRTL:Na};function La(t,e){let i=null;let a;const r=Zi(t);function n(){var t;clearTimeout(a);(t=i)==null||t.disconnect();i=null}function o(s,c){if(s===void 0){s=false}if(c===void 0){c=1}n();const{left:l,top:d,width:h,height:f}=t.getBoundingClientRect();if(!s){e()}if(!h||!f){return}const u=ki(d);const p=ki(r.clientWidth-(l+h));const b=ki(r.clientHeight-(d+f));const m=ki(l);const g=-u+"px "+-p+"px "+-b+"px "+-m+"px";const v={rootMargin:g,threshold:vi(0,gi(1,c))||1};let y=true;function k(t){const e=t[0].intersectionRatio;if(e!==c){if(!y){return o()}if(!e){a=setTimeout((()=>{o(false,1e-7)}),100)}else{o(false,e)}}y=false}try{i=new IntersectionObserver(k,{...v,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(k,v)}i.observe(t)}o(true);return n}function ja(t,e,i,a){if(a===void 0){a={}}const{ancestorScroll:r=true,ancestorResize:n=true,elementResize:o=typeof ResizeObserver==="function",layoutShift:s=typeof IntersectionObserver==="function",animationFrame:c=false}=a;const l=pa(t);const d=r||n?[...l?fa(l):[],...fa(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:true});n&&t.addEventListener("resize",i)}));const h=l&&s?La(l,i):null;let f=-1;let u=null;if(o){u=new ResizeObserver((t=>{let[a]=t;if(a&&a.target===l&&u){u.unobserve(e);cancelAnimationFrame(f);f=requestAnimationFrame((()=>{var t;(t=u)==null||t.observe(e)}))}i()}));if(l&&!c){u.observe(l)}u.observe(e)}let p;let b=c?ya(t):null;if(c){m()}function m(){const e=ya(t);if(b&&(e.x!==b.x||e.y!==b.y||e.width!==b.width||e.height!==b.height)){i()}b=e;p=requestAnimationFrame(m)}i();return()=>{var t;d.forEach((t=>{r&&t.removeEventListener("scroll",i);n&&t.removeEventListener("resize",i)}));h==null||h();(t=u)==null||t.disconnect();u=null;if(c){cancelAnimationFrame(p)}}}const Pa=Vi;const Ya=Ui;const Ha=qi;const Ua=(t,e,i)=>{const a=new Map;const r={platform:Wa,...i};const n={...r.platform,_c:a};return Yi(t,e,{...r,platform:n})};const _a='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}';const Ka=_a;const Va=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.mode="date";this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.step=5;this.attachToElement=false;this.position=undefined;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.nativePickerAttributes=undefined}get input(){return this._input?.shadowRoot?.querySelector("input")??undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);if(this.mode!=="daterange"||t.includes(" - ")){this.catChange.emit(t)}}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>{this.input?this.input.disabled=this.disabled:null;this.pickr=this.initDatepicker(this.input)}))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onMinChanged(){this.pickr?.set("minDate",this.min);this.pickr?.set("maxDate",this.max);if(this.value&&!this.pickr?.selectedDates?.length){this.pickr?.clear()}}async doFocus(t){this._input?.doFocus(t)}async doBlur(){this._input?.doBlur()}render(){return[e("cat-input",{key:"bb983974c17139ee60d88877e398b1c46d672d37",ref:t=>this._input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>{t.stopPropagation();this.value=t.detail||undefined},onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.catBlur.emit(t.detail)}},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))),e("div",{key:"c8112214544e0582a1196350a846ddeb063067a3",ref:t=>this._calendarWrapper=t,class:"datepicker-wrapper"})]}initDatepicker(t){if(!t){return}const e=!!oi("cat-dropdown",t);const i=e?{"data-dropdown-no-close":""}:{};return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,appendTo:this.attachToElement?this._calendarWrapper:undefined,nativePickerAttributes:{...i,...this.nativePickerAttributes},position:this.attachToElement?(t,e)=>{this.updatePosition(t,e)}:this.position||undefined,onReady:(e,i,a)=>{ja(t,a.calendarContainer,(()=>this.updatePosition(a,a._input)))},applyChange:t=>this.value=t}))}updatePosition(t,e){if(e){Ua(e,t.calendarContainer,{strategy:"fixed",placement:this.position||"bottom-start",middleware:[Ya()]}).then((({x:e,y:i,placement:a})=>{if(t.calendarContainer){t.calendarContainer.dataset.placement=a;Object.assign(t.calendarContainer.style,{left:`${e}px`,top:`${i}px`,position:"fixed"})}}))}}get hostElement(){return a(this)}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}}};Va.style=Ka;const qa='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}';const Ja=qa;const Ga=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.disabled=false;this.max=undefined;this.min=undefined;this.mode="date";this.readonly=false;this.step=5;this.value=undefined;this.nativePickerAttributes=undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);this.catChange.emit(t)}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>this.pickr=this.initDatepicker(this.input)))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}render(){return e(i,{key:"6f363a4a673603f0c39f5a24b31bb768e804abfc"},e("div",{key:"2c56934aad4d60ea96a6a3c983ae9d1e39c82bde",tabIndex:this.disabled||this.readonly?-1:undefined,class:{"datepicker-wrapper":true,"datepicker-disabled":this.disabled,"datepicker-readonly":this.readonly}},e("input",{key:"6885c1c919af468401dddda38045ab9a8dc26aaf",ref:t=>this.input=t,value:this.value,disabled:this.disabled,readonly:this.readonly})))}initDatepicker(t){if(!t){return}return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,nativePickerAttributes:this.nativePickerAttributes??{},applyChange:t=>this.value=t},{...this.disabled?{enable:[]}:{},inline:true}))}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}}};Ga.style=Ja;const Za=125; +import{r as t,h as e,H as i,g as a,c as r}from"./p-20919029.js";import{e as n,O as o,f as s,E as c,S as l,g as d,h,i as f,j as u,k as p,l as b,m,n as g,p as v,q as y,r as k,s as x,t as w,u as z,a as D,c as I,d as M,o as R}from"./p-2c8ac8cf.js";const C=n((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class A extends o{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new S(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new C}}next(t){s((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){s((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){s((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:a}=this;if(e||i){return c}this.currentObservers=null;a.push(t);return new l((()=>{this.currentObservers=null;d(a,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:a}=this;if(e){t.error(i)}else if(a){t.complete()}}asObservable(){const t=new o;t.source=this;return t}}A.create=(t,e)=>new S(t,e);class S extends A{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0?void 0:i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0?void 0:i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:c}}const T={now(){return(T.delegate||Date).now()},delegate:undefined};class F extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const B={setInterval(t,e,...i){const{delegate:a}=B;if(a===null||a===void 0?void 0:a.setInterval){return a.setInterval(t,e,...i)}return setInterval(t,e,...i)},clearInterval(t){const{delegate:e}=B;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class $ extends F{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var i;if(this.closed){return this}this.state=t;const a=this.id;const r=this.scheduler;if(a!=null){this.id=this.recycleAsyncId(r,a,e)}this.pending=true;this.delay=e;this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,i=0){return B.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===false){return e}if(e!=null){B.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const i=this._execute(t,e);if(i){return i}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let i=false;let a;try{this.work(t)}catch(t){i=true;a=t?t:new Error("Scheduled action threw falsy error")}if(i){this.unsubscribe();return a}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:i}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(i,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class E{constructor(t,e=E.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}E.now=T.now;class O extends E{constructor(t,e=E.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=true;do{if(i=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(i){while(t=e.shift()){t.unsubscribe()}throw i}}}const N=new O($);const W=N;const L=new o((t=>t.complete()));const j=n((t=>function e(){t(this);this.name="EmptyError";this.message="no elements in sequence"}));function P(t){return t instanceof Date&&!isNaN(t)}function Y(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{a.next(t.call(e,i,r++))})))}))}const{isArray:H}=Array;function U(t,e){return H(e)?t(...e):t(e)}function _(t){return Y((e=>U(t,e)))}function K(t,e,i,a,r,n,o,s){const c=[];let l=0;let d=0;let h=false;const b=()=>{if(h&&!c.length&&!l){e.complete()}};const m=t=>l{n&&e.next(t);l++;let s=false;u(i(t,d++)).subscribe(f(e,(t=>{r===null||r===void 0?void 0:r(t);if(n){m(t)}else{e.next(t)}}),(()=>{s=true}),undefined,(()=>{if(s){try{l--;while(c.length&&lg(t)))}else{g(t)}}b()}catch(t){e.error(t)}}})))};t.subscribe(f(e,m,(()=>{h=true;b()})));return()=>{s===null||s===void 0?void 0:s()}}function V(t,e,i=Infinity){if(b(e)){return V(((i,a)=>Y(((t,r)=>e(i,t,a,r)))(u(t(i,a)))),i)}else if(typeof e==="number"){i=e}return h(((e,a)=>K(e,a,t,i)))}function q(t=Infinity){return V(m,t)}function J(){return q(1)}function G(...t){return J()(g(t,v(t)))}const Z=["addListener","removeListener"];const X=["addEventListener","removeEventListener"];const Q=["on","off"];function tt(t,e,i,a){if(b(i)){a=i;i=undefined}if(a){return tt(t,e,i).pipe(_(a))}const[r,n]=rt(t)?X.map((a=>r=>t[a](e,r,i))):it(t)?Z.map(et(t,e)):at(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,i)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1n(e)}))}function et(t,e){return i=>a=>t[i](e,a)}function it(t){return b(t.addListener)&&b(t.removeListener)}function at(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,i=W){let a=-1;if(e!=null){if(k(e)){i=e}else{a=e}}return new o((e=>{let r=P(t)?+t-i.now():t;if(r<0){r=0}let n=0;return i.schedule((function(){if(!e.closed){e.next(n++);if(0<=a){this.schedule(undefined,a)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const i=x(t,Infinity);const a=t;return!a.length?L:a.length===1?u(a[0]):q(i)(g(a,e))}function st(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>t.call(e,i,r++)&&a.next(i))))}))}function ct(t){return h(((e,i)=>{let a=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}o&&i.complete()};const c=()=>{n=null;o&&i.complete()};e.subscribe(f(i,(e=>{a=true;r=e;if(!n){u(t(e)).subscribe(n=f(i,s,c))}}),(()=>{o=true;(!a||!n||n.closed)&&i.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,i)=>{let a=null;let r=false;let n;a=e.subscribe(f(i,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(a){a.unsubscribe();a=null;n.subscribe(i)}else{r=true}})));if(r){a.unsubscribe();a=null;n.subscribe(i)}}))}function ht(t,e,i,a,r){return(n,o)=>{let s=i;let c=e;let l=0;n.subscribe(f(o,(e=>{const i=l++;c=s?t(c,e,i):(s=true,e);a&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,i)=>{let a=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}};e.subscribe(f(i,(e=>{n===null||n===void 0?void 0:n.unsubscribe();a=true;r=e;n=f(i,o,w);u(t(e)).subscribe(n)}),(()=>{o();i.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>{if(!a){i.next(t)}i.complete()})))}))}function pt(t){return t<=0?()=>L:h(((e,i)=>{let a=0;e.subscribe(f(i,(e=>{if(++a<=t){i.next(e);if(t<=a){i.complete()}}})))}))}function bt(){return h(((t,e)=>{t.subscribe(f(e,w))}))}function mt(t){return Y((()=>t))}function gt(t,e){if(e){return i=>G(e.pipe(pt(1),bt()),i.pipe(gt(t)))}return V(((e,i)=>u(t(e,i)).pipe(pt(1),mt(e))))}function vt(t,e=N){const i=nt(t,e);return gt((()=>i))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((i,a)=>{let r;let n=true;i.subscribe(f(a,(i=>{const o=e(i);if(n||!t(r,o)){n=false;r=o;a.next(i)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>a?i.complete():i.error(t()))))}))}function wt(){return new j}function zt(t,e){const i=arguments.length>=2;return a=>a.pipe(t?st(((e,i)=>t(e,i,a))):m,pt(1),i?ut(e):xt((()=>new j)))}function Dt(t,e){return h(ht(t,e,arguments.length>=2,true))}function It(...t){const e=v(t);return h(((i,a)=>{(e?G(t,i,e):G(t,i)).subscribe(a)}))}function Mt(t,e){return h(((i,a)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&a.complete();i.subscribe(f(a,(i=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(i,c)).subscribe(r=f(a,(t=>a.next(e?e(i,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Rt(t){return h(((e,i)=>{u(t).subscribe(f(i,(()=>i.complete()),w));!i.closed&&e.subscribe(i)}))}function Ct(t,e=false){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{const n=t(i,r++);(n||e)&&a.next(i);!n&&a.complete()})))}))}function At(t,e,i){const a=b(t)||e||i?{next:t,error:e,complete:i}:t;return a?h(((t,e)=>{var i;(i=a.subscribe)===null||i===void 0?void 0:i.call(a);let r=true;t.subscribe(f(e,(t=>{var i;(i=a.next)===null||i===void 0?void 0:i.call(a,t);e.next(t)}),(()=>{var t;r=false;(t=a.complete)===null||t===void 0?void 0:t.call(a);e.complete()}),(t=>{var i;r=false;(i=a.error)===null||i===void 0?void 0:i.call(a,t);e.error(t)}),(()=>{var t,e;if(r){(t=a.unsubscribe)===null||t===void 0?void 0:t.call(a)}(e=a.finalize)===null||e===void 0?void 0:e.call(a)})))})):m}function St(t,e,i){if(!t.hostElement.hasAttribute(e)&&i!=null){t.hostElement.setAttribute(e,String(i))}}const Tt=":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:var(--cat-border-radius-l, 0.5rem)}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.content{align-self:center;width:100%}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=secondary]){background-color:rgb(var(--cat-secondary-bg, 105, 118, 135));color:rgb(var(--cat-secondary-fill, 255, 255, 255));--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=info]){background-color:rgb(var(--cat-info-bg, 0, 115, 230));color:rgb(var(--cat-info-fill, 255, 255, 255));--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=success]){background-color:rgb(var(--cat-success-bg, 0, 132, 88));color:rgb(var(--cat-success-fill, 255, 255, 255));--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=warning]){background-color:rgb(var(--cat-warning-bg, 255, 206, 128));color:rgb(var(--cat-warning-fill, 0, 0, 0));--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}:host([color=danger]){background-color:rgb(var(--cat-danger-bg, 217, 52, 13));color:rgb(var(--cat-danger-fill, 255, 255, 255));--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}";const Ft=Tt;const Bt=class{constructor(e){t(this,e);this.mapIcon=new Map([["primary","$cat:alert-primary"],["secondary","$cat:alert-secondary"],["info","$cat:alert-info"],["success","$cat:alert-success"],["warning","$cat:alert-warning"],["danger","$cat:alert-danger"]]);this.mapRole=new Map([["primary","status"],["secondary","status"],["info","status"],["success","status"],["warning","alert"],["danger","alert"]]);this.color="primary";this.icon=undefined;this.noIcon=false}connectedCallback(){St(this,"tabindex",0);St(this,"role",this.mapRole.get(this.color))}render(){return e(i,{key:"65e08f5679d761056c71407b03b0b22fb5aa5c94"},!this.noIcon&&e("cat-icon",{size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"b85309b1867b896244a0cda0ababb2e66ca2d01a",class:"content"},e("slot",{key:"ed88e2f275b189f5ae75ba3220b6f30be36699b4"})))}get hostElement(){return a(this)}};Bt.style=Ft;const $t=t=>new Promise(((e,i)=>{const a=new Image;a.addEventListener("load",e);a.addEventListener("error",i);a.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:inherit;color:var(--cat-avatar-fill, #515c6c);background-color:var(--cat-avatar-bg, #f2f4f7);background-size:cover;background-position:center;white-space:nowrap;overflow:hidden;vertical-align:middle;font-weight:600;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.avatar:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.avatar-round{border-radius:50%}.avatar-xs{width:var(--cat-avatar-size, 1.5rem);height:var(--cat-avatar-size, 1.5rem);line-height:var(--cat-avatar-size, 1.5rem);font-size:var(--cat-avatar-font-size, 0.75rem)}.avatar-s{width:var(--cat-avatar-size, 2rem);height:var(--cat-avatar-size, 2rem);line-height:var(--cat-avatar-size, 2rem);font-size:var(--cat-avatar-font-size, 0.875rem)}.avatar-m{width:var(--cat-avatar-size, 2.5rem);height:var(--cat-avatar-size, 2.5rem);line-height:var(--cat-avatar-size, 2.5rem);font-size:var(--cat-avatar-font-size, 0.9375rem)}.avatar-l{width:var(--cat-avatar-size, 3rem);height:var(--cat-avatar-size, 3rem);line-height:var(--cat-avatar-size, 3rem);font-size:var(--cat-avatar-font-size, 1.125rem)}.avatar-xl{width:var(--cat-avatar-size, 3.5rem);height:var(--cat-avatar-size, 3.5rem);line-height:var(--cat-avatar-size, 3.5rem);font-size:var(--cat-avatar-font-size, 1.25rem)}";const Ot=Et;const Nt=class{constructor(e){t(this,e);this.backgroundImage=undefined;this.size="m";this.round=false;this.label="";this.initials=undefined;this.src=undefined;this.icon=undefined;this.url=undefined;this.urlTarget=undefined}onSrcChanged(t){if(t){$t(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}componentWillRender(){if(!this.label){z.warn("[A11y] Missing ARIA label on avatar",this)}}render(){if(this.url){return e("a",{href:this.url,target:this.urlTarget,style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}else{return e("span",{style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}}get content(){return!this.backgroundImage?[this.icon?e("cat-icon",{icon:this.icon,size:this.size}):this.getInitials()]:[]}get cssStyle(){return{"background-image":this.backgroundImage}}get cssClass(){return{avatar:true,"avatar-round":this.round,[`avatar-${this.size}`]:Boolean(this.size)}}getInitials(){return this.initials??(this.label??"").split(" ").map((t=>t[0])).join("")}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Wt=":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";const Lt=Wt;const jt=class{constructor(e){t(this,e);this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false}render(){return e("slot",{key:"8254c840d9f008183db57fc58dd3a092c7a0378c"})}get hostElement(){return a(this)}};jt.style=Lt;const Pt=["xs","s","m","l","xl"];const Yt={xs:"(max-width: 539.98px)",s:"(max-width: 767.98px)",m:"(max-width: 991.98px)",l:"(max-width: 1199.98px)",xl:"(max-width: 1399.98px)"};function Ht(t){return typeof t==="string"&&Pt.includes(t)}let Ut;try{Ut=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Ut=false}class _t{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Ut)&&typeof CSS!=="undefined"&&!this.EDGE&&!this.TRIDENT;this.WEBKIT=/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;this.IOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);this.FIREFOX=/(firefox|minefield)/i.test(navigator.userAgent);this.ANDROID=/android/i.test(navigator.userAgent)&&!this.TRIDENT;this.SAFARI=/safari/i.test(navigator.userAgent)&&this.WEBKIT}}const Kt=new Set;let Vt;class qt{constructor(){this._platform=new _t;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Jt(t)}return this._matchMedia(t)}}function Jt(t){if(Kt.has(t)){return}try{if(!Vt){Vt=document.createElement("style");Vt.setAttribute("type","text/css");document.head.appendChild(Vt)}if(Vt.sheet){Vt.sheet.insertRule(`@media ${t} {body{ }}`,0);Kt.add(t)}}catch(t){z.error(t)}}const Gt=':host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/"";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;min-width:2rem;max-height:3rem;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}';const Zt=Gt;const Xt=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._iconOnly=true;this.variant="outlined";this.color="secondary";this.active=false;this.size="m";this.name=undefined;this.value=undefined;this.disabled=false;this.loading=false;this.submit=false;this.noEllipsis=false;this.round=false;this.url=undefined;this.urlTarget=undefined;this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.buttonId=undefined;this.a11yLabel=undefined;this.a11yCurrent=undefined;this.nativeAttributes=undefined;this.nativeContentAttributes=undefined;this.buttonGroupPosition=undefined}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(Ht(t)){this.mediaMatcher??(this.mediaMatcher=new qt);this.mediaQueryList=this.mediaMatcher.matchMedia(Yt[t]);this.mediaQueryListener=t=>this._iconOnly=t.matches;this.mediaQueryList.addEventListener("change",this.mediaQueryListener);this._iconOnly=this.mediaQueryList.matches}else{this._iconOnly=t}}componentWillLoad(){this.onIconOnlyChanged(this.iconOnly)}componentWillRender(){if(this.isIconButton&&!this.a11yLabel){z.warn("[A11y] Missing ARIA label on icon button",this)}}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){if(this.url){return e("a",{...this.nativeAttributes,ref:t=>this.button=t,href:this.disabled?undefined:this.url,target:this.urlTarget,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}else{return e("button",{...this.nativeAttributes,ref:t=>this.button=t,type:this.submit?"submit":"button",name:this.name,value:this.value,disabled:this.disabled,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round??this.isIconButton,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size),[`cat-group-button-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition),"cat-group-button":Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}}get iconSize(){switch(this.size){case"xs":return"s";default:return"l"}}get spinnerSize(){switch(this.size){case"xs":return"xs";default:return"m"}}get isIconButton(){return Boolean(this.icon)&&this._iconOnly}get hasPrefixIcon(){return Boolean(this.icon)&&!this._iconOnly&&!this.iconRight}get hasSuffixIcon(){return Boolean(this.icon)&&!this._iconOnly&&this.iconRight}get content(){return[this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconButton?e("cat-icon",{icon:this.icon,size:this.iconSize}):e("span",{class:"cat-button-content",part:"content",...this.nativeContentAttributes},e("span",{class:"cat-button-content-inner"},e("slot",null))),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"suffix"}):null,this.loading?e("cat-spinner",{size:this.spinnerSize}):null]}onClick(t){this.catClick.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Xt.style=Zt;const Qt=":host{position:relative;display:inline-flex;vertical-align:middle}::slotted(cat-button[variant=outlined]),::slotted(cat-button:not([variant])){margin-right:-1px}::slotted(cat-button[variant=outlined]:last-child),::slotted(cat-button:not([variant]):last-child){margin-right:0}";const te=Qt;const ee=class{constructor(e){t(this,e);this.formElements=[];this.a11yLabel=undefined}render(){return e(i,{key:"736974e0eb79714f8718e90cb4b533cff13e123f",role:"group","aria-label":this.a11yLabel},e("slot",{key:"7894f468e3e265b67b7eb1c670966d4b55c97ce2",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-button"));this.formElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.formElements.length-1?"last":"middle"}))}get hostElement(){return a(this)}};ee.style=te;const ie=":host{display:block;border-radius:var(--cat-border-radius-l, 0.5rem);background-color:white;padding:1.25rem}:host([hidden]){display:none}::slotted(:last-child){margin-bottom:0 !important}::slotted(nav),::slotted(nav:last-child){margin:-1rem -1rem !important}::slotted(.cat-card-pull){margin:-1.25rem !important;width:calc(100% + 2.5rem) !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-h){margin-left:-1.25rem !important;margin-right:-1.25rem !important;width:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-v){margin-top:-1.25rem !important;margin-bottom:-1.25rem !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-t){margin-top:-1.25rem !important}::slotted(.cat-card-pull-l){margin-left:-1.25rem !important}::slotted(.cat-card-pull-r){margin-right:-1.25rem !important}::slotted(.cat-card-pull-b){margin-bottom:-1.25rem !important}";const ae=ie;const re=class{constructor(e){t(this,e)}render(){return e("slot",{key:"58d43efd186dd1e2ee48363f501298ebb761f3ba"})}};re.style=ae;const ne=t=>{const{id:i,hint:a,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:i+"-hint",class:"hint-section"},o.length?o.map((([i,a])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},D.t(`error.${i}`,a)))):[a&&(Array.isArray(a)?a.map((i=>e("p",{class:(t.class??"")+" input-hint"},i))):e("p",{class:(t.class??"")+" input-hint"},a)),r])};const oe=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const se=oe;let ce=0;const le=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-checkbox-${ce++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.indeterminate=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on checkbox",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"4717606c6860aa834b0be517a990e7c9b3d12ca4"},e("label",{key:"f10b076bce44f869fac2ba524c9b84a9d35540d4",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"9c1ce8476f5336e1bda998998233f1576fa04304",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"54bfdef569a5653d8cf49c8138907e17525f282e",class:"box","aria-hidden":"true"},e("svg",{key:"cdd7a17cbd71c788af281f83f936cae6f8ce7e52",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"ee39ce12ece8d32ad5aca05183ab43b49ca278c7",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"5593c28f8cd548031d6b3823e9491a4bcc8246e3",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"49e30776717be8566e6a135bf791918a93a6f429",points:"1.5 5 10.5 5"}))),e("span",{key:"4461a4d9e42548e5acea1e991b044f7b135f9b67",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"box-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.indeterminate=this.input.indeterminate;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};le.style=se;function de(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function he(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function fe(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return{firstDay:i?.firstDay??1,minDays:i?.minDays??4,weekend:i?.weekend??[6,7]}}function ue(t){const e=new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(3456,10,22)).replace("3456","YYYY").replace("56","YY").replace("11","MM").replace("22","DD");return/^(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)$/.test(e)?e:"DD-MM-YYYY"}function pe(t){return{prevYear:D.t("datepicker.prevYear"),nextYear:D.t("datepicker.nextYear"),prevMonth:D.t("datepicker.prevMonth"),nextMonth:D.t("datepicker.nextMonth"),arrowKeys:D.t("datepicker.arrowKeys"),today:D.t("datepicker.today"),change:D.t("datepicker.change"),choose:D.t("datepicker.choose"),clear:D.t("datepicker.clear"),formatStr:ue(t),weekInfo:fe(t),days:{short:de(t,"short"),long:de(t,"long")},months:{short:he(t,"short"),long:he(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,i,a,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(i),Number(a)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const i=(t.getMonth()+1).toString().padStart(2,"0");const a=t.getDate().toString().padStart(2,"0");return`${e}-${i}-${a}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function be(t){return t%4===0&&t%100!==0||t%400===0}function me(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ge(t,e){const[i,a,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,be(i)?29:28,31,30,31,30,31,31,30,31,30,31];const o=new Date(t);o.setDate(1);o.setMonth(o.getMonth()+e);o.setDate(Math.min(r,n[(a+e%12+12)%12]));return o}function ve(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ye(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ve(t,e)}function ke(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ye(t,e)}function xe(t,e,i){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),i?.getTime()??Infinity))}const we=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}cat-date-inline{margin:1rem;width:20rem}";const ze=we;const De=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=pe(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end"}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}get inputValue(){const[t,e,i,a]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(i)-1,Number(a));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:i,datePattern:[e,a,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"d588c96f031fc8ab9518d13dfaac730a0d424caa"},e("cat-input",{key:"f49f0682e2f2fe3dfcd89477bda91fe46ed44dfa",class:"cat-date-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,value:this.inputValue,onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"68ef0708d25128b9a52d60c5b1a7b34e0ffb2ef1",slot:"label"},this.label,e("span",{key:"ac017335567a4e0059631e7535455d52f61f2e43",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"16a6e95f6e4f6a9b0ddd7716f0b713c8fac3fdff",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"cf7f2aaa2c5775b23f3e8826e9b0e722c4ce8be6",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"f90eef976a3102855801df5ffeee770d45e7eaba",slot:"content"},e("cat-date-inline",{key:"2a0ee2889e1077a6e403458bd3e114396590d0ed",ref:t=>this.dateInline=t,min:this.min,max:this.max,value:this.value,hint:true,weeks:true,noClear:true,onCatChange:this.onDateChange.bind(this)})))))}getTriggerA11yLabel(){const t=this.locale.fromLocalISO(this.value);return t?`${this.locale.change}, ${this.locale.toLocalStr(t)}`:this.locale.choose}onInputBlur(t){if(!this.input){return}const e=this.value;const i=this.parse(this.input.value??"");const a=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=i?xe(a,i,r):null;this.value=n?this.locale.toLocalISO(n):undefined;if(e!==this.value){if(n){this.dateInline?.select(n)}else{this.dateInline?.clear()}this.catChange.emit(this.value)}this.input.value=this.inputValue;this.catBlur.emit(t)}onDateChange(t){t.stopPropagation();const e=this.value;const i=t.detail?new Date(t.detail):null;this.value=i?this.locale.toLocalISO(i):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,a,r];const o=t.split(i).map((t=>Number(t||"x")));let s=o[n.indexOf("YYYY")||n.indexOf("YY")]||this.locale.now().getFullYear();const c=o[n.indexOf("MM")];const l=o[n.indexOf("DD")];if(!Number.isInteger(c)||!Number.isInteger(l)){return null}else if(s<100){s+=s<50?2e3:1900}return new Date(s,c-1,l)}reclamp(t,e){const i=this.value;const a=this.locale.fromLocalISO(i);const r=this.locale.fromLocalISO(e);if(!a||!r){return}const n=xe(t==="min"?r:null,a,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(i!==o){this.value=o;this.catChange.emit(o)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=ze;const Ie='/**\n * Auto-generated file. Do not edit directly.\n */\n/* stylelint-disable value-keyword-case */\n/* stylelint-enable value-keyword-case */\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n}\n.picker-head > :not(:last-child) {\n margin-right: 0.25rem;\n}\n.picker-head h3 {\n font-size: 0.9375rem;\n line-height: 1.25rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n flex: 1;\n text-align: center;\n margin-block: 0;\n}\n@container (min-width: 20rem) {\n .picker-head h3 {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n }\n .picker-head > :not(:last-child) {\n margin-right: 0.5rem;\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas: "h h h h h h h" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n.picker-weeks .picker-grid {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas: ". h h h h h h h" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 600;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n}\n.picker-foot > :not(:last-child) {\n margin-right: 0.25rem;\n}\n@container (min-width: 20rem) {\n .picker-foot > :not(:last-child) {\n margin-right: 0.5rem;\n }\n .picker-foot .cursor-help {\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: var(--cat-font-weight-body, 400);\n }\n}\n\n.cursor-help {\n margin-block: 0;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: var(--cat-font-weight-body, 400);\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-align: center;\n flex: 1;\n}\n.cursor-help:first-child {\n text-align: left;\n}\n.cursor-help:last-child {\n text-align: right;\n}\n.cursor-help:only-child {\n text-align: center;\n}\n\n.cursor-aria {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}';const Me=Ie;const Re=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.language=D.getLocale();this.locale=pe(this.language);this.focusDate=null;this.viewDate=this.locale.now();this.noClear=false;this.hint=false;this.noToday=false;this.weeks=false;this.min=undefined;this.max=undefined;this.range=false;this.value=undefined}get focusedDate(){const[t,e,i,a]=this.hostElement.shadowRoot?.querySelector(`[data-date]:focus`)?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return t?new Date(Number(e),Number(i)-1,Number(a)):null}componentWillLoad(){const[t,e]=this.getValue();if(e){this.focus(e)}else if(t){this.focus(t)}}componentDidRender(){if(this.focusDate){this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus();this.focusDate=null}}onKeyDown(t){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){return}const e=this.focusedDate;if(!e){t.preventDefault();const[e]=this.getValue();this.focus(e||this.locale.now())}else if(t.key==="ArrowLeft"){t.preventDefault();this.focus(t.shiftKey?ge(e,-1):me(e,-1))}else if(t.key==="ArrowRight"){t.preventDefault();this.focus(t.shiftKey?ge(e,1):me(e,1))}else if(t.key==="ArrowUp"){t.preventDefault();this.focus(me(e,-7))}else if(t.key==="ArrowDown"){t.preventDefault();this.focus(me(e,7))}}async select(t){if(!t){return this.clear()}const e=this.value;const[i,a]=this.getMinMaxDate();const r=xe(i,new Date(t.getFullYear(),t.getMonth(),t.getDate()),a);this.focus(r);if(this.range){const[t,e]=this.getValue();if(!t||e||rthis.navigate("prev","year"),"data-dropdown-no-close":true}),e("cat-button",{key:"90e7420d4bc9c474d322d303413bc7e0bc4ac33d",icon:"$cat:datepicker-month-prev",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.prevMonth,disabled:ye(this.viewDate,t),onClick:()=>this.navigate("prev","month"),"data-dropdown-no-close":true}),e("h3",{key:"e6a39d6e56a360a14bd5db15d53d12b5743071fc"},this.getHeadline()),e("cat-button",{key:"18bbfccbef72377967d96d1481196a0dfd1297fb",icon:"$cat:datepicker-month-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextMonth,disabled:ye(this.viewDate,a),onClick:()=>this.navigate("next","month"),"data-dropdown-no-close":true}),e("cat-button",{key:"e0773fe064c5b70a59437b388e9c4877a4ff66cd",icon:"$cat:datepicker-year-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextYear,disabled:ve(this.viewDate,a),onClick:()=>this.navigate("next","year"),"data-dropdown-no-close":true})),e("div",{key:"f6d969e0cbfc0700f3db9931ab8087ea9cab9c30",class:"picker-grid",onFocusin:()=>this.setAriaLive(this.locale.arrowKeys)},e("div",{key:"ecf39be602c6538f97ccbea7d5060c8e4b0b7f9f",class:"picker-grid-head"},Array.from(Array(7),((t,i)=>e("abbr",{title:this.locale.days.long[i]},this.locale.days.short[i])))),this.weeks&&e("div",{class:"picker-grid-weeks"},r.filter(((t,e)=>e%7===0)).map((t=>e("div",null,this.getWeekNumber(t))))),e("div",{key:"1a8ace7365879688d6952bd68eaefe73b81683de",class:"picker-grid-days"},r.map((t=>{const i=ke(n,t);const a=ke(o,t);const r=!!n&&!!o&&t>n&&tthis.select(t),"data-date":this.locale.toLocalISO(t)},t.getDate())})))),e("div",{key:"62d01f9063d213411a12315637d4835cedb975e3",class:"picker-foot"},!this.noToday&&this.canClick(this.locale.now())&&e("cat-button",{size:"s","data-dropdown-no-close":true,onClick:()=>this.select(this.locale.now())},this.locale.today),this.hint&&e("p",{class:"cursor-help"},this.locale.arrowKeys),!this.noClear&&e("cat-button",{size:"s",disabled:!this.value,"data-dropdown-no-close":true,onClick:()=>this.clear()},this.locale.clear))),e("p",{key:"5709adcbf7b1bb39ef9a2ae2525a28afc23c766d",class:"cursor-aria","aria-live":"polite"}))}focus(t){const[e,i]=this.getMinMaxDate();this.focusDate=xe(e,t,i);this.viewDate=new Date(this.focusDate.getFullYear(),this.focusDate.getMonth());this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus()}navigate(t,e){this.viewDate=new Date(t==="prev"?e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()-1):this.viewDate.setMonth(this.viewDate.getMonth()-1):e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()+1):this.viewDate.setMonth(this.viewDate.getMonth()+1));this.setAriaLive(this.getHeadline())}setAriaLive(t){const e=this.hostElement.shadowRoot?.querySelector(".cursor-aria");if(e){e.innerHTML=t}}dateGrid(t,e){const i=new Date(t,e,1).getDay();const a=new Date(t,e+1,0).getDate();const r=[...Array(a).keys()];const n=[...Array(i).keys()].map((a=>new Date(t,e,a-i).getDate()));const o=[...Array(42-r.length-n.length).keys()];return[...n.map((i=>new Date(t,e-1,i+1))),...r.map((i=>new Date(t,e,i+1))),...o.map((i=>new Date(t,e+1,i+1)))]}getHeadline(){return`${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`}getWeekNumber(t,e=true){const i=new Date(t.getTime());const a=e?i.getDay()||7:i.getDay();i.setDate(i.getDate()+4-a);const r=new Date(i.getFullYear(),0,1);return Math.ceil(((+i-+r)/864e5+1)/7)}canFocus(t){const e=this.locale.now();const[i]=this.getMinMaxDate();const a=this.focusedDate;const[r]=this.getValue();if(a&&ye(a,this.viewDate)){return ye(a,t)&&ke(a,t)}else if(r&&ye(r,this.viewDate)){return ye(r,t)&&ke(r,t)}else if(ye(this.viewDate,e)&&(!i||i<=e)){return ye(this.viewDate,t)&&ke(e,t)}const n=ye(t,i)?i?.getDate()??1:1;return ye(this.viewDate,t)&&t.getDate()===n}canClick(t){const[e,i]=this.getMinMaxDate();return(!e||e<=t)&&(!i||i>=t)}getMinMaxDate(){const t=this.locale.fromLocalISO(this.min);const e=this.locale.fromLocalISO(this.max);return[t,e]}getValue(){if(this.range){const[t,e]=JSON.parse(this.value||"[]");return[this.locale.fromLocalISO(t),this.locale.fromLocalISO(e)]}else{return[this.locale.fromLocalISO(this.value),null]}}toRangeValue(t,e){return JSON.stringify([t,e].map((t=>t?this.locale.toLocalISO(t):null)))}get hostElement(){return a(this)}};Re.style=Me;var Ce=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var Ae={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(t){return typeof console!=="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);var i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:false,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var Se={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:false};var Te=function(t,e){if(e===void 0){e=2}return("000"+t).slice(e*-1)};var Fe=function(t){return t===true?1:0};function Be(t,e){var i;return function(){var a=this;var r=arguments;clearTimeout(i);i=setTimeout((function(){return t.apply(a,r)}),e)}}var $e=function(t){return t instanceof Array?t:[t]};function Ee(t,e,i){if(i===true)return t.classList.add(e);t.classList.remove(e)}function Oe(t,e,i){var a=window.document.createElement(t);e=e||"";i=i||"";a.className=e;if(i!==undefined)a.textContent=i;return a}function Ne(t){while(t.firstChild)t.removeChild(t.firstChild)}function We(t,e){if(e(t))return t;else if(t.parentNode)return We(t.parentNode,e);return undefined}function Le(t,e){var i=Oe("div","numInputWrapper"),a=Oe("input","numInput "+t),r=Oe("span","arrowUp"),n=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){a.type="number"}else{a.type="text";a.pattern="\\d*"}if(e!==undefined)for(var o in e)a.setAttribute(o,e[o]);i.appendChild(a);i.appendChild(r);i.appendChild(n);return i}function je(t){try{if(typeof t.composedPath==="function"){var e=t.composedPath();return e[0]}return t.target}catch(e){return t.target}}var Pe=function(){return undefined};var Ye=function(t,e,i){return i.months[e?"shorthand":"longhand"][t]};var He={D:Pe,F:function(t,e,i){t.setMonth(i.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,i){t.setHours(t.getHours()%12+12*Fe(new RegExp(i.amPM[1],"i").test(e)))},M:function(t,e,i){t.setMonth(i.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,i){var a=parseInt(e);var r=new Date(t.getFullYear(),0,2+(a-1)*7,0,0,0,0);r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek);return r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Pe,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Pe,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}};var Ue={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"};var _e={Z:function(t){return t.toISOString()},D:function(t,e,i){return e.weekdays.shorthand[_e.w(t,e,i)]},F:function(t,e,i){return Ye(_e.n(t,e,i)-1,false,e)},G:function(t,e,i){return Te(_e.h(t,e,i))},H:function(t){return Te(t.getHours())},J:function(t,e){return e.ordinal!==undefined?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Fe(t.getHours()>11)]},M:function(t,e){return Ye(t.getMonth(),true,e)},S:function(t){return Te(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,i){return i.getWeek(t)},Y:function(t){return Te(t.getFullYear(),4)},d:function(t){return Te(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Te(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Te(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}};var Ke=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a,n=t.isMobile,o=n===void 0?false:n;return function(t,e,a){var n=a||r;if(i.formatDate!==undefined&&!o){return i.formatDate(t,e,n)}return e.split("").map((function(e,a,r){return _e[e]&&r[a-1]!=="\\"?_e[e](t,n,i):e!=="\\"?e:""})).join("")}};var Ve=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a;return function(t,e,a,n){if(t!==0&&!t)return undefined;var o=n||r;var s;var c=t;if(t instanceof Date)s=new Date(t.getTime());else if(typeof t!=="string"&&t.toFixed!==undefined)s=new Date(t);else if(typeof t==="string"){var l=e||(i||Ae).dateFormat;var d=String(t).trim();if(d==="today"){s=new Date;a=true}else if(i&&i.parseDate){s=i.parseDate(t,l)}else if(/Z$/.test(d)||/GMT$/.test(d)){s=new Date(t)}else{var h=void 0,f=[];for(var u=0,p=0,b="";uMath.min(e,i)&&t=0?new Date:new Date(i.config.minDate.getTime());var a=Qe(i.config);e.setHours(a.hours,a.minutes,a.seconds,e.getMilliseconds());i.selectedDates=[e];i.latestSelectedDateObj=e}if(t!==undefined&&t.type!=="blur"){It(t)}var r=i._input.value;h();zt();if(i._input.value!==r){i._debouncedChange()}}function l(t,e){return t%12+12*Fe(e===i.l10n.amPM[1])}function d(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}function h(){if(i.hourElement===undefined||i.minuteElement===undefined)return;var t=(parseInt(i.hourElement.value.slice(-2),10)||0)%24,e=(parseInt(i.minuteElement.value,10)||0)%60,a=i.secondElement!==undefined?(parseInt(i.secondElement.value,10)||0)%60:0;if(i.amPM!==undefined){t=l(t,i.amPM.textContent)}var r=i.config.minTime!==undefined||i.config.minDate&&i.minDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.minDate,true)===0;var n=i.config.maxTime!==undefined||i.config.maxDate&&i.maxDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.maxDate,true)===0;if(i.config.maxTime!==undefined&&i.config.minTime!==undefined&&i.config.minTime>i.config.maxTime){var o=Ge(i.config.minTime.getHours(),i.config.minTime.getMinutes(),i.config.minTime.getSeconds());var s=Ge(i.config.maxTime.getHours(),i.config.maxTime.getMinutes(),i.config.maxTime.getSeconds());var c=Ge(t,e,a);if(c>s&&c=12)];if(i.secondElement!==undefined)i.secondElement.value=Te(a)}function p(t){var e=je(t);var i=parseInt(e.value)+(t.delta||0);if(i/1e3>1||t.key==="Enter"&&!/[^\d]/.test(i.toString())){H(i)}}function b(t,e,a,r){if(e instanceof Array)return e.forEach((function(e){return b(t,e,a,r)}));if(t instanceof Array)return t.forEach((function(t){return b(t,e,a,r)}));t.addEventListener(e,a,r);i._handlers.push({remove:function(){return t.removeEventListener(e,a,r)}})}function m(){gt("onChange")}function g(){if(i.config.wrap){["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(i.element.querySelectorAll("[data-"+t+"]"),(function(e){return b(e,"click",i[t])}))}))}if(i.isMobile){bt();return}var t=Be(J,50);i._debouncedChange=Be(m,ii);if(i.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))b(i.daysContainer,"mouseover",(function(t){if(i.config.mode==="range")q(je(t))}));b(i._input,"keydown",V);if(i.calendarContainer!==undefined){b(i.calendarContainer,"keydown",V)}if(!i.config.inline&&!i.config.static)b(window,"resize",t);if(window.ontouchstart!==undefined)b(window.document,"touchstart",Y);else b(window.document,"mousedown",Y);b(window.document,"focus",Y,{capture:true});if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}if(i.daysContainer!==undefined){b(i.monthNav,"click",Dt);b(i.monthNav,["keyup","increment"],p);b(i.daysContainer,"click",ot)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined){var e=function(t){return je(t).select()};b(i.timeContainer,["increment"],c);b(i.timeContainer,"blur",c,{capture:true});b(i.timeContainer,"click",y);b([i.hourElement,i.minuteElement],["focus","click"],e);if(i.secondElement!==undefined)b(i.secondElement,"focus",(function(){return i.secondElement&&i.secondElement.select()}));if(i.amPM!==undefined){b(i.amPM,"click",(function(t){c(t)}))}}if(i.config.allowInput){b(i._input,"blur",K)}}function v(t,e){var a=t!==undefined?i.parseDate(t):i.latestSelectedDateObj||(i.config.minDate&&i.config.minDate>i.now?i.config.minDate:i.config.maxDate&&i.config.maxDate1);i.calendarContainer.appendChild(t);var n=i.config.appendTo!==undefined&&i.config.appendTo.nodeType!==undefined;if(i.config.inline||i.config.static){i.calendarContainer.classList.add(i.config.inline?"inline":"static");if(i.config.inline){if(!n&&i.element.parentNode)i.element.parentNode.insertBefore(i.calendarContainer,i._input.nextSibling);else if(i.config.appendTo!==undefined)i.config.appendTo.appendChild(i.calendarContainer)}if(i.config.static){var o=Oe("div","flatpickr-wrapper");if(i.element.parentNode)i.element.parentNode.insertBefore(o,i.element);o.appendChild(i.element);if(i.altInput)o.appendChild(i.altInput);o.appendChild(i.calendarContainer)}}if(!i.config.static&&!i.config.inline)(i.config.appendTo!==undefined?i.config.appendTo:window.document.body).appendChild(i.calendarContainer)}function w(t,e,a,r){var n=U(e,true),o=Oe("span",t,e.getDate().toString());o.dateObj=e;o.$i=r;o.setAttribute("aria-label",i.formatDate(e,i.config.ariaDateFormat));if(t.indexOf("hidden")===-1&&qe(e,i.now)===0){i.todayDateElem=o;o.classList.add("today");o.setAttribute("aria-current","date")}if(n){o.tabIndex=-1;if(yt(e)){o.classList.add("selected");i.selectedDateElem=o;if(i.config.mode==="range"){Ee(o,"startRange",i.selectedDates[0]&&qe(e,i.selectedDates[0],true)===0);Ee(o,"endRange",i.selectedDates[1]&&qe(e,i.selectedDates[1],true)===0);if(t==="nextMonthDay")o.classList.add("inRange")}}}else{o.classList.add("flatpickr-disabled")}if(i.config.mode==="range"){if(kt(e)&&!yt(e))o.classList.add("inRange")}if(i.weekNumbers&&i.config.showMonths===1&&t!=="prevMonthDay"&&r%7===6){i.weekNumbers.insertAdjacentHTML("beforeend",""+i.config.getWeek(e)+"")}gt("onDayCreate",o);return o}function z(t){t.focus();if(i.config.mode==="range")q(t)}function D(t){var e=t>0?0:i.config.showMonths-1;var a=t>0?i.config.showMonths:-1;for(var r=e;r!=a;r+=t){var n=i.daysContainer.children[r];var o=t>0?0:n.children.length-1;var s=t>0?n.children.length:-1;for(var c=o;c!=s;c+=t){var l=n.children[c];if(l.className.indexOf("hidden")===-1&&U(l.dateObj))return l}}return undefined}function I(t,e){var a=t.className.indexOf("Month")===-1?t.dateObj.getMonth():i.currentMonth;var r=e>0?i.config.showMonths:-1;var n=e>0?1:-1;for(var o=a-i.currentMonth;o!=r;o+=n){var s=i.daysContainer.children[o];var c=a-i.currentMonth===o?t.$i+e:e<0?s.children.length-1:0;var l=s.children.length;for(var d=c;d>=0&&d0?l:-1);d+=n){var h=s.children[d];if(h.className.indexOf("hidden")===-1&&U(h.dateObj)&&Math.abs(t.$i-d)>=Math.abs(e))return z(h)}}i.changeMonth(n);M(D(n),0);return undefined}function M(t,e){var a=n();var r=_(a||document.body);var o=t!==undefined?t:r?a:i.selectedDateElem!==undefined&&_(i.selectedDateElem)?i.selectedDateElem:i.todayDateElem!==undefined&&_(i.todayDateElem)?i.todayDateElem:D(e>0?1:-1);if(o===undefined){i._input.focus()}else if(!r){z(o)}else{I(o,e)}}function R(t,e){var a=(new Date(t,e,1).getDay()-i.l10n.firstDayOfWeek+7)%7;var r=i.utils.getDaysInMonth((e-1+12)%12,t);var n=i.utils.getDaysInMonth(e,t),o=window.document.createDocumentFragment(),s=i.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay";var d=r+1-a,h=0;for(;d<=r;d++,h++){o.appendChild(w("flatpickr-day "+c,new Date(t,e-1,d),d,h))}for(d=1;d<=n;d++,h++){o.appendChild(w("flatpickr-day",new Date(t,e,d),d,h))}for(var f=n+1;f<=42-a&&(i.config.showMonths===1||h%7!==0);f++,h++){o.appendChild(w("flatpickr-day "+l,new Date(t,e+1,f%n),f,h))}var u=Oe("div","dayContainer");u.appendChild(o);return u}function C(){if(i.daysContainer===undefined){return}Ne(i.daysContainer);if(i.weekNumbers)Ne(i.weekNumbers);var t=document.createDocumentFragment();for(var e=0;e1||i.config.monthSelectorType!=="dropdown")return;var t=function(t){if(i.config.minDate!==undefined&&i.currentYear===i.config.minDate.getFullYear()&&ti.config.maxDate.getMonth())};i.monthsDropdownContainer.tabIndex=-1;i.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++){if(!t(e))continue;var a=Oe("option","flatpickr-monthDropdown-month");a.value=new Date(i.currentYear,e).getMonth().toString();a.textContent=Ye(e,i.config.shorthandCurrentMonth,i.l10n);a.tabIndex=-1;if(i.currentMonth===e){a.selected=true}i.monthsDropdownContainer.appendChild(a)}}function S(){var t=Oe("div","flatpickr-month");var e=window.document.createDocumentFragment();var a;if(i.config.showMonths>1||i.config.monthSelectorType==="static"){a=Oe("span","cur-month")}else{i.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months");i.monthsDropdownContainer.setAttribute("aria-label",i.l10n.monthAriaLabel);b(i.monthsDropdownContainer,"change",(function(t){var e=je(t);var a=parseInt(e.value,10);i.changeMonth(a-i.currentMonth);gt("onMonthChange")}));A();a=i.monthsDropdownContainer}var r=Le("cur-year",{tabindex:"-1"});var n=r.getElementsByTagName("input")[0];n.setAttribute("aria-label",i.l10n.yearAriaLabel);if(i.config.minDate){n.setAttribute("min",i.config.minDate.getFullYear().toString())}if(i.config.maxDate){n.setAttribute("max",i.config.maxDate.getFullYear().toString());n.disabled=!!i.config.minDate&&i.config.minDate.getFullYear()===i.config.maxDate.getFullYear()}var o=Oe("div","flatpickr-current-month");o.appendChild(a);o.appendChild(r);e.appendChild(o);t.appendChild(e);return{container:t,yearElement:n,monthElement:a}}function T(){Ne(i.monthNav);i.monthNav.appendChild(i.prevMonthNav);if(i.config.showMonths){i.yearElements=[];i.monthElements=[]}for(var t=i.config.showMonths;t--;){var e=S();i.yearElements.push(e.yearElement);i.monthElements.push(e.monthElement);i.monthNav.appendChild(e.container)}i.monthNav.appendChild(i.nextMonthNav)}function F(){i.monthNav=Oe("div","flatpickr-months");i.yearElements=[];i.monthElements=[];i.prevMonthNav=Oe("span","flatpickr-prev-month");i.prevMonthNav.innerHTML=i.config.prevArrow;i.nextMonthNav=Oe("span","flatpickr-next-month");i.nextMonthNav.innerHTML=i.config.nextArrow;T();Object.defineProperty(i,"_hidePrevMonthArrow",{get:function(){return i.__hidePrevMonthArrow},set:function(t){if(i.__hidePrevMonthArrow!==t){Ee(i.prevMonthNav,"flatpickr-disabled",t);i.__hidePrevMonthArrow=t}}});Object.defineProperty(i,"_hideNextMonthArrow",{get:function(){return i.__hideNextMonthArrow},set:function(t){if(i.__hideNextMonthArrow!==t){Ee(i.nextMonthNav,"flatpickr-disabled",t);i.__hideNextMonthArrow=t}}});i.currentYearElement=i.yearElements[0];xt();return i.monthNav}function B(){i.calendarContainer.classList.add("hasTime");if(i.config.noCalendar)i.calendarContainer.classList.add("noCalendar");var t=Qe(i.config);i.timeContainer=Oe("div","flatpickr-time");i.timeContainer.tabIndex=-1;var e=Oe("span","flatpickr-time-separator",":");var a=Le("flatpickr-hour",{"aria-label":i.l10n.hourAriaLabel});i.hourElement=a.getElementsByTagName("input")[0];var r=Le("flatpickr-minute",{"aria-label":i.l10n.minuteAriaLabel});i.minuteElement=r.getElementsByTagName("input")[0];i.hourElement.tabIndex=i.minuteElement.tabIndex=-1;i.hourElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getHours():i.config.time_24hr?t.hours:d(t.hours));i.minuteElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getMinutes():t.minutes);i.hourElement.setAttribute("step",i.config.hourIncrement.toString());i.minuteElement.setAttribute("step",i.config.minuteIncrement.toString());i.hourElement.setAttribute("min",i.config.time_24hr?"0":"1");i.hourElement.setAttribute("max",i.config.time_24hr?"23":"12");i.hourElement.setAttribute("maxlength","2");i.minuteElement.setAttribute("min","0");i.minuteElement.setAttribute("max","59");i.minuteElement.setAttribute("maxlength","2");i.timeContainer.appendChild(a);i.timeContainer.appendChild(e);i.timeContainer.appendChild(r);if(i.config.time_24hr)i.timeContainer.classList.add("time24hr");if(i.config.enableSeconds){i.timeContainer.classList.add("hasSeconds");var n=Le("flatpickr-second");i.secondElement=n.getElementsByTagName("input")[0];i.secondElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getSeconds():t.seconds);i.secondElement.setAttribute("step",i.minuteElement.getAttribute("step"));i.secondElement.setAttribute("min","0");i.secondElement.setAttribute("max","59");i.secondElement.setAttribute("maxlength","2");i.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":"));i.timeContainer.appendChild(n)}if(!i.config.time_24hr){i.amPM=Oe("span","flatpickr-am-pm",i.l10n.amPM[Fe((i.latestSelectedDateObj?i.hourElement.value:i.config.defaultHour)>11)]);i.amPM.title=i.l10n.toggleTitle;i.amPM.tabIndex=-1;i.timeContainer.appendChild(i.amPM)}return i.timeContainer}function $(){if(!i.weekdayContainer)i.weekdayContainer=Oe("div","flatpickr-weekdays");else Ne(i.weekdayContainer);for(var t=i.config.showMonths;t--;){var e=Oe("div","flatpickr-weekdaycontainer");i.weekdayContainer.appendChild(e)}E();return i.weekdayContainer}function E(){if(!i.weekdayContainer){return}var t=i.l10n.firstDayOfWeek;var e=ei(i.l10n.weekdays.shorthand);if(t>0&&t\n "+e.join("")+"\n \n "}}function O(){i.calendarContainer.classList.add("hasWeeks");var t=Oe("div","flatpickr-weekwrapper");t.appendChild(Oe("span","flatpickr-weekday",i.l10n.weekAbbreviation));var e=Oe("div","flatpickr-weeks");t.appendChild(e);return{weekWrapper:t,weekNumbers:e}}function N(t,e){if(e===void 0){e=true}var a=e?t:t-i.currentMonth;if(a<0&&i._hidePrevMonthArrow===true||a>0&&i._hideNextMonthArrow===true)return;i.currentMonth+=a;if(i.currentMonth<0||i.currentMonth>11){i.currentYear+=i.currentMonth>11?1:-1;i.currentMonth=(i.currentMonth+12)%12;gt("onYearChange");A()}C();gt("onMonthChange");xt()}function W(t,e){if(t===void 0){t=true}if(e===void 0){e=true}i.input.value="";if(i.altInput!==undefined)i.altInput.value="";if(i.mobileInput!==undefined)i.mobileInput.value="";i.selectedDates=[];i.latestSelectedDateObj=undefined;if(e===true){i.currentYear=i._initialDate.getFullYear();i.currentMonth=i._initialDate.getMonth()}if(i.config.enableTime===true){var a=Qe(i.config),r=a.hours,n=a.minutes,o=a.seconds;u(r,n,o)}i.redraw();if(t)gt("onChange")}function L(){i.isOpen=false;if(!i.isMobile){if(i.calendarContainer!==undefined){i.calendarContainer.classList.remove("open")}if(i._input!==undefined){i._input.classList.remove("active")}}gt("onClose")}function j(){if(i.config!==undefined)gt("onDestroy");for(var t=i._handlers.length;t--;){i._handlers[t].remove()}i._handlers=[];if(i.mobileInput){if(i.mobileInput.parentNode)i.mobileInput.parentNode.removeChild(i.mobileInput);i.mobileInput=undefined}else if(i.calendarContainer&&i.calendarContainer.parentNode){if(i.config.static&&i.calendarContainer.parentNode){var e=i.calendarContainer.parentNode;e.lastChild&&e.removeChild(e.lastChild);if(e.parentNode){while(e.firstChild)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else i.calendarContainer.parentNode.removeChild(i.calendarContainer)}if(i.altInput){i.input.type="text";if(i.altInput.parentNode)i.altInput.parentNode.removeChild(i.altInput);delete i.altInput}if(i.input){i.input.type=i.input._type;i.input.classList.remove("flatpickr-input");i.input.removeAttribute("readonly")}["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete i[t]}catch(t){}}))}function P(t){return i.calendarContainer.contains(t)}function Y(t){if(i.isOpen&&!i.config.inline){var e=je(t);var a=P(e);var r=e===i.input||e===i.altInput||i.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(i.input)||~t.path.indexOf(i.altInput));var n=!r&&!a&&!P(t.relatedTarget);var o=!i.config.ignoredFocusElements.some((function(t){return t.contains(e)}));if(n&&o){if(i.config.allowInput){i.setDate(i._input.value,false,i.config.altInput?i.config.altFormat:i.config.dateFormat)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined&&i.input.value!==""&&i.input.value!==undefined){c()}i.close();if(i.config&&i.config.mode==="range"&&i.selectedDates.length===1)i.clear(false)}}}function H(t){if(!t||i.config.minDate&&ti.config.maxDate.getFullYear())return;var e=t,a=i.currentYear!==e;i.currentYear=e||i.currentYear;if(i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()){i.currentMonth=Math.min(i.config.maxDate.getMonth(),i.currentMonth)}else if(i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()){i.currentMonth=Math.max(i.config.minDate.getMonth(),i.currentMonth)}if(a){i.redraw();gt("onYearChange");A()}}function U(t,e){var a;if(e===void 0){e=true}var r=i.parseDate(t,undefined,e);if(i.config.minDate&&r&&qe(r,i.config.minDate,e!==undefined?e:!i.minDateHasTime)<0||i.config.maxDate&&r&&qe(r,i.config.maxDate,e!==undefined?e:!i.maxDateHasTime)>0)return false;if(!i.config.enable&&i.config.disable.length===0)return true;if(r===undefined)return false;var n=!!i.config.enable,o=(a=i.config.enable)!==null&&a!==void 0?a:i.config.disable;for(var s=0,c=void 0;s=c.from.getTime()&&r.getTime()<=c.to.getTime())return n}return!n}function _(t){if(i.daysContainer!==undefined)return t.className.indexOf("hidden")===-1&&t.className.indexOf("flatpickr-disabled")===-1&&i.daysContainer.contains(t);return false}function K(t){var e=t.target===i._input;var a=i._input.value.trimEnd()!==wt();if(e&&a&&!(t.relatedTarget&&P(t.relatedTarget))){i.setDate(i._input.value,true,t.target===i.altInput?i.config.altFormat:i.config.dateFormat)}}function V(e){var a=je(e);var r=i.config.wrap?t.contains(a):a===i._input;var o=i.config.allowInput;var s=i.isOpen&&(!o||!r);var l=i.config.inline&&r&&!o;if(e.keyCode===13&&r){if(o){i.setDate(i._input.value,true,a===i.altInput?i.config.altFormat:i.config.dateFormat);i.close();return a.blur()}else{i.open()}}else if(P(a)||s||l){var d=!!i.timeContainer&&i.timeContainer.contains(a);switch(e.keyCode){case 13:if(d){e.preventDefault();c();nt()}else ot(e);break;case 27:e.preventDefault();nt();break;case 8:case 46:if(r&&!i.config.allowInput){e.preventDefault();i.clear()}break;case 37:case 39:if(!d&&!r){e.preventDefault();var f=n();if(i.daysContainer!==undefined&&(o===false||f&&_(f))){var u=e.keyCode===39?1:-1;if(!e.ctrlKey)M(undefined,u);else{e.stopPropagation();N(u);M(D(1),0)}}}else if(i.hourElement)i.hourElement.focus();break;case 38:case 40:e.preventDefault();var p=e.keyCode===40?1:-1;if(i.daysContainer&&a.$i!==undefined||a===i.input||a===i.altInput){if(e.ctrlKey){e.stopPropagation();H(i.currentYear-p);M(D(1),0)}else if(!d)M(undefined,p*7)}else if(a===i.currentYearElement){H(i.currentYear-p)}else if(i.config.enableTime){if(!d&&i.hourElement)i.hourElement.focus();c(e);i._debouncedChange()}break;case 9:if(d){var b=[i.hourElement,i.minuteElement,i.secondElement,i.amPM].concat(i.pluginElements).filter((function(t){return t}));var m=b.indexOf(a);if(m!==-1){var g=b[m+(e.shiftKey?-1:1)];e.preventDefault();(g||i._input).focus()}}else if(!i.config.noCalendar&&i.daysContainer&&i.daysContainer.contains(a)&&e.shiftKey){e.preventDefault();i._input.focus()}break}}if(i.amPM!==undefined&&a===i.amPM){switch(e.key){case i.l10n.amPM[0].charAt(0):case i.l10n.amPM[0].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[0];h();zt();break;case i.l10n.amPM[1].charAt(0):case i.l10n.amPM[1].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[1];h();zt();break}}if(r||P(a)){gt("onKeyDown",e)}}function q(t,e){if(e===void 0){e="flatpickr-day"}if(i.selectedDates.length!==1||t&&(!t.classList.contains(e)||t.classList.contains("flatpickr-disabled")))return;var a=t?t.dateObj.getTime():i.days.firstElementChild.dateObj.getTime(),r=i.parseDate(i.selectedDates[0],undefined,true).getTime(),n=Math.min(a,i.selectedDates[0].getTime()),o=Math.max(a,i.selectedDates[0].getTime());var s=false;var c=0,l=0;for(var d=n;dn&&dc))c=d;else if(d>r&&(!l||d ."+e));h.forEach((function(e){var n=e.dateObj;var o=n.getTime();var d=c>0&&o0&&o>l;if(d){e.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));return}else if(s&&!d)return;["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)}));if(t!==undefined){t.classList.add(a<=i.selectedDates[0].getTime()?"startRange":"endRange");if(ra&&o===r)e.classList.add("endRange");if(o>=c&&(l===0||o<=l)&&Je(o,r,a))e.classList.add("inRange")}}))}function J(){if(i.isOpen&&!i.config.static&&!i.config.inline)et()}function G(t,e){if(e===void 0){e=i._positionElement}if(i.isMobile===true){if(t){t.preventDefault();var a=je(t);if(a){a.blur()}}if(i.mobileInput!==undefined){i.mobileInput.focus();i.mobileInput.click()}gt("onOpen");return}else if(i._input.disabled||i.config.inline){return}var r=i.isOpen;i.isOpen=true;if(!r){i.calendarContainer.classList.add("open");i._input.classList.add("active");gt("onOpen");et(e)}if(i.config.enableTime===true&&i.config.noCalendar===true){if(i.config.allowInput===false&&(t===undefined||!i.timeContainer.contains(t.relatedTarget))){setTimeout((function(){return i.hourElement.select()}),50)}}}function Z(t){return function(e){var a=i.config["_"+t+"Date"]=i.parseDate(e,i.config.dateFormat);var r=i.config["_"+(t==="min"?"max":"min")+"Date"];if(a!==undefined){i[t==="min"?"minDateHasTime":"maxDateHasTime"]=a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0}if(i.selectedDates){i.selectedDates=i.selectedDates.filter((function(t){return U(t)}));if(!i.selectedDates.length&&t==="min")f(a);zt()}if(i.daysContainer){rt();if(a!==undefined)i.currentYearElement[t]=a.getFullYear().toString();else i.currentYearElement.removeAttribute(t);i.currentYearElement.disabled=!!r&&a!==undefined&&r.getFullYear()===a.getFullYear()}}}function X(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var r=ti(ti({},JSON.parse(JSON.stringify(t.dataset||{}))),e);var n={};i.config.parseDate=r.parseDate;i.config.formatDate=r.formatDate;Object.defineProperty(i.config,"enable",{get:function(){return i.config._enable},set:function(t){i.config._enable=ht(t)}});Object.defineProperty(i.config,"disable",{get:function(){return i.config._disable},set:function(t){i.config._disable=ht(t)}});var s=r.mode==="time";if(!r.dateFormat&&(r.enableTime||s)){var c=ni.defaultConfig.dateFormat||Ae.dateFormat;n.dateFormat=r.noCalendar||s?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||s)&&!r.altFormat){var l=ni.defaultConfig.altFormat||Ae.altFormat;n.altFormat=r.noCalendar||s?"h:i"+(r.enableSeconds?":S K":" K"):l+(" h:i"+(r.enableSeconds?":S":"")+" K")}Object.defineProperty(i.config,"minDate",{get:function(){return i.config._minDate},set:Z("min")});Object.defineProperty(i.config,"maxDate",{get:function(){return i.config._maxDate},set:Z("max")});var d=function(t){return function(e){i.config[t==="min"?"_minTime":"_maxTime"]=i.parseDate(e,"H:i:S")}};Object.defineProperty(i.config,"minTime",{get:function(){return i.config._minTime},set:d("min")});Object.defineProperty(i.config,"maxTime",{get:function(){return i.config._maxTime},set:d("max")});if(r.mode==="time"){i.config.noCalendar=true;i.config.enableTime=true}Object.assign(i.config,n,r);for(var h=0;h-1){i.config[u]=$e(f[u]).map(o).concat(i.config[u])}else if(typeof r[u]==="undefined")i.config[u]=f[u]}}if(!r.altInputClass){i.config.altInputClass=Q().className+" "+i.config.altInputClass}gt("onParseConfig")}function Q(){return i.config.wrap?t.querySelector("[data-input]"):t}function tt(){if(typeof i.config.locale!=="object"&&typeof ni.l10ns[i.config.locale]==="undefined")i.config.errorHandler(new Error("flatpickr: invalid locale "+i.config.locale));i.l10n=ti(ti({},ni.l10ns.default),typeof i.config.locale==="object"?i.config.locale:i.config.locale!=="default"?ni.l10ns[i.config.locale]:undefined);Ue.D="("+i.l10n.weekdays.shorthand.join("|")+")";Ue.l="("+i.l10n.weekdays.longhand.join("|")+")";Ue.M="("+i.l10n.months.shorthand.join("|")+")";Ue.F="("+i.l10n.months.longhand.join("|")+")";Ue.K="("+i.l10n.amPM[0]+"|"+i.l10n.amPM[1]+"|"+i.l10n.amPM[0].toLowerCase()+"|"+i.l10n.amPM[1].toLowerCase()+")";var a=ti(ti({},e),JSON.parse(JSON.stringify(t.dataset||{})));if(a.time_24hr===undefined&&ni.defaultConfig.time_24hr===undefined){i.config.time_24hr=i.l10n.time_24hr}i.formatDate=Ke(i);i.parseDate=Ve({config:i.config,l10n:i.l10n})}function et(t){if(typeof i.config.position==="function"){return void i.config.position(i,t)}if(i.calendarContainer===undefined)return;gt("onPreCalendarPosition");var e=t||i._positionElement;var a=Array.prototype.reduce.call(i.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=i.calendarContainer.offsetWidth,n=i.config.position.split(" "),o=n[0],s=n.length>1?n[1]:null,c=e.getBoundingClientRect(),l=window.innerHeight-c.bottom,d=o==="above"||o!=="below"&&la;var h=window.pageYOffset+c.top+(!d?e.offsetHeight+2:-a-2);Ee(i.calendarContainer,"arrowTop",!d);Ee(i.calendarContainer,"arrowBottom",d);if(i.config.inline)return;var f=window.pageXOffset+c.left;var u=false;var p=false;if(s==="center"){f-=(r-c.width)/2;u=true}else if(s==="right"){f-=r-c.width;p=true}Ee(i.calendarContainer,"arrowLeft",!u&&!p);Ee(i.calendarContainer,"arrowCenter",u);Ee(i.calendarContainer,"arrowRight",p);var b=window.document.body.offsetWidth-(window.pageXOffset+c.right);var m=f+r>window.document.body.offsetWidth;var g=b+r>window.document.body.offsetWidth;Ee(i.calendarContainer,"rightMost",m);if(i.config.static)return;i.calendarContainer.style.top=h+"px";if(!m){i.calendarContainer.style.left=f+"px";i.calendarContainer.style.right="auto"}else if(!g){i.calendarContainer.style.left="auto";i.calendarContainer.style.right=b+"px"}else{var v=it();if(v===undefined)return;var y=window.document.body.offsetWidth;var k=Math.max(0,y/2-r/2);var x=".flatpickr-calendar.centerMost:before";var w=".flatpickr-calendar.centerMost:after";var z=v.cssRules.length;var D="{left:"+c.left+"px;right:auto;}";Ee(i.calendarContainer,"rightMost",false);Ee(i.calendarContainer,"centerMost",true);v.insertRule(x+","+w+D,z);i.calendarContainer.style.left=k+"px";i.calendarContainer.style.right="auto"}}function it(){var t=null;for(var e=0;ei.currentMonth+i.config.showMonths-1)&&i.config.mode!=="range";i.selectedDateElem=r;if(i.config.mode==="single")i.selectedDates=[n];else if(i.config.mode==="multiple"){var s=yt(n);if(s)i.selectedDates.splice(parseInt(s),1);else i.selectedDates.push(n)}else if(i.config.mode==="range"){if(i.selectedDates.length===2){i.clear(false,false)}i.latestSelectedDateObj=n;i.selectedDates.push(n);if(qe(n,i.selectedDates[0],true)!==0)i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}h();if(o){var c=i.currentYear!==n.getFullYear();i.currentYear=n.getFullYear();i.currentMonth=n.getMonth();if(c){gt("onYearChange");A()}gt("onMonthChange")}xt();C();zt();if(!o&&i.config.mode!=="range"&&i.config.showMonths===1)z(r);else if(i.selectedDateElem!==undefined&&i.hourElement===undefined){i.selectedDateElem&&i.selectedDateElem.focus()}if(i.hourElement!==undefined)i.hourElement!==undefined&&i.hourElement.focus();if(i.config.closeOnSelect){var l=i.config.mode==="single"&&!i.config.enableTime;var d=i.config.mode==="range"&&i.selectedDates.length===2&&!i.config.enableTime;if(l||d){nt()}}m()}var st={locale:[tt,E],showMonths:[T,s,$],minDate:[v],maxDate:[v],positionElement:[pt],clickOpens:[function(){if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}else{i._input.removeEventListener("focus",i.open);i._input.removeEventListener("click",i.open)}}]};function ct(t,e){if(t!==null&&typeof t==="object"){Object.assign(i.config,t);for(var a in t){if(st[a]!==undefined)st[a].forEach((function(t){return t()}))}}else{i.config[t]=e;if(st[t]!==undefined)st[t].forEach((function(t){return t()}));else if(Ce.indexOf(t)>-1)i.config[t]=$e(e)}i.redraw();zt(true)}function lt(t,e){var a=[];if(t instanceof Array)a=t.map((function(t){return i.parseDate(t,e)}));else if(t instanceof Date||typeof t==="number")a=[i.parseDate(t,e)];else if(typeof t==="string"){switch(i.config.mode){case"single":case"time":a=[i.parseDate(t,e)];break;case"multiple":a=t.split(i.config.conjunction).map((function(t){return i.parseDate(t,e)}));break;case"range":a=t.split(i.l10n.rangeSeparator).map((function(t){return i.parseDate(t,e)}));break}}else i.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));i.selectedDates=i.config.allowInvalidPreload?a:a.filter((function(t){return t instanceof Date&&U(t,false)}));if(i.config.mode==="range")i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function dt(t,e,a){if(e===void 0){e=false}if(a===void 0){a=i.config.dateFormat}if(t!==0&&!t||t instanceof Array&&t.length===0)return i.clear(e);lt(t,a);i.latestSelectedDateObj=i.selectedDates[i.selectedDates.length-1];i.redraw();v(undefined,e);f();if(i.selectedDates.length===0){i.clear(false)}zt(e);if(e)gt("onChange")}function ht(t){return t.slice().map((function(t){if(typeof t==="string"||typeof t==="number"||t instanceof Date){return i.parseDate(t,undefined,true)}else if(t&&typeof t==="object"&&t.from&&t.to)return{from:i.parseDate(t.from,undefined),to:i.parseDate(t.to,undefined)};return t})).filter((function(t){return t}))}function ft(){i.selectedDates=[];i.now=i.parseDate(i.config.now)||new Date;var t=i.config.defaultDate||((i.input.nodeName==="INPUT"||i.input.nodeName==="TEXTAREA")&&i.input.placeholder&&i.input.value===i.input.placeholder?null:i.input.value);if(t)lt(t,i.config.dateFormat);i._initialDate=i.selectedDates.length>0?i.selectedDates[0]:i.config.minDate&&i.config.minDate.getTime()>i.now.getTime()?i.config.minDate:i.config.maxDate&&i.config.maxDate.getTime()0)i.latestSelectedDateObj=i.selectedDates[0];if(i.config.minTime!==undefined)i.config.minTime=i.parseDate(i.config.minTime,"H:i");if(i.config.maxTime!==undefined)i.config.maxTime=i.parseDate(i.config.maxTime,"H:i");i.minDateHasTime=!!i.config.minDate&&(i.config.minDate.getHours()>0||i.config.minDate.getMinutes()>0||i.config.minDate.getSeconds()>0);i.maxDateHasTime=!!i.config.maxDate&&(i.config.maxDate.getHours()>0||i.config.maxDate.getMinutes()>0||i.config.maxDate.getSeconds()>0)}function ut(){i.input=Q();if(!i.input){i.config.errorHandler(new Error("Invalid input element specified"));return}i.input._type=i.input.type;i.input.type="text";i.input.classList.add("flatpickr-input");i._input=i.input;if(i.config.altInput){i.altInput=Oe(i.input.nodeName,i.config.altInputClass);i._input=i.altInput;i.altInput.placeholder=i.input.placeholder;i.altInput.disabled=i.input.disabled;i.altInput.required=i.input.required;i.altInput.tabIndex=i.input.tabIndex;i.altInput.type="text";i.input.setAttribute("type","hidden");if(!i.config.static&&i.input.parentNode)i.input.parentNode.insertBefore(i.altInput,i.input.nextSibling)}if(!i.config.allowInput)i._input.setAttribute("readonly","readonly");pt()}function pt(){i._positionElement=i.config.positionElement||i._input}function bt(){var t=i.config.enableTime?i.config.noCalendar?"time":"datetime-local":"date";i.mobileInput=Oe("input",i.input.className+" flatpickr-mobile");i.mobileInput.tabIndex=1;i.mobileInput.type=t;i.mobileInput.disabled=i.input.disabled;i.mobileInput.required=i.input.required;i.mobileInput.placeholder=i.input.placeholder;i.mobileFormatStr=t==="datetime-local"?"Y-m-d\\TH:i:S":t==="date"?"Y-m-d":"H:i:S";if(i.selectedDates.length>0){i.mobileInput.defaultValue=i.mobileInput.value=i.formatDate(i.selectedDates[0],i.mobileFormatStr)}if(i.config.minDate)i.mobileInput.min=i.formatDate(i.config.minDate,"Y-m-d");if(i.config.maxDate)i.mobileInput.max=i.formatDate(i.config.maxDate,"Y-m-d");if(i.input.getAttribute("step"))i.mobileInput.step=String(i.input.getAttribute("step"));i.input.type="hidden";if(i.altInput!==undefined)i.altInput.type="hidden";try{if(i.input.parentNode)i.input.parentNode.insertBefore(i.mobileInput,i.input.nextSibling)}catch(t){}b(i.mobileInput,"change",(function(t){i.setDate(je(t).value,false,i.mobileFormatStr);gt("onChange");gt("onClose")}))}function mt(t){if(i.isOpen===true)return i.close();i.open(t)}function gt(t,e){if(i.config===undefined)return;var a=i.config[t];if(a!==undefined&&a.length>0){for(var r=0;a[r]&&r=0&&qe(t,i.selectedDates[1])<=0}function xt(){if(i.config.noCalendar||i.isMobile||!i.monthNav)return;i.yearElements.forEach((function(t,e){var a=new Date(i.currentYear,i.currentMonth,1);a.setMonth(i.currentMonth+e);if(i.config.showMonths>1||i.config.monthSelectorType==="static"){i.monthElements[e].textContent=Ye(a.getMonth(),i.config.shorthandCurrentMonth,i.l10n)+" "}else{i.monthsDropdownContainer.value=a.getMonth().toString()}t.value=a.getFullYear().toString()}));i._hidePrevMonthArrow=i.config.minDate!==undefined&&(i.currentYear===i.config.minDate.getFullYear()?i.currentMonth<=i.config.minDate.getMonth():i.currentYeari.config.maxDate.getMonth():i.currentYear>i.config.maxDate.getFullYear())}function wt(t){var e=t||(i.config.altInput?i.config.altFormat:i.config.dateFormat);return i.selectedDates.map((function(t){return i.formatDate(t,e)})).filter((function(t,e,a){return i.config.mode!=="range"||i.config.enableTime||a.indexOf(t)===e})).join(i.config.mode!=="range"?i.config.conjunction:i.l10n.rangeSeparator)}function zt(t){if(t===void 0){t=true}if(i.mobileInput!==undefined&&i.mobileFormatStr){i.mobileInput.value=i.latestSelectedDateObj!==undefined?i.formatDate(i.latestSelectedDateObj,i.mobileFormatStr):""}i.input.value=wt(i.config.dateFormat);if(i.altInput!==undefined){i.altInput.value=wt(i.config.altFormat)}if(t!==false)gt("onValueUpdate")}function Dt(t){var e=je(t);var a=i.prevMonthNav.contains(e);var r=i.nextMonthNav.contains(e);if(a||r){N(a?-1:1)}else if(i.yearElements.indexOf(e)>=0){e.select()}else if(e.classList.contains("arrowUp")){i.changeYear(i.currentYear+1)}else if(e.classList.contains("arrowDown")){i.changeYear(i.currentYear-1)}}function It(t){t.preventDefault();var e=t.type==="keydown",a=je(t),r=a;if(i.amPM!==undefined&&a===i.amPM){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}var n=parseFloat(r.getAttribute("min")),o=parseFloat(r.getAttribute("max")),s=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),l=t.delta||(e?t.which===38?1:-1:0);var d=c+s*l;if(typeof r.value!=="undefined"&&r.value.length===2){var h=r===i.hourElement,f=r===i.minuteElement;if(do){d=r===i.hourElement?d-o-Fe(!i.amPM):n;if(f)k(undefined,1,i.hourElement)}if(i.amPM&&h&&(s===1?d+c===23:Math.abs(d-c)>s)){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}r.value=Te(d)}}r();return i}function ri(t,e){var i=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement}));var a=[];for(var r=0;rc||h=e.weekStartDay&&r<=e.weekEndDay)i[a].classList.add("week","selected")}}function r(){var t=e.days.childNodes;for(var i=t.length;i--;)t[i].classList.remove("inRange")}function n(){if(e.daysContainer!==undefined)e.daysContainer.addEventListener("mouseover",i)}function o(){if(e.daysContainer!==undefined)e.daysContainer.removeEventListener("mouseover",i)}return{onValueUpdate:a,onMonthChange:a,onYearChange:a,onOpen:a,onClose:r,onParseConfig:function(){e.config.mode="single";e.config.enableTime=false;e.config.dateFormat=e.config.dateFormat?e.config.dateFormat:"\\W\\e\\e\\k #W, Y";e.config.altFormat=e.config.altFormat?e.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[n,a,function(){e.loadedPlugins.push("weekSelect")}],onDestroy:o}}}return e}))})(si);const ci=si.exports;function li(t,e={}){const i=t.mode==="week"?[new ci({})]:[];const a=di(t.mode);return{...e,locale:t.locale,plugins:i,allowInput:true,altInput:true,prevArrow:"←",nextArrow:"→",dateFormat:a,altFormat:t.format,ariaDateFormat:t.format,mode:t.mode==="daterange"?"range":"single",minDate:t.min,maxDate:t.max,enableTime:t.mode==="time"||t.mode==="datetime",noCalendar:t.mode==="time",weekNumbers:true,minuteIncrement:t.step,clickOpens:!t.disabled&&!t.readonly,appendTo:t.appendTo,position:t.position?t.position:"auto",onReady:(e,i,a)=>{for(const e in t.nativePickerAttributes){const i=t.nativePickerAttributes[e];a.calendarContainer.setAttribute(e,i)}if(t.appendTo&&typeof t.onReady==="function"){t.onReady(e,i,a)}},onClose:function(e,i,a){if(t.mode==="daterange"&&e.length<2){a.clear()}},onChange:(e,i,r)=>{let n=i||undefined;if(t.mode==="daterange"){if(e.length<2){return}else{const t=e[0];const i=e[1];i.setHours(23);i.setMinutes(59);i.setSeconds(59);n=`${r.formatDate(t,a)} - ${r.formatDate(i,a)}`}}else if(t.mode==="week"){n=e[0]?r.config.getWeek(e[0]).toString():undefined}t.applyChange(n)}}}function di(t){if(t==="week"){return"W"}else if(t==="time"){return"H:i"}else{return"Z"}}function hi(t,e){const i=new Date(2e3,1,3,16,5,6);const a={year:"numeric",month:"2-digit",day:"2-digit"};const r={hour:"2-digit",minute:"2-digit"};return e==="week"?"W":new Intl.DateTimeFormat(t,{date:a,time:r,datetime:{...a,...r},daterange:a}[e]).format(i).replace("2000","Y").replace("00","y").replace("02","m").replace("03","d").replace("04","h").replace("16","H").replace("05","i").replace(/AM|PM/i,"K")}function fi(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ui(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return i?.firstDay??1}function pi(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function bi(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function mi(t){return{firstDayOfWeek:ui(t),rangeSeparator:" - ",weekAbbreviation:"",yearAriaLabel:D.t("datepicker.year"),monthAriaLabel:D.t("datepicker.month"),hourAriaLabel:D.t("datepicker.hour"),minuteAriaLabel:D.t("datepicker.minute"),toggleTitle:D.t("datepicker.toggle"),scrollTitle:D.t("datepicker.scroll"),time_24hr:!fi(t),weekdays:{shorthand:pi(t,"short"),longhand:pi(t,"long")},months:{shorthand:bi(t,"short"),longhand:bi(t,"long")}}}const gi=Math.min;const vi=Math.max;const yi=Math.round;const ki=Math.floor;const xi=t=>({x:t,y:t});const wi={left:"right",right:"left",bottom:"top",top:"bottom"};const zi={start:"end",end:"start"};function Di(t,e,i){return vi(t,gi(e,i))}function Ii(t,e){return typeof t==="function"?t(e):t}function Mi(t){return t.split("-")[0]}function Ri(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Ai(t){return t==="y"?"height":"width"}function Si(t){return["top","bottom"].includes(Mi(t))?"y":"x"}function Ti(t){return Ci(Si(t))}function Fi(t,e,i){if(i===void 0){i=false}const a=Ri(t);const r=Ti(t);const n=Ai(r);let o=r==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(e.reference[n]>e.floating[n]){o=Ni(o)}return[o,Ni(o)]}function Bi(t){const e=Ni(t);return[$i(t),e,$i(e)]}function $i(t){return t.replace(/start|end/g,(t=>zi[t]))}function Ei(t,e,i){const a=["left","right"];const r=["right","left"];const n=["top","bottom"];const o=["bottom","top"];switch(t){case"top":case"bottom":if(i)return e?r:a;return e?a:r;case"left":case"right":return e?n:o;default:return[]}}function Oi(t,e,i,a){const r=Ri(t);let n=Ei(Mi(t),i==="start",a);if(r){n=n.map((t=>t+"-"+r));if(e){n=n.concat(n.map($i))}}return n}function Ni(t){return t.replace(/left|right|bottom|top/g,(t=>wi[t]))}function Wi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Li(t){return typeof t!=="number"?Wi(t):{top:t,right:t,bottom:t,left:t}}function ji(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Pi(t,e,i){let{reference:a,floating:r}=t;const n=Si(e);const o=Ti(e);const s=Ai(o);const c=Mi(e);const l=n==="y";const d=a.x+a.width/2-r.width/2;const h=a.y+a.height/2-r.height/2;const f=a[s]/2-r[s]/2;let u;switch(c){case"top":u={x:d,y:a.y-r.height};break;case"bottom":u={x:d,y:a.y+a.height};break;case"right":u={x:a.x+a.width,y:h};break;case"left":u={x:a.x-r.width,y:h};break;default:u={x:a.x,y:a.y}}switch(Ri(e)){case"start":u[o]-=f*(i&&l?-1:1);break;case"end":u[o]+=f*(i&&l?-1:1);break}return u}const Yi=async(t,e,i)=>{const{placement:a="bottom",strategy:r="absolute",middleware:n=[],platform:o}=i;const s=n.filter(Boolean);const c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:r});let{x:d,y:h}=Pi(l,a,c);let f=a;let u={};let p=0;for(let i=0;it<=0))){var I,M;const t=(((I=n.flip)==null?void 0:I.index)||0)+1;const e=x[t];if(e){return{data:{index:t,overflows:D},reset:{placement:e}}}let i=(M=D.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:M.placement;if(!i){switch(u){case"bestFit":{var R;const t=(R=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:R[0];if(t){i=t}break}case"initialPlacement":i=s;break}}if(r!==i){return{reset:{placement:i}}}}return{}}}};async function _i(t,e){const{placement:i,platform:a,elements:r}=t;const n=await(a.isRTL==null?void 0:a.isRTL(r.floating));const o=Mi(i);const s=Ri(i);const c=Si(i)==="y";const l=["left","top"].includes(o)?-1:1;const d=n&&c?-1:1;const h=Ii(e,t);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(s&&typeof p==="number"){u=s==="end"?p*-1:p}return c?{x:u*d,y:f*l}:{x:f*l,y:u*d}}const Ki=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){var i,a;const{x:r,y:n,placement:o,middlewareData:s}=e;const c=await _i(e,t);if(o===((i=s.offset)==null?void 0:i.placement)&&(a=s.arrow)!=null&&a.alignmentOffset){return{}}return{x:r+c.x,y:n+c.y,data:{...c,placement:o}}}}};const Vi=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:i,y:a,placement:r}=e;const{mainAxis:n=true,crossAxis:o=false,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...c}=Ii(t,e);const l={x:i,y:a};const d=await Hi(e,c);const h=Si(Mi(r));const f=Ci(h);let u=l[f];let p=l[h];if(n){const t=f==="y"?"top":"left";const e=f==="y"?"bottom":"right";const i=u+d[t];const a=u-d[e];u=Di(i,u,a)}if(o){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const i=p+d[t];const a=p-d[e];p=Di(i,p,a)}const b=s.fn({...e,[f]:u,[h]:p});return{...b,data:{x:b.x-i,y:b.y-a}}}}};const qi=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(e){const{placement:i,rects:a,platform:r,elements:n}=e;const{apply:o=(()=>{}),...s}=Ii(t,e);const c=await Hi(e,s);const l=Mi(i);const d=Ri(i);const h=Si(i)==="y";const{width:f,height:u}=a.floating;let p;let b;if(l==="top"||l==="bottom"){p=l;b=d===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"}else{b=l;p=d==="end"?"top":"bottom"}const m=u-c[p];const g=f-c[b];const v=!e.middlewareData.shift;let y=m;let k=g;if(h){const t=f-c.left-c.right;k=d||v?gi(g,t):t}else{const t=u-c.top-c.bottom;y=d||v?gi(m,t):t}if(v&&!d){const t=vi(c.left,0);const e=vi(c.right,0);const i=vi(c.top,0);const a=vi(c.bottom,0);if(h){k=f-2*(t!==0||e!==0?t+e:vi(c.left,c.right))}else{y=u-2*(i!==0||a!==0?i+a:vi(c.top,c.bottom))}}await o({...e,availableWidth:k,availableHeight:y});const x=await r.getDimensions(n.floating);if(f!==x.width||u!==x.height){return{reset:{rects:true}}}return{}}}};function Ji(t){if(Xi(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function Gi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zi(t){var e;return(e=(Xi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xi(t){return t instanceof Node||t instanceof Gi(t).Node}function Qi(t){return t instanceof Element||t instanceof Gi(t).Element}function ta(t){return t instanceof HTMLElement||t instanceof Gi(t).HTMLElement}function ea(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof Gi(t).ShadowRoot}function ia(t){const{overflow:e,overflowX:i,overflowY:a,display:r}=ca(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+i)&&!["inline","contents"].includes(r)}function aa(t){return["table","td","th"].includes(Ji(t))}function ra(t){const e=oa();const i=ca(t);return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":false)||!e&&(i.backdropFilter?i.backdropFilter!=="none":false)||!e&&(i.filter?i.filter!=="none":false)||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function na(t){let e=da(t);while(ta(e)&&!sa(e)){if(ra(e)){return e}else{e=da(e)}}return null}function oa(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function sa(t){return["html","body","#document"].includes(Ji(t))}function ca(t){return Gi(t).getComputedStyle(t)}function la(t){if(Qi(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function da(t){if(Ji(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||ea(t)&&t.host||Zi(t);return ea(e)?e.host:e}function ha(t){const e=da(t);if(sa(e)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ta(e)&&ia(e)){return e}return ha(e)}function fa(t,e,i){var a;if(e===void 0){e=[]}if(i===void 0){i=true}const r=ha(t);const n=r===((a=t.ownerDocument)==null?void 0:a.body);const o=Gi(r);if(n){return e.concat(o,o.visualViewport||[],ia(r)?r:[],o.frameElement&&i?fa(o.frameElement):[])}return e.concat(r,fa(r,[],i))}function ua(t){const e=ca(t);let i=parseFloat(e.width)||0;let a=parseFloat(e.height)||0;const r=ta(t);const n=r?t.offsetWidth:i;const o=r?t.offsetHeight:a;const s=yi(i)!==n||yi(a)!==o;if(s){i=n;a=o}return{width:i,height:a,$:s}}function pa(t){return!Qi(t)?t.contextElement:t}function ba(t){const e=pa(t);if(!ta(e)){return xi(1)}const i=e.getBoundingClientRect();const{width:a,height:r,$:n}=ua(e);let o=(n?yi(i.width):i.width)/a;let s=(n?yi(i.height):i.height)/r;if(!o||!Number.isFinite(o)){o=1}if(!s||!Number.isFinite(s)){s=1}return{x:o,y:s}}const ma=xi(0);function ga(t){const e=Gi(t);if(!oa()||!e.visualViewport){return ma}return{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function va(t,e,i){if(e===void 0){e=false}if(!i||e&&i!==Gi(t)){return false}return e}function ya(t,e,i,a){if(e===void 0){e=false}if(i===void 0){i=false}const r=t.getBoundingClientRect();const n=pa(t);let o=xi(1);if(e){if(a){if(Qi(a)){o=ba(a)}}else{o=ba(t)}}const s=va(n,i,a)?ga(n):xi(0);let c=(r.left+s.x)/o.x;let l=(r.top+s.y)/o.y;let d=r.width/o.x;let h=r.height/o.y;if(n){const t=Gi(n);const e=a&&Qi(a)?Gi(a):a;let i=t;let r=i.frameElement;while(r&&a&&e!==i){const t=ba(r);const e=r.getBoundingClientRect();const a=ca(r);const n=e.left+(r.clientLeft+parseFloat(a.paddingLeft))*t.x;const o=e.top+(r.clientTop+parseFloat(a.paddingTop))*t.y;c*=t.x;l*=t.y;d*=t.x;h*=t.y;c+=n;l+=o;i=Gi(r);r=i.frameElement}}return ji({width:d,height:h,x:c,y:l})}const ka=[":popover-open",":modal"];function xa(t){return ka.some((e=>{try{return t.matches(e)}catch(t){return false}}))}function wa(t){let{elements:e,rect:i,offsetParent:a,strategy:r}=t;const n=r==="fixed";const o=Zi(a);const s=e?xa(e.floating):false;if(a===o||s&&n){return i}let c={scrollLeft:0,scrollTop:0};let l=xi(1);const d=xi(0);const h=ta(a);if(h||!h&&!n){if(Ji(a)!=="body"||ia(o)){c=la(a)}if(ta(a)){const t=ya(a);l=ba(a);d.x=t.x+a.clientLeft;d.y=t.y+a.clientTop}}return{width:i.width*l.x,height:i.height*l.y,x:i.x*l.x-c.scrollLeft*l.x+d.x,y:i.y*l.y-c.scrollTop*l.y+d.y}}function za(t){return Array.from(t.getClientRects())}function Da(t){return ya(Zi(t)).left+la(t).scrollLeft}function Ia(t){const e=Zi(t);const i=la(t);const a=t.ownerDocument.body;const r=vi(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth);const n=vi(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let o=-i.scrollLeft+Da(t);const s=-i.scrollTop;if(ca(a).direction==="rtl"){o+=vi(e.clientWidth,a.clientWidth)-r}return{width:r,height:n,x:o,y:s}}function Ma(t,e){const i=Gi(t);const a=Zi(t);const r=i.visualViewport;let n=a.clientWidth;let o=a.clientHeight;let s=0;let c=0;if(r){n=r.width;o=r.height;const t=oa();if(!t||t&&e==="fixed"){s=r.offsetLeft;c=r.offsetTop}}return{width:n,height:o,x:s,y:c}}function Ra(t,e){const i=ya(t,true,e==="fixed");const a=i.top+t.clientTop;const r=i.left+t.clientLeft;const n=ta(t)?ba(t):xi(1);const o=t.clientWidth*n.x;const s=t.clientHeight*n.y;const c=r*n.x;const l=a*n.y;return{width:o,height:s,x:c,y:l}}function Ca(t,e,i){let a;if(e==="viewport"){a=Ma(t,i)}else if(e==="document"){a=Ia(Zi(t))}else if(Qi(e)){a=Ra(e,i)}else{const i=ga(t);a={...e,x:e.x-i.x,y:e.y-i.y}}return ji(a)}function Aa(t,e){const i=da(t);if(i===e||!Qi(i)||sa(i)){return false}return ca(i).position==="fixed"||Aa(i,e)}function Sa(t,e){const i=e.get(t);if(i){return i}let a=fa(t,[],false).filter((t=>Qi(t)&&Ji(t)!=="body"));let r=null;const n=ca(t).position==="fixed";let o=n?da(t):t;while(Qi(o)&&!sa(o)){const e=ca(o);const i=ra(o);if(!i&&e.position==="fixed"){r=null}const s=n?!i&&!r:!i&&e.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ia(o)&&!i&&Aa(t,o);if(s){a=a.filter((t=>t!==o))}else{r=e}o=da(o)}e.set(t,a);return a}function Ta(t){let{element:e,boundary:i,rootBoundary:a,strategy:r}=t;const n=i==="clippingAncestors"?Sa(e,this._c):[].concat(i);const o=[...n,a];const s=o[0];const c=o.reduce(((t,i)=>{const a=Ca(e,i,r);t.top=vi(a.top,t.top);t.right=gi(a.right,t.right);t.bottom=gi(a.bottom,t.bottom);t.left=vi(a.left,t.left);return t}),Ca(e,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fa(t){const{width:e,height:i}=ua(t);return{width:e,height:i}}function Ba(t,e,i){const a=ta(e);const r=Zi(e);const n=i==="fixed";const o=ya(t,true,n,e);let s={scrollLeft:0,scrollTop:0};const c=xi(0);if(a||!a&&!n){if(Ji(e)!=="body"||ia(r)){s=la(e)}if(a){const t=ya(e,true,n,e);c.x=t.x+e.clientLeft;c.y=t.y+e.clientTop}else if(r){c.x=Da(r)}}const l=o.left+s.scrollLeft-c.x;const d=o.top+s.scrollTop-c.y;return{x:l,y:d,width:o.width,height:o.height}}function $a(t,e){if(!ta(t)||ca(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function Ea(t,e){const i=Gi(t);if(!ta(t)||xa(t)){return i}let a=$a(t,e);while(a&&aa(a)&&ca(a).position==="static"){a=$a(a,e)}if(a&&(Ji(a)==="html"||Ji(a)==="body"&&ca(a).position==="static"&&!ra(a))){return i}return a||na(t)||i}const Oa=async function(t){const e=this.getOffsetParent||Ea;const i=this.getDimensions;return{reference:Ba(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}};function Na(t){return ca(t).direction==="rtl"}const Wa={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Zi,getClippingRect:Ta,getOffsetParent:Ea,getElementRects:Oa,getClientRects:za,getDimensions:Fa,getScale:ba,isElement:Qi,isRTL:Na};function La(t,e){let i=null;let a;const r=Zi(t);function n(){var t;clearTimeout(a);(t=i)==null||t.disconnect();i=null}function o(s,c){if(s===void 0){s=false}if(c===void 0){c=1}n();const{left:l,top:d,width:h,height:f}=t.getBoundingClientRect();if(!s){e()}if(!h||!f){return}const u=ki(d);const p=ki(r.clientWidth-(l+h));const b=ki(r.clientHeight-(d+f));const m=ki(l);const g=-u+"px "+-p+"px "+-b+"px "+-m+"px";const v={rootMargin:g,threshold:vi(0,gi(1,c))||1};let y=true;function k(t){const e=t[0].intersectionRatio;if(e!==c){if(!y){return o()}if(!e){a=setTimeout((()=>{o(false,1e-7)}),100)}else{o(false,e)}}y=false}try{i=new IntersectionObserver(k,{...v,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(k,v)}i.observe(t)}o(true);return n}function ja(t,e,i,a){if(a===void 0){a={}}const{ancestorScroll:r=true,ancestorResize:n=true,elementResize:o=typeof ResizeObserver==="function",layoutShift:s=typeof IntersectionObserver==="function",animationFrame:c=false}=a;const l=pa(t);const d=r||n?[...l?fa(l):[],...fa(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:true});n&&t.addEventListener("resize",i)}));const h=l&&s?La(l,i):null;let f=-1;let u=null;if(o){u=new ResizeObserver((t=>{let[a]=t;if(a&&a.target===l&&u){u.unobserve(e);cancelAnimationFrame(f);f=requestAnimationFrame((()=>{var t;(t=u)==null||t.observe(e)}))}i()}));if(l&&!c){u.observe(l)}u.observe(e)}let p;let b=c?ya(t):null;if(c){m()}function m(){const e=ya(t);if(b&&(e.x!==b.x||e.y!==b.y||e.width!==b.width||e.height!==b.height)){i()}b=e;p=requestAnimationFrame(m)}i();return()=>{var t;d.forEach((t=>{r&&t.removeEventListener("scroll",i);n&&t.removeEventListener("resize",i)}));h==null||h();(t=u)==null||t.disconnect();u=null;if(c){cancelAnimationFrame(p)}}}const Pa=Vi;const Ya=Ui;const Ha=qi;const Ua=(t,e,i)=>{const a=new Map;const r={platform:Wa,...i};const n={...r.platform,_c:a};return Yi(t,e,{...r,platform:n})};const _a='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}';const Ka=_a;const Va=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.mode="date";this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.step=5;this.attachToElement=false;this.position=undefined;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.nativePickerAttributes=undefined}get input(){return this._input?.shadowRoot?.querySelector("input")??undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);if(this.mode!=="daterange"||t.includes(" - ")){this.catChange.emit(t)}}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>{this.input?this.input.disabled=this.disabled:null;this.pickr=this.initDatepicker(this.input)}))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onMinChanged(){this.pickr?.set("minDate",this.min);this.pickr?.set("maxDate",this.max);if(this.value&&!this.pickr?.selectedDates?.length){this.pickr?.clear()}}async doFocus(t){this._input?.doFocus(t)}async doBlur(){this._input?.doBlur()}render(){return[e("cat-input",{key:"bb983974c17139ee60d88877e398b1c46d672d37",ref:t=>this._input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>{t.stopPropagation();this.value=t.detail||undefined},onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.catBlur.emit(t.detail)}},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))),e("div",{key:"c8112214544e0582a1196350a846ddeb063067a3",ref:t=>this._calendarWrapper=t,class:"datepicker-wrapper"})]}initDatepicker(t){if(!t){return}const e=!!oi("cat-dropdown",t);const i=e?{"data-dropdown-no-close":""}:{};return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,appendTo:this.attachToElement?this._calendarWrapper:undefined,nativePickerAttributes:{...i,...this.nativePickerAttributes},position:this.attachToElement?(t,e)=>{this.updatePosition(t,e)}:this.position||undefined,onReady:(e,i,a)=>{ja(t,a.calendarContainer,(()=>this.updatePosition(a,a._input)))},applyChange:t=>this.value=t}))}updatePosition(t,e){if(e){Ua(e,t.calendarContainer,{strategy:"fixed",placement:this.position||"bottom-start",middleware:[Ya()]}).then((({x:e,y:i,placement:a})=>{if(t.calendarContainer){t.calendarContainer.dataset.placement=a;Object.assign(t.calendarContainer.style,{left:`${e}px`,top:`${i}px`,position:"fixed"})}}))}}get hostElement(){return a(this)}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}}};Va.style=Ka;const qa='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}';const Ja=qa;const Ga=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.disabled=false;this.max=undefined;this.min=undefined;this.mode="date";this.readonly=false;this.step=5;this.value=undefined;this.nativePickerAttributes=undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);this.catChange.emit(t)}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>this.pickr=this.initDatepicker(this.input)))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}render(){return e(i,{key:"6f363a4a673603f0c39f5a24b31bb768e804abfc"},e("div",{key:"2c56934aad4d60ea96a6a3c983ae9d1e39c82bde",tabIndex:this.disabled||this.readonly?-1:undefined,class:{"datepicker-wrapper":true,"datepicker-disabled":this.disabled,"datepicker-readonly":this.readonly}},e("input",{key:"6885c1c919af468401dddda38045ab9a8dc26aaf",ref:t=>this.input=t,value:this.value,disabled:this.disabled,readonly:this.readonly})))}initDatepicker(t){if(!t){return}return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,nativePickerAttributes:this.nativePickerAttributes??{},applyChange:t=>this.value=t},{...this.disabled?{enable:[]}:{},inline:true}))}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}}};Ga.style=Ja;const Za=125; /*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE @@ -7,4 +7,4 @@ import{r as t,h as e,H as i,g as a,c as r}from"./p-20919029.js";import{e as n,O * focus-trap 7.5.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */function Tr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Fr(t){for(var e=1;e0){var a=e[e.length-1];if(a!==i){a.pause()}}var r=e.indexOf(i);if(r===-1){e.push(i)}else{e.splice(r,1);e.push(i)}},deactivateTrap:function t(e,i){var a=e.indexOf(i);if(a!==-1){e.splice(a,1)}if(e.length>0){e[e.length-1].unpause()}}};var Nr=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var Wr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Escape"||(e===null||e===void 0?void 0:e.key)==="Esc"||(e===null||e===void 0?void 0:e.keyCode)===27};var Lr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Tab"||(e===null||e===void 0?void 0:e.keyCode)===9};var jr=function t(e){return Lr(e)&&!e.shiftKey};var Pr=function t(e){return Lr(e)&&e.shiftKey};var Yr=function t(e){return setTimeout(e,0)};var Hr=function t(e,i){var a=-1;e.every((function(t,e){if(i(t)){a=e;return false}return true}));return a};var Ur=function t(e){for(var i=arguments.length,a=new Array(i>1?i-1:0),r=1;r1?r-1:0),s=1;s=0){e=a.activeElement}else{var i=o.tabbableGroups[0];var r=i&&i.firstTabbableNode;e=r||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var f=function t(){o.containerGroups=o.containers.map((function(t){var e=Mr(t,n.tabbableOptions);var i=Rr(t,n.tabbableOptions);var a=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=i.find((function(t){return Cr(t)}));var s=i.slice().reverse().find((function(t){return Cr(t)}));var c=!!e.find((function(t){return cr(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:i,posTabIndexesFound:c,firstTabbableNode:a,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function t(a){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(a);if(n<0){if(r){return i.slice(i.indexOf(a)+1).find((function(t){return Cr(t)}))}return i.slice(0,i.indexOf(a)).reverse().find((function(t){return Cr(t)}))}return e[n+(r?1:-1)]}}}));o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(o.tabbableGroups.length<=0&&!d("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(o.containerGroups.find((function(t){return t.posTabIndexesFound}))&&o.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var u=function t(e){var i=e.activeElement;if(!i){return}if(i.shadowRoot&&i.shadowRoot.activeElement!==null){return t(i.shadowRoot)}return i};var p=function t(e){if(e===false){return}if(e===u(document)){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(Nr(e)){e.select()}};var b=function t(e){var i=d("setReturnFocus",e);return i?i:i===false?false:e};var m=function t(e){var i=e.target,a=e.event,r=e.isBackward,s=r===void 0?false:r;i=i||_r(a);f();var c=null;if(o.tabbableGroups.length>0){var h=l(i,a);var u=h>=0?o.containerGroups[h]:undefined;if(h<0){if(s){c=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{c=o.tabbableGroups[0].firstTabbableNode}}else if(s){var p=Hr(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return i===e}));if(p<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=cr(i)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i,false)}}else{var g=Hr(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return i===e}));if(g<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=cr(i)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var i=_r(e);var a=l(i,e)>=0;if(a||i instanceof Document){if(a){o.mostRecentlyFocusedNode=i}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(cr(o.mostRecentlyFocusedNode)>0){var c=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[c].tabbableNodes;if(d.length>0){var f=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(f>=0){if(n.isKeyForward(o.recentNavEvent)){if(f+1=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return cr(t)>0}))}))){s=false}}}else{s=false}if(s){r=m({target:o.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(o.recentNavEvent)})}if(r){p(r)}else{p(o.mostRecentlyFocusedNode||h())}}o.recentNavEvent=undefined};var y=function t(e){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var a=m({event:e,isBackward:i});if(a){if(Lr(e)){e.preventDefault()}p(a)}};var k=function t(e){if(Wr(e)&&Ur(n.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}Or.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?Yr((function(){p(h())})):p(h());a.addEventListener("focusin",v,true);a.addEventListener("mousedown",g,{capture:true,passive:false});a.addEventListener("touchstart",g,{capture:true,passive:false});a.addEventListener("click",x,{capture:true,passive:false});a.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}a.removeEventListener("focusin",v,true);a.removeEventListener("mousedown",g,true);a.removeEventListener("touchstart",g,true);a.removeEventListener("click",x,true);a.removeEventListener("keydown",k,true);return s};var D=function t(e){var i=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(i){p(h())}};var I=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var M=function t(){if(!I){return}I.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){I.observe(t,{subtree:true,childList:true})}))}};s={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var i=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=a.activeElement;i===null||i===void 0||i();var s=function t(){if(n){f()}w();M();r===null||r===void 0||r()};if(n){n(o.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!o.active){return this}var i=Fr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();Or.deactivateTrap(r,s);var a=c(i,"onDeactivate");var l=c(i,"onPostDeactivate");var d=c(i,"checkCanReturnFocus");var h=c(i,"returnFocus","returnFocusOnDeactivate");a===null||a===void 0||a();var f=function t(){Yr((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===void 0||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(f,f);return this}f();return this},pause:function t(e){if(o.paused||!o.active){return this}var i=c(e,"onPause");var a=c(e,"onPostPause");o.paused=true;i===null||i===void 0||i();z();M();a===null||a===void 0||a();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var i=c(e,"onUnpause");var a=c(e,"onPostUnpause");o.paused=false;i===null||i===void 0||i();f();w();M();a===null||a===void 0||a();return this},updateContainerElements:function t(e){var i=[].concat(e).filter(Boolean);o.containers=i.map((function(t){return typeof t==="string"?a.querySelector(t):t}));if(o.active){f()}M();return this}};s.updateContainerElements(e);return s};const qr=t=>(t?Mr(t,{includeContainer:true,getShadowRoot:true}):[]).shift();const Jr=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";const Gr=Jr;let Zr=0;const Xr=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=Zr++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false}clickHandler(t){if(!this.trigger){this.initTrigger();this.toggle()}const e=t.composedPath();if(!this.noAutoClose&&e.includes(this.content)&&t.target?.slot!=="trigger"&&!e.slice(0,e.indexOf(this.content)).find((t=>this.hasAttribute(t,"data-dropdown-no-close")))){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):Vr(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>!this.noAutoClose&&!t.composedPath().includes(this.content)&&!t.composedPath().find((t=>this.hasAttribute(t,"data-dropdown-no-close"))),onPostDeactivate:()=>this.close(),onPostActivate:()=>this.catOpen.emit(),setReturnFocus:t=>this.trigger||t,isKeyForward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowRight"||this.arrowNavigation==="vertical"&&t.key==="ArrowDown"){t.preventDefault();return true}return t.key==="Tab"},isKeyBackward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowLeft"||this.arrowNavigation==="vertical"&&t.key==="ArrowUp"){t.preventDefault();return true}return t.key==="Tab"&&t.shiftKey},initialFocus:()=>this.noInitialFocus?false:undefined});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;this.content.classList.remove("show");setTimeout((()=>{this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";this.trigger?.setAttribute("aria-expanded","false");this.trap?.deactivate();this.catClose.emit()}),Za)}render(){return e(i,{key:"6cde42e7f7bfc2df858b7179157a1f52e0c23e0e"},e("slot",{key:"91633464f448a8142f52b6e1e62420974a929e84",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"2ed9bd2dcc58b83ec1e7781959456e67d9397c48",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"a91710cd8455cb006f60e48dd49aee7f6d114877",name:"content"})))}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));ja(this.trigger,this.content,(()=>this.update()))}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const i=e.shift();t=i?.hasAttribute("data-trigger")?i:i?.querySelector("[data-trigger]")??undefined}if(!t){t=qr(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(){if(this.trigger){const t=this.noResize?[]:[Ha({padding:Xr.OFFSET,apply({availableWidth:t,availableHeight:e,elements:i}){Object.assign(i.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Ua(this.trigger,this.content,{strategy:"fixed",placement:this.placement,middleware:[Ki(Xr.OFFSET),Ya(),...t]}).then((({x:t,y:e,placement:i})=>{this.content.dataset.placement=i;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};Xr.OFFSET=4;Xr.style=Gr;const Qr=":host{display:block}";const tn=Qr;const en=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarkerChanged(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>!t.requiredMarker?.endsWith("!")&&(t.requiredMarker=e)))}onHorizontalChanged(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(i,{key:"6892a4f36f418d431b6006518c44bf2b58e70f70",style:{"--label-size":this.labelSize}},e("slot",{key:"908b2720b504ce9dfb3a491aa3bbe092a3d2e0cf",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-input, cat-textarea, cat-select, cat-datepicker"));this.onRequiredMarkerChanged(this.requiredMarker);this.onHorizontalChanged(this.horizontal)}calculate(t){const e=t.filter((t=>!t.required)).length;const i=t.length-e;return i>=e?"optional":"required"}get hostElement(){return a(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};en.style=tn;const an=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;height:1em;width:calc(var(--cat-icon-ratio, 1) * 1em)}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";const rn=an;const nn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"66938702e645f5bc12ca9a4592af24ac46b40c52",innerHTML:this.iconSrc||(this.icon?M.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};nn.style=rn;var on=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var sn=function(t,e,i,a,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=i>=0?i:2;d.numeralThousandsGroupStyle=a||sn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!s;d.tailPrefix=!!c;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};sn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};sn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,i,a,r,n,o="";t=t.replace(/[A-Za-z]/g,"").replace(e.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",e.numeralPositiveOnly?"":"-").replace("M",e.numeralDecimalMark);if(e.stripLeadingZeroes){t=t.replace(/^(-)?0+(?=\d)/,"$1")}a=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=a+e.prefix}else{r=e.prefix+a}}else{r=a}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){i=t.split(e.numeralDecimalMark);n=i[0];o=e.numeralDecimalMark+i[1].slice(0,e.numeralDecimalScale)}if(a==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case sn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case sn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case sn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return a+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var cn=sn;var ln=function(t,e,i){var a=this;a.date=[];a.blocks=[];a.datePattern=t;a.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMin.length===2)a.dateMin.unshift(0);a.dateMax=i.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMax.length===2)a.dateMax.unshift(0);a.initBlocks()};ln.prototype={initBlocks:function(){var t=this;t.datePattern.forEach((function(e){if(e==="Y"){t.blocks.push(4)}else{t.blocks.push(2)}}))},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(a,r){if(t.length>0){var n=t.slice(0,a),o=n.slice(0,1),s=t.slice(a);switch(e.datePattern[r]){case"d":if(n==="00"){n="01"}else if(parseInt(o,10)>3){n="0"+o}else if(parseInt(n,10)>31){n="31"}break;case"m":if(n==="00"){n="01"}else if(parseInt(o,10)>1){n="0"+o}else if(parseInt(n,10)>12){n="12"}break}i+=n;t=s}}));return this.getFixedDateString(i)},getFixedDateString:function(t){var e=this,i=e.datePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&i[0].toLowerCase()!=="y"&&i[1].toLowerCase()!=="y"){s=i[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);a=this.getFixedDate(d,h,0)}if(t.length===8){i.forEach((function(t,e){switch(t){case"d":r=e;break;case"m":n=e;break;default:o=e;break}}));l=o*2;s=r<=o?r*2:r*2+2;c=n<=o?n*2:n*2+2;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=this.getFixedDate(d,h,f)}if(t.length===4&&(i[0]==="y"||i[1]==="y")){c=i[0]==="m"?0:2;l=2-c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);u=t.slice(l,l+2).length===2;a=[0,h,f]}if(t.length===6&&(i[0]==="Y"||i[1]==="Y")){c=i[0]==="m"?0:4;l=2-.5*c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=[0,h,f]}a=e.getRangeFixedDate(a);e.date=a;var p=a.length===0?t:i.reduce((function(t,i){switch(i){case"d":return t+(a[0]===0?"":e.addLeadingZero(a[0]));case"m":return t+(a[1]===0?"":e.addLeadingZero(a[1]));case"y":return t+(u?e.addLeadingZeroForYear(a[2],false):"");case"Y":return t+(u?e.addLeadingZeroForYear(a[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,i=e.datePattern,a=e.dateMin||[],r=e.dateMax||[];if(!t.length||a.length<3&&r.length<3)return t;if(i.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]t[2]||a[2]===t[2]&&(a[1]>t[1]||a[1]===t[1]&&a[0]>t[0])))return a;return t},getFixedDate:function(t,e,i){t=Math.min(t,31);e=Math.min(e,12);i=parseInt(i||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(i)?29:28:30)}return[t,e,i]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){if(e){return(t<10?"000":t<100?"00":t<1e3?"0":"")+t}return(t<10?"0":"")+t}};var dn=ln;var hn=function(t,e){var i=this;i.time=[];i.blocks=[];i.timePattern=t;i.timeFormat=e;i.initBlocks()};hn.prototype={initBlocks:function(){var t=this;t.timePattern.forEach((function(){t.blocks.push(2)}))},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var t=this;if(String(t.timeFormat)==="12"){return{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}}return{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");var a=e.getTimeFormatOptions();e.blocks.forEach((function(r,n){if(t.length>0){var o=t.slice(0,r),s=o.slice(0,1),c=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(s,10)>a.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxHours){o=a.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>a.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxMinutes){o=a.maxMinutes+""}break}i+=o;t=c}}));return this.getFixedTimeString(i)},getFixedTimeString:function(t){var e=this,i=e.timePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;if(t.length===6){i.forEach((function(t,e){switch(t){case"s":r=e*2;break;case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;s=r;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){i.forEach((function(t,e){switch(t){case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;d=0;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}e.time=a;return a.length===0?t:i.reduce((function(t,i){switch(i){case"s":return t+e.addLeadingZero(a[2]);case"m":return t+e.addLeadingZero(a[1]);case"h":return t+e.addLeadingZero(a[0])}}),"")},getFixedTime:function(t,e,i){i=Math.min(parseInt(i||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,i]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var fn=hn;var un=function(t,e){var i=this;i.delimiter=e||e===""?e:" ";i.delimiterRE=e?new RegExp("\\"+e,"g"):"";i.formatter=t};un.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();t=t.replace(/[^\d+]/g,"");t=t.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");t=t.replace(e.delimiterRE,"");var i="",a,r=false;for(var n=0,o=t.length;n0,c="";if(i===0){return t}e.forEach((function(e,l){if(t.length>0){var d=t.slice(0,e),h=t.slice(e);if(s){c=r[n?l-1:l]||c}else{c=a}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l0?e.numeralIntegerScale:0;t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2;t.numeralDecimalMark=e.numeralDecimalMark||".";t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand";t.numeralPositiveOnly=!!e.numeralPositiveOnly;t.stripLeadingZeroes=e.stripLeadingZeroes!==false;t.signBeforePrefix=!!e.signBeforePrefix;t.tailPrefix=!!e.tailPrefix;t.swapHiddenInput=!!e.swapHiddenInput;t.numericOnly=t.creditCard||t.date||!!e.numericOnly;t.uppercase=!!e.uppercase;t.lowercase=!!e.lowercase;t.prefix=t.creditCard||t.date?"":e.prefix||"";t.noImmediatePrefix=!!e.noImmediatePrefix;t.prefixLength=t.prefix.length;t.rawValueTrimPrefix=!!e.rawValueTrimPrefix;t.copyDelimiter=!!e.copyDelimiter;t.initValue=e.initValue!==undefined&&e.initValue!==null?e.initValue.toString():"";t.delimiter=e.delimiter||e.delimiter===""?e.delimiter:e.date?"/":e.time?":":e.numeral?",":e.phone?" ":" ";t.delimiterLength=t.delimiter.length;t.delimiterLazyShow=!!e.delimiterLazyShow;t.delimiters=e.delimiters||[];t.blocks=e.blocks||[];t.blocksLength=t.blocks.length;t.root=typeof on==="object"&&on?on:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var kn=yn;var xn=function(t,e){var i=this;var a=false;if(typeof t==="string"){i.element=document.querySelector(t);a=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){i.element=t[0];a=t.length>1}else{i.element=t}}if(!i.element){throw new Error("[cleave.js] Please check the element")}if(a){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=i.element.value;i.properties=xn.DefaultProperties.assign({},e);i.init()};xn.prototype={init:function(){var t=this,e=t.properties;if(!e.numeral&&!e.phone&&!e.creditCard&&!e.time&&!e.date&&(e.blocksLength===0&&!e.prefix)){t.onInput(e.initValue);return}e.maxLength=xn.Util.getMaxLength(e.blocks);t.isAndroid=xn.Util.isAndroid();t.lastInputValue="";t.isBackward="";t.onChangeListener=t.onChange.bind(t);t.onKeyDownListener=t.onKeyDown.bind(t);t.onFocusListener=t.onFocus.bind(t);t.onCutListener=t.onCut.bind(t);t.onCopyListener=t.onCopy.bind(t);t.initSwapHiddenInput();t.element.addEventListener("input",t.onChangeListener);t.element.addEventListener("keydown",t.onKeyDownListener);t.element.addEventListener("focus",t.onFocusListener);t.element.addEventListener("cut",t.onCutListener);t.element.addEventListener("copy",t.onCopyListener);t.initPhoneFormatter();t.initDateFormatter();t.initTimeFormatter();t.initNumeralFormatter();if(e.initValue||e.prefix&&!e.noImmediatePrefix){t.onInput(e.initValue)}},initSwapHiddenInput:function(){var t=this,e=t.properties;if(!e.swapHiddenInput)return;var i=t.element.cloneNode(true);t.element.parentNode.insertBefore(i,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=i;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new xn.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter)},initTimeFormatter:function(){var t=this,e=t.properties;if(!e.time){return}e.timeFormatter=new xn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new xn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new xn.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,i=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=i===8},onChange:function(t){var e=this,i=e.properties,a=xn.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=a.getPostDelimiter(e.lastInputValue,i.delimiter,i.delimiters);if(e.isBackward&&r){i.postDelimiterBackspace=r}else{i.postDelimiterBackspace=false}this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value;if(e.prefix&&e.noImmediatePrefix&&!t.element.value){this.onInput(e.prefix)}xn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,i=e.properties,a=xn.Util,r=e.element.value,n="";if(!i.copyDelimiter){n=a.stripDelimiters(r,i.delimiter,i.delimiters)}else{n=r}try{if(t.clipboardData){t.clipboardData.setData("Text",n)}else{window.clipboardData.setData("Text",n)}t.preventDefault()}catch(t){}},onInput:function(t){var e=this,i=e.properties,a=xn.Util;var r=a.getPostDelimiter(t,i.delimiter,i.delimiters);if(!i.numeral&&i.postDelimiterBackspace&&!r){t=a.headStr(t,t.length-i.postDelimiterBackspace.length)}if(i.phone){if(i.prefix&&(!i.noImmediatePrefix||t.length)){i.result=i.prefix+i.phoneFormatter.format(t).slice(i.prefix.length)}else{i.result=i.phoneFormatter.format(t)}e.updateValueState();return}if(i.numeral){if(i.prefix&&i.noImmediatePrefix&&t.length===0){i.result=""}else{i.result=i.numeralFormatter.format(t)}e.updateValueState();return}if(i.date){t=i.dateFormatter.getValidatedDate(t)}if(i.time){t=i.timeFormatter.getValidatedTime(t)}t=a.stripDelimiters(t,i.delimiter,i.delimiters);t=a.getPrefixStrippedValue(t,i.prefix,i.prefixLength,i.result,i.delimiter,i.delimiters,i.noImmediatePrefix,i.tailPrefix,i.signBeforePrefix);t=i.numericOnly?a.strip(t,/[^\d]/g):t;t=i.uppercase?t.toUpperCase():t;t=i.lowercase?t.toLowerCase():t;if(i.prefix){if(i.tailPrefix){t=t+i.prefix}else{t=i.prefix+t}if(i.blocksLength===0){i.result=t;e.updateValueState();return}}if(i.creditCard){e.updateCreditCardPropsByValue(t)}t=a.headStr(t,i.maxLength);i.result=a.getFormattedValue(t,i.blocks,i.blocksLength,i.delimiter,i.delimiters,i.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,i=e.properties,a=xn.Util,r;if(a.headStr(i.result,4)===a.headStr(t,4)){return}r=xn.CreditCardDetector.getInfo(t,i.creditCardStrictMode);i.blocks=r.blocks;i.blocksLength=i.blocks.length;i.maxLength=a.getMaxLength(i.blocks);if(i.creditCardType!==r.type){i.creditCardType=r.type;i.onCreditCardTypeChanged.call(e,i.creditCardType)}},updateValueState:function(){var t=this,e=xn.Util,i=t.properties;if(!t.element){return}var a=t.element.selectionEnd;var r=t.element.value;var n=i.result;a=e.getNextCursorPosition(a,r,n,i.delimiter,i.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(i.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this,i=e.properties;i.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,i=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(i.numeral){t=t.replace(".",i.numeralDecimalMark)}i.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,i=xn.Util,a=t.element.value;if(e.rawValueTrimPrefix){a=i.getPrefixStrippedValue(a,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){a=e.numeralFormatter.getRawValue(a)}else{a=i.stripDelimiters(a,e.delimiter,e.delimiters)}return a},getISOFormatDate:function(){var t=this,e=t.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,e=t.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener);t.element.removeEventListener("keydown",t.onKeyDownListener);t.element.removeEventListener("focus",t.onFocusListener);t.element.removeEventListener("cut",t.onCutListener);t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}};xn.NumeralFormatter=cn;xn.DateFormatter=dn;xn.TimeFormatter=fn;xn.PhoneFormatter=pn;xn.CreditCardDetector=mn;xn.Util=vn;xn.DefaultProperties=kn;(typeof on==="object"&&on?on:window)["Cleave"]=xn;var wn=xn;function zn(t){return t!=null&&`${t}`!=="false"}function Dn(t,e=0){return In(t)?Number(t):e}function In(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Mn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";const Rn=Mn;let Cn=0;const An=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Cn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.isPasswordShown=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.togglePassword=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on input",this)}}async doFocus(t){const e=this.input.type==="hidden"?this.findSiblingInput(this.input.nextSibling):this.input;e?.focus(t)}async doBlur(){this.input.blur()}async clear(){this.value="";this.catChange.emit(this.value)}async mask(t){new wn(this.input,t)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e("div",{key:"34152d1627e62e4852531f9afdb2b0abc3894a78",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"89c3e91d9d041a68389e776f38647aa6360e5ea5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"ceed5e06d5bfb6eaf425c562422a6cb470c3dea4",class:"input-container"},e("div",{key:"bbd90f6b705d2e9213a45f5f7839370fce830c89",class:"input-outer-wrapper"},e("div",{key:"7fa315fbb8421e0466d7bceba57c9f158d08c476",class:{"input-wrapper":true,"input-round":this.round,"input-readonly":this.readonly,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"d8db1f7ab01afe94166fc4f6a6d37a595941c0e5",class:"input-inner-wrapper"},e("input",{key:"af383fe0a04ca8a41e9d9595ee4f422cebb5d99d",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled&&!this.readonly&&!!this.value,"has-toggle-password":this.togglePassword&&!this.disabled&&!this.readonly&&!!this.value},autocomplete:this.autoComplete,disabled:this.disabled,max:this.max,maxlength:this.maxLength,min:this.min,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,type:this.isPasswordShown?"text":this.type,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.clearable&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":D.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":D.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"5d318f9d6eeeebcef42b5d7abb000f0e51375303",name:"addon"})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.input.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}findSiblingInput(t){if(t instanceof HTMLInputElement){return t}else if(t?.nextSibling){return this.findSiblingInput(t.nextSibling)}return undefined}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};An.style=Rn;const Sn=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const Tn=Sn;const Fn=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){return e("nav",{key:"ede4b30a483fb729428b8d2bfdd4d67b1b5f1022",role:"navigation"},e("ol",{key:"04fd80b91e33c55a23d010e5fa108b10a08e2bdb",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"cd98373b4a9a69b25e9df8185b808561336c9a75"},e("cat-button",{key:"ec601998cd4ba8a2007e1f1dcecad86f36633095",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:D.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"8ff7654e0087ece5cb4f81205083ea8f13af7112"},e("cat-button",{key:"3ca4cf8fa48d650472e20efc09cbed49b55d33bf",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:D.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const i=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const a=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=a?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,i);if(!e&&!a){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,i){const a=this.clamp(e,0,this.pageCount);const r=this.clamp(i,0,this.pageCount);Array(r-a).fill(0).forEach(((e,i)=>t.add(a+i)))}clamp(t,e,i){return Math.min(Math.max(t,e),i)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,i)=>[i>0&&this.pages[i-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:D.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};Fn.style=Tn;const Bn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";const $n=Bn;let En=0;const On=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-radio-${++En}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value="";this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on radio",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"1f5432c0800e82741e2786146b728403157eb874"},e("label",{key:"cac427f0f10635bd03a799d25ac0160b721cfcdb",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"6a8598e54d46eb976717faf125c58a675b79ad99",class:"radio"},e("input",{key:"7b5dea2ce070d83a1a1f16375d3d782f8b3d1459",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.identifier||this.id,type:"radio",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"e6f1802e164c2b74f84f413fd351ea6a9f10c9a2",class:"circle"})),e("span",{key:"95e951a221d6b36d980a6619fa501a409555e981",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"circle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=true;this.catChange.emit(this.value)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return a(this)}};On.style=$n;const Nn=":host{display:block}:host([hidden]){display:none}";const Wn=Nn;const Ln=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.catRadioGroup=[];this.name=undefined;this.value=undefined;this.disabled=false;this.a11yLabel=undefined;this.labelLeft=false}onNameChanged(t){this.catRadioGroup.forEach((e=>e.name=t))}onValueChanged(t){this.catRadioGroup.forEach((e=>e.checked=e.value===t));this.updateTabIndex()}onDisabledChanged(t){this.catRadioGroup.forEach((e=>e.disabled=e.disabled||t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>e.labelLeft=e.labelLeft||t))}componentDidLoad(){this.init();this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-RADIO"))&&this.init()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const e=this.catRadioGroup.filter((t=>!t.disabled));const i=document.activeElement;const a=this.catRadioGroup.findIndex((t=>t===i));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=a<0?0:(a+r+e.length)%e.length;e[n].doFocus();e[n].shadowRoot?.querySelector("input")?.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));if(e?.localName==="cat-radio"){this.value=e?.checked?e?.value:undefined;this.catChange.emit(this.value)}}onFocus(t){if(!t.relatedTarget){this.catBlur.emit(t)}}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{key:"5608e54b1bb857a4068a6287b072bd71081d51d2",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"8e62283745589e94e99650f7fe85afeea39fa253"}))}init(){this.catRadioGroup=Array.from(this.hostElement.querySelectorAll(`cat-radio`));this.onNameChanged(this.name);this.onValueChanged(this.value);this.onDisabledChanged(this.disabled);this.onLabelLeftChanged(this.labelLeft)}updateTabIndex(){if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>t.shadowRoot?.querySelector("input")?.setAttribute("tabindex","-1")));const t=this.catRadioGroup.findIndex((t=>t.checked));this.catRadioGroup[t>=0?t:0].shadowRoot?.querySelector("input")?.setAttribute("tabindex","0")}}get hostElement(){return a(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};Ln.style=Wn;const jn=":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;inset:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{width:100%;overflow:hidden}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";const Pn=jn;const Yn=class{constructor(e){t(this,e);this.scrolledTop=r(this,"scrolledTop",7);this.scrolledLeft=r(this,"scrolledLeft",7);this.scrolledRight=r(this,"scrolledRight",7);this.scrolledBottom=r(this,"scrolledBottom",7);this.init=new A;this.destroyed=new A;this.resizedEntries=new A;this.resizedObserver=new ResizeObserver((t=>this.resizedEntries.next(t)));this.noShadowX=false;this.noShadowY=false;this.noOverflowX=false;this.noOverflowY=false;this.noOverscroll=false;this.noScrolledInit=false;this.scrolledBuffer=0}componentDidRender(){if(this.scrollElement){this.scrolled=tt(this.scrollElement,"scroll").pipe(Rt(this.destroyed));this.resizedObserver.observe(this.scrollElement)}if(this.scrollWrapperElement){this.resizedObserver.observe(this.scrollWrapperElement)}this.attachEmitter("left",this.scrolledLeft);this.attachEmitter("right",this.scrolledRight);this.attachEmitter("bottom",this.scrolledBottom);this.attachEmitter("top",this.scrolledTop);ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Rt(this.destroyed)).subscribe((({top:t,left:e,right:i,bottom:a})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",i);this.toggleClass("cat-scrollable-bottom",a)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{key:"b8d4abf49b6747e516f23bc4e16bbc1b7b9e2efe",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{class:"shadow-top"}),!this.noShadowX&&e("div",{class:"shadow-left"}),!this.noShadowX&&e("div",{class:"shadow-right"}),!this.noShadowY&&e("div",{class:"shadow-bottom"})),e("div",{key:"9552a4a4a86713effab40df3f95310dae5863f78",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"acc0afcb95539ad6db29c6a96b2673892f2d9153"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Rt(this.destroyed)).subscribe((()=>e.emit()))}getScrollOffset(t){if(this.scrollElement){switch(t){case"top":return this.scrollElement.scrollTop;case"left":return this.scrollElement.scrollLeft;case"right":return this.scrollElement.scrollWidth-this.scrollElement.clientWidth-this.scrollElement.scrollLeft;case"bottom":return this.scrollElement.scrollHeight-this.scrollElement.clientHeight-this.scrollElement.scrollTop;default:return 0}}return 0}toggleClass(t,e){if(e){this.scrollWrapperElement?.classList.add(t)}else{this.scrollWrapperElement?.classList.remove(t)}}};Yn.THROTTLE=50;Yn.style=Pn;var Hn="__autosizeInputGhost";var Un={" ":"nbsp","<":"lt",">":"gt"};function _n(t){return"&"+Un[t]+";"}function Kn(t){return t.replace(/\s|<|>/g,_n)}function Vn(){var t=document.createElement("div");t.id=Hn;t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;";document.body.appendChild(t);return t}var qn=function(t,e){var i=window.getComputedStyle(t);var a="box-sizing:"+i.boxSizing+";border-left:"+i.borderLeftWidth+" solid red"+";border-right:"+i.borderRightWidth+" solid red"+";font-family:"+i.fontFamily+";font-feature-settings:"+i.fontFeatureSettings+";font-kerning:"+i.fontKerning+";font-size:"+i.fontSize+";font-stretch:"+i.fontStretch+";font-style:"+i.fontStyle+";font-variant:"+i.fontVariant+";font-variant-caps:"+i.fontVariantCaps+";font-variant-ligatures:"+i.fontVariantLigatures+";font-variant-numeric:"+i.fontVariantNumeric+";font-weight:"+i.fontWeight+";letter-spacing:"+i.letterSpacing+";margin-left:"+i.marginLeft+";margin-right:"+i.marginRight+";padding-left:"+i.paddingLeft+";padding-right:"+i.paddingRight+";text-indent:"+i.textIndent+";text-transform:"+i.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var i=document.getElementById(Hn)||Vn();i.style.cssText+=a;i.innerHTML=Kn(e);var r=window.getComputedStyle(i).width;t.style.width=r;return r}t.addEventListener("input",r);var n=r();if(e&&e.minWidth&&n!=="0px"){t.style.minWidth=n}return function(){t.removeEventListener("input",r);var e=document.getElementById(Hn);if(e){e.parentNode.removeChild(e)}}};const Jn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-multiple .select-wrapper-inner{flex-wrap:wrap}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const Gn=Jn;const Zn={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let Xn=0;let Qn=0;const to=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.catChange=r(this,"catChange",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Xn++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=Zn;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;this.debounce=250;this.placement="bottom-start";this.value=undefined;this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.clearable=false;this.tags=false;this.tagHint=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}onStateChanged(t,e){const i=i=>t[i]!==e[i];if(i("isOpen")){this.update()}if(i("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(i("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const i=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=i}else{t=i.length?i[0]:""}}else{const e=i.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const a=this.state.selection.filter((t=>t.item.id.startsWith(`select-${this.id}-tag`))).map((t=>t.render.label));if(this.multiple){t={ids:e,tags:a}}else{t={id:e.length?e[0]:"",tag:a.length?a[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){qn(this.input)}if(this.trigger&&this.dropdown){ja(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on select",this)}}onBlur(t){if(!this.multiple&&this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}this.hide();if(!this.multiple&&(!this.tags||!this.state.selection?.length)){if(this.state.tempSelection?.length){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else if(!this.state.selection?.length){this.patchState({activeSelectionIndex:-1,selection:[],tempSelection:[],options:[],term:""})}}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&e){if(this.tags&&this.state.activeOptionIndex===0&&this.state.options[0].item.id===`select-${this.id}-option-tag`){t.preventDefault();if(this.multiple){this.toggleTag(this.state.options[0])}else{this.createTag(this.state.options[0].render.label)}}else if(this.state.activeOptionIndex>=0){t.preventDefault();if(this.multiple){this.toggle(this.state.options[this.state.activeOptionIndex])}else{this.select(this.state.options[this.state.activeOptionIndex])}}else if(this.tags&&t.key==="Enter"&&this.state.activeOptionIndex<0){this.createTag(this.state.term)}}else if(t.key==="Escape"){if(this.hide()){t.stopPropagation()}}else if(t.key==="Backspace"||t.key==="Delete"){this.input?.focus();if(!this.multiple||!this.state.term||this.input?.selectionStart===0&&t.key==="Backspace"){if(this.state.activeSelectionIndex>=0){this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id)}else if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:this.state.term?[...this.state.selection]:[]})}}}else if(t.key==="Tab"){this.trigger?.setAttribute("tabindex","-1");if(this.multiple){this.patchState({activeSelectionIndex:-1,activeOptionIndex:-1})}else if(this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}}else if(t.key.length===1){this.input?.focus()}}onKeyUp(t){if(t.key==="Tab"&&!t.shiftKey){this.hostElement.shadowRoot?.activeElement===this.trigger&&this.input?.focus();if(this.hostElement.shadowRoot?.activeElement===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=this.trigger?.querySelector(`#select-clear-btn-${this.id}`);if(t){this.hostElement.shadowRoot?.activeElement===t&&this.show()}else{this.show()}}}async doFocus(t){this.input?.focus(t)}async doBlur(){this.input?.blur()}async clear(){this.clearInput()}async connect(t){this.connector=t;let e;this.subscription?.unsubscribe();this.subscription=this.term$.asObservable().pipe(ft((t=>t?nt(this.debounce):R(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),Dt((t=>t+1),0),It(0)))),At((()=>this.patchState({options:[]}))),Mt((i=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(i,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),Ct((t=>!t.last),true),Dt(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!i.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))?.render.label}i.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:i})}))}render(){return e(i,{key:"062a85c7c55fa74a196cbca508dd12c08f329922"},e("div",{key:"c4d7213f5c5d8098053f740128d07faeaa8a96bf",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"75573825fa123e453a5f2877d163faecdb6fd5c5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"))))),e("div",{key:"1f78a80916cf895f76bd318b03d575ed87789a49",class:"select-container"},e("div",{key:"5998ad61fb04fbbc242883b39049b083c89fdbcf",class:{"select-wrapper":true,"select-disabled":this.disabled,"select-invalid":this.invalid},ref:t=>this.trigger=t,id:this.id,role:"combobox","aria-expanded":this.state.isOpen||this.isPillboxActive(),"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-required":this.required?"true":false,"aria-activedescendant":this.activeDescendant,onClick:t=>this.onClick(t)},e("div",{key:"b251a7ec629213881100fe8a22cfe963e9e3ca0f",class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,i)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===i},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${i}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:D.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1,"data-dropdown-no-close":true}))))):this.state.selection.length&&this.state.selection[0].render.avatar?e("cat-avatar",{label:this.state.selection[0].render.label,round:this.state.selection[0].render.avatar.round,src:this.state.selection[0].render.avatar.src,icon:this.state.selection[0].render.avatar.icon,initials:this.state.selection[0].render.avatar.initials??""}):null,e("input",{key:"148ddd23d61a93bc56c1d7944bae37cd174038a8",...this.nativeAttributes,part:"input",class:"select-input",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving})),this.state.isResolving&&e("cat-spinner",null),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:D.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?D.t("select.close"):D.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving,"data-dropdown-no-close":true})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"5d1f9bbcdd97d67a67da30715b6eb558c8828846",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(to.SKELETON_COUNT)).map((()=>e("li",{class:"select-option-loading"},e("cat-skeleton",{variant:"body",lines:1}),e("cat-skeleton",{variant:"body",lines:1})))):!this.state.options.length&&!this.tags&&e("li",{class:"select-option-empty"},this.noItems?this.noItems:D.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,i)=>{const a=this.tags&&t.item.id===`select-${this.id}-option-tag`;const r=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const n=()=>{if(a){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${i}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===i},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!a?this.toggle(t):this.toggleTag(t);e.stopPropagation()}},e("span",{slot:"label",class:"select-option-inner"},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===i},onFocus:()=>this.input?.focus(),onClick:()=>a?this.createTag(t.render.label):this.select(t),tabIndex:-1},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let i;if(this.tags){i=this.initTags()}const a=e.length?t.resolve(e).pipe(zt()):R([]);a.pipe(dt((()=>R([])))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags){i.filter((t=>!this.isTagSelected(t,a))).forEach(((t,e)=>{const i={id:`select-${this.id}-tag-${e}`,name:t};a.push({item:i,render:{label:i.name}})}))}this.patchState({isResolving:false,selection:a,term:!this.multiple&&a.length?a[0].render.label:""})}))}toSelectItems(t,e){return e.map((e=>({item:{...e,id:t.customId?t.customId(e):e.id},render:t.render(e)})))}show(){if(!this.state.isOpen&&this.connector){this.connect(this.connector);this.patchState({isOpen:true});this.catOpen.emit();this.term$.next("");this.input?.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit();return true}return false}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.search(t.render.label)}this.patchState({selection:e,tempSelection:[]});if(this.multiple&&this.state.term.trim()&&this.input){this.patchState({term:"",activeOptionIndex:-1});this.term$.next("");this.input.value=""}}this.setTransparentCaret()}deselect(t){if(this.isSelected(t)){this.patchState({selection:this.state.selection.filter((e=>e.item.id!==t)),activeSelectionIndex:-1})}}toggle(t){this.isSelected(t.item.id)?this.deselect(t.item.id):this.tags&&this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.select(t)}clearInput(){if(this.input&&this.state.term){this.patchState({selection:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){this.connector=t??this.connector;this.subscription?.unsubscribe();this.subscription=undefined;this.state=Zn}onClick(t){if(this.disabled){return}const e=t.target;this.trigger?.setAttribute("tabindex","0");this.input?.focus();if(e===this.trigger||e===this.input||e.classList.contains("select-btn")||e.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){this.search(this.input?.value.trim()||"");if(!this.multiple){if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:[...this.state.selection]})}if(!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Ua(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Ki(to.DROPDOWN_OFFSET),Ya()]}).then((({x:t,y:e,placement:i})=>{if(this.dropdown){this.dropdown.dataset.placement=i;Object.assign(this.dropdown.style,{width:`${this.trigger?.clientWidth}px`,left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state={...this.state,...t}}isPillboxActive(){return this.state.activeSelectionIndex>=0}get activeDescendant(){let t=undefined;if(this.state.activeOptionIndex>=0){t=`select-${this.id}-option-${this.state.activeOptionIndex}`}else if(this.state.activeSelectionIndex>=0){t=`select-${this.id}-selection-${this.state.activeSelectionIndex}`}return t}onArrowKeyDown(t){let e=false;this.input?.focus();switch(t.key){case"ArrowDown":e=true;this.state.isOpen?this.patchState({activeOptionIndex:Math.min(this.state.activeOptionIndex+1,this.state.options.length-1),activeSelectionIndex:-1}):this.show();break;case"ArrowUp":e=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(this.input?.selectionStart===0){e=true;let t;this.state.activeSelectionIndex>0?t=Math.max(this.state.activeSelectionIndex-1,-1):t=this.state.selection.length-1;this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}break;case"ArrowRight":if(this.state.activeSelectionIndex>=0){e=true;let t=-1;if(this.state.activeSelectionIndexe.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const i=e?.tags;const a={id:`select-${this.id}-tag-${i?.length?i?.length+Qn++:0}`,name:t};this.select({item:a,render:{label:a.name}})}this.setTransparentCaret()}removeTag(t){if(this.isTagSelected(t)){const e=this.state.selection.find((e=>e.render.label.toLowerCase()===t.toLowerCase()));e&&this.deselect(e.item.id)}}toggleTag(t){this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.createTag(t.render.label)}initIds(){let t=[];if(this.value){if(!this.tags){if(this.multiple){t=this.value}else{t=[this.value]}}else{if(this.multiple){const e=this.value;t=e.ids?e.ids:[]}else{const e=this.value;t=e.id?[e.id]:[]}}}return t}initTags(){let t=[];if(this.value){if(this.multiple){const e=this.value;t=e.tags?e.tags:[]}else{const e=this.value;t=e.tag?[e.tag]:[]}}return t}setTransparentCaret(){if(!this.multiple){this.hide();this.input?.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};to.SKELETON_COUNT=4;to.DROPDOWN_OFFSET=4;to.style=Gn;const eo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})});this.multipleSelectAvatarInitials?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});this.multipleSelectTagging?.connect(this.countryConnector);this.singleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.singleSelectAvatar?.connect(this.countryConnector);this.singleSelectAvatarInitials?.connect({...this.countryConnector,render:t=>({label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${t.country.charAt(0)?.toUpperCase()??"J"}${t.capital?.charAt(0)?.toUpperCase()??"D"}`}})});this.singleSelectTagging?.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(i,{key:"fbbdfc05bd034597b84d235445b70c526ed17dd4",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"e88f94e3022868b3ec6ca75a704a45edac6dedc6",label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>console.log("Multiple change",this.multipleSelect?.value),onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{key:"a5e00768df01e4f91dfd2b4b3f62a998df32bf7d",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"935aacbe810131079d95d61d9e6fd2efbec03d01",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"0b8fbe7e2ec42acf7cbd01fd216d0909befd30a2",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"509741cf8a8f6438649f2a4debe0829fd3b905eb",label:"Multiple with tagging support",hint:"This is a hint!",ref:t=>this.multipleSelectTagging=t,value:{ids:["1"],tags:["Test","Albania","Algeria"]},placeholder:"Select country",onCatChange:()=>console.log("Multiple tagging change",this.multipleSelectTagging?.value),multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"a42ff7c4b8f1686fa0cdbd5a202b4bff59f7e599",label:"Single Select",hint:"This is a hint!",ref:t=>this.singleSelect=t,placeholder:"Search for a country or capital",onCatBlur:t=>console.log("Single blur",t),clearable:true,errorUpdate:false}),e("cat-select",{key:"e29353e92663b785844080bf6ef6937348c80379",label:"Single with img",ref:t=>this.singleSelectAvatar=t,value:"1",placeholder:"Search for a country or capital",clearable:true,errorUpdate:false}),e("cat-select",{key:"a53e0848faed0a98be3d2bc6e81c1e21c82cbc9c",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"f6173b84ec5d84401dbc7190c6e09719c0412f26",overflow:true},e("cat-button",{key:"4d45f4bd17867cb4d54078f503e8613441e04374",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"2736181440e085cf623c2c3c875edaab23f71a3e",slot:"content",style:{width:"400px"}},e("cat-select",{key:"9fa27d270fc984bd22ef82de2e54e7ac952f71a2",label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>console.log("Single change",this.singleSelectTagging?.value),tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>R(t.map((t=>io.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const i=io.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const a=i.slice(e*10,e*10+10);return R({last:a.length<10,totalElements:i.length,content:a}).pipe(vt(500))},render:t=>({label:t.country,description:t.capital||"No capital",avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})}}};const io=[{id:"0",country:"Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ",capital:"Kabul"},{id:"1",country:"Albania",capital:"Tirana"},{id:"2",country:"Algeria",capital:"Alger"},{id:"3",country:"American Samoa",capital:"Fagatogo"},{id:"4",country:"Andorra",capital:"Andorra la Vella"},{id:"5",country:"Angola",capital:"Luanda"},{id:"6",country:"Anguilla",capital:"The Valley"},{id:"7",country:"Antarctica"},{id:"8",country:"Antigua and Barbuda",capital:"Saint John's"},{id:"9",country:"Argentina",capital:"Buenos Aires"},{id:"10",country:"Armenia",capital:"Yerevan"},{id:"11",country:"Aruba",capital:"Oranjestad"},{id:"12",country:"Australia",capital:"Canberra"},{id:"13",country:"Austria",capital:"Wien"},{id:"14",country:"Azerbaijan",capital:"Baku"},{id:"15",country:"Bahamas",capital:"Nassau"},{id:"16",country:"Bahrain",capital:"al-Manama"},{id:"17",country:"Bangladesh",capital:"Dhaka"},{id:"18",country:"Barbados",capital:"Bridgetown"},{id:"19",country:"Belarus",capital:"Minsk"},{id:"20",country:"Belgium",capital:"Bruxelles [Brussel]"},{id:"21",country:"Belize",capital:"Belmopan"},{id:"22",country:"Benin",capital:"Porto-Novo"},{id:"23",country:"Bermuda",capital:"Hamilton"},{id:"24",country:"Bhutan",capital:"Thimphu"},{id:"25",country:"Bolivia",capital:"La Paz"},{id:"26",country:"Bosnia and Herzegovina",capital:"Sarajevo"},{id:"27",country:"Botswana",capital:"Gaborone"},{id:"28",country:"Bouvet Island"},{id:"29",country:"Brazil",capital:"Brasília"},{id:"30",country:"British Indian Ocean Territory"},{id:"31",country:"Brunei",capital:"Bandar Seri Begawan"},{id:"32",country:"Bulgaria",capital:"Sofia"},{id:"33",country:"Burkina Faso",capital:"Ouagadougou"},{id:"34",country:"Burundi",capital:"Bujumbura"},{id:"35",country:"Cambodia",capital:"Phnom Penh"},{id:"36",country:"Cameroon",capital:"Yaound"},{id:"37",country:"Canada",capital:"Ottawa"},{id:"38",country:"Cape Verde",capital:"Praia"},{id:"39",country:"Cayman Islands",capital:"George Town"},{id:"40",country:"Central African Republic",capital:"Bangui"},{id:"41",country:"Chad",capital:"N'Djam"},{id:"42",country:"Chile",capital:"Santiago de Chile"},{id:"43",country:"China",capital:"Peking"},{id:"44",country:"Christmas Island",capital:"Flying Fish Cove"},{id:"45",country:"Cocos (Keeling) Islands",capital:"West Island"},{id:"46",country:"Colombia",capital:"Santaf"},{id:"47",country:"Comoros",capital:"Moroni"},{id:"48",country:"Congo",capital:"Brazzaville"},{id:"49",country:"Cook Islands",capital:"Avarua"},{id:"50",country:"Costa Rica",capital:"San José"},{id:"51",country:"Croatia",capital:"Zagreb"},{id:"52",country:"Cuba",capital:"La Habana"},{id:"53",country:"Cyprus",capital:"Nicosia"},{id:"54",country:"Czech Republic",capital:"Praha"},{id:"55",country:"Denmark",capital:"Copenhagen"},{id:"56",country:"Djibouti",capital:"Djibouti"},{id:"57",country:"Dominica",capital:"Roseau"},{id:"58",country:"Dominican Republic",capital:"Santo Domingo de Guzm"},{id:"59",country:"East Timor",capital:"Dili"},{id:"60",country:"Ecuador",capital:"Quito"},{id:"61",country:"Egypt",capital:"Cairo"},{id:"62",country:"El Salvador",capital:"San Salvador"},{id:"63",country:"England",capital:"London"},{id:"64",country:"Equatorial Guinea",capital:"Malabo"},{id:"65",country:"Eritrea",capital:"Asmara"},{id:"66",country:"Estonia",capital:"Tallinn"},{id:"67",country:"Ethiopia",capital:"Addis Abeba"},{id:"68",country:"Falkland Islands",capital:"Stanley"},{id:"69",country:"Faroe Islands",capital:"Tórshavn"},{id:"70",country:"Fiji Islands",capital:"Suva"},{id:"71",country:"Finland",capital:"Helsinki [Helsingfors]"},{id:"72",country:"France",capital:"Paris"},{id:"73",country:"French Guiana",capital:"Cayenne"},{id:"74",country:"French Polynesia",capital:"Papeete"},{id:"75",country:"French Southern territories"},{id:"76",country:"Gabon",capital:"Libreville"},{id:"77",country:"Gambia",capital:"Banjul"},{id:"78",country:"Georgia",capital:"Tbilisi"},{id:"79",country:"Germany",capital:"Berlin"},{id:"80",country:"Ghana",capital:"Accra"},{id:"81",country:"Gibraltar",capital:"Gibraltar"},{id:"82",country:"Greece",capital:"Athenai"},{id:"83",country:"Greenland",capital:"Nuuk"},{id:"84",country:"Grenada",capital:"Saint George's"},{id:"85",country:"Guadeloupe",capital:"Basse-Terre"},{id:"86",country:"Guam",capital:"Aga"},{id:"87",country:"Guatemala",capital:"Ciudad de Guatemala"},{id:"88",country:"Guinea",capital:"Conakry"},{id:"89",country:"Guinea-Bissau",capital:"Bissau"},{id:"90",country:"Guyana",capital:"Georgetown"},{id:"91",country:"Haiti",capital:"Port-au-Prince"},{id:"92",country:"Heard Island and McDonald Islands"},{id:"93",country:"Holy See (Vatican City State)",capital:"Citt"},{id:"94",country:"Honduras",capital:"Tegucigalpa"},{id:"95",country:"Hong Kong",capital:"Victoria"},{id:"96",country:"Hungary",capital:"Budapest"},{id:"97",country:"Iceland",capital:"Reykjavík"},{id:"98",country:"India",capital:"New Delhi"},{id:"99",country:"Indonesia",capital:"Jakarta"},{id:"100",country:"Iran",capital:"Tehran"},{id:"101",country:"Iraq",capital:"Baghdad"},{id:"102",country:"Ireland",capital:"Dublin"},{id:"103",country:"Israel",capital:"Jerusalem"},{id:"104",country:"Italy",capital:"Roma"},{id:"105",country:"Ivory Coast",capital:"Yamoussoukro"},{id:"106",country:"Jamaica",capital:"Kingston"},{id:"107",country:"Japan",capital:"Tokyo"},{id:"108",country:"Jordan",capital:"Amman"},{id:"109",country:"Kazakhstan",capital:"Astana"},{id:"110",country:"Kenya",capital:"Nairobi"},{id:"111",country:"Kiribati",capital:"Bairiki"},{id:"112",country:"Kuwait",capital:"Kuwait"},{id:"113",country:"Kyrgyzstan",capital:"Bishkek"},{id:"114",country:"Laos",capital:"Vientiane"},{id:"115",country:"Latvia",capital:"Riga"},{id:"116",country:"Lebanon",capital:"Beirut"},{id:"117",country:"Lesotho",capital:"Maseru"},{id:"118",country:"Liberia",capital:"Monrovia"},{id:"119",country:"Libyan Arab Jamahiriya",capital:"Tripoli"},{id:"120",country:"Liechtenstein",capital:"Vaduz"},{id:"121",country:"Lithuania",capital:"Vilnius"},{id:"122",country:"Luxembourg",capital:"Luxembourg [Luxemburg/L"},{id:"123",country:"Macao",capital:"Macao"},{id:"124",country:"North Macedonia",capital:"Skopje"},{id:"125",country:"Madagascar",capital:"Antananarivo"},{id:"126",country:"Malawi",capital:"Lilongwe"},{id:"127",country:"Malaysia",capital:"Kuala Lumpur"},{id:"128",country:"Maldives",capital:"Male"},{id:"129",country:"Mali",capital:"Bamako"},{id:"130",country:"Malta",capital:"Valletta"},{id:"131",country:"Marshall Islands",capital:"Dalap-Uliga-Darrit"},{id:"132",country:"Martinique",capital:"Fort-de-France"},{id:"133",country:"Mauritania",capital:"Nouakchott"},{id:"134",country:"Mauritius",capital:"Port-Louis"},{id:"135",country:"Mayotte",capital:"Mamoutzou"},{id:"136",country:"Mexico",capital:"Ciudad de M"},{id:"137",country:"Micronesia, Federated States of",capital:"Palikir"},{id:"138",country:"Moldova",capital:"Chisinau"},{id:"139",country:"Monaco",capital:"Monaco-Ville"},{id:"140",country:"Mongolia",capital:"Ulan Bator"},{id:"141",country:"Montenegro",capital:"Podgorica"},{id:"142",country:"Montserrat",capital:"Plymouth"},{id:"143",country:"Morocco",capital:"Rabat"},{id:"144",country:"Mozambique",capital:"Maputo"},{id:"145",country:"Myanmar",capital:"Rangoon (Yangon)"},{id:"146",country:"Namibia",capital:"Windhoek"},{id:"147",country:"Nauru",capital:"Yaren"},{id:"148",country:"Nepal",capital:"Kathmandu"},{id:"149",country:"Netherlands",capital:"Amsterdam"},{id:"150",country:"Netherlands Antilles",capital:"Willemstad"},{id:"151",country:"New Caledonia",capital:"Noum"},{id:"152",country:"New Zealand",capital:"Wellington"},{id:"153",country:"Nicaragua",capital:"Managua"},{id:"154",country:"Niger",capital:"Niamey"},{id:"155",country:"Nigeria",capital:"Abuja"},{id:"156",country:"Niue",capital:"Alofi"},{id:"157",country:"Norfolk Island",capital:"Kingston"},{id:"158",country:"North Korea",capital:"Pyongyang"},{id:"159",country:"Northern Ireland",capital:"Belfast"},{id:"160",country:"Northern Mariana Islands",capital:"Garapan"},{id:"161",country:"Norway",capital:"Oslo"},{id:"162",country:"Oman",capital:"Masqat"},{id:"163",country:"Pakistan",capital:"Islamabad"},{id:"164",country:"Palau",capital:"Koror"},{id:"165",country:"Palestine",capital:"Gaza"},{id:"166",country:"Panama",capital:"Ciudad de Panamá"},{id:"167",country:"Papua New Guinea",capital:"Port Moresby"},{id:"168",country:"Paraguay",capital:"Asunción"},{id:"169",country:"Peru",capital:"Lima"},{id:"170",country:"Philippines",capital:"Manila"},{id:"171",country:"Pitcairn",capital:"Adamstown"},{id:"172",country:"Poland",capital:"Warszawa"},{id:"173",country:"Portugal",capital:"Lisboa"},{id:"174",country:"Puerto Rico",capital:"San Juan"},{id:"175",country:"Qatar",capital:"Doha"},{id:"176",country:"Reunion",capital:"Saint-Denis"},{id:"177",country:"Romania",capital:"Bucuresti"},{id:"178",country:"Russian Federation",capital:"Moscow"},{id:"179",country:"Rwanda",capital:"Kigali"},{id:"180",country:"Saint Helena",capital:"Jamestown"},{id:"181",country:"Saint Kitts and Nevis",capital:"Basseterre"},{id:"182",country:"Saint Lucia",capital:"Castries"},{id:"183",country:"Saint Pierre and Miquelon",capital:"Saint-Pierre"},{id:"184",country:"Saint Vincent and the Grenadines",capital:"Kingstown"},{id:"185",country:"Samoa",capital:"Apia"},{id:"186",country:"San Marino",capital:"San Marino"},{id:"187",country:"Sao Tome and Principe",capital:"São Tomé"},{id:"188",country:"Saudi Arabia",capital:"Riyadh"},{id:"189",country:"Scotland",capital:"Edinburgh"},{id:"190",country:"Senegal",capital:"Dakar"},{id:"191",country:"Serbia",capital:"Belgrade"},{id:"192",country:"Seychelles",capital:"Victoria"},{id:"193",country:"Sierra Leone",capital:"Freetown"},{id:"194",country:"Singapore",capital:"Singapore"},{id:"195",country:"Slovakia",capital:"Bratislava"},{id:"196",country:"Slovenia",capital:"Ljubljana"},{id:"197",country:"Solomon Islands",capital:"Honiara"},{id:"198",country:"Somalia",capital:"Mogadishu"},{id:"199",country:"South Africa",capital:"Pretoria"},{id:"200",country:"South Georgia and the South Sandwich Islands"},{id:"201",country:"South Korea",capital:"Seoul"},{id:"202",country:"South Sudan",capital:"Juba"},{id:"203",country:"Spain",capital:"Madrid"},{id:"204",country:"Sri Lanka",capital:"Colombo, Sri Jayawardenepura Kotte"},{id:"205",country:"Sudan",capital:"Khartum"},{id:"206",country:"Suriname",capital:"Paramaribo"},{id:"207",country:"Svalbard and Jan Mayen",capital:"Longyearbyen"},{id:"208",country:"Swaziland",capital:"Mbabane"},{id:"209",country:"Sweden",capital:"Stockholm"},{id:"210",country:"Switzerland",capital:"Bern"},{id:"211",country:"Syria",capital:"Damascus"},{id:"212",country:"Tajikistan",capital:"Dushanbe"},{id:"213",country:"Tanzania",capital:"Dodoma"},{id:"214",country:"Thailand",capital:"Bangkok"},{id:"215",country:"The Democratic Republic of Congo",capital:"Kinshasa"},{id:"216",country:"Togo",capital:"Lomé"},{id:"217",country:"Tokelau",capital:"Fakaofo"},{id:"218",country:"Tonga",capital:"Nuku'alofa"},{id:"219",country:"Trinidad and Tobago",capital:"Port-of-Spain"},{id:"220",country:"Tunisia",capital:"Tunis"},{id:"221",country:"Turkey",capital:"Ankara"},{id:"222",country:"Turkmenistan",capital:"Ashgabat"},{id:"223",country:"Turks and Caicos Islands",capital:"Cockburn Town"},{id:"224",country:"Tuvalu",capital:"Funafuti"},{id:"225",country:"Uganda",capital:"Kampala"},{id:"226",country:"Ukraine",capital:"Kyiv"},{id:"227",country:"United Arab Emirates",capital:"Abu Dhabi"},{id:"228",country:"United Kingdom",capital:"London"},{id:"229",country:"United States",capital:"Washington"},{id:"230",country:"United States Minor Outlying Islands"},{id:"231",country:"Uruguay",capital:"Montevideo"},{id:"232",country:"Uzbekistan",capital:"Toskent"},{id:"233",country:"Vanuatu",capital:"Port-Vila"},{id:"234",country:"Venezuela",capital:"Caracas"},{id:"235",country:"Vietnam",capital:"Hanoi"},{id:"236",country:"Virgin Islands, British",capital:"Road Town"},{id:"237",country:"Virgin Islands, U.S.",capital:"Charlotte Amalie"},{id:"238",country:"Wales",capital:"Cardiff"},{id:"239",country:"Wallis and Futuna",capital:"Mata-Utu"},{id:"240",country:"Western Sahara",capital:"El-Aai"},{id:"241",country:"Yemen",capital:"Sanaa"},{id:"242",country:"Zambia",capital:"Lusaka"},{id:"243",country:"Zimbabwe",capital:"Harare"}];const ao=':host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}';const ro=ao;const no=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(i,{key:"8f1e4584c050cc8b6d1341efd3d8b04ca7223a73"},Array.from(Array(this.count)).map((()=>e("div",{style:this.style,class:{skeleton:true,[`skeleton-${this.effect}`]:Boolean(this.effect),[`skeleton-${this.variant}`]:Boolean(this.variant),[`skeleton-${this.size}`]:Boolean(this.size)}}))))}get count(){switch(this.variant){case"head":return Math.max(1,this.lines||1);case"body":return Math.max(1,this.lines||3);default:return 1}}get style(){return this.variant==="head"||this.variant==="body"?{"--line-width":`${this.random(50,100)}%`}:undefined}random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}};no.style=ro;const oo=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const so=oo;const co=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"cf1110c7ae2c653c87f44f2668aa3bcc757ed0c9","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"22d1a1c15575274a75d4203ae9a1c945a199759d",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"f067c870a5699603761b7d8d6e4a32354cef6f7e",cx:"24",cy:"24",r:"21.5"})))}};co.style=so;const lo=":host{display:block}:host([hidden]){display:none}";const ho=lo;let fo=0;const uo=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false;this.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${fo++}`}}onClick(t){this.catClick.emit(t)}render(){return e(i,{key:"e0b1e0562a35130f4b0de08530eb66c9df5ec145"})}get hostElement(){return a(this)}};uo.style=ho;const po=':host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:"";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}';const bo=po;const mo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.tabs=[];this.activeTab="";this.tabsAlign="left"}componentWillLoad(){this.syncTabs()}componentDidLoad(){this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onActiveTabChange(t){const e=this.tabs.findIndex((e=>e.id===t));this.catChange.emit({id:t,index:e})}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const e=this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');const i=Array.from(e??[]).filter((t=>!t.disabled));const a=this.hostElement.shadowRoot?.activeElement;const r=a?i.indexOf(a):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+i.length)%i.length;i[o].doFocus();t.preventDefault()}}async setActive(t){this.activate(this.tabs.find((e=>e.id===t)))}async setActiveIndex(t){this.activate(this.tabs[t])}render(){return e(i,{key:"05969fc6e983159aaad4a36ab07b6326c5c85589"},this.tabs.map((t=>e("cat-button",{buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":t.id===this.activeTab,"cat-tab-error":t.error},active:t.id===this.activeTab,color:t.error?"danger":t.id===this.activeTab?"primary":"secondary",variant:"text",icon:t.icon?t.error?"$cat:input-error":t.icon:undefined,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.click(t),nativeAttributes:{...t.nativeAttributes},nativeContentAttributes:{"data-text":t.label},"data-dropdown-no-close":true},t.label))))}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"));this.activeTab=this.activeTab||this.tabs.filter((t=>this.canActivate(t)))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();this.activate(t)}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}get hostElement(){return a(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};mo.style=bo;var go=new Map;function vo(t){var e=go.get(t);e&&e.destroy()}function yo(t){var e=go.get(t);e&&e.update()}var ko=null;"undefined"==typeof window?((ko=function(t){return t}).destroy=function(t){return t},ko.update=function(t){return t}):((ko=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!go.has(t)){var e,i=null,a=window.getComputedStyle(t),r=(e=t.value,function(){o({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),n=function(e){t.removeEventListener("autosize:destroy",n),t.removeEventListener("autosize:update",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(i){return t.style[i]=e[i]})),go.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",n),t.addEventListener("autosize:update",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",go.set(t,{destroy:n,update:s}),s()}function o(e){var r,n,s=e.restoreTextAlign,c=void 0===s?null:s,l=e.testForHeightReduction,d=void 0===l||l,h=a.overflowY;if(0!==t.scrollHeight&&("vertical"===a.resize?t.style.resize="none":"both"===a.resize&&(t.style.resize="horizontal"),d&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],i=t[1];e.style.scrollBehavior="auto",e.scrollTop=i,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===a.boxSizing?t.scrollHeight-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):t.scrollHeight+parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),"none"!==a.maxHeight&&n>parseFloat(a.maxHeight)?("hidden"===a.overflowY&&(t.style.overflow="scroll"),n=parseFloat(a.maxHeight)):"hidden"!==a.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",c&&(t.style.textAlign=c),r&&r(),i!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=n),h!==a.overflow&&!c)){var f=a.textAlign;"hidden"===a.overflow&&(t.style.textAlign="start"===f?"end":"start"),o({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],vo),t},ko.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],yo),t});var xo=ko;const wo=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}:host([hidden]){display:none}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";const zo=wo;let Do=0;const Io=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-textarea-${Do++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){xo(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async clear(){this.value="";this.catChange.emit(this.value)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e(i,{key:"2fac5152cbeeb9d4a9c4dc0f9539bb1a1503c9e8"},e("div",{key:"88d992d98f72a0862b3736ad102a0124363e17b6",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"ab23b2ebcc13b7511c4e951041817bb8b1952c0c",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"30a02b82d605c5e416a63b8eef5205d41139ce6d",class:"textarea-container"},e("div",{key:"32aad8e1e15134dad90e991cc3e471b06dcbc9fd",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"96d5a02bfdb1c7feb85ce02380a59ff63a7d1760",...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.textarea.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Io.style=zo;function Mo(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function Ro(t){return{change:D.t("timepicker.change"),choose:D.t("timepicker.choose"),timeFormat:Mo(t)?"12":"24"}}function Co(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function Ao(t,e,i){const[,a,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=i?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let s=-Infinity;let c=Infinity;if(a!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),a,r).getTime()}if(n!==undefined&&o!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),s),c))}function So(t,e){const[,i,a]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(i===undefined||a===undefined){return false}return t.getHours()i||t.getHours()===i&&t.getMinutes()>a}const Fo=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.cat-time-addon{margin-left:-1px}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const Bo=Fo;const $o=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=Ro(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}componentWillLoad(){this.syncValue(this.value??"")}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){this.input?.mask({time:true,timeFormat:this.locale.timeFormat,timePattern:["h","m"]})}onOpen(){const t=t=>this.hostElement.shadowRoot?.querySelector(t);const e=Ao(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const i=t(`[data-time="${Co(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const a=t(`[data-time="${Co(e)}"]`);setTimeout((()=>{(a??i)?.doFocus();(a??i)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;if(!t){this.selectionTime=null;this.value=undefined}else{const e=Ao(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;this.value=Co(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==this.value){this.catChange.emit(this.value)}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"c7ebe7c00d372720ce9c34907438f47150df0820"},e("cat-input",{key:"e83d9bddbdff4d1e0c97531f3684618e0f4251a8",class:"cat-time-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.format(this.selectionTime,false),errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatFocus:t=>this.catFocus.emit(t.detail),onCatBlur:t=>this.onInputBlur(t.detail)},e("span",{key:"504e24bcf7d7fa3e0eddb7df91261778e720cc87",slot:"label"},this.hasSlottedLabel&&e("slot",{name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"c617e13394f44bd851beae13e809f791a56dfa42",class:"label-aria"}," (HH:mm)")),e("div",{key:"601bd57b6137a44901a3d32ce10f881aae67a2a8",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"ecdd2fb5987eb30890c9258ece4bd1e176b2d6c6",slot:"addon",placement:this.placement},e("cat-button",{key:"a38158d199940ff276b5263833c39cdbea04d194",slot:"trigger",class:"cat-time-toggle",disabled:this.disabled||this.readonly,icon:"$cat:timepicker-clock",iconOnly:true,a11yLabel:this.selectionTime?`${this.locale.change}, ${this.format(this.selectionTime)}`:this.locale.choose}),e("nav",{key:"e2e77112f74467cc2db37d24f38165389888978a",slot:"content",class:"cat-nav"},e("ul",{key:"c005ac2b43037f3e5953117e968a967ce60be477"},this.timeArray().map((t=>{const i=Co(t);const a=So(t,this.min??null)||To(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":a},disabled:a,active:i===this.value,color:i===this.value?"primary":"secondary",variant:i===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":i},this.format(t)))})))))),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let i=new Date(e.getTime());while(i.getDate()===e.getDate()){t.push(i);i=new Date(i.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,i]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||i===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,i,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),i,0))}toggleAm(){if(this.selectionTime){this.select(new Date(this.selectionTime.getTime()+(this.isAm?12:-12)*36e5))}else{this.isAm=!this.isAm}}onInputBlur(t){this.syncValue(this.input?.value??"");this.catBlur.emit(t)}format(t,e=true){const i=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?i:i.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const i=(t==="min"?e:this.min)??null;const a=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const s=r?Co(Ao(i,new Date(2e3,5,1,Number(n),Number(o)),a)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};$o.style=Bo;const Eo='.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:"";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}';const Oo=Eo;let No=0;const Wo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-toggle-${No++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on toggle",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"08337e6aece1d072c3c4540e4c5e97562a0c1f4c"},e("label",{key:"79b0b9d2d136125ba7f15be32a3a34da73488a2f",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"0c22754e817b0d6eab349583287c8d30f25f84ad",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,class:"form-check-input",role:"switch",onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"7a08a4ec1fc79d18c16065697f672bf7f4e35908",class:"toggle"}),e("span",{key:"b78eacbcb262452ba33972f2647dc69b01c1bd20",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"toggle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};Wo.style=Oo;const Lo="ontouchstart"in window||navigator.maxTouchPoints>0;const jo=":host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:var(--cat-font-color-tooltip, 255, 255, 255);--cat-font-color-body:var(--cat-font-color-tooltip, 255, 255, 255);position:fixed;width:max-content;top:0;left:0;box-sizing:border-box;font-size:0.875rem;line-height:1.125rem;font-weight:500;background-color:rgb(var(--cat-bg-tooltip, 0, 0, 0));border-radius:var(--cat-border-radius-m, 0.25rem);color:rgb(var(--cat-font-color-tooltip, 255, 255, 255));transition:opacity 250ms linear, visibility 250ms linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index:calc(var(--cat-z-index, 1000) + 200);max-width:min(100vw - 0.5rem, 20rem)}.tooltip-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.tooltip-show{opacity:1;visibility:visible}.tooltip p{margin:0}.tooltip-round{border-radius:10rem}.tooltip-s{padding:0.375rem 0.5rem}.tooltip-s.tooltip-round{padding:0.375rem 0.75rem}.tooltip-m{padding:0.75rem}.tooltip-m.tooltip-round{padding:0.75rem 1rem}.tooltip-l{padding:1rem}.tooltip-l.tooltip-round{padding:1rem 1.5rem}";const Po=jo;let Yo=0;const Ho=class{constructor(e){t(this,e);this.id=`cat-tooltip-${Yo++}`;this.inactive=false;this.open=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3;this.boundShowListener=this.showListener.bind(this);this.boundHideListener=this.hideListener.bind(this);this.boundWindowTouchStartListener=this.windowTouchStartListener.bind(this);this.boundTouchStartListener=this.touchStartListener.bind(this);this.boundTouchEndListener=this.touchEndListener.bind(this)}handleKeyDown({key:t}){t==="Escape"&&this.hideTooltip()}componentDidLoad(){const t=this.hostElement.shadowRoot?.querySelector("slot");this.trigger=t?.assignedElements?.()?.[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(Lo){window.addEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.addEventListener("touchstart",this.boundTouchStartListener);this.trigger?.addEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.addEventListener("focusin",this.boundShowListener);this.trigger?.addEventListener("focusout",this.boundHideListener);this.trigger?.addEventListener("mouseenter",this.boundShowListener);this.trigger?.addEventListener("mouseleave",this.boundHideListener)}}componentWillRender(){this.inactive=this.disabled||!this.content&&!this.hostElement.querySelector('[slot="content"]')}disconnectedCallback(){if(Lo){window.removeEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.removeEventListener("touchstart",this.boundTouchStartListener);this.trigger?.removeEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.removeEventListener("mouseenter",this.boundShowListener);this.trigger?.removeEventListener("mouseleave",this.boundHideListener);this.trigger?.removeEventListener("focusin",this.boundShowListener);this.trigger?.removeEventListener("focusout",this.boundHideListener)}}render(){return e(i,{key:"742d0c7f6203b8e685886f1c272562176b348fa9"},e("slot",{key:"0e7bf66c6aadcf0b87fbbadf2d3e357ebb9b98c0"}),e("div",{key:"14eaa638d2f3170be57188d32841e22c98f1319b",ref:t=>this.tooltip=t,id:this.id,role:"tooltip","aria-hidden":!this.open,"aria-live":this.open?"polite":"off",class:{tooltip:true,"tooltip-hidden":this.inactive,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},e("slot",{key:"724fac6b27719c0cb9d243aab8ab4485fa72fc43",name:"content"},e("p",{key:"2d6c325c46035725ac8c81330038888eefeb0c89"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Ua(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Ki(Ho.OFFSET),Ya({fallbackAxisSideDirection:"start"}),Pa({padding:Ho.SHIFT_PADDING})]}).then((({x:t,y:e})=>{if(this.tooltip){Object.assign(this.tooltip.style,{left:`${Math.max(0,t)}px`,top:`${e}px`})}}))}}showListener(){window.clearTimeout(this.hideTimeout);this.hideTimeout=undefined;if(!this.showTimeout){this.showTimeout=window.setTimeout((()=>{this.showTimeout=undefined;this.showTooltip()}),this.showDelay)}}hideListener(){window.clearTimeout(this.showTimeout);this.showTimeout=undefined;if(!this.hideTimeout){this.hideTimeout=window.setTimeout((()=>{this.hideTimeout=undefined;this.hideTooltip()}),this.hideDelay)}}touchStartListener(t){t.stopPropagation();if(!this.touchTimeout){this.touchTimeout=window.setTimeout((()=>{this.touchTimeout=undefined;this.showTooltip()}),this.longTouchDuration)}}touchEndListener(){window.clearTimeout(this.touchTimeout);this.touchTimeout=undefined;this.hideTooltip()}windowTouchStartListener(){this.hideTooltip()}showTooltip(){if(this.trigger&&this.tooltip){this.cleanupFloatingUi=ja(this.trigger,this.tooltip,(()=>this.update()))}if(!this.inactive){this.open=true;this.tooltip?.classList.add("tooltip-show")}}hideTooltip(){this.open=false;this.tooltip?.classList.remove("tooltip-show");this.cleanupFloatingUi?.();this.cleanupFloatingUi=undefined}get hostElement(){return a(this)}};Ho.OFFSET=4;Ho.SHIFT_PADDING=4;Ho.style=Po;export{Bt as cat_alert,Nt as cat_avatar,jt as cat_badge,Xt as cat_button,ee as cat_button_group,re as cat_card,le as cat_checkbox,De as cat_date,Re as cat_date_inline,Va as cat_datepicker,Ga as cat_datepicker_inline,Xr as cat_dropdown,en as cat_form_group,nn as cat_icon,An as cat_input,Fn as cat_pagination,On as cat_radio,Ln as cat_radio_group,Yn as cat_scrollable,to as cat_select,eo as cat_select_demo,no as cat_skeleton,co as cat_spinner,uo as cat_tab,mo as cat_tabs,Io as cat_textarea,$o as cat_time,Wo as cat_toggle,Ho as cat_tooltip}; -//# sourceMappingURL=p-f4ed5946.entry.js.map \ No newline at end of file +//# sourceMappingURL=p-93f91f74.entry.js.map \ No newline at end of file diff --git a/build/p-93f91f74.entry.js.map b/build/p-93f91f74.entry.js.map new file mode 100644 index 00000000..28ad3727 --- /dev/null +++ b/build/p-93f91f74.entry.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ObjectUnsubscribedError","createErrorClass","_super","ObjectUnsubscribedErrorImpl","this","name","message","Subject","Observable","constructor","super","closed","currentObservers","observers","isStopped","hasError","thrownError","lift","operator","subject","AnonymousSubject","_throwIfClosed","next","value","errorContext","Array","from","observer","error","err","length","shift","complete","unsubscribe","observed","_a","_trySubscribe","subscriber","_subscribe","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","push","Subscription","arrRemove","asObservable","observable","source","create","destination","_b","call","subscribe","dateTimestampProvider","now","delegate","Date","undefined","Action","scheduler","work","schedule","state","delay","intervalProvider","setInterval","handler","timeout","args","clearInterval","handle","AsyncAction","pending","id","recycleAsyncId","requestAsyncId","_id","flush","bind","_scheduler","execute","Error","_execute","_delay","errored","errorValue","e","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","async","EMPTY","EmptyError","EmptyErrorImpl","isValidDate","isNaN","map","project","thisArg","operate","index","createOperatorSubscriber","isArray","callOrApply","fn","mapOneOrManyArgs","mergeInternals","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","active","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerFrom","innerValue","bufferedValue","executeSchedule","mergeMap","resultSelector","Infinity","isFunction","a","i","b","ii","mergeAll","identity","concatAll","concat","popScheduler","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","target","eventName","options","pipe","add","remove","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","isArrayLike","subTarget","TypeError","addListener","removeListener","on","off","addEventListener","removeEventListener","timer","dueTime","intervalOrScheduler","intervalDuration","isScheduler","due","n","merge","popNumber","sources","filter","predicate","audit","durationSelector","hasValue","lastValue","durationSubscriber","endDuration","cleanupDuration","auditTime","duration","catchError","selector","innerSub","syncUnsub","handledResult","scanInternals","accumulator","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","debounce","emit","noop","defaultIfEmpty","defaultValue","take","count","seen","ignoreElements","mapTo","delayWhen","delayDurationSelector","subscriptionDelay","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","first","currentKey","throwIfEmpty","errorFactory","defaultErrorFactory","hasDefaultValue","arguments","v","scan","startWith","values","switchMap","innerSubscriber","innerIndex","outerIndex","takeUntil","notifier","takeWhile","inclusive","result","tap","observerOrNext","tapObserver","isUnsub","finalize","setAttributeDefault","host","attr","hostElement","hasAttribute","setAttribute","String","catAlertCss","CatAlertStyle0","CatAlert","mapIcon","Map","mapRole","connectedCallback","get","color","render","h","Host","key","noIcon","size","icon","class","loadImg","src","Promise","resolve","reject","image","Image","catAvatarCss","CatAvatarStyle0","CatAvatar","onSrcChanged","then","backgroundImage","componentWillLoad","componentWillRender","label","log","warn","url","href","urlTarget","style","cssStyle","cssClass","content","getInitials","avatar","round","Boolean","initials","split","join","catBadgeCss","CatBadgeStyle0","CatBadge","_breakpoints","Breakpoints","xs","s","m","l","xl","isBreakpoint","includes","hasV8BreakIterator","Intl","v8BreakIterator","Platform","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_platform","_matchMedia","matchMedia","query","createEmptyStyleRule","has","document","createElement","head","appendChild","sheet","insertRule","catButtonCss","CatButtonStyle0","CatButton","onIconOnlyChanged","mediaQueryList","mediaQueryListener","mediaMatcher","event","_iconOnly","matches","iconOnly","isIconButton","a11yLabel","haltDisabledEvents","disabled","loading","preventDefault","stopImmediatePropagation","doFocus","button","focus","doBlur","blur","doClick","click","nativeAttributes","ref","el","a11yCurrent","buttonId","part","noEllipsis","variant","onClick","onFocus","onBlur","type","submit","buttonGroupPosition","iconSize","spinnerSize","hasPrefixIcon","iconRight","hasSuffixIcon","nativeContentAttributes","catClick","catFocus","catBlur","catButtonGroupCss","CatButtonGroupStyle0","CatButtonGroup","formElements","role","onSlotchange","onSlotChange","querySelectorAll","forEach","element","catCardCss","CatCardStyle0","CatCard","CatFormHint","props","hint","slottedHint","errorMap","errors","Object","entries","params","i18n","t","item","catCheckboxCss","CatCheckboxStyle0","nextUniqueId","CatCheckbox","identifier","updateResolved","hasSlottedLabel","querySelector","hasSlottedHint","input","htmlFor","labelHidden","labelLeft","checked","required","indeterminate","onInput","hasHint","viewBox","points","catChange","resolvedValue","noValue","getDays","language","weekday","date","firstDayOfWeek","getUTCDate","getUTCDay","format","DateTimeFormat","keys","day","getTime","setUTCDate","getMonths","month","setUTCMonth","getWeekInfo","locale","Locale","weekInfo","firstDay","minDays","weekend","getFormat","year","replace","getLocale","prevYear","nextYear","prevMonth","nextMonth","arrowKeys","today","change","choose","clear","formatStr","days","short","long","months","getFullYear","getMonth","getDate","fromLocalISO","match","Number","toLocalISO","toString","padStart","toLocalStr","isLeapYear","addDays","addMonth","maxDays","newDate","setDate","setMonth","Math","min","isSameYear","date1","date2","isSameMonth","isSameDay","clampDate","max","catDateCss","CatDateStyle0","CatDate","onMinChanged","oldMin","reclamp","onMaxChanged","oldMax","inputValue","componentDidLoad","p1","d1","p2","p3","exec","mask","dateMin","dateMax","delimiter","datePattern","requiredMarker","horizontal","autoComplete","clearable","placeholder","textPrefix","textSuffix","readonly","errorUpdate","onCatFocus","stopPropagation","detail","onCatBlur","onInputBlur","slot","placement","arrowNavigation","noResize","onCatOpen","dateInline","resetView","getTriggerA11yLabel","weeks","noClear","onCatChange","onDateChange","oldValue","dateParsed","parse","select","formatParts","parts","indexOf","isInteger","mode","limit","oldDate","limitDate","newValue","catDateInlineCss","CatDateInlineStyle0","CatDateInline","focusDate","focusedDate","all","shadowRoot","dataset","startDate","endDate","getValue","componentDidRender","onKeyDown","shiftKey","minDate","maxDate","getMinMaxDate","range","toRangeValue","dateStart","viewDate","dateGrid","dateEnd","picker","navigate","getHeadline","onFocusin","setAriaLive","_","title","getWeekNumber","isStartDate","isEndDate","isRange","isToday","canFocus","canClick","tabindex","noToday","direction","period","setFullYear","text","node","innerHTML","getDay","daysInMonth","daysBefore","daysAfter","iso8601","currentDate","dayNum","yearStart","ceil","minDay","JSON","stringify","HOOKS","defaults","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","animate","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disable","disableMobile","enableSeconds","enableTime","errorHandler","console","getWeek","givenDate","setHours","week1","hourIncrement","ignoredFocusElements","inline","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onChange","onClose","onDayCreate","onDestroy","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","position","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","pad","number","slice","int","bool","wait","_this","clearTimeout","setTimeout","apply","arrayify","obj","toggleClass","elem","className","classList","tag","textContent","clearNode","firstChild","removeChild","findParent","condition","parentNode","createNumberInput","inputClassName","opts","wrapper","numInput","arrowUp","arrowDown","pattern","getEventTarget","composedPath","path","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","G","hour","getHours","parseFloat","H","J","K","RegExp","M","shortMonth","S","seconds","setSeconds","U","unixSeconds","W","weekNum","weekNumber","parseInt","Y","Z","ISODate","d","minutes","setMinutes","j","u","unixMillSeconds","w","y","tokenRegex","formats","toISOString","getSeconds","getMinutes","substring","createDateFormatter","config","_c","l10n","_d","isMobile","frmt","overrideLocale","formatDate","c","arr","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","datestr","trim","parseDate","matched","ops","matchIndex","regexStr","token","isBackSlash","escaped","val","compareDates","isBetween","ts","ts1","ts2","calculateSecondsSinceMidnight","hours","parseSeconds","secondsSinceMidnight","floor","DAY","getDefaultHours","minHour","minMinutes","minSeconds","maxHr","maxMinutes","assign","_i","_loop_1","args_1","__assign","p","prototype","hasOwnProperty","__spreadArrays","il","r","k","jl","DEBOUNCED_CHANGE_MS","FlatpickrInstance","instanceConfig","self","defaultOptions","flatpickr","defaultConfig","English","_handlers","pluginElements","loadedPlugins","_bind","_setHoursFromDate","setHoursFromDate","_positionCalendar","positionCalendar","changeMonth","changeYear","close","onMouseOver","_createElement","createDay","destroy","isEnabled","jumpToDate","updateValue","open","redraw","set","toggle","setupHelperFunctions","utils","getDaysInMonth","yr","currentMonth","currentYear","init","isOpen","parseConfig","setupLocale","setupInputs","setupDates","build","bindEvents","selectedDates","latestSelectedDateObj","setCalendarWidth","isSafari","triggerEvent","getClosestActiveElement","calendarContainer","getRootNode","activeElement","bindToInstance","requestAnimationFrame","visibility","display","daysContainer","daysWidth","offsetWidth","width","weekWrapper","removeProperty","updateTime","defaultDate","getMilliseconds","timeWrapper","prevValue","_input","setHoursFromInputs","_debouncedChange","ampm2military","military2ampm","hourElement","minuteElement","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","currentTime","onYearInput","eventTarget","delta","ev","triggerChange","evt","setupMobile","debouncedResize","onResize","ontouchstart","documentClick","capture","monthNav","onMonthNavClick","selectDate","timeContainer","selText","timeIncrement","jumpDate","jumpTo","oldYear","oldMonth","buildMonthSwitch","incrementNumInput","contains","inputElem","createEvent","dispatchEvent","fragment","createDocumentFragment","tabIndex","buildMonthNav","innerContainer","buildWeeks","rContainer","buildWeekdays","buildDays","buildTime","customAppend","appendTo","nodeType","insertBefore","nextSibling","body","_dayNumber","dateIsEnabled","dayElement","$i","todayDateElem","isDateSelected","selectedDateElem","isDateInRange","insertAdjacentHTML","focusOnDayElem","targetNode","getFirstAvailableDay","startMonth","endMonth","children","startIndex","endIndex","getNextAvailableDay","current","givenMonth","loopDelta","numMonthDays","abs","focusOnDay","offset","dayFocused","isInView","startElem","buildMonthDays","firstOfMonth","prevMonthDays","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayContainer","frag","shouldBuildMonth","monthsDropdownContainer","selected","buildMonth","container","monthNavFragment","monthElement","selectedMonth","yearInput","yearElement","getElementsByTagName","buildMonths","prevMonthNav","yearElements","monthElements","nextMonthNav","defineProperty","__hidePrevMonthArrow","__hideNextMonthArrow","currentYearElement","updateNavigationCurrentMonth","separator","hourInput","minuteInput","secondInput","getAttribute","weekdayContainer","updateWeekdays","splice","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","triggerChangeEvent","toInitial","mobileInput","_initialDate","lastChild","_type","removeAttribute","isCalendarElem","eventTarget_1","isCalendarElement","isInput","lostFocus","relatedTarget","isIgnored","some","newYear","newYearNum","isNewYear","dateToCheck","enable","array","parsed","to","valueChanged","trimEnd","getDateStr","allowKeydown","allowInlineKeydown","keyCode","isTimeObj","focusAndClose","delta_1","ctrlKey","elems","x","charAt","toLowerCase","cellClass","hoverDate","firstElementChild","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","hoverableCells","dayElem","timestamp","outOfRange","_positionElement","wasOpen","minMaxDateSetter","inverseDateObj","boolOpts","userConfig","_enable","dates","parseDateRules","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","getInputElem","l10ns","default","customPositionElement","calendarHeight","reduce","acc","child","offsetHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","getBoundingClientRect","distanceFromBottom","innerHeight","bottom","showOnTop","top","pageYOffset","left","pageXOffset","isCenter","isRight","right","rightMost","centerMost","doc","getDocumentStyleSheet","bodyWidth","centerLeft","centerBefore","centerAfter","centerIndex","cssRules","centerStyle","editableSheet","styleSheets","createStyleSheet","msMaxTouchPoints","isSelectable","selectedDate","shouldChangeMonth","selectedIndex","sort","single","CALLBACKS","updatePositionElement","option","setSelectedDate","inputDate","rule","preloadedDate","nodeName","inputType","mobileFormatStr","step","data","hooks","initEvent","specificFormat","dObj","isPrevMonth","isNextMonth","isKeyDown","curValue","which","isHourElem","isMinuteElem","_flatpickr","nodeList","nodes","HTMLElement","instances","HTMLCollection","NodeList","Node","en","localize","setDefaults","jQuery","fp_incr","findClosest","Element","nextElement","ShadowRoot","parentElement","global","factory","module","exports","weekSelectPlugin","fp","onDayHover","childNodes","dayIndSeven","weekStartDay","weekEndDay","day_1","highlightWeek","selDate","clearHover","getConfig","more","_dates","_dateStr","nativePickerAttributes","instance","dateStr","start","end","applyChange","formatTime","minute","time","datetime","daterange","getHour12","getFirstDayOfWeek","daysForLocale","monthsForLocale","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","evaluate","param","getSide","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","height","computeCoordsFromPlacement","_ref","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","isRTL","getElementRects","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","initialPlacement","elements","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","crossAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","arrow","alignmentOffset","isBasePlacement","placements","overflow","overflows","overflowsData","sides","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","resetPlacement","_overflowsData$map$so","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","isYAxis","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","getDimensions","getNodeName","isNode","getWindow","_node$ownerDocument","ownerDocument","defaultView","documentElement","isHTMLElement","isShadowRoot","isOverflowElement","overflowX","overflowY","getComputedStyle","isTableElement","isContainingBlock","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","supports","getNodeScroll","scrollLeft","scrollTop","assignedSlot","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","visualViewport","frameElement","getCssDimensions","hasOffset","shouldFallback","$","unwrapElement","domElement","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","isTopLayer","topLayer","scroll","offsets","isOffsetParentAnElement","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","scrollWidth","clientWidth","scrollHeight","clientHeight","getViewportRect","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","shouldDropCurrentNode","ancestor","elementClippingAncestors","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","getTrueOffsetParent","polyfill","getOffsetParentFn","getDimensionsFn","observeMove","onMove","io","timeoutId","root","cleanup","_io","disconnect","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","rootMargin","isFirstUpdate","handleObserve","ratio","intersectionRatio","IntersectionObserver","observe","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","passive","cleanupIo","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","shift$1","flip$1","size$1","mergedOptions","platformWithCache","computePosition$1","catDatepickerCss","CatDatepickerStyle0","CatDatepickerFlat","onValueChanged","pickr","onDisabledChanged","initDatepicker","_calendarWrapper","withinDropdown","attachToElement","updatePosition","catDatepickerInlineCss","CatDatepickerInlineStyle0","CatDatepickerInline","timeTransitionS","candidateSelectors","candidateSelector","NoElement","msMatchesSelector","webkitMatchesSelector","_element$getRootNode","isInert","lookUp","_node$getAttribute","inertAtt","inert","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","candidates","unshift","getCandidatesIteratively","elementsToCheck","tagName","assigned","assignedElements","nestedCandidates","flatten","scopeParent","validCandidate","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","documentOrder","isHiddenInput","isDetailsWithSummary","getCheckedRadio","form","isTabbableRadio","radioScope","queryRadios","radioSet","escape","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","isHidden","displayCheck","isDirectSummary","nodeUnderDetails","originalNode","rootNode","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","focusable","isTabbable","focusableCandidateSelector","isFocusable","ownKeys","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","configurable","writable","_toPrimitive","prim","Symbol","toPrimitive","res","arg","activeFocusTraps","activateTrap","trapStack","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","isSelectableInput","isEscapeEvent","isTabEvent","isKeyForward","isKeyBackward","findIndex","idx","valueOrHandler","_len","_key","getActualTarget","internalTrapStack","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","paused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","find","getNodeForOption","optionValue","_len2","_key2","getInitialFocusNode","tabbableOptions","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","reverse","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","g","getActiveElement","tryFocus","preventScroll","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref2","_ref2$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref3","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref4","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","nextNode","navAcrossContainers","mruContainerIdx","mruTabIdx","checkKeyNav","checkKey","checkClick","addListeners","removeListeners","checkDomRemoval","mutations","isFocusedNodeRemoved","mutation","removedNodes","mutationObserver","MutationObserver","updateObservedNodes","subtree","childList","activate","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pauseOptions","onPause","onPostPause","unpauseOptions","onUnpause","onPostUnpause","updateContainerElements","containerElements","elementsAsArray","firstTabbable","catDropdownCss","CatDropdownStyle0","CatDropdown","clickHandler","trigger","initTrigger","noAutoClose","focusTrap.createFocusTrap","catOpen","setReturnFocus","initialFocus","noInitialFocus","catClose","triggerSlot","contentId","findTrigger","resize","OFFSET","maxWidth","maxHeight","catFormGroupCss","CatFormGroupStyle0","CatFormGroup","onRequiredMarkerChanged","newRequiredMarker","updateMarker","calculate","endsWith","onHorizontalChanged","newHorizontal","labelSize","optionalFields","requiredFields","catIconCss","CatIconStyle0","CatIcon","iconSrc","icons","getIcon","commonjsGlobal","NumeralFormatter","numeralDecimalMark","numeralIntegerScale","numeralDecimalScale","numeralThousandsGroupStyle","numeralPositiveOnly","stripLeadingZeroes","prefix","signBeforePrefix","tailPrefix","owner","groupStyle","thousand","delimiterRE","lakh","wan","none","getRawValue","partSign","partSignAndPrefix","partInteger","partDecimal","NumeralFormatter_1","DateFormatter","blocks","initBlocks","getISOFormatDate","addLeadingZero","getBlocks","getValidatedDate","sub","sub0","rest","getFixedDateString","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","getFixedDate","getRangeFixedDate","previous","addLeadingZeroForYear","fullYearMode","DateFormatter_1","TimeFormatter","timePattern","timeFormat","getISOFormatTime","getTimeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","getValidatedTime","timeFormatOptions","getFixedTimeString","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","second","getFixedTime","TimeFormatter_1","PhoneFormatter","formatter","setFormatter","phoneNumber","validated","iMax","inputDigit","PhoneFormatter_1","CreditCardDetector","uatp","amex","diners","discover","mastercard","dankort","instapayment","jcb15","jcb","maestro","visa","mir","unionPay","general","re","getStrictBlocks","block","total","prev","getInfo","strictMode","matchedBlocks","CreditCardDetector_1","Util","strip","getPostDelimiter","delimiters","matchedDelimiter","getDelimiterREByDelimiter","getNextCursorPosition","prevPos","getPositionOffset","oldRawValue","newRawValue","lengthOffset","stripDelimiters","letter","headStr","str","getMaxLength","getPrefixStrippedValue","prefixLength","prevResult","noImmediatePrefix","getFirstDiffIndex","getFormattedValue","blocksLength","delimiterLazyShow","multipleDelimiters","currentDelimiter","fixPrefixCursor","appendix","setSelectionRange","len","checkFullSelection","selection","getSelection","ex","setSelection","createTextRange","move","parent","isAndroid","isAndroidBackspaceKeydown","lastInputValue","currentInputValue","Util_1","DefaultProperties","creditCard","creditCardStrictMode","creditCardType","onCreditCardTypeChanged","phone","phoneRegionCode","phoneFormatter","timeFormatter","dateFormatter","numeral","swapHiddenInput","numericOnly","uppercase","lowercase","rawValueTrimPrefix","copyDelimiter","initValue","delimiterLength","maxLength","backspace","DefaultProperties_1","Cleave","hasMultipleElements","properties","pps","onChangeListener","onKeyDownListener","onFocusListener","onCutListener","onCut","onCopyListener","onCopy","initSwapHiddenInput","initPhoneFormatter","initDateFormatter","initTimeFormatter","initNumeralFormatter","inputFormatter","cloneNode","elementSwapHidden","numeralFormatter","AsYouTypeFormatter","charCode","postDelimiter","postDelimiterBackspace","copyClipboardData","textToCopy","clipboardData","setData","postDelimiterAfter","updateValueState","toUpperCase","updateCreditCardPropsByValue","creditCardInfo","endPos","selectionEnd","callOnValueChanged","setPhoneRegionCode","setRawValue","Cleave_1","coerceBoolean","coerceNumber","fallbackValue","isNumberValue","catInputCss","CatInputStyle0","CatInput","onErrorsChanged","findSiblingInput","errorMapSrc","showErrorsIfTimeout","showErrorsIfNoFocus","hidden","startsWith","invalid","togglePassword","autocomplete","maxlength","minlength","minLength","isPasswordShown","doTogglePassword","showErrors","errorUpdateTimeoutId","hasFocus","HTMLInputElement","catPaginationCss","CatPaginationStyle0","CatPagination","isFirst","iconPrev","setPage","page","isLast","iconNext","pageCount","pages","sidePadding","activePadding","minPage","minActivepage","maxPage","maxActivepage","addSeq","_start","_end","fill","num","compact","catRadioCss","CatRadioStyle0","CatRadio","catRadioGroupCss","CatRadioGroupStyle0","CatRadioGroup","catRadioGroup","onNameChanged","newName","catRadio","updateTabIndex","onLabelLeftChanged","attributes","disconnectedCallback","onKeydown","targetElements","activeIdx","activeOff","targetIdx","radio","localName","checkedRadioIndex","catScrollableCss","CatScrollableStyle0","CatScrollable","destroyed","resizedEntries","resizedObserver","scrollElement","scrolled","scrollWrapperElement","attachEmitter","scrolledLeft","scrolledRight","scrolledBottom","scrolledTop","THROTTLE","getScrollOffset","noScrolledInit","noShadowY","noShadowX","noOverflowX","noOverflowY","noOverscroll","emitter","scrolledBuffer","isLower","GHOST_ELEMENT_ID","characterEntities","mapSpecialCharacterToCharacterEntity","specialCharacter","escapeSpecialCharacters","string","createGhostElement","ghostElement","cssText","autosizeInput","elementStyle","elementCssText","boxSizing","borderLeftWidth","borderRightWidth","fontFamily","fontFeatureSettings","fontKerning","fontSize","fontStretch","fontStyle","fontVariant","fontVariantCaps","fontVariantLigatures","fontVariantNumeric","fontWeight","letterSpacing","marginLeft","marginRight","paddingRight","textIndent","textTransform","setWidth","getElementById","minWidth","catSelectCss","CatSelectStyle0","INIT_STATE","term","isLoading","isResolving","tempSelection","activeOptionIndex","activeSelectionIndex","nextTagUniqueId","CatSelect","term$","more$","valueChangedBySelection","onConnectorChanged","connector","onStateChanged","newState","oldState","changed","dropdown","scrollIntoView","multiple","hide","idsSelected","tags","ids","createTag","patchState","isInputFocused","onArrowKeyDown","toggleTag","selectionStart","deselect","selectionClone","pop","onKeyUp","show","clearButton","clearInput","connect","number$","subscription","of","retrieve","totalElements","last","items","toSelectItems","value1","isTagSelected","isPillboxActive","activeDescendant","pill","onCatClick","onScrolledBottom","optionsList","SKELETON_COUNT","lines","noItems","isTagOption","isOptionSelected","isSelected","getLabel","tagTextHelp","description","initIds","initTags","data$","customId","search","newSelection","setTransparentCaret","removeTag","DROPDOWN_OFFSET","tagHint","CatSelectTest","multipleSelect","firstName","lastName","desc","user","multipleSelectAvatar","random","multipleSelectAvatarInitials","multipleSelectTagging","countryConnector","singleSelect","singleSelectAvatar","singleSelectAvatarInitials","country","capital","singleSelectTagging","flexDirection","countries","catSkeletonCss","CatSkeletonStyle0","CatSkeleton","skeleton","effect","catSpinnerCss","CatSpinnerStyle0","CatSpinner","xmlns","cx","cy","catTabCss","CatTabStyle0","CatTab","catTabsCss","CatTabsStyle0","CatTabs","syncTabs","onActiveTabChange","tabs","tab","setActive","setActiveIndex","activeTab","deactivated","canActivate","testForHeightReduction","restoreTextAlign","delete","textAlign","wordWrap","scrollBehavior","paddingBottom","borderTopWidth","borderBottomWidth","Event","bubbles","catTextareaCss","CatTextareaStyle0","CatTextarea","autosize","textarea","rows","formatIso","clampTime","hhMin","mmMin","hhMax","mmMax","isBefore","hh","mm","isAfter","catTimeCss","CatTimeStyle0","CatTime","syncValue","selectionTime","elem1","elem2","isAm","toggleAm","timeArray","isoTime","includeAmPm","catToggleCss","CatToggleStyle0","CatToggle","isTouchDevice","maxTouchPoints","catTooltipCss","CatTooltipStyle0","CatTooltip","hostRef","inactive","boundShowListener","showListener","boundHideListener","hideListener","boundWindowTouchStartListener","windowTouchStartListener","boundTouchStartListener","touchStartListener","boundTouchEndListener","touchEndListener","handleKeyDown","hideTooltip","isTouchScreen","tooltip","SHIFT_PADDING","hideTimeout","showTimeout","showTooltip","showDelay","hideDelay","touchTimeout","longTouchDuration","cleanupFloatingUi"],"sources":["../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Subject.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Scheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/async.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/empty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/EmptyError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/isDate.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/map.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/concatAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/concat.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/timer.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/merge.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/filter.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/audit.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/auditTime.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/catchError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/debounce.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/take.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mapTo.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delay.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/first.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scan.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/startWith.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/switchMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/tap.js","src/utils/setDefault.ts","src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","src/components/cat-alert/cat-alert.tsx","src/utils/load-img.ts","src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","src/components/cat-avatar/cat-avatar.tsx","src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","src/components/cat-badge/cat-badge.tsx","src/utils/breakpoints.ts","src/utils/platform.ts","src/utils/media-matcher.ts","src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","src/components/cat-button/cat-button.tsx","src/components/cat-button-group/cat-button-group.scss?tag=cat-button-group&encapsulation=shadow","src/components/cat-button-group/cat-button-group.tsx","src/components/cat-card/cat-card.scss?tag=cat-card&encapsulation=shadow","src/components/cat-card/cat-card.tsx","src/components/cat-form-hint/cat-form-hint.tsx","src/components/cat-checkbox/cat-checkbox.scss?tag=cat-checkbox&encapsulation=shadow","src/components/cat-checkbox/cat-checkbox.tsx","src/components/cat-date-inline/cat-date-locale.ts","src/components/cat-date-inline/cat-date-math.ts","src/components/cat-date/cat-date.scss?tag=cat-date&encapsulation=shadow","src/components/cat-date/cat-date.tsx","src/components/cat-date-inline/cat-date-inline.scss?tag=cat-date-inline&encapsulation=shadow","src/components/cat-date-inline/cat-date-inline.tsx","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/types/options.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/l10n/default.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/index.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dom.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/formatting.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dates.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/polyfills.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js","src/utils/find-closest.ts","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/plugins/weekSelect/weekSelect.js","src/components/cat-datepicker/cat-datepicker.config.ts","src/components/cat-datepicker/cat-datepicker.format.ts","src/components/cat-datepicker/cat-datepicker.locale.ts","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","src/components/cat-datepicker/cat-datepicker.scss?tag=cat-datepicker&encapsulation=shadow","src/components/cat-datepicker/cat-datepicker.tsx","src/components/cat-datepicker-inline/cat-datepicker-inline.scss?tag=cat-datepicker-inline&encapsulation=shadow","src/components/cat-datepicker-inline/cat-datepicker-inline.tsx","../tokens/dist/js/variables.js","../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js","../node_modules/.pnpm/focus-trap@7.5.4/node_modules/focus-trap/dist/focus-trap.esm.js","src/utils/first-tabbable.ts","src/components/cat-dropdown/cat-dropdown.scss?tag=cat-dropdown&encapsulation=shadow","src/components/cat-dropdown/cat-dropdown.tsx","src/components/cat-form-group/cat-form-group.scss?tag=cat-form-group&encapsulation=shadow","src/components/cat-form-group/cat-form-group.tsx","src/components/cat-icon/cat-icon.scss?tag=cat-icon&encapsulation=shadow","src/components/cat-icon/cat-icon.tsx","../node_modules/.pnpm/cleave.js@1.6.0/node_modules/cleave.js/dist/cleave-esm.js","src/utils/coerce.ts","src/components/cat-input/cat-input.scss?tag=cat-input&encapsulation=shadow","src/components/cat-input/cat-input.tsx","src/components/cat-pagination/cat-pagination.scss?tag=cat-pagination&encapsulation=shadow","src/components/cat-pagination/cat-pagination.tsx","src/components/cat-radio/cat-radio.scss?tag=cat-radio&encapsulation=shadow","src/components/cat-radio/cat-radio.tsx","src/components/cat-radio-group/cat-radio-group.scss?tag=cat-radio-group&encapsulation=shadow","src/components/cat-radio-group/cat-radio-group.tsx","src/components/cat-scrollable/cat-scrollable.scss?tag=cat-scrollable&encapsulation=shadow","src/components/cat-scrollable/cat-scrollable.tsx","../node_modules/.pnpm/autosize-input@1.0.2/node_modules/autosize-input/index.js","src/components/cat-select/cat-select.scss?tag=cat-select&encapsulation=shadow","src/components/cat-select/cat-select.tsx","src/components/cat-select-demo/cat-select-demo.tsx","src/components/cat-skeleton/cat-skeleton.scss?tag=cat-skeleton&encapsulation=shadow","src/components/cat-skeleton/cat-skeleton.tsx","src/components/cat-spinner/cat-spinner.scss?tag=cat-spinner&encapsulation=shadow","src/components/cat-spinner/cat-spinner.tsx","src/components/cat-tab/cat-tab.scss?tag=cat-tab&encapsulation=shadow","src/components/cat-tab/cat-tab.tsx","src/components/cat-tabs/cat-tabs.scss?tag=cat-tabs&encapsulation=shadow","src/components/cat-tabs/cat-tabs.tsx","../node_modules/.pnpm/autosize@6.0.1/node_modules/autosize/dist/autosize.esm.js","src/components/cat-textarea/cat-textarea.scss?tag=cat-textarea&encapsulation=shadow","src/components/cat-textarea/cat-textarea.tsx","src/components/cat-time/cat-time-locale.ts","src/components/cat-time/cat-time-math.ts","src/components/cat-time/cat-time.scss?tag=cat-time&encapsulation=shadow","src/components/cat-time/cat-time.tsx","src/components/cat-toggle/cat-toggle.scss?tag=cat-toggle&encapsulation=shadow","src/components/cat-toggle/cat-toggle.tsx","src/utils/is-touch-screen.ts","src/components/cat-tooltip/cat-tooltip.scss?tag=cat-tooltip&encapsulation=shadow","src/components/cat-tooltip/cat-tooltip.tsx"],"sourcesContent":["import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n//# sourceMappingURL=EmptyError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n//# sourceMappingURL=filter.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n//# sourceMappingURL=delay.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","export function setAttributeDefault(\n host: T,\n attr: string,\n value: unknown\n): void {\n if (!host.hostElement.hasAttribute(attr) && value != null) {\n host.hostElement.setAttribute(attr, String(value));\n }\n}\n\nexport function setAttribute(host: T, attr: string, value: unknown): void {\n host.hostElement.setAttribute(attr, String(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n:host {\n display: flex;\n gap: 0.5rem;\n padding: 1.25rem;\n border-radius: cat-border-radius('l');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n.content {\n align-self: center;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n background-color: cat-token('color.theme.#{$theme}.bg');\n color: cat-token('color.theme.#{$theme}.fill');\n // adjust nested links\n --cat-primary-text: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --cat-primary-text-hover: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --cat-primary-text-active: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --cat-link-decoration: underline;\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\nimport { setAttributeDefault } from '../../utils/setDefault';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n private readonly mapIcon: Map = new Map([\n ['primary', '$cat:alert-primary'],\n ['secondary', '$cat:alert-secondary'],\n ['info', '$cat:alert-info'],\n ['success', '$cat:alert-success'],\n ['warning', '$cat:alert-warning'],\n ['danger', '$cat:alert-danger']\n ]);\n private readonly mapRole: Map = new Map([\n ['primary', 'status'],\n ['secondary', 'status'],\n ['info', 'status'],\n ['success', 'status'],\n ['warning', 'alert'],\n ['danger', 'alert']\n ]);\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The color palette of the alert.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The name of an icon to be displayed in the alert.\n */\n @Prop() icon?: string;\n\n /**\n * Whether the icon of the alert is deactivated.\n */\n @Prop() noIcon = false;\n\n connectedCallback() {\n setAttributeDefault(this, 'tabindex', 0);\n setAttributeDefault(this, 'role', this.mapRole.get(this.color));\n }\n\n render() {\n return (\n \n {!this.noIcon && }\n \n \n \n \n );\n }\n}\n","/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-background-color: cat-token('color.base.neutral.100');\n$-color: cat-token('color.base.neutral.500');\n$-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n// -----\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, $-color);\n background-color: var(--cat-avatar-bg, $-background-color);\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n vertical-align: middle;\n font-weight: 600;\n @include cat-select(none);\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size, map.get($-sizes, $size));\n height: var(--cat-avatar-size, map.get($-sizes, $size));\n line-height: var(--cat-avatar-size, map.get($-sizes, $size));\n font-size: var(--cat-avatar-font-size, cat-body-font-size($fontSize));\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n \n {this.content}\n \n );\n } else {\n return (\n \n {this.content}\n \n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-sizes: (\n 'xl': 3rem,\n 'l': 2.5rem,\n 'm': 2rem,\n 's': 1.5rem,\n 'xs': 1rem\n);\n$-paddings: (\n 'xl': 0 1rem,\n 'l': 0 1rem,\n 'm': 0 0.75rem,\n 's': 0 0.5rem,\n 'xs': 0 0.25rem\n);\n\n// -----\n\n:host([hidden]) {\n display: none;\n}\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n line-height: 1.5;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n:host([round]) {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--text), $alpha: 0.2);\n\n:host([variant='filled']) {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n:host([variant='outlined']) {\n background-color: cat-token('color.ui.background.surface');\n color: cat-token-wrap(var(--text));\n box-shadow: $-outline;\n}\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n :host([size='#{$size}']) {\n height: map.get($-sizes, $size);\n min-width: map.get($-sizes, $size);\n font-size: cat-body-font-size($fontSize);\n padding: map.get($-paddings, $size);\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 's');\n@include size('l', 'm');\n@include size('xl', 'l');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n:host([pulse][variant='filled']) {\n animation: 1.5s ease 0s infinite normal none running pulse;\n}\n\n:host([pulse][variant='outlined']) {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return ;\n }\n}\n","const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = (typeof _breakpoints)[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set = new Set();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$button-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-button {\n position: relative;\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition:\n color cat-token('time.transition.s') linear,\n border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear,\n box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.cat-button-content-inner {\n @include cat-break-word;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n cursor: not-allowed;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- group button\n\n.cat-group-button {\n &-first {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &-middle {\n border-radius: 0;\n }\n\n &-last {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: var(--cat-font-weight-button, 600);\n @include cat-font-smooth;\n\n &.cat-button-disabled {\n --bg: #{cat-token('color.ui.background.muted', $wrap: false)};\n --fill: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.surface');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --base: #{cat-token('color.ui.font.muted', $wrap: false)};\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: cat-token('font.decoration.linkButton');\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n}\n\n.cat-button-link {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n\n $-total-height: map.get($button-sizes, $size);\n $-padding-v: ($-total-height - $-line-height) * 0.5;\n $-padding-h: $padding;\n\n .cat-button-#{$size} {\n min-width: map.get($button-sizes, $size);\n padding: $-padding-v $-padding-h;\n @include cat-body($fontSize, null);\n gap: 0.25rem;\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n height: $-total-height;\n padding: 0;\n }\n }\n\n :host(.cat-button-pull[size='#{$size}']) {\n margin: $-padding-v * -1 $-padding-h * -1;\n }\n\n :host(.cat-button-pull-h[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n margin-right: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-v[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-t[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-l[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-b[size='#{$size}']) {\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-r[size='#{$size}']) {\n margin-right: $-padding-h * -1;\n }\n}\n\n:host(.cat-button-pull:not([size])) {\n margin: -0.625rem -0.75rem;\n}\n\n:host(.cat-button-pull-h:not([size])) {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n}\n\n:host(.cat-button-pull-v:not([size])) {\n margin-top: -0.625rem;\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-t:not([size])) {\n margin-top: -0.625rem;\n}\n\n:host(.cat-button-pull-l:not([size])) {\n margin-left: -0.75rem;\n}\n\n:host(.cat-button-pull-b:not([size])) {\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-r:not([size])) {\n margin-right: -0.75rem;\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// ----- tabs\n\n:host(.cat-tab) {\n &::part(button) {\n padding: 1.125rem 0.75rem;\n --cat-secondary-bg: transparent;\n --cat-primary-text: transparent;\n --cat-danger-text: transparent;\n }\n\n &::part(content) {\n &::before {\n content: attr(data-text);\n content: attr(data-text) / '';\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n font-weight: 700;\n }\n }\n}\n\n// ----- alignment\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n\n// ----- navigation\n\n:host(.cat-nav-item) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n justify-content: left;\n gap: 0.5rem;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n}\n\n// ----- datepicker\n\n:host(.cat-time-format) {\n .cat-button {\n border-radius: 0;\n }\n}\n\n:host(.cat-date-toggle),\n:host(.cat-time-toggle) {\n .cat-button {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n:host(.cat-date-item),\n:host(.cat-date-toggle),\n:host(.cat-time-format),\n:host(.cat-time-toggle) {\n .cat-button {\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n }\n}\n\n:host(.cat-date-item) {\n .cat-button {\n padding: 0;\n min-width: 2rem;\n max-height: 3rem;\n aspect-ratio: 1;\n }\n}\n\n:host(.date-start:not(.date-end)) {\n .cat-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n\n:host(.date-end:not(.date-start)) {\n .cat-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions. Primary style should be used only\n * once per view for main call-to-action.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' | 'link' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'secondary';\n\n /**\n * Set the button into an active state.\n */\n @Prop() active = false;\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Disables ellipse overflowing button content.\n */\n @Prop() noEllipsis = false;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Sets the `aria-current` attribute on the button.\n */\n @Prop({ attribute: 'a11y-current' }) a11yCurrent?: string;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the native HTML button content element\n */\n @Prop() nativeContentAttributes?: { [key: string]: string };\n\n /**\n * The index of a button that is used inside a cat-button-group component\n */\n @Prop() buttonGroupPosition?: 'first' | 'last' | 'middle';\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n componentWillRender(): void {\n if (this.isIconButton && !this.a11yLabel) {\n log.warn('[A11y] Missing ARIA label on icon button', this);\n }\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Programmatically move focus to the button. Use this method instead of\n * `button.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.button.focus(options);\n }\n\n /**\n * Programmatically remove focus from the button. Use this method instead of\n * `button.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.button.blur();\n }\n\n /**\n * Programmatically simulate a click on the button.\n */\n @Method()\n async doClick(): Promise {\n this.button.click();\n }\n\n render() {\n if (this.url) {\n return (\n (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n } else {\n return (\n (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size),\n [`cat-group-button-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition),\n 'cat-group-button': Boolean(this.buttonGroupPosition)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconRight;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconRight;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? : null,\n this.isIconButton ? (\n \n ) : (\n \n \n \n \n \n ),\n this.hasSuffixIcon ? : null,\n this.loading ? : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n",":host {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n}\n\n::slotted(cat-button[variant='outlined']),\n::slotted(cat-button:not([variant])) {\n margin-right: -1px;\n}\n\n::slotted(cat-button[variant='outlined']:last-child),\n::slotted(cat-button:not([variant]):last-child) {\n margin-right: 0;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * Button groups are designed to bring together button controls that are of a\n * similar nature. For example text formatting controls.\n */\n@Component({\n tag: 'cat-button-group',\n styleUrl: 'cat-button-group.scss',\n shadow: true\n})\nexport class CatButtonGroup {\n private formElements: HTMLCatButtonElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Adds an accessible label for the button group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(this.hostElement.querySelectorAll('cat-button'));\n this.formElements.forEach((element, index) => {\n element.buttonGroupPosition = index === 0 ? 'first' : index === this.formElements.length - 1 ? 'last' : 'middle';\n });\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n$-padding: 1.25rem;\n\n:host {\n display: block;\n border-radius: cat-border-radius('l');\n background-color: cat-token('color.ui.background.surface');\n padding: $-padding;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n::slotted(nav),\n::slotted(nav:last-child) {\n margin: #{0.25rem - $-padding} #{0.25rem - $-padding} !important;\n}\n\n// --- pull out helper classes\n\n::slotted(.cat-card-pull) {\n margin: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-h) {\n margin-left: -$-padding !important;\n margin-right: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-v) {\n margin-top: -$-padding !important;\n margin-bottom: -$-padding !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-t) {\n margin-top: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-l) {\n margin-left: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-r) {\n margin-right: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-b) {\n margin-bottom: -$-padding !important;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * Cards are surfaces that display content and actions on a single topic. They\n * should be easy to scan for relevant and actionable information.\n */\n@Component({\n tag: 'cat-card',\n styleUrl: 'cat-card.scss',\n shadow: true\n})\nexport class CatCard {\n render() {\n return ;\n }\n}\n","import { h, FunctionalComponent } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ErrorMap = { [key: string]: any };\n\n/**\n * Properties of CatFormHint.\n *\n * @property hint - Optional hint text(s) of the form field.\n * @property slottedHint - Optional hint element of the form field.\n */\ninterface CatFormHintProps {\n id: string;\n hint?: string | string[];\n slottedHint?: HTMLSlotElement;\n class?: string;\n errorMap?: ErrorMap;\n}\n\n/**\n * CatFormHint is a functional component that represents the hint area of form elements.\n *\n * @param props - {@link CatFormHintProps}\n * @return a JSX.Element\n */\nexport const CatFormHint: FunctionalComponent = props => {\n const { id, hint, slottedHint, errorMap } = props;\n const errors = Object.entries(errorMap || {});\n return (\n \n {errors.length\n ? errors.map(([key, params]) => (\n {i18n.t(`error.${key}`, params)}\n ))\n : [\n hint &&\n (Array.isArray(hint) ? (\n hint.map(item => {item})\n ) : (\n {hint}\n )),\n slottedHint\n ]}\n \n );\n};\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$checkbox-width: 1.25rem;\n$checkbox-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n position: relative;\n}\n\n.label-left {\n flex-direction: row-reverse;\n\n input {\n right: 1px;\n left: unset;\n }\n}\n\ninput {\n position: absolute;\n width: $checkbox-width;\n height: $checkbox-height;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n left: 1px;\n top: 0.5px;\n}\n\n.box-placeholder {\n width: calc($checkbox-width + 2px);\n flex-shrink: 0;\n}\n\n.box {\n flex: 0 0 auto;\n display: flex;\n position: relative;\n height: $checkbox-height;\n width: $checkbox-width;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.dark');\n border-radius: cat-border-radius(s);\n transition:\n background-color cat-token('time.transition.s') ease,\n border-color cat-token('time.transition.s') ease;\n pointer-events: none;\n box-sizing: border-box;\n\n svg {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 16px;\n stroke-dashoffset: 16px;\n transition: all cat-token('time.transition.s') ease;\n width: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.99);\n }\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 0;\n }\n }\n\n :indeterminate + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 16px;\n }\n\n .dash {\n stroke-dashoffset: 0;\n }\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n\n .is-disabled & {\n background-color: cat-token('color.ui.background.muted');\n border-color: cat-token('color.ui.border.dark');\n stroke: cat-token('color.ui.font.muted');\n }\n}\n\n:host(.cat-error) {\n .box {\n border: 1px solid cat-token('color.theme.danger.bg');\n }\n\n :checked + .box,\n :indeterminate + .box {\n background-color: cat-token('color.theme.danger.bg');\n border-color: cat-token('color.theme.danger.bg');\n stroke: cat-token('color.theme.danger.fill');\n }\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Checkboxes are used to let a user choose one or more options from a limited\n * number of options.\n *\n * @slot hint - Optional hint element to be displayed with the checkbox.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-checkbox',\n styleUrls: ['cat-checkbox.scss'],\n shadow: true\n})\nexport class CatCheckbox {\n private readonly _id = `cat-checkbox-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n @State() hasSlottedHint = false;\n\n /**\n * Checked state of the checkbox\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Indeterminate state of the checkbox\n */\n @Prop({ mutable: true }) indeterminate = false;\n\n /**\n * Disabled state of the checkbox\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * Label of the checkbox which is presented in the UI\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the input.\n */\n @Prop() name?: string;\n\n /**\n * Required state of the checkbox.\n */\n @Prop() required = false;\n\n /**\n * The value of the checked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value?: any;\n\n /**\n * The value of the unchecked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() noValue?: any;\n\n /**\n * The resolved value of the checkbox, based on the checked state and value.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) resolvedValue: any = null;\n\n /**\n * Optional hint text(s) to be displayed with the checkbox.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the checkbox.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the checked status of the checkbox is changed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the checkbox received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.updateResolved();\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on checkbox', this);\n }\n }\n\n /**\n * Programmatically move focus to the checkbox. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the checkbox. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n \n \n \n \n \n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n \n \n } />\n \n )}\n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = this.input.checked;\n this.indeterminate = this.input.indeterminate;\n this.updateResolved();\n this.catChange.emit(this.resolvedValue);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n\n private updateResolved() {\n this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;\n }\n}\n","import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nfunction getDays(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction getMonths(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nfunction getWeekInfo(language: string) {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return {\n firstDay: weekInfo?.firstDay ?? 1,\n minDays: weekInfo?.minDays ?? 4,\n weekend: weekInfo?.weekend ?? [6, 7]\n };\n}\n\nfunction getFormat(language: string) {\n const format = new Intl.DateTimeFormat(language, { year: 'numeric', month: '2-digit', day: '2-digit' })\n .format(new Date(3456, 10, 22))\n .replace('3456', 'YYYY')\n .replace('56', 'YY')\n .replace('11', 'MM')\n .replace('22', 'DD');\n return /^(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)$/.test(format) ? format : 'DD-MM-YYYY';\n}\n\nexport function getLocale(language: string) {\n return {\n prevYear: i18n.t('datepicker.prevYear'),\n nextYear: i18n.t('datepicker.nextYear'),\n prevMonth: i18n.t('datepicker.prevMonth'),\n nextMonth: i18n.t('datepicker.nextMonth'),\n arrowKeys: i18n.t('datepicker.arrowKeys'),\n today: i18n.t('datepicker.today'),\n change: i18n.t('datepicker.change'),\n choose: i18n.t('datepicker.choose'),\n clear: i18n.t('datepicker.clear'),\n formatStr: getFormat(language),\n weekInfo: getWeekInfo(language),\n days: {\n short: getDays(language, 'short'),\n long: getDays(language, 'long')\n },\n months: {\n short: getMonths(language, 'short'),\n long: getMonths(language, 'long')\n },\n now: () => {\n const date = new Date();\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n },\n fromLocalISO: (date?: string | null) => {\n const [match, year, month, day] = date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return match ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n },\n toLocalISO: (date: Date) => {\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n return `${year}-${month}-${day}`;\n },\n toLocalStr: (date: Date) =>\n new Intl.DateTimeFormat(language, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long'\n }).format(date)\n };\n}\n","export function isLeapYear(year: number): boolean {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nexport function addDays(date: Date, n: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + n);\n}\n\nexport function addMonth(date: Date, n: number): Date {\n const [year, month, day] = [date.getFullYear(), date.getMonth(), date.getDate()];\n const maxDays = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n const newDate = new Date(date);\n newDate.setDate(1);\n newDate.setMonth(newDate.getMonth() + n);\n newDate.setDate(Math.min(day, maxDays[(month + (n % 12) + 12) % 12]));\n return newDate;\n}\n\nexport function isSameYear(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getFullYear() === date2.getFullYear();\n}\n\nexport function isSameMonth(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getMonth() === date2.getMonth() && isSameYear(date1, date2);\n}\n\nexport function isSameDay(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getDate() === date2.getDate() && isSameMonth(date1, date2);\n}\n\nexport function clampDate(min: Date | null, date: Date, max: Date | null): Date {\n return new Date(Math.min(Math.max(date.getTime(), min?.getTime() ?? -Infinity), max?.getTime() ?? Infinity));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-aria {\n @include cat-visually-hidden;\n}\n\ncat-date-inline {\n margin: 1rem;\n width: 20rem;\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: true\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.input?.mask({\n date: true,\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1, p2, p3]\n });\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.input?.clear();\n }\n\n render() {\n return (\n \n (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n \n {this.label}\n ({this.locale.formatStr})\n \n this.dateInline?.resetView()}\n >\n \n \n (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n >\n \n \n \n \n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input) {\n return;\n }\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? new Date(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n\n > :not(:last-child) {\n // we use margin here instead of gap to be able to properly adjust by container query\n margin-right: 0.25rem;\n }\n\n h3 {\n @include cat-head(5);\n flex: 1;\n text-align: center;\n margin-block: 0;\n }\n\n @container (min-width: 20rem) {\n h3 {\n @include cat-head(4);\n }\n\n > :not(:last-child) {\n margin-right: 0.5rem;\n }\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas:\n 'h h h h h h h'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n\n .picker-weeks & {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas:\n '. h h h h h h h'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n }\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n @include cat-body('xs', 600);\n color: cat-token('color.ui.font.muted') !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n\n > :not(:last-child) {\n // we use margin here instead of gap to be able to properly adjust by container query\n margin-right: 0.25rem;\n }\n\n @container (min-width: 20rem) {\n > :not(:last-child) {\n margin-right: 0.5rem;\n }\n\n .cursor-help {\n @include cat-body('s');\n }\n }\n}\n\n.cursor-help {\n margin-block: 0;\n @include cat-body('xs');\n color: cat-token('color.ui.font.muted') !important;\n text-align: center;\n flex: 1;\n\n &:first-child {\n text-align: left;\n }\n\n &:last-child {\n text-align: right;\n }\n\n &:only-child {\n text-align: center;\n }\n}\n\n.cursor-aria {\n @include cat-visually-hidden;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getLocale } from './cat-date-locale';\nimport { addDays, addMonth, clampDate, isSameDay, isSameMonth, isSameYear } from './cat-date-math';\n\n/**\n * An inline date picker component to select a date.\n */\n@Component({\n tag: 'cat-date-inline',\n styleUrl: 'cat-date-inline.scss',\n shadow: true\n})\nexport class CatDateInline {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n // additonally store the focus date to ensure correct focus after potential re-render\n private focusDate: Date | null = null;\n\n @Element() hostElement!: HTMLElement;\n\n @State() viewDate: Date = this.locale.now();\n\n /**\n * Hides the clear button.\n */\n @Prop() noClear = false;\n\n /**\n * Shows an arrow keys navigation hint.\n */\n @Prop() hint = false;\n\n /**\n * Hides the today button.\n */\n @Prop() noToday = false;\n\n /**\n * Show week numbers.\n */\n @Prop() weeks = false;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * Allow the selection of a range of dates, i.e. start and end date.\n */\n @Prop() range = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n private get focusedDate() {\n const [all, year, month, day] =\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date]:focus`)\n ?.dataset.date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n }\n\n componentWillLoad() {\n const [startDate, endDate] = this.getValue();\n if (endDate) {\n this.focus(endDate);\n } else if (startDate) {\n this.focus(startDate);\n }\n }\n\n componentDidRender() {\n if (this.focusDate) {\n // re-focus the previously focused date after re-render\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n this.focusDate = null;\n }\n }\n\n @Listen('keydown')\n onKeyDown(e: KeyboardEvent) {\n if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {\n return;\n }\n const focusedDate = this.focusedDate;\n if (!focusedDate) {\n e.preventDefault();\n const [startDate] = this.getValue();\n this.focus(startDate || this.locale.now());\n } else if (e.key === 'ArrowLeft') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, -1) : addDays(focusedDate, -1));\n } else if (e.key === 'ArrowRight') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, 1) : addDays(focusedDate, 1));\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.focus(addDays(focusedDate, -7));\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.focus(addDays(focusedDate, 7));\n }\n }\n\n /**\n * Select a date in the picker.\n *\n * @param date The date to select.\n */\n @Method()\n async select(date: Date | null): Promise {\n if (!date) {\n return this.clear();\n }\n const oldValue = this.value;\n const [minDate, maxDate] = this.getMinMaxDate();\n const newDate = clampDate(minDate, new Date(date.getFullYear(), date.getMonth(), date.getDate()), maxDate);\n this.focus(newDate);\n\n if (this.range) {\n const [startDate, endDate] = this.getValue();\n if (!startDate || endDate || newDate < startDate) {\n this.value = this.toRangeValue(newDate, null);\n } else {\n this.value = this.toRangeValue(startDate, newDate);\n }\n } else {\n this.value = this.locale.toLocalISO(newDate);\n }\n\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Clear the picker.\n */\n @Method()\n async clear(): Promise {\n const oldValue = this.value;\n this.value = undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Resets the view of the picker.\n */\n @Method()\n async resetView(): Promise {\n const [minDate, maxDate] = this.getMinMaxDate();\n const [dateStart] = this.getValue();\n this.viewDate = dateStart ?? clampDate(minDate, this.locale.now(), maxDate);\n }\n\n render() {\n const [minDate, maxDate] = this.getMinMaxDate();\n const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());\n const [dateStart, dateEnd] = this.getValue();\n return (\n \n \n \n this.navigate('prev', 'year')}\n data-dropdown-no-close\n >\n this.navigate('prev', 'month')}\n data-dropdown-no-close\n >\n {this.getHeadline()}\n this.navigate('next', 'month')}\n data-dropdown-no-close\n >\n this.navigate('next', 'year')}\n data-dropdown-no-close\n >\n \n this.setAriaLive(this.locale.arrowKeys)}>\n \n {Array.from(Array(7), (_, i) => (\n {this.locale.days.short[i]}\n ))}\n \n {this.weeks && (\n \n {dateGrid\n .filter((_, i) => i % 7 === 0)\n .map(day => (\n {this.getWeekNumber(day)}\n ))}\n \n )}\n \n {dateGrid.map(day => {\n const isStartDate = isSameDay(dateStart, day);\n const isEndDate = isSameDay(dateEnd, day);\n const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;\n const isToday = isSameDay(this.locale.now(), day);\n return (\n this.select(day)}\n data-date={this.locale.toLocalISO(day)}\n >\n {day.getDate()}\n \n );\n })}\n \n \n \n {!this.noToday && this.canClick(this.locale.now()) && (\n this.select(this.locale.now())}>\n {this.locale.today}\n \n )}\n {this.hint && {this.locale.arrowKeys}}\n {!this.noClear && (\n this.clear()}>\n {this.locale.clear}\n \n )}\n \n \n \n \n );\n }\n\n private focus(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n this.focusDate = clampDate(minDate, date, maxDate);\n this.viewDate = new Date(this.focusDate.getFullYear(), this.focusDate.getMonth());\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n }\n\n private navigate(direction: 'prev' | 'next', period: 'year' | 'month') {\n this.viewDate = new Date(\n direction === 'prev'\n ? period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() - 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() - 1)\n : period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() + 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() + 1)\n );\n // announce the new month and year\n this.setAriaLive(this.getHeadline());\n }\n\n private setAriaLive(text: string) {\n const node = this.hostElement.shadowRoot?.querySelector('.cursor-aria');\n if (node) {\n node.innerHTML = text;\n }\n }\n\n private dateGrid(year: number, month: number) {\n const firstDayOfWeek = new Date(year, month, 1).getDay();\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const days = [...Array(daysInMonth).keys()];\n const daysBefore = [...Array(firstDayOfWeek).keys()].map(day =>\n new Date(year, month, day - firstDayOfWeek).getDate()\n );\n const daysAfter = [...Array(42 - days.length - daysBefore.length).keys()];\n return [\n ...daysBefore.map(day => new Date(year, month - 1, day + 1)),\n ...days.map(day => new Date(year, month, day + 1)),\n ...daysAfter.map(day => new Date(year, month + 1, day + 1))\n ];\n }\n\n private getHeadline() {\n return `${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`;\n }\n\n private getWeekNumber(date: Date, iso8601 = true) {\n const currentDate = new Date(date.getTime());\n const dayNum = iso8601 ? currentDate.getDay() || 7 : currentDate.getDay();\n currentDate.setDate(currentDate.getDate() + 4 - dayNum);\n const yearStart = new Date(currentDate.getFullYear(), 0, 1);\n return Math.ceil(((+currentDate - +yearStart) / 86400000 + 1) / 7);\n }\n\n private canFocus(date: Date): boolean {\n const now = this.locale.now();\n const [minDate] = this.getMinMaxDate();\n const focusedDate = this.focusedDate;\n const [startDate] = this.getValue();\n if (focusedDate && isSameMonth(focusedDate, this.viewDate)) {\n return isSameMonth(focusedDate, date) && isSameDay(focusedDate, date);\n } else if (startDate && isSameMonth(startDate, this.viewDate)) {\n return isSameMonth(startDate, date) && isSameDay(startDate, date);\n } else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {\n return isSameMonth(this.viewDate, date) && isSameDay(now, date);\n }\n const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;\n return isSameMonth(this.viewDate, date) && date.getDate() === minDay;\n }\n\n private canClick(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n return (!minDate || minDate <= date) && (!maxDate || maxDate >= date);\n }\n\n private getMinMaxDate() {\n const minDate = this.locale.fromLocalISO(this.min);\n const maxDate = this.locale.fromLocalISO(this.max);\n return [minDate, maxDate];\n }\n\n private getValue(): [Date | null, Date | null] {\n if (this.range) {\n const [startDate, endDate] = JSON.parse(this.value || '[]') as [string | null, string | null];\n return [this.locale.fromLocalISO(startDate), this.locale.fromLocalISO(endDate)];\n } else {\n return [this.locale.fromLocalISO(this.value), null];\n }\n }\n\n private toRangeValue(startDate: Date | null, endDate: Date | null): string {\n return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));\n }\n}\n","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","/**\n * Find the closest parent element matching the given selector while traversing\n * up the DOM tree (including Shadow DOM).\n */\nexport function findClosest(selector: string, element: Element | ShadowRoot): Element | null {\n if (element instanceof Element && element.matches(selector)) {\n return element;\n }\n\n // Search in parent element or Shadow DOM host\n const nextElement =\n element instanceof ShadowRoot ? element.host : element.parentElement || (element.getRootNode() as ShadowRoot).host;\n return nextElement ? findClosest(selector, nextElement) : null;\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.weekSelect = factory());\n}(this, (function () { 'use strict';\n\n function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n }\n\n function weekSelectPlugin() {\n return function (fp) {\n function onDayHover(event) {\n var day = getEventTarget(event);\n if (!day.classList.contains(\"flatpickr-day\"))\n return;\n var days = fp.days.childNodes;\n var dayIndex = day.$i;\n var dayIndSeven = dayIndex / 7;\n var weekStartDay = days[7 * Math.floor(dayIndSeven)]\n .dateObj;\n var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;\n for (var i = days.length; i--;) {\n var day_1 = days[i];\n var date = day_1.dateObj;\n if (date > weekEndDay || date < weekStartDay)\n day_1.classList.remove(\"inRange\");\n else\n day_1.classList.add(\"inRange\");\n }\n }\n function highlightWeek() {\n var selDate = fp.latestSelectedDateObj;\n if (selDate !== undefined &&\n selDate.getMonth() === fp.currentMonth &&\n selDate.getFullYear() === fp.currentYear) {\n fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;\n fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;\n }\n var days = fp.days.childNodes;\n for (var i = days.length; i--;) {\n var date = days[i].dateObj;\n if (date >= fp.weekStartDay && date <= fp.weekEndDay)\n days[i].classList.add(\"week\", \"selected\");\n }\n }\n function clearHover() {\n var days = fp.days.childNodes;\n for (var i = days.length; i--;)\n days[i].classList.remove(\"inRange\");\n }\n function onReady() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.addEventListener(\"mouseover\", onDayHover);\n }\n function onDestroy() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.removeEventListener(\"mouseover\", onDayHover);\n }\n return {\n onValueUpdate: highlightWeek,\n onMonthChange: highlightWeek,\n onYearChange: highlightWeek,\n onOpen: highlightWeek,\n onClose: clearHover,\n onParseConfig: function () {\n fp.config.mode = \"single\";\n fp.config.enableTime = false;\n fp.config.dateFormat = fp.config.dateFormat\n ? fp.config.dateFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n fp.config.altFormat = fp.config.altFormat\n ? fp.config.altFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n },\n onReady: [\n onReady,\n highlightWeek,\n function () {\n fp.loadedPlugins.push(\"weekSelect\");\n },\n ],\n onDestroy: onDestroy,\n };\n };\n }\n\n return weekSelectPlugin;\n\n})));\n","import flatpickr from 'flatpickr';\nimport weekSelectPlugin from 'flatpickr/dist/plugins/weekSelect/weekSelect';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { BaseOptions, Hook } from 'flatpickr/dist/types/options';\n\nexport function getConfig(\n options: {\n locale: flatpickr.CustomLocale;\n format: string;\n mode: CatDatepickerMode;\n min: string | undefined;\n max: string | undefined;\n step: number;\n disabled: boolean;\n readonly: boolean;\n nativePickerAttributes: { [key: string]: string };\n applyChange: (value?: string) => void;\n appendTo?: HTMLElement | undefined;\n position?: BaseOptions['position'];\n onReady?: Hook;\n },\n more: flatpickr.Options.Options = {}\n): flatpickr.Options.Options {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const plugins = options.mode === 'week' ? [new (weekSelectPlugin as any)({})] : [];\n const format = dateFormat(options.mode);\n\n return {\n ...more,\n locale: options.locale,\n plugins,\n allowInput: true,\n altInput: true,\n prevArrow: '←',\n nextArrow: '→',\n dateFormat: format,\n altFormat: options.format,\n ariaDateFormat: options.format,\n mode: options.mode === 'daterange' ? 'range' : 'single',\n minDate: options.min,\n maxDate: options.max,\n enableTime: options.mode === 'time' || options.mode === 'datetime',\n noCalendar: options.mode === 'time',\n weekNumbers: true,\n minuteIncrement: options.step,\n clickOpens: !options.disabled && !options.readonly,\n appendTo: options.appendTo,\n position: options.position ? options.position : 'auto',\n onReady: (_dates, _dateStr, flatpickr) => {\n for (const key in options.nativePickerAttributes) {\n const value = options.nativePickerAttributes[key];\n flatpickr.calendarContainer.setAttribute(key, value);\n }\n if (options.appendTo && typeof options.onReady === 'function') {\n options.onReady(_dates, _dateStr, flatpickr);\n }\n },\n onClose: function (dates, _dateStr, instance) {\n if (options.mode === 'daterange' && dates.length < 2) {\n instance.clear();\n }\n },\n onChange: (dates, dateStr, flatpickr) => {\n let value = dateStr || undefined;\n if (options.mode === 'daterange') {\n if (dates.length < 2) {\n return;\n } else {\n const start = dates[0];\n const end = dates[1];\n end.setHours(23);\n end.setMinutes(59);\n end.setSeconds(59);\n value = `${flatpickr.formatDate(start, format)} - ${flatpickr.formatDate(end, format)}`;\n }\n } else if (options.mode === 'week') {\n value = dates[0] ? flatpickr.config.getWeek(dates[0]).toString() : undefined;\n }\n options.applyChange(value);\n }\n };\n}\n\nfunction dateFormat(mode: CatDatepickerMode): string {\n if (mode === 'week') {\n return 'W';\n } else if (mode === 'time') {\n return 'H:i';\n } else {\n return 'Z';\n }\n}\n","import { CatDatepickerMode } from './cat-datepicker.mode';\n\nexport function getFormat(language: string, mode: CatDatepickerMode): string {\n const date = new Date(2000, 1, 3, 16, 5, 6);\n const formatDate: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };\n const formatTime: Intl.DateTimeFormatOptions = { hour: '2-digit', minute: '2-digit' };\n return mode === 'week'\n ? 'W'\n : new Intl.DateTimeFormat(\n language,\n {\n date: formatDate,\n time: formatTime,\n datetime: { ...formatDate, ...formatTime },\n daterange: formatDate\n }[mode]\n )\n .format(date)\n .replace('2000', 'Y')\n .replace('00', 'y')\n .replace('02', 'm')\n .replace('03', 'd')\n .replace('04', 'h')\n .replace('16', 'H')\n .replace('05', 'i')\n .replace(/AM|PM/i, 'K');\n}\n","import flatpickr from 'flatpickr';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport function getHour12(language: string): boolean {\n const dateStr = new Intl.DateTimeFormat(language, { hour: '2-digit', minute: '2-digit' })\n .format(new Date())\n .toLowerCase();\n return dateStr.includes('am') || dateStr.includes('pm');\n}\n\nfunction getFirstDayOfWeek(language: string): number {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return weekInfo?.firstDay ?? 1;\n}\n\nfunction daysForLocale(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction monthsForLocale(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nexport function getLocale(language: string): flatpickr.CustomLocale {\n return {\n firstDayOfWeek: getFirstDayOfWeek(language),\n rangeSeparator: ' - ',\n weekAbbreviation: '',\n yearAriaLabel: i18n.t('datepicker.year'),\n monthAriaLabel: i18n.t('datepicker.month'),\n hourAriaLabel: i18n.t('datepicker.hour'),\n minuteAriaLabel: i18n.t('datepicker.minute'),\n toggleTitle: i18n.t('datepicker.toggle'),\n scrollTitle: i18n.t('datepicker.scroll'),\n time_24hr: !getHour12(language),\n weekdays: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: daysForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: daysForLocale(language, 'long') as any\n },\n months: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: monthsForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: monthsForLocale(language, 'long') as any\n }\n };\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n","@use 'variables' as *;\n@use 'mixins' as *;\n@import '~flatpickr/dist/flatpickr.css';\n@import 'vendor/flatpickr';\n\n:host {\n display: flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\ncat-input {\n flex: 1 1 auto;\n margin: 0;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport flatpickr from 'flatpickr';\nimport { findClosest } from '../../utils/find-closest';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getConfig } from './cat-datepicker.config';\nimport { getFormat } from './cat-datepicker.format';\nimport { getLocale } from './cat-datepicker.locale';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { autoUpdate, computePosition, flip, Placement, ReferenceElement } from '@floating-ui/dom';\nimport { BaseOptions } from 'flatpickr/dist/types/options';\n\n@Component({\n tag: 'cat-datepicker',\n styleUrl: 'cat-datepicker.scss',\n shadow: true\n})\nexport class CatDatepickerFlat {\n private pickr?: flatpickr.Instance;\n private _input?: HTMLCatInputElement;\n private _calendarWrapper?: HTMLDivElement;\n private get input(): HTMLInputElement | undefined {\n return this._input?.shadowRoot?.querySelector('input') ?? undefined;\n }\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * Instead of body, appends the calendar to the cat-datepicker element instead\n */\n @Prop() attachToElement = false;\n\n /**\n * Where the calendar is rendered relative to the input vertically and horizontally.\n * In the format of \"[vertical] [horizontal]\". Vertical can be auto, above or below (required).\n * Horizontal can be left, center or right.\n * If @attachToElement is passed the value should be in Placement format\n */\n @Prop() position?: BaseOptions['position'] | Placement;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n if (this.mode !== 'daterange' || value.includes(' - ')) {\n this.catChange.emit(value);\n }\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n @Watch('mode')\n onDisabledChanged() {\n // Dynamically changing config value is not working due to a bug in the\n // library. We thus need to fully recreate the date picker after the value\n // has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => {\n this.input ? (this.input.disabled = this.disabled) : null;\n this.pickr = this.initDatepicker(this.input);\n });\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Watch('min')\n @Watch('max')\n onMinChanged() {\n this.pickr?.set('minDate', this.min);\n this.pickr?.set('maxDate', this.max);\n if (this.value && !this.pickr?.selectedDates?.length) {\n // Dynamically changing 'minDate' or 'maxDate' does not emit a change if\n // the value is cleared due to an invalid date.\n this.pickr?.clear();\n }\n }\n\n /**\n * Programmatically move focus to the datepicker. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this._input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the datepicker. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this._input?.doBlur();\n }\n\n render() {\n return [\n (this._input = el)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n label={this.label}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n value={this.value}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n onCatChange={e => {\n e.stopPropagation();\n this.value = e.detail || undefined;\n }}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.catBlur.emit(e.detail);\n }}\n >\n {this.hasSlottedLabel && (\n \n \n \n )}\n {this.hasSlottedHint && (\n \n \n \n )}\n ,\n (this._calendarWrapper = el)} class=\"datepicker-wrapper\">\n ];\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n // avoid dropdown closing if datepicker is part of a dropdown\n const withinDropdown = !!findClosest('cat-dropdown', input);\n const nativePickerAttributes: { [key: string]: string } = withinDropdown ? { 'data-dropdown-no-close': '' } : {};\n\n return flatpickr(\n input,\n getConfig({\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n appendTo: this.attachToElement ? this._calendarWrapper : undefined,\n nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },\n // flatpickr has open bug about incorrect positioning when appendTo is used,\n // we have to use custom logic to calculate position\n // https://github.com/flatpickr/flatpickr/issues/1619\n position: this.attachToElement\n ? (flatpickr, positionElement) => {\n this.updatePosition(flatpickr, positionElement);\n }\n : (this.position as BaseOptions['position']) || undefined,\n onReady: (_dates, _dateStr, flatpickr) => {\n autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));\n },\n applyChange: value => (this.value = value)\n })\n );\n }\n\n private updatePosition(flatpickr: flatpickr.Instance, positionElement: HTMLElement | undefined): void {\n if (positionElement) {\n computePosition(positionElement as ReferenceElement, flatpickr.calendarContainer, {\n strategy: 'fixed',\n placement: (this.position as Placement) || 'bottom-start',\n middleware: [flip()]\n }).then(({ x, y, placement }) => {\n if (flatpickr.calendarContainer) {\n flatpickr.calendarContainer.dataset.placement = placement;\n Object.assign(flatpickr.calendarContainer.style, {\n left: `${x}px`,\n top: `${y}px`,\n position: 'fixed'\n });\n }\n });\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n@import '~flatpickr/dist/flatpickr.css';\n@import '../styles/vendor/flatpickr';\n\n:host {\n display: inline-flex;\n\n > div {\n display: flex;\n }\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.datepicker-disabled,\n.datepicker-readonly {\n .flatpickr-days,\n .flatpickr-time {\n pointer-events: none;\n }\n}\n\n.datepicker-disabled {\n .flatpickr-days {\n opacity: 0.75;\n }\n\n .flatpickr-time {\n input,\n .flatpickr-time-separator,\n .flatpickr-am-pm {\n color: cat-token('color.ui.font.muted');\n opacity: 0.75;\n }\n }\n}\n\ninput {\n display: none;\n}\n\n.flatpickr-calendar {\n box-shadow: unset;\n background: unset;\n}\n","import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\nimport flatpickr from 'flatpickr';\nimport { getConfig } from '../cat-datepicker/cat-datepicker.config';\nimport { getFormat } from '../cat-datepicker/cat-datepicker.format';\nimport { getLocale } from '../cat-datepicker/cat-datepicker.locale';\nimport { CatDatepickerMode } from '../cat-datepicker/cat-datepicker.mode';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n@Component({\n tag: 'cat-datepicker-inline',\n styleUrl: 'cat-datepicker-inline.scss',\n shadow: true\n})\nexport class CatDatepickerInline {\n private pickr?: flatpickr.Instance;\n private input?: HTMLInputElement;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * A maximum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n this.catChange.emit(value);\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n onDisabledChanged() {\n // Dynamically unsetting 'enabled' value to undefined is not working due to\n // a bug in the library. We thus need to fully recreate the date picker\n // after the value has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => (this.pickr = this.initDatepicker(this.input)));\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n render() {\n return (\n \n \n (this.input = el)}\n value={this.value}\n disabled={this.disabled}\n readonly={this.readonly}\n >\n \n \n );\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n return flatpickr(\n input,\n getConfig(\n {\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n nativePickerAttributes: this.nativePickerAttributes ?? {},\n applyChange: value => (this.value = value)\n },\n {\n ...(this.disabled ? { enable: [] } : {}),\n inline: true\n }\n )\n );\n }\n}\n","/**\n * Auto-generated file. Do not edit directly.\n */\n\nexport const assetFontLatoName = \"Lato\";\nexport const assetFontLatoWoffBlack = \"Lato-Black.woff\";\nexport const assetFontLatoWoff2Black = \"Lato-Black.woff2\";\nexport const assetFontLatoWoffBlackItalic = \"Lato-BlackItalic.woff\";\nexport const assetFontLatoWoff2BlackItalic = \"Lato-BlackItalic.woff2\";\nexport const assetFontLatoWoffBold = \"Lato-Bold.woff\";\nexport const assetFontLatoWoff2Bold = \"Lato-Bold.woff2\";\nexport const assetFontLatoWoffBoldItalic = \"Lato-BoldItalic.woff\";\nexport const assetFontLatoWoff2BoldItalic = \"Lato-BoldItalic.woff2\";\nexport const assetFontLatoWoffHairline = \"Lato-Hairline.woff\";\nexport const assetFontLatoWoff2Hairline = \"Lato-Hairline.woff2\";\nexport const assetFontLatoWoffHairlineItalic = \"Lato-HairlineItalic.woff\";\nexport const assetFontLatoWoff2HairlineItalic = \"Lato-HairlineItalic.woff2\";\nexport const assetFontLatoWoffHeavy = \"Lato-Heavy.woff\";\nexport const assetFontLatoWoff2Heavy = \"Lato-Heavy.woff2\";\nexport const assetFontLatoWoffHeavyItalic = \"Lato-HeavyItalic.woff\";\nexport const assetFontLatoWoff2HeavyItalic = \"Lato-HeavyItalic.woff2\";\nexport const assetFontLatoWoffItalic = \"Lato-Italic.woff\";\nexport const assetFontLatoWoff2Italic = \"Lato-Italic.woff2\";\nexport const assetFontLatoWoffLight = \"Lato-Light.woff\";\nexport const assetFontLatoWoff2Light = \"Lato-Light.woff2\";\nexport const assetFontLatoWoffLightItalic = \"Lato-LightItalic.woff\";\nexport const assetFontLatoWoff2LightItalic = \"Lato-LightItalic.woff2\";\nexport const assetFontLatoWoffMedium = \"Lato-Medium.woff\";\nexport const assetFontLatoWoff2Medium = \"Lato-Medium.woff2\";\nexport const assetFontLatoWoffMediumItalic = \"Lato-MediumItalic.woff\";\nexport const assetFontLatoWoff2MediumItalic = \"Lato-MediumItalic.woff2\";\nexport const assetFontLatoWoffRegular = \"Lato-Regular.woff\";\nexport const assetFontLatoWoff2Regular = \"Lato-Regular.woff2\";\nexport const assetFontLatoWoffSemibold = \"Lato-Semibold.woff\";\nexport const assetFontLatoWoff2Semibold = \"Lato-Semibold.woff2\";\nexport const assetFontLatoWoffSemiboldItalic = \"Lato-SemiboldItalic.woff\";\nexport const assetFontLatoWoff2SemiboldItalic = \"Lato-SemiboldItalic.woff2\";\nexport const assetFontLatoWoffThin = \"Lato-Thin.woff\";\nexport const assetFontLatoWoff2Thin = \"Lato-Thin.woff2\";\nexport const assetFontLatoWoffThinItalic = \"Lato-ThinItalic.woff\";\nexport const assetFontLatoWoff2ThinItalic = \"Lato-ThinItalic.woff2\";\nexport const assetFontAzeretMonoName = \"Azeret Mono\";\nexport const assetFontAzeretMonoWoff2Regular = \"AzeretMono-Regular.woff2\";\nexport const assetFontSs3vName = \"Source Sans 3\";\nexport const assetFontSs3vWoff = \"SourceSans3VF-Upright.ttf.woff\";\nexport const assetFontSs3vWoff2 = \"SourceSans3VF-Upright.ttf.woff2\";\nexport const colorBaseWhite = \"#ffffff\";\nexport const colorBaseBlack = \"#000000\";\nexport const colorBaseNeutral100 = \"#f2f4f7\";\nexport const colorBaseNeutral200 = \"#ebecf0\";\nexport const colorBaseNeutral300 = \"#d7dbe0\";\nexport const colorBaseNeutral400 = \"#697687\";\nexport const colorBaseNeutral500 = \"#515c6c\";\nexport const colorBaseNeutral600 = \"#394251\";\nexport const colorBaseNeutral700 = \"#1b1f26\";\nexport const colorBaseNeutralInverted400 = \"#697687\";\nexport const colorBaseBrand100 = \"#c9e5e8\";\nexport const colorBaseBrand200 = \"#2db3c3\";\nexport const colorBaseBrand300 = \"#29a3b1\";\nexport const colorBaseBrand400 = \"#008194\";\nexport const colorBaseBrand500 = \"#017384\";\nexport const colorBaseBrand600 = \"#026371\";\nexport const colorBaseBrand700 = \"#175b63\";\nexport const colorBaseBrandInverted400 = \"#93b4f2\";\nexport const colorBaseBrandInverted500 = \"#93b4f2\";\nexport const colorBaseBrandInverted600 = \"#93b4f2\";\nexport const colorBaseBlue100 = \"#b3d5f8\";\nexport const colorBaseBlue200 = \"#80b9f3\";\nexport const colorBaseBlue300 = \"#2688ea\";\nexport const colorBaseBlue400 = \"#0073e6\";\nexport const colorBaseBlue500 = \"#006be3\";\nexport const colorBaseBlue600 = \"#0060df\";\nexport const colorBaseBlue700 = \"#0043d5\";\nexport const colorBaseGreen100 = \"#d4ede4\";\nexport const colorBaseGreen200 = \"#00bb7d\";\nexport const colorBaseGreen300 = \"#00aa71\";\nexport const colorBaseGreen400 = \"#008458\";\nexport const colorBaseGreen500 = \"#00754e\";\nexport const colorBaseGreen600 = \"#006946\";\nexport const colorBaseGreen700 = \"#005f40\";\nexport const colorBaseOrange100 = \"#ffdea8\";\nexport const colorBaseOrange200 = \"#ffd694\";\nexport const colorBaseOrange300 = \"#ffce80\";\nexport const colorBaseOrange400 = \"#ebb663\";\nexport const colorBaseOrange500 = \"#d6a75a\";\nexport const colorBaseOrange600 = \"#b0853e\";\nexport const colorBaseOrange700 = \"#9f6100\";\nexport const colorBaseRed100 = \"#fbc7bb\";\nexport const colorBaseRed200 = \"#f68368\";\nexport const colorBaseRed300 = \"#f46a49\";\nexport const colorBaseRed400 = \"#d9340d\";\nexport const colorBaseRed500 = \"#c22e0b\";\nexport const colorBaseRed600 = \"#ae2a0a\";\nexport const colorBaseRed700 = \"#9e2609\";\nexport const colorThemePrimaryBg = \"#008194\";\nexport const colorThemePrimaryBgHover = \"#017384\";\nexport const colorThemePrimaryBgActive = \"#026371\";\nexport const colorThemePrimaryFill = \"#ffffff\";\nexport const colorThemePrimaryFillHover = \"#ffffff\";\nexport const colorThemePrimaryFillActive = \"#ffffff\";\nexport const colorThemePrimaryText = \"#008194\";\nexport const colorThemePrimaryTextHover = \"#017384\";\nexport const colorThemePrimaryTextActive = \"#026371\";\nexport const colorThemePrimaryInvertedBg = \"#93b4f2\";\nexport const colorThemePrimaryInvertedBgHover = \"#93b4f2\";\nexport const colorThemePrimaryInvertedBgActive = \"#93b4f2\";\nexport const colorThemePrimaryInvertedFill = \"#000000\";\nexport const colorThemePrimaryInvertedFillHover = \"#000000\";\nexport const colorThemePrimaryInvertedFillActive = \"#000000\";\nexport const colorThemePrimaryInvertedText = \"#93b4f2\";\nexport const colorThemePrimaryInvertedTextHover = \"#93b4f2\";\nexport const colorThemePrimaryInvertedTextActive = \"#93b4f2\";\nexport const colorThemeSecondaryBg = \"#697687\";\nexport const colorThemeSecondaryBgHover = \"#697687\";\nexport const colorThemeSecondaryBgActive = \"#697687\";\nexport const colorThemeSecondaryFill = \"#ffffff\";\nexport const colorThemeSecondaryFillHover = \"#ffffff\";\nexport const colorThemeSecondaryFillActive = \"#ffffff\";\nexport const colorThemeSecondaryText = \"#000000\";\nexport const colorThemeSecondaryTextHover = \"#000000\";\nexport const colorThemeSecondaryTextActive = \"#000000\";\nexport const colorThemeSecondaryInvertedBg = \"#697687\";\nexport const colorThemeSecondaryInvertedBgHover = \"#697687\";\nexport const colorThemeSecondaryInvertedBgActive = \"#697687\";\nexport const colorThemeSecondaryInvertedFill = \"#000000\";\nexport const colorThemeSecondaryInvertedFillHover = \"#000000\";\nexport const colorThemeSecondaryInvertedFillActive = \"#000000\";\nexport const colorThemeSecondaryInvertedText = \"#ffffff\";\nexport const colorThemeSecondaryInvertedTextHover = \"#ffffff\";\nexport const colorThemeSecondaryInvertedTextActive = \"#ffffff\";\nexport const colorThemeInfoBg = \"#0073e6\";\nexport const colorThemeInfoBgHover = \"#006be3\";\nexport const colorThemeInfoBgActive = \"#0060df\";\nexport const colorThemeInfoFill = \"#ffffff\";\nexport const colorThemeInfoFillHover = \"#ffffff\";\nexport const colorThemeInfoFillActive = \"#ffffff\";\nexport const colorThemeInfoText = \"#0073e6\";\nexport const colorThemeInfoTextHover = \"#006be3\";\nexport const colorThemeInfoTextActive = \"#0060df\";\nexport const colorThemeSuccessBg = \"#008458\";\nexport const colorThemeSuccessBgHover = \"#00754e\";\nexport const colorThemeSuccessBgActive = \"#006946\";\nexport const colorThemeSuccessFill = \"#ffffff\";\nexport const colorThemeSuccessFillHover = \"#ffffff\";\nexport const colorThemeSuccessFillActive = \"#ffffff\";\nexport const colorThemeSuccessText = \"#008458\";\nexport const colorThemeSuccessTextHover = \"#00754e\";\nexport const colorThemeSuccessTextActive = \"#006946\";\nexport const colorThemeWarningBg = \"#ffce80\";\nexport const colorThemeWarningBgHover = \"#ffd694\";\nexport const colorThemeWarningBgActive = \"#ffdea8\";\nexport const colorThemeWarningFill = \"#000000\";\nexport const colorThemeWarningFillHover = \"#000000\";\nexport const colorThemeWarningFillActive = \"#000000\";\nexport const colorThemeWarningText = \"#9f6100\";\nexport const colorThemeWarningTextHover = \"#9f6100\";\nexport const colorThemeWarningTextActive = \"#9f6100\";\nexport const colorThemeDangerBg = \"#d9340d\";\nexport const colorThemeDangerBgHover = \"#c22e0b\";\nexport const colorThemeDangerBgActive = \"#ae2a0a\";\nexport const colorThemeDangerFill = \"#ffffff\";\nexport const colorThemeDangerFillHover = \"#ffffff\";\nexport const colorThemeDangerFillActive = \"#ffffff\";\nexport const colorThemeDangerText = \"#d9340d\";\nexport const colorThemeDangerTextHover = \"#c22e0b\";\nexport const colorThemeDangerTextActive = \"#ae2a0a\";\nexport const colorUiBackgroundCanvas = \"#f2f4f7\";\nexport const colorUiBackgroundSurface = \"#ffffff\";\nexport const colorUiBackgroundSurfaceInverted = \"#1b1f26\";\nexport const colorUiBackgroundMuted = \"#f2f4f7\";\nexport const colorUiBackgroundInput = \"#ffffff\";\nexport const colorUiBackgroundInputAutofill = \"#e8f0fe\";\nexport const colorUiBackgroundSkeleton = \"#ebecf0\";\nexport const colorUiBackgroundSkeletonHighlight = \"#d7dbe0\";\nexport const colorUiBackgroundTooltip = \"#000000\";\nexport const colorUiBackgroundBackdrop = \"#1b1f26\";\nexport const colorUiBorderLight = \"#f2f4f7\";\nexport const colorUiBorderDefault = \"#ebecf0\";\nexport const colorUiBorderDark = \"#d7dbe0\";\nexport const colorUiBorderFocus = \"#0071ff\";\nexport const colorUiBorderQuote = \"#697687\";\nexport const colorUiFontBase = \"#000000\";\nexport const colorUiFontBaseInverted = \"#ffffff\";\nexport const colorUiFontMuted = \"#515c6c\";\nexport const colorUiFontQuote = \"#515c6c\";\nexport const colorUiFontTooltip = \"#ffffff\";\nexport const fontFamilyBase = \"Lato\";\nexport const fontFamilyMono = \"''\";\nexport const fontFamilyEmoji = \"''\";\nexport const fontWeightHead = 600;\nexport const fontWeightBody = 400;\nexport const fontWeightMono = 400;\nexport const fontDecorationLink = \"none\";\nexport const fontDecorationLinkHover = \"underline\";\nexport const fontDecorationLinkButton = \"none\";\nexport const fontDecorationLinkButtonHover = \"none\";\nexport const opacityDisabled = 0.65;\nexport const opacityBackdrop = 0.4;\nexport const opacityTooltip = 1;\nexport const sizeBorderRadiusL = 0.5;\nexport const sizeBorderRadiusM = 0.25;\nexport const sizeBorderRadiusS = 0.125;\nexport const sizeFontHead1 = 1.75;\nexport const sizeFontHead2 = 1.5;\nexport const sizeFontHead3 = 1.25;\nexport const sizeFontHead4 = 1.125;\nexport const sizeFontHead5 = 0.9375;\nexport const sizeFontHead6 = 0.875;\nexport const sizeFontBodyXl = 1.25;\nexport const sizeFontBodyL = 1.125;\nexport const sizeFontBodyM = 0.9375;\nexport const sizeFontBodyS = 0.875;\nexport const sizeFontBodyXs = 0.75;\nexport const sizeFontMonoXl = 1.125;\nexport const sizeFontMonoL = 0.9375;\nexport const sizeFontMonoM = 0.875;\nexport const sizeFontMonoS = 0.75;\nexport const sizeFontMonoXs = 0.625;\nexport const sizeLineHead1 = 2;\nexport const sizeLineHead2 = 1.75;\nexport const sizeLineHead3 = 1.5;\nexport const sizeLineHead4 = 1.5;\nexport const sizeLineHead5 = 1.25;\nexport const sizeLineHead6 = 1;\nexport const sizeLineBodyXl = 1.5;\nexport const sizeLineBodyL = 1.5;\nexport const sizeLineBodyM = 1.25;\nexport const sizeLineBodyS = 1.125;\nexport const sizeLineBodyXs = 1;\nexport const sizeLineMonoXl = 1.5;\nexport const sizeLineMonoL = 1.25;\nexport const sizeLineMonoM = 1.125;\nexport const sizeLineMonoS = 1;\nexport const sizeLineMonoXs = 0.875;\nexport const sizeModalS = 400;\nexport const sizeModalM = 600;\nexport const sizeModalL = 800;\nexport const sizeScreenXs = 540;\nexport const sizeScreenS = 768;\nexport const sizeScreenM = 992;\nexport const sizeScreenL = 1200;\nexport const sizeScreenXl = 1400;\nexport const sizeSpacingXl = 2;\nexport const sizeSpacingL = 1.5;\nexport const sizeSpacingM = 1;\nexport const sizeSpacingS = 0.5;\nexport const sizeSpacingXs = 0.25;\nexport const timeTransitionL = 500;\nexport const timeTransitionM = 250;\nexport const timeTransitionS = 125;\nexport const timeDelayL = 500;\nexport const timeDelayM = 250;\nexport const timeDelayS = 125;\nexport const timeDurationL = 1000;\nexport const timeDurationM = 500;\nexport const timeDurationS = 250;\nexport const zIndexBase = 1000;\nexport const zIndexDropdown = 100;\nexport const zIndexTooltip = 200;\n","/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, , and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled \n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first among the children of the disabled \n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent is not nested in another disabled ,\n // return whether `node` is a descendant of its first \n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled containing `node` has no \n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","/*!\n* focus-trap 7.5.4\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nimport { isFocusable, tabbable, focusable, isTabbable, getTabIndex } from 'tabbable';\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar activeFocusTraps = {\n activateTrap: function activateTrap(trapStack, trap) {\n if (trapStack.length > 0) {\n var activeTrap = trapStack[trapStack.length - 1];\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex === -1) {\n trapStack.push(trap);\n } else {\n // move this existing trap to the front of the queue\n trapStack.splice(trapIndex, 1);\n trapStack.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trapStack, trap) {\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex !== -1) {\n trapStack.splice(trapIndex, 1);\n }\n if (trapStack.length > 0) {\n trapStack[trapStack.length - 1].unpause();\n }\n }\n};\nvar isSelectableInput = function isSelectableInput(node) {\n return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';\n};\nvar isEscapeEvent = function isEscapeEvent(e) {\n return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;\n};\nvar isTabEvent = function isTabEvent(e) {\n return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;\n};\n\n// checks for TAB by default\nvar isKeyForward = function isKeyForward(e) {\n return isTabEvent(e) && !e.shiftKey;\n};\n\n// checks for SHIFT+TAB by default\nvar isKeyBackward = function isKeyBackward(e) {\n return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay(fn) {\n return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n// of Array.findIndex() for our needs\nvar findIndex = function findIndex(arr, fn) {\n var idx = -1;\n arr.every(function (value, i) {\n if (fn(value)) {\n idx = i;\n return false; // break\n }\n\n return true; // next\n });\n\n return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n * the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nvar valueOrHandler = function valueOrHandler(value) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n return typeof value === 'function' ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget(event) {\n // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n // shadow host. However, event.target.composedPath() will be an array of\n // nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n // outer-most (the host HTML document). If we have access to composedPath(),\n // then use its first element; otherwise, fall back to event.target (and\n // this only works for an _open_ shadow DOM; otherwise,\n // composedPath()[0] === event.target always).\n return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;\n};\n\n// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this\n// current instance use the same stack if `userOptions.trapStack` isn't specified\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap(elements, userOptions) {\n // SSR: a live trap shouldn't be created in this type of environment so this\n // should be safe code to execute if the `document` option isn't specified\n var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true,\n isKeyForward: isKeyForward,\n isKeyBackward: isKeyBackward\n }, userOptions);\n var state = {\n // containers given to createFocusTrap()\n // @type {Array}\n containers: [],\n // list of objects identifying tabbable nodes in `containers` in the trap\n // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n // is active, but the trap should never get to a state where there isn't at least one group\n // with at least one tabbable node in it (that would lead to an error condition that would\n // result in an error being thrown)\n // @type {Array<{\n // container: HTMLElement,\n // tabbableNodes: Array, // empty if none\n // focusableNodes: Array, // empty if none\n // posTabIndexesFound: boolean,\n // firstTabbableNode: HTMLElement|undefined,\n // lastTabbableNode: HTMLElement|undefined,\n // firstDomTabbableNode: HTMLElement|undefined,\n // lastDomTabbableNode: HTMLElement|undefined,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\n\n // references to objects in `containerGroups`, but only those that actually have\n // tabbable nodes in them\n // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n // the same length\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: undefined,\n // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n recentNavEvent: undefined\n };\n var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n /**\n * Gets a configuration option value.\n * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n * value will be taken from this object. Otherwise, value will be taken from base configuration.\n * @param {string} optionName Name of the option whose value is sought.\n * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n */\n var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n\n /**\n * Finds the index of the container that contains the element.\n * @param {HTMLElement} element\n * @param {Event} [event] If available, and `element` isn't directly found in any container,\n * the event's composed path is used to see if includes any known trap containers in the\n * case where the element is inside a Shadow DOM.\n * @returns {number} Index of the container in either `state.containers` or\n * `state.containerGroups` (the order/length of these lists are the same); -1\n * if the element isn't found.\n */\n var findContainerIndex = function findContainerIndex(element, event) {\n var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;\n // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n // and we still need to find the element in there\n return state.containerGroups.findIndex(function (_ref) {\n var container = _ref.container,\n tabbableNodes = _ref.tabbableNodes;\n return container.contains(element) || ( // fall back to explicit tabbable search which will take into consideration any\n // web components if the `tabbableOptions.getShadowRoot` option was used for\n // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n // look inside web components even if open)\n composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {\n return node === element;\n });\n });\n };\n\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @returns {undefined | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `false` if the option\n * resolved to `false` (node explicitly not given); otherwise, the resolved\n * DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node.\n */\n var getNodeForOption = function getNodeForOption(optionName) {\n var optionValue = config[optionName];\n if (typeof optionValue === 'function') {\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n node = doc.querySelector(optionValue); // resolve to node, or null if fails\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n };\n var getInitialFocusNode = function getInitialFocusNode() {\n var node = getNodeForOption('initialFocus');\n\n // false explicitly indicates we want no initialFocus at all\n if (node === false) {\n return false;\n }\n if (node === undefined || !isFocusable(node, config.tabbableOptions)) {\n // option not specified nor focusable: use fallback options\n if (findContainerIndex(doc.activeElement) >= 0) {\n node = doc.activeElement;\n } else {\n var firstTabbableGroup = state.tabbableGroups[0];\n var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n node = firstTabbableNode || getNodeForOption('fallbackFocus');\n }\n }\n if (!node) {\n throw new Error('Your focus-trap needs to have at least one focusable element');\n }\n return node;\n };\n var updateTabbableNodes = function updateTabbableNodes() {\n state.containerGroups = state.containers.map(function (container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions);\n\n // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n // are a superset of tabbable nodes since nodes with negative `tabindex` attributes\n // are focusable but not tabbable\n var focusableNodes = focusable(container, config.tabbableOptions);\n var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;\n var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;\n var firstDomTabbableNode = focusableNodes.find(function (node) {\n return isTabbable(node);\n });\n var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {\n return isTabbable(node);\n });\n var posTabIndexesFound = !!tabbableNodes.find(function (node) {\n return getTabIndex(node) > 0;\n });\n return {\n container: container,\n tabbableNodes: tabbableNodes,\n focusableNodes: focusableNodes,\n /** True if at least one node with positive `tabindex` was found in this container. */\n posTabIndexesFound: posTabIndexesFound,\n /** First tabbable node in container, __tabindex__ order; `undefined` if none. */\n firstTabbableNode: firstTabbableNode,\n /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */\n lastTabbableNode: lastTabbableNode,\n // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // because that API doesn't work with Shadow DOM as well as it should (@see\n // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n // to address an edge case related to positive tabindex support, this seems like a much easier,\n // \"close enough most of the time\" alternative for positive tabindexes which should generally\n // be avoided anyway...\n /** First tabbable node in container, __DOM__ order; `undefined` if none. */\n firstDomTabbableNode: firstDomTabbableNode,\n /** Last tabbable node in container, __DOM__ order; `undefined` if none. */\n lastDomTabbableNode: lastDomTabbableNode,\n /**\n * Finds the __tabbable__ node that follows the given node in the specified direction,\n * in this container, if any.\n * @param {HTMLElement} node\n * @param {boolean} [forward] True if going in forward tab order; false if going\n * in reverse.\n * @returns {HTMLElement|undefined} The next tabbable node, if any.\n */\n nextTabbableNode: function nextTabbableNode(node) {\n var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var nodeIdx = tabbableNodes.indexOf(node);\n if (nodeIdx < 0) {\n // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):\n // since `node` should at least have been focusable, we assume that's the case and mimic\n // what browsers do, which is set focus to the next node in __document position order__,\n // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE\n // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to\n // basic DOM order\n if (forward) {\n return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {\n return isTabbable(el);\n });\n }\n return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {\n return isTabbable(el);\n });\n }\n return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function (group) {\n return group.tabbableNodes.length > 0;\n });\n\n // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option\n ) {\n throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');\n }\n\n // NOTE: Positive tabindexes are only properly supported in single-container traps because\n // doing it across multiple containers where tabindexes could be all over the place\n // would require Tabbable to support multiple containers, would require additional\n // specialized Shadow DOM support, and would require Tabbable's multi-container support\n // to look at those containers in document position order rather than user-provided\n // order (as they are treated in Focus-trap, for legacy reasons). See discussion on\n // https://github.com/focus-trap/focus-trap/issues/375 for more details.\n if (state.containerGroups.find(function (g) {\n return g.posTabIndexesFound;\n }) && state.containerGroups.length > 1) {\n throw new Error(\"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\");\n }\n };\n\n /**\n * Gets the current activeElement. If it's a web-component and has open shadow-root\n * it will recursively search inside shadow roots for the \"true\" activeElement.\n *\n * @param {Document | ShadowRoot} el\n *\n * @returns {HTMLElement} The element that currently has the focus\n **/\n var getActiveElement = function getActiveElement(el) {\n var activeElement = el.activeElement;\n if (!activeElement) {\n return;\n }\n if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {\n return getActiveElement(activeElement.shadowRoot);\n }\n return activeElement;\n };\n var tryFocus = function tryFocus(node) {\n if (node === false) {\n return;\n }\n if (node === getActiveElement(document)) {\n return;\n }\n if (!node || !node.focus) {\n tryFocus(getInitialFocusNode());\n return;\n }\n node.focus({\n preventScroll: !!config.preventScroll\n });\n // NOTE: focus() API does not trigger focusIn event so set MRU node manually\n state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {\n var node = getNodeForOption('setReturnFocus', previousActiveElement);\n return node ? node : node === false ? false : previousActiveElement;\n };\n\n /**\n * Finds the next node (in either direction) where focus should move according to a\n * keyboard focus-in event.\n * @param {Object} params\n * @param {Node} [params.target] Known target __from which__ to navigate, if any.\n * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event\n * will be used to determine the `target`). Ignored if `target` is specified.\n * @param {boolean} [params.isBackward] True if focus should move backward.\n * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be\n * determined given the current state of the trap.\n */\n var findNextNavNode = function findNextNavNode(_ref2) {\n var target = _ref2.target,\n event = _ref2.event,\n _ref2$isBackward = _ref2.isBackward,\n isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;\n target = target || getActualTarget(event);\n updateTabbableNodes();\n var destinationNode = null;\n if (state.tabbableGroups.length > 0) {\n // make sure the target is actually contained in a group\n // NOTE: the target may also be the container itself if it's focusable\n // with tabIndex='-1' and was given initial focus\n var containerIndex = findContainerIndex(target, event);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n if (containerIndex < 0) {\n // target not found in any group: quite possible focus has escaped the trap,\n // so bring it back into...\n if (isBackward) {\n // ...the last node in the last group\n destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n // ...the first node in the first group\n destinationNode = state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (isBackward) {\n // REVERSE\n\n // is the target the first tabbable node in a group?\n var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {\n var firstTabbableNode = _ref3.firstTabbableNode;\n return target === firstTabbableNode;\n });\n if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n // an exception case where the target is either the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle shift+tab as if focus were on the container's\n // first tabbable node, and go to the last tabbable node of the LAST group\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n // YES: then shift+tab should go to the last tabbable node in the\n // previous group (and wrap around to the last tabbable node of\n // the LAST group if it's the first tabbable node of the FIRST group)\n var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target, false);\n }\n } else {\n // FORWARD\n\n // is the target the last tabbable node in a group?\n var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {\n var lastTabbableNode = _ref4.lastTabbableNode;\n return target === lastTabbableNode;\n });\n if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n // an exception case where the target is the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle tab as if focus were on the container's\n // last tabbable node, and go to the first tabbable node of the FIRST group\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n // YES: then tab should go to the first tabbable node in the next\n // group (and wrap around to the first tabbable node of the FIRST\n // group if it's the last tabbable node of the LAST group)\n var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target);\n }\n }\n } else {\n // no groups available\n // NOTE: the fallbackFocus option does not support returning false to opt-out\n destinationNode = getNodeForOption('fallbackFocus');\n }\n return destinationNode;\n };\n\n // This needs to be done on mousedown and touchstart instead of click\n // so that it precedes the focus event.\n var checkPointerDown = function checkPointerDown(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n // allow the click since it ocurred inside the trap\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n // immediately deactivate the trap\n trap.deactivate({\n // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n // which will result in the outside click setting focus to the node\n // that was clicked (and if not focusable, to \"nothing\"); by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node), whether the\n // outside click was on a focusable node or not\n returnFocus: config.returnFocusOnDeactivate\n });\n return;\n }\n\n // This is needed for mobile devices.\n // (If we'll only let `click` events through,\n // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n if (valueOrHandler(config.allowOutsideClick, e)) {\n // allow the click outside the trap to take place\n return;\n }\n\n // otherwise, prevent the click\n e.preventDefault();\n };\n\n // In case focus escapes the trap for some strange reason, pull it back in.\n // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected\n // scrolling if the node that got focused was out of view; there's nothing we can do to\n // prevent that from happening by the time we discover that focus escaped\n var checkFocusIn = function checkFocusIn(event) {\n var target = getActualTarget(event);\n var targetContained = findContainerIndex(target, event) >= 0;\n\n // In Firefox when you Tab out of an iframe the Document is briefly focused.\n if (targetContained || target instanceof Document) {\n if (targetContained) {\n state.mostRecentlyFocusedNode = target;\n }\n } else {\n // escaped! pull it back in to where it just left\n event.stopImmediatePropagation();\n\n // focus will escape if the MRU node had a positive tab index and user tried to nav forward;\n // it will also escape if the MRU node had a 0 tab index and user tried to nav backward\n // toward a node with a positive tab index\n var nextNode; // next node to focus, if we find one\n var navAcrossContainers = true;\n if (state.mostRecentlyFocusedNode) {\n if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...\n var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);\n // there MAY not be any tabbable nodes in the container if there are at least 2 containers\n // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container\n // with at least one tabbable node in order to function, so this could be the other container\n // with nothing tabbable in it)\n var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;\n if (tabbableNodes.length > 0) {\n // MRU tab index MAY not be found if the MRU node is focusable but not tabbable\n var mruTabIdx = tabbableNodes.findIndex(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n if (mruTabIdx >= 0) {\n if (config.isKeyForward(state.recentNavEvent)) {\n if (mruTabIdx + 1 < tabbableNodes.length) {\n nextNode = tabbableNodes[mruTabIdx + 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n } else {\n if (mruTabIdx - 1 >= 0) {\n nextNode = tabbableNodes[mruTabIdx - 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n }\n // else, don't find in container order without considering direction too\n }\n }\n // else, no tabbable nodes in that container (which means we must have at least one other\n // container with at least one tabbable node in it, otherwise focus-trap would've thrown\n // an error the last time updateTabbableNodes() was run): find next node among all known\n // containers\n } else {\n // check to see if there's at least one tabbable node with a positive tab index inside\n // the trap because focus seems to escape when navigating backward from a tabbable node\n // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with\n // the greatest positive tab index like it should)\n if (!state.containerGroups.some(function (g) {\n return g.tabbableNodes.some(function (n) {\n return getTabIndex(n) > 0;\n });\n })) {\n // no containers with tabbable nodes with positive tab indexes which means the focus\n // escaped for some other reason and we should just execute the fallback to the\n // MRU node or initial focus node, if any\n navAcrossContainers = false;\n }\n }\n } else {\n // no MRU node means we're likely in some initial condition when the trap has just\n // been activated and initial focus hasn't been given yet, in which case we should\n // fall through to trying to focus the initial focus node, which is what should\n // happen below at this point in the logic\n navAcrossContainers = false;\n }\n if (navAcrossContainers) {\n nextNode = findNextNavNode({\n // move FROM the MRU node, not event-related node (which will be the node that is\n // outside the trap causing the focus escape we're trying to fix)\n target: state.mostRecentlyFocusedNode,\n isBackward: config.isKeyBackward(state.recentNavEvent)\n });\n }\n if (nextNode) {\n tryFocus(nextNode);\n } else {\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n }\n state.recentNavEvent = undefined; // clear\n };\n\n // Hijack key nav events on the first and last focusable nodes of the trap,\n // in order to prevent focus from escaping. If it escapes for even a\n // moment it can end up scrolling the page and causing confusion so we\n // kind of need to capture the action at the keydown phase.\n var checkKeyNav = function checkKeyNav(event) {\n var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n state.recentNavEvent = event;\n var destinationNode = findNextNavNode({\n event: event,\n isBackward: isBackward\n });\n if (destinationNode) {\n if (isTabEvent(event)) {\n // since tab natively moves focus, we wouldn't have a destination node unless we\n // were on the edge of a container and had to move to the next/previous edge, in\n // which case we want to prevent default to keep the browser from moving focus\n // to where it normally would\n event.preventDefault();\n }\n tryFocus(destinationNode);\n }\n // else, let the browser take care of [shift+]tab and move the focus\n };\n\n var checkKey = function checkKey(event) {\n if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n event.preventDefault();\n trap.deactivate();\n return;\n }\n if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n checkKeyNav(event, config.isKeyBackward(event));\n }\n };\n var checkClick = function checkClick(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n\n //\n // EVENT LISTENERS\n //\n\n var addListeners = function addListeners() {\n if (!state.active) {\n return;\n }\n\n // There can be only one listening focus trap at a time\n activeFocusTraps.activateTrap(trapStack, trap);\n\n // Delay ensures that the focused element doesn't capture the event\n // that caused the focus trap activation.\n state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {\n tryFocus(getInitialFocusNode());\n }) : tryFocus(getInitialFocusNode());\n doc.addEventListener('focusin', checkFocusIn, true);\n doc.addEventListener('mousedown', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('touchstart', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('click', checkClick, {\n capture: true,\n passive: false\n });\n doc.addEventListener('keydown', checkKey, {\n capture: true,\n passive: false\n });\n return trap;\n };\n var removeListeners = function removeListeners() {\n if (!state.active) {\n return;\n }\n doc.removeEventListener('focusin', checkFocusIn, true);\n doc.removeEventListener('mousedown', checkPointerDown, true);\n doc.removeEventListener('touchstart', checkPointerDown, true);\n doc.removeEventListener('click', checkClick, true);\n doc.removeEventListener('keydown', checkKey, true);\n return trap;\n };\n\n //\n // MUTATION OBSERVER\n //\n\n var checkDomRemoval = function checkDomRemoval(mutations) {\n var isFocusedNodeRemoved = mutations.some(function (mutation) {\n var removedNodes = Array.from(mutation.removedNodes);\n return removedNodes.some(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n });\n\n // If the currently focused is removed then browsers will move focus to the\n // element. If this happens, try to move focus back into the trap.\n if (isFocusedNodeRemoved) {\n tryFocus(getInitialFocusNode());\n }\n };\n\n // Use MutationObserver - if supported - to detect if focused node is removed\n // from the DOM.\n var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;\n var updateObservedNodes = function updateObservedNodes() {\n if (!mutationObserver) {\n return;\n }\n mutationObserver.disconnect();\n if (state.active && !state.paused) {\n state.containers.map(function (container) {\n mutationObserver.observe(container, {\n subtree: true,\n childList: true\n });\n });\n }\n };\n\n //\n // TRAP DEFINITION\n //\n\n trap = {\n get active() {\n return state.active;\n },\n get paused() {\n return state.paused;\n },\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n var onActivate = getOption(activateOptions, 'onActivate');\n var onPostActivate = getOption(activateOptions, 'onPostActivate');\n var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n onActivate === null || onActivate === void 0 || onActivate();\n var finishActivation = function finishActivation() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n addListeners();\n updateObservedNodes();\n onPostActivate === null || onPostActivate === void 0 || onPostActivate();\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n state.delayInitialFocusTimer = undefined;\n removeListeners();\n state.active = false;\n state.paused = false;\n updateObservedNodes();\n activeFocusTraps.deactivateTrap(trapStack, trap);\n var onDeactivate = getOption(options, 'onDeactivate');\n var onPostDeactivate = getOption(options, 'onPostDeactivate');\n var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');\n onDeactivate === null || onDeactivate === void 0 || onDeactivate();\n var finishDeactivation = function finishDeactivation() {\n delay(function () {\n if (returnFocus) {\n tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n },\n pause: function pause(pauseOptions) {\n if (state.paused || !state.active) {\n return this;\n }\n var onPause = getOption(pauseOptions, 'onPause');\n var onPostPause = getOption(pauseOptions, 'onPostPause');\n state.paused = true;\n onPause === null || onPause === void 0 || onPause();\n removeListeners();\n updateObservedNodes();\n onPostPause === null || onPostPause === void 0 || onPostPause();\n return this;\n },\n unpause: function unpause(unpauseOptions) {\n if (!state.paused || !state.active) {\n return this;\n }\n var onUnpause = getOption(unpauseOptions, 'onUnpause');\n var onPostUnpause = getOption(unpauseOptions, 'onPostUnpause');\n state.paused = false;\n onUnpause === null || onUnpause === void 0 || onUnpause();\n updateTabbableNodes();\n addListeners();\n updateObservedNodes();\n onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();\n return this;\n },\n updateContainerElements: function updateContainerElements(containerElements) {\n var elementsAsArray = [].concat(containerElements).filter(Boolean);\n state.containers = elementsAsArray.map(function (element) {\n return typeof element === 'string' ? doc.querySelector(element) : element;\n });\n if (state.active) {\n updateTabbableNodes();\n }\n updateObservedNodes();\n return this;\n }\n };\n\n // initialize container elements\n trap.updateContainerElements(elements);\n return trap;\n};\n\nexport { createFocusTrap };\n//# sourceMappingURL=focus-trap.esm.js.map\n","import { FocusableElement, tabbable } from 'tabbable';\n\ntype Container = Element | FocusableElement | null;\n\nconst firstTabbable = (container?: Container): FocusableElement | undefined => {\n return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();\n};\n\nexport default firstTabbable;\n","@import 'variables';\n@import 'mixins';\n\n$-min-width: 8rem;\n$-max-width: 16rem;\n$-min-height: 2rem;\n$-max-height: calc(100vh - 48px);\n\n:host {\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(nav) {\n padding: 0.25rem;\n min-width: $-min-width;\n max-width: $-max-width;\n}\n\n.content {\n position: fixed;\n background: cat-token('color.ui.background.surface');\n -webkit-overflow-scrolling: touch;\n min-height: $-min-height;\n max-height: $-max-height;\n @include cat-elevation(4);\n border-radius: cat-border-radius('m');\n border: 1px solid cat-token('color.ui.border.default');\n z-index: cat-z-index('dropdown');\n // The 3 lines below set the initial styling (when not visible)\n display: none;\n opacity: 0;\n transform: scale(0.9);\n transition:\n transform cat-token('time.transition.s') cubic-bezier(0.3, 0, 0.8, 0.15),\n opacity cat-token('time.transition.s') cubic-bezier(0.3, 0, 0.8, 0.15);\n\n // Sets the origin point so the scaling transition matches the placement\n &[data-placement^='top'] {\n transform-origin: bottom;\n }\n\n &[data-placement^='top-start'] {\n transform-origin: bottom left;\n }\n\n &[data-placement^='top-end'] {\n transform-origin: bottom right;\n }\n\n &[data-placement^='left'] {\n transform-origin: right;\n }\n\n &[data-placement^='left-start'] {\n transform-origin: right top;\n }\n\n &[data-placement^='left-end'] {\n transform-origin: right bottom;\n }\n\n &[data-placement^='right'] {\n transform-origin: left;\n }\n\n &[data-placement^='right-start'] {\n transform-origin: left top;\n }\n\n &[data-placement^='right-end'] {\n transform-origin: left bottom;\n }\n\n &[data-placement^='bottom'] {\n transform-origin: top;\n }\n\n &[data-placement^='bottom-start'] {\n transform-origin: top left;\n }\n\n &[data-placement^='bottom-end'] {\n transform-origin: top right;\n }\n\n &.show {\n opacity: 1;\n transform: scale(1);\n transition:\n transform cat-token('time.transition.m') cubic-bezier(0.05, 0.7, 0.1, 1),\n opacity cat-token('time.transition.m') cubic-bezier(0.05, 0.7, 0.1, 1);\n }\n\n &.overflow-auto {\n overflow: auto;\n }\n}\n","import { autoUpdate, computePosition, flip, offset, Placement, size } from '@floating-ui/dom';\nimport { timeTransitionS } from '@haiilo/catalyst-tokens';\nimport { Component, Event, EventEmitter, h, Host, Listen, Method, Prop } from '@stencil/core';\nimport * as focusTrap from 'focus-trap';\nimport type { FocusableElement } from 'tabbable';\nimport firstTabbable from '../../utils/first-tabbable';\n\nlet nextUniqueId = 0;\n\n/**\n * A dropdown component to display a list of actions in a dropdown menu or to\n * show additional content on demand.\n */\n@Component({\n tag: 'cat-dropdown',\n styleUrl: 'cat-dropdown.scss',\n shadow: true\n})\nexport class CatDropdown {\n private static readonly OFFSET = 4;\n private readonly id = nextUniqueId++;\n private triggerSlot!: HTMLSlotElement;\n private trigger?: FocusableElement;\n private content!: HTMLElement;\n private trap?: focusTrap.FocusTrap;\n private isOpen: boolean | null = false;\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-start';\n\n /**\n * Do not close the dropdown on outside clicks.\n */\n @Prop() noAutoClose = false;\n\n /**\n * Do not navigate focus inside the dropdown via vertical arrow keys.\n */\n @Prop() arrowNavigation: 'horizontal' | 'vertical' | 'none' = 'vertical';\n\n /**\n * Do not change the size of the dropdown to ensure it isn’t too big to fit\n * in the viewport (or more specifically, its clipping context).\n */\n @Prop() noResize = false;\n\n /**\n * Allow overflow when dropdown is open.\n */\n @Prop() overflow = false;\n\n /**\n * No element in dropdown will receive focus when dropdown is open.\n * By default, the first element in tab order will receive a focus.\n */\n @Prop() noInitialFocus = false;\n\n /**\n * Emitted when the dropdown is opened.\n */\n @Event() catOpen!: EventEmitter;\n\n /**\n * Emitted when the dropdown is closed.\n */\n @Event() catClose!: EventEmitter;\n\n @Listen('catClick')\n clickHandler(event: CustomEvent) {\n // we need to delay the initialization of the trigger until first\n // interaction because the element might still be hidden (and thus not\n // tabbable) if contained in another Stencil web component\n if (!this.trigger) {\n this.initTrigger();\n this.toggle();\n }\n\n // hide dropdown on button clicks inside the dropdown content\n const path = event.composedPath();\n if (\n !this.noAutoClose &&\n // check if click was inside of the dropdown content\n path.includes(this.content) &&\n // check if click was not on a trigger for a sub-dropdown\n (event.target as Element)?.slot !== 'trigger' &&\n // check if click was not an element marked with data-dropdown-no-close\n !path.slice(0, path.indexOf(this.content)).find(el => this.hasAttribute(el, 'data-dropdown-no-close'))\n ) {\n this.close();\n }\n }\n\n /**\n * Toggles the dropdown.\n */\n @Method()\n async toggle(): Promise {\n this.isOpen ? this.close() : this.open();\n }\n\n /**\n * Opens the dropdown.\n */\n @Method()\n async open(): Promise {\n if (!this.trigger) {\n this.initTrigger();\n }\n\n if (this.isOpen === null || this.isOpen) {\n return; // busy or open\n }\n\n this.isOpen = null;\n this.content.style.display = 'block';\n // give CSS transition time to apply\n setTimeout(() => {\n this.isOpen = true;\n this.content.classList.add('show');\n this.trigger?.setAttribute('aria-expanded', 'true');\n this.trap = this.trap\n ? this.trap.updateContainerElements(this.content)\n : focusTrap.createFocusTrap(this.content, {\n tabbableOptions: {\n getShadowRoot: true\n },\n allowOutsideClick: true,\n clickOutsideDeactivates: event =>\n !this.noAutoClose &&\n // check if click was outside of the dropdown content\n !event.composedPath().includes(this.content) &&\n // check if click was not on an element marked with data-dropdown-no-close\n !event.composedPath().find(el => this.hasAttribute(el, 'data-dropdown-no-close')),\n onPostDeactivate: () => this.close(),\n onPostActivate: () => this.catOpen.emit(),\n setReturnFocus: elem => this.trigger || elem,\n isKeyForward: event => {\n if (\n (this.arrowNavigation === 'horizontal' && event.key === 'ArrowRight') ||\n (this.arrowNavigation === 'vertical' && event.key === 'ArrowDown')\n ) {\n event.preventDefault();\n return true;\n }\n return event.key === 'Tab';\n },\n isKeyBackward: event => {\n if (\n (this.arrowNavigation === 'horizontal' && event.key === 'ArrowLeft') ||\n (this.arrowNavigation === 'vertical' && event.key === 'ArrowUp')\n ) {\n event.preventDefault();\n return true;\n }\n return event.key === 'Tab' && event.shiftKey;\n },\n initialFocus: () => (this.noInitialFocus ? false : undefined)\n });\n this.trap.activate();\n });\n }\n\n /**\n * Closes the dropdown.\n */\n @Method()\n async close(): Promise {\n if (!this.isOpen) {\n return; // busy or closed\n }\n\n this.isOpen = null;\n this.content.classList.remove('show');\n // give CSS transition time to apply\n setTimeout(() => {\n this.isOpen = false;\n this.content.classList.remove('show');\n this.content.style.display = '';\n this.trigger?.setAttribute('aria-expanded', 'false');\n this.trap?.deactivate();\n this.catClose.emit();\n }, timeTransitionS);\n }\n\n render() {\n return (\n \n (this.triggerSlot = el as HTMLSlotElement)}>\n (this.content = el as HTMLElement)}\n >\n \n \n \n );\n }\n\n private get contentId() {\n return `cat-dropdown-${this.id}`;\n }\n\n private initTrigger() {\n this.trigger = this.findTrigger();\n this.trigger.setAttribute('aria-haspopup', 'true');\n this.trigger.setAttribute('aria-expanded', 'false');\n this.trigger.setAttribute('aria-controls', this.contentId);\n this.trigger.addEventListener('click', () => this.toggle());\n autoUpdate(this.trigger, this.content, () => this.update());\n }\n\n private findTrigger() {\n let trigger: FocusableElement | undefined;\n const elems = this.triggerSlot?.assignedElements?.() || [];\n while (!trigger && elems.length) {\n const elem = elems.shift();\n trigger = elem?.hasAttribute('data-trigger')\n ? (elem as HTMLElement)\n : elem?.querySelector('[data-trigger]') ?? undefined;\n }\n if (!trigger) {\n trigger = firstTabbable(this.triggerSlot);\n }\n if (!trigger) {\n throw new Error('Cannot find tabbable element. Use [data-trigger] to set the trigger.');\n }\n return trigger;\n }\n\n private update() {\n if (this.trigger) {\n const resize = this.noResize\n ? []\n : [\n size({\n padding: CatDropdown.OFFSET,\n apply({ availableWidth, availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n maxHeight: `${availableHeight}px`\n });\n }\n })\n ];\n computePosition(this.trigger, this.content, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [offset(CatDropdown.OFFSET), flip(), ...resize]\n }).then(({ x, y, placement }) => {\n this.content.dataset.placement = placement;\n Object.assign(this.content.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n });\n }\n }\n\n private hasAttribute(elem: EventTarget, attr: string) {\n return elem instanceof HTMLElement && elem.hasAttribute(attr);\n }\n}\n",":host {\n display: block;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\ntype HTMLCatFormFieldElement =\n | HTMLCatInputElement\n | HTMLCatTextareaElement\n | HTMLCatSelectElement\n | HTMLCatDatepickerElement;\n\n/**\n * A form group component to group form fields and labels.\n */\n@Component({\n tag: 'cat-form-group',\n styleUrl: 'cat-form-group.scss',\n shadow: true\n})\nexport class CatFormGroup {\n private formElements: HTMLCatFormFieldElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Whether the labels need a marker to shown if the forms fields are required or optional.\n * By default, it is set to auto, it will display the mark depending on the number of required and optional fields: \n * - If there are more required, the optional will be marked.\n * - If there are less required, it will mark the required.\n * If a form field had \"!\", the requiredMarked of the field would not change.\n */\n @Prop() requiredMarker: 'none' | 'required' | 'optional' | 'auto' = 'auto';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * The space allocated to the input label\n */\n @Prop() labelSize?: string;\n\n @Watch('requiredMarker')\n onRequiredMarkerChanged(newRequiredMarker: 'none' | 'required' | 'optional' | 'auto') {\n const updateMarker = newRequiredMarker === 'auto' ? this.calculate(this.formElements) : newRequiredMarker;\n this.formElements.forEach(\n element => !element.requiredMarker?.endsWith('!') && (element.requiredMarker = updateMarker)\n );\n }\n\n @Watch('horizontal')\n onHorizontalChanged(newHorizontal: boolean) {\n this.formElements.forEach(element => {\n element.horizontal = newHorizontal;\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(\n this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker')\n ) as HTMLCatFormFieldElement[];\n this.onRequiredMarkerChanged(this.requiredMarker);\n this.onHorizontalChanged(this.horizontal);\n }\n\n private calculate(elements: HTMLCatFormFieldElement[]): 'optional' | 'required' {\n const optionalFields = elements.filter(value => !value.required).length;\n const requiredFields = elements.length - optionalFields;\n return requiredFields >= optionalFields ? 'optional' : 'required';\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$icon-sizes: (\n 'xl': 1.75rem,\n 'l': 1.5rem,\n 'm': 1.25rem,\n 's': 1rem,\n 'xs': 0.75rem\n);\n\n:host {\n /**\n * @prop --cat-icon-ratio: The aspect ratio of the avatar.\n */\n display: inline-flex;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\nspan {\n display: inline-flex;\n}\n\nsvg {\n fill: currentColor;\n stroke: none;\n transform-origin: center center;\n height: 1em;\n width: calc(var(--cat-icon-ratio, 1) * 1em);\n}\n\n// ----- size\n\n@mixin size($size) {\n .icon-#{$size} svg {\n font-size: map.get($icon-sizes, $size);\n }\n}\n\n@include size('xs');\n@include size('s');\n@include size('m');\n@include size('l');\n@include size('xl');\n","import { Component, h, Prop } from '@stencil/core';\nimport { catIconRegistry as icons } from './cat-icon-registry';\n\n/**\n * Icons are used to provide additional meaning or in places where text label\n * doesn't fit.\n *\n * @part icon - The span element wrapping the SVG icon.\n */\n@Component({\n tag: 'cat-icon',\n styleUrl: 'cat-icon.scss',\n shadow: true\n})\nexport class CatIcon {\n /**\n * The name of the icon.\n */\n @Prop() icon?: string;\n\n /**\n * The SVG source of the icon. This takes precenedence over the `icon` name.\n */\n @Prop() iconSrc?: string;\n\n /**\n * The size of the icon.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the icon that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n );\n }\n}\n","var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar NumeralFormatter = function (numeralDecimalMark,\n numeralIntegerScale,\n numeralDecimalScale,\n numeralThousandsGroupStyle,\n numeralPositiveOnly,\n stripLeadingZeroes,\n prefix,\n signBeforePrefix,\n tailPrefix,\n delimiter) {\n var owner = this;\n\n owner.numeralDecimalMark = numeralDecimalMark || '.';\n owner.numeralIntegerScale = numeralIntegerScale > 0 ? numeralIntegerScale : 0;\n owner.numeralDecimalScale = numeralDecimalScale >= 0 ? numeralDecimalScale : 2;\n owner.numeralThousandsGroupStyle = numeralThousandsGroupStyle || NumeralFormatter.groupStyle.thousand;\n owner.numeralPositiveOnly = !!numeralPositiveOnly;\n owner.stripLeadingZeroes = stripLeadingZeroes !== false;\n owner.prefix = (prefix || prefix === '') ? prefix : '';\n owner.signBeforePrefix = !!signBeforePrefix;\n owner.tailPrefix = !!tailPrefix;\n owner.delimiter = (delimiter || delimiter === '') ? delimiter : ',';\n owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n};\n\nNumeralFormatter.groupStyle = {\n thousand: 'thousand',\n lakh: 'lakh',\n wan: 'wan',\n none: 'none' \n};\n\nNumeralFormatter.prototype = {\n getRawValue: function (value) {\n return value.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');\n },\n\n format: function (value) {\n var owner = this, parts, partSign, partSignAndPrefix, partInteger, partDecimal = '';\n\n // strip alphabet letters\n value = value.replace(/[A-Za-z]/g, '')\n // replace the first decimal mark with reserved placeholder\n .replace(owner.numeralDecimalMark, 'M')\n\n // strip non numeric letters except minus and \"M\"\n // this is to ensure prefix has been stripped\n .replace(/[^\\dM-]/g, '')\n\n // replace the leading minus with reserved placeholder\n .replace(/^\\-/, 'N')\n\n // strip the other minus sign (if present)\n .replace(/\\-/g, '')\n\n // replace the minus sign (if present)\n .replace('N', owner.numeralPositiveOnly ? '' : '-')\n\n // replace decimal mark\n .replace('M', owner.numeralDecimalMark);\n\n // strip any leading zeros\n if (owner.stripLeadingZeroes) {\n value = value.replace(/^(-)?0+(?=\\d)/, '$1');\n }\n\n partSign = value.slice(0, 1) === '-' ? '-' : '';\n if (typeof owner.prefix != 'undefined') {\n if (owner.signBeforePrefix) {\n partSignAndPrefix = partSign + owner.prefix;\n } else {\n partSignAndPrefix = owner.prefix + partSign;\n }\n } else {\n partSignAndPrefix = partSign;\n }\n \n partInteger = value;\n\n if (value.indexOf(owner.numeralDecimalMark) >= 0) {\n parts = value.split(owner.numeralDecimalMark);\n partInteger = parts[0];\n partDecimal = owner.numeralDecimalMark + parts[1].slice(0, owner.numeralDecimalScale);\n }\n\n if(partSign === '-') {\n partInteger = partInteger.slice(1);\n }\n\n if (owner.numeralIntegerScale > 0) {\n partInteger = partInteger.slice(0, owner.numeralIntegerScale);\n }\n\n switch (owner.numeralThousandsGroupStyle) {\n case NumeralFormatter.groupStyle.lakh:\n partInteger = partInteger.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1' + owner.delimiter);\n\n break;\n\n case NumeralFormatter.groupStyle.wan:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{4})+$)/g, '$1' + owner.delimiter);\n\n break;\n\n case NumeralFormatter.groupStyle.thousand:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + owner.delimiter);\n\n break;\n }\n\n if (owner.tailPrefix) {\n return partSign + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '') + owner.prefix;\n }\n\n return partSignAndPrefix + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '');\n }\n};\n\nvar NumeralFormatter_1 = NumeralFormatter;\n\nvar DateFormatter = function (datePattern, dateMin, dateMax) {\n var owner = this;\n\n owner.date = [];\n owner.blocks = [];\n owner.datePattern = datePattern;\n owner.dateMin = dateMin\n .split('-')\n .reverse()\n .map(function(x) {\n return parseInt(x, 10);\n });\n if (owner.dateMin.length === 2) owner.dateMin.unshift(0);\n\n owner.dateMax = dateMax\n .split('-')\n .reverse()\n .map(function(x) {\n return parseInt(x, 10);\n });\n if (owner.dateMax.length === 2) owner.dateMax.unshift(0);\n \n owner.initBlocks();\n};\n\nDateFormatter.prototype = {\n initBlocks: function () {\n var owner = this;\n owner.datePattern.forEach(function (value) {\n if (value === 'Y') {\n owner.blocks.push(4);\n } else {\n owner.blocks.push(2);\n }\n });\n },\n\n getISOFormatDate: function () {\n var owner = this,\n date = owner.date;\n\n return date[2] ? (\n date[2] + '-' + owner.addLeadingZero(date[1]) + '-' + owner.addLeadingZero(date[0])\n ) : '';\n },\n\n getBlocks: function () {\n return this.blocks;\n },\n\n getValidatedDate: function (value) {\n var owner = this, result = '';\n\n value = value.replace(/[^\\d]/g, '');\n\n owner.blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n sub0 = sub.slice(0, 1),\n rest = value.slice(length);\n\n switch (owner.datePattern[index]) {\n case 'd':\n if (sub === '00') {\n sub = '01';\n } else if (parseInt(sub0, 10) > 3) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > 31) {\n sub = '31';\n }\n\n break;\n\n case 'm':\n if (sub === '00') {\n sub = '01';\n } else if (parseInt(sub0, 10) > 1) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > 12) {\n sub = '12';\n }\n\n break;\n }\n\n result += sub;\n\n // update remaining string\n value = rest;\n }\n });\n\n return this.getFixedDateString(result);\n },\n\n getFixedDateString: function (value) {\n var owner = this, datePattern = owner.datePattern, date = [],\n dayIndex = 0, monthIndex = 0, yearIndex = 0,\n dayStartIndex = 0, monthStartIndex = 0, yearStartIndex = 0,\n day, month, year, fullYearDone = false;\n\n // mm-dd || dd-mm\n if (value.length === 4 && datePattern[0].toLowerCase() !== 'y' && datePattern[1].toLowerCase() !== 'y') {\n dayStartIndex = datePattern[0] === 'd' ? 0 : 2;\n monthStartIndex = 2 - dayStartIndex;\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n\n date = this.getFixedDate(day, month, 0);\n }\n\n // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd\n if (value.length === 8) {\n datePattern.forEach(function (type, index) {\n switch (type) {\n case 'd':\n dayIndex = index;\n break;\n case 'm':\n monthIndex = index;\n break;\n default:\n yearIndex = index;\n break;\n }\n });\n\n yearStartIndex = yearIndex * 2;\n dayStartIndex = (dayIndex <= yearIndex) ? dayIndex * 2 : (dayIndex * 2 + 2);\n monthStartIndex = (monthIndex <= yearIndex) ? monthIndex * 2 : (monthIndex * 2 + 2);\n\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n date = this.getFixedDate(day, month, year);\n }\n\n // mm-yy || yy-mm\n if (value.length === 4 && (datePattern[0] === 'y' || datePattern[1] === 'y')) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 2;\n yearStartIndex = 2 - monthStartIndex;\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2;\n\n date = [0, month, year];\n }\n\n // mm-yyyy || yyyy-mm\n if (value.length === 6 && (datePattern[0] === 'Y' || datePattern[1] === 'Y')) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 4;\n yearStartIndex = 2 - 0.5 * monthStartIndex;\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n date = [0, month, year];\n }\n\n date = owner.getRangeFixedDate(date);\n owner.date = date;\n\n var result = date.length === 0 ? value : datePattern.reduce(function (previous, current) {\n switch (current) {\n case 'd':\n return previous + (date[0] === 0 ? '' : owner.addLeadingZero(date[0]));\n case 'm':\n return previous + (date[1] === 0 ? '' : owner.addLeadingZero(date[1]));\n case 'y':\n return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], false) : '');\n case 'Y':\n return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], true) : '');\n }\n }, '');\n\n return result;\n },\n\n getRangeFixedDate: function (date) {\n var owner = this,\n datePattern = owner.datePattern,\n dateMin = owner.dateMin || [],\n dateMax = owner.dateMax || [];\n\n if (!date.length || (dateMin.length < 3 && dateMax.length < 3)) return date;\n\n if (\n datePattern.find(function(x) {\n return x.toLowerCase() === 'y';\n }) &&\n date[2] === 0\n ) return date;\n\n if (dateMax.length && (dateMax[2] < date[2] || (\n dateMax[2] === date[2] && (dateMax[1] < date[1] || (\n dateMax[1] === date[1] && dateMax[0] < date[0]\n ))\n ))) return dateMax;\n\n if (dateMin.length && (dateMin[2] > date[2] || (\n dateMin[2] === date[2] && (dateMin[1] > date[1] || (\n dateMin[1] === date[1] && dateMin[0] > date[0]\n ))\n ))) return dateMin;\n\n return date;\n },\n\n getFixedDate: function (day, month, year) {\n day = Math.min(day, 31);\n month = Math.min(month, 12);\n year = parseInt((year || 0), 10);\n\n if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {\n day = Math.min(day, month === 2 ? (this.isLeapYear(year) ? 29 : 28) : 30);\n }\n\n return [day, month, year];\n },\n\n isLeapYear: function (year) {\n return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);\n },\n\n addLeadingZero: function (number) {\n return (number < 10 ? '0' : '') + number;\n },\n\n addLeadingZeroForYear: function (number, fullYearMode) {\n if (fullYearMode) {\n return (number < 10 ? '000' : (number < 100 ? '00' : (number < 1000 ? '0' : ''))) + number;\n }\n\n return (number < 10 ? '0' : '') + number;\n }\n};\n\nvar DateFormatter_1 = DateFormatter;\n\nvar TimeFormatter = function (timePattern, timeFormat) {\n var owner = this;\n\n owner.time = [];\n owner.blocks = [];\n owner.timePattern = timePattern;\n owner.timeFormat = timeFormat;\n owner.initBlocks();\n};\n\nTimeFormatter.prototype = {\n initBlocks: function () {\n var owner = this;\n owner.timePattern.forEach(function () {\n owner.blocks.push(2);\n });\n },\n\n getISOFormatTime: function () {\n var owner = this,\n time = owner.time;\n\n return time[2] ? (\n owner.addLeadingZero(time[0]) + ':' + owner.addLeadingZero(time[1]) + ':' + owner.addLeadingZero(time[2])\n ) : '';\n },\n\n getBlocks: function () {\n return this.blocks;\n },\n\n getTimeFormatOptions: function () {\n var owner = this;\n if (String(owner.timeFormat) === '12') {\n return {\n maxHourFirstDigit: 1,\n maxHours: 12,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60\n };\n }\n\n return {\n maxHourFirstDigit: 2,\n maxHours: 23,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60\n };\n },\n\n getValidatedTime: function (value) {\n var owner = this, result = '';\n\n value = value.replace(/[^\\d]/g, '');\n\n var timeFormatOptions = owner.getTimeFormatOptions();\n\n owner.blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n sub0 = sub.slice(0, 1),\n rest = value.slice(length);\n\n switch (owner.timePattern[index]) {\n\n case 'h':\n if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {\n sub = timeFormatOptions.maxHours + '';\n }\n\n break;\n\n case 'm':\n case 's':\n if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {\n sub = timeFormatOptions.maxMinutes + '';\n }\n break;\n }\n\n result += sub;\n\n // update remaining string\n value = rest;\n }\n });\n\n return this.getFixedTimeString(result);\n },\n\n getFixedTimeString: function (value) {\n var owner = this, timePattern = owner.timePattern, time = [],\n secondIndex = 0, minuteIndex = 0, hourIndex = 0,\n secondStartIndex = 0, minuteStartIndex = 0, hourStartIndex = 0,\n second, minute, hour;\n\n if (value.length === 6) {\n timePattern.forEach(function (type, index) {\n switch (type) {\n case 's':\n secondIndex = index * 2;\n break;\n case 'm':\n minuteIndex = index * 2;\n break;\n case 'h':\n hourIndex = index * 2;\n break;\n }\n });\n\n hourStartIndex = hourIndex;\n minuteStartIndex = minuteIndex;\n secondStartIndex = secondIndex;\n\n second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10);\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n time = this.getFixedTime(hour, minute, second);\n }\n\n if (value.length === 4 && owner.timePattern.indexOf('s') < 0) {\n timePattern.forEach(function (type, index) {\n switch (type) {\n case 'm':\n minuteIndex = index * 2;\n break;\n case 'h':\n hourIndex = index * 2;\n break;\n }\n });\n\n hourStartIndex = hourIndex;\n minuteStartIndex = minuteIndex;\n\n second = 0;\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n time = this.getFixedTime(hour, minute, second);\n }\n\n owner.time = time;\n\n return time.length === 0 ? value : timePattern.reduce(function (previous, current) {\n switch (current) {\n case 's':\n return previous + owner.addLeadingZero(time[2]);\n case 'm':\n return previous + owner.addLeadingZero(time[1]);\n case 'h':\n return previous + owner.addLeadingZero(time[0]);\n }\n }, '');\n },\n\n getFixedTime: function (hour, minute, second) {\n second = Math.min(parseInt(second || 0, 10), 60);\n minute = Math.min(minute, 60);\n hour = Math.min(hour, 60);\n\n return [hour, minute, second];\n },\n\n addLeadingZero: function (number) {\n return (number < 10 ? '0' : '') + number;\n }\n};\n\nvar TimeFormatter_1 = TimeFormatter;\n\nvar PhoneFormatter = function (formatter, delimiter) {\n var owner = this;\n\n owner.delimiter = (delimiter || delimiter === '') ? delimiter : ' ';\n owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n\n owner.formatter = formatter;\n};\n\nPhoneFormatter.prototype = {\n setFormatter: function (formatter) {\n this.formatter = formatter;\n },\n\n format: function (phoneNumber) {\n var owner = this;\n\n owner.formatter.clear();\n\n // only keep number and +\n phoneNumber = phoneNumber.replace(/[^\\d+]/g, '');\n\n // strip non-leading +\n phoneNumber = phoneNumber.replace(/^\\+/, 'B').replace(/\\+/g, '').replace('B', '+');\n\n // strip delimiter\n phoneNumber = phoneNumber.replace(owner.delimiterRE, '');\n\n var result = '', current, validated = false;\n\n for (var i = 0, iMax = phoneNumber.length; i < iMax; i++) {\n current = owner.formatter.inputDigit(phoneNumber.charAt(i));\n\n // has ()- or space inside\n if (/[\\s()-]/g.test(current)) {\n result = current;\n\n validated = true;\n } else {\n if (!validated) {\n result = current;\n }\n // else: over length input\n // it turns to invalid number again\n }\n }\n\n // strip ()\n // e.g. US: 7161234567 returns (716) 123-4567\n result = result.replace(/[()]/g, '');\n // replace library delimiter with user customized delimiter\n result = result.replace(/[\\s-]/g, owner.delimiter);\n\n return result;\n }\n};\n\nvar PhoneFormatter_1 = PhoneFormatter;\n\nvar CreditCardDetector = {\n blocks: {\n uatp: [4, 5, 6],\n amex: [4, 6, 5],\n diners: [4, 6, 4],\n discover: [4, 4, 4, 4],\n mastercard: [4, 4, 4, 4],\n dankort: [4, 4, 4, 4],\n instapayment: [4, 4, 4, 4],\n jcb15: [4, 6, 5],\n jcb: [4, 4, 4, 4],\n maestro: [4, 4, 4, 4],\n visa: [4, 4, 4, 4],\n mir: [4, 4, 4, 4],\n unionPay: [4, 4, 4, 4],\n general: [4, 4, 4, 4]\n },\n\n re: {\n // starts with 1; 15 digits, not starts with 1800 (jcb card)\n uatp: /^(?!1800)1\\d{0,14}/,\n\n // starts with 34/37; 15 digits\n amex: /^3[47]\\d{0,13}/,\n\n // starts with 6011/65/644-649; 16 digits\n discover: /^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}/,\n\n // starts with 300-305/309 or 36/38/39; 14 digits\n diners: /^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/,\n\n // starts with 51-55/2221–2720; 16 digits\n mastercard: /^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}/,\n\n // starts with 5019/4175/4571; 16 digits\n dankort: /^(5019|4175|4571)\\d{0,12}/,\n\n // starts with 637-639; 16 digits\n instapayment: /^63[7-9]\\d{0,13}/,\n\n // starts with 2131/1800; 15 digits\n jcb15: /^(?:2131|1800)\\d{0,11}/,\n\n // starts with 2131/1800/35; 16 digits\n jcb: /^(?:35\\d{0,2})\\d{0,12}/,\n\n // starts with 50/56-58/6304/67; 16 digits\n maestro: /^(?:5[0678]\\d{0,2}|6304|67\\d{0,2})\\d{0,12}/,\n\n // starts with 22; 16 digits\n mir: /^220[0-4]\\d{0,12}/,\n\n // starts with 4; 16 digits\n visa: /^4\\d{0,15}/,\n\n // starts with 62/81; 16 digits\n unionPay: /^(62|81)\\d{0,14}/\n },\n\n getStrictBlocks: function (block) {\n var total = block.reduce(function (prev, current) {\n return prev + current;\n }, 0);\n\n return block.concat(19 - total);\n },\n\n getInfo: function (value, strictMode) {\n var blocks = CreditCardDetector.blocks,\n re = CreditCardDetector.re;\n\n // Some credit card can have up to 19 digits number.\n // Set strictMode to true will remove the 16 max-length restrain,\n // however, I never found any website validate card number like\n // this, hence probably you don't want to enable this option.\n strictMode = !!strictMode;\n\n for (var key in re) {\n if (re[key].test(value)) {\n var matchedBlocks = blocks[key];\n return {\n type: key,\n blocks: strictMode ? this.getStrictBlocks(matchedBlocks) : matchedBlocks\n };\n }\n }\n\n return {\n type: 'unknown',\n blocks: strictMode ? this.getStrictBlocks(blocks.general) : blocks.general\n };\n }\n};\n\nvar CreditCardDetector_1 = CreditCardDetector;\n\nvar Util = {\n noop: function () {\n },\n\n strip: function (value, re) {\n return value.replace(re, '');\n },\n\n getPostDelimiter: function (value, delimiter, delimiters) {\n // single delimiter\n if (delimiters.length === 0) {\n return value.slice(-delimiter.length) === delimiter ? delimiter : '';\n }\n\n // multiple delimiters\n var matchedDelimiter = '';\n delimiters.forEach(function (current) {\n if (value.slice(-current.length) === current) {\n matchedDelimiter = current;\n }\n });\n\n return matchedDelimiter;\n },\n\n getDelimiterREByDelimiter: function (delimiter) {\n return new RegExp(delimiter.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1'), 'g');\n },\n\n getNextCursorPosition: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n // If cursor was at the end of value, just place it back.\n // Because new value could contain additional chars.\n if (oldValue.length === prevPos) {\n return newValue.length;\n }\n\n return prevPos + this.getPositionOffset(prevPos, oldValue, newValue, delimiter ,delimiters);\n },\n\n getPositionOffset: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n var oldRawValue, newRawValue, lengthOffset;\n\n oldRawValue = this.stripDelimiters(oldValue.slice(0, prevPos), delimiter, delimiters);\n newRawValue = this.stripDelimiters(newValue.slice(0, prevPos), delimiter, delimiters);\n lengthOffset = oldRawValue.length - newRawValue.length;\n\n return (lengthOffset !== 0) ? (lengthOffset / Math.abs(lengthOffset)) : 0;\n },\n\n stripDelimiters: function (value, delimiter, delimiters) {\n var owner = this;\n\n // single delimiter\n if (delimiters.length === 0) {\n var delimiterRE = delimiter ? owner.getDelimiterREByDelimiter(delimiter) : '';\n\n return value.replace(delimiterRE, '');\n }\n\n // multiple delimiters\n delimiters.forEach(function (current) {\n current.split('').forEach(function (letter) {\n value = value.replace(owner.getDelimiterREByDelimiter(letter), '');\n });\n });\n\n return value;\n },\n\n headStr: function (str, length) {\n return str.slice(0, length);\n },\n\n getMaxLength: function (blocks) {\n return blocks.reduce(function (previous, current) {\n return previous + current;\n }, 0);\n },\n\n // strip prefix\n // Before type | After type | Return value\n // PEFIX-... | PEFIX-... | ''\n // PREFIX-123 | PEFIX-123 | 123\n // PREFIX-123 | PREFIX-23 | 23\n // PREFIX-123 | PREFIX-1234 | 1234\n getPrefixStrippedValue: function (value, prefix, prefixLength, prevResult, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix) {\n // No prefix\n if (prefixLength === 0) {\n return value;\n }\n\n // Value is prefix\n if (value === prefix && value !== '') {\n return '';\n }\n\n if (signBeforePrefix && (value.slice(0, 1) == '-')) {\n var prev = (prevResult.slice(0, 1) == '-') ? prevResult.slice(1) : prevResult;\n return '-' + this.getPrefixStrippedValue(value.slice(1), prefix, prefixLength, prev, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix);\n }\n\n // Pre result prefix string does not match pre-defined prefix\n if (prevResult.slice(0, prefixLength) !== prefix && !tailPrefix) {\n // Check if the first time user entered something\n if (noImmediatePrefix && !prevResult && value) return value;\n return '';\n } else if (prevResult.slice(-prefixLength) !== prefix && tailPrefix) {\n // Check if the first time user entered something\n if (noImmediatePrefix && !prevResult && value) return value;\n return '';\n }\n\n var prevValue = this.stripDelimiters(prevResult, delimiter, delimiters);\n\n // New value has issue, someone typed in between prefix letters\n // Revert to pre value\n if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {\n return prevValue.slice(prefixLength);\n } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {\n return prevValue.slice(0, -prefixLength - 1);\n }\n\n // No issue, strip prefix for new value\n return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength);\n },\n\n getFirstDiffIndex: function (prev, current) {\n var index = 0;\n\n while (prev.charAt(index) === current.charAt(index)) {\n if (prev.charAt(index++) === '') {\n return -1;\n }\n }\n\n return index;\n },\n\n getFormattedValue: function (value, blocks, blocksLength, delimiter, delimiters, delimiterLazyShow) {\n var result = '',\n multipleDelimiters = delimiters.length > 0,\n currentDelimiter = '';\n\n // no options, normal input\n if (blocksLength === 0) {\n return value;\n }\n\n blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n rest = value.slice(length);\n\n if (multipleDelimiters) {\n currentDelimiter = delimiters[delimiterLazyShow ? (index - 1) : index] || currentDelimiter;\n } else {\n currentDelimiter = delimiter;\n }\n\n if (delimiterLazyShow) {\n if (index > 0) {\n result += currentDelimiter;\n }\n\n result += sub;\n } else {\n result += sub;\n\n if (sub.length === length && index < blocksLength - 1) {\n result += currentDelimiter;\n }\n }\n\n // update remaining string\n value = rest;\n }\n });\n\n return result;\n },\n\n // move cursor to the end\n // the first time user focuses on an input with prefix\n fixPrefixCursor: function (el, prefix, delimiter, delimiters) {\n if (!el) {\n return;\n }\n\n var val = el.value,\n appendix = delimiter || (delimiters[0] || ' ');\n\n if (!el.setSelectionRange || !prefix || (prefix.length + appendix.length) <= val.length) {\n return;\n }\n\n var len = val.length * 2;\n\n // set timeout to avoid blink\n setTimeout(function () {\n el.setSelectionRange(len, len);\n }, 1);\n },\n\n // Check if input field is fully selected\n checkFullSelection: function(value) {\n try {\n var selection = window.getSelection() || document.getSelection() || {};\n return selection.toString().length === value.length;\n } catch (ex) {\n // Ignore\n }\n\n return false;\n },\n\n setSelection: function (element, position, doc) {\n if (element !== this.getActiveElement(doc)) {\n return;\n }\n\n // cursor is already in the end\n if (element && element.value.length <= position) {\n return;\n }\n\n if (element.createTextRange) {\n var range = element.createTextRange();\n\n range.move('character', position);\n range.select();\n } else {\n try {\n element.setSelectionRange(position, position);\n } catch (e) {\n // eslint-disable-next-line\n console.warn('The input element type does not support selection');\n }\n }\n },\n\n getActiveElement: function(parent) {\n var activeElement = parent.activeElement;\n if (activeElement && activeElement.shadowRoot) {\n return this.getActiveElement(activeElement.shadowRoot);\n }\n return activeElement;\n },\n\n isAndroid: function () {\n return navigator && /android/i.test(navigator.userAgent);\n },\n\n // On Android chrome, the keyup and keydown events\n // always return key code 229 as a composition that\n // buffers the user’s keystrokes\n // see https://github.com/nosir/cleave.js/issues/147\n isAndroidBackspaceKeydown: function (lastInputValue, currentInputValue) {\n if (!this.isAndroid() || !lastInputValue || !currentInputValue) {\n return false;\n }\n\n return currentInputValue === lastInputValue.slice(0, -1);\n }\n};\n\nvar Util_1 = Util;\n\n/**\n * Props Assignment\n *\n * Separate this, so react module can share the usage\n */\nvar DefaultProperties = {\n // Maybe change to object-assign\n // for now just keep it as simple\n assign: function (target, opts) {\n target = target || {};\n opts = opts || {};\n\n // credit card\n target.creditCard = !!opts.creditCard;\n target.creditCardStrictMode = !!opts.creditCardStrictMode;\n target.creditCardType = '';\n target.onCreditCardTypeChanged = opts.onCreditCardTypeChanged || (function () {});\n\n // phone\n target.phone = !!opts.phone;\n target.phoneRegionCode = opts.phoneRegionCode || 'AU';\n target.phoneFormatter = {};\n\n // time\n target.time = !!opts.time;\n target.timePattern = opts.timePattern || ['h', 'm', 's'];\n target.timeFormat = opts.timeFormat || '24';\n target.timeFormatter = {};\n\n // date\n target.date = !!opts.date;\n target.datePattern = opts.datePattern || ['d', 'm', 'Y'];\n target.dateMin = opts.dateMin || '';\n target.dateMax = opts.dateMax || '';\n target.dateFormatter = {};\n\n // numeral\n target.numeral = !!opts.numeral;\n target.numeralIntegerScale = opts.numeralIntegerScale > 0 ? opts.numeralIntegerScale : 0;\n target.numeralDecimalScale = opts.numeralDecimalScale >= 0 ? opts.numeralDecimalScale : 2;\n target.numeralDecimalMark = opts.numeralDecimalMark || '.';\n target.numeralThousandsGroupStyle = opts.numeralThousandsGroupStyle || 'thousand';\n target.numeralPositiveOnly = !!opts.numeralPositiveOnly;\n target.stripLeadingZeroes = opts.stripLeadingZeroes !== false;\n target.signBeforePrefix = !!opts.signBeforePrefix;\n target.tailPrefix = !!opts.tailPrefix;\n\n // others\n target.swapHiddenInput = !!opts.swapHiddenInput;\n \n target.numericOnly = target.creditCard || target.date || !!opts.numericOnly;\n\n target.uppercase = !!opts.uppercase;\n target.lowercase = !!opts.lowercase;\n\n target.prefix = (target.creditCard || target.date) ? '' : (opts.prefix || '');\n target.noImmediatePrefix = !!opts.noImmediatePrefix;\n target.prefixLength = target.prefix.length;\n target.rawValueTrimPrefix = !!opts.rawValueTrimPrefix;\n target.copyDelimiter = !!opts.copyDelimiter;\n\n target.initValue = (opts.initValue !== undefined && opts.initValue !== null) ? opts.initValue.toString() : '';\n\n target.delimiter =\n (opts.delimiter || opts.delimiter === '') ? opts.delimiter :\n (opts.date ? '/' :\n (opts.time ? ':' :\n (opts.numeral ? ',' :\n (opts.phone ? ' ' :\n ' '))));\n target.delimiterLength = target.delimiter.length;\n target.delimiterLazyShow = !!opts.delimiterLazyShow;\n target.delimiters = opts.delimiters || [];\n\n target.blocks = opts.blocks || [];\n target.blocksLength = target.blocks.length;\n\n target.root = (typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window;\n target.document = opts.document || target.root.document;\n\n target.maxLength = 0;\n\n target.backspace = false;\n target.result = '';\n\n target.onValueChanged = opts.onValueChanged || (function () {});\n\n return target;\n }\n};\n\nvar DefaultProperties_1 = DefaultProperties;\n\n/**\n * Construct a new Cleave instance by passing the configuration object\n *\n * @param {String | HTMLElement} element\n * @param {Object} opts\n */\nvar Cleave = function (element, opts) {\n var owner = this;\n var hasMultipleElements = false;\n\n if (typeof element === 'string') {\n owner.element = document.querySelector(element);\n hasMultipleElements = document.querySelectorAll(element).length > 1;\n } else {\n if (typeof element.length !== 'undefined' && element.length > 0) {\n owner.element = element[0];\n hasMultipleElements = element.length > 1;\n } else {\n owner.element = element;\n }\n }\n\n if (!owner.element) {\n throw new Error('[cleave.js] Please check the element');\n }\n\n if (hasMultipleElements) {\n try {\n // eslint-disable-next-line\n console.warn('[cleave.js] Multiple input fields matched, cleave.js will only take the first one.');\n } catch (e) {\n // Old IE\n }\n }\n\n opts.initValue = owner.element.value;\n\n owner.properties = Cleave.DefaultProperties.assign({}, opts);\n\n owner.init();\n};\n\nCleave.prototype = {\n init: function () {\n var owner = this, pps = owner.properties;\n\n // no need to use this lib\n if (!pps.numeral && !pps.phone && !pps.creditCard && !pps.time && !pps.date && (pps.blocksLength === 0 && !pps.prefix)) {\n owner.onInput(pps.initValue);\n\n return;\n }\n\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n\n owner.isAndroid = Cleave.Util.isAndroid();\n owner.lastInputValue = '';\n owner.isBackward = '';\n\n owner.onChangeListener = owner.onChange.bind(owner);\n owner.onKeyDownListener = owner.onKeyDown.bind(owner);\n owner.onFocusListener = owner.onFocus.bind(owner);\n owner.onCutListener = owner.onCut.bind(owner);\n owner.onCopyListener = owner.onCopy.bind(owner);\n\n owner.initSwapHiddenInput();\n\n owner.element.addEventListener('input', owner.onChangeListener);\n owner.element.addEventListener('keydown', owner.onKeyDownListener);\n owner.element.addEventListener('focus', owner.onFocusListener);\n owner.element.addEventListener('cut', owner.onCutListener);\n owner.element.addEventListener('copy', owner.onCopyListener);\n\n\n owner.initPhoneFormatter();\n owner.initDateFormatter();\n owner.initTimeFormatter();\n owner.initNumeralFormatter();\n\n // avoid touch input field if value is null\n // otherwise Firefox will add red box-shadow for \n if (pps.initValue || (pps.prefix && !pps.noImmediatePrefix)) {\n owner.onInput(pps.initValue);\n }\n },\n\n initSwapHiddenInput: function () {\n var owner = this, pps = owner.properties;\n if (!pps.swapHiddenInput) return;\n\n var inputFormatter = owner.element.cloneNode(true);\n owner.element.parentNode.insertBefore(inputFormatter, owner.element);\n\n owner.elementSwapHidden = owner.element;\n owner.elementSwapHidden.type = 'hidden';\n\n owner.element = inputFormatter;\n owner.element.id = '';\n },\n\n initNumeralFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.numeral) {\n return;\n }\n\n pps.numeralFormatter = new Cleave.NumeralFormatter(\n pps.numeralDecimalMark,\n pps.numeralIntegerScale,\n pps.numeralDecimalScale,\n pps.numeralThousandsGroupStyle,\n pps.numeralPositiveOnly,\n pps.stripLeadingZeroes,\n pps.prefix,\n pps.signBeforePrefix,\n pps.tailPrefix,\n pps.delimiter\n );\n },\n\n initTimeFormatter: function() {\n var owner = this, pps = owner.properties;\n\n if (!pps.time) {\n return;\n }\n\n pps.timeFormatter = new Cleave.TimeFormatter(pps.timePattern, pps.timeFormat);\n pps.blocks = pps.timeFormatter.getBlocks();\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n },\n\n initDateFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.date) {\n return;\n }\n\n pps.dateFormatter = new Cleave.DateFormatter(pps.datePattern, pps.dateMin, pps.dateMax);\n pps.blocks = pps.dateFormatter.getBlocks();\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n },\n\n initPhoneFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.phone) {\n return;\n }\n\n // Cleave.AsYouTypeFormatter should be provided by\n // external google closure lib\n try {\n pps.phoneFormatter = new Cleave.PhoneFormatter(\n new pps.root.Cleave.AsYouTypeFormatter(pps.phoneRegionCode),\n pps.delimiter\n );\n } catch (ex) {\n throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');\n }\n },\n\n onKeyDown: function (event) {\n var owner = this,\n charCode = event.which || event.keyCode;\n\n owner.lastInputValue = owner.element.value;\n owner.isBackward = charCode === 8;\n },\n\n onChange: function (event) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util;\n\n owner.isBackward = owner.isBackward || event.inputType === 'deleteContentBackward';\n\n var postDelimiter = Util.getPostDelimiter(owner.lastInputValue, pps.delimiter, pps.delimiters);\n\n if (owner.isBackward && postDelimiter) {\n pps.postDelimiterBackspace = postDelimiter;\n } else {\n pps.postDelimiterBackspace = false;\n }\n\n this.onInput(this.element.value);\n },\n\n onFocus: function () {\n var owner = this,\n pps = owner.properties;\n owner.lastInputValue = owner.element.value;\n\n if (pps.prefix && pps.noImmediatePrefix && !owner.element.value) {\n this.onInput(pps.prefix);\n }\n\n Cleave.Util.fixPrefixCursor(owner.element, pps.prefix, pps.delimiter, pps.delimiters);\n },\n\n onCut: function (e) {\n if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n this.copyClipboardData(e);\n this.onInput('');\n },\n\n onCopy: function (e) {\n if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n this.copyClipboardData(e);\n },\n\n copyClipboardData: function (e) {\n var owner = this,\n pps = owner.properties,\n Util = Cleave.Util,\n inputValue = owner.element.value,\n textToCopy = '';\n\n if (!pps.copyDelimiter) {\n textToCopy = Util.stripDelimiters(inputValue, pps.delimiter, pps.delimiters);\n } else {\n textToCopy = inputValue;\n }\n\n try {\n if (e.clipboardData) {\n e.clipboardData.setData('Text', textToCopy);\n } else {\n window.clipboardData.setData('Text', textToCopy);\n }\n\n e.preventDefault();\n } catch (ex) {\n // empty\n }\n },\n\n onInput: function (value) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util;\n\n // case 1: delete one more character \"4\"\n // 1234*| -> hit backspace -> 123|\n // case 2: last character is not delimiter which is:\n // 12|34* -> hit backspace -> 1|34*\n // note: no need to apply this for numeral mode\n var postDelimiterAfter = Util.getPostDelimiter(value, pps.delimiter, pps.delimiters);\n if (!pps.numeral && pps.postDelimiterBackspace && !postDelimiterAfter) {\n value = Util.headStr(value, value.length - pps.postDelimiterBackspace.length);\n }\n\n // phone formatter\n if (pps.phone) {\n if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {\n pps.result = pps.prefix + pps.phoneFormatter.format(value).slice(pps.prefix.length);\n } else {\n pps.result = pps.phoneFormatter.format(value);\n }\n owner.updateValueState();\n\n return;\n }\n\n // numeral formatter\n if (pps.numeral) {\n // Do not show prefix when noImmediatePrefix is specified\n // This mostly because we need to show user the native input placeholder\n if (pps.prefix && pps.noImmediatePrefix && value.length === 0) {\n pps.result = '';\n } else {\n pps.result = pps.numeralFormatter.format(value);\n }\n owner.updateValueState();\n\n return;\n }\n\n // date\n if (pps.date) {\n value = pps.dateFormatter.getValidatedDate(value);\n }\n\n // time\n if (pps.time) {\n value = pps.timeFormatter.getValidatedTime(value);\n }\n\n // strip delimiters\n value = Util.stripDelimiters(value, pps.delimiter, pps.delimiters);\n\n // strip prefix\n value = Util.getPrefixStrippedValue(value, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n\n // strip non-numeric characters\n value = pps.numericOnly ? Util.strip(value, /[^\\d]/g) : value;\n\n // convert case\n value = pps.uppercase ? value.toUpperCase() : value;\n value = pps.lowercase ? value.toLowerCase() : value;\n\n // prevent from showing prefix when no immediate option enabled with empty input value\n if (pps.prefix) {\n if (pps.tailPrefix) {\n value = value + pps.prefix;\n } else {\n value = pps.prefix + value;\n }\n\n\n // no blocks specified, no need to do formatting\n if (pps.blocksLength === 0) {\n pps.result = value;\n owner.updateValueState();\n\n return;\n }\n }\n\n // update credit card props\n if (pps.creditCard) {\n owner.updateCreditCardPropsByValue(value);\n }\n\n // strip over length characters\n value = Util.headStr(value, pps.maxLength);\n\n // apply blocks\n pps.result = Util.getFormattedValue(\n value,\n pps.blocks, pps.blocksLength,\n pps.delimiter, pps.delimiters, pps.delimiterLazyShow\n );\n\n owner.updateValueState();\n },\n\n updateCreditCardPropsByValue: function (value) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util,\n creditCardInfo;\n\n // At least one of the first 4 characters has changed\n if (Util.headStr(pps.result, 4) === Util.headStr(value, 4)) {\n return;\n }\n\n creditCardInfo = Cleave.CreditCardDetector.getInfo(value, pps.creditCardStrictMode);\n\n pps.blocks = creditCardInfo.blocks;\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Util.getMaxLength(pps.blocks);\n\n // credit card type changed\n if (pps.creditCardType !== creditCardInfo.type) {\n pps.creditCardType = creditCardInfo.type;\n\n pps.onCreditCardTypeChanged.call(owner, pps.creditCardType);\n }\n },\n\n updateValueState: function () {\n var owner = this,\n Util = Cleave.Util,\n pps = owner.properties;\n\n if (!owner.element) {\n return;\n }\n\n var endPos = owner.element.selectionEnd;\n var oldValue = owner.element.value;\n var newValue = pps.result;\n\n endPos = Util.getNextCursorPosition(endPos, oldValue, newValue, pps.delimiter, pps.delimiters);\n\n // fix Android browser type=\"text\" input field\n // cursor not jumping issue\n if (owner.isAndroid) {\n window.setTimeout(function () {\n owner.element.value = newValue;\n Util.setSelection(owner.element, endPos, pps.document, false);\n owner.callOnValueChanged();\n }, 1);\n\n return;\n }\n\n owner.element.value = newValue;\n if (pps.swapHiddenInput) owner.elementSwapHidden.value = owner.getRawValue();\n\n Util.setSelection(owner.element, endPos, pps.document, false);\n owner.callOnValueChanged();\n },\n\n callOnValueChanged: function () {\n var owner = this,\n pps = owner.properties;\n\n pps.onValueChanged.call(owner, {\n target: {\n name: owner.element.name,\n value: pps.result,\n rawValue: owner.getRawValue()\n }\n });\n },\n\n setPhoneRegionCode: function (phoneRegionCode) {\n var owner = this, pps = owner.properties;\n\n pps.phoneRegionCode = phoneRegionCode;\n owner.initPhoneFormatter();\n owner.onChange();\n },\n\n setRawValue: function (value) {\n var owner = this, pps = owner.properties;\n\n value = value !== undefined && value !== null ? value.toString() : '';\n\n if (pps.numeral) {\n value = value.replace('.', pps.numeralDecimalMark);\n }\n\n pps.postDelimiterBackspace = false;\n\n owner.element.value = value;\n owner.onInput(value);\n },\n\n getRawValue: function () {\n var owner = this,\n pps = owner.properties,\n Util = Cleave.Util,\n rawValue = owner.element.value;\n\n if (pps.rawValueTrimPrefix) {\n rawValue = Util.getPrefixStrippedValue(rawValue, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n }\n\n if (pps.numeral) {\n rawValue = pps.numeralFormatter.getRawValue(rawValue);\n } else {\n rawValue = Util.stripDelimiters(rawValue, pps.delimiter, pps.delimiters);\n }\n\n return rawValue;\n },\n\n getISOFormatDate: function () {\n var owner = this,\n pps = owner.properties;\n\n return pps.date ? pps.dateFormatter.getISOFormatDate() : '';\n },\n\n getISOFormatTime: function () {\n var owner = this,\n pps = owner.properties;\n\n return pps.time ? pps.timeFormatter.getISOFormatTime() : '';\n },\n\n getFormattedValue: function () {\n return this.element.value;\n },\n\n destroy: function () {\n var owner = this;\n\n owner.element.removeEventListener('input', owner.onChangeListener);\n owner.element.removeEventListener('keydown', owner.onKeyDownListener);\n owner.element.removeEventListener('focus', owner.onFocusListener);\n owner.element.removeEventListener('cut', owner.onCutListener);\n owner.element.removeEventListener('copy', owner.onCopyListener);\n },\n\n toString: function () {\n return '[Cleave Object]';\n }\n};\n\nCleave.NumeralFormatter = NumeralFormatter_1;\nCleave.DateFormatter = DateFormatter_1;\nCleave.TimeFormatter = TimeFormatter_1;\nCleave.PhoneFormatter = PhoneFormatter_1;\nCleave.CreditCardDetector = CreditCardDetector_1;\nCleave.Util = Util_1;\nCleave.DefaultProperties = DefaultProperties_1;\n\n// for angular directive\n((typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window)['Cleave'] = Cleave;\n\n// CommonJS\nvar Cleave_1 = Cleave;\n\nexport default Cleave_1;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport function coerceBoolean(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n\nexport function coerceNumber(value: any): number;\nexport function coerceNumber(value: any, fallback: D): number | D;\nexport function coerceNumber(value: any, fallbackValue = 0) {\n return isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\nfunction isNumberValue(value: any): boolean {\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n@use 'utils/color';\n@use '_snippets/form-label';\n\n:host {\n display: flex;\n @include cat-body('m', null);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.input-field,\n.input-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex: 1 1 auto;\n}\n\n.input-field.input-horizontal {\n flex-direction: row;\n gap: 1rem;\n}\n\n.input-wrapper {\n flex: 1 1 auto;\n display: flex;\n align-items: stretch;\n gap: 0.75rem;\n padding: 0 0.75rem;\n height: form-label.$cat-input-height;\n overflow: hidden;\n background: cat-token('color.ui.background.input');\n border-radius: cat-border-radius('m');\n box-shadow: inset 0 0 0 1px rgb(var(--border-color));\n transition: box-shadow cat-token('time.transition.s') linear;\n --border-color: #{cat-token('color.ui.border.dark', $wrap: false)};\n\n &.input-round {\n border-radius: 10rem;\n }\n\n &.input-readonly {\n pointer-events: none;\n }\n\n &.input-disabled {\n background: cat-token('color.ui.background.muted');\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n }\n\n &:not(.input-disabled):hover {\n box-shadow:\n inset 0 0 0 1px rgb(var(--border-color)),\n 0 0 0 1px rgb(var(--border-color));\n }\n\n &:focus-within {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: -1px;\n\n &:has(.clearable:focus) {\n outline: none;\n }\n }\n\n &.input-invalid {\n --border-color: #{cat-token('color.theme.danger.bg', 0.2, $wrap: false)};\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:has(input:-webkit-autofill) {\n &,\n &:hover,\n &:focus {\n background-color: cat-token('color.ui.background.inputAutofill');\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n\n.text-prefix,\n.text-suffix {\n display: inline-flex;\n align-items: center;\n @include cat-select(none);\n}\n\n.text-prefix {\n border-right: 1px solid cat-token('color.ui.border.dark');\n padding-right: 0.75rem;\n}\n\n.text-suffix {\n border-left: 1px solid cat-token('color.ui.border.dark');\n padding-left: 0.75rem;\n}\n\n.icon-prefix,\n.icon-suffix {\n align-self: center;\n}\n\n.input-outer-wrapper {\n display: flex;\n}\n\n.input-inner-wrapper {\n display: flex;\n align-items: center;\n position: relative;\n flex: 1 1 auto;\n}\n\ninput {\n font: inherit;\n margin: 0;\n padding: 0;\n width: 100%;\n min-width: 0;\n border: none;\n outline: none;\n background: none;\n @include cat-ellipsis;\n\n .input-disabled & {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n }\n\n &.has-clearable,\n &.has-toggle-password {\n padding-right: 1.5rem;\n }\n\n &.has-clearable.has-toggle-password {\n padding-right: 3.5rem;\n }\n\n &::placeholder {\n color: cat-token('color.ui.font.muted');\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:-webkit-autofill {\n &,\n &:hover,\n &:focus {\n -webkit-box-shadow: 0 0 0 9999px cat-token('color.ui.background.inputAutofill') inset;\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n\n.clearable {\n position: absolute;\n top: calc(50% - 1rem);\n right: -0.5rem;\n}\n\n.toggle-password {\n position: absolute;\n top: calc(50% - 1rem);\n right: -0.5rem;\n\n .has-clearable ~ & {\n right: 1.5rem;\n }\n}\n\n// ----- date- & timepicker\n\n:host(.cat-date-input),\n:host(.cat-time-input) {\n .input-wrapper {\n z-index: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport Cleave from 'cleave.js';\nimport type { CleaveOptions } from 'cleave.js/options';\nimport log from 'loglevel';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { InputType } from './input-type';\n\nlet nextUniqueId = 0;\n\n/**\n * Inputs are used to allow users to provide text input when the expected input\n * is short. As well as plain text, Input supports various types of text,\n * including passwords and numbers.\n *\n * @slot hint - Optional hint element to be displayed with the input.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The native label element.\n * @part input - The native input element.\n * @part prefix - The text prefix.\n * @part suffix - The text suffix.\n */\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n shadow: true\n})\nexport class CatInput {\n private readonly _id = `cat-input-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n private errorMapSrc?: ErrorMap;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() isPasswordShown = false;\n\n @State() errorMap?: ErrorMap;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input should show a password toggle button for password inputs.\n */\n @Prop() togglePassword = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for numeric values.\n */\n @Prop() max?: number | string;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum value for numeric values.\n */\n @Prop() min?: number | string;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: InputType = 'text';\n\n /**\n * The value of the control.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillRender(): void {\n this.onErrorsChanged(this.errors);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on input', this);\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n // hack to make datepicker inputs focusable. The datepicker hides the input\n // element and dynamically creates a sibling. We need to find the new input\n // element and focus it instead.\n const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;\n input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.value = '';\n this.catChange.emit(this.value);\n }\n\n /**\n * Adds a Cleave.js mask to the input.\n *\n * @param options The Cleave.js options.\n */\n @Method()\n async mask(options: CleaveOptions): Promise {\n new Cleave(this.input, options);\n }\n\n @Watch('errors')\n onErrorsChanged(value?: boolean | string[] | ErrorMap) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(value)\n ? (value as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : value === true\n ? {}\n : value || undefined;\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n\n render() {\n return (\n \n \n {(this.hasSlottedLabel || this.label) && (\n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n \n ({i18n.t('input.optional')})\n \n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n \n ({i18n.t('input.required')})\n \n )}\n {this.maxLength && (\n \n {this.value?.toString().length ?? 0}/{this.maxLength}\n \n )}\n \n \n \n )}\n \n \n \n this.input.focus()}\n >\n {this.textPrefix && (\n \n {this.textPrefix}\n \n )}\n {this.icon && !this.iconRight && (\n this.doFocus()}>\n )}\n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n class={{\n 'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,\n 'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value\n }}\n autocomplete={this.autoComplete}\n disabled={this.disabled}\n max={this.max}\n maxlength={this.maxLength}\n min={this.min}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n type={this.isPasswordShown ? 'text' : this.type}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n >\n {this.clearable && !this.disabled && !this.readonly && this.value && (\n \n )}\n {this.togglePassword && !this.disabled && !this.readonly && this.value && (\n \n )}\n \n {!this.invalid && this.icon && this.iconRight && (\n this.doFocus()}>\n )}\n {this.invalid && (\n \n )}\n {this.textSuffix && (\n \n {this.textSuffix}\n \n )}\n \n \n \n {this.hasHint && (\n }\n errorMap={this.errorMap}\n />\n )}\n \n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return !!Object.keys(this.errorMap || {}).length;\n }\n\n private onInput() {\n this.value = this.input.value;\n this.catChange.emit(this.value);\n this.showErrorsIfTimeout();\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n private doTogglePassword() {\n this.isPasswordShown = !this.isPasswordShown;\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n\n private findSiblingInput(node: Node | null): HTMLInputElement | undefined {\n if (node instanceof HTMLInputElement) {\n return node;\n } else if (node?.nextSibling) {\n return this.findSiblingInput(node.nextSibling);\n }\n return undefined;\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$button-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n display: inline-block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nol {\n display: flex;\n flex-wrap: wrap;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\nli {\n display: inline-flex;\n justify-content: center;\n\n &.dots {\n @include cat-select(none);\n }\n}\n\n// ----- variant\n\n:host([variant='outlined']) {\n ol {\n gap: 0.75rem;\n }\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .cat-pagination-#{$size} {\n li.dots,\n li.text {\n height: map.get($button-sizes, $size);\n line-height: map.get($button-sizes, $size);\n font-size: cat-body-font-size($fontSize);\n }\n\n li.dots {\n width: map.get($button-sizes, $size);\n }\n }\n\n :host([variant='outlined']) {\n .cat-pagination-#{$size} {\n gap: map.get($button-sizes, $size) * 0.25;\n }\n }\n}\n\n@include size('xs', 's');\n@include size('s', 'm');\n@include size('m', 'm');\n@include size('l', 'm');\n@include size('xl', 'l');\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n/**\n * A navigation component to switch between different pages of paged chunks of\n * data such as a table. Pagination is built with list HTML elements and a\n * wrapping `` element to identify it as a navigation section to screen\n * readers and other assistive technologies. Furthermore, the current page is\n * correctly highlighted using `aria-current`.\n */\n@Component({\n tag: 'cat-pagination',\n styleUrl: 'cat-pagination.scss',\n shadow: true\n})\nexport class CatPagination {\n /**\n * The current page.\n */\n @Prop({ mutable: true }) page = 0;\n\n /**\n * The total number of pages.\n */\n @Prop() pageCount = 1;\n\n /**\n * The number of pages to be shown around the current page.\n */\n @Prop() activePadding = 1;\n\n /**\n * The number of pages to be shown at the edges.\n */\n @Prop() sidePadding = 1;\n\n /**\n * The size of the buttons.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The rendering style of the buttons.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' = 'text';\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * Use compact pagination mode.\n */\n @Prop() compact = false;\n\n /**\n * The icon of the \"previous\" button.\n */\n @Prop() iconPrev = '$cat:pagination-left';\n\n /**\n * The icon of the \"next\" button.\n */\n @Prop() iconNext = '$cat:pagination-right';\n\n /**\n * Emitted when the page of the pagination has changed.\n */\n @Event() catChange!: EventEmitter;\n\n render() {\n return (\n \n \n \n this.setPage(this.page - 1)}\n >\n \n {this.content}\n \n this.setPage(this.page + 1)}\n >\n \n \n \n );\n }\n\n get isFirst() {\n return this.page === 0;\n }\n\n get isLast() {\n return this.page === this.pageCount - 1;\n }\n\n private setPage(value: number) {\n this.page = value;\n this.catChange.emit(this.page);\n }\n\n get pages() {\n if (!this.sidePadding && !this.activePadding) {\n return [this.page];\n }\n\n const result = new Set();\n const minPage = this.page <= this.sidePadding + this.activePadding + 1;\n const minActivepage = minPage ? this.sidePadding + 2 * this.activePadding + 2 : this.sidePadding;\n const maxPage = this.page >= this.pageCount - this.sidePadding - this.activePadding - 2;\n const maxActivepage = maxPage\n ? this.pageCount - this.sidePadding - 2 * this.activePadding - 2\n : this.pageCount - this.sidePadding;\n\n this.addSeq(result, 0, minActivepage);\n if (!minPage && !maxPage) {\n this.addSeq(result, this.page - this.activePadding, this.page + this.activePadding + 1);\n }\n this.addSeq(result, maxActivepage, this.pageCount);\n\n return [...result];\n }\n\n private addSeq(set: Set, start: number, end: number) {\n const _start = this.clamp(start, 0, this.pageCount);\n const _end = this.clamp(end, 0, this.pageCount);\n Array(_end - _start)\n .fill(0)\n .forEach((_, i) => set.add(_start + i));\n }\n\n private clamp(num: number, min: number, max: number) {\n return Math.min(Math.max(num, min), max);\n }\n\n private get content() {\n if (this.compact) {\n return (\n \n {this.page + 1}/{this.pageCount}\n \n );\n }\n\n return this.pages.map((page, i) => [\n i > 0 && this.pages[i - 1] !== page - 1 ? … : null,\n \n this.setPage(page)}\n >\n {page + 1}\n \n \n ]);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$radio-width: 1.25rem;\n$radio-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n cursor: pointer;\n}\n\n.label-left {\n flex-direction: row-reverse;\n}\n\n.radio {\n display: flex;\n position: relative;\n align-self: flex-start;\n}\n\n.circle-placeholder {\n width: calc($radio-width + 1px);\n flex-shrink: 0;\n}\n\n.circle {\n position: absolute;\n width: 0.75rem;\n height: 0.75rem;\n background-color: cat-token('color.theme.primary.bg');\n border-radius: 10rem;\n top: calc(50% - 0.375rem);\n left: calc(50% - 0.375rem);\n visibility: hidden;\n pointer-events: none;\n}\n\ninput {\n margin: 0;\n width: $radio-width;\n height: $radio-height;\n appearance: none;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.dark');\n border-radius: 10rem;\n cursor: inherit;\n\n &:checked {\n border-color: cat-token('color.theme.primary.bg');\n\n + .circle {\n visibility: visible;\n }\n }\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n:host(.cat-error) {\n input {\n border-color: cat-token('color.theme.danger.bg');\n }\n\n .circle {\n background-color: cat-token('color.theme.danger.bg');\n }\n}\n\n.label {\n flex: 1 1 auto;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n\n input {\n background-color: cat-token('color.ui.background.muted');\n\n &:checked {\n border-color: cat-token('color.ui.border.dark');\n }\n }\n\n .circle {\n background-color: cat-token('color.ui.border.dark');\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Radio Buttons are graphical interface elements that allow user to choose\n * only one of a predefined set of mutually exclusive options.\n *\n * @slot hint - Optional hint element to be displayed with the radio.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-radio',\n styleUrl: 'cat-radio.scss',\n shadow: true\n})\nexport class CatRadio {\n private readonly _id = `cat-radio-${++nextUniqueId}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether this radio is checked.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Whether this radio is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label of the radio that is visible.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the radio component.\n */\n @Prop() name?: string;\n\n /**\n * Whether the radio is required.\n */\n @Prop() required = false;\n\n /**\n * The value of the radio component.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value: any = '';\n\n /**\n * Optional hint text(s) to be displayed with the radio.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the radio component.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the radio is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the radio received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the radio loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on radio', this);\n }\n }\n\n /**\n * Programmatically move focus to the radio button. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the radio button. Use this method\n * instead of `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n \n (this.input = el as HTMLInputElement)}\n id={this.identifier || this.id}\n type=\"radio\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n \n \n } />\n \n )}\n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = true;\n this.catChange.emit(this.value);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, Watch } from '@stencil/core';\n\n/**\n * A group of radio buttons.\n */\n@Component({\n tag: 'cat-radio-group',\n styleUrl: 'cat-radio-group.scss',\n shadow: true\n})\nexport class CatRadioGroup {\n private catRadioGroup: HTMLCatRadioElement[] = [];\n private mutationObserver?: MutationObserver;\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The name of the radio group component.\n */\n @Prop() name?: string;\n\n /**\n * The value of the radio group.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) value?: any;\n\n /**\n * Whether this radio group is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Adds an accessible label for the radio group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Whether the label of the radios should appear to the left of them.\n */\n @Prop() labelLeft = false;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the radio group received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the radio group loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n @Watch('name')\n onNameChanged(newName?: string) {\n this.catRadioGroup.forEach(catRadio => (catRadio.name = newName));\n }\n\n @Watch('value')\n onValueChanged(newValue?: string) {\n this.catRadioGroup.forEach(catRadio => (catRadio.checked = catRadio.value === newValue));\n this.updateTabIndex();\n }\n\n @Watch('disabled')\n onDisabledChanged(disabled: boolean) {\n this.catRadioGroup.forEach(catRadio => (catRadio.disabled = catRadio.disabled || disabled));\n }\n\n @Watch('labelLeft')\n onLabelLeftChanged(labelLeft: boolean) {\n this.catRadioGroup.forEach(catRadio => (catRadio.labelLeft = catRadio.labelLeft || labelLeft));\n }\n\n componentDidLoad(): void {\n this.init();\n this.mutationObserver = new MutationObserver(\n mutations => mutations.some(value => value.target.nodeName === 'CAT-RADIO') && this.init()\n );\n this.mutationObserver?.observe(this.hostElement, {\n childList: true,\n attributes: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n @Listen('keydown')\n onKeydown(event: KeyboardEvent): void {\n if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key) && this.catRadioGroup.length) {\n const targetElements = this.catRadioGroup.filter(catRadio => !catRadio.disabled);\n const activeElement = document.activeElement as HTMLCatRadioElement;\n const activeIdx = this.catRadioGroup.findIndex(catRadio => catRadio === activeElement);\n const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;\n const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;\n targetElements[targetIdx].doFocus();\n targetElements[targetIdx].shadowRoot?.querySelector('input')?.click();\n this.updateTabIndex();\n event.preventDefault();\n }\n }\n\n @Listen('input')\n onInput(event: MouseEvent): void {\n const radio = this.catRadioGroup.find(radio => radio === event.target);\n if (radio?.localName === 'cat-radio') {\n this.value = radio?.checked ? radio?.value : undefined;\n this.catChange.emit(this.value);\n }\n }\n\n @Listen('focus', { capture: true })\n onFocus(event: FocusEvent): void {\n if (!event.relatedTarget) {\n this.catBlur.emit(event);\n }\n }\n\n @Listen('blur', { capture: true })\n onBlur(event: FocusEvent): void {\n if (!event.relatedTarget) {\n this.catBlur.emit(event);\n }\n }\n\n render() {\n return (\n \n \n \n );\n }\n\n private init() {\n this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));\n this.onNameChanged(this.name);\n this.onValueChanged(this.value);\n this.onDisabledChanged(this.disabled);\n this.onLabelLeftChanged(this.labelLeft);\n }\n\n private updateTabIndex() {\n if (this.catRadioGroup.length) {\n this.catRadioGroup.forEach(value => value.shadowRoot?.querySelector('input')?.setAttribute('tabindex', '-1'));\n const checkedRadioIndex = this.catRadioGroup.findIndex(value => value.checked);\n this.catRadioGroup[checkedRadioIndex >= 0 ? checkedRadioIndex : 0].shadowRoot\n ?.querySelector('input')\n ?.setAttribute('tabindex', '0');\n }\n }\n}\n","@import 'variables';\n\n// -----\n\n$-shadow: 0 0 4px 1px rgba(16, 29, 48, 20%);\n$-shadow-transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n\n// -----\n\n:host {\n overflow: hidden;\n position: relative;\n display: flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n// ----- Scroll shadows\n\n%shadow {\n position: absolute;\n transition: $-shadow-transition;\n}\n\n.shadow-top {\n @extend %shadow;\n z-index: 2;\n width: 100%;\n top: 0;\n}\n\n.shadow-left {\n @extend %shadow;\n z-index: 4;\n height: 100%;\n left: 0;\n}\n\n.shadow-right {\n @extend %shadow;\n z-index: 4;\n height: 100%;\n right: 0;\n}\n\n.shadow-bottom {\n @extend %shadow;\n z-index: 2;\n width: 100%;\n bottom: 0;\n}\n\n// ----- Component\n\n.scrollable-wrapper {\n position: absolute;\n inset: 0;\n pointer-events: none;\n\n &.cat-scrollable-top .shadow-top,\n &.cat-scrollable-bottom .shadow-bottom,\n &.cat-scrollable-left .shadow-left,\n &.cat-scrollable-right .shadow-right {\n box-shadow: $-shadow;\n }\n}\n\n.scrollable-content {\n width: 100%;\n overflow: hidden;\n // white-space: nowrap;\n\n &.scroll-x {\n overflow-x: auto;\n }\n\n &.scroll-y {\n overflow-y: auto;\n }\n\n &.no-overscroll {\n overscroll-behavior: contain;\n }\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { fromEvent, merge, Observable, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\n\n/**\n * An element to display scrollable content.\n */\n@Component({\n tag: 'cat-scrollable',\n styleUrl: 'cat-scrollable.scss',\n shadow: true\n})\nexport class CatScrollable {\n private static readonly THROTTLE = 50;\n scrollElement?: HTMLElement;\n scrollWrapperElement?: HTMLElement;\n private readonly init = new Subject();\n private readonly destroyed = new Subject();\n private readonly resizedEntries = new Subject();\n private readonly resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));\n private scrolled!: Observable;\n\n /** Flags to disable/enable scroll shadowX. */\n @Prop()\n noShadowX = false;\n\n /** Flags to disable/enable scroll shadowY. */\n @Prop()\n noShadowY = false;\n\n /** Flags to disable/enable overflowX. */\n @Prop()\n noOverflowX = false;\n\n /** Flags to disable/enable overflowY. */\n @Prop()\n noOverflowY = false;\n\n /** Flag to disable/enable overscroll behavior. */\n @Prop()\n noOverscroll = false;\n\n /**\n * Flag to not fire an initial event after content initialization.\n */\n @Prop() noScrolledInit = false;\n\n /**\n * Buffer to be used to calculate the scroll distance.\n */\n @Prop() scrolledBuffer = 0;\n\n /**\n * Emitted when the content is fully scrolled to the top.\n */\n @Event() scrolledTop!: EventEmitter;\n\n /**\n * Emitted when the content is fully scrolled to the left.\n */\n @Event() scrolledLeft!: EventEmitter;\n\n /**\n * Emitted when the content is fully scrolled to the right.\n */\n @Event() scrolledRight!: EventEmitter;\n\n /**\n * Emitted when the content is fully scrolled to the bottom.\n */\n @Event() scrolledBottom!: EventEmitter;\n\n componentDidRender() {\n if (this.scrollElement) {\n this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));\n this.resizedObserver.observe(this.scrollElement);\n }\n if (this.scrollWrapperElement) {\n this.resizedObserver.observe(this.scrollWrapperElement);\n }\n this.attachEmitter('left', this.scrolledLeft);\n this.attachEmitter('right', this.scrolledRight);\n this.attachEmitter('bottom', this.scrolledBottom);\n this.attachEmitter('top', this.scrolledTop);\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => ({\n top: this.getScrollOffset('top') > 0,\n left: this.getScrollOffset('left') > 0,\n right: this.getScrollOffset('right') > 0,\n bottom: this.getScrollOffset('bottom') > 0\n })),\n distinctUntilChanged(),\n takeUntil(this.destroyed)\n )\n .subscribe(({ top, left, right, bottom }) => {\n this.toggleClass('cat-scrollable-top', top);\n this.toggleClass('cat-scrollable-left', left);\n this.toggleClass('cat-scrollable-right', right);\n this.toggleClass('cat-scrollable-bottom', bottom);\n });\n }\n\n componentDidLoad() {\n if (!this.noScrolledInit) {\n this.init.next();\n }\n }\n\n disconnectedCallback() {\n this.init.complete();\n this.destroyed.next();\n this.destroyed.complete();\n this.resizedObserver.disconnect();\n }\n\n render() {\n return [\n (this.scrollWrapperElement = el)}>\n {!this.noShadowY && }\n {!this.noShadowX && }\n {!this.noShadowX && }\n {!this.noShadowY && }\n ,\n (this.scrollElement = el)}\n class={{\n 'scrollable-content': true,\n 'scroll-x': !this.noOverflowX,\n 'scroll-y': !this.noOverflowY,\n 'no-overscroll': this.noOverscroll\n }}\n >\n \n \n ];\n }\n\n private attachEmitter(from: 'top' | 'left' | 'right' | 'bottom', emitter: EventEmitter) {\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => this.getScrollOffset(from)),\n map(offset => offset <= this.scrolledBuffer),\n distinctUntilChanged(),\n filter(isLower => isLower),\n takeUntil(this.destroyed)\n )\n .subscribe(() => emitter.emit());\n }\n\n private getScrollOffset(from: 'top' | 'left' | 'right' | 'bottom') {\n if (this.scrollElement) {\n switch (from) {\n case 'top':\n return this.scrollElement.scrollTop;\n case 'left':\n return this.scrollElement.scrollLeft;\n case 'right':\n return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;\n case 'bottom':\n return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;\n default:\n return 0;\n }\n }\n return 0;\n }\n\n private toggleClass(name: string, value: boolean) {\n if (value) {\n this.scrollWrapperElement?.classList.add(name);\n } else {\n this.scrollWrapperElement?.classList.remove(name);\n }\n }\n}\n","var GHOST_ELEMENT_ID = '__autosizeInputGhost'\n\nvar characterEntities = {\n ' ': 'nbsp',\n '<': 'lt',\n '>': 'gt'\n}\nfunction mapSpecialCharacterToCharacterEntity (specialCharacter) {\n return '&' + characterEntities[specialCharacter] + ';'\n}\nfunction escapeSpecialCharacters (string) {\n return string.replace(/\\s|<|>/g, mapSpecialCharacterToCharacterEntity)\n}\n\n// Create `ghostElement`, with inline styles to hide it and ensure that the text is all\n// on a single line.\nfunction createGhostElement () {\n var ghostElement = document.createElement('div')\n ghostElement.id = GHOST_ELEMENT_ID\n ghostElement.style.cssText =\n 'display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;'\n document.body.appendChild(ghostElement)\n return ghostElement\n}\n\nmodule.exports = function (element, options) {\n var elementStyle = window.getComputedStyle(element)\n // prettier-ignore\n var elementCssText = 'box-sizing:' + elementStyle.boxSizing +\n ';border-left:' + elementStyle.borderLeftWidth + ' solid red' +\n ';border-right:' + elementStyle.borderRightWidth + ' solid red' +\n ';font-family:' + elementStyle.fontFamily +\n ';font-feature-settings:' + elementStyle.fontFeatureSettings +\n ';font-kerning:' + elementStyle.fontKerning +\n ';font-size:' + elementStyle.fontSize +\n ';font-stretch:' + elementStyle.fontStretch +\n ';font-style:' + elementStyle.fontStyle +\n ';font-variant:' + elementStyle.fontVariant +\n ';font-variant-caps:' + elementStyle.fontVariantCaps +\n ';font-variant-ligatures:' + elementStyle.fontVariantLigatures +\n ';font-variant-numeric:' + elementStyle.fontVariantNumeric +\n ';font-weight:' + elementStyle.fontWeight +\n ';letter-spacing:' + elementStyle.letterSpacing +\n ';margin-left:' + elementStyle.marginLeft +\n ';margin-right:' + elementStyle.marginRight +\n ';padding-left:' + elementStyle.paddingLeft +\n ';padding-right:' + elementStyle.paddingRight +\n ';text-indent:' + elementStyle.textIndent +\n ';text-transform:' + elementStyle.textTransform\n\n // Assigns an appropriate width to the given `element` based on its contents.\n function setWidth () {\n var string = element.value || element.getAttribute('placeholder') || ''\n // Check if the `ghostElement` exists. If no, create it.\n var ghostElement =\n document.getElementById(GHOST_ELEMENT_ID) || createGhostElement()\n // Copy all width-affecting styles to the `ghostElement`.\n ghostElement.style.cssText += elementCssText\n ghostElement.innerHTML = escapeSpecialCharacters(string)\n // Copy the width of `ghostElement` to `element`.\n var width = window.getComputedStyle(ghostElement).width\n element.style.width = width\n return width\n }\n\n element.addEventListener('input', setWidth)\n\n var width = setWidth()\n\n // Set `min-width` only if `options.minWidth` was set, and only if the initial\n // width is non-zero.\n if (options && options.minWidth && width !== '0px') {\n element.style.minWidth = width\n }\n\n // Return a function for unbinding the event listener and removing the `ghostElement`.\n return function () {\n element.removeEventListener('input', setWidth)\n var ghostElement = document.getElementById(GHOST_ELEMENT_ID)\n if (ghostElement) {\n ghostElement.parentNode.removeChild(ghostElement)\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n@use 'utils/color';\n@use '_snippets/form-label';\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n line-height: 1.25rem;\n position: relative;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n align-self: flex-start;\n\n &.hidden {\n @include cat-visually-hidden;\n }\n}\n\n.select-field,\n.select-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex: 1 1 auto;\n}\n\n.select-field.select-horizontal {\n flex-direction: row;\n gap: 1rem;\n}\n\n.select-wrapper {\n display: flex;\n align-items: flex-start;\n background: cat-token('color.ui.background.input');\n border-radius: cat-border-radius('m');\n box-shadow: inset 0 0 0 1px rgb(var(--border-color));\n transition: box-shadow cat-token('time.transition.s') linear;\n padding: 0.25rem;\n --border-color: #{cat-token('color.ui.border.dark', $wrap: false)};\n\n &:not(.select-disabled):hover {\n box-shadow:\n inset 0 0 0 1px rgb(var(--border-color)),\n 0 0 0 1px rgb(var(--border-color));\n }\n\n &:focus-within {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: -1px;\n }\n\n &.select-invalid {\n --border-color: #{cat-token('color.theme.danger.bg', 0.2, $wrap: false)};\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:has(input:-webkit-autofill) {\n &,\n &:hover,\n &:focus {\n background-color: cat-token('color.ui.background.inputAutofill');\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n\n:host(.cat-error) {\n .select-wrapper {\n box-shadow: 0 0 0 1px cat-token('color.theme.danger.bg');\n\n &:not(.input-disabled):hover {\n box-shadow: 0 0 0 2px cat-token('color.theme.danger.bg');\n }\n }\n}\n\n.select-disabled {\n background: cat-token('color.ui.background.muted');\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n pointer-events: none;\n}\n\n.select-wrapper-inner {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: 0.25rem;\n min-width: 0;\n\n > cat-avatar {\n display: inline-block;\n padding-left: 0.5rem;\n\n & + .select-input {\n padding-left: 0.25rem;\n }\n }\n\n cat-avatar {\n --cat-avatar-size: 1.25rem;\n --cat-avatar-font-size: 0.5rem;\n }\n\n .select-multiple & {\n flex-wrap: wrap;\n }\n}\n\n.select-input {\n font: inherit;\n background: none;\n border: none;\n outline: none;\n padding: 0.375rem 0.5rem;\n flex: 1 1 auto;\n @include cat-ellipsis;\n\n &::placeholder {\n color: cat-token('color.ui.font.muted');\n }\n\n .select-disabled & {\n cursor: inherit;\n }\n}\n\n.select-pills {\n display: contents;\n}\n\n.pill {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.25rem 0.5rem;\n background: cat-token('color.ui.background.muted');\n border-radius: cat-border-radius('s');\n white-space: nowrap;\n min-width: 0;\n\n > span {\n overflow: hidden;\n text-overflow: ellipsis;\n flex: 1 1 0%;\n }\n\n > cat-button {\n margin-right: -0.25rem;\n margin-left: -0.25rem;\n }\n}\n\n.select-btn {\n transition: transform cat-token('time.transition.s') linear;\n\n &::part(button) {\n outline: none;\n }\n}\n\ncat-spinner {\n padding: 0.375rem;\n}\n\n.icon-suffix {\n padding: 0.25rem;\n}\n\n.select-btn-open {\n transform: rotate(180deg);\n}\n\n.select-dropdown {\n position: fixed;\n right: 0;\n background: cat-token('color.ui.background.surface');\n display: none;\n overflow: auto;\n // -webkit-overflow-scrolling: touch;\n @include cat-elevation(4);\n border-radius: cat-border-radius('m');\n border: 1px solid cat-token('color.ui.border.default');\n z-index: cat-z-index('dropdown');\n\n /* Avoid layout interference */\n width: max-content;\n top: 0;\n left: 0;\n}\n\n.select-options-wrapper {\n max-height: 16rem;\n width: 100%;\n}\n\n.select-empty {\n margin: 1rem 0;\n padding: 0 1.25rem;\n}\n\n.select-options {\n list-style-type: none;\n margin: 0;\n padding: 0.5rem 0;\n\n cat-checkbox,\n .select-option-single {\n margin: 0;\n padding: 0.5rem 1rem;\n }\n}\n\n.select-option-inner {\n display: flex;\n gap: 0.5rem;\n\n cat-avatar {\n --cat-avatar-size: 1.25rem;\n --cat-avatar-font-size: 0.5rem;\n }\n}\n\n.select-option-text {\n flex: 1 1 0%;\n min-width: 0;\n}\n\n.select-option-single {\n cursor: pointer;\n}\n\n.select-input-transparent-caret {\n caret-color: transparent;\n}\n\n.select-option-empty,\n.select-option-loading {\n padding: 0.5rem 1rem;\n}\n\n.select-option:hover {\n background-color: cat-token('color.theme.secondary.bg', 0.05);\n}\n\n.select-option-active {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: -2px;\n}\n\n.select-option-label {\n @include cat-ellipsis(2);\n @include cat-break-word;\n}\n\n.select-option-description {\n @include cat-ellipsis(2);\n color: cat-token('color.ui.font.muted');\n}\n","import { autoUpdate, computePosition, flip, offset, Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport autosizeInput from 'autosize-input';\nimport log from 'loglevel';\nimport {\n catchError,\n debounce,\n distinctUntilChanged,\n filter,\n first,\n Observable,\n of,\n scan,\n startWith,\n Subject,\n Subscription,\n switchMap,\n takeWhile,\n tap,\n timer\n} from 'rxjs';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport interface Item {\n id: string;\n}\n\nexport interface Page {\n content: T[];\n last: boolean;\n totalElements?: number;\n}\n\nexport interface RenderInfo {\n label: string;\n description?: string;\n avatar?: {\n src?: string;\n round?: boolean;\n initials?: string;\n icon?: string;\n };\n}\n\n/**\n * @property customId - Change the ID of item for the given one.\n * @property resolve - Resolves the value of the select.\n * @property retrieve - Retrieves the options of the select.\n * @property render - Renders the items of the select.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface CatSelectConnector {\n customId?: (item: T) => string;\n resolve: (ids: string[]) => Observable;\n retrieve: (term: string, page: number) => Observable>;\n render: (item: T) => RenderInfo;\n}\n\nexport interface CatSelectState {\n term: string;\n isOpen: boolean;\n isLoading: boolean;\n isResolving: boolean;\n options: { item: Item; render: RenderInfo }[];\n tempSelection: { item: Item; render: RenderInfo }[];\n selection: { item: Item; render: RenderInfo }[];\n activeOptionIndex: number;\n activeSelectionIndex: number;\n totalElements?: number;\n}\n\nexport interface CatSelectMultipleTaggingValue {\n ids: string[];\n tags: string[];\n}\n\nexport interface CatSelectTaggingValue {\n id: string;\n tag: string;\n}\n\nconst INIT_STATE: CatSelectState = {\n term: '',\n isOpen: false,\n isLoading: false,\n isResolving: false,\n options: [],\n selection: [],\n tempSelection: [],\n activeOptionIndex: -1,\n activeSelectionIndex: -1\n};\n\nlet nextUniqueId = 0;\nlet nextTagUniqueId = 0;\n\n/**\n * Select lets user choose one option from an options' menu. Consider using\n * select when you have 6 or more options. Select component supports any content\n * type.\n *\n * @slot hint - Optional hint element to be displayed with the select.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The native label element.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-select',\n styleUrl: 'cat-select.scss',\n shadow: true\n})\nexport class CatSelect {\n private static readonly SKELETON_COUNT = 4;\n private static readonly DROPDOWN_OFFSET = 4;\n private readonly _id = `cat-input-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private dropdown?: HTMLElement;\n private trigger?: HTMLElement;\n private input?: HTMLInputElement;\n private errorMapSrc?: ErrorMap;\n\n private subscription?: Subscription;\n private term$: Subject = new Subject();\n private more$: Subject = new Subject();\n private valueChangedBySelection = false;\n\n @Element() hostElement!: HTMLElement;\n\n @State() connector?: CatSelectConnector;\n\n @State() state: CatSelectState = INIT_STATE;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() errorMap?: ErrorMap;\n\n /**\n * Whether the label need a marker to shown if the select is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Enable multiple selection.\n */\n @Prop() multiple = false;\n\n /**\n * The debounce time for the search.\n */\n @Prop() debounce = 250;\n\n /**\n * The placement of the select.\n */\n @Prop() placement: Placement = 'bottom-start';\n\n /**\n * The value of the select. \n * \n * The value of the select depends on whether it is allowed to choose a single item or several items. \n * When only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. \n * \n * In case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item,\n * in the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created\n */\n @Prop({ mutable: true }) value?: string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue;\n\n /**\n * Whether the select is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The placeholder text to display within the select.\n */\n @Prop() placeholder?: string;\n\n /**\n * Optional hint text(s) to be displayed with the select.\n */\n @Prop() hint?: string | string[];\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the select.\n */\n @Prop() label = '';\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A value is required or must be checked for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Whether the select should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the select should add new items.\n */\n @Prop() tags = false;\n\n /**\n * Optional hint text to be displayed on the new item to be added.\n */\n @Prop() tagHint?: string;\n\n /**\n * The text to display in the dropdown if no results are found.\n */\n @Prop() noItems?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n @Watch('connector')\n onConnectorChanged(connector: CatSelectConnector) {\n this.reset(connector);\n this.resolve();\n }\n\n @Watch('value')\n onValueChanged() {\n !this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);\n }\n\n @Watch('errors')\n onErrorsChanged(value?: boolean | string[] | ErrorMap) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(value)\n ? (value as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : value === true\n ? {}\n : value || undefined;\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n\n @Watch('state')\n onStateChanged(newState: CatSelectState, oldState: CatSelectState) {\n const changed = (key: keyof CatSelectState) => newState[key] !== oldState[key];\n if (changed('isOpen')) {\n this.update();\n }\n if (changed('activeOptionIndex') && this.state.activeOptionIndex >= 0) {\n this.dropdown\n ?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)\n ?.scrollIntoView({ block: 'nearest' });\n }\n\n if (changed('selection')) {\n let newValue;\n if (!this.multiple && this.state.selection.length) {\n this.hide();\n }\n const idsSelected = this.state.selection.map(item => item.item.id);\n if (!this.tags) {\n if (this.multiple) {\n newValue = idsSelected;\n } else {\n newValue = idsSelected.length ? idsSelected[0] : '';\n }\n } else {\n const ids = idsSelected.filter(id => !id.startsWith(`select-${this.id}-tag`));\n const tags = this.state.selection\n .filter(item => item.item.id.startsWith(`select-${this.id}-tag`))\n .map(item => item.render.label);\n if (this.multiple) {\n newValue = { ids, tags };\n } else {\n newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };\n }\n }\n\n if (!oldState.isResolving) {\n this.valueChangedBySelection = true;\n this.value = newValue;\n }\n this.catChange.emit();\n this.showErrorsIfTimeout();\n }\n }\n\n /**\n * Emitted when the select dropdown is opened.\n */\n @Event() catOpen!: EventEmitter;\n\n /**\n * Emitted when the select dropdown is closed.\n */\n @Event() catClose!: EventEmitter;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the select loses the focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentDidLoad(): void {\n if (this.input) {\n autosizeInput(this.input);\n }\n if (this.trigger && this.dropdown) {\n autoUpdate(this.trigger, this.dropdown, () => this.update());\n }\n }\n\n componentWillRender(): void {\n this.onErrorsChanged(this.errors);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on select', this);\n }\n }\n\n @Listen('blur')\n onBlur(event: FocusEvent): void {\n if (!this.multiple && this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n this.hide();\n // Conditionally remove selection if the option was not manually selected through click or enter key press\n if (!this.multiple && (!this.tags || !this.state.selection?.length)) {\n if (this.state.tempSelection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: this.state.tempSelection,\n tempSelection: [],\n options: [],\n term: this.state.tempSelection[0].render.label\n });\n } else if (!this.state.selection?.length) {\n this.patchState({\n activeSelectionIndex: -1,\n selection: [],\n tempSelection: [],\n options: [],\n term: ''\n });\n }\n } else {\n this.patchState({ activeSelectionIndex: -1 });\n }\n\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent): void {\n const isInputFocused = this.hostElement.shadowRoot?.activeElement === this.input;\n\n if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {\n this.onArrowKeyDown(event);\n } else if (['Enter', ' '].includes(event.key) && isInputFocused) {\n if (\n this.tags &&\n this.state.activeOptionIndex === 0 &&\n this.state.options[0].item.id === `select-${this.id}-option-tag`\n ) {\n event.preventDefault();\n if (this.multiple) {\n this.toggleTag(this.state.options[0]);\n } else {\n this.createTag(this.state.options[0].render.label);\n }\n } else if (this.state.activeOptionIndex >= 0) {\n event.preventDefault();\n if (this.multiple) {\n this.toggle(this.state.options[this.state.activeOptionIndex]);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n } else if (this.tags && event.key === 'Enter' && this.state.activeOptionIndex < 0) {\n this.createTag(this.state.term);\n }\n } else if (event.key === 'Escape') {\n if (this.hide()) {\n event.stopPropagation();\n }\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n this.input?.focus();\n if (!this.multiple || !this.state.term || (this.input?.selectionStart === 0 && event.key === 'Backspace')) {\n if (this.state.activeSelectionIndex >= 0) {\n this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id);\n } else if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({\n selection: selectionClone,\n tempSelection: this.state.term ? [...this.state.selection] : []\n });\n }\n }\n } else if (event.key === 'Tab') {\n this.trigger?.setAttribute('tabindex', '-1');\n if (this.multiple) {\n this.patchState({ activeSelectionIndex: -1, activeOptionIndex: -1 });\n } else if (this.state.activeOptionIndex >= 0) {\n if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {\n this.createTag(this.state.term);\n } else {\n this.select(this.state.options[this.state.activeOptionIndex]);\n }\n }\n } else if (event.key.length === 1) {\n this.input?.focus();\n }\n }\n\n @Listen('keyup')\n onKeyUp(event: KeyboardEvent): void {\n if (event.key === 'Tab' && !event.shiftKey) {\n this.hostElement.shadowRoot?.activeElement === this.trigger && this.input?.focus();\n if (this.hostElement.shadowRoot?.activeElement === this.input) {\n this.show();\n }\n } else if (event.key === 'Tab' && event.shiftKey) {\n const clearButton = this.trigger?.querySelector(`#select-clear-btn-${this.id}`);\n\n if (clearButton) {\n this.hostElement.shadowRoot?.activeElement === clearButton && this.show();\n } else {\n this.show();\n }\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.clearInput();\n }\n\n /**\n * Connect the functions of the select\n *\n * @param connector - The {@link CatSelectConnector} of the select.\n */\n @Method()\n async connect(connector: CatSelectConnector): Promise {\n this.connector = connector;\n let number$: Observable;\n this.subscription?.unsubscribe();\n this.subscription = this.term$\n .asObservable()\n .pipe(\n debounce(term => (term ? timer(this.debounce) : of(0))),\n distinctUntilChanged(),\n tap(\n () =>\n (number$ = this.more$.pipe(\n filter(() => !this.state.isLoading),\n scan(n => n + 1, 0),\n startWith(0)\n ))\n ),\n tap(() => this.patchState({ options: [] })),\n switchMap(term =>\n number$.pipe(\n tap(() => this.patchState({ isLoading: true })),\n switchMap(number => connector.retrieve(term, number)),\n tap(page => this.patchState({ isLoading: false, totalElements: page.totalElements })),\n takeWhile(page => !page.last, true),\n scan((items, page) => [...items, ...page.content], [] as Item[])\n )\n )\n )\n .subscribe(items => {\n const options = this.toSelectItems(connector, items);\n\n if (\n this.tags &&\n this.state.term.trim().length &&\n !options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())\n ) {\n let label;\n if (this.isTagSelected(this.state.term)) {\n label = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())\n ?.render.label;\n }\n options.unshift({\n item: { id: `select-${this.id}-option-tag` },\n render: { label: label ? label : this.state.term }\n });\n }\n this.patchState({\n options\n });\n });\n }\n\n render() {\n return (\n \n \n \n {(this.hasSlottedLabel || this.label) && (\n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n \n ({i18n.t('input.optional')})\n \n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n \n ({i18n.t('input.required')})\n \n )}\n \n \n \n )}\n \n\n \n (this.trigger = el)}\n id={this.id}\n role=\"combobox\"\n aria-expanded={this.state.isOpen || this.isPillboxActive()}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-required={this.required ? 'true' : false}\n aria-activedescendant={this.activeDescendant}\n onClick={e => this.onClick(e)}\n >\n \n {this.multiple && this.state.selection.length ? (\n \n {this.state.selection.map((item, i) => (\n \n {item.render.avatar ? (\n \n ) : null}\n {item.render.label}\n {!this.disabled && (\n this.deselect(item.item.id)}\n tabIndex={-1}\n data-dropdown-no-close\n >\n )}\n \n ))}\n \n ) : this.state.selection.length && this.state.selection[0].render.avatar ? (\n \n ) : null}\n (this.input = el)}\n aria-controls={this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`}\n aria-activedescendant={this.activeDescendant}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n onInput={this.onInput.bind(this)}\n value={!this.multiple ? this.state.term : undefined}\n placeholder={this.placeholder}\n disabled={this.disabled || this.state.isResolving}\n >\n \n {this.state.isResolving && }\n {this.invalid && (\n \n )}\n {(this.state.selection.length || this.state.term.length) &&\n !this.disabled &&\n !this.state.isResolving &&\n this.clearable ? (\n this.clearInput()}\n data-dropdown-no-close\n >\n ) : null}\n {!this.state.isResolving && (\n \n )}\n \n {this.hasHint && (\n }\n errorMap={this.errorMap}\n />\n )}\n \n \n\n (this.dropdown = el)}\n style={{ display: this.state.isOpen ? 'block' : undefined }}\n >\n {this.state.isOpen && (\n this.more$.next()}\n >\n \n {this.optionsList}\n {this.state.isLoading\n ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (\n \n \n \n \n ))\n : !this.state.options.length &&\n !this.tags && (\n {this.noItems ? this.noItems : i18n.t('select.empty')}\n )}\n \n \n )}\n \n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return !!Object.keys(this.errorMap || {}).length;\n }\n\n private get optionsList() {\n return this.state.options.map((item, i) => {\n const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;\n\n const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));\n\n const getLabel = () => {\n if (isTagOption) {\n return item.render.label + this.tagTextHelp;\n }\n return item.render.label;\n };\n\n return (\n \n {this.multiple ? (\n this.input?.focus()}\n onCatChange={e => {\n !isTagOption ? this.toggle(item) : this.toggleTag(item);\n e.stopPropagation();\n }}\n >\n \n {item.render.avatar ? (\n \n ) : null}\n \n {getLabel()}\n {item.render.description}\n \n \n \n ) : (\n this.input?.focus()}\n onClick={() => (isTagOption ? this.createTag(item.render.label) : this.select(item))}\n tabIndex={-1}\n >\n {item.render.avatar ? (\n \n ) : null}\n \n {getLabel()}\n {item.render.description}\n \n \n )}\n \n );\n });\n }\n\n private resolve() {\n const connector = this.connector;\n if (!connector) {\n return;\n }\n this.patchState({ isResolving: true });\n\n const ids = this.initIds();\n let tags: string[];\n\n if (this.tags) {\n tags = this.initTags();\n }\n\n const data$ = ids.length ? connector.resolve(ids).pipe(first()) : of([]);\n data$.pipe(catchError(() => of([]))).subscribe(items => {\n const selection = this.toSelectItems(connector, items);\n if (this.tags) {\n tags\n .filter(tag => !this.isTagSelected(tag, selection))\n .forEach((tag, index) => {\n const item = { id: `select-${this.id}-tag-${index}`, name: tag };\n selection.push({ item, render: { label: item.name } });\n });\n }\n this.patchState({\n isResolving: false,\n selection,\n term: !this.multiple && selection.length ? selection[0].render.label : ''\n });\n });\n }\n\n private toSelectItems(connector: CatSelectConnector, items: Item[]) {\n return items.map(item => ({\n item: { ...item, id: connector.customId ? connector.customId(item) : item.id },\n render: connector.render(item)\n }));\n }\n\n private show() {\n if (!this.state.isOpen && this.connector) {\n // reconnect to reset the connection, i.e. the pagination\n this.connect(this.connector);\n this.patchState({ isOpen: true });\n this.catOpen.emit();\n this.term$.next('');\n this.input?.classList.remove('select-input-transparent-caret');\n }\n }\n\n private hide() {\n if (this.state.isOpen) {\n this.patchState({ isOpen: false, activeOptionIndex: -1 });\n this.catClose.emit();\n return true;\n }\n return false;\n }\n\n private search(term: string) {\n this.patchState({ term, activeOptionIndex: -1, activeSelectionIndex: -1 });\n this.term$.next(term);\n }\n\n private isSelected(id: string) {\n return this.state.selection.findIndex(s => s.item.id === id) >= 0;\n }\n\n private select(item: { item: Item; render: RenderInfo }) {\n if (!this.isSelected(item.item.id)) {\n let newSelection;\n if (this.multiple) {\n newSelection = [...this.state.selection, item];\n } else {\n newSelection = [item];\n this.search(item.render.label);\n }\n this.patchState({ selection: newSelection, tempSelection: [] });\n\n if (this.multiple && this.state.term.trim() && this.input) {\n this.patchState({ term: '', activeOptionIndex: -1 });\n this.term$.next('');\n this.input.value = '';\n }\n }\n this.setTransparentCaret();\n }\n\n private deselect(id: string) {\n if (this.isSelected(id)) {\n this.patchState({\n selection: this.state.selection.filter(item => item.item.id !== id),\n activeSelectionIndex: -1\n });\n }\n }\n\n private toggle(item: { item: Item; render: RenderInfo }) {\n this.isSelected(item.item.id)\n ? this.deselect(item.item.id)\n : this.tags && this.isTagSelected(item.render.label)\n ? this.removeTag(item.render.label)\n : this.select(item);\n }\n\n private clearInput() {\n if (this.input && this.state.term) {\n this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });\n this.term$.next('');\n this.input.value = '';\n } else {\n this.patchState({ selection: [], tempSelection: [] });\n }\n }\n\n private reset(connector?: CatSelectConnector) {\n this.connector = connector ?? this.connector;\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n this.state = INIT_STATE;\n }\n\n private onClick(event: MouseEvent) {\n if (this.disabled) {\n return;\n }\n const elem = event.target as Element;\n this.trigger?.setAttribute('tabindex', '0');\n this.input?.focus();\n if (\n elem === this.trigger ||\n elem === this.input ||\n elem.classList.contains('select-btn') ||\n elem.nodeName === 'SPAN'\n ) {\n this.state.isOpen ? this.hide() : this.show();\n }\n }\n\n private onInput() {\n this.search(this.input?.value.trim() || '');\n if (!this.multiple) {\n if (this.state.selection.length) {\n const selectionClone = [...this.state.selection];\n selectionClone.pop();\n this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });\n }\n\n if (!this.input?.value.trim()) {\n this.patchState({ tempSelection: [] });\n }\n }\n this.show();\n }\n\n private update() {\n if (this.trigger && this.dropdown) {\n computePosition(this.trigger, this.dropdown, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [offset(CatSelect.DROPDOWN_OFFSET), flip()]\n }).then(({ x, y, placement }) => {\n if (this.dropdown) {\n this.dropdown.dataset.placement = placement;\n Object.assign(this.dropdown.style, {\n width: `${this.trigger?.clientWidth}px`,\n left: `${x}px`,\n top: `${y}px`\n });\n }\n });\n }\n }\n\n private patchState(update: Partial) {\n this.state = { ...this.state, ...update };\n }\n\n private isPillboxActive() {\n return this.state.activeSelectionIndex >= 0;\n }\n\n private get activeDescendant() {\n let activeDescendant = undefined;\n if (this.state.activeOptionIndex >= 0) {\n activeDescendant = `select-${this.id}-option-${this.state.activeOptionIndex}`;\n } else if (this.state.activeSelectionIndex >= 0) {\n activeDescendant = `select-${this.id}-selection-${this.state.activeSelectionIndex}`;\n }\n return activeDescendant;\n }\n\n private onArrowKeyDown(event: KeyboardEvent) {\n let preventDefault = false;\n this.input?.focus();\n\n switch (event.key) {\n case 'ArrowDown':\n preventDefault = true;\n this.state.isOpen\n ? this.patchState({\n activeOptionIndex: Math.min(this.state.activeOptionIndex + 1, this.state.options.length - 1),\n activeSelectionIndex: -1\n })\n : this.show();\n break;\n case 'ArrowUp':\n preventDefault = true;\n this.state.activeOptionIndex >= 0\n ? this.patchState({\n activeOptionIndex: Math.max(this.state.activeOptionIndex - 1, -1),\n activeSelectionIndex: -1\n })\n : this.hide();\n break;\n case 'ArrowLeft':\n if (this.input?.selectionStart === 0) {\n preventDefault = true;\n let index;\n this.state.activeSelectionIndex > 0\n ? (index = Math.max(this.state.activeSelectionIndex - 1, -1))\n : (index = this.state.selection.length - 1);\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n break;\n case 'ArrowRight':\n if (this.state.activeSelectionIndex >= 0) {\n preventDefault = true;\n let index = -1;\n if (this.state.activeSelectionIndex < this.state.selection.length - 1) {\n index = Math.min(this.state.activeSelectionIndex + 1, this.state.selection.length - 1);\n } else if (!this.state.term) {\n index = 0;\n }\n this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });\n }\n }\n\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n private get tagTextHelp() {\n return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';\n }\n\n private isTagSelected(term: string, selection: { item: Item; render: RenderInfo }[] = this.state.selection) {\n return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;\n }\n\n private createTag(term: string) {\n if (term.trim().length && !this.isTagSelected(term)) {\n const value = this.value as CatSelectMultipleTaggingValue;\n const tags = value?.tags;\n const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };\n this.select({ item: tag, render: { label: tag.name } });\n }\n this.setTransparentCaret();\n }\n\n private removeTag(label: string) {\n if (this.isTagSelected(label)) {\n const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());\n item && this.deselect(item.item.id);\n }\n }\n\n private toggleTag(item: { item: Item; render: RenderInfo }) {\n this.isTagSelected(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);\n }\n\n private initIds() {\n let ids: string[] = [];\n if (this.value) {\n if (!this.tags) {\n if (this.multiple) {\n ids = this.value as string[];\n } else {\n ids = [this.value as string];\n }\n } else {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n ids = value.ids ? value.ids : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n ids = value.id ? [value.id] : [];\n }\n }\n }\n return ids;\n }\n\n private initTags() {\n let tags: string[] = [];\n if (this.value) {\n if (this.multiple) {\n const value = this.value as CatSelectMultipleTaggingValue;\n tags = value.tags ? value.tags : [];\n } else {\n const value = this.value as CatSelectTaggingValue;\n tags = value.tag ? [value.tag] : [];\n }\n }\n return tags;\n }\n\n private setTransparentCaret() {\n if (!this.multiple) {\n this.hide();\n this.input?.classList.add('select-input-transparent-caret');\n }\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n}\n","import { Component, h, Host } from '@stencil/core';\nimport { of, delay } from 'rxjs';\n\ninterface User {\n id: string;\n firstName: string;\n lastName: string;\n desc: string;\n}\n\ninterface Country {\n id: string;\n country: string;\n capital?: string;\n}\n\n@Component({\n tag: 'cat-select-demo'\n})\nexport class CatSelectTest {\n private multipleSelect?: HTMLCatSelectElement;\n private multipleSelectAvatar?: HTMLCatSelectElement;\n private multipleSelectAvatarInitials?: HTMLCatSelectElement;\n private multipleSelectTagging?: HTMLCatSelectElement;\n private singleSelect?: HTMLCatSelectElement;\n private singleSelectAvatar?: HTMLCatSelectElement;\n private singleSelectAvatarInitials?: HTMLCatSelectElement;\n private singleSelectTagging?: HTMLCatSelectElement;\n\n componentDidLoad(): void {\n this.multipleSelect?.connect({\n resolve: (ids: string[]) => {\n return of(\n ids.map(id => ({\n id,\n firstName: 'John',\n lastName: `Doe (${id})`,\n desc: 'resolved'\n }))\n ).pipe(delay(500));\n },\n retrieve: (term: string, page: number) => {\n return term === 'no'\n ? of({ last: true, content: [], totalElements: 0 })\n : of({\n last: false,\n totalElements: 10000,\n content: Array.from({ length: 10 }, (_, i) => ({\n id: '' + (i + page * 10),\n firstName: 'John',\n lastName: `Doe (${i + page * 10})`,\n desc: `\"${term}\": page ${page}`\n }))\n }).pipe(delay(500));\n },\n render: (user: User) => ({\n label: `${user.firstName} ${user.lastName}`,\n description: user.desc\n })\n });\n this.multipleSelectAvatar?.connect({\n resolve: (ids: string[]) => {\n return of(\n ids.map(id => ({\n id,\n firstName: 'John',\n lastName: `Doe (${id})`,\n desc: 'resolved'\n }))\n ).pipe(delay(500));\n },\n retrieve: (term: string, page: number) => {\n return term === 'no'\n ? of({ last: true, content: [], totalElements: 0 })\n : of({\n last: false,\n totalElements: 10000,\n content: Array.from({ length: 10 }, (_, i) => ({\n id: '' + (i + page * 10),\n firstName: 'John',\n lastName: `Doe (${i + page * 10})`,\n desc: `\"${term}\": page ${page}`\n }))\n }).pipe(delay(500));\n },\n render: (user: User) => ({\n label: `${user.firstName} ${user.lastName}`,\n description: user.desc,\n avatar: {\n src: `https://picsum.photos/id/${Math.floor(Math.random() * 100)}/200`,\n round: true\n }\n })\n });\n this.multipleSelectAvatarInitials?.connect({\n resolve: (ids: string[]) => {\n return of(\n ids.map(id => ({\n id,\n firstName: 'John',\n lastName: `Doe (${id})`,\n desc: 'resolved'\n }))\n ).pipe(delay(500));\n },\n retrieve: (term: string, page: number) => {\n return term === 'no'\n ? of({ last: true, content: [], totalElements: 0 })\n : of({\n last: false,\n totalElements: 10000,\n content: Array.from({ length: 10 }, (_, i) => ({\n id: '' + (i + page * 10),\n firstName: 'John',\n lastName: `Doe (${i + page * 10})`,\n desc: `\"${term}\": page ${page}`\n }))\n }).pipe(delay(500));\n },\n render: (user: User) => ({\n label: `${user.firstName} ${user.lastName}`,\n description: user.desc,\n avatar: {\n round: true,\n initials: `JD`\n }\n })\n });\n this.multipleSelectTagging?.connect(this.countryConnector);\n this.singleSelect?.connect({\n resolve: (ids: string[]) => {\n return of(\n ids.map(id => ({\n id,\n firstName: 'John',\n lastName: `Doe (${id})`,\n desc: 'resolved'\n }))\n ).pipe(delay(500));\n },\n retrieve: (term: string, page: number) => {\n return term === 'no'\n ? of({ last: true, content: [], totalElements: 0 })\n : of({\n last: false,\n totalElements: 10000,\n content: Array.from({ length: 10 }, (_, i) => ({\n id: '' + (i + page * 10),\n firstName: 'John',\n lastName: `Doe (${i + page * 10})`,\n desc: `\"${term}\": page ${page}`\n }))\n }).pipe(delay(500));\n },\n render: (user: User) => ({\n label: `${user.firstName} ${user.lastName}`,\n description: user.desc\n })\n });\n this.singleSelectAvatar?.connect(this.countryConnector);\n this.singleSelectAvatarInitials?.connect({\n ...this.countryConnector,\n render: (country: Country) => ({\n label: country.country,\n description: country.capital || 'No capital',\n avatar: {\n round: true,\n initials: `${country.country.charAt(0)?.toUpperCase() ?? 'J'}${\n country.capital?.charAt(0)?.toUpperCase() ?? 'D'\n }`\n }\n })\n });\n this.singleSelectTagging?.connect(this.countryConnector);\n setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);\n }\n\n render() {\n return (\n \n (this.multipleSelect = el)}\n value={['1']}\n placeholder=\"Hello World\"\n onCatChange={() => console.log('Multiple change', this.multipleSelect?.value)}\n onCatBlur={e => console.log('Multiple blur', e)}\n multiple\n noItems=\"No results\"\n clearable\n errorUpdate={false}\n >\n Searching for \"no\" -{'>'} no options are returned!\n \n (this.multipleSelectAvatar = el)}\n value={['1']}\n placeholder=\"Hello World\"\n multiple\n clearable\n errorUpdate={false}\n >\n (this.multipleSelectAvatarInitials = el)}\n value={['1']}\n placeholder=\"Hello World\"\n multiple\n clearable\n errorUpdate={false}\n >\n (this.multipleSelectTagging = el)}\n value={{ ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }}\n placeholder=\"Select country\"\n onCatChange={() => console.log('Multiple tagging change', this.multipleSelectTagging?.value)}\n multiple\n tags\n clearable\n errorUpdate={false}\n >\n (this.singleSelect = el)}\n placeholder=\"Search for a country or capital\"\n onCatBlur={e => console.log('Single blur', e)}\n clearable\n errorUpdate={false}\n >\n (this.singleSelectAvatar = el)}\n value={'1'}\n placeholder=\"Search for a country or capital\"\n clearable\n errorUpdate={false}\n >\n (this.singleSelectAvatarInitials = el)}\n placeholder=\"Hello World\"\n clearable\n errorUpdate={false}\n >\n \n \n Open select\n \n \n (this.singleSelectTagging = el)}\n value={{ id: '', tag: 'Albania' }}\n placeholder=\"Search for a country or capital\"\n onCatChange={() => console.log('Single change', this.singleSelectTagging?.value)}\n tagHint=\"new country\"\n tags\n clearable\n errorUpdate={false}\n style={{ width: '90%' }}\n >\n \n \n \n );\n }\n\n private get countryConnector() {\n return {\n resolve: (ids: string[]) => {\n return of(ids.map(id => countries.find(value => value.id === id))).pipe(delay(500));\n },\n retrieve: (term: string, page: number) => {\n const filter = countries.filter(\n value =>\n value.country.toLowerCase().indexOf(term.toLowerCase()) === 0 ||\n value.capital?.toLowerCase().indexOf(term.toLowerCase()) === 0\n );\n const slice = filter.slice(page * 10, page * 10 + 10);\n return of({\n last: slice.length < 10,\n totalElements: filter.length,\n content: slice\n }).pipe(delay(500));\n },\n render: (country: Country) => ({\n label: country.country,\n description: country.capital || 'No capital',\n avatar: {\n src: `https://picsum.photos/id/${Math.floor(Math.random() * 100)}/200`,\n round: true\n }\n })\n };\n }\n}\n\nconst countries: Country[] = [\n {\n id: '0',\n country:\n 'Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ',\n capital: 'Kabul'\n },\n {\n id: '1',\n country: 'Albania',\n capital: 'Tirana'\n },\n {\n id: '2',\n country: 'Algeria',\n capital: 'Alger'\n },\n {\n id: '3',\n country: 'American Samoa',\n capital: 'Fagatogo'\n },\n {\n id: '4',\n country: 'Andorra',\n capital: 'Andorra la Vella'\n },\n {\n id: '5',\n country: 'Angola',\n capital: 'Luanda'\n },\n {\n id: '6',\n country: 'Anguilla',\n capital: 'The Valley'\n },\n {\n id: '7',\n country: 'Antarctica'\n },\n {\n id: '8',\n country: 'Antigua and Barbuda',\n capital: \"Saint John's\"\n },\n {\n id: '9',\n country: 'Argentina',\n capital: 'Buenos Aires'\n },\n {\n id: '10',\n country: 'Armenia',\n capital: 'Yerevan'\n },\n {\n id: '11',\n country: 'Aruba',\n capital: 'Oranjestad'\n },\n {\n id: '12',\n country: 'Australia',\n capital: 'Canberra'\n },\n {\n id: '13',\n country: 'Austria',\n capital: 'Wien'\n },\n {\n id: '14',\n country: 'Azerbaijan',\n capital: 'Baku'\n },\n {\n id: '15',\n country: 'Bahamas',\n capital: 'Nassau'\n },\n {\n id: '16',\n country: 'Bahrain',\n capital: 'al-Manama'\n },\n {\n id: '17',\n country: 'Bangladesh',\n capital: 'Dhaka'\n },\n {\n id: '18',\n country: 'Barbados',\n capital: 'Bridgetown'\n },\n {\n id: '19',\n country: 'Belarus',\n capital: 'Minsk'\n },\n {\n id: '20',\n country: 'Belgium',\n capital: 'Bruxelles [Brussel]'\n },\n {\n id: '21',\n country: 'Belize',\n capital: 'Belmopan'\n },\n {\n id: '22',\n country: 'Benin',\n capital: 'Porto-Novo'\n },\n {\n id: '23',\n country: 'Bermuda',\n capital: 'Hamilton'\n },\n {\n id: '24',\n country: 'Bhutan',\n capital: 'Thimphu'\n },\n {\n id: '25',\n country: 'Bolivia',\n capital: 'La Paz'\n },\n {\n id: '26',\n country: 'Bosnia and Herzegovina',\n capital: 'Sarajevo'\n },\n {\n id: '27',\n country: 'Botswana',\n capital: 'Gaborone'\n },\n {\n id: '28',\n country: 'Bouvet Island'\n },\n {\n id: '29',\n country: 'Brazil',\n capital: 'Brasília'\n },\n {\n id: '30',\n country: 'British Indian Ocean Territory'\n },\n {\n id: '31',\n country: 'Brunei',\n capital: 'Bandar Seri Begawan'\n },\n {\n id: '32',\n country: 'Bulgaria',\n capital: 'Sofia'\n },\n {\n id: '33',\n country: 'Burkina Faso',\n capital: 'Ouagadougou'\n },\n {\n id: '34',\n country: 'Burundi',\n capital: 'Bujumbura'\n },\n {\n id: '35',\n country: 'Cambodia',\n capital: 'Phnom Penh'\n },\n {\n id: '36',\n country: 'Cameroon',\n capital: 'Yaound'\n },\n {\n id: '37',\n country: 'Canada',\n capital: 'Ottawa'\n },\n {\n id: '38',\n country: 'Cape Verde',\n capital: 'Praia'\n },\n {\n id: '39',\n country: 'Cayman Islands',\n capital: 'George Town'\n },\n {\n id: '40',\n country: 'Central African Republic',\n capital: 'Bangui'\n },\n {\n id: '41',\n country: 'Chad',\n capital: \"N'Djam\"\n },\n {\n id: '42',\n country: 'Chile',\n capital: 'Santiago de Chile'\n },\n {\n id: '43',\n country: 'China',\n capital: 'Peking'\n },\n {\n id: '44',\n country: 'Christmas Island',\n capital: 'Flying Fish Cove'\n },\n {\n id: '45',\n country: 'Cocos (Keeling) Islands',\n capital: 'West Island'\n },\n {\n id: '46',\n country: 'Colombia',\n capital: 'Santaf'\n },\n {\n id: '47',\n country: 'Comoros',\n capital: 'Moroni'\n },\n {\n id: '48',\n country: 'Congo',\n capital: 'Brazzaville'\n },\n {\n id: '49',\n country: 'Cook Islands',\n capital: 'Avarua'\n },\n {\n id: '50',\n country: 'Costa Rica',\n capital: 'San José'\n },\n {\n id: '51',\n country: 'Croatia',\n capital: 'Zagreb'\n },\n {\n id: '52',\n country: 'Cuba',\n capital: 'La Habana'\n },\n {\n id: '53',\n country: 'Cyprus',\n capital: 'Nicosia'\n },\n {\n id: '54',\n country: 'Czech Republic',\n capital: 'Praha'\n },\n {\n id: '55',\n country: 'Denmark',\n capital: 'Copenhagen'\n },\n {\n id: '56',\n country: 'Djibouti',\n capital: 'Djibouti'\n },\n {\n id: '57',\n country: 'Dominica',\n capital: 'Roseau'\n },\n {\n id: '58',\n country: 'Dominican Republic',\n capital: 'Santo Domingo de Guzm'\n },\n {\n id: '59',\n country: 'East Timor',\n capital: 'Dili'\n },\n {\n id: '60',\n country: 'Ecuador',\n capital: 'Quito'\n },\n {\n id: '61',\n country: 'Egypt',\n capital: 'Cairo'\n },\n {\n id: '62',\n country: 'El Salvador',\n capital: 'San Salvador'\n },\n {\n id: '63',\n country: 'England',\n capital: 'London'\n },\n {\n id: '64',\n country: 'Equatorial Guinea',\n capital: 'Malabo'\n },\n {\n id: '65',\n country: 'Eritrea',\n capital: 'Asmara'\n },\n {\n id: '66',\n country: 'Estonia',\n capital: 'Tallinn'\n },\n {\n id: '67',\n country: 'Ethiopia',\n capital: 'Addis Abeba'\n },\n {\n id: '68',\n country: 'Falkland Islands',\n capital: 'Stanley'\n },\n {\n id: '69',\n country: 'Faroe Islands',\n capital: 'Tórshavn'\n },\n {\n id: '70',\n country: 'Fiji Islands',\n capital: 'Suva'\n },\n {\n id: '71',\n country: 'Finland',\n capital: 'Helsinki [Helsingfors]'\n },\n {\n id: '72',\n country: 'France',\n capital: 'Paris'\n },\n {\n id: '73',\n country: 'French Guiana',\n capital: 'Cayenne'\n },\n {\n id: '74',\n country: 'French Polynesia',\n capital: 'Papeete'\n },\n {\n id: '75',\n country: 'French Southern territories'\n },\n {\n id: '76',\n country: 'Gabon',\n capital: 'Libreville'\n },\n {\n id: '77',\n country: 'Gambia',\n capital: 'Banjul'\n },\n {\n id: '78',\n country: 'Georgia',\n capital: 'Tbilisi'\n },\n {\n id: '79',\n country: 'Germany',\n capital: 'Berlin'\n },\n {\n id: '80',\n country: 'Ghana',\n capital: 'Accra'\n },\n {\n id: '81',\n country: 'Gibraltar',\n capital: 'Gibraltar'\n },\n {\n id: '82',\n country: 'Greece',\n capital: 'Athenai'\n },\n {\n id: '83',\n country: 'Greenland',\n capital: 'Nuuk'\n },\n {\n id: '84',\n country: 'Grenada',\n capital: \"Saint George's\"\n },\n {\n id: '85',\n country: 'Guadeloupe',\n capital: 'Basse-Terre'\n },\n {\n id: '86',\n country: 'Guam',\n capital: 'Aga'\n },\n {\n id: '87',\n country: 'Guatemala',\n capital: 'Ciudad de Guatemala'\n },\n {\n id: '88',\n country: 'Guinea',\n capital: 'Conakry'\n },\n {\n id: '89',\n country: 'Guinea-Bissau',\n capital: 'Bissau'\n },\n {\n id: '90',\n country: 'Guyana',\n capital: 'Georgetown'\n },\n {\n id: '91',\n country: 'Haiti',\n capital: 'Port-au-Prince'\n },\n {\n id: '92',\n country: 'Heard Island and McDonald Islands'\n },\n {\n id: '93',\n country: 'Holy See (Vatican City State)',\n capital: 'Citt'\n },\n {\n id: '94',\n country: 'Honduras',\n capital: 'Tegucigalpa'\n },\n {\n id: '95',\n country: 'Hong Kong',\n capital: 'Victoria'\n },\n {\n id: '96',\n country: 'Hungary',\n capital: 'Budapest'\n },\n {\n id: '97',\n country: 'Iceland',\n capital: 'Reykjavík'\n },\n {\n id: '98',\n country: 'India',\n capital: 'New Delhi'\n },\n {\n id: '99',\n country: 'Indonesia',\n capital: 'Jakarta'\n },\n {\n id: '100',\n country: 'Iran',\n capital: 'Tehran'\n },\n {\n id: '101',\n country: 'Iraq',\n capital: 'Baghdad'\n },\n {\n id: '102',\n country: 'Ireland',\n capital: 'Dublin'\n },\n {\n id: '103',\n country: 'Israel',\n capital: 'Jerusalem'\n },\n {\n id: '104',\n country: 'Italy',\n capital: 'Roma'\n },\n {\n id: '105',\n country: 'Ivory Coast',\n capital: 'Yamoussoukro'\n },\n {\n id: '106',\n country: 'Jamaica',\n capital: 'Kingston'\n },\n {\n id: '107',\n country: 'Japan',\n capital: 'Tokyo'\n },\n {\n id: '108',\n country: 'Jordan',\n capital: 'Amman'\n },\n {\n id: '109',\n country: 'Kazakhstan',\n capital: 'Astana'\n },\n {\n id: '110',\n country: 'Kenya',\n capital: 'Nairobi'\n },\n {\n id: '111',\n country: 'Kiribati',\n capital: 'Bairiki'\n },\n {\n id: '112',\n country: 'Kuwait',\n capital: 'Kuwait'\n },\n {\n id: '113',\n country: 'Kyrgyzstan',\n capital: 'Bishkek'\n },\n {\n id: '114',\n country: 'Laos',\n capital: 'Vientiane'\n },\n {\n id: '115',\n country: 'Latvia',\n capital: 'Riga'\n },\n {\n id: '116',\n country: 'Lebanon',\n capital: 'Beirut'\n },\n {\n id: '117',\n country: 'Lesotho',\n capital: 'Maseru'\n },\n {\n id: '118',\n country: 'Liberia',\n capital: 'Monrovia'\n },\n {\n id: '119',\n country: 'Libyan Arab Jamahiriya',\n capital: 'Tripoli'\n },\n {\n id: '120',\n country: 'Liechtenstein',\n capital: 'Vaduz'\n },\n {\n id: '121',\n country: 'Lithuania',\n capital: 'Vilnius'\n },\n {\n id: '122',\n country: 'Luxembourg',\n capital: 'Luxembourg [Luxemburg/L'\n },\n {\n id: '123',\n country: 'Macao',\n capital: 'Macao'\n },\n {\n id: '124',\n country: 'North Macedonia',\n capital: 'Skopje'\n },\n {\n id: '125',\n country: 'Madagascar',\n capital: 'Antananarivo'\n },\n {\n id: '126',\n country: 'Malawi',\n capital: 'Lilongwe'\n },\n {\n id: '127',\n country: 'Malaysia',\n capital: 'Kuala Lumpur'\n },\n {\n id: '128',\n country: 'Maldives',\n capital: 'Male'\n },\n {\n id: '129',\n country: 'Mali',\n capital: 'Bamako'\n },\n {\n id: '130',\n country: 'Malta',\n capital: 'Valletta'\n },\n {\n id: '131',\n country: 'Marshall Islands',\n capital: 'Dalap-Uliga-Darrit'\n },\n {\n id: '132',\n country: 'Martinique',\n capital: 'Fort-de-France'\n },\n {\n id: '133',\n country: 'Mauritania',\n capital: 'Nouakchott'\n },\n {\n id: '134',\n country: 'Mauritius',\n capital: 'Port-Louis'\n },\n {\n id: '135',\n country: 'Mayotte',\n capital: 'Mamoutzou'\n },\n {\n id: '136',\n country: 'Mexico',\n capital: 'Ciudad de M'\n },\n {\n id: '137',\n country: 'Micronesia, Federated States of',\n capital: 'Palikir'\n },\n {\n id: '138',\n country: 'Moldova',\n capital: 'Chisinau'\n },\n {\n id: '139',\n country: 'Monaco',\n capital: 'Monaco-Ville'\n },\n {\n id: '140',\n country: 'Mongolia',\n capital: 'Ulan Bator'\n },\n {\n id: '141',\n country: 'Montenegro',\n capital: 'Podgorica'\n },\n {\n id: '142',\n country: 'Montserrat',\n capital: 'Plymouth'\n },\n {\n id: '143',\n country: 'Morocco',\n capital: 'Rabat'\n },\n {\n id: '144',\n country: 'Mozambique',\n capital: 'Maputo'\n },\n {\n id: '145',\n country: 'Myanmar',\n capital: 'Rangoon (Yangon)'\n },\n {\n id: '146',\n country: 'Namibia',\n capital: 'Windhoek'\n },\n {\n id: '147',\n country: 'Nauru',\n capital: 'Yaren'\n },\n {\n id: '148',\n country: 'Nepal',\n capital: 'Kathmandu'\n },\n {\n id: '149',\n country: 'Netherlands',\n capital: 'Amsterdam'\n },\n {\n id: '150',\n country: 'Netherlands Antilles',\n capital: 'Willemstad'\n },\n {\n id: '151',\n country: 'New Caledonia',\n capital: 'Noum'\n },\n {\n id: '152',\n country: 'New Zealand',\n capital: 'Wellington'\n },\n {\n id: '153',\n country: 'Nicaragua',\n capital: 'Managua'\n },\n {\n id: '154',\n country: 'Niger',\n capital: 'Niamey'\n },\n {\n id: '155',\n country: 'Nigeria',\n capital: 'Abuja'\n },\n {\n id: '156',\n country: 'Niue',\n capital: 'Alofi'\n },\n {\n id: '157',\n country: 'Norfolk Island',\n capital: 'Kingston'\n },\n {\n id: '158',\n country: 'North Korea',\n capital: 'Pyongyang'\n },\n {\n id: '159',\n country: 'Northern Ireland',\n capital: 'Belfast'\n },\n {\n id: '160',\n country: 'Northern Mariana Islands',\n capital: 'Garapan'\n },\n {\n id: '161',\n country: 'Norway',\n capital: 'Oslo'\n },\n {\n id: '162',\n country: 'Oman',\n capital: 'Masqat'\n },\n {\n id: '163',\n country: 'Pakistan',\n capital: 'Islamabad'\n },\n {\n id: '164',\n country: 'Palau',\n capital: 'Koror'\n },\n {\n id: '165',\n country: 'Palestine',\n capital: 'Gaza'\n },\n {\n id: '166',\n country: 'Panama',\n capital: 'Ciudad de Panamá'\n },\n {\n id: '167',\n country: 'Papua New Guinea',\n capital: 'Port Moresby'\n },\n {\n id: '168',\n country: 'Paraguay',\n capital: 'Asunción'\n },\n {\n id: '169',\n country: 'Peru',\n capital: 'Lima'\n },\n {\n id: '170',\n country: 'Philippines',\n capital: 'Manila'\n },\n {\n id: '171',\n country: 'Pitcairn',\n capital: 'Adamstown'\n },\n {\n id: '172',\n country: 'Poland',\n capital: 'Warszawa'\n },\n {\n id: '173',\n country: 'Portugal',\n capital: 'Lisboa'\n },\n {\n id: '174',\n country: 'Puerto Rico',\n capital: 'San Juan'\n },\n {\n id: '175',\n country: 'Qatar',\n capital: 'Doha'\n },\n {\n id: '176',\n country: 'Reunion',\n capital: 'Saint-Denis'\n },\n {\n id: '177',\n country: 'Romania',\n capital: 'Bucuresti'\n },\n {\n id: '178',\n country: 'Russian Federation',\n capital: 'Moscow'\n },\n {\n id: '179',\n country: 'Rwanda',\n capital: 'Kigali'\n },\n {\n id: '180',\n country: 'Saint Helena',\n capital: 'Jamestown'\n },\n {\n id: '181',\n country: 'Saint Kitts and Nevis',\n capital: 'Basseterre'\n },\n {\n id: '182',\n country: 'Saint Lucia',\n capital: 'Castries'\n },\n {\n id: '183',\n country: 'Saint Pierre and Miquelon',\n capital: 'Saint-Pierre'\n },\n {\n id: '184',\n country: 'Saint Vincent and the Grenadines',\n capital: 'Kingstown'\n },\n {\n id: '185',\n country: 'Samoa',\n capital: 'Apia'\n },\n {\n id: '186',\n country: 'San Marino',\n capital: 'San Marino'\n },\n {\n id: '187',\n country: 'Sao Tome and Principe',\n capital: 'São Tomé'\n },\n {\n id: '188',\n country: 'Saudi Arabia',\n capital: 'Riyadh'\n },\n {\n id: '189',\n country: 'Scotland',\n capital: 'Edinburgh'\n },\n {\n id: '190',\n country: 'Senegal',\n capital: 'Dakar'\n },\n {\n id: '191',\n country: 'Serbia',\n capital: 'Belgrade'\n },\n {\n id: '192',\n country: 'Seychelles',\n capital: 'Victoria'\n },\n {\n id: '193',\n country: 'Sierra Leone',\n capital: 'Freetown'\n },\n {\n id: '194',\n country: 'Singapore',\n capital: 'Singapore'\n },\n {\n id: '195',\n country: 'Slovakia',\n capital: 'Bratislava'\n },\n {\n id: '196',\n country: 'Slovenia',\n capital: 'Ljubljana'\n },\n {\n id: '197',\n country: 'Solomon Islands',\n capital: 'Honiara'\n },\n {\n id: '198',\n country: 'Somalia',\n capital: 'Mogadishu'\n },\n {\n id: '199',\n country: 'South Africa',\n capital: 'Pretoria'\n },\n {\n id: '200',\n country: 'South Georgia and the South Sandwich Islands'\n },\n {\n id: '201',\n country: 'South Korea',\n capital: 'Seoul'\n },\n {\n id: '202',\n country: 'South Sudan',\n capital: 'Juba'\n },\n {\n id: '203',\n country: 'Spain',\n capital: 'Madrid'\n },\n {\n id: '204',\n country: 'Sri Lanka',\n capital: 'Colombo, Sri Jayawardenepura Kotte'\n },\n {\n id: '205',\n country: 'Sudan',\n capital: 'Khartum'\n },\n {\n id: '206',\n country: 'Suriname',\n capital: 'Paramaribo'\n },\n {\n id: '207',\n country: 'Svalbard and Jan Mayen',\n capital: 'Longyearbyen'\n },\n {\n id: '208',\n country: 'Swaziland',\n capital: 'Mbabane'\n },\n {\n id: '209',\n country: 'Sweden',\n capital: 'Stockholm'\n },\n {\n id: '210',\n country: 'Switzerland',\n capital: 'Bern'\n },\n {\n id: '211',\n country: 'Syria',\n capital: 'Damascus'\n },\n {\n id: '212',\n country: 'Tajikistan',\n capital: 'Dushanbe'\n },\n {\n id: '213',\n country: 'Tanzania',\n capital: 'Dodoma'\n },\n {\n id: '214',\n country: 'Thailand',\n capital: 'Bangkok'\n },\n {\n id: '215',\n country: 'The Democratic Republic of Congo',\n capital: 'Kinshasa'\n },\n {\n id: '216',\n country: 'Togo',\n capital: 'Lomé'\n },\n {\n id: '217',\n country: 'Tokelau',\n capital: 'Fakaofo'\n },\n {\n id: '218',\n country: 'Tonga',\n capital: \"Nuku'alofa\"\n },\n {\n id: '219',\n country: 'Trinidad and Tobago',\n capital: 'Port-of-Spain'\n },\n {\n id: '220',\n country: 'Tunisia',\n capital: 'Tunis'\n },\n {\n id: '221',\n country: 'Turkey',\n capital: 'Ankara'\n },\n {\n id: '222',\n country: 'Turkmenistan',\n capital: 'Ashgabat'\n },\n {\n id: '223',\n country: 'Turks and Caicos Islands',\n capital: 'Cockburn Town'\n },\n {\n id: '224',\n country: 'Tuvalu',\n capital: 'Funafuti'\n },\n {\n id: '225',\n country: 'Uganda',\n capital: 'Kampala'\n },\n {\n id: '226',\n country: 'Ukraine',\n capital: 'Kyiv'\n },\n {\n id: '227',\n country: 'United Arab Emirates',\n capital: 'Abu Dhabi'\n },\n {\n id: '228',\n country: 'United Kingdom',\n capital: 'London'\n },\n {\n id: '229',\n country: 'United States',\n capital: 'Washington'\n },\n {\n id: '230',\n country: 'United States Minor Outlying Islands'\n },\n {\n id: '231',\n country: 'Uruguay',\n capital: 'Montevideo'\n },\n {\n id: '232',\n country: 'Uzbekistan',\n capital: 'Toskent'\n },\n {\n id: '233',\n country: 'Vanuatu',\n capital: 'Port-Vila'\n },\n {\n id: '234',\n country: 'Venezuela',\n capital: 'Caracas'\n },\n {\n id: '235',\n country: 'Vietnam',\n capital: 'Hanoi'\n },\n {\n id: '236',\n country: 'Virgin Islands, British',\n capital: 'Road Town'\n },\n {\n id: '237',\n country: 'Virgin Islands, U.S.',\n capital: 'Charlotte Amalie'\n },\n {\n id: '238',\n country: 'Wales',\n capital: 'Cardiff'\n },\n {\n id: '239',\n country: 'Wallis and Futuna',\n capital: 'Mata-Utu'\n },\n {\n id: '240',\n country: 'Western Sahara',\n capital: 'El-Aai'\n },\n {\n id: '241',\n country: 'Yemen',\n capital: 'Sanaa'\n },\n {\n id: '242',\n country: 'Zambia',\n capital: 'Lusaka'\n },\n {\n id: '243',\n country: 'Zimbabwe',\n capital: 'Harare'\n }\n];\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$skeleton-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n /**\n * @prop --background: The background color of the skeleton.\n * @prop --highlight: The highlight color of the skeleton.\n * @prop --speed: The animation speed.\n */\n display: flex;\n flex-direction: column;\n position: relative;\n\n --background: #{cat-token('color.ui.background.skeleton')};\n --highlight: #{cat-token('color.ui.background.skeletonHighlight')};\n --speed: 2s;\n}\n\n:host([variant='square']),\n:host([variant='circle']) {\n display: inline-flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([variant='head']:not(:last-child)) {\n margin-bottom: $cat-head-margin-bottom;\n}\n\n:host([variant='body']:not(:last-child)) {\n margin-bottom: $cat-body-margin-bottom;\n}\n\n.skeleton {\n display: block;\n border-radius: cat-border-radius('m');\n background: var(--background);\n}\n\n.skeleton-circle {\n border-radius: 10rem;\n}\n\n// ----- size\n\n@mixin size($size, $lvl) {\n $-text-offset: 4px;\n .skeleton-#{$size} {\n &.skeleton-rectangle {\n width: var(--width, 100%);\n height: var(--height, map.get($skeleton-sizes, $size));\n }\n\n &.skeleton-square,\n &.skeleton-circle {\n width: var(--width, map.get($skeleton-sizes, $size));\n height: var(--height, map.get($skeleton-sizes, $size));\n }\n\n &.skeleton-head,\n &.skeleton-body {\n width: var(--width, var(--line-width, 100%));\n }\n\n &.skeleton-head {\n height: calc(#{cat-head-font-size($lvl)} - #{$-text-offset});\n margin: calc((#{cat-head-line-height($lvl)} - #{cat-head-font-size($lvl)} + #{$-text-offset}) * 0.5) 0;\n }\n\n &.skeleton-body {\n height: calc(#{cat-body-font-size($size)} - #{$-text-offset});\n margin: calc((#{cat-body-line-height($size)} - #{cat-body-font-size($size)} + #{$-text-offset}) * 0.5) 0;\n }\n }\n}\n\n@include size('xs', 5);\n@include size('s', 4);\n@include size('m', 3);\n@include size('l', 2);\n@include size('xl', 1);\n\n// ----- animation\n\n.skeleton-sheen {\n background: linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%)\n var(--background);\n background-size: 300% 100%;\n animation: sheen var(--speed) ease-in-out infinite;\n}\n\n.skeleton-pulse {\n position: relative;\n overflow: hidden;\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: var(--highlight);\n animation: var(--speed) ease-in-out 0.5s infinite normal none running pulse;\n opacity: 0;\n }\n}\n\n@keyframes sheen {\n 0% {\n background-position: right;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 1;\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * Skeletons are used to show where content will eventually be drawn.\n */\n@Component({\n tag: 'cat-skeleton',\n styleUrl: 'cat-skeleton.scss',\n shadow: true\n})\nexport class CatSkeleton {\n /**\n * The animation style of the skeleton.\n */\n @Prop() effect: 'plain' | 'sheen' | 'pulse' = 'sheen';\n\n /**\n * The rendering style of the skeleton.\n */\n @Prop() variant: 'rectangle' | 'square' | 'circle' | 'head' | 'body' = 'rectangle';\n\n /**\n * The size of the skeleton. If the variant is set to \"head\", the size values\n * \"xs\" to \"xl\" translate to the head levels `h1` to `h5`.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The number of text lines to be rendered for \"head\" and \"body\" variants.\n * Defaults to 1 for \"head\" and 3 for \"body\". Will be ignored for other\n * variants.\n */\n @Prop() lines?: number;\n\n render() {\n return (\n \n {Array.from(Array(this.count)).map(() => (\n \n ))}\n \n );\n }\n\n private get count() {\n switch (this.variant) {\n case 'head':\n return Math.max(1, this.lines || 1);\n case 'body':\n return Math.max(1, this.lines || 3);\n default:\n return 1;\n }\n }\n\n private get style() {\n return this.variant === 'head' || this.variant === 'body'\n ? {\n '--line-width': `${this.random(50, 100)}%`\n }\n : undefined;\n }\n\n private random(min: number, max: number) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$spinner-sizes: (\n 'xl': 1.75rem,\n 'l': 1.5rem,\n 'm': 1.25rem,\n 's': 1rem,\n 'xs': 0.75rem\n);\n\n:host {\n display: inline-flex;\n vertical-align: middle;\n @include cat-select(none);\n\n &[hidden] {\n display: none;\n }\n}\n\nspan {\n display: inline-flex;\n}\n\nsvg {\n fill: none;\n stroke: currentColor;\n stroke-dasharray: 135px;\n stroke-dashoffset: 95px;\n stroke-linecap: round;\n stroke-width: 5px;\n transform-origin: center center;\n animation: spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;\n width: 1em;\n height: 1em;\n}\n\n// ----- sizes\n\n@mixin size($size) {\n .spinner-#{$size} svg {\n font-size: map.get($spinner-sizes, $size);\n }\n}\n\n@include size('xs');\n@include size('s');\n@include size('m');\n@include size('l');\n@include size('xl');\n\n// ----- animation\n\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Spinners are used to indicate users that their action is being processed.\n */\n@Component({\n tag: 'cat-spinner',\n styleUrl: 'cat-spinner.scss',\n shadow: true\n})\nexport class CatSpinner {\n /**\n * The size of the spinner.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the spinner that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n \n \n \n \n );\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n","import { Component, h, Prop, Event, EventEmitter, Listen, Host, Element } from '@stencil/core';\nimport { Breakpoint } from '../../utils/breakpoints';\n\nlet nextUniqueId = 0;\n\n/**\n * A single tab inside a tabs component.\n */\n@Component({\n tag: 'cat-tab',\n styleUrl: 'cat-tab.scss',\n shadow: true\n})\nexport class CatTab {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The label of the tab.\n */\n @Prop({ reflect: true }) label = '';\n\n /**\n * The name of an icon to be displayed in the tab.\n */\n @Prop({ reflect: true }) icon?: string;\n\n /**\n * Hide the actual button content and only display the tab.\n */\n @Prop({ reflect: true }) iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop({ reflect: true }) iconRight = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop({ reflect: true }) url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop({ reflect: true }) urlTarget?: '_blank' | '_self';\n\n /**\n * Specifies that the tab should be deactivated.\n */\n @Prop({ reflect: true }) deactivated = false;\n\n /**\n * Specifies that the tab content pane contains an error. This will color\n * the tab in an error state and also switch to an error icon if an icon\n * is specified.\n */\n @Prop({ reflect: true }) error = false;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when tab is clicked.\n */\n @Event() catClick!: EventEmitter;\n\n connectedCallback() {\n if (!this.hostElement.id) {\n this.hostElement.id = `cat-tab-${nextUniqueId++}`;\n }\n }\n\n @Listen('click')\n onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n render() {\n return ;\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 -1px 0 0 cat-token('color.ui.border.default');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host([tabs-align='center']) {\n justify-content: center;\n}\n\n:host([tabs-align='right']) {\n justify-content: end;\n}\n\n:host([tabs-align='justify']) {\n cat-button {\n flex: 1 0 auto;\n }\n}\n\n.cat-tab {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n position: relative;\n transition: none;\n\n &:first-of-type {\n margin-left: -0.75rem;\n }\n\n &:last-of-type {\n margin-right: -0.75rem;\n }\n\n &::after {\n opacity: 0;\n content: '';\n position: absolute;\n background: currentColor;\n left: 0.75rem;\n right: 0.75rem;\n bottom: 0;\n height: 2px;\n }\n\n &:hover::after {\n opacity: 0.25;\n }\n\n &.cat-tab-active {\n font-weight: 700;\n color: cat-token('color.theme.primary.textActive');\n }\n\n &.cat-tab-error {\n color: cat-token('color.theme.danger.textActive');\n }\n\n &.cat-tab-active::after {\n opacity: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\n\n/**\n * Tabs are used to display multiple panels to be contained within a single\n * window, using tabs as a navigational element.\n *\n * @part tab - The header of the tab.\n */\n@Component({\n tag: 'cat-tabs',\n styleUrl: 'cat-tabs.scss',\n shadow: true\n})\nexport class CatTabs {\n private mutationObserver?: MutationObserver;\n\n @Element() hostElement!: HTMLElement;\n\n @State() tabs: HTMLCatTabElement[] = [];\n\n /**\n * The ID of the active tab.\n */\n @Prop({ mutable: true, reflect: true }) activeTab = '';\n\n /**\n * The alignment of the tabs.\n */\n @Prop() tabsAlign: 'left' | 'center' | 'right' | 'justify' = 'left';\n\n componentWillLoad(): void {\n this.syncTabs();\n }\n\n componentDidLoad() {\n this.mutationObserver = new MutationObserver(\n mutations => mutations.some(value => value.target.nodeName === 'CAT-TAB') && this.syncTabs()\n );\n this.mutationObserver?.observe(this.hostElement, {\n childList: true,\n attributes: true,\n subtree: true\n });\n }\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n @Watch('activeTab')\n onActiveTabChange(id: string) {\n const index = this.tabs.findIndex(tab => tab.id === id);\n this.catChange.emit({ id, index });\n }\n\n @Listen('keydown')\n onKeydown(event: KeyboardEvent): void {\n if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {\n const elements = this.hostElement.shadowRoot?.querySelectorAll('cat-button[role=\"tab\"]');\n const targetElements = Array.from(elements ?? []).filter(button => !button.disabled);\n const activeElement = this.hostElement.shadowRoot?.activeElement as HTMLCatButtonElement;\n const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;\n const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;\n const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;\n targetElements[targetIdx].doFocus();\n event.preventDefault();\n }\n }\n\n /**\n * Activates the tab with the given id.\n *\n * @param id The tab id.\n */\n @Method()\n async setActive(id: string): Promise {\n this.activate(this.tabs.find(tab => tab.id === id));\n }\n\n /**\n * Activates the tab with the given index.\n *\n * @param index The tab index.\n */\n @Method()\n async setActiveIndex(index: number): Promise {\n this.activate(this.tabs[index]);\n }\n\n /**\n * Emitted when active tab is changed.\n */\n @Event() catChange!: EventEmitter<{ id: string; index: number }>;\n\n render() {\n return (\n \n {this.tabs.map((tab: HTMLCatTabElement) => {\n return (\n this.click(tab)}\n nativeAttributes={{ ...tab.nativeAttributes }}\n nativeContentAttributes={{ 'data-text': tab.label }}\n data-dropdown-no-close\n >\n {tab.label}\n \n );\n })}\n \n );\n }\n\n private syncTabs() {\n this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));\n this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab))[0]?.id;\n }\n\n private canActivate(tab?: HTMLCatTabElement): tab is HTMLCatTabElement {\n return !!tab && !tab.deactivated && !tab.url && tab.id !== this.activeTab;\n }\n\n private click(tab?: HTMLCatTabElement) {\n if (this.canActivate(tab)) {\n tab.click();\n this.activate(tab);\n }\n }\n\n private activate(tab?: HTMLCatTabElement) {\n if (this.canActivate(tab)) {\n this.activeTab = tab.id;\n }\n }\n}\n","var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;\"undefined\"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&\"TEXTAREA\"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){a({testForHeightReduction:\"\"===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),l=function(o){t.removeEventListener(\"autosize:destroy\",l),t.removeEventListener(\"autosize:update\",s),t.removeEventListener(\"input\",i),window.removeEventListener(\"resize\",s),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener(\"autosize:destroy\",l),t.addEventListener(\"autosize:update\",s),t.addEventListener(\"input\",i),window.addEventListener(\"resize\",s),t.style.overflowX=\"hidden\",t.style.wordWrap=\"break-word\",e.set(t,{destroy:l,update:s}),s()}function a(e){var o,i,l=e.restoreTextAlign,s=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,c=n.overflowY;if(0!==t.scrollHeight&&(\"vertical\"===n.resize?t.style.resize=\"none\":\"both\"===n.resize&&(t.style.resize=\"horizontal\"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior=\"auto\",t.scrollTop=o,t.style.scrollBehavior=null})}}(t),t.style.height=\"\"),i=\"content-box\"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),\"none\"!==n.maxHeight&&i>parseFloat(n.maxHeight)?(\"hidden\"===n.overflowY&&(t.style.overflow=\"scroll\"),i=parseFloat(n.maxHeight)):\"hidden\"!==n.overflowY&&(t.style.overflow=\"hidden\"),t.style.height=i+\"px\",s&&(t.style.textAlign=s),o&&o(),r!==i&&(t.dispatchEvent(new Event(\"autosize:resized\",{bubbles:!0})),r=i),c!==n.overflow&&!s)){var v=n.textAlign;\"hidden\"===n.overflow&&(t.style.textAlign=\"start\"===v?\"end\":\"start\"),a({restoreTextAlign:v,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r;export default n;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n@use 'utils/color';\n@use '_snippets/form-label';\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n @include cat-body('m');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.textarea-field,\n.textarea-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex: 1 1 auto;\n}\n\n.textarea-field.textarea-horizontal {\n flex-direction: row;\n gap: 1rem;\n}\n\n.textarea-readonly {\n pointer-events: none;\n}\n\n.textarea-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.icon-suffix {\n position: absolute;\n top: calc(0.625rem - 2px);\n right: 0.75rem;\n background: cat-token('color.ui.background.input', 0.75);\n border-radius: 100rem;\n\n .textarea-disabled & {\n background: cat-token('color.ui.background.muted', 0.75);\n }\n}\n\ntextarea {\n margin: 0;\n padding: 0.625rem 0.75rem;\n box-sizing: border-box;\n min-height: form-label.$cat-input-height;\n font: inherit;\n background: cat-token('color.ui.background.input');\n border-radius: cat-border-radius('m');\n border: none;\n box-shadow: inset 0 0 0 1px rgb(var(--border-color));\n transition: box-shadow cat-token('time.transition.s') linear;\n resize: vertical;\n --border-color: #{cat-token('color.ui.border.dark', $wrap: false)};\n\n &:disabled {\n background: cat-token('color.ui.background.muted');\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n resize: none;\n }\n\n &:not(:disabled):hover {\n box-shadow:\n inset 0 0 0 1px rgb(var(--border-color)),\n 0 0 0 1px rgb(var(--border-color));\n }\n\n &:focus {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: -1px;\n }\n\n .textarea-invalid & {\n --border-color: #{cat-token('color.theme.danger.bg', 0.2, $wrap: false)};\n }\n\n &::placeholder {\n color: cat-token('color.ui.font.muted');\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:-webkit-autofill {\n &,\n &:hover,\n &:focus {\n -webkit-box-shadow: 0 0 0 9999px cat-token('color.ui.background.inputAutofill') inset;\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport autosize from 'autosize';\nimport log from 'loglevel';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nlet nextUniqueId = 0;\n\n/**\n * Textarea specifies a control that allows user to write text over multiple\n * rows. Used when the expected user input is long. For shorter input, use the\n * input component.\n *\n * @slot hint - Optional hint element to be displayed with the textarea.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The native label element.\n * @part textarea - The native textarea element.\n */\n@Component({\n tag: 'cat-textarea',\n styleUrl: 'cat-textarea.scss',\n shadow: true\n})\nexport class CatTextarea {\n private readonly _id = `cat-textarea-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private textarea!: HTMLTextAreaElement;\n private errorMapSrc?: ErrorMap;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() errorMap?: ErrorMap;\n\n /**\n * Whether the label need a marker to shown if the textarea is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Whether the textarea is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the textarea.\n */\n @Prop() hint?: string | string[];\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the textarea.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Specifies the initial number of lines in the textarea.\n */\n @Prop() rows = 3;\n\n /**\n * The initial value of the control.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML textarea element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the textarea received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillRender(): void {\n this.onErrorsChanged(this.errors);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on textarea', this);\n }\n }\n\n componentDidLoad(): void {\n autosize(this.textarea);\n }\n\n /**\n * Programmatically move focus to the textarea. Use this method instead of\n * `textarea.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.textarea.focus(options);\n }\n\n /**\n * Programmatically remove focus from the textarea. Use this method instead of\n * `textarea.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.textarea.blur();\n }\n\n /**\n * Clear the textarea.\n */\n @Method()\n async clear(): Promise {\n this.value = '';\n this.catChange.emit(this.value);\n }\n\n @Watch('errors')\n onErrorsChanged(value?: boolean | string[] | ErrorMap) {\n if (!coerceBoolean(this.errorUpdate)) {\n this.errorMap = undefined;\n } else {\n this.errorMapSrc = Array.isArray(value)\n ? (value as string[]).reduce((acc, err) => ({ ...acc, [err]: undefined }), {})\n : value === true\n ? {}\n : value || undefined;\n this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();\n }\n }\n\n render() {\n return (\n \n \n \n {(this.hasSlottedLabel || this.label) && (\n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n {!this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (\n \n ({i18n.t('input.optional')})\n \n )}\n {this.required && this.requiredMarker?.startsWith('required') && (\n \n ({i18n.t('input.required')})\n \n )}\n {this.maxLength && (\n \n {this.value?.length ?? 0}/{this.maxLength}\n \n )}\n \n \n \n )}\n \n \n \n (this.textarea = el as HTMLTextAreaElement)}\n id={this.id}\n disabled={this.disabled}\n maxlength={this.maxLength}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n >\n {this.invalid && (\n this.textarea.focus()}\n >\n )}\n \n {this.hasHint && (\n }\n errorMap={this.errorMap}\n />\n )}\n \n \n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint || this.invalid;\n }\n\n private get invalid() {\n return !!Object.keys(this.errorMap || {}).length;\n }\n\n private onInput() {\n this.value = this.textarea.value;\n this.catChange.emit(this.value);\n this.showErrorsIfTimeout();\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n if (coerceBoolean(this.errorUpdate)) {\n this.showErrors();\n }\n }\n\n private showErrors() {\n this.errorMap = this.errorMapSrc;\n }\n\n private errorUpdateTimeoutId?: number;\n private showErrorsIfTimeout() {\n const errorUpdate = coerceNumber(this.errorUpdate, null);\n if (errorUpdate !== null) {\n typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);\n this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);\n return true;\n }\n return false;\n }\n\n private showErrorsIfNoFocus() {\n const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.textarea;\n if (!hasFocus) {\n this.showErrors();\n }\n }\n}\n","import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport function getHour12(language: string): boolean {\n const dateStr = new Intl.DateTimeFormat(language, { hour: '2-digit', minute: '2-digit' })\n .format(new Date())\n .toLowerCase();\n return dateStr.includes('am') || dateStr.includes('pm');\n}\n\nexport function getLocale(language: string) {\n return {\n change: i18n.t('timepicker.change'),\n choose: i18n.t('timepicker.choose'),\n timeFormat: getHour12(language) ? '12' : '24'\n };\n}\n\nexport function formatIso(date: Date) {\n return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;\n}\n","export function clampTime(min: string | null, date: Date, max: string | null): Date {\n const [, hhMin, mmMin] = min?.match(/(\\d{2}):(\\d{2})/)?.map(Number) ?? [];\n const [, hhMax, mmMax] = max?.match(/(\\d{2}):(\\d{2})/)?.map(Number) ?? [];\n let minTime = -Infinity;\n let maxTime = Infinity;\n if (hhMin !== undefined && mmMin !== undefined) {\n minTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), hhMin, mmMin).getTime();\n }\n if (hhMax !== undefined && mmMax !== undefined) {\n maxTime = new Date(date.getFullYear(), date.getMonth(), date.getDate(), hhMax, mmMax).getTime();\n }\n return new Date(Math.min(Math.max(date.getTime(), minTime), maxTime));\n}\n\nexport function isBefore(date: Date, time: string | null): boolean {\n const [, hh, mm] = time?.match(/(\\d{2}):(\\d{2})/)?.map(Number) ?? [];\n if (hh === undefined || mm === undefined) {\n return false;\n }\n return date.getHours() < hh || (date.getHours() === hh && date.getMinutes() < mm);\n}\n\nexport function isAfter(date: Date, time: string | null): boolean {\n const [, hh, mm] = time?.match(/(\\d{2}):(\\d{2})/)?.map(Number) ?? [];\n if (hh === undefined || mm === undefined) {\n return false;\n }\n return date.getHours() > hh || (date.getHours() === hh && date.getMinutes() > mm);\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-aria {\n @include cat-visually-hidden;\n}\n\n.cat-time-addon {\n margin-left: -1px;\n}\n\nnav {\n max-height: 16rem;\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n}\n\n.time-disabled {\n opacity: 0.25;\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { formatIso, getLocale } from './cat-time-locale';\nimport { clampTime, isAfter, isBefore } from './cat-time-math';\n\n/**\n * A time input component to select a time in a dropdown.\n */\n@Component({\n tag: 'cat-time',\n styleUrl: 'cat-time.scss',\n shadow: true\n})\nexport class CatTime {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() selectionTime: Date | null = null;\n\n @State() isAm = true;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum time value given in HH:mm format.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value given in HH:mm format.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control given in HH:mm format\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n /**\n * The step size for times in minutes.\n */\n @Prop() step = 30;\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.syncValue(this.value ?? '');\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n componentDidLoad() {\n this.input?.mask({\n time: true,\n timeFormat: this.locale.timeFormat,\n timePattern: ['h', 'm']\n });\n }\n\n @Listen('catOpen')\n onOpen() {\n const query = (selector: string) => this.hostElement.shadowRoot?.querySelector(selector);\n const time = clampTime(this.min ?? null, this.selectionTime ?? new Date(2000, 5, 1, 8), this.max ?? null);\n const elem1 = query(`[data-time=\"${formatIso(time)}\"]`);\n time.setMinutes(Math.floor(time.getMinutes() / this.step) * this.step);\n const elem2 = query(`[data-time=\"${formatIso(time)}\"]`);\n setTimeout(() => {\n (elem2 ?? elem1)?.doFocus();\n (elem2 ?? elem1)?.scrollIntoView(this.selectionTime ? { block: 'center' } : undefined);\n }); // not entirely sure why this is necessary\n }\n\n /**\n * Select a time in the picker.\n *\n * @param date The time to select.\n */\n @Method()\n async select(date: Date | null): Promise {\n const oldValue = this.value;\n if (!date) {\n this.selectionTime = null;\n this.value = undefined;\n } else {\n const time = clampTime(this.min ?? null, date, this.max ?? null);\n this.isAm = this.format(time).toLowerCase().includes('am');\n this.selectionTime = time;\n this.value = formatIso(time);\n }\n // we need to set the input explicitly to sync the input even without a\n // rerender (if the value is not changed)\n if (this.input) {\n this.input.value = this.format(this.selectionTime, false);\n }\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.input?.clear();\n }\n\n render() {\n return (\n \n (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n label={this.label}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n value={this.format(this.selectionTime, false)}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n onCatFocus={e => this.catFocus.emit(e.detail)}\n onCatBlur={e => this.onInputBlur(e.detail)}\n >\n \n {this.hasSlottedLabel && }\n {!this.hasSlottedLabel && this.label}\n (HH:mm)\n \n \n {this.locale.timeFormat === '12' && (\n this.toggleAm()}\n >\n {this.isAm ? 'AM' : 'PM'}\n \n )}\n \n \n \n \n {this.timeArray().map(time => {\n const isoTime = formatIso(time);\n const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);\n return (\n \n this.select(time)}\n data-time={isoTime}\n >\n {this.format(time)}\n \n \n );\n })}\n \n \n \n \n {this.hasSlottedHint && (\n \n \n \n )}\n \n \n );\n }\n\n private timeArray() {\n const result = [];\n const start = new Date(2000, 5, 1, 0, 0, 0);\n let time = new Date(start.getTime());\n while (time.getDate() === start.getDate()) {\n result.push(time);\n time = new Date(time.getTime() + this.step * 60000);\n }\n return result;\n }\n\n private syncValue(value: string) {\n const [, hh, mm] = value.match(/(\\d{2}):(\\d{2})/)?.map(Number) ?? [];\n if (hh === undefined || mm === undefined) {\n this.select(null);\n return;\n }\n this.select(\n this.locale.timeFormat === '24'\n ? new Date(2000, 5, 1, hh, mm, 0)\n : new Date(2000, 5, 1, (hh % 12) + (this.isAm ? 0 : 12), mm, 0)\n );\n }\n\n private toggleAm() {\n if (this.selectionTime) {\n this.select(new Date(this.selectionTime.getTime() + (this.isAm ? 12 : -12) * 3600000));\n } else {\n this.isAm = !this.isAm;\n }\n }\n\n private onInputBlur(e: FocusEvent) {\n this.syncValue(this.input?.value ?? '');\n this.catBlur.emit(e);\n }\n\n private format(date: Date | null, includeAmPm = true) {\n const str = date\n ? new Intl.DateTimeFormat(this.language, {\n hour: '2-digit',\n minute: '2-digit'\n }).format(date)\n : '';\n return includeAmPm ? str : str.replace(/\\s?(am|pm)/i, '');\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n if (!this.value) return;\n const min = (mode === 'min' ? limit : this.min) ?? null;\n const max = (mode === 'max' ? limit : this.max) ?? null;\n const [match, hh, mm] = this.value.match(/(\\d{2}):(\\d{2})/) ?? [];\n const newValue = match ? formatIso(clampTime(min, new Date(2000, 5, 1, Number(hh), Number(mm)), max)) : undefined;\n if (this.value !== newValue) {\n this.syncValue(newValue ?? '');\n this.catChange.emit(newValue);\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$toggle-width: 2rem;\n$toggle-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n}\n\n.label-left {\n flex-direction: row-reverse;\n}\n\ninput {\n position: absolute;\n margin: 0;\n width: $toggle-width;\n height: $toggle-height;\n opacity: 0;\n cursor: inherit;\n}\n\n.toggle-placeholder {\n width: calc($toggle-width + 1px);\n flex-shrink: 0;\n}\n\n.toggle {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: $toggle-width;\n height: $toggle-height;\n border-radius: 10rem;\n background-color: cat-token('color.ui.border.dark');\n transition: background-color cat-token('time.transition.s') ease;\n pointer-events: none;\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n\n &::after {\n content: '';\n position: absolute;\n width: 1rem;\n height: 1rem;\n background: #fff;\n border-radius: 10rem;\n transform: translateX(calc(2px - 0.5rem));\n transition: transform cat-token('time.transition.s') linear;\n @include cat-elevation(2);\n\n :checked + & {\n transform: translateX(calc(-2px + 0.5rem));\n background: cat-token('color.theme.primary.fill');\n }\n }\n\n .is-disabled & {\n background-color: cat-token('color.ui.border.dark');\n }\n}\n\n:host(.cat-error) {\n .toggle {\n background-color: cat-token('color.theme.danger.bg', 0.2);\n }\n\n :checked + .toggle {\n background-color: cat-token('color.theme.danger.bg');\n\n &::after {\n background: cat-token('color.theme.danger.fill');\n }\n }\n}\n\n.label {\n flex: 1 1 auto;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Toggles are graphical interface switches that give user control over a\n * feature or option that can be turned on or off.\n *\n * @slot hint - Optional hint element to be displayed with the toggle.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-toggle',\n styleUrls: ['cat-toggle.scss'],\n shadow: true\n})\nexport class CatToggle {\n private readonly _id = `cat-toggle-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Checked state of the toggle.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Disabled state of the toggle.\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label of the toggle that is visible.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the input.\n */\n @Prop() name?: string;\n\n /**\n * Required state of the toggle.\n */\n @Prop() required = false;\n\n /**\n * The value of the checked toggle.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value?: any;\n\n /**\n * The value of the unchecked toggle.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() noValue?: any;\n\n /**\n * The resolved value of the toggle, based on the checked state, value and noValue.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) resolvedValue: any = null;\n\n /**\n * Optional hint text(s) to be displayed with the toggle.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the toggle.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the checked status of the toggle is changed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the toggle received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.updateResolved();\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on toggle', this);\n }\n }\n\n /**\n * Programmatically move focus to the toggle. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the toggle. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n class=\"form-check-input\"\n role=\"switch\"\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n \n \n } />\n \n )}\n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = this.input.checked;\n this.updateResolved();\n this.catChange.emit(this.resolvedValue);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n\n private updateResolved() {\n this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;\n }\n}\n","const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n\nexport default isTouchDevice;\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n$-max-width: 20rem;\n$-box-shadow: rgb(0 0 0 / 8%) 0 1px 8px 0;\n$-shift-padding: 0.25rem; // padding given to the shift() middleware\n\n:host {\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.tooltip {\n --cat-font-color-head: #{cat-token('color.ui.font.tooltip', $wrap: false)};\n --cat-font-color-body: #{cat-token('color.ui.font.tooltip', $wrap: false)};\n position: fixed;\n width: max-content;\n top: 0;\n left: 0;\n box-sizing: border-box;\n @include cat-body('s', 500);\n background-color: cat-token('color.ui.background.tooltip');\n border-radius: cat-border-radius('m');\n color: cat-token('color.ui.font.tooltip');\n transition:\n opacity cat-token('time.transition.m') linear,\n visibility cat-token('time.transition.m') linear;\n visibility: hidden;\n opacity: 0;\n box-shadow: $-box-shadow;\n z-index: cat-z-index('tooltip');\n max-width: min(calc(100vw - 2 * $-shift-padding), $-max-width);\n\n &-hidden {\n @include cat-visually-hidden;\n }\n\n &-show {\n opacity: 1;\n visibility: visible;\n }\n\n p {\n margin: 0;\n }\n}\n\n// ----- round\n\n.tooltip-round {\n border-radius: 10rem;\n}\n\n// ----- size\n\n.tooltip-s {\n padding: 0.375rem 0.5rem;\n\n &.tooltip-round {\n padding: 0.375rem 0.75rem;\n }\n}\n\n.tooltip-m {\n padding: 0.75rem;\n\n &.tooltip-round {\n padding: 0.75rem 1rem;\n }\n}\n\n.tooltip-l {\n padding: 1rem;\n\n &.tooltip-round {\n padding: 1rem 1.5rem;\n }\n}\n","import { autoUpdate, computePosition, flip, offset, Placement, shift } from '@floating-ui/dom';\nimport { Component, Element, h, Host, Listen, Prop, State } from '@stencil/core';\nimport isTouchScreen from '../../utils/is-touch-screen';\n\nlet nextUniqueId = 0;\n\n/**\n * Tooltips display additional information when the user hovers over or\n * interacts with a trigger element. The tooltip can be customized with\n * different placements, sizes, and styles.\n */\n@Component({\n tag: 'cat-tooltip',\n styleUrl: 'cat-tooltip.scss',\n shadow: true\n})\nexport class CatTooltip {\n private static readonly OFFSET = 4;\n private static readonly SHIFT_PADDING = 4;\n private readonly id = `cat-tooltip-${nextUniqueId++}`;\n private tooltip?: HTMLElement;\n private trigger?: Element;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n private inactive = false;\n private cleanupFloatingUi?: () => void;\n\n private readonly boundShowListener: () => void;\n private readonly boundHideListener: () => void;\n private readonly boundWindowTouchStartListener: () => void;\n private readonly boundTouchStartListener: (event: Event) => void;\n private readonly boundTouchEndListener: () => void;\n\n constructor() {\n this.boundShowListener = this.showListener.bind(this);\n this.boundHideListener = this.hideListener.bind(this);\n this.boundWindowTouchStartListener = this.windowTouchStartListener.bind(this);\n this.boundTouchStartListener = this.touchStartListener.bind(this);\n this.boundTouchEndListener = this.touchEndListener.bind(this);\n }\n\n @Element() hostElement!: HTMLElement;\n\n @State() open = false;\n\n /**\n * The content of the tooltip.\n */\n @Prop() content = '';\n\n /**\n * Specifies that the tooltip should be disabled. A disabled tooltip is unusable,\n * and invisible. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * The placement of the tooltip.\n */\n @Prop() placement: Placement = 'top';\n\n /**\n * Use round tooltip edges.\n */\n @Prop() round = false;\n\n /**\n * The size of the tooltip.\n */\n @Prop() size: 's' | 'm' | 'l' = 'm';\n\n /**\n * The delay time for showing tooltip in ms.\n */\n @Prop() showDelay = 250;\n\n /**\n * The delay time for hiding tooltip in ms.\n */\n @Prop() hideDelay = 0;\n\n /**\n * The duration of tap to show the tooltip.\n */\n @Prop() longTouchDuration = 1000;\n\n @Listen('keydown')\n handleKeyDown({ key }: KeyboardEvent) {\n key === 'Escape' && this.hideTooltip();\n }\n\n componentDidLoad(): void {\n const slot = this.hostElement.shadowRoot?.querySelector('slot');\n this.trigger = slot?.assignedElements?.()?.[0];\n if (this.trigger && !this.trigger.hasAttribute('aria-describedby')) {\n this.trigger.setAttribute('aria-describedby', this.id);\n }\n\n if (isTouchScreen) {\n window.addEventListener('touchstart', this.boundWindowTouchStartListener);\n this.trigger?.addEventListener('touchstart', this.boundTouchStartListener);\n this.trigger?.addEventListener('touchend', this.boundTouchEndListener);\n } else {\n this.trigger?.addEventListener('focusin', this.boundShowListener);\n this.trigger?.addEventListener('focusout', this.boundHideListener);\n this.trigger?.addEventListener('mouseenter', this.boundShowListener);\n this.trigger?.addEventListener('mouseleave', this.boundHideListener);\n }\n }\n\n componentWillRender(): void {\n this.inactive = this.disabled || (!this.content && !this.hostElement.querySelector('[slot=\"content\"]'));\n }\n\n disconnectedCallback(): void {\n if (isTouchScreen) {\n window.removeEventListener('touchstart', this.boundWindowTouchStartListener);\n this.trigger?.removeEventListener('touchstart', this.boundTouchStartListener);\n this.trigger?.removeEventListener('touchend', this.boundTouchEndListener);\n } else {\n this.trigger?.removeEventListener('mouseenter', this.boundShowListener);\n this.trigger?.removeEventListener('mouseleave', this.boundHideListener);\n this.trigger?.removeEventListener('focusin', this.boundShowListener);\n this.trigger?.removeEventListener('focusout', this.boundHideListener);\n }\n }\n\n render() {\n return (\n \n \n (this.tooltip = el)}\n id={this.id}\n role=\"tooltip\"\n aria-hidden={!this.open}\n aria-live={this.open ? 'polite' : 'off'}\n class={{\n tooltip: true,\n 'tooltip-hidden': this.inactive,\n 'tooltip-round': this.round,\n [`tooltip-${this.size}`]: Boolean(this.size)\n }}\n >\n \n {/* The paragraph is needed here to make aria-live work properly. */}\n {this.content}\n \n \n \n );\n }\n\n private async update() {\n if (this.trigger && this.tooltip) {\n await computePosition(this.trigger, this.tooltip, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [\n offset(CatTooltip.OFFSET),\n flip({ fallbackAxisSideDirection: 'start' }),\n shift({ padding: CatTooltip.SHIFT_PADDING })\n ]\n }).then(({ x, y }) => {\n if (this.tooltip) {\n Object.assign(this.tooltip.style, {\n left: `${Math.max(0, x)}px`,\n top: `${y}px`\n });\n }\n });\n }\n }\n\n private showListener() {\n window.clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n if (!this.showTimeout) {\n this.showTimeout = window.setTimeout(() => {\n this.showTimeout = undefined;\n this.showTooltip();\n }, this.showDelay);\n }\n }\n\n private hideListener() {\n window.clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n if (!this.hideTimeout) {\n this.hideTimeout = window.setTimeout(() => {\n this.hideTimeout = undefined;\n this.hideTooltip();\n }, this.hideDelay);\n }\n }\n\n private touchStartListener(event: Event) {\n event.stopPropagation();\n if (!this.touchTimeout) {\n this.touchTimeout = window.setTimeout(() => {\n this.touchTimeout = undefined;\n this.showTooltip();\n }, this.longTouchDuration);\n }\n }\n\n private touchEndListener() {\n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = undefined;\n this.hideTooltip();\n }\n\n private windowTouchStartListener() {\n this.hideTooltip();\n }\n\n private showTooltip() {\n if (this.trigger && this.tooltip) {\n this.cleanupFloatingUi = autoUpdate(this.trigger, this.tooltip, () => this.update());\n }\n if (!this.inactive) {\n this.open = true;\n this.tooltip?.classList.add('tooltip-show');\n }\n }\n\n private hideTooltip() {\n this.open = false;\n this.tooltip?.classList.remove('tooltip-show');\n this.cleanupFloatingUi?.();\n this.cleanupFloatingUi = undefined;\n }\n}\n"],"mappings":"oPACO,MAAMA,EAA0BC,GAAkBC,GAAW,SAASC,IACzED,EAAOE,MACPA,KAAKC,KAAO,0BACZD,KAAKE,QAAU,qBACnB,ICAO,MAAMC,UAAgBC,EACzB,WAAAC,GACIC,QACAN,KAAKO,OAAS,MACdP,KAAKQ,iBAAmB,KACxBR,KAAKS,UAAY,GACjBT,KAAKU,UAAY,MACjBV,KAAKW,SAAW,MAChBX,KAAKY,YAAc,IAC3B,CACI,IAAAC,CAAKC,GACD,MAAMC,EAAU,IAAIC,EAAiBhB,KAAMA,MAC3Ce,EAAQD,SAAWA,EACnB,OAAOC,CACf,CACI,cAAAE,GACI,GAAIjB,KAAKO,OAAQ,CACb,MAAM,IAAIX,CACtB,CACA,CACI,IAAAsB,CAAKC,GACDC,GAAa,KACTpB,KAAKiB,iBACL,IAAKjB,KAAKU,UAAW,CACjB,IAAKV,KAAKQ,iBAAkB,CACxBR,KAAKQ,iBAAmBa,MAAMC,KAAKtB,KAAKS,UAC5D,CACgB,IAAK,MAAMc,KAAYvB,KAAKQ,iBAAkB,CAC1Ce,EAASL,KAAKC,EAClC,CACA,IAEA,CACI,KAAAK,CAAMC,GACFL,GAAa,KACTpB,KAAKiB,iBACL,IAAKjB,KAAKU,UAAW,CACjBV,KAAKW,SAAWX,KAAKU,UAAY,KACjCV,KAAKY,YAAca,EACnB,MAAMhB,UAAE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aAAa,GACjB5wE,KAAKoxE,U,EAIJ,kBAAAZ,CAAmB96D,GACzBA,EAAM0L,kBACN,IAAKphB,KAAKqxE,aAAc,CACtBrxE,KAAKqxE,aAAe19D,OAAO8X,YAAW,KACpCzrB,KAAKqxE,aAAehuE,UACpBrD,KAAKkxE,aAAa,GACjBlxE,KAAKsxE,kB,EAIJ,gBAAAZ,GACN/8D,OAAO6X,aAAaxrB,KAAKqxE,cACzBrxE,KAAKqxE,aAAehuE,UACpBrD,KAAK4wE,a,CAGC,wBAAAN,GACNtwE,KAAK4wE,a,CAGC,WAAAM,GACN,GAAIlxE,KAAKquD,SAAWruD,KAAK8wE,QAAS,CAChC9wE,KAAKuxE,kBAAoBt0B,GAAWj9C,KAAKquD,QAASruD,KAAK8wE,SAAS,IAAM9wE,KAAKk9C,U,CAE7E,IAAKl9C,KAAKgwE,SAAU,CAClBhwE,KAAKq1B,KAAO,KACZr1B,KAAK8wE,SAAS9kD,UAAU/iB,IAAI,e,EAIxB,WAAA2nE,GACN5wE,KAAKq1B,KAAO,MACZr1B,KAAK8wE,SAAS9kD,UAAU9iB,OAAO,gBAC/BlJ,KAAKuxE,sBACLvxE,KAAKuxE,kBAAoBluE,S,oCAtNHysE,GAAA5gB,OAAS,EACT4gB,GAAAiB,cAAgB,E"} \ No newline at end of file diff --git a/build/p-f4ed5946.entry.js.map b/build/p-f4ed5946.entry.js.map deleted file mode 100644 index b95d66ab..00000000 --- a/build/p-f4ed5946.entry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ObjectUnsubscribedError","createErrorClass","_super","ObjectUnsubscribedErrorImpl","this","name","message","Subject","Observable","constructor","super","closed","currentObservers","observers","isStopped","hasError","thrownError","lift","operator","subject","AnonymousSubject","_throwIfClosed","next","value","errorContext","Array","from","observer","error","err","length","shift","complete","unsubscribe","observed","_a","_trySubscribe","subscriber","_subscribe","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","push","Subscription","arrRemove","asObservable","observable","source","create","destination","_b","call","subscribe","dateTimestampProvider","now","delegate","Date","undefined","Action","scheduler","work","schedule","state","delay","intervalProvider","setInterval","handler","timeout","args","clearInterval","handle","AsyncAction","pending","id","recycleAsyncId","requestAsyncId","_id","flush","bind","_scheduler","execute","Error","_execute","_delay","errored","errorValue","e","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","async","EMPTY","EmptyError","EmptyErrorImpl","isValidDate","isNaN","map","project","thisArg","operate","index","createOperatorSubscriber","isArray","callOrApply","fn","mapOneOrManyArgs","mergeInternals","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","active","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerFrom","innerValue","bufferedValue","executeSchedule","mergeMap","resultSelector","Infinity","isFunction","a","i","b","ii","mergeAll","identity","concatAll","concat","popScheduler","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","target","eventName","options","pipe","add","remove","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","isArrayLike","subTarget","TypeError","addListener","removeListener","on","off","addEventListener","removeEventListener","timer","dueTime","intervalOrScheduler","intervalDuration","isScheduler","due","n","merge","popNumber","sources","filter","predicate","audit","durationSelector","hasValue","lastValue","durationSubscriber","endDuration","cleanupDuration","auditTime","duration","catchError","selector","innerSub","syncUnsub","handledResult","scanInternals","accumulator","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","debounce","emit","noop","defaultIfEmpty","defaultValue","take","count","seen","ignoreElements","mapTo","delayWhen","delayDurationSelector","subscriptionDelay","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","first","currentKey","throwIfEmpty","errorFactory","defaultErrorFactory","hasDefaultValue","arguments","v","scan","startWith","values","switchMap","innerSubscriber","innerIndex","outerIndex","takeUntil","notifier","takeWhile","inclusive","result","tap","observerOrNext","tapObserver","isUnsub","finalize","setAttributeDefault","host","attr","hostElement","hasAttribute","setAttribute","String","catAlertCss","CatAlertStyle0","CatAlert","mapIcon","Map","mapRole","connectedCallback","get","color","render","h","Host","key","noIcon","size","icon","class","loadImg","src","Promise","resolve","reject","image","Image","catAvatarCss","CatAvatarStyle0","CatAvatar","onSrcChanged","then","backgroundImage","componentWillLoad","componentWillRender","label","log","warn","url","href","urlTarget","style","cssStyle","cssClass","content","getInitials","avatar","round","Boolean","initials","split","join","catBadgeCss","CatBadgeStyle0","CatBadge","_breakpoints","Breakpoints","xs","s","m","l","xl","isBreakpoint","includes","hasV8BreakIterator","Intl","v8BreakIterator","Platform","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_platform","_matchMedia","matchMedia","query","createEmptyStyleRule","has","document","createElement","head","appendChild","sheet","insertRule","catButtonCss","CatButtonStyle0","CatButton","onIconOnlyChanged","mediaQueryList","mediaQueryListener","mediaMatcher","event","_iconOnly","matches","iconOnly","isIconButton","a11yLabel","haltDisabledEvents","disabled","loading","preventDefault","stopImmediatePropagation","doFocus","button","focus","doBlur","blur","doClick","click","nativeAttributes","ref","el","a11yCurrent","buttonId","part","noEllipsis","variant","onClick","onFocus","onBlur","type","submit","buttonGroupPosition","iconSize","spinnerSize","hasPrefixIcon","iconRight","hasSuffixIcon","nativeContentAttributes","catClick","catFocus","catBlur","catButtonGroupCss","CatButtonGroupStyle0","CatButtonGroup","formElements","role","onSlotchange","onSlotChange","querySelectorAll","forEach","element","catCardCss","CatCardStyle0","CatCard","CatFormHint","props","hint","slottedHint","errorMap","errors","Object","entries","params","i18n","t","item","catCheckboxCss","CatCheckboxStyle0","nextUniqueId","CatCheckbox","identifier","updateResolved","hasSlottedLabel","querySelector","hasSlottedHint","input","htmlFor","labelHidden","labelLeft","checked","required","indeterminate","onInput","hasHint","viewBox","points","catChange","resolvedValue","noValue","getDays","language","weekday","date","firstDayOfWeek","getUTCDate","getUTCDay","format","DateTimeFormat","keys","day","getTime","setUTCDate","getMonths","month","setUTCMonth","getWeekInfo","locale","Locale","weekInfo","firstDay","minDays","weekend","getFormat","year","replace","getLocale","prevYear","nextYear","prevMonth","nextMonth","arrowKeys","today","change","choose","clear","formatStr","days","short","long","months","getFullYear","getMonth","getDate","fromLocalISO","match","Number","toLocalISO","toString","padStart","toLocalStr","isLeapYear","addDays","addMonth","maxDays","newDate","setDate","setMonth","Math","min","isSameYear","date1","date2","isSameMonth","isSameDay","clampDate","max","catDateCss","CatDateStyle0","CatDate","onMinChanged","oldMin","reclamp","onMaxChanged","oldMax","inputValue","componentDidLoad","p1","d1","p2","p3","exec","mask","dateMin","dateMax","delimiter","datePattern","requiredMarker","horizontal","autoComplete","clearable","placeholder","textPrefix","textSuffix","readonly","errorUpdate","onCatFocus","stopPropagation","detail","onCatBlur","onInputBlur","slot","placement","arrowNavigation","noResize","onCatOpen","dateInline","resetView","getTriggerA11yLabel","weeks","noClear","onCatChange","onDateChange","oldValue","dateParsed","parse","select","formatParts","parts","indexOf","isInteger","mode","limit","oldDate","limitDate","newValue","catDateInlineCss","CatDateInlineStyle0","CatDateInline","focusDate","focusedDate","all","shadowRoot","dataset","startDate","endDate","getValue","componentDidRender","onKeyDown","shiftKey","minDate","maxDate","getMinMaxDate","range","toRangeValue","dateStart","viewDate","dateGrid","dateEnd","picker","navigate","getHeadline","onFocusin","setAriaLive","_","title","getWeekNumber","isStartDate","isEndDate","isRange","isToday","canFocus","canClick","tabindex","noToday","direction","period","setFullYear","text","node","innerHTML","getDay","daysInMonth","daysBefore","daysAfter","iso8601","currentDate","dayNum","yearStart","ceil","minDay","JSON","stringify","HOOKS","defaults","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","animate","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disable","disableMobile","enableSeconds","enableTime","errorHandler","console","getWeek","givenDate","setHours","week1","hourIncrement","ignoredFocusElements","inline","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onChange","onClose","onDayCreate","onDestroy","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","position","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","pad","number","slice","int","bool","wait","_this","clearTimeout","setTimeout","apply","arrayify","obj","toggleClass","elem","className","classList","tag","textContent","clearNode","firstChild","removeChild","findParent","condition","parentNode","createNumberInput","inputClassName","opts","wrapper","numInput","arrowUp","arrowDown","pattern","getEventTarget","composedPath","path","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","G","hour","getHours","parseFloat","H","J","K","RegExp","M","shortMonth","S","seconds","setSeconds","U","unixSeconds","W","weekNum","weekNumber","parseInt","Y","Z","ISODate","d","minutes","setMinutes","j","u","unixMillSeconds","w","y","tokenRegex","formats","toISOString","getSeconds","getMinutes","substring","createDateFormatter","config","_c","l10n","_d","isMobile","frmt","overrideLocale","formatDate","c","arr","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","datestr","trim","parseDate","matched","ops","matchIndex","regexStr","token","isBackSlash","escaped","val","compareDates","isBetween","ts","ts1","ts2","calculateSecondsSinceMidnight","hours","parseSeconds","secondsSinceMidnight","floor","DAY","getDefaultHours","minHour","minMinutes","minSeconds","maxHr","maxMinutes","assign","_i","_loop_1","args_1","__assign","p","prototype","hasOwnProperty","__spreadArrays","il","r","k","jl","DEBOUNCED_CHANGE_MS","FlatpickrInstance","instanceConfig","self","defaultOptions","flatpickr","defaultConfig","English","_handlers","pluginElements","loadedPlugins","_bind","_setHoursFromDate","setHoursFromDate","_positionCalendar","positionCalendar","changeMonth","changeYear","close","onMouseOver","_createElement","createDay","destroy","isEnabled","jumpToDate","updateValue","open","redraw","set","toggle","setupHelperFunctions","utils","getDaysInMonth","yr","currentMonth","currentYear","init","isOpen","parseConfig","setupLocale","setupInputs","setupDates","build","bindEvents","selectedDates","latestSelectedDateObj","setCalendarWidth","isSafari","triggerEvent","getClosestActiveElement","calendarContainer","getRootNode","activeElement","bindToInstance","requestAnimationFrame","visibility","display","daysContainer","daysWidth","offsetWidth","width","weekWrapper","removeProperty","updateTime","defaultDate","getMilliseconds","timeWrapper","prevValue","_input","setHoursFromInputs","_debouncedChange","ampm2military","military2ampm","hourElement","minuteElement","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","currentTime","onYearInput","eventTarget","delta","ev","triggerChange","evt","setupMobile","debouncedResize","onResize","ontouchstart","documentClick","capture","monthNav","onMonthNavClick","selectDate","timeContainer","selText","timeIncrement","jumpDate","jumpTo","oldYear","oldMonth","buildMonthSwitch","incrementNumInput","contains","inputElem","createEvent","dispatchEvent","fragment","createDocumentFragment","tabIndex","buildMonthNav","innerContainer","buildWeeks","rContainer","buildWeekdays","buildDays","buildTime","customAppend","appendTo","nodeType","insertBefore","nextSibling","body","_dayNumber","dateIsEnabled","dayElement","$i","todayDateElem","isDateSelected","selectedDateElem","isDateInRange","insertAdjacentHTML","focusOnDayElem","targetNode","getFirstAvailableDay","startMonth","endMonth","children","startIndex","endIndex","getNextAvailableDay","current","givenMonth","loopDelta","numMonthDays","abs","focusOnDay","offset","dayFocused","isInView","startElem","buildMonthDays","firstOfMonth","prevMonthDays","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayContainer","frag","shouldBuildMonth","monthsDropdownContainer","selected","buildMonth","container","monthNavFragment","monthElement","selectedMonth","yearInput","yearElement","getElementsByTagName","buildMonths","prevMonthNav","yearElements","monthElements","nextMonthNav","defineProperty","__hidePrevMonthArrow","__hideNextMonthArrow","currentYearElement","updateNavigationCurrentMonth","separator","hourInput","minuteInput","secondInput","getAttribute","weekdayContainer","updateWeekdays","splice","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","triggerChangeEvent","toInitial","mobileInput","_initialDate","lastChild","_type","removeAttribute","isCalendarElem","eventTarget_1","isCalendarElement","isInput","lostFocus","relatedTarget","isIgnored","some","newYear","newYearNum","isNewYear","dateToCheck","enable","array","parsed","to","valueChanged","trimEnd","getDateStr","allowKeydown","allowInlineKeydown","keyCode","isTimeObj","focusAndClose","delta_1","ctrlKey","elems","x","charAt","toLowerCase","cellClass","hoverDate","firstElementChild","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","hoverableCells","dayElem","timestamp","outOfRange","_positionElement","wasOpen","minMaxDateSetter","inverseDateObj","boolOpts","userConfig","_enable","dates","parseDateRules","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","getInputElem","l10ns","default","customPositionElement","calendarHeight","reduce","acc","child","offsetHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","getBoundingClientRect","distanceFromBottom","innerHeight","bottom","showOnTop","top","pageYOffset","left","pageXOffset","isCenter","isRight","right","rightMost","centerMost","doc","getDocumentStyleSheet","bodyWidth","centerLeft","centerBefore","centerAfter","centerIndex","cssRules","centerStyle","editableSheet","styleSheets","createStyleSheet","msMaxTouchPoints","isSelectable","selectedDate","shouldChangeMonth","selectedIndex","sort","single","CALLBACKS","updatePositionElement","option","setSelectedDate","inputDate","rule","preloadedDate","nodeName","inputType","mobileFormatStr","step","data","hooks","initEvent","specificFormat","dObj","isPrevMonth","isNextMonth","isKeyDown","curValue","which","isHourElem","isMinuteElem","_flatpickr","nodeList","nodes","HTMLElement","instances","HTMLCollection","NodeList","Node","en","localize","setDefaults","jQuery","fp_incr","findClosest","Element","nextElement","ShadowRoot","parentElement","global","factory","module","exports","weekSelectPlugin","fp","onDayHover","childNodes","dayIndSeven","weekStartDay","weekEndDay","day_1","highlightWeek","selDate","clearHover","getConfig","more","_dates","_dateStr","nativePickerAttributes","instance","dateStr","start","end","applyChange","formatTime","minute","time","datetime","daterange","getHour12","getFirstDayOfWeek","daysForLocale","monthsForLocale","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","evaluate","param","getSide","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","height","computeCoordsFromPlacement","_ref","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","isRTL","getElementRects","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","initialPlacement","elements","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","crossAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","arrow","alignmentOffset","isBasePlacement","placements","overflow","overflows","overflowsData","sides","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","resetPlacement","_overflowsData$map$so","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","isYAxis","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","getDimensions","getNodeName","isNode","getWindow","_node$ownerDocument","ownerDocument","defaultView","documentElement","isHTMLElement","isShadowRoot","isOverflowElement","overflowX","overflowY","getComputedStyle","isTableElement","isContainingBlock","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","supports","getNodeScroll","scrollLeft","scrollTop","assignedSlot","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","visualViewport","frameElement","getCssDimensions","hasOffset","shouldFallback","$","unwrapElement","domElement","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","isTopLayer","topLayer","scroll","offsets","isOffsetParentAnElement","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","scrollWidth","clientWidth","scrollHeight","clientHeight","getViewportRect","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","shouldDropCurrentNode","ancestor","elementClippingAncestors","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","getTrueOffsetParent","polyfill","getOffsetParentFn","getDimensionsFn","observeMove","onMove","io","timeoutId","root","cleanup","_io","disconnect","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","rootMargin","isFirstUpdate","handleObserve","ratio","intersectionRatio","IntersectionObserver","observe","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","passive","cleanupIo","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","shift$1","flip$1","size$1","mergedOptions","platformWithCache","computePosition$1","catDatepickerCss","CatDatepickerStyle0","CatDatepickerFlat","onValueChanged","pickr","onDisabledChanged","initDatepicker","_calendarWrapper","withinDropdown","attachToElement","updatePosition","catDatepickerInlineCss","CatDatepickerInlineStyle0","CatDatepickerInline","timeTransitionS","candidateSelectors","candidateSelector","NoElement","msMatchesSelector","webkitMatchesSelector","_element$getRootNode","isInert","lookUp","_node$getAttribute","inertAtt","inert","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","candidates","unshift","getCandidatesIteratively","elementsToCheck","tagName","assigned","assignedElements","nestedCandidates","flatten","scopeParent","validCandidate","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","documentOrder","isHiddenInput","isDetailsWithSummary","getCheckedRadio","form","isTabbableRadio","radioScope","queryRadios","radioSet","escape","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","isHidden","displayCheck","isDirectSummary","nodeUnderDetails","originalNode","rootNode","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","focusable","isTabbable","focusableCandidateSelector","isFocusable","ownKeys","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","configurable","writable","_toPrimitive","prim","Symbol","toPrimitive","res","arg","activeFocusTraps","activateTrap","trapStack","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","isSelectableInput","isEscapeEvent","isTabEvent","isKeyForward","isKeyBackward","findIndex","idx","valueOrHandler","_len","_key","getActualTarget","internalTrapStack","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","paused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","find","getNodeForOption","optionValue","_len2","_key2","getInitialFocusNode","tabbableOptions","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","reverse","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","g","getActiveElement","tryFocus","preventScroll","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref2","_ref2$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref3","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref4","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","nextNode","navAcrossContainers","mruContainerIdx","mruTabIdx","checkKeyNav","checkKey","checkClick","addListeners","removeListeners","checkDomRemoval","mutations","isFocusedNodeRemoved","mutation","removedNodes","mutationObserver","MutationObserver","updateObservedNodes","subtree","childList","activate","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pauseOptions","onPause","onPostPause","unpauseOptions","onUnpause","onPostUnpause","updateContainerElements","containerElements","elementsAsArray","firstTabbable","catDropdownCss","CatDropdownStyle0","CatDropdown","clickHandler","trigger","initTrigger","noAutoClose","focusTrap.createFocusTrap","catOpen","setReturnFocus","initialFocus","noInitialFocus","catClose","triggerSlot","contentId","findTrigger","resize","OFFSET","maxWidth","maxHeight","catFormGroupCss","CatFormGroupStyle0","CatFormGroup","onRequiredMarkerChanged","newRequiredMarker","updateMarker","calculate","endsWith","onHorizontalChanged","newHorizontal","labelSize","optionalFields","requiredFields","catIconCss","CatIconStyle0","CatIcon","iconSrc","icons","getIcon","commonjsGlobal","NumeralFormatter","numeralDecimalMark","numeralIntegerScale","numeralDecimalScale","numeralThousandsGroupStyle","numeralPositiveOnly","stripLeadingZeroes","prefix","signBeforePrefix","tailPrefix","owner","groupStyle","thousand","delimiterRE","lakh","wan","none","getRawValue","partSign","partSignAndPrefix","partInteger","partDecimal","NumeralFormatter_1","DateFormatter","blocks","initBlocks","getISOFormatDate","addLeadingZero","getBlocks","getValidatedDate","sub","sub0","rest","getFixedDateString","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","getFixedDate","getRangeFixedDate","previous","addLeadingZeroForYear","fullYearMode","DateFormatter_1","TimeFormatter","timePattern","timeFormat","getISOFormatTime","getTimeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","getValidatedTime","timeFormatOptions","getFixedTimeString","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","second","getFixedTime","TimeFormatter_1","PhoneFormatter","formatter","setFormatter","phoneNumber","validated","iMax","inputDigit","PhoneFormatter_1","CreditCardDetector","uatp","amex","diners","discover","mastercard","dankort","instapayment","jcb15","jcb","maestro","visa","mir","unionPay","general","re","getStrictBlocks","block","total","prev","getInfo","strictMode","matchedBlocks","CreditCardDetector_1","Util","strip","getPostDelimiter","delimiters","matchedDelimiter","getDelimiterREByDelimiter","getNextCursorPosition","prevPos","getPositionOffset","oldRawValue","newRawValue","lengthOffset","stripDelimiters","letter","headStr","str","getMaxLength","getPrefixStrippedValue","prefixLength","prevResult","noImmediatePrefix","getFirstDiffIndex","getFormattedValue","blocksLength","delimiterLazyShow","multipleDelimiters","currentDelimiter","fixPrefixCursor","appendix","setSelectionRange","len","checkFullSelection","selection","getSelection","ex","setSelection","createTextRange","move","parent","isAndroid","isAndroidBackspaceKeydown","lastInputValue","currentInputValue","Util_1","DefaultProperties","creditCard","creditCardStrictMode","creditCardType","onCreditCardTypeChanged","phone","phoneRegionCode","phoneFormatter","timeFormatter","dateFormatter","numeral","swapHiddenInput","numericOnly","uppercase","lowercase","rawValueTrimPrefix","copyDelimiter","initValue","delimiterLength","maxLength","backspace","DefaultProperties_1","Cleave","hasMultipleElements","properties","pps","onChangeListener","onKeyDownListener","onFocusListener","onCutListener","onCut","onCopyListener","onCopy","initSwapHiddenInput","initPhoneFormatter","initDateFormatter","initTimeFormatter","initNumeralFormatter","inputFormatter","cloneNode","elementSwapHidden","numeralFormatter","AsYouTypeFormatter","charCode","postDelimiter","postDelimiterBackspace","copyClipboardData","textToCopy","clipboardData","setData","postDelimiterAfter","updateValueState","toUpperCase","updateCreditCardPropsByValue","creditCardInfo","endPos","selectionEnd","callOnValueChanged","setPhoneRegionCode","setRawValue","Cleave_1","coerceBoolean","coerceNumber","fallbackValue","isNumberValue","catInputCss","CatInputStyle0","CatInput","onErrorsChanged","findSiblingInput","errorMapSrc","showErrorsIfTimeout","showErrorsIfNoFocus","hidden","startsWith","invalid","togglePassword","autocomplete","maxlength","minlength","minLength","isPasswordShown","doTogglePassword","showErrors","errorUpdateTimeoutId","hasFocus","HTMLInputElement","catPaginationCss","CatPaginationStyle0","CatPagination","isFirst","iconPrev","setPage","page","isLast","iconNext","pageCount","pages","sidePadding","activePadding","minPage","minActivepage","maxPage","maxActivepage","addSeq","_start","_end","fill","num","compact","catRadioCss","CatRadioStyle0","CatRadio","catRadioGroupCss","CatRadioGroupStyle0","CatRadioGroup","catRadioGroup","onNameChanged","newName","catRadio","updateTabIndex","onLabelLeftChanged","attributes","disconnectedCallback","onKeydown","targetElements","activeIdx","activeOff","targetIdx","radio","localName","checkedRadioIndex","catScrollableCss","CatScrollableStyle0","CatScrollable","destroyed","resizedEntries","resizedObserver","scrollElement","scrolled","scrollWrapperElement","attachEmitter","scrolledLeft","scrolledRight","scrolledBottom","scrolledTop","THROTTLE","getScrollOffset","noScrolledInit","noShadowY","noShadowX","noOverflowX","noOverflowY","noOverscroll","emitter","scrolledBuffer","isLower","GHOST_ELEMENT_ID","characterEntities","mapSpecialCharacterToCharacterEntity","specialCharacter","escapeSpecialCharacters","string","createGhostElement","ghostElement","cssText","autosizeInput","elementStyle","elementCssText","boxSizing","borderLeftWidth","borderRightWidth","fontFamily","fontFeatureSettings","fontKerning","fontSize","fontStretch","fontStyle","fontVariant","fontVariantCaps","fontVariantLigatures","fontVariantNumeric","fontWeight","letterSpacing","marginLeft","marginRight","paddingRight","textIndent","textTransform","setWidth","getElementById","minWidth","catSelectCss","CatSelectStyle0","INIT_STATE","term","isLoading","isResolving","tempSelection","activeOptionIndex","activeSelectionIndex","nextTagUniqueId","CatSelect","term$","more$","valueChangedBySelection","onConnectorChanged","connector","onStateChanged","newState","oldState","changed","dropdown","scrollIntoView","multiple","hide","idsSelected","tags","ids","createTag","patchState","isInputFocused","onArrowKeyDown","toggleTag","selectionStart","deselect","selectionClone","pop","onKeyUp","show","clearButton","clearInput","connect","number$","subscription","of","retrieve","totalElements","last","items","toSelectItems","value1","isTagSelected","isPillboxActive","activeDescendant","pill","onCatClick","onScrolledBottom","optionsList","SKELETON_COUNT","lines","noItems","isTagOption","isOptionSelected","isSelected","getLabel","tagTextHelp","description","initIds","initTags","data$","customId","search","newSelection","setTransparentCaret","removeTag","DROPDOWN_OFFSET","tagHint","CatSelectTest","multipleSelect","firstName","lastName","desc","user","multipleSelectAvatar","random","multipleSelectAvatarInitials","multipleSelectTagging","countryConnector","singleSelect","singleSelectAvatar","singleSelectAvatarInitials","country","capital","singleSelectTagging","flexDirection","countries","catSkeletonCss","CatSkeletonStyle0","CatSkeleton","skeleton","effect","catSpinnerCss","CatSpinnerStyle0","CatSpinner","xmlns","cx","cy","catTabCss","CatTabStyle0","CatTab","catTabsCss","CatTabsStyle0","CatTabs","syncTabs","onActiveTabChange","tabs","tab","setActive","setActiveIndex","activeTab","deactivated","canActivate","testForHeightReduction","restoreTextAlign","delete","textAlign","wordWrap","scrollBehavior","paddingBottom","borderTopWidth","borderBottomWidth","Event","bubbles","catTextareaCss","CatTextareaStyle0","CatTextarea","autosize","textarea","rows","formatIso","clampTime","hhMin","mmMin","hhMax","mmMax","isBefore","hh","mm","isAfter","catTimeCss","CatTimeStyle0","CatTime","syncValue","selectionTime","elem1","elem2","isAm","toggleAm","timeArray","isoTime","includeAmPm","catToggleCss","CatToggleStyle0","CatToggle","isTouchDevice","maxTouchPoints","catTooltipCss","CatTooltipStyle0","CatTooltip","hostRef","inactive","boundShowListener","showListener","boundHideListener","hideListener","boundWindowTouchStartListener","windowTouchStartListener","boundTouchStartListener","touchStartListener","boundTouchEndListener","touchEndListener","handleKeyDown","hideTooltip","isTouchScreen","tooltip","SHIFT_PADDING","hideTimeout","showTimeout","showTooltip","showDelay","hideDelay","touchTimeout","longTouchDuration","cleanupFloatingUi"],"sources":["../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Subject.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Scheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/async.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/empty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/EmptyError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/isDate.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/map.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/concatAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/concat.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/timer.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/merge.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/filter.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/audit.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/auditTime.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/catchError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/debounce.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/take.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mapTo.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delay.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/first.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scan.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/startWith.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/switchMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/tap.js","src/utils/setDefault.ts","src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","src/components/cat-alert/cat-alert.tsx","src/utils/load-img.ts","src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","src/components/cat-avatar/cat-avatar.tsx","src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","src/components/cat-badge/cat-badge.tsx","src/utils/breakpoints.ts","src/utils/platform.ts","src/utils/media-matcher.ts","src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","src/components/cat-button/cat-button.tsx","src/components/cat-button-group/cat-button-group.scss?tag=cat-button-group&encapsulation=shadow","src/components/cat-button-group/cat-button-group.tsx","src/components/cat-card/cat-card.scss?tag=cat-card&encapsulation=shadow","src/components/cat-card/cat-card.tsx","src/components/cat-form-hint/cat-form-hint.tsx","src/components/cat-checkbox/cat-checkbox.scss?tag=cat-checkbox&encapsulation=shadow","src/components/cat-checkbox/cat-checkbox.tsx","src/components/cat-date-inline/cat-date-locale.ts","src/components/cat-date-inline/cat-date-math.ts","src/components/cat-date/cat-date.scss?tag=cat-date&encapsulation=shadow","src/components/cat-date/cat-date.tsx","src/components/cat-date-inline/cat-date-inline.scss?tag=cat-date-inline&encapsulation=shadow","src/components/cat-date-inline/cat-date-inline.tsx","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/types/options.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/l10n/default.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/index.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dom.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/formatting.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dates.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/polyfills.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js","src/utils/find-closest.ts","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/plugins/weekSelect/weekSelect.js","src/components/cat-datepicker/cat-datepicker.config.ts","src/components/cat-datepicker/cat-datepicker.format.ts","src/components/cat-datepicker/cat-datepicker.locale.ts","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","src/components/cat-datepicker/cat-datepicker.scss?tag=cat-datepicker&encapsulation=shadow","src/components/cat-datepicker/cat-datepicker.tsx","src/components/cat-datepicker-inline/cat-datepicker-inline.scss?tag=cat-datepicker-inline&encapsulation=shadow","src/components/cat-datepicker-inline/cat-datepicker-inline.tsx","../tokens/dist/js/variables.js","../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js","../node_modules/.pnpm/focus-trap@7.5.4/node_modules/focus-trap/dist/focus-trap.esm.js","src/utils/first-tabbable.ts","src/components/cat-dropdown/cat-dropdown.scss?tag=cat-dropdown&encapsulation=shadow","src/components/cat-dropdown/cat-dropdown.tsx","src/components/cat-form-group/cat-form-group.scss?tag=cat-form-group&encapsulation=shadow","src/components/cat-form-group/cat-form-group.tsx","src/components/cat-icon/cat-icon.scss?tag=cat-icon&encapsulation=shadow","src/components/cat-icon/cat-icon.tsx","../node_modules/.pnpm/cleave.js@1.6.0/node_modules/cleave.js/dist/cleave-esm.js","src/utils/coerce.ts","src/components/cat-input/cat-input.scss?tag=cat-input&encapsulation=shadow","src/components/cat-input/cat-input.tsx","src/components/cat-pagination/cat-pagination.scss?tag=cat-pagination&encapsulation=shadow","src/components/cat-pagination/cat-pagination.tsx","src/components/cat-radio/cat-radio.scss?tag=cat-radio&encapsulation=shadow","src/components/cat-radio/cat-radio.tsx","src/components/cat-radio-group/cat-radio-group.scss?tag=cat-radio-group&encapsulation=shadow","src/components/cat-radio-group/cat-radio-group.tsx","src/components/cat-scrollable/cat-scrollable.scss?tag=cat-scrollable&encapsulation=shadow","src/components/cat-scrollable/cat-scrollable.tsx","../node_modules/.pnpm/autosize-input@1.0.2/node_modules/autosize-input/index.js","src/components/cat-select/cat-select.scss?tag=cat-select&encapsulation=shadow","src/components/cat-select/cat-select.tsx","src/components/cat-select-demo/cat-select-demo.tsx","src/components/cat-skeleton/cat-skeleton.scss?tag=cat-skeleton&encapsulation=shadow","src/components/cat-skeleton/cat-skeleton.tsx","src/components/cat-spinner/cat-spinner.scss?tag=cat-spinner&encapsulation=shadow","src/components/cat-spinner/cat-spinner.tsx","src/components/cat-tab/cat-tab.scss?tag=cat-tab&encapsulation=shadow","src/components/cat-tab/cat-tab.tsx","src/components/cat-tabs/cat-tabs.scss?tag=cat-tabs&encapsulation=shadow","src/components/cat-tabs/cat-tabs.tsx","../node_modules/.pnpm/autosize@6.0.1/node_modules/autosize/dist/autosize.esm.js","src/components/cat-textarea/cat-textarea.scss?tag=cat-textarea&encapsulation=shadow","src/components/cat-textarea/cat-textarea.tsx","src/components/cat-time/cat-time-locale.ts","src/components/cat-time/cat-time-math.ts","src/components/cat-time/cat-time.scss?tag=cat-time&encapsulation=shadow","src/components/cat-time/cat-time.tsx","src/components/cat-toggle/cat-toggle.scss?tag=cat-toggle&encapsulation=shadow","src/components/cat-toggle/cat-toggle.tsx","src/utils/is-touch-screen.ts","src/components/cat-tooltip/cat-tooltip.scss?tag=cat-tooltip&encapsulation=shadow","src/components/cat-tooltip/cat-tooltip.tsx"],"sourcesContent":["import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n//# sourceMappingURL=EmptyError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n//# sourceMappingURL=filter.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n//# sourceMappingURL=delay.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","export function setAttributeDefault(\n host: T,\n attr: string,\n value: unknown\n): void {\n if (!host.hostElement.hasAttribute(attr) && value != null) {\n host.hostElement.setAttribute(attr, String(value));\n }\n}\n\nexport function setAttribute(host: T, attr: string, value: unknown): void {\n host.hostElement.setAttribute(attr, String(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n:host {\n display: flex;\n gap: 0.5rem;\n padding: 1.25rem;\n border-radius: cat-border-radius('l');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n.content {\n align-self: center;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n background-color: cat-token('color.theme.#{$theme}.bg');\n color: cat-token('color.theme.#{$theme}.fill');\n // adjust nested links\n --cat-primary-text: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --cat-primary-text-hover: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --cat-primary-text-active: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --cat-link-decoration: underline;\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\nimport { setAttributeDefault } from '../../utils/setDefault';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n private readonly mapIcon: Map = new Map([\n ['primary', '$cat:alert-primary'],\n ['secondary', '$cat:alert-secondary'],\n ['info', '$cat:alert-info'],\n ['success', '$cat:alert-success'],\n ['warning', '$cat:alert-warning'],\n ['danger', '$cat:alert-danger']\n ]);\n private readonly mapRole: Map = new Map([\n ['primary', 'status'],\n ['secondary', 'status'],\n ['info', 'status'],\n ['success', 'status'],\n ['warning', 'alert'],\n ['danger', 'alert']\n ]);\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The color palette of the alert.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The name of an icon to be displayed in the alert.\n */\n @Prop() icon?: string;\n\n /**\n * Whether the icon of the alert is deactivated.\n */\n @Prop() noIcon = false;\n\n connectedCallback() {\n setAttributeDefault(this, 'tabindex', 0);\n setAttributeDefault(this, 'role', this.mapRole.get(this.color));\n }\n\n render() {\n return (\n \n {!this.noIcon && }\n \n \n \n \n );\n }\n}\n","/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-background-color: cat-token('color.base.neutral.100');\n$-color: cat-token('color.base.neutral.500');\n$-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n// -----\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, $-color);\n background-color: var(--cat-avatar-bg, $-background-color);\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n vertical-align: middle;\n font-weight: 600;\n @include cat-select(none);\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size, map.get($-sizes, $size));\n height: var(--cat-avatar-size, map.get($-sizes, $size));\n line-height: var(--cat-avatar-size, map.get($-sizes, $size));\n font-size: var(--cat-avatar-font-size, cat-body-font-size($fontSize));\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n \n {this.content}\n \n );\n } else {\n return (\n \n {this.content}\n \n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-sizes: (\n 'xl': 3rem,\n 'l': 2.5rem,\n 'm': 2rem,\n 's': 1.5rem,\n 'xs': 1rem\n);\n$-paddings: (\n 'xl': 0 1rem,\n 'l': 0 1rem,\n 'm': 0 0.75rem,\n 's': 0 0.5rem,\n 'xs': 0 0.25rem\n);\n\n// -----\n\n:host([hidden]) {\n display: none;\n}\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n line-height: 1.5;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n:host([round]) {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--text), $alpha: 0.2);\n\n:host([variant='filled']) {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n:host([variant='outlined']) {\n background-color: cat-token('color.ui.background.surface');\n color: cat-token-wrap(var(--text));\n box-shadow: $-outline;\n}\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n :host([size='#{$size}']) {\n height: map.get($-sizes, $size);\n min-width: map.get($-sizes, $size);\n font-size: cat-body-font-size($fontSize);\n padding: map.get($-paddings, $size);\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 's');\n@include size('l', 'm');\n@include size('xl', 'l');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n:host([pulse][variant='filled']) {\n animation: 1.5s ease 0s infinite normal none running pulse;\n}\n\n:host([pulse][variant='outlined']) {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return ;\n }\n}\n","const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = (typeof _breakpoints)[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set = new Set();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$button-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-button {\n position: relative;\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition:\n color cat-token('time.transition.s') linear,\n border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear,\n box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.cat-button-content-inner {\n @include cat-break-word;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n cursor: not-allowed;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- group button\n\n.cat-group-button {\n &-first {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &-middle {\n border-radius: 0;\n }\n\n &-last {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: var(--cat-font-weight-button, 600);\n @include cat-font-smooth;\n\n &.cat-button-disabled {\n --bg: #{cat-token('color.ui.background.muted', $wrap: false)};\n --fill: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.surface');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --base: #{cat-token('color.ui.font.muted', $wrap: false)};\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: cat-token('font.decoration.linkButton');\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n}\n\n.cat-button-link {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n\n $-total-height: map.get($button-sizes, $size);\n $-padding-v: ($-total-height - $-line-height) * 0.5;\n $-padding-h: $padding;\n\n .cat-button-#{$size} {\n min-width: map.get($button-sizes, $size);\n padding: $-padding-v $-padding-h;\n @include cat-body($fontSize, null);\n gap: 0.25rem;\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n height: $-total-height;\n padding: 0;\n }\n }\n\n :host(.cat-button-pull[size='#{$size}']) {\n margin: $-padding-v * -1 $-padding-h * -1;\n }\n\n :host(.cat-button-pull-h[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n margin-right: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-v[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-t[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-l[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-b[size='#{$size}']) {\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-r[size='#{$size}']) {\n margin-right: $-padding-h * -1;\n }\n}\n\n:host(.cat-button-pull:not([size])) {\n margin: -0.625rem -0.75rem;\n}\n\n:host(.cat-button-pull-h:not([size])) {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n}\n\n:host(.cat-button-pull-v:not([size])) {\n margin-top: -0.625rem;\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-t:not([size])) {\n margin-top: -0.625rem;\n}\n\n:host(.cat-button-pull-l:not([size])) {\n margin-left: -0.75rem;\n}\n\n:host(.cat-button-pull-b:not([size])) {\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-r:not([size])) {\n margin-right: -0.75rem;\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// ----- tabs\n\n:host(.cat-tab) {\n &::part(button) {\n padding: 1.125rem 0.75rem;\n --cat-secondary-bg: transparent;\n --cat-primary-text: transparent;\n --cat-danger-text: transparent;\n }\n\n &::part(content) {\n &::before {\n content: attr(data-text);\n content: attr(data-text) / '';\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n font-weight: 700;\n }\n }\n}\n\n// ----- alignment\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n\n// ----- navigation\n\n:host(.cat-nav-item) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n justify-content: left;\n gap: 0.5rem;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n}\n\n// ----- datepicker\n\n:host(.cat-time-format) {\n .cat-button {\n border-radius: 0;\n }\n}\n\n:host(.cat-date-toggle),\n:host(.cat-time-toggle) {\n .cat-button {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n:host(.cat-date-item),\n:host(.cat-date-toggle),\n:host(.cat-time-format),\n:host(.cat-time-toggle) {\n .cat-button {\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n }\n}\n\n:host(.cat-date-item) {\n .cat-button {\n padding: 0;\n aspect-ratio: 1;\n }\n}\n\n:host(.date-start:not(.date-end)) {\n .cat-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n\n:host(.date-end:not(.date-start)) {\n .cat-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions. Primary style should be used only\n * once per view for main call-to-action.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' | 'link' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'secondary';\n\n /**\n * Set the button into an active state.\n */\n @Prop() active = false;\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Disables ellipse overflowing button content.\n */\n @Prop() noEllipsis = false;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Sets the `aria-current` attribute on the button.\n */\n @Prop({ attribute: 'a11y-current' }) a11yCurrent?: string;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the native HTML button content element\n */\n @Prop() nativeContentAttributes?: { [key: string]: string };\n\n /**\n * The index of a button that is used inside a cat-button-group component\n */\n @Prop() buttonGroupPosition?: 'first' | 'last' | 'middle';\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n componentWillRender(): void {\n if (this.isIconButton && !this.a11yLabel) {\n log.warn('[A11y] Missing ARIA label on icon button', this);\n }\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Programmatically move focus to the button. Use this method instead of\n * `button.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.button.focus(options);\n }\n\n /**\n * Programmatically remove focus from the button. Use this method instead of\n * `button.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.button.blur();\n }\n\n /**\n * Programmatically simulate a click on the button.\n */\n @Method()\n async doClick(): Promise {\n this.button.click();\n }\n\n render() {\n if (this.url) {\n return (\n (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n } else {\n return (\n (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size),\n [`cat-group-button-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition),\n 'cat-group-button': Boolean(this.buttonGroupPosition)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconRight;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconRight;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? : null,\n this.isIconButton ? (\n \n ) : (\n \n \n \n \n \n ),\n this.hasSuffixIcon ? : null,\n this.loading ? : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n",":host {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n}\n\n::slotted(cat-button[variant='outlined']),\n::slotted(cat-button:not([variant])) {\n margin-right: -1px;\n}\n\n::slotted(cat-button[variant='outlined']:last-child),\n::slotted(cat-button:not([variant]):last-child) {\n margin-right: 0;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * Button groups are designed to bring together button controls that are of a\n * similar nature. For example text formatting controls.\n */\n@Component({\n tag: 'cat-button-group',\n styleUrl: 'cat-button-group.scss',\n shadow: true\n})\nexport class CatButtonGroup {\n private formElements: HTMLCatButtonElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Adds an accessible label for the button group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(this.hostElement.querySelectorAll('cat-button'));\n this.formElements.forEach((element, index) => {\n element.buttonGroupPosition = index === 0 ? 'first' : index === this.formElements.length - 1 ? 'last' : 'middle';\n });\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n$-padding: 1.25rem;\n\n:host {\n display: block;\n border-radius: cat-border-radius('l');\n background-color: cat-token('color.ui.background.surface');\n padding: $-padding;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n::slotted(nav),\n::slotted(nav:last-child) {\n margin: #{0.25rem - $-padding} #{0.25rem - $-padding} !important;\n}\n\n// --- pull out helper classes\n\n::slotted(.cat-card-pull) {\n margin: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-h) {\n margin-left: -$-padding !important;\n margin-right: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-v) {\n margin-top: -$-padding !important;\n margin-bottom: -$-padding !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-t) {\n margin-top: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-l) {\n margin-left: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-r) {\n margin-right: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-b) {\n margin-bottom: -$-padding !important;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * Cards are surfaces that display content and actions on a single topic. They\n * should be easy to scan for relevant and actionable information.\n */\n@Component({\n tag: 'cat-card',\n styleUrl: 'cat-card.scss',\n shadow: true\n})\nexport class CatCard {\n render() {\n return ;\n }\n}\n","import { h, FunctionalComponent } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ErrorMap = { [key: string]: any };\n\n/**\n * Properties of CatFormHint.\n *\n * @property hint - Optional hint text(s) of the form field.\n * @property slottedHint - Optional hint element of the form field.\n */\ninterface CatFormHintProps {\n id: string;\n hint?: string | string[];\n slottedHint?: HTMLSlotElement;\n class?: string;\n errorMap?: ErrorMap;\n}\n\n/**\n * CatFormHint is a functional component that represents the hint area of form elements.\n *\n * @param props - {@link CatFormHintProps}\n * @return a JSX.Element\n */\nexport const CatFormHint: FunctionalComponent = props => {\n const { id, hint, slottedHint, errorMap } = props;\n const errors = Object.entries(errorMap || {});\n return (\n \n {errors.length\n ? errors.map(([key, params]) => (\n {i18n.t(`error.${key}`, params)}\n ))\n : [\n hint &&\n (Array.isArray(hint) ? (\n hint.map(item => {item})\n ) : (\n {hint}\n )),\n slottedHint\n ]}\n \n );\n};\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$checkbox-width: 1.25rem;\n$checkbox-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n position: relative;\n}\n\n.label-left {\n flex-direction: row-reverse;\n\n input {\n right: 1px;\n left: unset;\n }\n}\n\ninput {\n position: absolute;\n width: $checkbox-width;\n height: $checkbox-height;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n left: 1px;\n top: 0.5px;\n}\n\n.box-placeholder {\n width: calc($checkbox-width + 2px);\n flex-shrink: 0;\n}\n\n.box {\n flex: 0 0 auto;\n display: flex;\n position: relative;\n height: $checkbox-height;\n width: $checkbox-width;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.dark');\n border-radius: cat-border-radius(s);\n transition:\n background-color cat-token('time.transition.s') ease,\n border-color cat-token('time.transition.s') ease;\n pointer-events: none;\n box-sizing: border-box;\n\n svg {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 16px;\n stroke-dashoffset: 16px;\n transition: all cat-token('time.transition.s') ease;\n width: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.99);\n }\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 0;\n }\n }\n\n :indeterminate + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 16px;\n }\n\n .dash {\n stroke-dashoffset: 0;\n }\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n\n .is-disabled & {\n background-color: cat-token('color.ui.background.muted');\n border-color: cat-token('color.ui.border.dark');\n stroke: cat-token('color.ui.font.muted');\n }\n}\n\n:host(.cat-error) {\n .box {\n border: 1px solid cat-token('color.theme.danger.bg');\n }\n\n :checked + .box,\n :indeterminate + .box {\n background-color: cat-token('color.theme.danger.bg');\n border-color: cat-token('color.theme.danger.bg');\n stroke: cat-token('color.theme.danger.fill');\n }\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Checkboxes are used to let a user choose one or more options from a limited\n * number of options.\n *\n * @slot hint - Optional hint element to be displayed with the checkbox.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-checkbox',\n styleUrls: ['cat-checkbox.scss'],\n shadow: true\n})\nexport class CatCheckbox {\n private readonly _id = `cat-checkbox-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n @State() hasSlottedHint = false;\n\n /**\n * Checked state of the checkbox\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Indeterminate state of the checkbox\n */\n @Prop({ mutable: true }) indeterminate = false;\n\n /**\n * Disabled state of the checkbox\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * Label of the checkbox which is presented in the UI\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the input.\n */\n @Prop() name?: string;\n\n /**\n * Required state of the checkbox.\n */\n @Prop() required = false;\n\n /**\n * The value of the checked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value?: any;\n\n /**\n * The value of the unchecked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() noValue?: any;\n\n /**\n * The resolved value of the checkbox, based on the checked state and value.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) resolvedValue: any = null;\n\n /**\n * Optional hint text(s) to be displayed with the checkbox.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the checkbox.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the checked status of the checkbox is changed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the checkbox received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.updateResolved();\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on checkbox', this);\n }\n }\n\n /**\n * Programmatically move focus to the checkbox. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the checkbox. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n \n \n \n \n \n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n \n \n } />\n \n )}\n \n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = this.input.checked;\n this.indeterminate = this.input.indeterminate;\n this.updateResolved();\n this.catChange.emit(this.resolvedValue);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n\n private updateResolved() {\n this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;\n }\n}\n","import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nfunction getDays(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction getMonths(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nfunction getWeekInfo(language: string) {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return {\n firstDay: weekInfo?.firstDay ?? 1,\n minDays: weekInfo?.minDays ?? 4,\n weekend: weekInfo?.weekend ?? [6, 7]\n };\n}\n\nfunction getFormat(language: string) {\n const format = new Intl.DateTimeFormat(language, { year: 'numeric', month: '2-digit', day: '2-digit' })\n .format(new Date(3456, 10, 22))\n .replace('3456', 'YYYY')\n .replace('56', 'YY')\n .replace('11', 'MM')\n .replace('22', 'DD');\n return /^(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)$/.test(format) ? format : 'DD-MM-YYYY';\n}\n\nexport function getLocale(language: string) {\n return {\n prevYear: i18n.t('datepicker.prevYear'),\n nextYear: i18n.t('datepicker.nextYear'),\n prevMonth: i18n.t('datepicker.prevMonth'),\n nextMonth: i18n.t('datepicker.nextMonth'),\n arrowKeys: i18n.t('datepicker.arrowKeys'),\n today: i18n.t('datepicker.today'),\n change: i18n.t('datepicker.change'),\n choose: i18n.t('datepicker.choose'),\n clear: i18n.t('datepicker.clear'),\n formatStr: getFormat(language),\n weekInfo: getWeekInfo(language),\n days: {\n short: getDays(language, 'short'),\n long: getDays(language, 'long')\n },\n months: {\n short: getMonths(language, 'short'),\n long: getMonths(language, 'long')\n },\n now: () => {\n const date = new Date();\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n },\n fromLocalISO: (date?: string | null) => {\n const [match, year, month, day] = date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return match ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n },\n toLocalISO: (date: Date) => {\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n return `${year}-${month}-${day}`;\n },\n toLocalStr: (date: Date) =>\n new Intl.DateTimeFormat(language, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long'\n }).format(date)\n };\n}\n","export function isLeapYear(year: number): boolean {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nexport function addDays(date: Date, n: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + n);\n}\n\nexport function addMonth(date: Date, n: number): Date {\n const [year, month, day] = [date.getFullYear(), date.getMonth(), date.getDate()];\n const maxDays = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n const newDate = new Date(date);\n newDate.setDate(1);\n newDate.setMonth(newDate.getMonth() + n);\n newDate.setDate(Math.min(day, maxDays[(month + (n % 12) + 12) % 12]));\n return newDate;\n}\n\nexport function isSameYear(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getFullYear() === date2.getFullYear();\n}\n\nexport function isSameMonth(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getMonth() === date2.getMonth() && isSameYear(date1, date2);\n}\n\nexport function isSameDay(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getDate() === date2.getDate() && isSameMonth(date1, date2);\n}\n\nexport function clampDate(min: Date | null, date: Date, max: Date | null): Date {\n return new Date(Math.min(Math.max(date.getTime(), min?.getTime() ?? -Infinity), max?.getTime() ?? Infinity));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-aria {\n @include cat-visually-hidden;\n}\n\ncat-date-inline {\n margin: 1rem;\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: true\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.input?.mask({\n date: true,\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1, p2, p3]\n });\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.input?.clear();\n }\n\n render() {\n return (\n \n (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n \n {this.label}\n ({this.locale.formatStr})\n \n this.dateInline?.resetView()}\n >\n \n \n (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n >\n \n \n \n \n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input) {\n return;\n }\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? new Date(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n min-width: calc(2rem + 7 * 2.5rem);\n max-width: calc(2rem + 7 * 4rem);\n\n &.picker-weeks {\n min-width: calc(7 * 2.5rem);\n max-width: calc(7 * 4rem);\n }\n\n &.picker-small {\n min-width: calc(2rem + 7 * 2rem);\n max-width: calc(2rem + 7 * 3rem);\n\n &.picker-weeks {\n min-width: calc(7 * 2rem);\n max-width: calc(7 * 3rem);\n }\n }\n}\n\n.picker-head {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n\n h3 {\n @include cat-head(4);\n flex: 1;\n text-align: center;\n margin: 0;\n }\n\n .picker-small & {\n gap: 0.25rem;\n\n h3 {\n @include cat-head(5);\n }\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas:\n 'h h h h h h h'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n margin: 1rem 0 0.5rem;\n\n .picker-weeks & {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas:\n '. h h h h h h h'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n }\n\n .picker-small & {\n margin: 0.5rem 0;\n }\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n @include cat-body('xs', 600);\n color: cat-token('color.ui.font.muted') !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n gap: 1rem;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n\n .picker-small & {\n gap: 0.5rem;\n }\n}\n\n.cursor-help {\n margin: 0;\n @include cat-body('s');\n color: cat-token('color.ui.font.muted') !important;\n text-align: center;\n flex: 1;\n\n &:first-child {\n text-align: left;\n }\n\n &:last-child {\n text-align: right;\n }\n\n &:only-child {\n text-align: center;\n }\n\n .picker-small & {\n @include cat-body('xs');\n }\n}\n\n.cursor-aria {\n @include cat-visually-hidden;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getLocale } from './cat-date-locale';\nimport { addDays, addMonth, clampDate, isSameDay, isSameMonth, isSameYear } from './cat-date-math';\n\n/**\n * An inline date picker component to select a date.\n */\n@Component({\n tag: 'cat-date-inline',\n styleUrl: 'cat-date-inline.scss',\n shadow: true\n})\nexport class CatDateInline {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n // additonally store the focus date to ensure correct focus after potential re-render\n private focusDate: Date | null = null;\n\n @Element() hostElement!: HTMLElement;\n\n @State() viewDate: Date = this.locale.now();\n\n /**\n * Hides the clear button.\n */\n @Prop() noClear = false;\n\n /**\n * Shows an arrow keys navigation hint.\n */\n @Prop() hint = false;\n\n /**\n * Hides the today button.\n */\n @Prop() noToday = false;\n\n /**\n * Show week numbers.\n */\n @Prop() weeks = false;\n\n /**\n * The size of the date picker.\n */\n @Prop() size: 's' | 'm' = 'm';\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * Allow the selection of a range of dates, i.e. start and end date.\n */\n @Prop() range = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n private get focusedDate() {\n const [all, year, month, day] =\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date]:focus`)\n ?.dataset.date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n }\n\n componentWillLoad() {\n const [startDate, endDate] = this.getValue();\n if (endDate) {\n this.focus(endDate);\n } else if (startDate) {\n this.focus(startDate);\n }\n }\n\n componentDidRender() {\n if (this.focusDate) {\n // re-focus the previously focused date after re-render\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n this.focusDate = null;\n }\n }\n\n @Listen('keydown')\n onKeyDown(e: KeyboardEvent) {\n if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {\n return;\n }\n const focusedDate = this.focusedDate;\n if (!focusedDate) {\n e.preventDefault();\n const [startDate] = this.getValue();\n this.focus(startDate || this.locale.now());\n } else if (e.key === 'ArrowLeft') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, -1) : addDays(focusedDate, -1));\n } else if (e.key === 'ArrowRight') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, 1) : addDays(focusedDate, 1));\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.focus(addDays(focusedDate, -7));\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.focus(addDays(focusedDate, 7));\n }\n }\n\n /**\n * Select a date in the picker.\n *\n * @param date The date to select.\n */\n @Method()\n async select(date: Date | null): Promise {\n if (!date) {\n return this.clear();\n }\n const oldValue = this.value;\n const [minDate, maxDate] = this.getMinMaxDate();\n const newDate = clampDate(minDate, new Date(date.getFullYear(), date.getMonth(), date.getDate()), maxDate);\n this.focus(newDate);\n\n if (this.range) {\n const [startDate, endDate] = this.getValue();\n if (!startDate || endDate || newDate < startDate) {\n this.value = this.toRangeValue(newDate, null);\n } else {\n this.value = this.toRangeValue(startDate, newDate);\n }\n } else {\n this.value = this.locale.toLocalISO(newDate);\n }\n\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Clear the picker.\n */\n @Method()\n async clear(): Promise {\n const oldValue = this.value;\n this.value = undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Resets the view of the picker.\n */\n @Method()\n async resetView(): Promise {\n const [minDate, maxDate] = this.getMinMaxDate();\n const [dateStart] = this.getValue();\n this.viewDate = dateStart ?? clampDate(minDate, this.locale.now(), maxDate);\n }\n\n render() {\n const [minDate, maxDate] = this.getMinMaxDate();\n const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());\n const [dateStart, dateEnd] = this.getValue();\n return (\n \n \n \n this.navigate('prev', 'year')}\n data-dropdown-no-close\n >\n this.navigate('prev', 'month')}\n data-dropdown-no-close\n >\n {this.getHeadline()}\n this.navigate('next', 'month')}\n data-dropdown-no-close\n >\n this.navigate('next', 'year')}\n data-dropdown-no-close\n >\n \n this.setAriaLive(this.locale.arrowKeys)}>\n \n {Array.from(Array(7), (_, i) => (\n {this.locale.days.short[i]}\n ))}\n \n {this.weeks && (\n \n {dateGrid\n .filter((_, i) => i % 7 === 0)\n .map(day => (\n {this.getWeekNumber(day)}\n ))}\n \n )}\n \n {dateGrid.map(day => {\n const isStartDate = isSameDay(dateStart, day);\n const isEndDate = isSameDay(dateEnd, day);\n const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;\n const isToday = isSameDay(this.locale.now(), day);\n return (\n this.select(day)}\n data-date={this.locale.toLocalISO(day)}\n >\n {day.getDate()}\n \n );\n })}\n \n \n \n {!this.noToday && this.canClick(this.locale.now()) && (\n this.select(this.locale.now())}>\n {this.locale.today}\n \n )}\n {this.hint && {this.locale.arrowKeys}}\n {!this.noClear && (\n this.clear()}>\n {this.locale.clear}\n \n )}\n \n \n \n \n );\n }\n\n private focus(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n this.focusDate = clampDate(minDate, date, maxDate);\n this.viewDate = new Date(this.focusDate.getFullYear(), this.focusDate.getMonth());\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n }\n\n private navigate(direction: 'prev' | 'next', period: 'year' | 'month') {\n this.viewDate = new Date(\n direction === 'prev'\n ? period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() - 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() - 1)\n : period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() + 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() + 1)\n );\n // announce the new month and year\n this.setAriaLive(this.getHeadline());\n }\n\n private setAriaLive(text: string) {\n const node = this.hostElement.shadowRoot?.querySelector('.cursor-aria');\n if (node) {\n node.innerHTML = text;\n }\n }\n\n private dateGrid(year: number, month: number) {\n const firstDayOfWeek = new Date(year, month, 1).getDay();\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const days = [...Array(daysInMonth).keys()];\n const daysBefore = [...Array(firstDayOfWeek).keys()].map(day =>\n new Date(year, month, day - firstDayOfWeek).getDate()\n );\n const daysAfter = [...Array(42 - days.length - daysBefore.length).keys()];\n return [\n ...daysBefore.map(day => new Date(year, month - 1, day + 1)),\n ...days.map(day => new Date(year, month, day + 1)),\n ...daysAfter.map(day => new Date(year, month + 1, day + 1))\n ];\n }\n\n private getHeadline() {\n return `${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`;\n }\n\n private getWeekNumber(date: Date, iso8601 = true) {\n const currentDate = new Date(date.getTime());\n const dayNum = iso8601 ? currentDate.getDay() || 7 : currentDate.getDay();\n currentDate.setDate(currentDate.getDate() + 4 - dayNum);\n const yearStart = new Date(currentDate.getFullYear(), 0, 1);\n return Math.ceil(((+currentDate - +yearStart) / 86400000 + 1) / 7);\n }\n\n private canFocus(date: Date): boolean {\n const now = this.locale.now();\n const [minDate] = this.getMinMaxDate();\n const focusedDate = this.focusedDate;\n const [startDate] = this.getValue();\n if (focusedDate && isSameMonth(focusedDate, this.viewDate)) {\n return isSameMonth(focusedDate, date) && isSameDay(focusedDate, date);\n } else if (startDate && isSameMonth(startDate, this.viewDate)) {\n return isSameMonth(startDate, date) && isSameDay(startDate, date);\n } else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {\n return isSameMonth(this.viewDate, date) && isSameDay(now, date);\n }\n const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;\n return isSameMonth(this.viewDate, date) && date.getDate() === minDay;\n }\n\n private canClick(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n return (!minDate || minDate <= date) && (!maxDate || maxDate >= date);\n }\n\n private getMinMaxDate() {\n const minDate = this.locale.fromLocalISO(this.min);\n const maxDate = this.locale.fromLocalISO(this.max);\n return [minDate, maxDate];\n }\n\n private getValue(): [Date | null, Date | null] {\n if (this.range) {\n const [startDate, endDate] = JSON.parse(this.value || '[]') as [string | null, string | null];\n return [this.locale.fromLocalISO(startDate), this.locale.fromLocalISO(endDate)];\n } else {\n return [this.locale.fromLocalISO(this.value), null];\n }\n }\n\n private toRangeValue(startDate: Date | null, endDate: Date | null): string {\n return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));\n }\n}\n","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","/**\n * Find the closest parent element matching the given selector while traversing\n * up the DOM tree (including Shadow DOM).\n */\nexport function findClosest(selector: string, element: Element | ShadowRoot): Element | null {\n if (element instanceof Element && element.matches(selector)) {\n return element;\n }\n\n // Search in parent element or Shadow DOM host\n const nextElement =\n element instanceof ShadowRoot ? element.host : element.parentElement || (element.getRootNode() as ShadowRoot).host;\n return nextElement ? findClosest(selector, nextElement) : null;\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.weekSelect = factory());\n}(this, (function () { 'use strict';\n\n function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n }\n\n function weekSelectPlugin() {\n return function (fp) {\n function onDayHover(event) {\n var day = getEventTarget(event);\n if (!day.classList.contains(\"flatpickr-day\"))\n return;\n var days = fp.days.childNodes;\n var dayIndex = day.$i;\n var dayIndSeven = dayIndex / 7;\n var weekStartDay = days[7 * Math.floor(dayIndSeven)]\n .dateObj;\n var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;\n for (var i = days.length; i--;) {\n var day_1 = days[i];\n var date = day_1.dateObj;\n if (date > weekEndDay || date < weekStartDay)\n day_1.classList.remove(\"inRange\");\n else\n day_1.classList.add(\"inRange\");\n }\n }\n function highlightWeek() {\n var selDate = fp.latestSelectedDateObj;\n if (selDate !== undefined &&\n selDate.getMonth() === fp.currentMonth &&\n selDate.getFullYear() === fp.currentYear) {\n fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;\n fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;\n }\n var days = fp.days.childNodes;\n for (var i = days.length; i--;) {\n var date = days[i].dateObj;\n if (date >= fp.weekStartDay && date <= fp.weekEndDay)\n days[i].classList.add(\"week\", \"selected\");\n }\n }\n function clearHover() {\n var days = fp.days.childNodes;\n for (var i = days.length; i--;)\n days[i].classList.remove(\"inRange\");\n }\n function onReady() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.addEventListener(\"mouseover\", onDayHover);\n }\n function onDestroy() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.removeEventListener(\"mouseover\", onDayHover);\n }\n return {\n onValueUpdate: highlightWeek,\n onMonthChange: highlightWeek,\n onYearChange: highlightWeek,\n onOpen: highlightWeek,\n onClose: clearHover,\n onParseConfig: function () {\n fp.config.mode = \"single\";\n fp.config.enableTime = false;\n fp.config.dateFormat = fp.config.dateFormat\n ? fp.config.dateFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n fp.config.altFormat = fp.config.altFormat\n ? fp.config.altFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n },\n onReady: [\n onReady,\n highlightWeek,\n function () {\n fp.loadedPlugins.push(\"weekSelect\");\n },\n ],\n onDestroy: onDestroy,\n };\n };\n }\n\n return weekSelectPlugin;\n\n})));\n","import flatpickr from 'flatpickr';\nimport weekSelectPlugin from 'flatpickr/dist/plugins/weekSelect/weekSelect';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { BaseOptions, Hook } from 'flatpickr/dist/types/options';\n\nexport function getConfig(\n options: {\n locale: flatpickr.CustomLocale;\n format: string;\n mode: CatDatepickerMode;\n min: string | undefined;\n max: string | undefined;\n step: number;\n disabled: boolean;\n readonly: boolean;\n nativePickerAttributes: { [key: string]: string };\n applyChange: (value?: string) => void;\n appendTo?: HTMLElement | undefined;\n position?: BaseOptions['position'];\n onReady?: Hook;\n },\n more: flatpickr.Options.Options = {}\n): flatpickr.Options.Options {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const plugins = options.mode === 'week' ? [new (weekSelectPlugin as any)({})] : [];\n const format = dateFormat(options.mode);\n\n return {\n ...more,\n locale: options.locale,\n plugins,\n allowInput: true,\n altInput: true,\n prevArrow: '←',\n nextArrow: '→',\n dateFormat: format,\n altFormat: options.format,\n ariaDateFormat: options.format,\n mode: options.mode === 'daterange' ? 'range' : 'single',\n minDate: options.min,\n maxDate: options.max,\n enableTime: options.mode === 'time' || options.mode === 'datetime',\n noCalendar: options.mode === 'time',\n weekNumbers: true,\n minuteIncrement: options.step,\n clickOpens: !options.disabled && !options.readonly,\n appendTo: options.appendTo,\n position: options.position ? options.position : 'auto',\n onReady: (_dates, _dateStr, flatpickr) => {\n for (const key in options.nativePickerAttributes) {\n const value = options.nativePickerAttributes[key];\n flatpickr.calendarContainer.setAttribute(key, value);\n }\n if (options.appendTo && typeof options.onReady === 'function') {\n options.onReady(_dates, _dateStr, flatpickr);\n }\n },\n onClose: function (dates, _dateStr, instance) {\n if (options.mode === 'daterange' && dates.length < 2) {\n instance.clear();\n }\n },\n onChange: (dates, dateStr, flatpickr) => {\n let value = dateStr || undefined;\n if (options.mode === 'daterange') {\n if (dates.length < 2) {\n return;\n } else {\n const start = dates[0];\n const end = dates[1];\n end.setHours(23);\n end.setMinutes(59);\n end.setSeconds(59);\n value = `${flatpickr.formatDate(start, format)} - ${flatpickr.formatDate(end, format)}`;\n }\n } else if (options.mode === 'week') {\n value = dates[0] ? flatpickr.config.getWeek(dates[0]).toString() : undefined;\n }\n options.applyChange(value);\n }\n };\n}\n\nfunction dateFormat(mode: CatDatepickerMode): string {\n if (mode === 'week') {\n return 'W';\n } else if (mode === 'time') {\n return 'H:i';\n } else {\n return 'Z';\n }\n}\n","import { CatDatepickerMode } from './cat-datepicker.mode';\n\nexport function getFormat(language: string, mode: CatDatepickerMode): string {\n const date = new Date(2000, 1, 3, 16, 5, 6);\n const formatDate: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };\n const formatTime: Intl.DateTimeFormatOptions = { hour: '2-digit', minute: '2-digit' };\n return mode === 'week'\n ? 'W'\n : new Intl.DateTimeFormat(\n language,\n {\n date: formatDate,\n time: formatTime,\n datetime: { ...formatDate, ...formatTime },\n daterange: formatDate\n }[mode]\n )\n .format(date)\n .replace('2000', 'Y')\n .replace('00', 'y')\n .replace('02', 'm')\n .replace('03', 'd')\n .replace('04', 'h')\n .replace('16', 'H')\n .replace('05', 'i')\n .replace(/AM|PM/i, 'K');\n}\n","import flatpickr from 'flatpickr';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport function getHour12(language: string): boolean {\n const dateStr = new Intl.DateTimeFormat(language, { hour: '2-digit', minute: '2-digit' })\n .format(new Date())\n .toLowerCase();\n return dateStr.includes('am') || dateStr.includes('pm');\n}\n\nfunction getFirstDayOfWeek(language: string): number {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return weekInfo?.firstDay ?? 1;\n}\n\nfunction daysForLocale(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction monthsForLocale(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nexport function getLocale(language: string): flatpickr.CustomLocale {\n return {\n firstDayOfWeek: getFirstDayOfWeek(language),\n rangeSeparator: ' - ',\n weekAbbreviation: '',\n yearAriaLabel: i18n.t('datepicker.year'),\n monthAriaLabel: i18n.t('datepicker.month'),\n hourAriaLabel: i18n.t('datepicker.hour'),\n minuteAriaLabel: i18n.t('datepicker.minute'),\n toggleTitle: i18n.t('datepicker.toggle'),\n scrollTitle: i18n.t('datepicker.scroll'),\n time_24hr: !getHour12(language),\n weekdays: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: daysForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: daysForLocale(language, 'long') as any\n },\n months: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: monthsForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: monthsForLocale(language, 'long') as any\n }\n };\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n","@use 'variables' as *;\n@use 'mixins' as *;\n@import '~flatpickr/dist/flatpickr.css';\n@import 'vendor/flatpickr';\n\n:host {\n display: flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\ncat-input {\n flex: 1 1 auto;\n margin: 0;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport flatpickr from 'flatpickr';\nimport { findClosest } from '../../utils/find-closest';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getConfig } from './cat-datepicker.config';\nimport { getFormat } from './cat-datepicker.format';\nimport { getLocale } from './cat-datepicker.locale';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { autoUpdate, computePosition, flip, Placement, ReferenceElement } from '@floating-ui/dom';\nimport { BaseOptions } from 'flatpickr/dist/types/options';\n\n@Component({\n tag: 'cat-datepicker',\n styleUrl: 'cat-datepicker.scss',\n shadow: true\n})\nexport class CatDatepickerFlat {\n private pickr?: flatpickr.Instance;\n private _input?: HTMLCatInputElement;\n private _calendarWrapper?: HTMLDivElement;\n private get input(): HTMLInputElement | undefined {\n return this._input?.shadowRoot?.querySelector('input') ?? undefined;\n }\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * Instead of body, appends the calendar to the cat-datepicker element instead\n */\n @Prop() attachToElement = false;\n\n /**\n * Where the calendar is rendered relative to the input vertically and horizontally.\n * In the format of \"[vertical] [horizontal]\". Vertical can be auto, above or below (required).\n * Horizontal can be left, center or right.\n * If @attachToElement is passed the value should be in Placement format\n */\n @Prop() position?: BaseOptions['position'] | Placement;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n if (this.mode !== 'daterange' || value.includes(' - ')) {\n this.catChange.emit(value);\n }\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n @Watch('mode')\n onDisabledChanged() {\n // Dynamically changing config value is not working due to a bug in the\n // library. We thus need to fully recreate the date picker after the value\n // has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => {\n this.input ? (this.input.disabled = this.disabled) : null;\n this.pickr = this.initDatepicker(this.input);\n });\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n @Watch('min')\n @Watch('max')\n onMinChanged() {\n this.pickr?.set('minDate', this.min);\n this.pickr?.set('maxDate', this.max);\n if (this.value && !this.pickr?.selectedDates?.length) {\n // Dynamically changing 'minDate' or 'maxDate' does not emit a change if\n // the value is cleared due to an invalid date.\n this.pickr?.clear();\n }\n }\n\n /**\n * Programmatically move focus to the datepicker. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this._input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the datepicker. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this._input?.doBlur();\n }\n\n render() {\n return [\n (this._input = el)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n label={this.label}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n value={this.value}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n onCatChange={e => {\n e.stopPropagation();\n this.value = e.detail || undefined;\n }}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.catBlur.emit(e.detail);\n }}\n >\n {this.hasSlottedLabel && (\n \n \n \n )}\n {this.hasSlottedHint && (\n \n \n \n )}\n ,\n (this._calendarWrapper = el)} class=\"datepicker-wrapper\">\n ];\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n // avoid dropdown closing if datepicker is part of a dropdown\n const withinDropdown = !!findClosest('cat-dropdown', input);\n const nativePickerAttributes: { [key: string]: string } = withinDropdown ? { 'data-dropdown-no-close': '' } : {};\n\n return flatpickr(\n input,\n getConfig({\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n appendTo: this.attachToElement ? this._calendarWrapper : undefined,\n nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },\n // flatpickr has open bug about incorrect positioning when appendTo is used,\n // we have to use custom logic to calculate position\n // https://github.com/flatpickr/flatpickr/issues/1619\n position: this.attachToElement\n ? (flatpickr, positionElement) => {\n this.updatePosition(flatpickr, positionElement);\n }\n : (this.position as BaseOptions['position']) || undefined,\n onReady: (_dates, _dateStr, flatpickr) => {\n autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));\n },\n applyChange: value => (this.value = value)\n })\n );\n }\n\n private updatePosition(flatpickr: flatpickr.Instance, positionElement: HTMLElement | undefined): void {\n if (positionElement) {\n computePosition(positionElement as ReferenceElement, flatpickr.calendarContainer, {\n strategy: 'fixed',\n placement: (this.position as Placement) || 'bottom-start',\n middleware: [flip()]\n }).then(({ x, y, placement }) => {\n if (flatpickr.calendarContainer) {\n flatpickr.calendarContainer.dataset.placement = placement;\n Object.assign(flatpickr.calendarContainer.style, {\n left: `${x}px`,\n top: `${y}px`,\n position: 'fixed'\n });\n }\n });\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n@import '~flatpickr/dist/flatpickr.css';\n@import '../styles/vendor/flatpickr';\n\n:host {\n display: inline-flex;\n\n > div {\n display: flex;\n }\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.datepicker-disabled,\n.datepicker-readonly {\n .flatpickr-days,\n .flatpickr-time {\n pointer-events: none;\n }\n}\n\n.datepicker-disabled {\n .flatpickr-days {\n opacity: 0.75;\n }\n\n .flatpickr-time {\n input,\n .flatpickr-time-separator,\n .flatpickr-am-pm {\n color: cat-token('color.ui.font.muted');\n opacity: 0.75;\n }\n }\n}\n\ninput {\n display: none;\n}\n\n.flatpickr-calendar {\n box-shadow: unset;\n background: unset;\n}\n","import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\nimport flatpickr from 'flatpickr';\nimport { getConfig } from '../cat-datepicker/cat-datepicker.config';\nimport { getFormat } from '../cat-datepicker/cat-datepicker.format';\nimport { getLocale } from '../cat-datepicker/cat-datepicker.locale';\nimport { CatDatepickerMode } from '../cat-datepicker/cat-datepicker.mode';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n@Component({\n tag: 'cat-datepicker-inline',\n styleUrl: 'cat-datepicker-inline.scss',\n shadow: true\n})\nexport class CatDatepickerInline {\n private pickr?: flatpickr.Instance;\n private input?: HTMLInputElement;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * A maximum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z.\n */\n @Prop() min?: string;\n\n /**\n * The mode of the datepicker, to select a date, time, both, a date range or a week number.\n */\n @Prop() mode: CatDatepickerMode = 'date';\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * The step size to use when changing the time.\n */\n @Prop() step = 5;\n\n /**\n * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Attributes that will be added to the rendered HTML datepicker element.\n */\n @Prop() nativePickerAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n @Watch('value')\n onValueChanged(value: string) {\n if (value) {\n this.pickr?.setDate(value, false);\n this.catChange.emit(value);\n } else {\n this.pickr?.clear(false);\n this.catChange.emit(undefined);\n }\n }\n\n @Watch('disabled')\n @Watch('readonly')\n onDisabledChanged() {\n // Dynamically unsetting 'enabled' value to undefined is not working due to\n // a bug in the library. We thus need to fully recreate the date picker\n // after the value has been updated.\n this.pickr?.destroy();\n this.pickr = undefined;\n setTimeout(() => (this.pickr = this.initDatepicker(this.input)));\n }\n\n componentDidLoad() {\n this.pickr = this.initDatepicker(this.input);\n }\n\n render() {\n return (\n \n \n (this.input = el)}\n value={this.value}\n disabled={this.disabled}\n readonly={this.readonly}\n >\n \n \n );\n }\n\n private initDatepicker(input?: HTMLInputElement): flatpickr.Instance | undefined {\n if (!input) {\n return;\n }\n\n return flatpickr(\n input,\n getConfig(\n {\n locale: getLocale(i18n.getLocale()),\n format: getFormat(i18n.getLocale(), this.mode),\n mode: this.mode,\n min: this.min,\n max: this.max,\n step: this.step,\n disabled: this.disabled,\n readonly: this.readonly,\n nativePickerAttributes: this.nativePickerAttributes ?? {},\n applyChange: value => (this.value = value)\n },\n {\n ...(this.disabled ? { enable: [] } : {}),\n inline: true\n }\n )\n );\n }\n}\n","/**\n * Auto-generated file. Do not edit directly.\n */\n\nexport const assetFontLatoName = \"Lato\";\nexport const assetFontLatoWoffBlack = \"Lato-Black.woff\";\nexport const assetFontLatoWoff2Black = \"Lato-Black.woff2\";\nexport const assetFontLatoWoffBlackItalic = \"Lato-BlackItalic.woff\";\nexport const assetFontLatoWoff2BlackItalic = \"Lato-BlackItalic.woff2\";\nexport const assetFontLatoWoffBold = \"Lato-Bold.woff\";\nexport const assetFontLatoWoff2Bold = \"Lato-Bold.woff2\";\nexport const assetFontLatoWoffBoldItalic = \"Lato-BoldItalic.woff\";\nexport const assetFontLatoWoff2BoldItalic = \"Lato-BoldItalic.woff2\";\nexport const assetFontLatoWoffHairline = \"Lato-Hairline.woff\";\nexport const assetFontLatoWoff2Hairline = \"Lato-Hairline.woff2\";\nexport const assetFontLatoWoffHairlineItalic = \"Lato-HairlineItalic.woff\";\nexport const assetFontLatoWoff2HairlineItalic = \"Lato-HairlineItalic.woff2\";\nexport const assetFontLatoWoffHeavy = \"Lato-Heavy.woff\";\nexport const assetFontLatoWoff2Heavy = \"Lato-Heavy.woff2\";\nexport const assetFontLatoWoffHeavyItalic = \"Lato-HeavyItalic.woff\";\nexport const assetFontLatoWoff2HeavyItalic = \"Lato-HeavyItalic.woff2\";\nexport const assetFontLatoWoffItalic = \"Lato-Italic.woff\";\nexport const assetFontLatoWoff2Italic = \"Lato-Italic.woff2\";\nexport const assetFontLatoWoffLight = \"Lato-Light.woff\";\nexport const assetFontLatoWoff2Light = \"Lato-Light.woff2\";\nexport const assetFontLatoWoffLightItalic = \"Lato-LightItalic.woff\";\nexport const assetFontLatoWoff2LightItalic = \"Lato-LightItalic.woff2\";\nexport const assetFontLatoWoffMedium = \"Lato-Medium.woff\";\nexport const assetFontLatoWoff2Medium = \"Lato-Medium.woff2\";\nexport const assetFontLatoWoffMediumItalic = \"Lato-MediumItalic.woff\";\nexport const assetFontLatoWoff2MediumItalic = \"Lato-MediumItalic.woff2\";\nexport const assetFontLatoWoffRegular = \"Lato-Regular.woff\";\nexport const assetFontLatoWoff2Regular = \"Lato-Regular.woff2\";\nexport const assetFontLatoWoffSemibold = \"Lato-Semibold.woff\";\nexport const assetFontLatoWoff2Semibold = \"Lato-Semibold.woff2\";\nexport const assetFontLatoWoffSemiboldItalic = \"Lato-SemiboldItalic.woff\";\nexport const assetFontLatoWoff2SemiboldItalic = \"Lato-SemiboldItalic.woff2\";\nexport const assetFontLatoWoffThin = \"Lato-Thin.woff\";\nexport const assetFontLatoWoff2Thin = \"Lato-Thin.woff2\";\nexport const assetFontLatoWoffThinItalic = \"Lato-ThinItalic.woff\";\nexport const assetFontLatoWoff2ThinItalic = \"Lato-ThinItalic.woff2\";\nexport const assetFontAzeretMonoName = \"Azeret Mono\";\nexport const assetFontAzeretMonoWoff2Regular = \"AzeretMono-Regular.woff2\";\nexport const assetFontSs3vName = \"Source Sans 3\";\nexport const assetFontSs3vWoff = \"SourceSans3VF-Upright.ttf.woff\";\nexport const assetFontSs3vWoff2 = \"SourceSans3VF-Upright.ttf.woff2\";\nexport const colorBaseWhite = \"#ffffff\";\nexport const colorBaseBlack = \"#000000\";\nexport const colorBaseNeutral100 = \"#f2f4f7\";\nexport const colorBaseNeutral200 = \"#ebecf0\";\nexport const colorBaseNeutral300 = \"#d7dbe0\";\nexport const colorBaseNeutral400 = \"#697687\";\nexport const colorBaseNeutral500 = \"#515c6c\";\nexport const colorBaseNeutral600 = \"#394251\";\nexport const colorBaseNeutral700 = \"#1b1f26\";\nexport const colorBaseNeutralInverted400 = \"#697687\";\nexport const colorBaseBrand100 = \"#c9e5e8\";\nexport const colorBaseBrand200 = \"#2db3c3\";\nexport const colorBaseBrand300 = \"#29a3b1\";\nexport const colorBaseBrand400 = \"#008194\";\nexport const colorBaseBrand500 = \"#017384\";\nexport const colorBaseBrand600 = \"#026371\";\nexport const colorBaseBrand700 = \"#175b63\";\nexport const colorBaseBrandInverted400 = \"#93b4f2\";\nexport const colorBaseBrandInverted500 = \"#93b4f2\";\nexport const colorBaseBrandInverted600 = \"#93b4f2\";\nexport const colorBaseBlue100 = \"#b3d5f8\";\nexport const colorBaseBlue200 = \"#80b9f3\";\nexport const colorBaseBlue300 = \"#2688ea\";\nexport const colorBaseBlue400 = \"#0073e6\";\nexport const colorBaseBlue500 = \"#006be3\";\nexport const colorBaseBlue600 = \"#0060df\";\nexport const colorBaseBlue700 = \"#0043d5\";\nexport const colorBaseGreen100 = \"#d4ede4\";\nexport const colorBaseGreen200 = \"#00bb7d\";\nexport const colorBaseGreen300 = \"#00aa71\";\nexport const colorBaseGreen400 = \"#008458\";\nexport const colorBaseGreen500 = \"#00754e\";\nexport const colorBaseGreen600 = \"#006946\";\nexport const colorBaseGreen700 = \"#005f40\";\nexport const colorBaseOrange100 = \"#ffdea8\";\nexport const colorBaseOrange200 = \"#ffd694\";\nexport const colorBaseOrange300 = \"#ffce80\";\nexport const colorBaseOrange400 = \"#ebb663\";\nexport const colorBaseOrange500 = \"#d6a75a\";\nexport const colorBaseOrange600 = \"#b0853e\";\nexport const colorBaseOrange700 = \"#9f6100\";\nexport const colorBaseRed100 = \"#fbc7bb\";\nexport const colorBaseRed200 = \"#f68368\";\nexport const colorBaseRed300 = \"#f46a49\";\nexport const colorBaseRed400 = \"#d9340d\";\nexport const colorBaseRed500 = \"#c22e0b\";\nexport const colorBaseRed600 = \"#ae2a0a\";\nexport const colorBaseRed700 = \"#9e2609\";\nexport const colorThemePrimaryBg = \"#008194\";\nexport const colorThemePrimaryBgHover = \"#017384\";\nexport const colorThemePrimaryBgActive = \"#026371\";\nexport const colorThemePrimaryFill = \"#ffffff\";\nexport const colorThemePrimaryFillHover = \"#ffffff\";\nexport const colorThemePrimaryFillActive = \"#ffffff\";\nexport const colorThemePrimaryText = \"#008194\";\nexport const colorThemePrimaryTextHover = \"#017384\";\nexport const colorThemePrimaryTextActive = \"#026371\";\nexport const colorThemePrimaryInvertedBg = \"#93b4f2\";\nexport const colorThemePrimaryInvertedBgHover = \"#93b4f2\";\nexport const colorThemePrimaryInvertedBgActive = \"#93b4f2\";\nexport const colorThemePrimaryInvertedFill = \"#000000\";\nexport const colorThemePrimaryInvertedFillHover = \"#000000\";\nexport const colorThemePrimaryInvertedFillActive = \"#000000\";\nexport const colorThemePrimaryInvertedText = \"#93b4f2\";\nexport const colorThemePrimaryInvertedTextHover = \"#93b4f2\";\nexport const colorThemePrimaryInvertedTextActive = \"#93b4f2\";\nexport const colorThemeSecondaryBg = \"#697687\";\nexport const colorThemeSecondaryBgHover = \"#697687\";\nexport const colorThemeSecondaryBgActive = \"#697687\";\nexport const colorThemeSecondaryFill = \"#ffffff\";\nexport const colorThemeSecondaryFillHover = \"#ffffff\";\nexport const colorThemeSecondaryFillActive = \"#ffffff\";\nexport const colorThemeSecondaryText = \"#000000\";\nexport const colorThemeSecondaryTextHover = \"#000000\";\nexport const colorThemeSecondaryTextActive = \"#000000\";\nexport const colorThemeSecondaryInvertedBg = \"#697687\";\nexport const colorThemeSecondaryInvertedBgHover = \"#697687\";\nexport const colorThemeSecondaryInvertedBgActive = \"#697687\";\nexport const colorThemeSecondaryInvertedFill = \"#000000\";\nexport const colorThemeSecondaryInvertedFillHover = \"#000000\";\nexport const colorThemeSecondaryInvertedFillActive = \"#000000\";\nexport const colorThemeSecondaryInvertedText = \"#ffffff\";\nexport const colorThemeSecondaryInvertedTextHover = \"#ffffff\";\nexport const colorThemeSecondaryInvertedTextActive = \"#ffffff\";\nexport const colorThemeInfoBg = \"#0073e6\";\nexport const colorThemeInfoBgHover = \"#006be3\";\nexport const colorThemeInfoBgActive = \"#0060df\";\nexport const colorThemeInfoFill = \"#ffffff\";\nexport const colorThemeInfoFillHover = \"#ffffff\";\nexport const colorThemeInfoFillActive = \"#ffffff\";\nexport const colorThemeInfoText = \"#0073e6\";\nexport const colorThemeInfoTextHover = \"#006be3\";\nexport const colorThemeInfoTextActive = \"#0060df\";\nexport const colorThemeSuccessBg = \"#008458\";\nexport const colorThemeSuccessBgHover = \"#00754e\";\nexport const colorThemeSuccessBgActive = \"#006946\";\nexport const colorThemeSuccessFill = \"#ffffff\";\nexport const colorThemeSuccessFillHover = \"#ffffff\";\nexport const colorThemeSuccessFillActive = \"#ffffff\";\nexport const colorThemeSuccessText = \"#008458\";\nexport const colorThemeSuccessTextHover = \"#00754e\";\nexport const colorThemeSuccessTextActive = \"#006946\";\nexport const colorThemeWarningBg = \"#ffce80\";\nexport const colorThemeWarningBgHover = \"#ffd694\";\nexport const colorThemeWarningBgActive = \"#ffdea8\";\nexport const colorThemeWarningFill = \"#000000\";\nexport const colorThemeWarningFillHover = \"#000000\";\nexport const colorThemeWarningFillActive = \"#000000\";\nexport const colorThemeWarningText = \"#9f6100\";\nexport const colorThemeWarningTextHover = \"#9f6100\";\nexport const colorThemeWarningTextActive = \"#9f6100\";\nexport const colorThemeDangerBg = \"#d9340d\";\nexport const colorThemeDangerBgHover = \"#c22e0b\";\nexport const colorThemeDangerBgActive = \"#ae2a0a\";\nexport const colorThemeDangerFill = \"#ffffff\";\nexport const colorThemeDangerFillHover = \"#ffffff\";\nexport const colorThemeDangerFillActive = \"#ffffff\";\nexport const colorThemeDangerText = \"#d9340d\";\nexport const colorThemeDangerTextHover = \"#c22e0b\";\nexport const colorThemeDangerTextActive = \"#ae2a0a\";\nexport const colorUiBackgroundCanvas = \"#f2f4f7\";\nexport const colorUiBackgroundSurface = \"#ffffff\";\nexport const colorUiBackgroundSurfaceInverted = \"#1b1f26\";\nexport const colorUiBackgroundMuted = \"#f2f4f7\";\nexport const colorUiBackgroundInput = \"#ffffff\";\nexport const colorUiBackgroundInputAutofill = \"#e8f0fe\";\nexport const colorUiBackgroundSkeleton = \"#ebecf0\";\nexport const colorUiBackgroundSkeletonHighlight = \"#d7dbe0\";\nexport const colorUiBackgroundTooltip = \"#000000\";\nexport const colorUiBackgroundBackdrop = \"#1b1f26\";\nexport const colorUiBorderLight = \"#f2f4f7\";\nexport const colorUiBorderDefault = \"#ebecf0\";\nexport const colorUiBorderDark = \"#d7dbe0\";\nexport const colorUiBorderFocus = \"#0071ff\";\nexport const colorUiBorderQuote = \"#697687\";\nexport const colorUiFontBase = \"#000000\";\nexport const colorUiFontBaseInverted = \"#ffffff\";\nexport const colorUiFontMuted = \"#515c6c\";\nexport const colorUiFontQuote = \"#515c6c\";\nexport const colorUiFontTooltip = \"#ffffff\";\nexport const fontFamilyBase = \"Lato\";\nexport const fontFamilyMono = \"''\";\nexport const fontFamilyEmoji = \"''\";\nexport const fontWeightHead = 600;\nexport const fontWeightBody = 400;\nexport const fontWeightMono = 400;\nexport const fontDecorationLink = \"none\";\nexport const fontDecorationLinkHover = \"underline\";\nexport const fontDecorationLinkButton = \"none\";\nexport const fontDecorationLinkButtonHover = \"none\";\nexport const opacityDisabled = 0.65;\nexport const opacityBackdrop = 0.4;\nexport const opacityTooltip = 1;\nexport const sizeBorderRadiusL = 0.5;\nexport const sizeBorderRadiusM = 0.25;\nexport const sizeBorderRadiusS = 0.125;\nexport const sizeFontHead1 = 1.75;\nexport const sizeFontHead2 = 1.5;\nexport const sizeFontHead3 = 1.25;\nexport const sizeFontHead4 = 1.125;\nexport const sizeFontHead5 = 0.9375;\nexport const sizeFontHead6 = 0.875;\nexport const sizeFontBodyXl = 1.25;\nexport const sizeFontBodyL = 1.125;\nexport const sizeFontBodyM = 0.9375;\nexport const sizeFontBodyS = 0.875;\nexport const sizeFontBodyXs = 0.75;\nexport const sizeFontMonoXl = 1.125;\nexport const sizeFontMonoL = 0.9375;\nexport const sizeFontMonoM = 0.875;\nexport const sizeFontMonoS = 0.75;\nexport const sizeFontMonoXs = 0.625;\nexport const sizeLineHead1 = 2;\nexport const sizeLineHead2 = 1.75;\nexport const sizeLineHead3 = 1.5;\nexport const sizeLineHead4 = 1.5;\nexport const sizeLineHead5 = 1.25;\nexport const sizeLineHead6 = 1;\nexport const sizeLineBodyXl = 1.5;\nexport const sizeLineBodyL = 1.5;\nexport const sizeLineBodyM = 1.25;\nexport const sizeLineBodyS = 1.125;\nexport const sizeLineBodyXs = 1;\nexport const sizeLineMonoXl = 1.5;\nexport const sizeLineMonoL = 1.25;\nexport const sizeLineMonoM = 1.125;\nexport const sizeLineMonoS = 1;\nexport const sizeLineMonoXs = 0.875;\nexport const sizeModalS = 400;\nexport const sizeModalM = 600;\nexport const sizeModalL = 800;\nexport const sizeScreenXs = 540;\nexport const sizeScreenS = 768;\nexport const sizeScreenM = 992;\nexport const sizeScreenL = 1200;\nexport const sizeScreenXl = 1400;\nexport const sizeSpacingXl = 2;\nexport const sizeSpacingL = 1.5;\nexport const sizeSpacingM = 1;\nexport const sizeSpacingS = 0.5;\nexport const sizeSpacingXs = 0.25;\nexport const timeTransitionL = 500;\nexport const timeTransitionM = 250;\nexport const timeTransitionS = 125;\nexport const timeDelayL = 500;\nexport const timeDelayM = 250;\nexport const timeDelayS = 125;\nexport const timeDurationL = 1000;\nexport const timeDurationM = 500;\nexport const timeDurationS = 250;\nexport const zIndexBase = 1000;\nexport const zIndexDropdown = 100;\nexport const zIndexTooltip = 200;\n","/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, , and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled \n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first among the children of the disabled \n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent is not nested in another disabled ,\n // return whether `node` is a descendant of its first \n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled containing `node` has no \n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","/*!\n* focus-trap 7.5.4\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nimport { isFocusable, tabbable, focusable, isTabbable, getTabIndex } from 'tabbable';\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar activeFocusTraps = {\n activateTrap: function activateTrap(trapStack, trap) {\n if (trapStack.length > 0) {\n var activeTrap = trapStack[trapStack.length - 1];\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex === -1) {\n trapStack.push(trap);\n } else {\n // move this existing trap to the front of the queue\n trapStack.splice(trapIndex, 1);\n trapStack.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trapStack, trap) {\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex !== -1) {\n trapStack.splice(trapIndex, 1);\n }\n if (trapStack.length > 0) {\n trapStack[trapStack.length - 1].unpause();\n }\n }\n};\nvar isSelectableInput = function isSelectableInput(node) {\n return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';\n};\nvar isEscapeEvent = function isEscapeEvent(e) {\n return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;\n};\nvar isTabEvent = function isTabEvent(e) {\n return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;\n};\n\n// checks for TAB by default\nvar isKeyForward = function isKeyForward(e) {\n return isTabEvent(e) && !e.shiftKey;\n};\n\n// checks for SHIFT+TAB by default\nvar isKeyBackward = function isKeyBackward(e) {\n return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay(fn) {\n return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n// of Array.findIndex() for our needs\nvar findIndex = function findIndex(arr, fn) {\n var idx = -1;\n arr.every(function (value, i) {\n if (fn(value)) {\n idx = i;\n return false; // break\n }\n\n return true; // next\n });\n\n return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n * the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nvar valueOrHandler = function valueOrHandler(value) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n return typeof value === 'function' ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget(event) {\n // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n // shadow host. However, event.target.composedPath() will be an array of\n // nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n // outer-most (the host HTML document). If we have access to composedPath(),\n // then use its first element; otherwise, fall back to event.target (and\n // this only works for an _open_ shadow DOM; otherwise,\n // composedPath()[0] === event.target always).\n return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;\n};\n\n// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this\n// current instance use the same stack if `userOptions.trapStack` isn't specified\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap(elements, userOptions) {\n // SSR: a live trap shouldn't be created in this type of environment so this\n // should be safe code to execute if the `document` option isn't specified\n var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true,\n isKeyForward: isKeyForward,\n isKeyBackward: isKeyBackward\n }, userOptions);\n var state = {\n // containers given to createFocusTrap()\n // @type {Array}\n containers: [],\n // list of objects identifying tabbable nodes in `containers` in the trap\n // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n // is active, but the trap should never get to a state where there isn't at least one group\n // with at least one tabbable node in it (that would lead to an error condition that would\n // result in an error being thrown)\n // @type {Array<{\n // container: HTMLElement,\n // tabbableNodes: Array, // empty if none\n // focusableNodes: Array, // empty if none\n // posTabIndexesFound: boolean,\n // firstTabbableNode: HTMLElement|undefined,\n // lastTabbableNode: HTMLElement|undefined,\n // firstDomTabbableNode: HTMLElement|undefined,\n // lastDomTabbableNode: HTMLElement|undefined,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\n\n // references to objects in `containerGroups`, but only those that actually have\n // tabbable nodes in them\n // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n // the same length\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: undefined,\n // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n recentNavEvent: undefined\n };\n var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n /**\n * Gets a configuration option value.\n * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n * value will be taken from this object. Otherwise, value will be taken from base configuration.\n * @param {string} optionName Name of the option whose value is sought.\n * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n */\n var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n\n /**\n * Finds the index of the container that contains the element.\n * @param {HTMLElement} element\n * @param {Event} [event] If available, and `element` isn't directly found in any container,\n * the event's composed path is used to see if includes any known trap containers in the\n * case where the element is inside a Shadow DOM.\n * @returns {number} Index of the container in either `state.containers` or\n * `state.containerGroups` (the order/length of these lists are the same); -1\n * if the element isn't found.\n */\n var findContainerIndex = function findContainerIndex(element, event) {\n var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;\n // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n // and we still need to find the element in there\n return state.containerGroups.findIndex(function (_ref) {\n var container = _ref.container,\n tabbableNodes = _ref.tabbableNodes;\n return container.contains(element) || ( // fall back to explicit tabbable search which will take into consideration any\n // web components if the `tabbableOptions.getShadowRoot` option was used for\n // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n // look inside web components even if open)\n composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {\n return node === element;\n });\n });\n };\n\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @returns {undefined | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `false` if the option\n * resolved to `false` (node explicitly not given); otherwise, the resolved\n * DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node.\n */\n var getNodeForOption = function getNodeForOption(optionName) {\n var optionValue = config[optionName];\n if (typeof optionValue === 'function') {\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n node = doc.querySelector(optionValue); // resolve to node, or null if fails\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n };\n var getInitialFocusNode = function getInitialFocusNode() {\n var node = getNodeForOption('initialFocus');\n\n // false explicitly indicates we want no initialFocus at all\n if (node === false) {\n return false;\n }\n if (node === undefined || !isFocusable(node, config.tabbableOptions)) {\n // option not specified nor focusable: use fallback options\n if (findContainerIndex(doc.activeElement) >= 0) {\n node = doc.activeElement;\n } else {\n var firstTabbableGroup = state.tabbableGroups[0];\n var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n node = firstTabbableNode || getNodeForOption('fallbackFocus');\n }\n }\n if (!node) {\n throw new Error('Your focus-trap needs to have at least one focusable element');\n }\n return node;\n };\n var updateTabbableNodes = function updateTabbableNodes() {\n state.containerGroups = state.containers.map(function (container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions);\n\n // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n // are a superset of tabbable nodes since nodes with negative `tabindex` attributes\n // are focusable but not tabbable\n var focusableNodes = focusable(container, config.tabbableOptions);\n var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;\n var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;\n var firstDomTabbableNode = focusableNodes.find(function (node) {\n return isTabbable(node);\n });\n var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {\n return isTabbable(node);\n });\n var posTabIndexesFound = !!tabbableNodes.find(function (node) {\n return getTabIndex(node) > 0;\n });\n return {\n container: container,\n tabbableNodes: tabbableNodes,\n focusableNodes: focusableNodes,\n /** True if at least one node with positive `tabindex` was found in this container. */\n posTabIndexesFound: posTabIndexesFound,\n /** First tabbable node in container, __tabindex__ order; `undefined` if none. */\n firstTabbableNode: firstTabbableNode,\n /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */\n lastTabbableNode: lastTabbableNode,\n // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // because that API doesn't work with Shadow DOM as well as it should (@see\n // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n // to address an edge case related to positive tabindex support, this seems like a much easier,\n // \"close enough most of the time\" alternative for positive tabindexes which should generally\n // be avoided anyway...\n /** First tabbable node in container, __DOM__ order; `undefined` if none. */\n firstDomTabbableNode: firstDomTabbableNode,\n /** Last tabbable node in container, __DOM__ order; `undefined` if none. */\n lastDomTabbableNode: lastDomTabbableNode,\n /**\n * Finds the __tabbable__ node that follows the given node in the specified direction,\n * in this container, if any.\n * @param {HTMLElement} node\n * @param {boolean} [forward] True if going in forward tab order; false if going\n * in reverse.\n * @returns {HTMLElement|undefined} The next tabbable node, if any.\n */\n nextTabbableNode: function nextTabbableNode(node) {\n var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var nodeIdx = tabbableNodes.indexOf(node);\n if (nodeIdx < 0) {\n // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):\n // since `node` should at least have been focusable, we assume that's the case and mimic\n // what browsers do, which is set focus to the next node in __document position order__,\n // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE\n // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to\n // basic DOM order\n if (forward) {\n return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {\n return isTabbable(el);\n });\n }\n return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {\n return isTabbable(el);\n });\n }\n return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function (group) {\n return group.tabbableNodes.length > 0;\n });\n\n // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option\n ) {\n throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');\n }\n\n // NOTE: Positive tabindexes are only properly supported in single-container traps because\n // doing it across multiple containers where tabindexes could be all over the place\n // would require Tabbable to support multiple containers, would require additional\n // specialized Shadow DOM support, and would require Tabbable's multi-container support\n // to look at those containers in document position order rather than user-provided\n // order (as they are treated in Focus-trap, for legacy reasons). See discussion on\n // https://github.com/focus-trap/focus-trap/issues/375 for more details.\n if (state.containerGroups.find(function (g) {\n return g.posTabIndexesFound;\n }) && state.containerGroups.length > 1) {\n throw new Error(\"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\");\n }\n };\n\n /**\n * Gets the current activeElement. If it's a web-component and has open shadow-root\n * it will recursively search inside shadow roots for the \"true\" activeElement.\n *\n * @param {Document | ShadowRoot} el\n *\n * @returns {HTMLElement} The element that currently has the focus\n **/\n var getActiveElement = function getActiveElement(el) {\n var activeElement = el.activeElement;\n if (!activeElement) {\n return;\n }\n if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {\n return getActiveElement(activeElement.shadowRoot);\n }\n return activeElement;\n };\n var tryFocus = function tryFocus(node) {\n if (node === false) {\n return;\n }\n if (node === getActiveElement(document)) {\n return;\n }\n if (!node || !node.focus) {\n tryFocus(getInitialFocusNode());\n return;\n }\n node.focus({\n preventScroll: !!config.preventScroll\n });\n // NOTE: focus() API does not trigger focusIn event so set MRU node manually\n state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {\n var node = getNodeForOption('setReturnFocus', previousActiveElement);\n return node ? node : node === false ? false : previousActiveElement;\n };\n\n /**\n * Finds the next node (in either direction) where focus should move according to a\n * keyboard focus-in event.\n * @param {Object} params\n * @param {Node} [params.target] Known target __from which__ to navigate, if any.\n * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event\n * will be used to determine the `target`). Ignored if `target` is specified.\n * @param {boolean} [params.isBackward] True if focus should move backward.\n * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be\n * determined given the current state of the trap.\n */\n var findNextNavNode = function findNextNavNode(_ref2) {\n var target = _ref2.target,\n event = _ref2.event,\n _ref2$isBackward = _ref2.isBackward,\n isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;\n target = target || getActualTarget(event);\n updateTabbableNodes();\n var destinationNode = null;\n if (state.tabbableGroups.length > 0) {\n // make sure the target is actually contained in a group\n // NOTE: the target may also be the container itself if it's focusable\n // with tabIndex='-1' and was given initial focus\n var containerIndex = findContainerIndex(target, event);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n if (containerIndex < 0) {\n // target not found in any group: quite possible focus has escaped the trap,\n // so bring it back into...\n if (isBackward) {\n // ...the last node in the last group\n destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n // ...the first node in the first group\n destinationNode = state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (isBackward) {\n // REVERSE\n\n // is the target the first tabbable node in a group?\n var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {\n var firstTabbableNode = _ref3.firstTabbableNode;\n return target === firstTabbableNode;\n });\n if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n // an exception case where the target is either the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle shift+tab as if focus were on the container's\n // first tabbable node, and go to the last tabbable node of the LAST group\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n // YES: then shift+tab should go to the last tabbable node in the\n // previous group (and wrap around to the last tabbable node of\n // the LAST group if it's the first tabbable node of the FIRST group)\n var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target, false);\n }\n } else {\n // FORWARD\n\n // is the target the last tabbable node in a group?\n var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {\n var lastTabbableNode = _ref4.lastTabbableNode;\n return target === lastTabbableNode;\n });\n if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n // an exception case where the target is the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle tab as if focus were on the container's\n // last tabbable node, and go to the first tabbable node of the FIRST group\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n // YES: then tab should go to the first tabbable node in the next\n // group (and wrap around to the first tabbable node of the FIRST\n // group if it's the last tabbable node of the LAST group)\n var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target);\n }\n }\n } else {\n // no groups available\n // NOTE: the fallbackFocus option does not support returning false to opt-out\n destinationNode = getNodeForOption('fallbackFocus');\n }\n return destinationNode;\n };\n\n // This needs to be done on mousedown and touchstart instead of click\n // so that it precedes the focus event.\n var checkPointerDown = function checkPointerDown(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n // allow the click since it ocurred inside the trap\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n // immediately deactivate the trap\n trap.deactivate({\n // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n // which will result in the outside click setting focus to the node\n // that was clicked (and if not focusable, to \"nothing\"); by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node), whether the\n // outside click was on a focusable node or not\n returnFocus: config.returnFocusOnDeactivate\n });\n return;\n }\n\n // This is needed for mobile devices.\n // (If we'll only let `click` events through,\n // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n if (valueOrHandler(config.allowOutsideClick, e)) {\n // allow the click outside the trap to take place\n return;\n }\n\n // otherwise, prevent the click\n e.preventDefault();\n };\n\n // In case focus escapes the trap for some strange reason, pull it back in.\n // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected\n // scrolling if the node that got focused was out of view; there's nothing we can do to\n // prevent that from happening by the time we discover that focus escaped\n var checkFocusIn = function checkFocusIn(event) {\n var target = getActualTarget(event);\n var targetContained = findContainerIndex(target, event) >= 0;\n\n // In Firefox when you Tab out of an iframe the Document is briefly focused.\n if (targetContained || target instanceof Document) {\n if (targetContained) {\n state.mostRecentlyFocusedNode = target;\n }\n } else {\n // escaped! pull it back in to where it just left\n event.stopImmediatePropagation();\n\n // focus will escape if the MRU node had a positive tab index and user tried to nav forward;\n // it will also escape if the MRU node had a 0 tab index and user tried to nav backward\n // toward a node with a positive tab index\n var nextNode; // next node to focus, if we find one\n var navAcrossContainers = true;\n if (state.mostRecentlyFocusedNode) {\n if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...\n var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);\n // there MAY not be any tabbable nodes in the container if there are at least 2 containers\n // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container\n // with at least one tabbable node in order to function, so this could be the other container\n // with nothing tabbable in it)\n var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;\n if (tabbableNodes.length > 0) {\n // MRU tab index MAY not be found if the MRU node is focusable but not tabbable\n var mruTabIdx = tabbableNodes.findIndex(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n if (mruTabIdx >= 0) {\n if (config.isKeyForward(state.recentNavEvent)) {\n if (mruTabIdx + 1 < tabbableNodes.length) {\n nextNode = tabbableNodes[mruTabIdx + 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n } else {\n if (mruTabIdx - 1 >= 0) {\n nextNode = tabbableNodes[mruTabIdx - 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n }\n // else, don't find in container order without considering direction too\n }\n }\n // else, no tabbable nodes in that container (which means we must have at least one other\n // container with at least one tabbable node in it, otherwise focus-trap would've thrown\n // an error the last time updateTabbableNodes() was run): find next node among all known\n // containers\n } else {\n // check to see if there's at least one tabbable node with a positive tab index inside\n // the trap because focus seems to escape when navigating backward from a tabbable node\n // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with\n // the greatest positive tab index like it should)\n if (!state.containerGroups.some(function (g) {\n return g.tabbableNodes.some(function (n) {\n return getTabIndex(n) > 0;\n });\n })) {\n // no containers with tabbable nodes with positive tab indexes which means the focus\n // escaped for some other reason and we should just execute the fallback to the\n // MRU node or initial focus node, if any\n navAcrossContainers = false;\n }\n }\n } else {\n // no MRU node means we're likely in some initial condition when the trap has just\n // been activated and initial focus hasn't been given yet, in which case we should\n // fall through to trying to focus the initial focus node, which is what should\n // happen below at this point in the logic\n navAcrossContainers = false;\n }\n if (navAcrossContainers) {\n nextNode = findNextNavNode({\n // move FROM the MRU node, not event-related node (which will be the node that is\n // outside the trap causing the focus escape we're trying to fix)\n target: state.mostRecentlyFocusedNode,\n isBackward: config.isKeyBackward(state.recentNavEvent)\n });\n }\n if (nextNode) {\n tryFocus(nextNode);\n } else {\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n }\n state.recentNavEvent = undefined; // clear\n };\n\n // Hijack key nav events on the first and last focusable nodes of the trap,\n // in order to prevent focus from escaping. If it escapes for even a\n // moment it can end up scrolling the page and causing confusion so we\n // kind of need to capture the action at the keydown phase.\n var checkKeyNav = function checkKeyNav(event) {\n var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n state.recentNavEvent = event;\n var destinationNode = findNextNavNode({\n event: event,\n isBackward: isBackward\n });\n if (destinationNode) {\n if (isTabEvent(event)) {\n // since tab natively moves focus, we wouldn't have a destination node unless we\n // were on the edge of a container and had to move to the next/previous edge, in\n // which case we want to prevent default to keep the browser from moving focus\n // to where it normally would\n event.preventDefault();\n }\n tryFocus(destinationNode);\n }\n // else, let the browser take care of [shift+]tab and move the focus\n };\n\n var checkKey = function checkKey(event) {\n if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n event.preventDefault();\n trap.deactivate();\n return;\n }\n if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n checkKeyNav(event, config.isKeyBackward(event));\n }\n };\n var checkClick = function checkClick(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n\n //\n // EVENT LISTENERS\n //\n\n var addListeners = function addListeners() {\n if (!state.active) {\n return;\n }\n\n // There can be only one listening focus trap at a time\n activeFocusTraps.activateTrap(trapStack, trap);\n\n // Delay ensures that the focused element doesn't capture the event\n // that caused the focus trap activation.\n state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {\n tryFocus(getInitialFocusNode());\n }) : tryFocus(getInitialFocusNode());\n doc.addEventListener('focusin', checkFocusIn, true);\n doc.addEventListener('mousedown', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('touchstart', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('click', checkClick, {\n capture: true,\n passive: false\n });\n doc.addEventListener('keydown', checkKey, {\n capture: true,\n passive: false\n });\n return trap;\n };\n var removeListeners = function removeListeners() {\n if (!state.active) {\n return;\n }\n doc.removeEventListener('focusin', checkFocusIn, true);\n doc.removeEventListener('mousedown', checkPointerDown, true);\n doc.removeEventListener('touchstart', checkPointerDown, true);\n doc.removeEventListener('click', checkClick, true);\n doc.removeEventListener('keydown', checkKey, true);\n return trap;\n };\n\n //\n // MUTATION OBSERVER\n //\n\n var checkDomRemoval = function checkDomRemoval(mutations) {\n var isFocusedNodeRemoved = mutations.some(function (mutation) {\n var removedNodes = Array.from(mutation.removedNodes);\n return removedNodes.some(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n });\n\n // If the currently focused is removed then browsers will move focus to the\n // element. If this happens, try to move focus back into the trap.\n if (isFocusedNodeRemoved) {\n tryFocus(getInitialFocusNode());\n }\n };\n\n // Use MutationObserver - if supported - to detect if focused node is removed\n // from the DOM.\n var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;\n var updateObservedNodes = function updateObservedNodes() {\n if (!mutationObserver) {\n return;\n }\n mutationObserver.disconnect();\n if (state.active && !state.paused) {\n state.containers.map(function (container) {\n mutationObserver.observe(container, {\n subtree: true,\n childList: true\n });\n });\n }\n };\n\n //\n // TRAP DEFINITION\n //\n\n trap = {\n get active() {\n return state.active;\n },\n get paused() {\n return state.paused;\n },\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n var onActivate = getOption(activateOptions, 'onActivate');\n var onPostActivate = getOption(activateOptions, 'onPostActivate');\n var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n onActivate === null || onActivate === void 0 || onActivate();\n var finishActivation = function finishActivation() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n addListeners();\n updateObservedNodes();\n onPostActivate === null || onPostActivate === void 0 || onPostActivate();\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n state.delayInitialFocusTimer = undefined;\n removeListeners();\n state.active = false;\n state.paused = false;\n updateObservedNodes();\n activeFocusTraps.deactivateTrap(trapStack, trap);\n var onDeactivate = getOption(options, 'onDeactivate');\n var onPostDeactivate = getOption(options, 'onPostDeactivate');\n var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');\n onDeactivate === null || onDeactivate === void 0 || onDeactivate();\n var finishDeactivation = function finishDeactivation() {\n delay(function () {\n if (returnFocus) {\n tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n },\n pause: function pause(pauseOptions) {\n if (state.paused || !state.active) {\n return this;\n }\n var onPause = getOption(pauseOptions, 'onPause');\n var onPostPause = getOption(pauseOptions, 'onPostPause');\n state.paused = true;\n onPause === null || onPause === void 0 || onPause();\n removeListeners();\n updateObservedNodes();\n onPostPause === null || onPostPause === void 0 || onPostPause();\n return this;\n },\n unpause: function unpause(unpauseOptions) {\n if (!state.paused || !state.active) {\n return this;\n }\n var onUnpause = getOption(unpauseOptions, 'onUnpause');\n var onPostUnpause = getOption(unpauseOptions, 'onPostUnpause');\n state.paused = false;\n onUnpause === null || onUnpause === void 0 || onUnpause();\n updateTabbableNodes();\n addListeners();\n updateObservedNodes();\n onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();\n return this;\n },\n updateContainerElements: function updateContainerElements(containerElements) {\n var elementsAsArray = [].concat(containerElements).filter(Boolean);\n state.containers = elementsAsArray.map(function (element) {\n return typeof element === 'string' ? doc.querySelector(element) : element;\n });\n if (state.active) {\n updateTabbableNodes();\n }\n updateObservedNodes();\n return this;\n }\n };\n\n // initialize container elements\n trap.updateContainerElements(elements);\n return trap;\n};\n\nexport { createFocusTrap };\n//# sourceMappingURL=focus-trap.esm.js.map\n","import { FocusableElement, tabbable } from 'tabbable';\n\ntype Container = Element | FocusableElement | null;\n\nconst firstTabbable = (container?: Container): FocusableElement | undefined => {\n return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();\n};\n\nexport default firstTabbable;\n","@import 'variables';\n@import 'mixins';\n\n$-min-width: 8rem;\n$-max-width: 16rem;\n$-min-height: 2rem;\n$-max-height: calc(100vh - 48px);\n\n:host {\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(nav) {\n padding: 0.25rem;\n min-width: $-min-width;\n max-width: $-max-width;\n}\n\n.content {\n position: fixed;\n background: cat-token('color.ui.background.surface');\n -webkit-overflow-scrolling: touch;\n min-height: $-min-height;\n max-height: $-max-height;\n @include cat-elevation(4);\n border-radius: cat-border-radius('m');\n border: 1px solid cat-token('color.ui.border.default');\n z-index: cat-z-index('dropdown');\n // The 3 lines below set the initial styling (when not visible)\n display: none;\n opacity: 0;\n transform: scale(0.9);\n transition:\n transform cat-token('time.transition.s') cubic-bezier(0.3, 0, 0.8, 0.15),\n opacity cat-token('time.transition.s') cubic-bezier(0.3, 0, 0.8, 0.15);\n\n // Sets the origin point so the scaling transition matches the placement\n &[data-placement^='top'] {\n transform-origin: bottom;\n }\n\n &[data-placement^='top-start'] {\n transform-origin: bottom left;\n }\n\n &[data-placement^='top-end'] {\n transform-origin: bottom right;\n }\n\n &[data-placement^='left'] {\n transform-origin: right;\n }\n\n &[data-placement^='left-start'] {\n transform-origin: right top;\n }\n\n &[data-placement^='left-end'] {\n transform-origin: right bottom;\n }\n\n &[data-placement^='right'] {\n transform-origin: left;\n }\n\n &[data-placement^='right-start'] {\n transform-origin: left top;\n }\n\n &[data-placement^='right-end'] {\n transform-origin: left bottom;\n }\n\n &[data-placement^='bottom'] {\n transform-origin: top;\n }\n\n &[data-placement^='bottom-start'] {\n transform-origin: top left;\n }\n\n &[data-placement^='bottom-end'] {\n transform-origin: top right;\n }\n\n &.show {\n opacity: 1;\n transform: scale(1);\n transition:\n transform cat-token('time.transition.m') cubic-bezier(0.05, 0.7, 0.1, 1),\n opacity cat-token('time.transition.m') cubic-bezier(0.05, 0.7, 0.1, 1);\n }\n\n &.overflow-auto {\n overflow: auto;\n }\n}\n","import { autoUpdate, computePosition, flip, offset, Placement, size } from '@floating-ui/dom';\nimport { timeTransitionS } from '@haiilo/catalyst-tokens';\nimport { Component, Event, EventEmitter, h, Host, Listen, Method, Prop } from '@stencil/core';\nimport * as focusTrap from 'focus-trap';\nimport type { FocusableElement } from 'tabbable';\nimport firstTabbable from '../../utils/first-tabbable';\n\nlet nextUniqueId = 0;\n\n/**\n * A dropdown component to display a list of actions in a dropdown menu or to\n * show additional content on demand.\n */\n@Component({\n tag: 'cat-dropdown',\n styleUrl: 'cat-dropdown.scss',\n shadow: true\n})\nexport class CatDropdown {\n private static readonly OFFSET = 4;\n private readonly id = nextUniqueId++;\n private triggerSlot!: HTMLSlotElement;\n private trigger?: FocusableElement;\n private content!: HTMLElement;\n private trap?: focusTrap.FocusTrap;\n private isOpen: boolean | null = false;\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-start';\n\n /**\n * Do not close the dropdown on outside clicks.\n */\n @Prop() noAutoClose = false;\n\n /**\n * Do not navigate focus inside the dropdown via vertical arrow keys.\n */\n @Prop() arrowNavigation: 'horizontal' | 'vertical' | 'none' = 'vertical';\n\n /**\n * Do not change the size of the dropdown to ensure it isn’t too big to fit\n * in the viewport (or more specifically, its clipping context).\n */\n @Prop() noResize = false;\n\n /**\n * Allow overflow when dropdown is open.\n */\n @Prop() overflow = false;\n\n /**\n * No element in dropdown will receive focus when dropdown is open.\n * By default, the first element in tab order will receive a focus.\n */\n @Prop() noInitialFocus = false;\n\n /**\n * Emitted when the dropdown is opened.\n */\n @Event() catOpen!: EventEmitter;\n\n /**\n * Emitted when the dropdown is closed.\n */\n @Event() catClose!: EventEmitter;\n\n @Listen('catClick')\n clickHandler(event: CustomEvent) {\n // we need to delay the initialization of the trigger until first\n // interaction because the element might still be hidden (and thus not\n // tabbable) if contained in another Stencil web component\n if (!this.trigger) {\n this.initTrigger();\n this.toggle();\n }\n\n // hide dropdown on button clicks inside the dropdown content\n const path = event.composedPath();\n if (\n !this.noAutoClose &&\n // check if click was inside of the dropdown content\n path.includes(this.content) &&\n // check if click was not on a trigger for a sub-dropdown\n (event.target as Element)?.slot !== 'trigger' &&\n // check if click was not an element marked with data-dropdown-no-close\n !path.slice(0, path.indexOf(this.content)).find(el => this.hasAttribute(el, 'data-dropdown-no-close'))\n ) {\n this.close();\n }\n }\n\n /**\n * Toggles the dropdown.\n */\n @Method()\n async toggle(): Promise {\n this.isOpen ? this.close() : this.open();\n }\n\n /**\n * Opens the dropdown.\n */\n @Method()\n async open(): Promise {\n if (!this.trigger) {\n this.initTrigger();\n }\n\n if (this.isOpen === null || this.isOpen) {\n return; // busy or open\n }\n\n this.isOpen = null;\n this.content.style.display = 'block';\n // give CSS transition time to apply\n setTimeout(() => {\n this.isOpen = true;\n this.content.classList.add('show');\n this.trigger?.setAttribute('aria-expanded', 'true');\n this.trap = this.trap\n ? this.trap.updateContainerElements(this.content)\n : focusTrap.createFocusTrap(this.content, {\n tabbableOptions: {\n getShadowRoot: true\n },\n allowOutsideClick: true,\n clickOutsideDeactivates: event =>\n !this.noAutoClose &&\n // check if click was outside of the dropdown content\n !event.composedPath().includes(this.content) &&\n // check if click was not on an element marked with data-dropdown-no-close\n !event.composedPath().find(el => this.hasAttribute(el, 'data-dropdown-no-close')),\n onPostDeactivate: () => this.close(),\n onPostActivate: () => this.catOpen.emit(),\n setReturnFocus: elem => this.trigger || elem,\n isKeyForward: event => {\n if (\n (this.arrowNavigation === 'horizontal' && event.key === 'ArrowRight') ||\n (this.arrowNavigation === 'vertical' && event.key === 'ArrowDown')\n ) {\n event.preventDefault();\n return true;\n }\n return event.key === 'Tab';\n },\n isKeyBackward: event => {\n if (\n (this.arrowNavigation === 'horizontal' && event.key === 'ArrowLeft') ||\n (this.arrowNavigation === 'vertical' && event.key === 'ArrowUp')\n ) {\n event.preventDefault();\n return true;\n }\n return event.key === 'Tab' && event.shiftKey;\n },\n initialFocus: () => (this.noInitialFocus ? false : undefined)\n });\n this.trap.activate();\n });\n }\n\n /**\n * Closes the dropdown.\n */\n @Method()\n async close(): Promise {\n if (!this.isOpen) {\n return; // busy or closed\n }\n\n this.isOpen = null;\n this.content.classList.remove('show');\n // give CSS transition time to apply\n setTimeout(() => {\n this.isOpen = false;\n this.content.classList.remove('show');\n this.content.style.display = '';\n this.trigger?.setAttribute('aria-expanded', 'false');\n this.trap?.deactivate();\n this.catClose.emit();\n }, timeTransitionS);\n }\n\n render() {\n return (\n \n (this.triggerSlot = el as HTMLSlotElement)}>\n (this.content = el as HTMLElement)}\n >\n \n \n \n );\n }\n\n private get contentId() {\n return `cat-dropdown-${this.id}`;\n }\n\n private initTrigger() {\n this.trigger = this.findTrigger();\n this.trigger.setAttribute('aria-haspopup', 'true');\n this.trigger.setAttribute('aria-expanded', 'false');\n this.trigger.setAttribute('aria-controls', this.contentId);\n this.trigger.addEventListener('click', () => this.toggle());\n autoUpdate(this.trigger, this.content, () => this.update());\n }\n\n private findTrigger() {\n let trigger: FocusableElement | undefined;\n const elems = this.triggerSlot?.assignedElements?.() || [];\n while (!trigger && elems.length) {\n const elem = elems.shift();\n trigger = elem?.hasAttribute('data-trigger')\n ? (elem as HTMLElement)\n : elem?.querySelector('[data-trigger]') ?? undefined;\n }\n if (!trigger) {\n trigger = firstTabbable(this.triggerSlot);\n }\n if (!trigger) {\n throw new Error('Cannot find tabbable element. Use [data-trigger] to set the trigger.');\n }\n return trigger;\n }\n\n private update() {\n if (this.trigger) {\n const resize = this.noResize\n ? []\n : [\n size({\n padding: CatDropdown.OFFSET,\n apply({ availableWidth, availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n maxHeight: `${availableHeight}px`\n });\n }\n })\n ];\n computePosition(this.trigger, this.content, {\n strategy: 'fixed',\n placement: this.placement,\n middleware: [offset(CatDropdown.OFFSET), flip(), ...resize]\n }).then(({ x, y, placement }) => {\n this.content.dataset.placement = placement;\n Object.assign(this.content.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n });\n }\n }\n\n private hasAttribute(elem: EventTarget, attr: string) {\n return elem instanceof HTMLElement && elem.hasAttribute(attr);\n }\n}\n",":host {\n display: block;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\ntype HTMLCatFormFieldElement =\n | HTMLCatInputElement\n | HTMLCatTextareaElement\n | HTMLCatSelectElement\n | HTMLCatDatepickerElement;\n\n/**\n * A form group component to group form fields and labels.\n */\n@Component({\n tag: 'cat-form-group',\n styleUrl: 'cat-form-group.scss',\n shadow: true\n})\nexport class CatFormGroup {\n private formElements: HTMLCatFormFieldElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Whether the labels need a marker to shown if the forms fields are required or optional.\n * By default, it is set to auto, it will display the mark depending on the number of required and optional fields: \n * - If there are more required, the optional will be marked.\n * - If there are less required, it will mark the required.\n * If a form field had \"!\", the requiredMarked of the field would not change.\n */\n @Prop() requiredMarker: 'none' | 'required' | 'optional' | 'auto' = 'auto';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * The space allocated to the input label\n */\n @Prop() labelSize?: string;\n\n @Watch('requiredMarker')\n onRequiredMarkerChanged(newRequiredMarker: 'none' | 'required' | 'optional' | 'auto') {\n const updateMarker = newRequiredMarker === 'auto' ? this.calculate(this.formElements) : newRequiredMarker;\n this.formElements.forEach(\n element => !element.requiredMarker?.endsWith('!') && (element.requiredMarker = updateMarker)\n );\n }\n\n @Watch('horizontal')\n onHorizontalChanged(newHorizontal: boolean) {\n this.formElements.forEach(element => {\n element.horizontal = newHorizontal;\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(\n this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker')\n ) as HTMLCatFormFieldElement[];\n this.onRequiredMarkerChanged(this.requiredMarker);\n this.onHorizontalChanged(this.horizontal);\n }\n\n private calculate(elements: HTMLCatFormFieldElement[]): 'optional' | 'required' {\n const optionalFields = elements.filter(value => !value.required).length;\n const requiredFields = elements.length - optionalFields;\n return requiredFields >= optionalFields ? 'optional' : 'required';\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$icon-sizes: (\n 'xl': 1.75rem,\n 'l': 1.5rem,\n 'm': 1.25rem,\n 's': 1rem,\n 'xs': 0.75rem\n);\n\n:host {\n /**\n * @prop --cat-icon-ratio: The aspect ratio of the avatar.\n */\n display: inline-flex;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\nspan {\n display: inline-flex;\n}\n\nsvg {\n fill: currentColor;\n stroke: none;\n transform-origin: center center;\n height: 1em;\n width: calc(var(--cat-icon-ratio, 1) * 1em);\n}\n\n// ----- size\n\n@mixin size($size) {\n .icon-#{$size} svg {\n font-size: map.get($icon-sizes, $size);\n }\n}\n\n@include size('xs');\n@include size('s');\n@include size('m');\n@include size('l');\n@include size('xl');\n","import { Component, h, Prop } from '@stencil/core';\nimport { catIconRegistry as icons } from './cat-icon-registry';\n\n/**\n * Icons are used to provide additional meaning or in places where text label\n * doesn't fit.\n *\n * @part icon - The span element wrapping the SVG icon.\n */\n@Component({\n tag: 'cat-icon',\n styleUrl: 'cat-icon.scss',\n shadow: true\n})\nexport class CatIcon {\n /**\n * The name of the icon.\n */\n @Prop() icon?: string;\n\n /**\n * The SVG source of the icon. This takes precenedence over the `icon` name.\n */\n @Prop() iconSrc?: string;\n\n /**\n * The size of the icon.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the icon that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n );\n }\n}\n","var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar NumeralFormatter = function (numeralDecimalMark,\n numeralIntegerScale,\n numeralDecimalScale,\n numeralThousandsGroupStyle,\n numeralPositiveOnly,\n stripLeadingZeroes,\n prefix,\n signBeforePrefix,\n tailPrefix,\n delimiter) {\n var owner = this;\n\n owner.numeralDecimalMark = numeralDecimalMark || '.';\n owner.numeralIntegerScale = numeralIntegerScale > 0 ? numeralIntegerScale : 0;\n owner.numeralDecimalScale = numeralDecimalScale >= 0 ? numeralDecimalScale : 2;\n owner.numeralThousandsGroupStyle = numeralThousandsGroupStyle || NumeralFormatter.groupStyle.thousand;\n owner.numeralPositiveOnly = !!numeralPositiveOnly;\n owner.stripLeadingZeroes = stripLeadingZeroes !== false;\n owner.prefix = (prefix || prefix === '') ? prefix : '';\n owner.signBeforePrefix = !!signBeforePrefix;\n owner.tailPrefix = !!tailPrefix;\n owner.delimiter = (delimiter || delimiter === '') ? delimiter : ',';\n owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n};\n\nNumeralFormatter.groupStyle = {\n thousand: 'thousand',\n lakh: 'lakh',\n wan: 'wan',\n none: 'none' \n};\n\nNumeralFormatter.prototype = {\n getRawValue: function (value) {\n return value.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');\n },\n\n format: function (value) {\n var owner = this, parts, partSign, partSignAndPrefix, partInteger, partDecimal = '';\n\n // strip alphabet letters\n value = value.replace(/[A-Za-z]/g, '')\n // replace the first decimal mark with reserved placeholder\n .replace(owner.numeralDecimalMark, 'M')\n\n // strip non numeric letters except minus and \"M\"\n // this is to ensure prefix has been stripped\n .replace(/[^\\dM-]/g, '')\n\n // replace the leading minus with reserved placeholder\n .replace(/^\\-/, 'N')\n\n // strip the other minus sign (if present)\n .replace(/\\-/g, '')\n\n // replace the minus sign (if present)\n .replace('N', owner.numeralPositiveOnly ? '' : '-')\n\n // replace decimal mark\n .replace('M', owner.numeralDecimalMark);\n\n // strip any leading zeros\n if (owner.stripLeadingZeroes) {\n value = value.replace(/^(-)?0+(?=\\d)/, '$1');\n }\n\n partSign = value.slice(0, 1) === '-' ? '-' : '';\n if (typeof owner.prefix != 'undefined') {\n if (owner.signBeforePrefix) {\n partSignAndPrefix = partSign + owner.prefix;\n } else {\n partSignAndPrefix = owner.prefix + partSign;\n }\n } else {\n partSignAndPrefix = partSign;\n }\n \n partInteger = value;\n\n if (value.indexOf(owner.numeralDecimalMark) >= 0) {\n parts = value.split(owner.numeralDecimalMark);\n partInteger = parts[0];\n partDecimal = owner.numeralDecimalMark + parts[1].slice(0, owner.numeralDecimalScale);\n }\n\n if(partSign === '-') {\n partInteger = partInteger.slice(1);\n }\n\n if (owner.numeralIntegerScale > 0) {\n partInteger = partInteger.slice(0, owner.numeralIntegerScale);\n }\n\n switch (owner.numeralThousandsGroupStyle) {\n case NumeralFormatter.groupStyle.lakh:\n partInteger = partInteger.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1' + owner.delimiter);\n\n break;\n\n case NumeralFormatter.groupStyle.wan:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{4})+$)/g, '$1' + owner.delimiter);\n\n break;\n\n case NumeralFormatter.groupStyle.thousand:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + owner.delimiter);\n\n break;\n }\n\n if (owner.tailPrefix) {\n return partSign + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '') + owner.prefix;\n }\n\n return partSignAndPrefix + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '');\n }\n};\n\nvar NumeralFormatter_1 = NumeralFormatter;\n\nvar DateFormatter = function (datePattern, dateMin, dateMax) {\n var owner = this;\n\n owner.date = [];\n owner.blocks = [];\n owner.datePattern = datePattern;\n owner.dateMin = dateMin\n .split('-')\n .reverse()\n .map(function(x) {\n return parseInt(x, 10);\n });\n if (owner.dateMin.length === 2) owner.dateMin.unshift(0);\n\n owner.dateMax = dateMax\n .split('-')\n .reverse()\n .map(function(x) {\n return parseInt(x, 10);\n });\n if (owner.dateMax.length === 2) owner.dateMax.unshift(0);\n \n owner.initBlocks();\n};\n\nDateFormatter.prototype = {\n initBlocks: function () {\n var owner = this;\n owner.datePattern.forEach(function (value) {\n if (value === 'Y') {\n owner.blocks.push(4);\n } else {\n owner.blocks.push(2);\n }\n });\n },\n\n getISOFormatDate: function () {\n var owner = this,\n date = owner.date;\n\n return date[2] ? (\n date[2] + '-' + owner.addLeadingZero(date[1]) + '-' + owner.addLeadingZero(date[0])\n ) : '';\n },\n\n getBlocks: function () {\n return this.blocks;\n },\n\n getValidatedDate: function (value) {\n var owner = this, result = '';\n\n value = value.replace(/[^\\d]/g, '');\n\n owner.blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n sub0 = sub.slice(0, 1),\n rest = value.slice(length);\n\n switch (owner.datePattern[index]) {\n case 'd':\n if (sub === '00') {\n sub = '01';\n } else if (parseInt(sub0, 10) > 3) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > 31) {\n sub = '31';\n }\n\n break;\n\n case 'm':\n if (sub === '00') {\n sub = '01';\n } else if (parseInt(sub0, 10) > 1) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > 12) {\n sub = '12';\n }\n\n break;\n }\n\n result += sub;\n\n // update remaining string\n value = rest;\n }\n });\n\n return this.getFixedDateString(result);\n },\n\n getFixedDateString: function (value) {\n var owner = this, datePattern = owner.datePattern, date = [],\n dayIndex = 0, monthIndex = 0, yearIndex = 0,\n dayStartIndex = 0, monthStartIndex = 0, yearStartIndex = 0,\n day, month, year, fullYearDone = false;\n\n // mm-dd || dd-mm\n if (value.length === 4 && datePattern[0].toLowerCase() !== 'y' && datePattern[1].toLowerCase() !== 'y') {\n dayStartIndex = datePattern[0] === 'd' ? 0 : 2;\n monthStartIndex = 2 - dayStartIndex;\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n\n date = this.getFixedDate(day, month, 0);\n }\n\n // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd\n if (value.length === 8) {\n datePattern.forEach(function (type, index) {\n switch (type) {\n case 'd':\n dayIndex = index;\n break;\n case 'm':\n monthIndex = index;\n break;\n default:\n yearIndex = index;\n break;\n }\n });\n\n yearStartIndex = yearIndex * 2;\n dayStartIndex = (dayIndex <= yearIndex) ? dayIndex * 2 : (dayIndex * 2 + 2);\n monthStartIndex = (monthIndex <= yearIndex) ? monthIndex * 2 : (monthIndex * 2 + 2);\n\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n date = this.getFixedDate(day, month, year);\n }\n\n // mm-yy || yy-mm\n if (value.length === 4 && (datePattern[0] === 'y' || datePattern[1] === 'y')) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 2;\n yearStartIndex = 2 - monthStartIndex;\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2;\n\n date = [0, month, year];\n }\n\n // mm-yyyy || yyyy-mm\n if (value.length === 6 && (datePattern[0] === 'Y' || datePattern[1] === 'Y')) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 4;\n yearStartIndex = 2 - 0.5 * monthStartIndex;\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n date = [0, month, year];\n }\n\n date = owner.getRangeFixedDate(date);\n owner.date = date;\n\n var result = date.length === 0 ? value : datePattern.reduce(function (previous, current) {\n switch (current) {\n case 'd':\n return previous + (date[0] === 0 ? '' : owner.addLeadingZero(date[0]));\n case 'm':\n return previous + (date[1] === 0 ? '' : owner.addLeadingZero(date[1]));\n case 'y':\n return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], false) : '');\n case 'Y':\n return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], true) : '');\n }\n }, '');\n\n return result;\n },\n\n getRangeFixedDate: function (date) {\n var owner = this,\n datePattern = owner.datePattern,\n dateMin = owner.dateMin || [],\n dateMax = owner.dateMax || [];\n\n if (!date.length || (dateMin.length < 3 && dateMax.length < 3)) return date;\n\n if (\n datePattern.find(function(x) {\n return x.toLowerCase() === 'y';\n }) &&\n date[2] === 0\n ) return date;\n\n if (dateMax.length && (dateMax[2] < date[2] || (\n dateMax[2] === date[2] && (dateMax[1] < date[1] || (\n dateMax[1] === date[1] && dateMax[0] < date[0]\n ))\n ))) return dateMax;\n\n if (dateMin.length && (dateMin[2] > date[2] || (\n dateMin[2] === date[2] && (dateMin[1] > date[1] || (\n dateMin[1] === date[1] && dateMin[0] > date[0]\n ))\n ))) return dateMin;\n\n return date;\n },\n\n getFixedDate: function (day, month, year) {\n day = Math.min(day, 31);\n month = Math.min(month, 12);\n year = parseInt((year || 0), 10);\n\n if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {\n day = Math.min(day, month === 2 ? (this.isLeapYear(year) ? 29 : 28) : 30);\n }\n\n return [day, month, year];\n },\n\n isLeapYear: function (year) {\n return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);\n },\n\n addLeadingZero: function (number) {\n return (number < 10 ? '0' : '') + number;\n },\n\n addLeadingZeroForYear: function (number, fullYearMode) {\n if (fullYearMode) {\n return (number < 10 ? '000' : (number < 100 ? '00' : (number < 1000 ? '0' : ''))) + number;\n }\n\n return (number < 10 ? '0' : '') + number;\n }\n};\n\nvar DateFormatter_1 = DateFormatter;\n\nvar TimeFormatter = function (timePattern, timeFormat) {\n var owner = this;\n\n owner.time = [];\n owner.blocks = [];\n owner.timePattern = timePattern;\n owner.timeFormat = timeFormat;\n owner.initBlocks();\n};\n\nTimeFormatter.prototype = {\n initBlocks: function () {\n var owner = this;\n owner.timePattern.forEach(function () {\n owner.blocks.push(2);\n });\n },\n\n getISOFormatTime: function () {\n var owner = this,\n time = owner.time;\n\n return time[2] ? (\n owner.addLeadingZero(time[0]) + ':' + owner.addLeadingZero(time[1]) + ':' + owner.addLeadingZero(time[2])\n ) : '';\n },\n\n getBlocks: function () {\n return this.blocks;\n },\n\n getTimeFormatOptions: function () {\n var owner = this;\n if (String(owner.timeFormat) === '12') {\n return {\n maxHourFirstDigit: 1,\n maxHours: 12,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60\n };\n }\n\n return {\n maxHourFirstDigit: 2,\n maxHours: 23,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60\n };\n },\n\n getValidatedTime: function (value) {\n var owner = this, result = '';\n\n value = value.replace(/[^\\d]/g, '');\n\n var timeFormatOptions = owner.getTimeFormatOptions();\n\n owner.blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n sub0 = sub.slice(0, 1),\n rest = value.slice(length);\n\n switch (owner.timePattern[index]) {\n\n case 'h':\n if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {\n sub = timeFormatOptions.maxHours + '';\n }\n\n break;\n\n case 'm':\n case 's':\n if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {\n sub = '0' + sub0;\n } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {\n sub = timeFormatOptions.maxMinutes + '';\n }\n break;\n }\n\n result += sub;\n\n // update remaining string\n value = rest;\n }\n });\n\n return this.getFixedTimeString(result);\n },\n\n getFixedTimeString: function (value) {\n var owner = this, timePattern = owner.timePattern, time = [],\n secondIndex = 0, minuteIndex = 0, hourIndex = 0,\n secondStartIndex = 0, minuteStartIndex = 0, hourStartIndex = 0,\n second, minute, hour;\n\n if (value.length === 6) {\n timePattern.forEach(function (type, index) {\n switch (type) {\n case 's':\n secondIndex = index * 2;\n break;\n case 'm':\n minuteIndex = index * 2;\n break;\n case 'h':\n hourIndex = index * 2;\n break;\n }\n });\n\n hourStartIndex = hourIndex;\n minuteStartIndex = minuteIndex;\n secondStartIndex = secondIndex;\n\n second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10);\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n time = this.getFixedTime(hour, minute, second);\n }\n\n if (value.length === 4 && owner.timePattern.indexOf('s') < 0) {\n timePattern.forEach(function (type, index) {\n switch (type) {\n case 'm':\n minuteIndex = index * 2;\n break;\n case 'h':\n hourIndex = index * 2;\n break;\n }\n });\n\n hourStartIndex = hourIndex;\n minuteStartIndex = minuteIndex;\n\n second = 0;\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n time = this.getFixedTime(hour, minute, second);\n }\n\n owner.time = time;\n\n return time.length === 0 ? value : timePattern.reduce(function (previous, current) {\n switch (current) {\n case 's':\n return previous + owner.addLeadingZero(time[2]);\n case 'm':\n return previous + owner.addLeadingZero(time[1]);\n case 'h':\n return previous + owner.addLeadingZero(time[0]);\n }\n }, '');\n },\n\n getFixedTime: function (hour, minute, second) {\n second = Math.min(parseInt(second || 0, 10), 60);\n minute = Math.min(minute, 60);\n hour = Math.min(hour, 60);\n\n return [hour, minute, second];\n },\n\n addLeadingZero: function (number) {\n return (number < 10 ? '0' : '') + number;\n }\n};\n\nvar TimeFormatter_1 = TimeFormatter;\n\nvar PhoneFormatter = function (formatter, delimiter) {\n var owner = this;\n\n owner.delimiter = (delimiter || delimiter === '') ? delimiter : ' ';\n owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n\n owner.formatter = formatter;\n};\n\nPhoneFormatter.prototype = {\n setFormatter: function (formatter) {\n this.formatter = formatter;\n },\n\n format: function (phoneNumber) {\n var owner = this;\n\n owner.formatter.clear();\n\n // only keep number and +\n phoneNumber = phoneNumber.replace(/[^\\d+]/g, '');\n\n // strip non-leading +\n phoneNumber = phoneNumber.replace(/^\\+/, 'B').replace(/\\+/g, '').replace('B', '+');\n\n // strip delimiter\n phoneNumber = phoneNumber.replace(owner.delimiterRE, '');\n\n var result = '', current, validated = false;\n\n for (var i = 0, iMax = phoneNumber.length; i < iMax; i++) {\n current = owner.formatter.inputDigit(phoneNumber.charAt(i));\n\n // has ()- or space inside\n if (/[\\s()-]/g.test(current)) {\n result = current;\n\n validated = true;\n } else {\n if (!validated) {\n result = current;\n }\n // else: over length input\n // it turns to invalid number again\n }\n }\n\n // strip ()\n // e.g. US: 7161234567 returns (716) 123-4567\n result = result.replace(/[()]/g, '');\n // replace library delimiter with user customized delimiter\n result = result.replace(/[\\s-]/g, owner.delimiter);\n\n return result;\n }\n};\n\nvar PhoneFormatter_1 = PhoneFormatter;\n\nvar CreditCardDetector = {\n blocks: {\n uatp: [4, 5, 6],\n amex: [4, 6, 5],\n diners: [4, 6, 4],\n discover: [4, 4, 4, 4],\n mastercard: [4, 4, 4, 4],\n dankort: [4, 4, 4, 4],\n instapayment: [4, 4, 4, 4],\n jcb15: [4, 6, 5],\n jcb: [4, 4, 4, 4],\n maestro: [4, 4, 4, 4],\n visa: [4, 4, 4, 4],\n mir: [4, 4, 4, 4],\n unionPay: [4, 4, 4, 4],\n general: [4, 4, 4, 4]\n },\n\n re: {\n // starts with 1; 15 digits, not starts with 1800 (jcb card)\n uatp: /^(?!1800)1\\d{0,14}/,\n\n // starts with 34/37; 15 digits\n amex: /^3[47]\\d{0,13}/,\n\n // starts with 6011/65/644-649; 16 digits\n discover: /^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}/,\n\n // starts with 300-305/309 or 36/38/39; 14 digits\n diners: /^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/,\n\n // starts with 51-55/2221–2720; 16 digits\n mastercard: /^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}/,\n\n // starts with 5019/4175/4571; 16 digits\n dankort: /^(5019|4175|4571)\\d{0,12}/,\n\n // starts with 637-639; 16 digits\n instapayment: /^63[7-9]\\d{0,13}/,\n\n // starts with 2131/1800; 15 digits\n jcb15: /^(?:2131|1800)\\d{0,11}/,\n\n // starts with 2131/1800/35; 16 digits\n jcb: /^(?:35\\d{0,2})\\d{0,12}/,\n\n // starts with 50/56-58/6304/67; 16 digits\n maestro: /^(?:5[0678]\\d{0,2}|6304|67\\d{0,2})\\d{0,12}/,\n\n // starts with 22; 16 digits\n mir: /^220[0-4]\\d{0,12}/,\n\n // starts with 4; 16 digits\n visa: /^4\\d{0,15}/,\n\n // starts with 62/81; 16 digits\n unionPay: /^(62|81)\\d{0,14}/\n },\n\n getStrictBlocks: function (block) {\n var total = block.reduce(function (prev, current) {\n return prev + current;\n }, 0);\n\n return block.concat(19 - total);\n },\n\n getInfo: function (value, strictMode) {\n var blocks = CreditCardDetector.blocks,\n re = CreditCardDetector.re;\n\n // Some credit card can have up to 19 digits number.\n // Set strictMode to true will remove the 16 max-length restrain,\n // however, I never found any website validate card number like\n // this, hence probably you don't want to enable this option.\n strictMode = !!strictMode;\n\n for (var key in re) {\n if (re[key].test(value)) {\n var matchedBlocks = blocks[key];\n return {\n type: key,\n blocks: strictMode ? this.getStrictBlocks(matchedBlocks) : matchedBlocks\n };\n }\n }\n\n return {\n type: 'unknown',\n blocks: strictMode ? this.getStrictBlocks(blocks.general) : blocks.general\n };\n }\n};\n\nvar CreditCardDetector_1 = CreditCardDetector;\n\nvar Util = {\n noop: function () {\n },\n\n strip: function (value, re) {\n return value.replace(re, '');\n },\n\n getPostDelimiter: function (value, delimiter, delimiters) {\n // single delimiter\n if (delimiters.length === 0) {\n return value.slice(-delimiter.length) === delimiter ? delimiter : '';\n }\n\n // multiple delimiters\n var matchedDelimiter = '';\n delimiters.forEach(function (current) {\n if (value.slice(-current.length) === current) {\n matchedDelimiter = current;\n }\n });\n\n return matchedDelimiter;\n },\n\n getDelimiterREByDelimiter: function (delimiter) {\n return new RegExp(delimiter.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1'), 'g');\n },\n\n getNextCursorPosition: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n // If cursor was at the end of value, just place it back.\n // Because new value could contain additional chars.\n if (oldValue.length === prevPos) {\n return newValue.length;\n }\n\n return prevPos + this.getPositionOffset(prevPos, oldValue, newValue, delimiter ,delimiters);\n },\n\n getPositionOffset: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n var oldRawValue, newRawValue, lengthOffset;\n\n oldRawValue = this.stripDelimiters(oldValue.slice(0, prevPos), delimiter, delimiters);\n newRawValue = this.stripDelimiters(newValue.slice(0, prevPos), delimiter, delimiters);\n lengthOffset = oldRawValue.length - newRawValue.length;\n\n return (lengthOffset !== 0) ? (lengthOffset / Math.abs(lengthOffset)) : 0;\n },\n\n stripDelimiters: function (value, delimiter, delimiters) {\n var owner = this;\n\n // single delimiter\n if (delimiters.length === 0) {\n var delimiterRE = delimiter ? owner.getDelimiterREByDelimiter(delimiter) : '';\n\n return value.replace(delimiterRE, '');\n }\n\n // multiple delimiters\n delimiters.forEach(function (current) {\n current.split('').forEach(function (letter) {\n value = value.replace(owner.getDelimiterREByDelimiter(letter), '');\n });\n });\n\n return value;\n },\n\n headStr: function (str, length) {\n return str.slice(0, length);\n },\n\n getMaxLength: function (blocks) {\n return blocks.reduce(function (previous, current) {\n return previous + current;\n }, 0);\n },\n\n // strip prefix\n // Before type | After type | Return value\n // PEFIX-... | PEFIX-... | ''\n // PREFIX-123 | PEFIX-123 | 123\n // PREFIX-123 | PREFIX-23 | 23\n // PREFIX-123 | PREFIX-1234 | 1234\n getPrefixStrippedValue: function (value, prefix, prefixLength, prevResult, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix) {\n // No prefix\n if (prefixLength === 0) {\n return value;\n }\n\n // Value is prefix\n if (value === prefix && value !== '') {\n return '';\n }\n\n if (signBeforePrefix && (value.slice(0, 1) == '-')) {\n var prev = (prevResult.slice(0, 1) == '-') ? prevResult.slice(1) : prevResult;\n return '-' + this.getPrefixStrippedValue(value.slice(1), prefix, prefixLength, prev, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix);\n }\n\n // Pre result prefix string does not match pre-defined prefix\n if (prevResult.slice(0, prefixLength) !== prefix && !tailPrefix) {\n // Check if the first time user entered something\n if (noImmediatePrefix && !prevResult && value) return value;\n return '';\n } else if (prevResult.slice(-prefixLength) !== prefix && tailPrefix) {\n // Check if the first time user entered something\n if (noImmediatePrefix && !prevResult && value) return value;\n return '';\n }\n\n var prevValue = this.stripDelimiters(prevResult, delimiter, delimiters);\n\n // New value has issue, someone typed in between prefix letters\n // Revert to pre value\n if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {\n return prevValue.slice(prefixLength);\n } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {\n return prevValue.slice(0, -prefixLength - 1);\n }\n\n // No issue, strip prefix for new value\n return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength);\n },\n\n getFirstDiffIndex: function (prev, current) {\n var index = 0;\n\n while (prev.charAt(index) === current.charAt(index)) {\n if (prev.charAt(index++) === '') {\n return -1;\n }\n }\n\n return index;\n },\n\n getFormattedValue: function (value, blocks, blocksLength, delimiter, delimiters, delimiterLazyShow) {\n var result = '',\n multipleDelimiters = delimiters.length > 0,\n currentDelimiter = '';\n\n // no options, normal input\n if (blocksLength === 0) {\n return value;\n }\n\n blocks.forEach(function (length, index) {\n if (value.length > 0) {\n var sub = value.slice(0, length),\n rest = value.slice(length);\n\n if (multipleDelimiters) {\n currentDelimiter = delimiters[delimiterLazyShow ? (index - 1) : index] || currentDelimiter;\n } else {\n currentDelimiter = delimiter;\n }\n\n if (delimiterLazyShow) {\n if (index > 0) {\n result += currentDelimiter;\n }\n\n result += sub;\n } else {\n result += sub;\n\n if (sub.length === length && index < blocksLength - 1) {\n result += currentDelimiter;\n }\n }\n\n // update remaining string\n value = rest;\n }\n });\n\n return result;\n },\n\n // move cursor to the end\n // the first time user focuses on an input with prefix\n fixPrefixCursor: function (el, prefix, delimiter, delimiters) {\n if (!el) {\n return;\n }\n\n var val = el.value,\n appendix = delimiter || (delimiters[0] || ' ');\n\n if (!el.setSelectionRange || !prefix || (prefix.length + appendix.length) <= val.length) {\n return;\n }\n\n var len = val.length * 2;\n\n // set timeout to avoid blink\n setTimeout(function () {\n el.setSelectionRange(len, len);\n }, 1);\n },\n\n // Check if input field is fully selected\n checkFullSelection: function(value) {\n try {\n var selection = window.getSelection() || document.getSelection() || {};\n return selection.toString().length === value.length;\n } catch (ex) {\n // Ignore\n }\n\n return false;\n },\n\n setSelection: function (element, position, doc) {\n if (element !== this.getActiveElement(doc)) {\n return;\n }\n\n // cursor is already in the end\n if (element && element.value.length <= position) {\n return;\n }\n\n if (element.createTextRange) {\n var range = element.createTextRange();\n\n range.move('character', position);\n range.select();\n } else {\n try {\n element.setSelectionRange(position, position);\n } catch (e) {\n // eslint-disable-next-line\n console.warn('The input element type does not support selection');\n }\n }\n },\n\n getActiveElement: function(parent) {\n var activeElement = parent.activeElement;\n if (activeElement && activeElement.shadowRoot) {\n return this.getActiveElement(activeElement.shadowRoot);\n }\n return activeElement;\n },\n\n isAndroid: function () {\n return navigator && /android/i.test(navigator.userAgent);\n },\n\n // On Android chrome, the keyup and keydown events\n // always return key code 229 as a composition that\n // buffers the user’s keystrokes\n // see https://github.com/nosir/cleave.js/issues/147\n isAndroidBackspaceKeydown: function (lastInputValue, currentInputValue) {\n if (!this.isAndroid() || !lastInputValue || !currentInputValue) {\n return false;\n }\n\n return currentInputValue === lastInputValue.slice(0, -1);\n }\n};\n\nvar Util_1 = Util;\n\n/**\n * Props Assignment\n *\n * Separate this, so react module can share the usage\n */\nvar DefaultProperties = {\n // Maybe change to object-assign\n // for now just keep it as simple\n assign: function (target, opts) {\n target = target || {};\n opts = opts || {};\n\n // credit card\n target.creditCard = !!opts.creditCard;\n target.creditCardStrictMode = !!opts.creditCardStrictMode;\n target.creditCardType = '';\n target.onCreditCardTypeChanged = opts.onCreditCardTypeChanged || (function () {});\n\n // phone\n target.phone = !!opts.phone;\n target.phoneRegionCode = opts.phoneRegionCode || 'AU';\n target.phoneFormatter = {};\n\n // time\n target.time = !!opts.time;\n target.timePattern = opts.timePattern || ['h', 'm', 's'];\n target.timeFormat = opts.timeFormat || '24';\n target.timeFormatter = {};\n\n // date\n target.date = !!opts.date;\n target.datePattern = opts.datePattern || ['d', 'm', 'Y'];\n target.dateMin = opts.dateMin || '';\n target.dateMax = opts.dateMax || '';\n target.dateFormatter = {};\n\n // numeral\n target.numeral = !!opts.numeral;\n target.numeralIntegerScale = opts.numeralIntegerScale > 0 ? opts.numeralIntegerScale : 0;\n target.numeralDecimalScale = opts.numeralDecimalScale >= 0 ? opts.numeralDecimalScale : 2;\n target.numeralDecimalMark = opts.numeralDecimalMark || '.';\n target.numeralThousandsGroupStyle = opts.numeralThousandsGroupStyle || 'thousand';\n target.numeralPositiveOnly = !!opts.numeralPositiveOnly;\n target.stripLeadingZeroes = opts.stripLeadingZeroes !== false;\n target.signBeforePrefix = !!opts.signBeforePrefix;\n target.tailPrefix = !!opts.tailPrefix;\n\n // others\n target.swapHiddenInput = !!opts.swapHiddenInput;\n \n target.numericOnly = target.creditCard || target.date || !!opts.numericOnly;\n\n target.uppercase = !!opts.uppercase;\n target.lowercase = !!opts.lowercase;\n\n target.prefix = (target.creditCard || target.date) ? '' : (opts.prefix || '');\n target.noImmediatePrefix = !!opts.noImmediatePrefix;\n target.prefixLength = target.prefix.length;\n target.rawValueTrimPrefix = !!opts.rawValueTrimPrefix;\n target.copyDelimiter = !!opts.copyDelimiter;\n\n target.initValue = (opts.initValue !== undefined && opts.initValue !== null) ? opts.initValue.toString() : '';\n\n target.delimiter =\n (opts.delimiter || opts.delimiter === '') ? opts.delimiter :\n (opts.date ? '/' :\n (opts.time ? ':' :\n (opts.numeral ? ',' :\n (opts.phone ? ' ' :\n ' '))));\n target.delimiterLength = target.delimiter.length;\n target.delimiterLazyShow = !!opts.delimiterLazyShow;\n target.delimiters = opts.delimiters || [];\n\n target.blocks = opts.blocks || [];\n target.blocksLength = target.blocks.length;\n\n target.root = (typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window;\n target.document = opts.document || target.root.document;\n\n target.maxLength = 0;\n\n target.backspace = false;\n target.result = '';\n\n target.onValueChanged = opts.onValueChanged || (function () {});\n\n return target;\n }\n};\n\nvar DefaultProperties_1 = DefaultProperties;\n\n/**\n * Construct a new Cleave instance by passing the configuration object\n *\n * @param {String | HTMLElement} element\n * @param {Object} opts\n */\nvar Cleave = function (element, opts) {\n var owner = this;\n var hasMultipleElements = false;\n\n if (typeof element === 'string') {\n owner.element = document.querySelector(element);\n hasMultipleElements = document.querySelectorAll(element).length > 1;\n } else {\n if (typeof element.length !== 'undefined' && element.length > 0) {\n owner.element = element[0];\n hasMultipleElements = element.length > 1;\n } else {\n owner.element = element;\n }\n }\n\n if (!owner.element) {\n throw new Error('[cleave.js] Please check the element');\n }\n\n if (hasMultipleElements) {\n try {\n // eslint-disable-next-line\n console.warn('[cleave.js] Multiple input fields matched, cleave.js will only take the first one.');\n } catch (e) {\n // Old IE\n }\n }\n\n opts.initValue = owner.element.value;\n\n owner.properties = Cleave.DefaultProperties.assign({}, opts);\n\n owner.init();\n};\n\nCleave.prototype = {\n init: function () {\n var owner = this, pps = owner.properties;\n\n // no need to use this lib\n if (!pps.numeral && !pps.phone && !pps.creditCard && !pps.time && !pps.date && (pps.blocksLength === 0 && !pps.prefix)) {\n owner.onInput(pps.initValue);\n\n return;\n }\n\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n\n owner.isAndroid = Cleave.Util.isAndroid();\n owner.lastInputValue = '';\n owner.isBackward = '';\n\n owner.onChangeListener = owner.onChange.bind(owner);\n owner.onKeyDownListener = owner.onKeyDown.bind(owner);\n owner.onFocusListener = owner.onFocus.bind(owner);\n owner.onCutListener = owner.onCut.bind(owner);\n owner.onCopyListener = owner.onCopy.bind(owner);\n\n owner.initSwapHiddenInput();\n\n owner.element.addEventListener('input', owner.onChangeListener);\n owner.element.addEventListener('keydown', owner.onKeyDownListener);\n owner.element.addEventListener('focus', owner.onFocusListener);\n owner.element.addEventListener('cut', owner.onCutListener);\n owner.element.addEventListener('copy', owner.onCopyListener);\n\n\n owner.initPhoneFormatter();\n owner.initDateFormatter();\n owner.initTimeFormatter();\n owner.initNumeralFormatter();\n\n // avoid touch input field if value is null\n // otherwise Firefox will add red box-shadow for \n if (pps.initValue || (pps.prefix && !pps.noImmediatePrefix)) {\n owner.onInput(pps.initValue);\n }\n },\n\n initSwapHiddenInput: function () {\n var owner = this, pps = owner.properties;\n if (!pps.swapHiddenInput) return;\n\n var inputFormatter = owner.element.cloneNode(true);\n owner.element.parentNode.insertBefore(inputFormatter, owner.element);\n\n owner.elementSwapHidden = owner.element;\n owner.elementSwapHidden.type = 'hidden';\n\n owner.element = inputFormatter;\n owner.element.id = '';\n },\n\n initNumeralFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.numeral) {\n return;\n }\n\n pps.numeralFormatter = new Cleave.NumeralFormatter(\n pps.numeralDecimalMark,\n pps.numeralIntegerScale,\n pps.numeralDecimalScale,\n pps.numeralThousandsGroupStyle,\n pps.numeralPositiveOnly,\n pps.stripLeadingZeroes,\n pps.prefix,\n pps.signBeforePrefix,\n pps.tailPrefix,\n pps.delimiter\n );\n },\n\n initTimeFormatter: function() {\n var owner = this, pps = owner.properties;\n\n if (!pps.time) {\n return;\n }\n\n pps.timeFormatter = new Cleave.TimeFormatter(pps.timePattern, pps.timeFormat);\n pps.blocks = pps.timeFormatter.getBlocks();\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n },\n\n initDateFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.date) {\n return;\n }\n\n pps.dateFormatter = new Cleave.DateFormatter(pps.datePattern, pps.dateMin, pps.dateMax);\n pps.blocks = pps.dateFormatter.getBlocks();\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n },\n\n initPhoneFormatter: function () {\n var owner = this, pps = owner.properties;\n\n if (!pps.phone) {\n return;\n }\n\n // Cleave.AsYouTypeFormatter should be provided by\n // external google closure lib\n try {\n pps.phoneFormatter = new Cleave.PhoneFormatter(\n new pps.root.Cleave.AsYouTypeFormatter(pps.phoneRegionCode),\n pps.delimiter\n );\n } catch (ex) {\n throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');\n }\n },\n\n onKeyDown: function (event) {\n var owner = this,\n charCode = event.which || event.keyCode;\n\n owner.lastInputValue = owner.element.value;\n owner.isBackward = charCode === 8;\n },\n\n onChange: function (event) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util;\n\n owner.isBackward = owner.isBackward || event.inputType === 'deleteContentBackward';\n\n var postDelimiter = Util.getPostDelimiter(owner.lastInputValue, pps.delimiter, pps.delimiters);\n\n if (owner.isBackward && postDelimiter) {\n pps.postDelimiterBackspace = postDelimiter;\n } else {\n pps.postDelimiterBackspace = false;\n }\n\n this.onInput(this.element.value);\n },\n\n onFocus: function () {\n var owner = this,\n pps = owner.properties;\n owner.lastInputValue = owner.element.value;\n\n if (pps.prefix && pps.noImmediatePrefix && !owner.element.value) {\n this.onInput(pps.prefix);\n }\n\n Cleave.Util.fixPrefixCursor(owner.element, pps.prefix, pps.delimiter, pps.delimiters);\n },\n\n onCut: function (e) {\n if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n this.copyClipboardData(e);\n this.onInput('');\n },\n\n onCopy: function (e) {\n if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n this.copyClipboardData(e);\n },\n\n copyClipboardData: function (e) {\n var owner = this,\n pps = owner.properties,\n Util = Cleave.Util,\n inputValue = owner.element.value,\n textToCopy = '';\n\n if (!pps.copyDelimiter) {\n textToCopy = Util.stripDelimiters(inputValue, pps.delimiter, pps.delimiters);\n } else {\n textToCopy = inputValue;\n }\n\n try {\n if (e.clipboardData) {\n e.clipboardData.setData('Text', textToCopy);\n } else {\n window.clipboardData.setData('Text', textToCopy);\n }\n\n e.preventDefault();\n } catch (ex) {\n // empty\n }\n },\n\n onInput: function (value) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util;\n\n // case 1: delete one more character \"4\"\n // 1234*| -> hit backspace -> 123|\n // case 2: last character is not delimiter which is:\n // 12|34* -> hit backspace -> 1|34*\n // note: no need to apply this for numeral mode\n var postDelimiterAfter = Util.getPostDelimiter(value, pps.delimiter, pps.delimiters);\n if (!pps.numeral && pps.postDelimiterBackspace && !postDelimiterAfter) {\n value = Util.headStr(value, value.length - pps.postDelimiterBackspace.length);\n }\n\n // phone formatter\n if (pps.phone) {\n if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {\n pps.result = pps.prefix + pps.phoneFormatter.format(value).slice(pps.prefix.length);\n } else {\n pps.result = pps.phoneFormatter.format(value);\n }\n owner.updateValueState();\n\n return;\n }\n\n // numeral formatter\n if (pps.numeral) {\n // Do not show prefix when noImmediatePrefix is specified\n // This mostly because we need to show user the native input placeholder\n if (pps.prefix && pps.noImmediatePrefix && value.length === 0) {\n pps.result = '';\n } else {\n pps.result = pps.numeralFormatter.format(value);\n }\n owner.updateValueState();\n\n return;\n }\n\n // date\n if (pps.date) {\n value = pps.dateFormatter.getValidatedDate(value);\n }\n\n // time\n if (pps.time) {\n value = pps.timeFormatter.getValidatedTime(value);\n }\n\n // strip delimiters\n value = Util.stripDelimiters(value, pps.delimiter, pps.delimiters);\n\n // strip prefix\n value = Util.getPrefixStrippedValue(value, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n\n // strip non-numeric characters\n value = pps.numericOnly ? Util.strip(value, /[^\\d]/g) : value;\n\n // convert case\n value = pps.uppercase ? value.toUpperCase() : value;\n value = pps.lowercase ? value.toLowerCase() : value;\n\n // prevent from showing prefix when no immediate option enabled with empty input value\n if (pps.prefix) {\n if (pps.tailPrefix) {\n value = value + pps.prefix;\n } else {\n value = pps.prefix + value;\n }\n\n\n // no blocks specified, no need to do formatting\n if (pps.blocksLength === 0) {\n pps.result = value;\n owner.updateValueState();\n\n return;\n }\n }\n\n // update credit card props\n if (pps.creditCard) {\n owner.updateCreditCardPropsByValue(value);\n }\n\n // strip over length characters\n value = Util.headStr(value, pps.maxLength);\n\n // apply blocks\n pps.result = Util.getFormattedValue(\n value,\n pps.blocks, pps.blocksLength,\n pps.delimiter, pps.delimiters, pps.delimiterLazyShow\n );\n\n owner.updateValueState();\n },\n\n updateCreditCardPropsByValue: function (value) {\n var owner = this, pps = owner.properties,\n Util = Cleave.Util,\n creditCardInfo;\n\n // At least one of the first 4 characters has changed\n if (Util.headStr(pps.result, 4) === Util.headStr(value, 4)) {\n return;\n }\n\n creditCardInfo = Cleave.CreditCardDetector.getInfo(value, pps.creditCardStrictMode);\n\n pps.blocks = creditCardInfo.blocks;\n pps.blocksLength = pps.blocks.length;\n pps.maxLength = Util.getMaxLength(pps.blocks);\n\n // credit card type changed\n if (pps.creditCardType !== creditCardInfo.type) {\n pps.creditCardType = creditCardInfo.type;\n\n pps.onCreditCardTypeChanged.call(owner, pps.creditCardType);\n }\n },\n\n updateValueState: function () {\n var owner = this,\n Util = Cleave.Util,\n pps = owner.properties;\n\n if (!owner.element) {\n return;\n }\n\n var endPos = owner.element.selectionEnd;\n var oldValue = owner.element.value;\n var newValue = pps.result;\n\n endPos = Util.getNextCursorPosition(endPos, oldValue, newValue, pps.delimiter, pps.delimiters);\n\n // fix Android browser type=\"text\" input field\n // cursor not jumping issue\n if (owner.isAndroid) {\n window.setTimeout(function () {\n owner.element.value = newValue;\n Util.setSelection(owner.element, endPos, pps.document, false);\n owner.callOnValueChanged();\n }, 1);\n\n return;\n }\n\n owner.element.value = newValue;\n if (pps.swapHiddenInput) owner.elementSwapHidden.value = owner.getRawValue();\n\n Util.setSelection(owner.element, endPos, pps.document, false);\n owner.callOnValueChanged();\n },\n\n callOnValueChanged: function () {\n var owner = this,\n pps = owner.properties;\n\n pps.onValueChanged.call(owner, {\n target: {\n name: owner.element.name,\n value: pps.result,\n rawValue: owner.getRawValue()\n }\n });\n },\n\n setPhoneRegionCode: function (phoneRegionCode) {\n var owner = this, pps = owner.properties;\n\n pps.phoneRegionCode = phoneRegionCode;\n owner.initPhoneFormatter();\n owner.onChange();\n },\n\n setRawValue: function (value) {\n var owner = this, pps = owner.properties;\n\n value = value !== undefined && value !== null ? value.toString() : '';\n\n if (pps.numeral) {\n value = value.replace('.', pps.numeralDecimalMark);\n }\n\n pps.postDelimiterBackspace = false;\n\n owner.element.value = value;\n owner.onInput(value);\n },\n\n getRawValue: function () {\n var owner = this,\n pps = owner.properties,\n Util = Cleave.Util,\n rawValue = owner.element.value;\n\n if (pps.rawValueTrimPrefix) {\n rawValue = Util.getPrefixStrippedValue(rawValue, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n }\n\n if (pps.numeral) {\n rawValue = pps.numeralFormatter.getRawValue(rawValue);\n } else {\n rawValue = Util.stripDelimiters(rawValue, pps.delimiter, pps.delimiters);\n }\n\n return rawValue;\n },\n\n getISOFormatDate: function () {\n var owner = this,\n pps = owner.properties;\n\n return pps.date ? pps.dateFormatter.getISOFormatDate() : '';\n },\n\n getISOFormatTime: function () {\n var owner = this,\n pps = owner.properties;\n\n return pps.time ? pps.timeFormatter.getISOFormatTime() : '';\n },\n\n getFormattedValue: function () {\n return this.element.value;\n },\n\n destroy: function () {\n var owner = this;\n\n owner.element.removeEventListener('input', owner.onChangeListener);\n owner.element.removeEventListener('keydown', owner.onKeyDownListener);\n owner.element.removeEventListener('focus', owner.onFocusListener);\n owner.element.removeEventListener('cut', owner.onCutListener);\n owner.element.removeEventListener('copy', owner.onCopyListener);\n },\n\n toString: function () {\n return '[Cleave Object]';\n }\n};\n\nCleave.NumeralFormatter = NumeralFormatter_1;\nCleave.DateFormatter = DateFormatter_1;\nCleave.TimeFormatter = TimeFormatter_1;\nCleave.PhoneFormatter = PhoneFormatter_1;\nCleave.CreditCardDetector = CreditCardDetector_1;\nCleave.Util = Util_1;\nCleave.DefaultProperties = DefaultProperties_1;\n\n// for angular directive\n((typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window)['Cleave'] = Cleave;\n\n// CommonJS\nvar Cleave_1 = Cleave;\n\nexport default Cleave_1;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport function coerceBoolean(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n\nexport function coerceNumber(value: any): number;\nexport function coerceNumber(value: any, fallback: D): number | D;\nexport function coerceNumber(value: any, fallbackValue = 0) {\n return isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\nfunction isNumberValue(value: any): boolean {\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n@use 'utils/color';\n@use '_snippets/form-label';\n\n:host {\n display: flex;\n @include cat-body('m', null);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.input-field,\n.input-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex: 1 1 auto;\n}\n\n.input-field.input-horizontal {\n flex-direction: row;\n gap: 1rem;\n}\n\n.input-wrapper {\n flex: 1 1 auto;\n display: flex;\n align-items: stretch;\n gap: 0.75rem;\n padding: 0 0.75rem;\n height: form-label.$cat-input-height;\n overflow: hidden;\n background: cat-token('color.ui.background.input');\n border-radius: cat-border-radius('m');\n box-shadow: inset 0 0 0 1px rgb(var(--border-color));\n transition: box-shadow cat-token('time.transition.s') linear;\n --border-color: #{cat-token('color.ui.border.dark', $wrap: false)};\n\n &.input-round {\n border-radius: 10rem;\n }\n\n &.input-readonly {\n pointer-events: none;\n }\n\n &.input-disabled {\n background: cat-token('color.ui.background.muted');\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n }\n\n &:not(.input-disabled):hover {\n box-shadow:\n inset 0 0 0 1px rgb(var(--border-color)),\n 0 0 0 1px rgb(var(--border-color));\n }\n\n &:focus-within {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: -1px;\n\n &:has(.clearable:focus) {\n outline: none;\n }\n }\n\n &.input-invalid {\n --border-color: #{cat-token('color.theme.danger.bg', 0.2, $wrap: false)};\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:has(input:-webkit-autofill) {\n &,\n &:hover,\n &:focus {\n background-color: cat-token('color.ui.background.inputAutofill');\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n\n.text-prefix,\n.text-suffix {\n display: inline-flex;\n align-items: center;\n @include cat-select(none);\n}\n\n.text-prefix {\n border-right: 1px solid cat-token('color.ui.border.dark');\n padding-right: 0.75rem;\n}\n\n.text-suffix {\n border-left: 1px solid cat-token('color.ui.border.dark');\n padding-left: 0.75rem;\n}\n\n.icon-prefix,\n.icon-suffix {\n align-self: center;\n}\n\n.input-outer-wrapper {\n display: flex;\n}\n\n.input-inner-wrapper {\n display: flex;\n align-items: center;\n position: relative;\n flex: 1 1 auto;\n}\n\ninput {\n font: inherit;\n margin: 0;\n padding: 0;\n width: 100%;\n min-width: 0;\n border: none;\n outline: none;\n background: none;\n @include cat-ellipsis;\n\n .input-disabled & {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n }\n\n &.has-clearable,\n &.has-toggle-password {\n padding-right: 1.5rem;\n }\n\n &.has-clearable.has-toggle-password {\n padding-right: 3.5rem;\n }\n\n &::placeholder {\n color: cat-token('color.ui.font.muted');\n }\n\n /* stylelint-disable property-no-vendor-prefix */\n &:-webkit-autofill {\n &,\n &:hover,\n &:focus {\n -webkit-box-shadow: 0 0 0 9999px cat-token('color.ui.background.inputAutofill') inset;\n }\n }\n /* stylelint-enable property-no-vendor-prefix */\n}\n\n.clearable {\n position: absolute;\n top: calc(50% - 1rem);\n right: -0.5rem;\n}\n\n.toggle-password {\n position: absolute;\n top: calc(50% - 1rem);\n right: -0.5rem;\n\n .has-clearable ~ & {\n right: 1.5rem;\n }\n}\n\n// ----- date- & timepicker\n\n:host(.cat-date-input),\n:host(.cat-time-input) {\n .input-wrapper {\n z-index: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport Cleave from 'cleave.js';\nimport type { CleaveOptions } from 'cleave.js/options';\nimport log from 'loglevel';\nimport { coerceBoolean, coerceNumber } from '../../utils/coerce';\nimport { CatFormHint, ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { InputType } from './input-type';\n\nlet nextUniqueId = 0;\n\n/**\n * Inputs are used to allow users to provide text input when the expected input\n * is short. As well as plain text, Input supports various types of text,\n * including passwords and numbers.\n *\n * @slot hint - Optional hint element to be displayed with the input.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The native label element.\n * @part input - The native input element.\n * @part prefix - The text prefix.\n * @part suffix - The text suffix.\n */\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n shadow: true\n})\nexport class CatInput {\n private readonly _id = `cat-input-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n private errorMapSrc?: ErrorMap;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n @State() isPasswordShown = false;\n\n @State() errorMap?: ErrorMap;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input should show a password toggle button for password inputs.\n */\n @Prop() togglePassword = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for numeric values.\n */\n @Prop() max?: number | string;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum value for numeric values.\n */\n @Prop() min?: number | string;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: InputType = 'text';\n\n /**\n * The value of the control.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillRender(): void {\n this.onErrorsChanged(this.errors);\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on input', this);\n }\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n // hack to make datepicker inputs focusable. The datepicker hides the input\n // element and dynamically creates a sibling. We need to find the new input\n // element and focus it instead.\n const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;\n input?.focus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.value = '';\n this.catChange.emit(this.value);\n }\n\n /**\n * Adds a Cleave.js mask to the input.\n *\n * @param options The Cleave.js options.\n */\n @Method()\n async mask(options: CleaveOptions): Promise
{i18n.t(`error.${key}`, params)}
{item}
{hint}
{this.locale.arrowKeys}
{this.content}