@descope/web-components-ui 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/cjs/index.cjs.js +2024 -1650
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +2266 -1619
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1484.js +1 -1
  6. package/dist/umd/1738.js +1 -0
  7. package/dist/umd/1902.js +373 -0
  8. package/dist/umd/404.js +1 -1
  9. package/dist/umd/4127.js +1 -1
  10. package/dist/umd/4619.js +1 -1
  11. package/dist/umd/6050.js +237 -0
  12. package/dist/umd/{2159.js.LICENSE.txt → 6050.js.LICENSE.txt} +0 -6
  13. package/dist/umd/8823.js +1 -1
  14. package/dist/umd/DescopeDev.js +1 -1
  15. package/dist/umd/descope-alert-index-js.js +1 -1
  16. package/dist/umd/descope-autocomplete-field.js +1 -0
  17. package/dist/umd/descope-combo-box.js +7 -7
  18. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  19. package/dist/umd/descope-hybrid-field-index-js.js +3 -3
  20. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  21. package/dist/umd/descope-passcode-index-js.js +37 -1
  22. package/dist/umd/descope-passcode-index-js.js.LICENSE.txt +11 -0
  23. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  24. package/dist/umd/index.js +1 -1
  25. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  26. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  27. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  28. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  29. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +8 -8
  30. package/package.json +6 -5
  31. package/src/mixins/normalizeBooleanAttributesMixin.js +1 -0
  32. package/src/theme/components/index.js +2 -0
  33. package/dist/umd/1396.js +0 -37
  34. package/dist/umd/2159.js +0 -608
  35. /package/dist/umd/{1396.js.LICENSE.txt → 1902.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,5710],{17166:(e,t,r)=>{r.d(t,{EA:()=>h,Ge:()=>i,Gh:()=>l,Ix:()=>d,mx:()=>s,q:()=>p,xE:()=>c});var n=r(18366),o=r(75777);const s=(e,t,{excludeAttrs:r=[],includeAttrs:n=[]})=>{const o=Array.from(e.attributes).filter((e=>!r.includes(e.name)&&(!n.length||n.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||r.includes(e.attributeName)||n.length&&!n.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},i=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},a=(e,t,r={})=>n=>{n.forEach((n=>{const o=r[n]||n,s=e.getAttribute(n);null!==s?t.getAttribute(o)!==s&&t.setAttribute(o,s):t.removeAttribute(o)}))},l=(e,t,r)=>{s(e,a(e,t),r),s(t,a(t,e),r)},c=e=>(0,n.GL)(o.$m,e),d=(...e)=>`--${(0,n.GL)(...e)}`,h=(e,t,r={})=>{s(e,a(e,t,r.mapAttrs),r)},p=(e,t,r=[])=>{if(!r.length)return;const n=r.reduce(((t,r)=>Object.assign(t,{[r]:{get:()=>e[r],set(t){e[r]=t}}})),{});Object.defineProperties(t,n)}},75777:(e,t,r)=>{r.d(t,{$m:()=>n,IM:()=>s,aE:()=>o});const n="descope",o=3,s="host"},18366:(e,t,r)=>{r.d(t,{GL:()=>o,Tn:()=>a,Zz:()=>i,dk:()=>s,kW:()=>n});const n=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...e)=>n(e.filter((e=>!!e)).join("-")),s=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(r=e).charAt(0).toUpperCase()+r.slice(1);var r})).join(""),i=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),a=e=>"function"==typeof e},35479:(e,t,r)=>{r.r(t),r.d(t,{AlertClass:()=>p,componentName:()=>c}),r(94694);var n=r(94619),o=r(7138),s=r(14944),i=r(70263),a=r(96431),l=r(17166);const c=(0,s.xE)("alert");class d extends((0,i.q)({componentName:c,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n </style>\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n '}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),(0,l.Gh)(this.textComp,this,{includeAttrs:["empty"]}),(0,l.Ge)(this,this.handleChildrenChange.bind(this)),(0,s.EA)(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const e=this.slotEle.assignedNodes({flatten:!0});e.length&&(this.textComp.textContent=e[0]?.textContent||"")}}const{icon:h}={icon:{selector:()=>".icon"}},p=(0,o.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:a.m.componentName,property:a.m.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:a.m.componentName,property:a.m.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:{},icon:[{...h,property:"content"},{...h,property:"display",fallback:"none"}],iconSize:[{...h,property:"width"},{...h,property:"height"}]}}),(0,n.RF)({componentNameOverride:(0,s.xE)("enriched-text")}),(0,n.RF)({componentNameOverride:(0,s.xE)("text")}),n.VO,n.tQ)(d);customElements.define(c,p)},96431:(e,t,r)=>{r.d(t,{T:()=>d,m:()=>p});var n=r(92540),o=r(94619),s=r(7138),i=r(14944),a=r(74136),l=r(70263),c=r(62583);const d=(0,i.xE)("enriched-text");class h extends((0,l.q)({componentName:d,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <div class="content"></div>\n ',this.#r(),(0,i.Ge)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(a.M)}#i(){this.#s()}#a(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.A("commonmark",{html:!0}),this.#a(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=(0,c.G)(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,o.RF)({componentNameOverride:(0,i.xE)("link")}),(0,o.RF)({componentNameOverride:(0,i.xE)("text")}),o.VO,o.tQ)(h)},74136:(e,t,r)=>{r.d(t,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},62583:(e,t,r)=>{r.d(t,{G:()=>n});const n=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value}},94694:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>n.m,componentName:()=>n.T});var n=r(96431);customElements.define(n.T,n.m)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,5710],{35479:(e,t,n)=>{n.r(t),n.d(t,{AlertClass:()=>p,componentName:()=>a}),n(94694);var r=n(94619),o=n(7138),i=n(14944),s=n(70263),l=n(96431),d=n(17166);const a=(0,i.xE)("alert");class h extends((0,s.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n </style>\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n '}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),(0,d.Gh)(this.textComp,this,{includeAttrs:["empty"]}),(0,d.Ge)(this,this.handleChildrenChange.bind(this)),(0,i.EA)(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const e=this.slotEle.assignedNodes({flatten:!0});e.length&&(this.textComp.textContent=e[0]?.textContent||"")}}const{icon:c}={icon:{selector:()=>".icon"}},p=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:l.m.componentName,property:l.m.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:l.m.componentName,property:l.m.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:{},icon:[{...c,property:"content"},{...c,property:"display",fallback:"none"}],iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),(0,r.RF)({componentNameOverride:(0,i.xE)("enriched-text")}),(0,r.RF)({componentNameOverride:(0,i.xE)("text")}),r.VO,r.tQ)(h);customElements.define(a,p)},96431:(e,t,n)=>{n.d(t,{T:()=>h,m:()=>p});var r=n(92540),o=n(94619),i=n(7138),s=n(14944),l=n(74136),d=n(70263),a=n(62583);const h=(0,s.xE)("enriched-text");class c extends((0,d.q)({componentName:h,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n </style>\n <div class="content"></div>\n ',this.#n(),(0,s.Ge)(this,this.#r.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),n!==t&&("readonly"===e&&this.onReadOnlyChange("true"===n),"link-target-blank"===e&&this.#n())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,n,r,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,n,r,o)),this.processor.renderer.rules.em_close=(e,t,n,r,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,n,r,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,n,r,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,n,r,o)):this.processor.renderer.rules.link_open=this.#e}#i(){this.processor&&this.processor.disable(l.M)}#s(){this.#i()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,n,r,o)=>o.renderToken(e,t,n)),this.#t=this.processor.renderer.rules.em_open||((e,t,n,r,o)=>o.renderToken(e,t,n))}#n(){this.processor=new r.A("commonmark",{html:!0}),this.#l(),this.#s(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#r(){if(!this.processor)return;let e=(0,a.G)(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const p=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,o.RF)({componentNameOverride:(0,s.xE)("link")}),(0,o.RF)({componentNameOverride:(0,s.xE)("text")}),o.VO,o.tQ)(c)},74136:(e,t,n)=>{n.d(t,{M:()=>r});const r=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},62583:(e,t,n)=>{n.d(t,{G:()=>r});const r=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value}},94694:(e,t,n)=>{n.r(t),n.d(t,{EnrichedTextClass:()=>r.m,componentName:()=>r.T});var r=n(96431);customElements.define(r.T,r.m)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8712],{98412:(e,t,s)=>{s.r(t),s.d(t,{AutocompleteFieldClass:()=>p,componentName:()=>m}),s(40200),s(11738);var r=s(30064),o=s(17166),n=s(18366);const a=(0,o.xE)("autocomplete-field-internal"),i=(0,r.yc)({componentName:a,baseSelector:""}),l=[],c="DESCOPE_INVALID_OPTION";customElements.define(a,class extends i{static get observedAttributes(){return[].concat(i.observedAttributes||[],l)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n </style>\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout((()=>{this.comboBox.value=e})))}get defaultValue(){return this.getAttribute("default-value")}async#e(e){const{results:t,error:s}=await this.fetchResults(e);return s?{error:s}:{results:t}}#t(e,t,s,r){return`<span data-name="${s}" data-id="${t}" ${r?'disabled="true"':""}>${e||s}</span>`}#s(){this.comboBox.renderer=(e,t,s)=>{"true"===s.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=s.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:s,disabled:r})=>this.#t(e,t,s,r)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.comboBox.focus()})),super.init?.(),this.#r(),(0,o.Gh)(this,this.comboBox,{includeAttrs:["invalid"]})}#r(){this.debouncedSearch=(0,n.g5)((async e=>{try{const{results:t,error:s}=await this.#e(e);return{results:t,error:s,value:e}}catch(t){return{error:t,value:e}}}),250),(0,o.EA)(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#s()}#o(){return[{label:this.noResultsFoundMessage,value:c,disabled:!0}]}#n(){return[{label:this.errorFetchingResultsMessage,value:c,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const s=await this.debouncedSearch(t);s&&s.value===t&&(this.comboBox.loading=!1,s.error?this.comboBox.data=this.#n():0===s.results?.length?this.comboBox.data=this.#o():this.comboBox.data=s.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}});var u=s(18823),d=s(44976);const m=(0,o.xE)("autocomplete-field"),{host:h}={host:{selector:()=>":host"}},p=(0,n.Zz)((0,u.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,u.RF)({mappings:{hostWidth:{...h,property:"width"},hostDirection:{...h,property:"direction"},fontSize:{...h},checkmarkDisplay:{selector:d.C.componentName,property:d.C.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemHoverBackground},errorMessageIcon:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconSize},errorMessageIconPadding:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconPadding},errorMessageIconRepeat:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconRepeat},errorMessageIconPosition:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconPosition}}}),u.VO,(0,u.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),u.tQ,(e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout((()=>{this.inputElement.value=this.defaultValue}))}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${a}\n tabindex="-1"\n ></${a}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a),(0,o.EA)(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),(0,o.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}}))((0,u.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n ",excludeAttrsSync:["tabindex","error-message","label"],componentName:m}));customElements.define(m,p)}}]);
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-combo-box.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5691],{44976:(e,t,o)=>{o.d(t,{C:()=>g,T:()=>l});var r=o(18366),a=o(17166),i=o(49151),n=o(18823);const l=(0,a.xE)("combo-box"),{host:s,inputField:d,inputElement:p,placeholder:c,toggle:u,clearButton:b,label:m,requiredIndicator:h,helperText:v,errorMessage:y}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],fontFamily:[m,c,d,v,y],labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...h,property:"color"}],errorMessageTextColor:{...y,property:"color"},errorMessageIcon:{...y,property:"background-image"},errorMessageIconSize:{...y,property:"background-size"},errorMessageIconPadding:{...y,property:"padding-inline-start"},errorMessageIconRepeat:{...y,property:"background-repeat"},errorMessageIconPosition:{...y,property:"background-position"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...h,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...u,property:"cursor"},{...b,property:"cursor"}],inputDropdownButtonColor:[{...u,property:"color"},{...b,property:"color"}],inputDropdownButtonSize:[{...u,property:"font-size"},{...b,property:"font-size"}],inputDropdownButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>g.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>g.cssVarList.overlay.textColor},overlayBorder:{property:()=>g.cssVarList.overlay.border},overlayFontSize:{property:()=>g.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>g.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>g.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>g.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>g.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>g.cssVarList.overlay.itemPaddingInlineEnd}}}),n.VO,(0,n.mA)({name:"overlay",selector:"",mappings:{backgroundColor:[{selector:"vaadin-combo-box-scroller"},{selector:"vaadin-combo-box-overlay::part(overlay)"}],minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"},loaderTop:{selector:"vaadin-combo-box-overlay::part(loader)",property:"top"},loaderLeft:{selector:"vaadin-combo-box-overlay::part(loader)",property:"left"},loaderRight:{selector:"vaadin-combo-box-overlay::part(loader)",property:"right"},loaderMargin:{selector:"vaadin-combo-box-overlay::part(loader)",property:"margin"},loaderWidth:{selector:"vaadin-combo-box-overlay::part(loader)",property:"width"},loaderHeight:{selector:"vaadin-combo-box-overlay::part(loader)",property:"height"},loaderBorder:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border"},loaderBorderColor:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border-color"},loaderBorderRadius:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border-radius"},contentHeight:{selector:"vaadin-combo-box-overlay::part(content)",property:"height"},contentOpacity:{selector:"vaadin-combo-box-overlay::part(content)",property:"opacity"}},forward:{include:!1,attributes:["size"]}}),(0,n.OZ)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),n.tQ,(e=>class extends e{static get observedAttributes(){return["label-type"]}#e=({displayName:e,value:t,label:o})=>`<span data-name="${o}" data-id="${t}">${e||o}</span>`;#t;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#e}set renderItem(e){this.#e=e,this.renderItems()}set renderer(e){this.baseElement.renderer=e}get loading(){return"true"===this.getAttribute("loading")}set loading(e){e?this.setAttribute("loading","true"):this.removeAttribute("loading")}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.renderItem?.(t||{})||"")),"")}renderItems(){if(this.#t||this.getAttribute("data")){const e=this.getItemsTemplate();this.innerHTML=e}}handleSelectedItem(){const{selectedItem:e}=this.baseElement,t=e?.["data-id"];e&&Array.from(this.children).includes(e)||(t&&(this.value=t),this.value||this.setDefaultValue())}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){if(!t.baseElement.items?.length&&!t.allowCustomValue)return;const r=t.customValueTransformFn(o)||"";r!==this.value&&e.set.call(this,r)}}})}#o(){const e=Array.from(this.children);e.forEach((e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})})),this.baseElement.items=e,setTimeout((()=>{this.handleSelectedItem()}),0)}#r(){const e=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#a(){this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#r(),this.#a(),(0,a.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,a.Ge)(this,this.#o.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),t!==o&&"label-type"===e&&("floating"===o?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.defaultValue&&(this.value=this.defaultValue)}#i(e){return this.baseElement.items?.find((t=>t["data-id"]===e))}#n(e,t){e===this.value&&t!==this.baseElement.selectedItem&&this.baseElement.addEventListener("selected-item-changed",(e=>{e.stopImmediatePropagation()}),{once:!0,capture:!0})}set value(e){const t=this.#i(e);this.#n(e,t),e&&t?this.baseElement.selectedItem=t:!t&&this.allowCustomValue?this.baseElement.value=e:this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,n.tz)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,i.cy)(g.cssVarList)}\n\t\t${(0,i.fu)("vaadin-combo-box")}\n\t\t${(0,i.lS)("vaadin-combo-box")}\n\t\t${(0,i.I4)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button="true"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${(0,i.$J)("vaadin-combo-box")}\n ${(0,i.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data","loading"],componentName:l,includeForwardProps:["items","renderer","selectedItem"]}))},11738:(e,t,o)=>{o.r(t),o.d(t,{ComboBoxClass:()=>r.C,componentName:()=>r.T}),o(91011);var r=o(44976);customElements.define(r.T,r.C)},91011:(e,t,o)=>{o(73593),o(97612),o(67239),o(34123);var r=o(80704),a=o(57224);const i=a.AH`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5691],{91011:(t,e,o)=>{o(73593),o(97612),o(67239),o(34123);var a=o(80704),i=o(57224);const r=i.AH`
3
3
  :host {
4
4
  outline: none;
5
5
  }
@@ -7,7 +7,7 @@
7
7
  [part='toggle-button']::before {
8
8
  content: var(--lumo-icons-dropdown);
9
9
  }
10
- `;(0,a.SF)("vaadin-combo-box",[r.k,i],{moduleId:"lumo-combo-box"}),o(94009);var n=o(98633),l=o(65211),s=o(38785),d=o(14495);class p extends((0,d.y)((0,a.cp)((0,s.v)(n.Pu)))){static get template(){return n.qy`
10
+ `;(0,i.SF)("vaadin-combo-box",[a.k,r],{moduleId:"lumo-combo-box"}),o(94009);var n=o(98633),s=o(65211),l=o(38785),d=o(14495);class c extends((0,d.y)((0,i.cp)((0,l.v)(n.Pu)))){static get template(){return n.qy`
11
11
  <style>
12
12
  :host {
13
13
  display: block;
@@ -21,7 +21,7 @@
21
21
  <div part="content">
22
22
  <slot></slot>
23
23
  </div>
24
- `}static get is(){return"vaadin-combo-box-item"}}(0,l.X)(p);var c=o(6019),u=o(31146),b=o(31278);const m=a.AH`
24
+ `}static get is(){return"vaadin-combo-box-item"}}(0,s.X)(c);var p=o(6019),v=o(31146),u=o(31278);const b=i.AH`
25
25
  #overlay {
26
26
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
27
27
  }
@@ -31,13 +31,13 @@
31
31
  flex-direction: column;
32
32
  height: 100%;
33
33
  }
34
- `;(0,a.SF)("vaadin-combo-box-overlay",[u.B,m],{moduleId:"vaadin-combo-box-overlay-styles"});class h extends((0,b.p)((0,c.c)((0,s.v)((0,a.cp)(n.Pu))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return n.qy`
34
+ `;(0,i.SF)("vaadin-combo-box-overlay",[v.B,b],{moduleId:"vaadin-combo-box-overlay-styles"});class h extends((0,u.p)((0,p.c)((0,l.v)((0,i.cp)(n.Pu))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return n.qy`
35
35
  <div id="backdrop" part="backdrop" hidden></div>
36
36
  <div part="overlay" id="overlay">
37
37
  <div part="loader"></div>
38
38
  <div part="content" id="content"><slot></slot></div>
39
39
  </div>
40
- `}}(0,l.X)(h);var v=o(82642);class y extends((0,v.N)(n.Pu)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return n.qy`
40
+ `}}(0,s.X)(h);var m=o(82642);class g extends((0,m.N)(n.Pu)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return n.qy`
41
41
  <style>
42
42
  :host {
43
43
  display: block;
@@ -64,7 +64,7 @@
64
64
  <div id="selector">
65
65
  <slot></slot>
66
66
  </div>
67
- `}}(0,l.X)(y);var g=o(27150),x=o(83798),f=o(60354),C=o(21860),w=o(19074),I=o(45446);const E=e=>class extends((0,I.U)(e)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var S=o(9685),k=o(79372),_=o(34060);(0,a.SF)("vaadin-combo-box",S.k,{moduleId:"vaadin-combo-box-styles"});class T extends((0,k.K)((0,_.x)(E((0,f.R)((0,a.cp)((0,g.q)(n.Pu))))))){static get is(){return"vaadin-combo-box"}static get template(){return n.qy`
67
+ `}}(0,s.X)(g);var y=o(27150),x=o(83798),_=o(60354),f=o(21860),w=o(19074),k=o(45446);const C=t=>class extends((0,k.U)(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var S=o(9685),q=o(79372),E=o(34060);(0,i.SF)("vaadin-combo-box",S.k,{moduleId:"vaadin-combo-box-styles"});class B extends((0,q.K)((0,E.x)(C((0,_.R)((0,i.cp)((0,y.q)(n.Pu))))))){static get is(){return"vaadin-combo-box"}static get template(){return n.qy`
68
68
  <style>
69
69
  :host([opened]) {
70
70
  pointer-events: auto;
@@ -110,4 +110,4 @@
110
110
  ></vaadin-combo-box-overlay>
111
111
 
112
112
  <slot name="tooltip"></slot>
113
- `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new C.f(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new w.q(this.inputElement,this._labelController)),this._tooltipController=new x.I(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((e=>!e.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e)}_onHostClick(e){const t=e.composedPath();(t.includes(this._labelNode)||t.includes(this._positionTarget))&&super._onHostClick(e)}}(0,l.X)(T)}}]);
113
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new f.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new w.q(this.inputElement,this._labelController)),this._tooltipController=new x.I(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}(0,s.X)(B)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6028,7401],{44976:(t,e,n)=>{n.d(e,{C:()=>v,T:()=>s});var r=n(18366),a=n(17166),o=n(49151),i=n(18823);const s=(0,a.xE)("combo-box"),{host:l,inputField:d,inputElement:p,placeholder:c,toggle:h,clearButton:u,label:b,requiredIndicator:y,helperText:m,errorMessage:g}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,r.Zz)((0,i.RF)({mappings:{hostWidth:{...l,property:"width"},hostDirection:{...l,property:"direction"},fontSize:[{},l],fontFamily:[b,c,d,m,g],labelFontSize:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...y,property:"color"}],errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},inputHeight:{...d,property:"height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...y,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},inputDropdownButtonCursor:[{...h,property:"cursor"},{...u,property:"cursor"}],inputDropdownButtonColor:[{...h,property:"color"},{...u,property:"color"}],inputDropdownButtonSize:[{...h,property:"font-size"},{...u,property:"font-size"}],inputDropdownButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,property:"margin-inline-start"},placeholderOpacity:{...c,property:"opacity"},inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...p,property:"height"},valueInputMarginBottom:{...p,property:"margin-bottom"},overlayBackground:{property:()=>v.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>v.cssVarList.overlay.textColor},overlayBorder:{property:()=>v.cssVarList.overlay.border},overlayFontSize:{property:()=>v.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>v.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>v.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>v.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>v.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>v.cssVarList.overlay.itemPaddingInlineEnd}}}),i.VO,(0,i.mA)({name:"overlay",selector:"",mappings:{backgroundColor:[{selector:"vaadin-combo-box-scroller"},{selector:"vaadin-combo-box-overlay::part(overlay)"}],minHeight:{selector:"vaadin-combo-box-overlay"},margin:{selector:"vaadin-combo-box-overlay"},cursor:{selector:"vaadin-combo-box-item"},fontFamily:{selector:"vaadin-combo-box-item"},textColor:{selector:"vaadin-combo-box-item",property:"color"},fontSize:{selector:"vaadin-combo-box-item"},itemBoxShadow:{selector:"vaadin-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-combo-box-item",property:"padding-inline-end"},loaderTop:{selector:"vaadin-combo-box-overlay::part(loader)",property:"top"},loaderLeft:{selector:"vaadin-combo-box-overlay::part(loader)",property:"left"},loaderRight:{selector:"vaadin-combo-box-overlay::part(loader)",property:"right"},loaderMargin:{selector:"vaadin-combo-box-overlay::part(loader)",property:"margin"},loaderWidth:{selector:"vaadin-combo-box-overlay::part(loader)",property:"width"},loaderHeight:{selector:"vaadin-combo-box-overlay::part(loader)",property:"height"},loaderBorder:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border"},loaderBorderColor:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border-color"},loaderBorderRadius:{selector:"vaadin-combo-box-overlay::part(loader)",property:"border-radius"},contentHeight:{selector:"vaadin-combo-box-overlay::part(content)",property:"height"},contentOpacity:{selector:"vaadin-combo-box-overlay::part(content)",property:"opacity"}},forward:{include:!1,attributes:["size"]}}),(0,i.OZ)({proxyProps:["selectionStart"],inputEvent:"selected-item-changed"}),i.tQ,(t=>class extends t{static get observedAttributes(){return["label-type"]}#t=({displayName:t,value:e,label:n})=>`<span data-name="${n}" data-id="${e}">${t||n}</span>`;#e;get defaultValue(){return this.getAttribute("default-value")}get renderItem(){return this.#t}set renderItem(t){this.#t=t,this.renderItems()}set renderer(t){this.baseElement.renderer=t}get loading(){return"true"===this.getAttribute("loading")}set loading(t){t?this.setAttribute("loading","true"):this.removeAttribute("loading")}get data(){if(this.#e)return this.#e;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" -',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#e=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){if(this.#e||this.getAttribute("data")){const t=this.getItemsTemplate();this.innerHTML=t}}handleSelectedItem(){const{selectedItem:t}=this.baseElement,e=t?.["data-id"];t&&Array.from(this.children).includes(t)||(e&&(this.value=e),this.value||this.setDefaultValue())}customValueTransformFn(t){return t}setComboBoxDescriptor(){const t=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),e=this;Object.defineProperties(this.inputElement,{value:{...t,set(n){if(!e.baseElement.items?.length&&!e.allowCustomValue)return;const r=e.customValueTransformFn(n)||"";r!==this.value&&t.set.call(this,r)}}})}#n(){const t=Array.from(this.children);t.forEach((t=>{Object.defineProperty(t,"data-name",{value:t.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(t,"data-id",{value:t.getAttribute("data-id"),configurable:!0,writable:!0})})),this.baseElement.items=t,setTimeout((()=>{this.handleSelectedItem()}),0)}#r(){const t=this.baseElement.shadowRoot.querySelector("vaadin-combo-box-overlay");t._attachOverlay=()=>{t.bringToFront()},t._detachOverlay=()=>{},t._enterModalState=()=>{}}#a(){this.baseElement.renderer=(t,e,n)=>{t.innerHTML=n.item.outerHTML}}init(){super.init?.(),this.getValidity=function(){return!this.value&&this.isRequired?{valueMissing:!0}:{}},this.setComboBoxDescriptor(),this.#r(),this.#a(),(0,a.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,a.Ge)(this,this.#n.bind(this)),this.setDefaultValue(),this.baseElement.addEventListener("selected-item-changed",(()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}))}onLabelClick(){this.isReadOnly||this.isDisabled||(this.focus(),this.setAttribute("opened","true"))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"label-type"===t&&("floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick))}setDefaultValue(){this.defaultValue&&(this.value=this.defaultValue)}#o(t){return this.baseElement.items?.find((e=>e["data-id"]===t))}#i(t,e){t===this.value&&e!==this.baseElement.selectedItem&&this.baseElement.addEventListener("selected-item-changed",(t=>{t.stopImmediatePropagation()}),{once:!0,capture:!0})}set value(t){const e=this.#o(t);this.#i(t,e),t&&e?this.baseElement.selectedItem=e:!e&&this.allowCustomValue?this.baseElement.value=t:this.baseElement.selectedItem=void 0}get value(){return(this.baseElement.selectedItem?.["data-id"]||this.allowCustomValue)&&this.baseElement.__data.value||""}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}}))((0,i.tz)({slots:["","prefix"],wrappedEleName:"vaadin-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,o.cy)(v.cssVarList)}\n\t\t${(0,o.fu)("vaadin-combo-box")}\n\t\t${(0,o.lS)("vaadin-combo-box")}\n\t\t${(0,o.I4)("vaadin-combo-box")}\n\n\t\tvaadin-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\tvaadin-combo-box::part(input-field) {\n\t\t\tpadding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n\n vaadin-combo-box::part(toggle-button),\n vaadin-combo-box::part(clear-button) {\n align-self: center;\n }\n\n vaadin-combo-box[hide-toggle-button="true"]::part(toggle-button) {\n display: none;\n }\n\n vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-combo-box[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n ${(0,o.$J)("vaadin-combo-box")}\n ${(0,o.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","size","data","loading"],componentName:s,includeForwardProps:["items","renderer","selectedItem"]}))},11738:(t,e,n)=>{n.r(e),n.d(e,{ComboBoxClass:()=>r.C,componentName:()=>r.T}),n(91011);var r=n(44976);customElements.define(r.T,r.C)},25827:(t,e,n)=>{n.d(e,{y:()=>i});var r=n(7138),a=n(94619),o=n(70263);const i=(...t)=>(0,r.Zz)(a.XX,a._$,a.yF,a.jd)((0,o.q)(...t))},83942:(t,e,n)=>{n.d(e,{J:()=>u,T:()=>l});var r=n(7138),a=n(14944),o=n(94619),i=n(55708),s=n(91805);const l=(0,a.xE)("button"),{host:d,label:p,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let h;const u=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:i.S.cssVarList.fill},labelTextDecoration:{...p,property:"text-decoration"},labelSpacing:{...p,property:"gap"},textAlign:{...p,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),s.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${h}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:y}=u.cssVarList;h=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${y}) / 2));\n\t\tleft: calc(50% - (var(${y}) / 2));\n\t\tborder-width: calc(var(${y}) / 10);\n\t\twidth: var(${y});\n\t\theight: var(${y});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},91805:(t,e,n)=>{n.d(e,{G:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},1058:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>r.J,componentName:()=>r.T}),n(55093);var r=n(83942);customElements.define(r.T,r.J)},3591:(t,e,n)=>{n.d(e,{QF:()=>b,SP:()=>r,Tv:()=>h,US:()=>d,V$:()=>i,eT:()=>s,lv:()=>u,mx:()=>p,rR:()=>c,ui:()=>a,wJ:()=>o,xr:()=>l});const r=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],a=r[0],o="YYYY-MM-DD",i=100,s="/",l=["Backspace","ArrowLeft","ArrowRight","ArrowDown","ArrowUp","PageUp","PageDown","Meta"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c={MONTH:{id:"month",min:1,max:12,placeholder:"MM",count:5,shiftCount:10},DAY:{id:"day",min:1,max:31,placeholder:"DD",count:5,shiftCount:10},YEAR:{id:"year",min:0,max:9999,placeholder:"YYYY",count:10,shiftCount:100}},h="Done",u="Cancel",b="Today"},18562:(t,e,n)=>{n.r(e),n.d(e,{CalendarClass:()=>P,componentName:()=>g}),n(11738),n(21471),n(1058);var r=n(25827),a=n(7138),o=n(14944),i=n(33177),s=n(94619),l=n(92386),d=n(23193),p=n(3591);const c=(t,e)=>Array.isArray(t)&&t.length===e&&t.filter(Boolean).length===e,h=({label:t,dataId:e,dataName:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${n}"\n\t>\n\t\t\t${t}\n\t</div>\n`,u=(t=p.US)=>t.map(((t,e)=>h({label:t,dataId:e+1,dataName:t}))).join(""),b=(t,e)=>{const[n,r]=(0,l.Pj)(e),[a,o]=(0,l.Pj)(t);return a===n&&o===r},y=(t,e,n)=>(t.addEventListener("input",e),t.addEventListener("focusout",n),t);var m=n(83942);const g=(0,o.xE)("calendar"),v=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],C=["calendar-label-submit","calendar-label-cancel"],f=(0,r.y)({componentName:g,baseSelector:"div"}),{calendar:w,day:x,dayEntry:S,currentDay:V,selectedDay:E,disabledDay:M,weekday:D,topNav:I,topNavSelectors:$,bottomNav:k,navPrev:N,navNext:T,navPrevRTL:L,navNextRTL:A,yearInput:H,monthInput:B}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},P=(0,a.Zz)((0,s.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,s.RF)({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...I,property:"padding-top"},{...I,property:"padding-bottom"}],topNavHorizointalPadding:[{...I,property:"padding-right"},{...I,property:"padding-left"}],topNavAlignment:{...I,property:"justify-content"},topNavGap:{...I,property:"gap"},topNavSelectorsGap:{...$,property:"gap"},bottomNavVerticalPadding:[{...k,property:"padding-top"},{...k,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...k,property:"padding-right"},{...k,property:"padding-left"}],bottomNavAlignment:{...k,property:"justify-content"},bottomNavGap:{...k,property:"gap"},navMarginBottom:{...I,property:"margin-bottom"},calendarPadding:[{...w,property:"padding-bottom"},{...w,property:"padding-right"},{...w,property:"padding-left"}],navBorderBottomWidth:{...I,property:"border-bottom-width"},navBorderBottomColor:{...I,property:"border-bottom-color"},navBorderBottomStyle:{...I,property:"border-bottom-style"},weekdayFontSize:{...D,property:"font-size"},weekdayFontWeight:{...D,property:"font-weight"},currentDayBorderColor:{...V,property:"border-color"},currentDayBorderWidth:{...V,property:"border-width"},currentDayBorderStyle:{...V,property:"border-style"},dayHeight:{...S,property:"height"},daySize:[{...x,property:"height"},{...x,property:"width"}],dayPadding:{...x,property:"padding"},dayRadius:{...x,property:"border-radius"},dayTextAlign:{...x,property:"text-align"},dayBlockAlign:{...x,property:"margin"},dayTextColor:{...x,property:"color"},dayFontWeight:{...x,property:"font-weight"},dayBackgroundColor:{...x,property:"background-color"},dayCursor:{...x,property:"cursor"},dayFontSize:{...x,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...E,property:"color"},daySelectedBackgroundColor:{...E,property:"background-color"},dayDisabledTextdColor:{...M,property:"color"},yearInputWidth:{...H,property:"width"},monthInputWidth:{...B,property:"width"},navButtonSize:[{...N,property:"width"},{...N,property:"height"},{...T,property:"width"},{...T,property:"height"}],navButtonCursor:[{...N,property:"cursor"},{...T,property:"cursor"}],navButtonRotation:[{...L,property:"transform"},{...A,property:"transform"}],navButtonOpacity:[{...N,property:"opacity"},{...T,property:"opacity"}]}}),s.VO,s.tQ)(class extends f{static get observedAttributes(){return[].concat(f.observedAttributes||[],v,C)}preview;timestamp;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${m.J.cssVarList.horizontalPadding}: 0;\n ${m.J.cssVarList.verticalPadding}: 0;\n ${m.J.cssVarList.outlineWidth}: 0;\n }\n\n ${(0,i.Kl)()}\n </style>\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n <descope-icon></descope-icon>\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n <descope-icon></descope-icon>\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n `}set value(t){if(!t)return;const e=(0,l.Nq)(t).getTime();(0,l.xP)(e)&&e!==this.timestmap&&(this.timestamp=e,this.renderCalendar())}get value(){return this.timestamp?(0,l.Ey)(this.timestamp,p.wJ):""}get isSelectedView(){return b(this.preview,this.timestamp)}get isTodayView(){return b((0,l.Ln)(),this.preview)}get monthNames(){return(t=>{const e=t?.split(",");return c(e,12)?e:p.US})(this.getAttribute("calendar-months"))}get weekdayNames(){return(t=>{const e=t?.split?.(",");return c(e,7)?e:p.mx})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const t=this.getAttribute("years-range")?.split("-");if(2===t?.length){const[e,n]=t.map(Number);if(e<=n)return[e,n]}const e=(0,l.Nq)().getFullYear();return[e,e+p.V$]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",(()=>this.submitButton.removeAttribute("disabled"))),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const t=(()=>{const t=document.createElement("span");return t.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${u()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,t})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(t),this.monthInput=y(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=y(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach((t=>(0,o.EA)(this,t,{includeAttrs:["disabled","size","st-host-direction"]})))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach((t=>(0,o.EA)(this,t,{includeAttrs:["size"]}))),this.shadowRoot.querySelector(".nav-next descope-icon").innerHTML=d.ZM,this.shadowRoot.querySelector(".nav-prev descope-icon").innerHTML=d.i1}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:(0,l.Nq)(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.timestamp=""}updateInputs(){if(this.yearInput&&this.monthInput){const t=this.preview||(0,l.Ln)(),e=(0,l.Bl)(t),n=(0,l.tj)(t);this.monthInput.value=n,setTimeout((()=>{this.yearInput.baseElement.value=e}))}}renderCalendar(){const t=(0,l.Nq)(this.preview||(0,l.Ln)()).getTime(),[e,n]=(0,l.Pj)(t);this.calendar&&(this.calendar.innerHTML=((t,e,n)=>{const r=((t,e)=>new Date(t,e,0).getDate())(t,e),a=new Date(t,e-1,1).getDay();let o="<table>";o+=`<thead><tr>${n.reduce(((t,e)=>`${t}<th><span class="weekday">${e}</span></th>`),"")}</tr></thead>`,o+="<tbody>",o+="<tr>";for(let t=0;t<a;t++)o+="<td></td>";let i=a;for(let t=1;t<=r;t++)7===i&&(i=0,o+="</tr><tr>"),o+=`\n <td\n data-date-day="${t}"\n class="day-entry">\n <span class="day" data-date-day=${t}>\n ${t}\n </span>\n </td>\n `,i++;for(;i<7;)o+="<td></td>",i++;return o+="</tr></tbody></table>",o})(e,n,this.weekdayNames.map((t=>t.substring(0,3))))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach((t=>t.addEventListener("click",this.onDayChange.bind(this)))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(t){if(this.isDisabled)return;const e=(0,l.Nq)(this.preview);e.setDate(Number(t.target.getAttribute("data-date-day"))),this.value=(0,l.Ey)(e.getTime(),p.wJ),this.dispatchEvent(new CustomEvent("day-changed",{detail:e}))}onYearChange(t){if(!t.target.value)return;const e=(0,l.Nq)(this.preview);e.setFullYear(Number(t.target.value.trim())),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:e}))}onMonthChange(t){if(!t.target.value)return;const e=(0,l.Nq)(this.preview);e.setMonth(Number(t.target.value)-1),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:e}))}onYearInputBlur(t){this.yearInput.baseElement.value=t.target.value||(0,l.Bl)(this.preview)}onMonthInputBlur(t){this.monthInput.baseElement.value=t.target.value||(0,l.tj)(this.preview)}getSelectedDayEle(){const t=(0,l.Nq)(this.timestamp).getDate();return this.calendar?.querySelector(`[data-date-day="${t}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${(0,l._B)()}"]`)}clearSelectedDays(){const t=this.calendar?.querySelectorAll("[data-selected]");t&&t.forEach((t=>t.removeAttribute("data-selected")))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const t=this.getCurrentDayEle(),e=this.getAttribute("calendar-label-today")||p.QF;t.setAttribute("data-current-day","true"),t.setAttribute("title",e)}}navPrevMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.Nq)(t),n=e.getMonth();if(0===n){const t=e.getFullYear();e.setFullYear(t-1),e.setMonth(11)}else e.setMonth(n-1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.Nq)(t),n=e.getMonth();if(11===n){const t=e.getFullYear();e.setFullYear(t+1),e.setMonth(0)}else e.setMonth(n+1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}clearValue(){this.timestamp="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(t){if(this.value)return;const e=(0,l.Nq)(t).getTime();(0,l.xP)(e)?(this.timestamp=e,this.preview=e):this.clearValue()}onYearsRangeChange(){setTimeout((()=>{this.yearInput&&(this.yearInput.innerHTML=(t=>{const[e,n]=t,r=[];for(let t=e;t<=n;t++)r.push(t);return r})(this.yearsRange).map((t=>h({label:t,dataId:t,dataName:t}))).join(""))}))}onMonthNamesChange(){setTimeout((()=>{this.monthInput&&(this.monthInput.innerHTML=u(this.monthNames))}))}onSubmitLabelChange(t){this.submitButton&&(this.submitButton.textContent=t||p.Tv)}onCancelLabelChange(t){this.cancelButton&&(this.cancelButton.textContent=t||p.lv)}onInitialMonthChange(t){const e=(0,l.Bl)(this.preview);this.preview=(0,l.Nq)(`${e}/${t}/1`).getTime()}onInitialYearChange(t){const e=(0,l.tj)(this.preview);this.preview=(0,l.Nq)(`${t}/${e}/1`).getTime()}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),e!==n&&(C.includes(t)?("calendar-label-submit"===t&&this.onSubmitLabelChange(n),"calendar-label-cancel"===t&&this.onCancelLabelChange(n)):(n&&"initial-value"===t&&this.onInitialValueChange(n),n&&"initial-month"===t&&this.onInitialMonthChange(n),n&&"initial-year"===t&&this.onInitialYearChange(n),"years-range"===t&&this.onYearsRangeChange(Number(n)),"calendar-months"===t&&this.onMonthNamesChange(),"calendar-label-today"===t&&this.setCurrentDay(n),"disabled"===t&&setTimeout((()=>{this.cancelButton?.setAttribute("disabled","true"===n)})),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(g,P)},92386:(t,e,n)=>{n.d(e,{Bl:()=>h,Et:()=>o,Ey:()=>s,KQ:()=>d,Ln:()=>c,Nq:()=>l,Pj:()=>i,Xs:()=>y,_B:()=>b,tj:()=>u,xP:()=>a,y4:()=>p});var r=n(3591);const a=t=>!Number.isNaN(Number(t)),o=t=>!Number.isNaN(Number(t)),i=t=>{const e=new Date(t);return[e.getFullYear(),e.getMonth()+1,e.getDate()]},s=(t,e)=>{const[n,r,a]=i(t),o={DD:String(a).padStart(2,"0"),MM:String(r).padStart(2,"0"),YYYY:String(n)};return e.replace(/DD|MM|YYYY/g,(t=>o[t]))},l=t=>"number"==typeof t?new Date(t):"string"==typeof t?new Date(t.replace(/-/g,"/")):new Date,d=t=>r.xr.includes(t),p=(t,e,n)=>({refresh:n&&"r"===t.toLowerCase(),tab:"Tab"===t,shiftTab:e&&"Tab"===t,backspace:"Backspace"===t,arrowUp:!e&&"ArrowUp"===t,arrowDown:!e&&"ArrowDown"===t,arrowLeft:!e&&"ArrowLeft"===t,arrowRight:!e&&"ArrowRight"===t,pageUp:!e&&"PageUp"===t,pageDown:!e&&"PageDown"===t,shiftArrowUp:e&&"ArrowUp"===t,shiftArrowDown:e&&"ArrowDown"===t,shiftPageUp:e&&"PageUp"===t,shiftPageDown:e&&"PageDown"===t}),c=()=>l().getTime(),h=t=>l(t).getFullYear().toString(),u=t=>(l(t).getMonth()+1).toString(),b=()=>l().getDate(),y=t=>{const e=new CSSStyleSheet;e.insertRule(":host{display:block!important;}"),t?.shadowRoot?.adoptedStyleSheets?.push(e)}},23193:(t,e,n)=>{n.d(e,{ZM:()=>a,i1:()=>o,ki:()=>r});const r='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n',a='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',o='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'},55708:(t,e,n)=>{n.d(e,{S:()=>p,T:()=>l});var r=n(94619),a=n(70263),o=n(7138),i=n(14944),s=n(13390);const l=(0,i.xE)("icon");class d extends((0,a.q)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#s;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${p.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(0,s.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const p=(0,o.Zz)((0,r.RF)({mappings:{fill:{}}}),r.VO,r.tQ)(d)},13390:(t,e,n)=>{n.d(e,{w:()=>o});var r=n(25414);const a=t=>{const e=r.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=a(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),r=await n.text();e=a(r)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},21471:(t,e,n)=>{n.r(e),n.d(e,{IconClass:()=>r.S,componentName:()=>r.T});var r=n(55708);customElements.define(r.T,r.S)},33177:(t,e,n)=>{n.d(e,{$J:()=>h,I4:()=>i,Kl:()=>u,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>r,fu:()=>d,kG:()=>p,lS:()=>s,zm:()=>a});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,a=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,i=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${a(t)}\n ${i(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6028,7401],{25827:(t,e,n)=>{n.d(e,{y:()=>o});var a=n(7138),r=n(94619),i=n(70263);const o=(...t)=>(0,a.Zz)(r.XX,r._$,r.yF,r.jd)((0,i.q)(...t))},83942:(t,e,n)=>{n.d(e,{J:()=>u,T:()=>l});var a=n(7138),r=n(14944),i=n(94619),o=n(55708),s=n(91805);const l=(0,r.xE)("button"),{host:d,label:h,slottedIcon:p}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let c;const u=(0,a.Zz)((0,i.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...p,property:"width"},{...p,property:"height"}]}}),s.G,i.VO,i.tQ)((0,i.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${c}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:y,fontSize:b}=u.cssVarList;c=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${y});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"])::part(prefix),\n\t:host([loading="true"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},91805:(t,e,n)=>{n.d(e,{G:()=>a});const a=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},1058:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>a.J,componentName:()=>a.T}),n(55093);var a=n(83942);customElements.define(a.T,a.J)},3591:(t,e,n)=>{n.d(e,{QF:()=>y,SP:()=>a,Tv:()=>c,US:()=>d,V$:()=>o,eT:()=>s,lv:()=>u,mx:()=>h,rR:()=>p,ui:()=>r,wJ:()=>i,xr:()=>l});const a=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],r=a[0],i="YYYY-MM-DD",o=100,s="/",l=["Backspace","ArrowLeft","ArrowRight","ArrowDown","ArrowUp","PageUp","PageDown","Meta"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p={MONTH:{id:"month",min:1,max:12,placeholder:"MM",count:5,shiftCount:10},DAY:{id:"day",min:1,max:31,placeholder:"DD",count:5,shiftCount:10},YEAR:{id:"year",min:0,max:9999,placeholder:"YYYY",count:10,shiftCount:100}},c="Done",u="Cancel",y="Today"},18562:(t,e,n)=>{n.r(e),n.d(e,{CalendarClass:()=>I,componentName:()=>v}),n(11738),n(21471),n(1058);var a=n(25827),r=n(7138),i=n(14944),o=n(33177),s=n(94619),l=n(92386),d=n(23193),h=n(3591);const p=(t,e)=>Array.isArray(t)&&t.length===e&&t.filter(Boolean).length===e,c=({label:t,dataId:e,dataName:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${n}"\n\t>\n\t\t\t${t}\n\t</div>\n`,u=(t=h.US)=>t.map(((t,e)=>c({label:t,dataId:e+1,dataName:t}))).join(""),y=(t,e)=>{const[n,a]=(0,l.Pj)(e),[r,i]=(0,l.Pj)(t);return r===n&&i===a},b=(t,e,n)=>(t.addEventListener("input",e),t.addEventListener("focusout",n),t);var g=n(83942);const v=(0,i.xE)("calendar"),m=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],C=["calendar-label-submit","calendar-label-cancel"],w=(0,a.y)({componentName:v,baseSelector:"div"}),{calendar:f,day:x,dayEntry:S,currentDay:V,selectedDay:M,disabledDay:$,weekday:D,topNav:N,topNavSelectors:H,bottomNav:k,navPrev:E,navNext:L,navPrevRTL:A,navNextRTL:T,yearInput:B,monthInput:Y}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},I=(0,r.Zz)((0,s.RF)({componentNameOverride:(0,i.xE)("input-wrapper")}),(0,s.RF)({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...N,property:"padding-top"},{...N,property:"padding-bottom"}],topNavHorizointalPadding:[{...N,property:"padding-right"},{...N,property:"padding-left"}],topNavAlignment:{...N,property:"justify-content"},topNavGap:{...N,property:"gap"},topNavSelectorsGap:{...H,property:"gap"},bottomNavVerticalPadding:[{...k,property:"padding-top"},{...k,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...k,property:"padding-right"},{...k,property:"padding-left"}],bottomNavAlignment:{...k,property:"justify-content"},bottomNavGap:{...k,property:"gap"},navMarginBottom:{...N,property:"margin-bottom"},calendarPadding:[{...f,property:"padding-bottom"},{...f,property:"padding-right"},{...f,property:"padding-left"}],navBorderBottomWidth:{...N,property:"border-bottom-width"},navBorderBottomColor:{...N,property:"border-bottom-color"},navBorderBottomStyle:{...N,property:"border-bottom-style"},weekdayFontSize:{...D,property:"font-size"},weekdayFontWeight:{...D,property:"font-weight"},currentDayBorderColor:{...V,property:"border-color"},currentDayBorderWidth:{...V,property:"border-width"},currentDayBorderStyle:{...V,property:"border-style"},dayHeight:{...S,property:"height"},daySize:[{...x,property:"height"},{...x,property:"width"}],dayPadding:{...x,property:"padding"},dayRadius:{...x,property:"border-radius"},dayTextAlign:{...x,property:"text-align"},dayBlockAlign:{...x,property:"margin"},dayTextColor:{...x,property:"color"},dayFontWeight:{...x,property:"font-weight"},dayBackgroundColor:{...x,property:"background-color"},dayCursor:{...x,property:"cursor"},dayFontSize:{...x,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...M,property:"color"},daySelectedBackgroundColor:{...M,property:"background-color"},dayDisabledTextdColor:{...$,property:"color"},yearInputWidth:{...B,property:"width"},monthInputWidth:{...Y,property:"width"},navButtonSize:[{...E,property:"width"},{...E,property:"height"},{...L,property:"width"},{...L,property:"height"}],navButtonCursor:[{...E,property:"cursor"},{...L,property:"cursor"}],navButtonRotation:[{...A,property:"transform"},{...T,property:"transform"}],navButtonOpacity:[{...E,property:"opacity"},{...L,property:"opacity"}]}}),s.VO,s.tQ)(class extends w{static get observedAttributes(){return[].concat(w.observedAttributes||[],m,C)}preview;timestamp;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${g.J.cssVarList.horizontalPadding}: 0;\n ${g.J.cssVarList.verticalPadding}: 0;\n ${g.J.cssVarList.outlineWidth}: 0;\n }\n\n ${(0,o.Kl)()}\n </style>\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n <descope-icon></descope-icon>\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n <descope-icon></descope-icon>\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n `}set value(t){if(!t)return;const e=(0,l.Nq)(t).getTime();(0,l.xP)(e)&&e!==this.timestmap&&(this.timestamp=e,this.renderCalendar())}get value(){return this.timestamp?(0,l.Ey)(this.timestamp,h.wJ):""}get isSelectedView(){return y(this.preview,this.timestamp)}get isTodayView(){return y((0,l.Ln)(),this.preview)}get monthNames(){return(t=>{const e=t?.split(",");return p(e,12)?e:h.US})(this.getAttribute("calendar-months"))}get weekdayNames(){return(t=>{const e=t?.split?.(",");return p(e,7)?e:h.mx})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const t=this.getAttribute("years-range")?.split("-");if(2===t?.length){const[e,n]=t.map(Number);if(e<=n)return[e,n]}const e=(0,l.Nq)().getFullYear();return[e,e+h.V$]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",(()=>this.submitButton.removeAttribute("disabled"))),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const t=(()=>{const t=document.createElement("span");return t.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${u()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,t})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(t),this.monthInput=b(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=b(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach((t=>(0,i.EA)(this,t,{includeAttrs:["disabled","size","st-host-direction"]})))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach((t=>(0,i.EA)(this,t,{includeAttrs:["size"]}))),this.shadowRoot.querySelector(".nav-next descope-icon").innerHTML=d.ZM,this.shadowRoot.querySelector(".nav-prev descope-icon").innerHTML=d.i1}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:(0,l.Nq)(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.timestamp=""}updateInputs(){if(this.yearInput&&this.monthInput){const t=this.preview||(0,l.Ln)(),e=(0,l.Bl)(t),n=(0,l.tj)(t);this.monthInput.value=n,setTimeout((()=>{this.yearInput.baseElement.value=e}))}}renderCalendar(){const t=(0,l.Nq)(this.preview||(0,l.Ln)()).getTime(),[e,n]=(0,l.Pj)(t);this.calendar&&(this.calendar.innerHTML=((t,e,n)=>{const a=((t,e)=>new Date(t,e,0).getDate())(t,e),r=new Date(t,e-1,1).getDay();let i="<table>";i+=`<thead><tr>${n.reduce(((t,e)=>`${t}<th><span class="weekday">${e}</span></th>`),"")}</tr></thead>`,i+="<tbody>",i+="<tr>";for(let t=0;t<r;t++)i+="<td></td>";let o=r;for(let t=1;t<=a;t++)7===o&&(o=0,i+="</tr><tr>"),i+=`\n <td\n data-date-day="${t}"\n class="day-entry">\n <span class="day" data-date-day=${t}>\n ${t}\n </span>\n </td>\n `,o++;for(;o<7;)i+="<td></td>",o++;return i+="</tr></tbody></table>",i})(e,n,this.weekdayNames.map((t=>t.substring(0,3))))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach((t=>t.addEventListener("click",this.onDayChange.bind(this)))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(t){if(this.isDisabled)return;const e=(0,l.Nq)(this.preview);e.setDate(Number(t.target.getAttribute("data-date-day"))),this.value=(0,l.Ey)(e.getTime(),h.wJ),this.dispatchEvent(new CustomEvent("day-changed",{detail:e}))}onYearChange(t){if(!t.target.value)return;const e=(0,l.Nq)(this.preview);e.setFullYear(Number(t.target.value.trim())),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:e}))}onMonthChange(t){if(!t.target.value)return;const e=(0,l.Nq)(this.preview);e.setMonth(Number(t.target.value)-1),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:e}))}onYearInputBlur(t){this.yearInput.baseElement.value=t.target.value||(0,l.Bl)(this.preview)}onMonthInputBlur(t){this.monthInput.baseElement.value=t.target.value||(0,l.tj)(this.preview)}getSelectedDayEle(){const t=(0,l.Nq)(this.timestamp).getDate();return this.calendar?.querySelector(`[data-date-day="${t}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${(0,l._B)()}"]`)}clearSelectedDays(){const t=this.calendar?.querySelectorAll("[data-selected]");t&&t.forEach((t=>t.removeAttribute("data-selected")))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const t=this.getCurrentDayEle(),e=this.getAttribute("calendar-label-today")||h.QF;t.setAttribute("data-current-day","true"),t.setAttribute("title",e)}}navPrevMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.Nq)(t),n=e.getMonth();if(0===n){const t=e.getFullYear();e.setFullYear(t-1),e.setMonth(11)}else e.setMonth(n-1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,l.Nq)(t),n=e.getMonth();if(11===n){const t=e.getFullYear();e.setFullYear(t+1),e.setMonth(0)}else e.setMonth(n+1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}clearValue(){this.timestamp="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(t){if(this.value)return;const e=(0,l.Nq)(t).getTime();(0,l.xP)(e)?(this.timestamp=e,this.preview=e):this.clearValue()}onYearsRangeChange(){setTimeout((()=>{this.yearInput&&(this.yearInput.innerHTML=(t=>{const[e,n]=t,a=[];for(let t=e;t<=n;t++)a.push(t);return a})(this.yearsRange).map((t=>c({label:t,dataId:t,dataName:t}))).join(""))}))}onMonthNamesChange(){setTimeout((()=>{this.monthInput&&(this.monthInput.innerHTML=u(this.monthNames))}))}onSubmitLabelChange(t){this.submitButton&&(this.submitButton.textContent=t||h.Tv)}onCancelLabelChange(t){this.cancelButton&&(this.cancelButton.textContent=t||h.lv)}onInitialMonthChange(t){const e=(0,l.Bl)(this.preview);this.preview=(0,l.Nq)(`${e}/${t}/1`).getTime()}onInitialYearChange(t){const e=(0,l.tj)(this.preview);this.preview=(0,l.Nq)(`${t}/${e}/1`).getTime()}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),e!==n&&(C.includes(t)?("calendar-label-submit"===t&&this.onSubmitLabelChange(n),"calendar-label-cancel"===t&&this.onCancelLabelChange(n)):(n&&"initial-value"===t&&this.onInitialValueChange(n),n&&"initial-month"===t&&this.onInitialMonthChange(n),n&&"initial-year"===t&&this.onInitialYearChange(n),"years-range"===t&&this.onYearsRangeChange(Number(n)),"calendar-months"===t&&this.onMonthNamesChange(),"calendar-label-today"===t&&this.setCurrentDay(n),"disabled"===t&&setTimeout((()=>{this.cancelButton?.setAttribute("disabled","true"===n)})),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(v,I)},92386:(t,e,n)=>{n.d(e,{Bl:()=>c,Et:()=>i,Ey:()=>s,KQ:()=>d,Ln:()=>p,Nq:()=>l,Pj:()=>o,Xs:()=>b,_B:()=>y,tj:()=>u,xP:()=>r,y4:()=>h});var a=n(3591);const r=t=>!Number.isNaN(Number(t)),i=t=>!Number.isNaN(Number(t)),o=t=>{const e=new Date(t);return[e.getFullYear(),e.getMonth()+1,e.getDate()]},s=(t,e)=>{const[n,a,r]=o(t),i={DD:String(r).padStart(2,"0"),MM:String(a).padStart(2,"0"),YYYY:String(n)};return e.replace(/DD|MM|YYYY/g,(t=>i[t]))},l=t=>"number"==typeof t?new Date(t):"string"==typeof t?new Date(t.replace(/-/g,"/")):new Date,d=t=>a.xr.includes(t),h=(t,e,n)=>({refresh:n&&"r"===t.toLowerCase(),tab:"Tab"===t,shiftTab:e&&"Tab"===t,backspace:"Backspace"===t,arrowUp:!e&&"ArrowUp"===t,arrowDown:!e&&"ArrowDown"===t,arrowLeft:!e&&"ArrowLeft"===t,arrowRight:!e&&"ArrowRight"===t,pageUp:!e&&"PageUp"===t,pageDown:!e&&"PageDown"===t,shiftArrowUp:e&&"ArrowUp"===t,shiftArrowDown:e&&"ArrowDown"===t,shiftPageUp:e&&"PageUp"===t,shiftPageDown:e&&"PageDown"===t}),p=()=>l().getTime(),c=t=>l(t).getFullYear().toString(),u=t=>(l(t).getMonth()+1).toString(),y=()=>l().getDate(),b=t=>{const e=new CSSStyleSheet;e.insertRule(":host{display:block!important;}"),t?.shadowRoot?.adoptedStyleSheets?.push(e)}},23193:(t,e,n)=>{n.d(e,{ZM:()=>r,i1:()=>i,ki:()=>a});const a='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n',r='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',i='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'},55708:(t,e,n)=>{n.d(e,{S:()=>h,T:()=>l});var a=n(94619),r=n(70263),i=n(7138),o=n(14944),s=n(13390);const l=(0,o.xE)("icon");class d extends((0,r.q)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot></slot>\n\t"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(0,s.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}}))}}const h=(0,i.Zz)((0,a.RF)({mappings:{fill:{}}}),a.VO,a.tQ)(d)},13390:(t,e,n)=>{n.d(e,{w:()=>i});var a=n(25414);const r=t=>{const e=a.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),a=await n.text();e=r(a)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},21471:(t,e,n)=>{n.r(e),n.d(e,{IconClass:()=>a.S,componentName:()=>a.T});var a=n(55708);customElements.define(a.T,a.S)},33177:(t,e,n)=>{n.d(e,{$J:()=>c,I4:()=>o,Kl:()=>u,LJ:()=>p,Qv:()=>i,X6:()=>l,cy:()=>a,fu:()=>d,kG:()=>h,lS:()=>s,zm:()=>r});const a=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,o=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,h=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${o(t)}\n ${s(t)}\n ${i(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${h(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-hybrid-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7299,9894],{80230:(t,e,n)=>{n.r(e),n.d(e,{EmailFieldClass:()=>y,componentName:()=>g}),n(44085);var i=n(80704),r=n(57224);const o=r.AH`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7299],{80230:(e,t,n)=>{n.r(t),n.d(t,{EmailFieldClass:()=>y,componentName:()=>g}),n(44085);var i=n(80704),r=n(57224);const o=r.AH`
3
3
  :host([dir='rtl']) [part='input-field'] ::slotted(input) {
4
4
  --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
5
5
  }
@@ -7,7 +7,7 @@
7
7
  :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
8
8
  --_lumo-text-field-overflow-mask-image: none;
9
9
  }
10
- `;(0,r.SF)("vaadin-email-field",[i.k,o],{moduleId:"lumo-email-field"});var a=n(65211),l=n(10056);const p=n(44720).AH`
10
+ `;(0,r.SF)("vaadin-email-field",[i.k,o],{moduleId:"lumo-email-field"});var a=n(65211),s=n(10056);const l=n(44720).AH`
11
11
  :host([dir='rtl']) [part='input-field'] {
12
12
  direction: ltr;
13
13
  }
@@ -16,4 +16,4 @@
16
16
  direction: rtl;
17
17
  text-align: left;
18
18
  }
19
- `;(0,r.SF)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends l.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,a.X)(s);var d=n(94619),u=n(93826),c=n(7138),h=n(14944),m=n(33177);const g=(0,h.xE)("email-field"),y=(0,c.Zz)((0,d.RF)({mappings:u.A}),d.VO,(0,d.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,d.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.tQ,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((0,d.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${y.cssVarList.inputOutlineWidth}) + var(${y.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,m.$J)("vaadin-email-field")}\n\t\t\t${(0,m.cy)(y.cssVarList)}\n\t\t\t${(0,m.LJ)("vaadin-email-field",y.cssVarList)}\n ${(0,m.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:g}));customElements.define(g,y)},56614:(t,e,n)=>{n.r(e),n.d(e,{HybridFieldClass:()=>g,componentName:()=>d}),n(80230),n(96442),n(87743);var i=n(94619),r=n(70263),o=n(7138),a=n(14944);const l=/^\d+$/;var p=n(23758),s=n(96800);const d=(0,a.xE)("hybrid-field"),u={shared:["bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["label","placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","data-errormessage-value-missing-phone"],inputBox:["label","restrict-countries","default-code","phone-minlength","data-errormessage-value-missing-phone"]}},c={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},h="descope-phone-field",m=(0,r.q)({componentName:d,baseSelector:"div"}),g=(0,o.Zz)((0,i.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,i.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIcon},{selector:()=>s.Ul.componentName,property:s.Ul.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconSize},{selector:()=>s.Ul.componentName,property:s.Ul.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconPadding},{selector:()=>s.Ul.componentName,property:s.Ul.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconRepeat},{selector:()=>s.Ul.componentName,property:s.Ul.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconPosition},{selector:()=>s.Ul.componentName,property:s.Ul.cssVarList.errorMessageIconPosition}]}}),i.VO,i.tQ)(class extends m{#t=!1;#e;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n\t\t :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n } \n\t\t</style>\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true"></descope-phone-input-box-field>\n </div>\n\t\t`}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const t=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||t}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(t){this.handleActiveInput(t),this.activeInput.value=t}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise((t=>{const e=setInterval((()=>{this.emailInputEle&&(clearInterval(e),t())}))}))}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(h),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach((t=>{t.addEventListener("input",this.onValueChange.bind(this))}))}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",(()=>{this.emailInputEle.setAttribute("type","text")})),this.emailInputEle.addEventListener("blur",(()=>{setTimeout((()=>{this.emailInputEle.setAttribute("type","email")}))}))}overrideEmailSetAttribute(){const t=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(e,n)=>("type"!==e||"email"!==n||!this.emailInput.hasAttribute("focused"))&&t(e,n)}updateAttrs(){(0,a.EA)(this,this.emailInput,{includeAttrs:u.email,mapAttrs:c.email}),(0,a.EA)(this,this.phoneCountryCodeInput,{includeAttrs:u.phone.countryCode,mapAttrs:c.phone}),(0,a.EA)(this,this.phoneInputBoxInput,{includeAttrs:u.phone.inputBox,mapAttrs:c.phone}),this.inputs.forEach((t=>(0,a.EA)(this,t,{includeAttrs:u.shared}))),setTimeout((()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode)))}onValueChange(){this.#e=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInput.value)}handleActiveInput(t){const e=(t=>l.test(t.replaceAll("+","").replaceAll("-","")))(t)?this.phoneVariant:this.emailInput;this.activeInput!==e&&this.setActiveInput(e)}setActiveInput(t){const e=this.activeInput.value;this.activeInput=t,this.setActiveInputValue(e),this.#t&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout((()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#e,this.#e)}))}setActiveInputValue(t){const e=(t=>t.replace(/\+\d+-/,""))(t),n=this.activeInput.localName===h?`${this.phoneCountryCodeInput.countryCodeItems}-${e}`:e;this.activeInput.value=n}toggleInputVisibility(){this.inputs.forEach((t=>{t!==this.activeInput?t.classList.add("hidden"):t.classList.remove("hidden")}))}reportValidity(){this.#t=!0;const t=this.activeInputEle;return setTimeout((()=>{t.setSelectionRange?.(t.value.length,t.value.length)})),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(d,g)},23758:(t,e,n)=>{n.d(e,{NF:()=>E,TQ:()=>h});var i=n(32413),r=n(14944),o=n(7138),a=n(94619),l=n(69473),p=n(44976),s=n(44066),d=n(33177);const u=l.w.cssVarList,c=p.C.cssVarList,h=(0,r.xE)("phone-field"),{host:m,label:g,requiredIndicator:y,inputField:f,internalAfter:b,countryCodeInput:I,phoneInput:v,separator:x,errorMessage:w,helperText:C}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},E=(0,o.Zz)((0,a.RF)({mappings:{fontSize:[m,f,{selector:l.w.componentName,property:l.w.cssVarList.fontSize},{selector:p.C.componentName,property:p.C.cssVarList.fontSize}],fontFamily:[g,w,C,{...I,property:p.C.cssVarList.overlay.fontFamily}],hostWidth:[{...m,property:"width"},{...v,property:"width"},{...I,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...m,property:"direction"},inputBorderStyle:[{...b,property:"outline-style"},{...x,property:"border-left-style"}],inputBorderWidth:[{...b,property:"outline-width"},{...x,property:"border-left-width"}],inputBorderColor:[{...b,property:"outline-color"},{...x,property:"border-left-color"}],inputBorderRadius:[{...f,property:"border-radius"},{...b,property:"border-radius"}],countryCodeInputWidth:{...I,property:c.hostWidth},countryCodeDropdownWidth:{...I,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...v,property:"width"},horizontalPadding:[{...v,property:"padding-left"},{...v,property:"padding-right"},{...I,property:"padding-left"},{...I,property:"padding-right"}],labelTextColor:[{...g,property:"color"},{...y,property:"color"}],labelRequiredIndicator:{...y,property:"content"},errorMessageTextColor:{...w,property:"color"},errorMessageIcon:{...w,property:"background-image"},errorMessageIconSize:{...w,property:"background-size"},errorMessageIconPadding:{...w,property:"padding-inline-start"},errorMessageIconRepeat:{...w,property:"background-repeat"},errorMessageIconPosition:{...w,property:"background-position"},inputValueTextColor:[{...v,property:u.inputValueTextColor},{...I,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...v,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...f,property:"outline-style"},inputOutlineColor:{...f,property:"outline-color"},inputOutlineWidth:{...f,property:"outline-width"},inputOutlineOffset:{...f,property:"outline-offset"},valueInputHeight:[{...I,property:c.valueInputHeight}],valueInputMarginBottom:[{...v,property:u.valueInputMarginBottom}],marginInlineStart:[{...v,property:u.marginInlineStart},{...I,property:c.marginInlineStart}]}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return s.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${i.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.T),(0,r.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map((t=>t.getAttribute("data-country-code")))}}))((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,d.cy)(E.cssVarList)}\n\t\t\t${(0,d.I4)("vaadin-text-field")}\n\t\t\t${(0,d.kG)("vaadin-text-field")}\n\t\t\t${(0,d.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${E.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,d.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},96442:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>i.NF,componentName:()=>i.TQ}),n(54930),n(11738),n(89348);var i=n(23758);customElements.define(i.TQ,i.NF)},96800:(t,e,n)=>{n.d(e,{TQ:()=>u,Ul:()=>x});var i=n(43945),r=n(14944),o=n(7138),a=n(94619),l=n(69473),p=n(44066),s=n(33177);const d=l.w.cssVarList,u=(0,r.xE)("phone-input-box-field"),{host:c,label:h,inputElement:m,requiredIndicator:g,inputField:y,inputFieldInternal:f,phoneInput:b,errorMessage:I,helperText:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"> input:placeholder-shown"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},inputFieldInternal:{selector:()=>"descope-phone-field-internal-input-box vaadin-text-field::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.Zz)((0,a.RF)({mappings:{fontSize:[c,y,{selector:l.w.componentName,property:l.w.cssVarList.fontSize}],fontFamily:[h,I,v],hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:{...c,property:"direction"},inputBorderStyle:{...f,property:"border-style"},inputBorderWidth:{...f,property:"border-width"},inputBorderColor:{...f,property:"border-color"},inputBorderRadius:[{...y,property:"border-radius"},{...f,property:"border-radius"}],inputHorizontalPadding:[{...b,property:"padding-left"},{...b,property:"padding-right"}],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:[{...h,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...I,property:"color"},errorMessageIcon:{...I,property:"background-image"},errorMessageIconSize:{...I,property:"background-size"},errorMessageIconPadding:{...I,property:"padding-inline-start"},errorMessageIconRepeat:{...I,property:"background-repeat"},errorMessageIconPosition:{...I,property:"background-position"},inputValueTextColor:{...b,property:d.inputValueTextColor},inputPlaceholderTextColor:{...b,property:d.inputPlaceholderColor},inputOutlineStyle:{...y,property:"outline-style"},inputOutlineColor:{...y,property:"outline-color"},inputOutlineWidth:{...y,property:"outline-width"},inputOutlineOffset:{...y,property:"outline-offset"},labelPosition:{...h,property:"position"},labelTopPosition:{...h,property:"top"},labelHorizontalPosition:[{...h,property:"left"},{...h,property:"right"}],inputTransformY:{...h,property:"transform"},inputTransition:{...h,property:"transition"},marginInlineStart:{...h,property:"margin-inline-start"},valueInputHeight:{...m,property:"height"},valueInputMarginBottom:{selector:l.w.componentName,property:d.valueInputMarginBottom}}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return p.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${i.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.T),(0,r.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}}))((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,s.cy)(x.cssVarList)}\n ${(0,s.I4)("vaadin-text-field")}\n ${(0,s.kG)("vaadin-text-field")}\n ${(0,s.X6)()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n overflow: hidden;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box .separator {\n flex: 0;\n border: none;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${d.inputOutlineWidth}: 0;\n ${d.inputOutlineOffset}: 0;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${(0,s.$J)("vaadin-text-field")}\n ${(0,s.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:u}))},43945:(t,e,n)=>{n.d(e,{A:()=>d,T:()=>a});var i=n(25827),r=n(14944),o=n(63789);const a=(0,r.xE)("phone-field-internal-input-box"),l=["disabled","size","bordered","invalid","readonly","phone-input-placeholder","name","autocomplete","label-type","allow-alphanumeric-input"],p={"phone-input-placeholder":"placeholder"},s=(0,i.y)({componentName:a,baseSelector:"div"}),d=class extends s{static get observedAttributes(){return[].concat(s.observedAttributes||[],l)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return(0,o.Q)(this.getAttribute("default-code"))}get hasDefaultCode(){return!!this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const t=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(t,"")}`}return this.phoneNumberInput.value}set value(t){this.phoneNumberInput.value=t}get phoneNumberValue(){return this.phoneNumberInput.value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const t=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:t.length<this.minLength?{tooShort:!0}:t.length>this.maxLength?{tooLong:!0}:this.value&&!/^\+?\d{1,4}-?(?:\d-?){1,15}$/.test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{1===t.target.value.length&&"-"===t.target.value&&(t.target.value=""),t.target.value=t.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");let e=t.target.value;if(!this.allowAlphanumericInput){const n=/^[+\d-]+$/;e=t.target.value.split("").filter((t=>n.test(t))).join("")}t.target.value=e})),this.handleFocusEventsDispatching([this.phoneNumberInput])}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n&&l.includes(t)){const e=p[t]||t;this.phoneNumberInput.setAttribute(e,n)}}}},46633:(t,e,n)=>{n.r(e),n(89348);var i=n(43945);customElements.define(i.T,i.A)},87743:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldInputBoxClass:()=>i.Ul,componentName:()=>i.TQ}),n(46633),n(11738),n(89348);var i=n(96800);customElements.define(i.TQ,i.Ul)},63789:(t,e,n)=>{n.d(e,{Q:()=>r});var i=n(44066);const r=t=>i.A.find((e=>e.code===t))?.dialCode}}]);
19
+ `;(0,r.SF)("vaadin-email-field",l,{moduleId:"vaadin-email-field-styles"});class p extends s.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,a.X)(p);var u=n(94619),d=n(93826),h=n(7138),c=n(14944),m=n(33177);const g=(0,c.xE)("email-field"),y=(0,h.Zz)((0,u.RF)({mappings:d.A}),u.VO,(0,u.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,u.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),u.tQ,(e=>class extends e{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((0,u.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${y.cssVarList.inputOutlineWidth}) + var(${y.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,m.$J)("vaadin-email-field")}\n\t\t\t${(0,m.cy)(y.cssVarList)}\n\t\t\t${(0,m.LJ)("vaadin-email-field",y.cssVarList)}\n ${(0,m.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:g}));customElements.define(g,y)},56614:(e,t,n)=>{n.r(t),n.d(t,{HybridFieldClass:()=>g,componentName:()=>u}),n(80230),n(96442),n(87743);var i=n(94619),r=n(70263),o=n(7138),a=n(14944);const s=/^\d+$/;var l=n(23758),p=n(96800);const u=(0,a.xE)("hybrid-field"),d={shared:["bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["label","placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","data-errormessage-value-missing-phone"],inputBox:["label","restrict-countries","default-code","phone-minlength","data-errormessage-value-missing-phone"]}},h={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},c="descope-phone-field",m=(0,r.q)({componentName:u,baseSelector:"div"}),g=(0,o.Zz)((0,i.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,i.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIcon},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconSize},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconPadding},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconRepeat},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconPosition},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconPosition}]}}),i.VO,i.tQ)(class extends m{#e=!1;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t<style>\n\t\t :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n } \n\t\t</style>\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true"></descope-phone-input-box-field>\n </div>\n\t\t`}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const e=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||e}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(e){this.handleActiveInput(e),this.activeInput.value=e}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise((e=>{const t=setInterval((()=>{this.emailInputEle&&(clearInterval(t),e())}))}))}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(c),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach((e=>{e.addEventListener("input",this.onValueChange.bind(this))}))}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",(()=>{this.emailInputEle.setAttribute("type","text")})),this.emailInputEle.addEventListener("blur",(()=>{setTimeout((()=>{this.emailInputEle.setAttribute("type","email")}))}))}overrideEmailSetAttribute(){const e=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(t,n)=>("type"!==t||"email"!==n||!this.emailInput.hasAttribute("focused"))&&e(t,n)}updateAttrs(){(0,a.EA)(this,this.emailInput,{includeAttrs:d.email,mapAttrs:h.email}),(0,a.EA)(this,this.phoneCountryCodeInput,{includeAttrs:d.phone.countryCode,mapAttrs:h.phone}),(0,a.EA)(this,this.phoneInputBoxInput,{includeAttrs:d.phone.inputBox,mapAttrs:h.phone}),this.inputs.forEach((e=>(0,a.EA)(this,e,{includeAttrs:d.shared}))),setTimeout((()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode)))}onValueChange(){this.#t=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInput.value)}handleActiveInput(e){const t=(e=>s.test(e.replaceAll("+","").replaceAll("-","")))(e)?this.phoneVariant:this.emailInput;this.activeInput!==t&&this.setActiveInput(t)}setActiveInput(e){const t=this.activeInput.value;this.activeInput=e,this.setActiveInputValue(t),this.#e&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout((()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#t,this.#t)}))}setActiveInputValue(e){const t=(e=>e.replace(/\+\d+-/,""))(e),n=this.activeInput.localName===c?`${this.phoneCountryCodeInput.countryCodeItems}-${t}`:t;this.activeInput.value=n}toggleInputVisibility(){this.inputs.forEach((e=>{e!==this.activeInput?e.classList.add("hidden"):e.classList.remove("hidden")}))}reportValidity(){this.#e=!0;const e=this.activeInputEle;return setTimeout((()=>{e.setSelectionRange?.(e.value.length,e.value.length)})),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(u,g)},96800:(e,t,n)=>{n.d(t,{TQ:()=>d,Ul:()=>x});var i=n(43945),r=n(14944),o=n(7138),a=n(94619),s=n(69473),l=n(44066),p=n(33177);const u=s.w.cssVarList,d=(0,r.xE)("phone-input-box-field"),{host:h,label:c,inputElement:m,requiredIndicator:g,inputField:y,inputFieldInternal:f,phoneInput:I,errorMessage:b,helperText:v}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"> input:placeholder-shown"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},inputFieldInternal:{selector:()=>"descope-phone-field-internal-input-box vaadin-text-field::part(input-field)"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.Zz)((0,a.RF)({mappings:{fontSize:[h,y,{selector:s.w.componentName,property:s.w.cssVarList.fontSize}],fontFamily:[c,b,v],hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},hostDirection:{...h,property:"direction"},inputBorderStyle:{...f,property:"border-style"},inputBorderWidth:{...f,property:"border-width"},inputBorderColor:{...f,property:"border-color"},inputBorderRadius:[{...y,property:"border-radius"},{...f,property:"border-radius"}],inputHorizontalPadding:[{...I,property:"padding-left"},{...I,property:"padding-right"}],labelFontSize:{...c,property:"font-size"},labelFontWeight:{...c,property:"font-weight"},labelTextColor:[{...c,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...b,property:"color"},errorMessageIcon:{...b,property:"background-image"},errorMessageIconSize:{...b,property:"background-size"},errorMessageIconPadding:{...b,property:"padding-inline-start"},errorMessageIconRepeat:{...b,property:"background-repeat"},errorMessageIconPosition:{...b,property:"background-position"},inputValueTextColor:{...I,property:u.inputValueTextColor},inputPlaceholderTextColor:{...I,property:u.inputPlaceholderColor},inputOutlineStyle:{...y,property:"outline-style"},inputOutlineColor:{...y,property:"outline-color"},inputOutlineWidth:{...y,property:"outline-width"},inputOutlineOffset:{...y,property:"outline-offset"},labelPosition:{...c,property:"position"},labelTopPosition:{...c,property:"top"},labelHorizontalPosition:[{...c,property:"left"},{...c,property:"right"}],inputTransformY:{...c,property:"transform"},inputTransition:{...c,property:"transition"},marginInlineStart:{...c,property:"margin-inline-start"},valueInputHeight:{...m,property:"height"},valueInputMarginBottom:{selector:s.w.componentName,property:u.valueInputMarginBottom}}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(e=>class extends e{static get CountryCodes(){return l.A}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${i.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.T),(0,r.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}}))((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,p.cy)(x.cssVarList)}\n ${(0,p.I4)("vaadin-text-field")}\n ${(0,p.kG)("vaadin-text-field")}\n ${(0,p.X6)()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n overflow: hidden;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box .separator {\n flex: 0;\n border: none;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${u.inputOutlineWidth}: 0;\n ${u.inputOutlineOffset}: 0;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] input:placeholder-shown {\n opacity: 0;\n }\n\n ${(0,p.$J)("vaadin-text-field")}\n ${(0,p.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}))},43945:(e,t,n)=>{n.d(t,{A:()=>u,T:()=>a});var i=n(25827),r=n(14944),o=n(63789);const a=(0,r.xE)("phone-field-internal-input-box"),s=["disabled","size","bordered","invalid","readonly","phone-input-placeholder","name","autocomplete","label-type","allow-alphanumeric-input"],l={"phone-input-placeholder":"placeholder"},p=(0,i.y)({componentName:a,baseSelector:"div"}),u=class extends p{static get observedAttributes(){return[].concat(p.observedAttributes||[],s)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return(0,o.Q)(this.getAttribute("default-code"))}get hasDefaultCode(){return!!this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const e=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(e,"")}`}return this.phoneNumberInput.value}set value(e){this.phoneNumberInput.value=e}get phoneNumberValue(){return this.phoneNumberInput.value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const e=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:e.length<this.minLength?{tooShort:!0}:e.length>this.maxLength?{tooLong:!0}:this.value&&!/^\+?\d{1,4}-?(?:\d-?){1,15}$/.test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(e){return this.countryCodeInput.items?.find((t=>t.getAttribute("data-country-code")===e))}initInputs(){this.phoneNumberInput.addEventListener("input",(e=>{1===e.target.value.length&&"-"===e.target.value&&(e.target.value=""),e.target.value=e.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");let t=e.target.value;if(!this.allowAlphanumericInput){const n=/^[+\d-]+$/;t=e.target.value.split("").filter((e=>n.test(e))).join("")}e.target.value=t})),this.handleFocusEventsDispatching([this.phoneNumberInput])}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),t!==n&&s.includes(e)){const t=l[e]||e;this.phoneNumberInput.setAttribute(t,n)}}}},46633:(e,t,n)=>{n.r(t),n(89348);var i=n(43945);customElements.define(i.T,i.A)},87743:(e,t,n)=>{n.r(t),n.d(t,{PhoneFieldInputBoxClass:()=>i.Ul,componentName:()=>i.TQ}),n(46633),n(11738),n(89348);var i=n(96800);customElements.define(i.TQ,i.Ul)},63789:(e,t,n)=>{n.d(t,{Q:()=>r});var i=n(44066);const r=e=>i.A.find((t=>t.code===e))?.dialCode}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3359],{62051:(t,e,n)=>{var i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,p=u||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,h=Math.min,f=function(){return p.Date.now()};function v(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function g(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==c.call(t)}(t))return NaN;if(v(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=v(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=s.test(t);return n||a.test(t)?o(t.slice(2),n?2:8):r.test(t)?NaN:+t}t.exports=function(t,e,n){var i,r,s,a,o,u,l=0,p=!1,c=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function b(e){var n=i,s=r;return i=r=void 0,l=e,a=t.apply(s,n)}function m(t){var n=t-u;return void 0===u||n>=e||n<0||c&&t-l>=s}function x(){var t=f();if(m(t))return I(t);o=setTimeout(x,function(t){var n=e-(t-u);return c?h(n,s-(t-l)):n}(t))}function I(t){return o=void 0,y&&i?b(t):(i=r=void 0,a)}function w(){var t=f(),n=m(t);if(i=arguments,r=this,u=t,n){if(void 0===o)return function(t){return l=t,o=setTimeout(x,e),p?b(t):a}(u);if(c)return o=setTimeout(x,e),b(u)}return void 0===o&&(o=setTimeout(x,e)),a}return e=g(e)||0,v(n)&&(p=!!n.leading,s=(c="maxWait"in n)?d(g(n.maxWait)||0,e):s,y="trailing"in n?!!n.trailing:y),w.cancel=function(){void 0!==o&&clearTimeout(o),l=0,i=u=r=o=void 0},w.flush=function(){return void 0===o?a:I(f())},w}},25827:(t,e,n)=>{"use strict";n.d(e,{y:()=>a});var i=n(7138),r=n(94619),s=n(70263);const a=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,s.q)(...t))},45002:(t,e,n)=>{"use strict";n.d(e,{A:()=>d,T:()=>u});var i=n(62051),r=n.n(i),s=n(25827),a=n(14944),o=n(10754);const u=(0,a.xE)("passcode-internal"),l=["digits","loading"],p=["disabled","bordered","size","invalid","readonly","aria-labelledby"],c=(0,s.y)({componentName:u,baseSelector:"div"}),d=class extends c{static get observedAttributes(){return l.concat(c.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,o.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,o.pW)(e)}parseInputValue(t,e=""){const n=e.split("");n.length?this.fillDigits(n,t):t.value=""}initInputs(){this.inputs.forEach((t=>{t.shadowRoot.appendChild((0,o.Yr)());const e=r()((e=>{this.parseInputValue(t,e),(0,o.Z)(t)}),20,{trailing:!0});t.addEventListener("input",(n=>{t.value=(0,o.zj)(t.value),t.value&&(0,o.Z)(t,t.value[0]),setTimeout((()=>{"deleteContentBackward"===n?.inputType&&(0,o.pW)(this.getPrevInput(t))})),e(t.value)})),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout((()=>(0,o.pW)(this.getPrevInput(t))),0):1===e.length&&(t.value="")},(0,a.EA)(this,t,{includeAttrs:p}),t.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&l.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},10754:(t,e,n)=>{"use strict";n.d(e,{Yr:()=>u,Z:()=>l,pW:()=>a,zj:()=>o});const i="--descope-input-mask-content",r="--descope-input-mask-display",s="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},o=t=>t.replace(/\D/g,"")||"",u=()=>{const t=document.createElement("style");return t.id="input-mask",t.innerHTML=`vaadin-text-field::part(input-field)::before {\n ${s}: '';\n content: var(${i}, var(${s}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${r}, none);\n align-items: center;\n justify-content: center;\n }`,t},l=(t,e)=>{e?(t.style.setProperty(i,`"${e}"`),t.style.setProperty(r,"flex")):(t.style.removeProperty(i),t.style.removeProperty(r))}},81443:(t,e,n)=>{"use strict";n.r(e);var i=n(45002);customElements.define(i.T,i.A)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3359],{25827:(t,e,n)=>{n.d(e,{y:()=>a});var i=n(7138),s=n(94619),r=n(70263);const a=(...t)=>(0,i.Zz)(s.XX,s._$,s.yF,s.jd)((0,r.q)(...t))},45002:(t,e,n)=>{n.d(e,{A:()=>c,T:()=>o});var i=n(62051),s=n.n(i),r=n(25827),a=n(14944),l=n(10754);const o=(0,a.xE)("passcode-internal"),p=["digits","loading"],u=["disabled","bordered","size","invalid","readonly","aria-labelledby"],d=(0,r.y)({componentName:o,baseSelector:"div"}),c=class extends d{static get observedAttributes(){return p.concat(d.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,l.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,l.pW)(e)}parseInputValue(t,e=""){const n=e.split("");n.length?this.fillDigits(n,t):t.value=""}initInputs(){this.inputs.forEach((t=>{t.shadowRoot.appendChild((0,l.Yr)());const e=s()((e=>{this.parseInputValue(t,e),(0,l.Z)(t)}),20,{trailing:!0});t.addEventListener("input",(n=>{t.value=(0,l.zj)(t.value),t.value&&(0,l.Z)(t,t.value[0]),setTimeout((()=>{"deleteContentBackward"===n?.inputType&&(0,l.pW)(this.getPrevInput(t))})),e(t.value)})),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout((()=>(0,l.pW)(this.getPrevInput(t))),0):1===e.length&&(t.value="")},(0,a.EA)(this,t,{includeAttrs:u}),t.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&p.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},10754:(t,e,n)=>{n.d(e,{Yr:()=>o,Z:()=>p,pW:()=>a,zj:()=>l});const i="--descope-input-mask-content",s="--descope-input-mask-display",r="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},l=t=>t.replace(/\D/g,"")||"",o=()=>{const t=document.createElement("style");return t.id="input-mask",t.innerHTML=`vaadin-text-field::part(input-field)::before {\n ${r}: '';\n content: var(${i}, var(${r}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${s}, none);\n align-items: center;\n justify-content: center;\n }`,t},p=(t,e)=>{e?(t.style.setProperty(i,`"${e}"`),t.style.setProperty(s,"flex")):(t.style.removeProperty(i),t.style.removeProperty(s))}},81443:(t,e,n)=>{n.r(e);var i=n(45002);customElements.define(i.T,i.A)}}]);