@descope/web-components-ui 1.0.353 → 1.0.354

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/4978.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{33346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),n=s(30357),r=s(33038),a=s(12666),o=s(28084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,a._,o.Q,r.k)(s)}},65279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},54567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>c,iY:()=>h,oP:()=>u,tg:()=>l});var i=s(2061),n=s(65279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),c=(...t)=>`--${(0,i.E3)(...t)}`,u=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,_k:()=>l,lo:()=>o,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0},l=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},37878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},86557:(t,e,s)=>{s.d(e,{l:()=>n});var i=s(37878);const n=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},30357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},33038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},20370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(33346),n=s(2061),r=s(54567),a=s(37878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#n=a.C.bind(this,"blur");#r=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,n.mf)(o)?o():o)||""}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#n()})),this.baseElement.addEventListener("focus",(t=>{this.#r()})),(0,r.Db)(this.baseElement,this,c),(0,r.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},74814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),n=s(54567);class r{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new r;return Object.keys(s).forEach((r=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(r,s[r]),l=(0,n.Tk)(t,r);o.forEach((({selector:t,property:s,important:n,fallback:r})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,r)+(n?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(65279),n=s(2061),r=s(54567),a=s(25561),o=s(74814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#h=s,this.#c=r,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#c]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#u.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#u.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,n.E3)(l,this.#h),this.#d,t),this.#u.prepend(e)}}#S(t){(this.#u.classList||this.#u.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#S(l),this.#A(),this.#E(),this.#v(),(0,r.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},95579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#w=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#w=document.createElement("style"),this.#w.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#w):this.#w.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#M("true"===s)}}},12666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},94978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>r.D,Iw:()=>c.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>n.e,li:()=>u.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),n=s(95579),r=s(20370),a=s(15584),o=s(30357),l=s(12666),h=s(89894),c=s(19772),u=s(86557),d=s(28084),m=s(61534)},61534:(t,e,s)=>{s.d(e,{m:()=>n});var i=s(37878);const n=t=>class extends t{init(){this.#C(),super.init?.()}#C(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},89894:(t,e,s)=>{s.d(e,{w:()=>r}),s(95910);const i=["required","pattern"],n=Symbol("validationTarget"),r=t=>class extends t{#T=n;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#x;get internals(){return this.#x}set internals(t){this.#x=t}constructor(){super(),this.#x=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#L(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.#T===n?this.inputElement:this.#T}set validationTarget(t){this.#T=t}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#L())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#L()}init(){super.init?.(),this.addEventListener("change",this.#L),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#L),setTimeout((()=>this.#L()))}}},28084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(54567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},19772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(65279),n=s(2061),r=s(54567),a=s(9129),o=s(74814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:c=!0}={}})=>u=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(u);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,n.E3)(u.componentName,"_"+d),s)}}#k;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#V(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[c?"includeAttrs":"excludeAttrs"]:h}),this.#V()}}}},15584:(t,e,s)=>{s.d(e,{d:()=>u});var i=s(2061),n=s(54567),r=s(37878),a=s(9129),o=s(89894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>c=>class extends((0,o.w)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#$;#s=r.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=h(t)||h(e),this.#$}set inputElement(t){this.#$=t}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()})),t.forEach((t=>{const s=e?[this.baseElement].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...s],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,n.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},u=t=>(0,i.qC)(c(t),(0,a.y)({componentNameOverride:(0,n.iY)("input-wrapper")}))}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{33346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),r=s(30357),n=s(33038),a=s(12666),o=s(28084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(r.A,a._,o.Q,n.k)(s)}},65279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>r,qM:()=>a,qg:()=>n});const i="descope",r=3,n="host",a="@"},54567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>n,P$:()=>a,Tk:()=>c,iY:()=>h,oP:()=>u,tg:()=>l});var i=s(2061),r=s(65279);const n=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const r=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(r),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const r=s[i]||i,n=t.getAttribute(i);null!==n?e.getAttribute(r)!==n&&e.setAttribute(r,n):e.removeAttribute(r)}))},l=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},h=t=>(0,i.E3)(r.gh,t),c=(...t)=>`--${(0,i.E3)(...t)}`,u=(t,e,s={})=>{n(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>r,GL:()=>i,_k:()=>l,lo:()=>o,mf:()=>a,qC:()=>n});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),r=(...t)=>i(t.filter((t=>!!t)).join("-")),n=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0},l=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},37878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},86557:(t,e,s)=>{s.d(e,{l:()=>r});var i=s(37878);const r=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},30357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},33038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},20370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(33346),r=s(2061),n=s(54567),a=s(37878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#r=a.C.bind(this,"blur");#n=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,r.mf)(o)?o():o)||""}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#n()})),(0,n.Db)(this.baseElement,this,c),(0,n.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},74814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),r=s(54567);class n{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new n;return Object.keys(s).forEach((n=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(n,s[n]),l=(0,r.Tk)(t,n);o.forEach((({selector:t,property:s,important:r,fallback:n})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,n)+(r?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(65279),r=s(2061),n=s(54567),a=s(25561),o=s(74814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:n=i.qg,baseSelector:a}={}){super(),this.#h=s,this.#c=n,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,r.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#c]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#u.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#u.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,n.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,r.E3)(l,this.#h),this.#d,t),this.#u.prepend(e)}}#S(t){(this.#u.classList||this.#u.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#S(l),this.#A(),this.#E(),this.#v(),(0,n.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},95579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#M=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#M=document.createElement("style"),this.#M.innerText="* { cursor: inherit!important }"}#w(t){t?this.shadowRoot.appendChild(this.#M):this.#M.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#w("true"===s)}}},12666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},94978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>n.D,Iw:()=>c.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>r.e,li:()=>u.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),r=s(95579),n=s(20370),a=s(15584),o=s(30357),l=s(12666),h=s(89894),c=s(19772),u=s(86557),d=s(28084),m=s(61534)},61534:(t,e,s)=>{s.d(e,{m:()=>r});var i=s(37878);const r=t=>class extends t{init(){this.#C(),super.init?.()}#C(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},89894:(t,e,s)=>{s.d(e,{w:()=>n}),s(95910);const i=["required","pattern"],r=Symbol("validationTarget"),n=t=>class extends t{#T=r;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#x;get internals(){return this.#x}set internals(t){this.#x=t}constructor(){super(),this.#x=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:r,tooShort:n,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||r||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case i:return this.getAttribute("data-errormessage-type-mismatch")||this.defaultErrorMsgTypeMismatch;case n:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#L(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.#T===r?this.inputElement:this.#T}set validationTarget(t){this.#T=t}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#L())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#L()}init(){super.init?.(),this.addEventListener("change",this.#L),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#L),setTimeout((()=>this.#L()))}}},28084:(t,e,s)=>{s.d(e,{Q:()=>n});var i=s(54567);const r=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],n=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>r.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},19772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(65279),r=s(2061),n=s(54567),a=s(9129),o=s(74814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:c=!0}={}})=>u=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(u);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,r.E3)(u.componentName,"_"+d),s)}}#k;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#V(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,n.oP)(this,t,{[c?"includeAttrs":"excludeAttrs"]:h}),this.#V()}}}},15584:(t,e,s)=>{s.d(e,{d:()=>u});var i=s(2061),r=s(54567),n=s(37878),a=s(9129),o=s(89894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>c=>class extends((0,o.w)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#$;#s=n.C.bind(this,"change");constructor(){super(),this.#$=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#$&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#$)return this.#$;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#$=h(t)||h(e),this.#$}set inputElement(t){this.#$=t}getValidity(){return this.inputElement?.validity||{}}#N(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#N(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#N()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#N()})),t.forEach((t=>{const s=e?[this.baseElement].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...s],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},u=t=>(0,i.qC)(c(t),(0,a.y)({componentNameOverride:(0,r.iY)("input-wrapper")}))}}]);