@mattilsynet/design 1.0.2 → 1.0.3

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.
@@ -1,8 +1,8 @@
1
- var mtds=function(x){"use strict";const Mt="_alert_1ytj6_1 _ds-alert_z5gp5_1",Dt="_avatar_1ytj6_1 _ds-avatar_z5gp5_1",Pt="_badge_1ytj6_1",Rt="_breadcrumbs_1ytj6_1 _ds-breadcrumbs_z5gp5_1",Ht="_button_1ytj6_1 _ds-button_z5gp5_1",jt="_card_1ytj6_1",Nt="_info_1ytj6_1",Bt="_group_1ytj6_1",Ft="_chip_1ytj6_1 _ds-chip_z5gp5_1",Ut="_details_1ytj6_1 _ds-details_z5gp5_1",Vt="_dialog_1ytj6_1 _ds-dialog_z5gp5_1",zt="_divider_1ytj6_1",Yt="_errorsummary_1ytj6_1 _ds-error-summary_z5gp5_1",Kt="__errorsummary_1ytj6_1",Wt="_field_1ytj6_1 _ds-field_z5gp5_1",Xt="_affixes_1ytj6_1 _ds-field-affixes_z5gp5_1",qt="_fieldset_1ytj6_1 _ds-fieldset_z5gp5_1",Gt="_helptext_1ytj6_1 _ds-focus_z5gp5_1",Qt="_input_1ytj6_1 _ds-input_z5gp5_1",Jt="_app_1ytj6_1",Zt="_grid_1ytj6_1",te="_flex_1ytj6_1",ee="_link_1ytj6_1",ne="_logo_1ytj6_1",oe="_pagination_1ytj6_1 _ds-pagination_z5gp5_1",ie="_popover_1ytj6_1",se="_skeleton_1ytj6_1 _ds-skeleton_z5gp5_1",re="__skeleton_1ytj6_1",ae="_spinner_1ytj6_1",le="_table_1ytj6_1 _ds-table_z5gp5_1",ue="__scrollShadow_1ytj6_1",ce="_tabs_1ytj6_1 _ds-tabs_z5gp5_1",de="_tag_1ytj6_1 _ds-tag_z5gp5_1",fe="__tooltip_1ytj6_1",pe="_heading_1ytj6_1 _ds-heading_z5gp5_1",he="_prose_1ytj6_1",_e="_validation_1ytj6_1 _ds-validation-message_z5gp5_1",me="_body_1ytj6_108",g={alert:Mt,avatar:Dt,badge:Pt,breadcrumbs:Rt,button:Ht,card:jt,info:Nt,group:Bt,chip:Ft,details:Ut,dialog:Vt,divider:zt,errorsummary:Yt,_errorsummary:Kt,field:Wt,affixes:Xt,fieldset:qt,helptext:Gt,input:Qt,app:Jt,grid:Zt,flex:te,link:ee,logo:ne,pagination:oe,popover:ie,skeleton:se,_skeleton:re,spinner:ae,table:le,_scrollShadow:ue,tabs:ce,tag:de,_tooltip:fe,heading:pe,prose:he,validation:_e,body:me},Pn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:Kt,_scrollShadow:ue,_skeleton:re,_tooltip:fe,affixes:Xt,alert:Mt,app:Jt,avatar:Dt,badge:Pt,body:me,breadcrumbs:Rt,button:Ht,card:jt,chip:Ft,default:g,details:Ut,dialog:Vt,divider:zt,errorsummary:Yt,field:Wt,fieldset:qt,flex:te,grid:Zt,group:Bt,heading:pe,helptext:Gt,info:Nt,input:Qt,link:ee,logo:ne,pagination:oe,popover:ie,prose:he,skeleton:se,spinner:ae,table:le,tabs:ce,tag:de,validation:_e},Symbol.toStringTag,{value:"Module"})),Rn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),s=Array.from({length:r+1-i},(a,u)=>u+i);return n>4&&i>1&&s.splice(0,2,1,0),n>3&&r<e&&s.splice(-2,2,0,e),s},Hn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Rn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),P=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function f(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let jn=0;const Nn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${Nn}${++jn}`),t.id}const ve=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},b=(t,...e)=>ve("add",t,e),L=(t,...e)=>ve("remove",t,e),W=new Map,E=P?document.createElement("div"):null;E&&f(E,"style","position:absolute;padding:1px;top:0;left:0px"),P&&b(window,"load,resize,scroll",()=>{for(const[t,e]of W)e()},v);const A={top:0,right:1,bottom:2,left:3};function H(t,e,n){var Dn;if(e===!1||!e.isConnected||!t.isConnected)return W.delete(t);if(E!=null&&E.isConnected||document.body.append(E||""),!W.has(t)){const hi=A[n]??A.bottom;return(Dn=W.set(t,()=>H(t,e,hi)).get(t))==null?void 0:Dn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:r,offsetHeight:s}=e,{width:a,height:u,left:l,top:c}=e.getBoundingClientRect(),h=Math.round(l-(r-a)/2),m=Math.round(c-(s-u)/2),S=h-o>0,Ot=r+r+o<window.innerWidth,D=m-i>0,rt=m+s+i<window.innerHeight,_=n===A.bottom&&Ot||!S,Y=n===A.bottom&&rt||!D,K=Math.min(Math.max(10,h-(o-r)/2),window.innerWidth-o-10),at=Math.min(Math.max(10,m-(i-s)/2),window.innerHeight-i-10),lt=n===A.top||n===A.bottom;t.style.left=`${Math.round(lt?K:_?h+r:h-o)}px`,t.style.top=`${Math.round(lt?Y?m+s:m-i:at)}px`,E==null||E.style.setProperty("translate",`${Math.round(window.scrollX+h+r+o+30)} ${Math.round(window.scrollY+m+s+i+30)}px`)}function Bn(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const X=new WeakMap,Fn=t=>{var n;const e=X.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),X.delete(t);else for(const[,o]of e.collections)o()},T=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=X.get(t);i||(i={collections:new Map,observer:Bn(()=>Fn(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),X.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e)},ut=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Un=g._tooltip.split(" "),ge="aria-describedby",be="Escape",q="aria-labelledby",Vn="--mtds-tooltip-position",zn=300,G="mtds-tooltip";let $=null,ye=Number.NEGATIVE_INFINITY,Ee=0,y=null;function ct({target:t,type:e,key:n}){if(e==="keydown"&&n!==be)return;const o=ye+zn-Date.now();clearTimeout(Ee),Ee=setTimeout(Yn,Math.max(o,0),n===be?null:t)}function Yn(t){var a;if(ye=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===$)return;const n=e&&f(e,"data-tooltip")||"",o=e&&f(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(Vn)||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const r=$&&f($,q)===G,s=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(q))||(e==null?void 0:e.hasAttribute("aria-label"));$==null||$.removeAttribute(r?q:ge),H(y,!1),$=e,$&&f($,s?ge:q,G),y.togglePopover(!!e),H(y,e||!1,o)}P&&!document.getElementById(G)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...Un),y.id=G,f(y,"popover","manual"),b(document,"blur,focus,mouseout,mouseover",ct,v),b(window,"keydown",ct,v),b(window,"blur",ct,v));var $e=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Te;$e&&/^Mac/i.test(((Te=navigator.userAgentData)==null?void 0:Te.platform)||navigator.platform);var Kn=":host(:not([hidden])) { display: block }",we=typeof HTMLElement>"u"?class{}:HTMLElement;function I(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Se=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ie=(t,...e)=>Se("add",t,e),Ce=(t,...e)=>Se("remove",t,e),Wn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Xn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))I(o,i,r);return o},xe={define:(t,e)=>!$e||window.customElements.get(t)||window.customElements.define(t,e)},qn=class extends we{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(dt("slot",null,{name:"summary"}),dt("slot",null,{part:"details-content"}),dt("style",`${Kn}
1
+ var mtds=function(x){"use strict";const Mt="_alert_cq24j_1 _ds-alert_z5gp5_1",Dt="_avatar_cq24j_1 _ds-avatar_z5gp5_1",Pt="_badge_cq24j_1",Rt="_breadcrumbs_cq24j_1 _ds-breadcrumbs_z5gp5_1",Ht="_button_cq24j_1 _ds-button_z5gp5_1",jt="_card_cq24j_1",Nt="_info_cq24j_1",Bt="_group_cq24j_1",qt="_chip_cq24j_1 _ds-chip_z5gp5_1",Ft="_details_cq24j_1 _ds-details_z5gp5_1",Ut="_dialog_cq24j_1 _ds-dialog_z5gp5_1",Vt="_divider_cq24j_1",zt="_errorsummary_cq24j_1 _ds-error-summary_z5gp5_1",Yt="__errorsummary_cq24j_1",Kt="_field_cq24j_1 _ds-field_z5gp5_1",Wt="_affixes_cq24j_1 _ds-field-affixes_z5gp5_1",Xt="_fieldset_cq24j_1 _ds-fieldset_z5gp5_1",Gt="_helptext_cq24j_1 _ds-focus_z5gp5_1",Qt="_input_cq24j_1 _ds-input_z5gp5_1",Jt="_app_cq24j_1",Zt="_grid_cq24j_1",te="_flex_cq24j_1",ee="_link_cq24j_1",ne="_logo_cq24j_1",oe="_pagination_cq24j_1 _ds-pagination_z5gp5_1",ie="_popover_cq24j_1",se="_skeleton_cq24j_1 _ds-skeleton_z5gp5_1",re="__skeleton_cq24j_1",ae="_spinner_cq24j_1",le="_table_cq24j_1 _ds-table_z5gp5_1",ce="__scrollShadow_cq24j_1",ue="_tabs_cq24j_1 _ds-tabs_z5gp5_1",de="_tag_cq24j_1 _ds-tag_z5gp5_1",fe="__tooltip_cq24j_1",pe="_heading_cq24j_1 _ds-heading_z5gp5_1",he="_prose_cq24j_1",_e="_validation_cq24j_1 _ds-validation-message_z5gp5_1",me="_body_cq24j_109",b={alert:Mt,avatar:Dt,badge:Pt,breadcrumbs:Rt,button:Ht,card:jt,info:Nt,group:Bt,chip:qt,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,_errorsummary:Yt,field:Kt,affixes:Wt,fieldset:Xt,helptext:Gt,input:Qt,app:Jt,grid:Zt,flex:te,link:ee,logo:ne,pagination:oe,popover:ie,skeleton:se,_skeleton:re,spinner:ae,table:le,_scrollShadow:ce,tabs:ue,tag:de,_tooltip:fe,heading:pe,prose:he,validation:_e,body:me},Pn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:Yt,_scrollShadow:ce,_skeleton:re,_tooltip:fe,affixes:Wt,alert:Mt,app:Jt,avatar:Dt,badge:Pt,body:me,breadcrumbs:Rt,button:Ht,card:jt,chip:qt,default:b,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,field:Kt,fieldset:Xt,flex:te,grid:Zt,group:Bt,heading:pe,helptext:Gt,info:Nt,input:Qt,link:ee,logo:ne,pagination:oe,popover:ie,prose:he,skeleton:se,spinner:ae,table:le,tabs:ue,tag:de,validation:_e},Symbol.toStringTag,{value:"Module"})),Rn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),s=Array.from({length:r+1-i},(a,c)=>c+i);return n>4&&i>1&&s.splice(0,2,1,0),n>3&&r<e&&s.splice(-2,2,0,e),s},Hn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Rn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),P=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function f(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let jn=0;const Nn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${Nn}${++jn}`),t.id}const ve=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},g=(t,...e)=>ve("add",t,e),L=(t,...e)=>ve("remove",t,e),K=new Map,E=P?document.createElement("div"):null;E&&f(E,"style","position:absolute;padding:1px;top:0;left:0px"),P&&g(window,"load,resize,scroll",()=>{for(const[t,e]of K)e()},v);const A={top:0,right:1,bottom:2,left:3};function H(t,e,n){var Dn;if(e===!1||!e.isConnected||!t.isConnected)return K.delete(t);if(E!=null&&E.isConnected||document.body.append(E||""),!K.has(t)){const hi=A[n]??A.bottom;return(Dn=K.set(t,()=>H(t,e,hi)).get(t))==null?void 0:Dn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:r,offsetHeight:s}=e,{width:a,height:c,left:l,top:u}=e.getBoundingClientRect(),h=Math.round(l-(r-a)/2),m=Math.round(u-(s-c)/2),S=h-o>0,Ot=r+r+o<window.innerWidth,D=m-i>0,rt=m+s+i<window.innerHeight,_=n===A.bottom&&Ot||!S,z=n===A.bottom&&rt||!D,Y=Math.min(Math.max(10,h-(o-r)/2),window.innerWidth-o-10),at=Math.min(Math.max(10,m-(i-s)/2),window.innerHeight-i-10),lt=n===A.top||n===A.bottom;t.style.left=`${Math.round(lt?Y:_?h+r:h-o)}px`,t.style.top=`${Math.round(lt?z?m+s:m-i:at)}px`,E==null||E.style.setProperty("translate",`${Math.round(window.scrollX+h+r+o+30)} ${Math.round(window.scrollY+m+s+i+30)}px`)}function Bn(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const W=new WeakMap,qn=t=>{var n;const e=W.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),W.delete(t);else for(const[,o]of e.collections)o()},T=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=W.get(t);i||(i={collections:new Map,observer:Bn(()=>qn(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),W.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e)},ct=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Fn=b._tooltip.split(" "),be="aria-describedby",ge="Escape",X="aria-labelledby",Un="--mtds-tooltip-position",Vn=300,G="mtds-tooltip";let $=null,ye=Number.NEGATIVE_INFINITY,Ee=0,y=null;function ut({target:t,type:e,key:n}){if(e==="keydown"&&n!==ge)return;const o=ye+Vn-Date.now();clearTimeout(Ee),Ee=setTimeout(zn,Math.max(o,0),n===ge?null:t)}function zn(t){var a;if(ye=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===$)return;const n=e&&f(e,"data-tooltip")||"",o=e&&f(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(Un)||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const r=$&&f($,X)===G,s=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(X))||(e==null?void 0:e.hasAttribute("aria-label"));$==null||$.removeAttribute(r?X:be),H(y,!1),$=e,$&&f($,s?be:X,G),y.togglePopover(!!e),H(y,e||!1,o)}P&&!document.getElementById(G)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...Fn),y.id=G,f(y,"popover","manual"),g(document,"blur,focus,mouseout,mouseover",ut,v),g(window,"keydown",ut,v),g(window,"blur",ut,v));var $e=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Te;$e&&/^Mac/i.test(((Te=navigator.userAgentData)==null?void 0:Te.platform)||navigator.platform);var Yn=":host(:not([hidden])) { display: block }",we=typeof HTMLElement>"u"?class{}:HTMLElement;function I(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Se=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ie=(t,...e)=>Se("add",t,e),Ce=(t,...e)=>Se("remove",t,e),Kn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Wn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))I(o,i,r);return o},xe={define:(t,e)=>!$e||window.customElements.get(t)||window.customElements.define(t,e)},Xn=class extends we{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(dt("slot",null,{name:"summary"}),dt("slot",null,{part:"details-content"}),dt("style",`${Yn}
2
2
  ::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }
3
3
  ::slotted(u-summary[aria-expanded="true"]) { list-style-type: disclosure-open }
4
- :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Ie(this._content,"beforematch",this),Ie(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ce(this._content,"beforematch",this),Ce(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&I(r,"aria-expanded",`${i}`);if(this._content&&(I(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const r=Xn(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of r)s!==this&&(s.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Wn(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){I(this,"open",t?"":null)}get name(){return I(this,"name")||""}set name(t){I(this,"name",t)}},Gn=class extends we{connectedCallback(){I(this,"role","button"),this.slot="summary",this.tabIndex=0}};xe.define("u-details",qn),xe.define("u-summary",Gn);const Le=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&f(n,"data-closedby")==="any"){const{top:i,right:r,bottom:s,left:a}=n.getBoundingClientRect();i<=e&&e<=s&&a<=t&&t<=r||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function Qn(t){b(t,"click",Le,v)}function Jn(t){L(t,"click",Le,v)}var Zn=Object.defineProperty,Ae=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,ke=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,no=(t,e)=>{for(var n in e||(e={}))to.call(e,n)&&ke(t,n,e[n]);if(Ae)for(var n of Ae(e))eo.call(e,n)&&ke(t,n,e[n]);return t},C=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",oo=C&&/android/i.test(navigator.userAgent),ft=C&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oe=C&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Me;C&&/^Mac/i.test(((Me=navigator.userAgentData)==null?void 0:Me.platform)||navigator.platform);var io=`${oo?"data":"aria"}-labelledby`,De=`${Oe?"aria":"data"}-multiselectable`,Pe=":host(:not([hidden])) { display: block }",so="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Re=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var He=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},pt=(t,...e)=>He("add",t,e),ht=(t,...e)=>He("remove",t,e),je=(t,e)=>t.attachShadow({mode:"open"}).append(mt("slot"),mt("style",e)),Q=new WeakMap,Ne=(t,e)=>{if(e===void 0)return Q.get(t);try{Q.get(t).disconnect(),Q.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Q.set(t,n)}},Be=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ro=0,_t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ro).toString(32)}`),t.id):"",mt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Fe={define:(t,e)=>!C||window.customElements.get(t)||window.customElements.define(t,e)},ao=t=>{if(!C)return null;const e=mt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Ue(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var vt="disabled",j="selected",lo=class extends Re{static get observedAttributes(){return[vt,j]}constructor(){super(),je(this,`${Pe}:host(:focus){${so}}:host{ cursor: pointer }`)}connectedCallback(){ft||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[j]}set defaultSelected(e){this[j]=e}get disabled(){return p(this,vt)!==null}set disabled(e){p(this,vt,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,j)!==null}set selected(e){p(this,j,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};Fe.define("u-option",lo);var gt=!1,Ve,uo=0,N=ao("assertive"),co=Oe&&!ft,ze="click,focusout,input,keydown,mousedown,mouseup",Ye={singular:"%d hit",plural:"%d hits"},Ke=class extends Re{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=no({},Ye),je(this,`${Pe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Ue(Ye)]}connectedCallback(){this.hidden=!0,this._root=Be(this),N&&!N.isConnected&&document.body.append(N),p(this,"role","listbox"),pt(this._root,"focusin",this),pt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ht(this._root||this,"focus",this,!0),ht(this._root||this,"focusin",this),bt(this),this._root=null}attributeChangedCallback(e,n,o){var i;Ue(this._texts,e,o);const r=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const s of r||[])Xe(this,s)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ho(this,e),(n==="focus"||n==="focusin")&&fo(this,e),n==="focusout"&&po(this),n==="keydown"&&_o(this,e),(n==="mutation"||n==="input")&&Ge(this,e),n==="mouseup"&&(gt=!1),n==="mousedown"&&(gt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},fo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&bt(t),t._input=e,p(t,io,_t((n=t._input.labels)==null?void 0:n[0])),pt(t._root||t,ze,t),Ne(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},po=t=>{gt||(t._blurTimer=setTimeout(()=>bt(t)))},ho=(t,{target:e})=>{var n,o,i,r,s;const a=p(t,De)!=="true",u=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(u&&J(u)){for(const l of t.options)l===u?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,u.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},_o=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=We(t),a=s.indexOf(r);let u=-1;if(i==="ArrowDown"&&(u=(a+1)%s.length),i==="ArrowUp"&&(u=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(u=0),(i==="End"||i==="PageDown")&&(u=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[u])for(const l of s)l.tabIndex=-1;s[u]&&e.preventDefault(),(o=s[u]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&Xe(t,t._input,e),e&&Ge(t)},bt=t=>{ht(t._root||t,ze,t),Ne(t,!1),k(t,!1),t._input=null},We=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),J=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",Xe=(t,e,n=!1)=>{p(e,"popovertarget",_t(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",_t(t)),p(e,"aria-expanded",`${co||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},qe=t=>(t==null?void 0:t.toLowerCase().trim())||"",Ge=(t,e)=>{var n;const o=qe((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=p(t,De)!=="true",a=e instanceof InputEvent&&!go(e);t.hidden=!0,t._value=o;for(const l of t.options){const c=[l.value,l.label,l.text].map(qe);l.hidden=!c.some(h=>h.includes(o)),s&&a&&J(l)&&(l.selected=c.includes(o))}t.hidden=r;const u=We(t);clearTimeout(Ve),Ve=setTimeout(()=>{const{length:l}=u.filter(J),c=++uo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;N&&(N.textContent=`${!l&&t.innerText.trim()||h}${c}`)},1e3),ft&&u.map((l,c,h)=>{l.title=`${c+1}/${h}`})};C&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Be(this).getElementById(p(this,"list")||"")}}),Fe.define("u-datalist",Ke);var mo=" ".repeat(100),vo="insertReplacementText";function go(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===vo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!J(r));t.target.value=o.split(mo)[i?1:0]}return n}var bo=Object.defineProperty,Qe=Object.getOwnPropertySymbols,yo=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Je=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))yo.call(e,n)&&Je(t,n,e[n]);if(Qe)for(var n of Qe(e))Eo.call(e,n)&&Je(t,n,e[n]);return t},w=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tn=w&&/android/i.test(navigator.userAgent),$o=w&&/firefox/i.test(navigator.userAgent),Z=w&&/iPad|iPhone|iPod/.test(navigator.userAgent),en=w&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),nn,To=w&&/^Mac/i.test(((nn=navigator.userAgentData)==null?void 0:nn.platform)||navigator.platform),wo=`${tn?"data":"aria"}-labelledby`,yt=`${en?"aria":"data"}-multiselectable`,on=":host(:not([hidden])) { display: block }",sn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Et=typeof HTMLElement>"u"?class{}:HTMLElement;function d(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var rn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},B=(t,...e)=>rn("add",t,e),F=(t,...e)=>rn("remove",t,e),an=(t,e)=>t.attachShadow({mode:"open"}).append(O("slot"),O("style",e)),tt=new WeakMap,et=(t,e)=>{if(e===void 0)return tt.get(t);try{tt.get(t).disconnect(),tt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),tt.set(t,n)}},So=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},nt=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Io=0,$t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Io).toString(32)}`),t.id):"",O=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))d(o,i,r);return o},Tt={define:(t,e)=>!w||window.customElements.get(t)||window.customElements.define(t,e)},ln=t=>{if(!w)return null;const e=O("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",d(e,"aria-live",t),document.body.appendChild(e)};function ot(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var wt="disabled",U="selected",Co=class extends Et{static get observedAttributes(){return[wt,U]}constructor(){super(),an(this,`${on}:host(:focus){${sn}}:host{ cursor: pointer }`)}connectedCallback(){Z||(this.tabIndex=-1),d(this,"role")||d(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){d(this,"aria-disabled",`${this.disabled}`),d(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[U]}set defaultSelected(t){this[U]=t}get disabled(){return d(this,wt)!==null}set disabled(t){d(this,wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return d(this,"label")||this.text}set label(t){d(this,"label",t)}get selected(){return d(this,U)!==null}set selected(t){d(this,U,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return d(this,"value")||this.text}set value(t){d(this,"value",t)}};Tt.define("u-option",Co);var St=!1,un,xo=0,V=ln("assertive"),Lo=en&&!Z,cn="click,focusout,input,keydown,mousedown,mouseup",dn={singular:"%d hit",plural:"%d hits"},Ao=class extends Et{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=Ze({},dn),an(this,`${on}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ot(dn)]}connectedCallback(){this.hidden=!0,this._root=nt(this),V&&!V.isConnected&&document.body.append(V),d(this,"role","listbox"),B(this._root,"focusin",this),B(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){F(this._root||this,"focus",this,!0),F(this._root||this,"focusin",this),It(this),this._root=null}attributeChangedCallback(t,e,n){var o;ot(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const r of i||[])pn(this,r)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&Mo(this,t),(e==="focus"||e==="focusin")&&ko(this,t),e==="focusout"&&Oo(this),e==="keydown"&&Do(this,t),(e==="mutation"||e==="input")&&_n(this,t),e==="mouseup"&&(St=!1),e==="mousedown"&&(St=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},ko=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&d(e,"list")===t.id&&(t._input&&It(t),t._input=e,d(t,wo,$t((n=t._input.labels)==null?void 0:n[0])),B(t._root||t,cn,t),et(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),M(t,!0))},Oo=t=>{St||(t._blurTimer=setTimeout(()=>It(t)))},Mo=(t,{target:e})=>{var n,o,i,r,s;const a=d(t,yt)!=="true",u=[...t.options].find(l=>l.contains(e));if(t._input===e)M(t,!0);else if(u&&it(u)){for(const l of t.options)l===u?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,u.value),a&&((i=t._input)==null||i.focus(),M(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},Do=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&M(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=fn(t),a=s.indexOf(r);let u=-1;if(i==="ArrowDown"&&(u=(a+1)%s.length),i==="ArrowUp"&&(u=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(u=0),(i==="End"||i==="PageDown")&&(u=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[u])for(const l of s)l.tabIndex=-1;s[u]&&e.preventDefault(),(o=s[u]||t._input)==null||o.focus(),i==="Escape"&&M(t,!1)},M=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&pn(t,t._input,e),e&&_n(t)},It=t=>{F(t._root||t,cn,t),et(t,!1),M(t,!1),t._input=null},fn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),it=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",pn=(t,e,n=!1)=>{d(e,"popovertarget",$t(t)),d(e,"aria-autocomplete","list"),d(e,"aria-controls",$t(t)),d(e,"aria-expanded",`${Lo||n}`),d(e,"autocomplete","off"),d(e,"role","combobox")},hn=t=>(t==null?void 0:t.toLowerCase().trim())||"",_n=(t,e)=>{var n;const o=hn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=d(t,yt)!=="true",a=e instanceof InputEvent&&!vn(e);t.hidden=!0,t._value=o;for(const l of t.options){const c=[l.value,l.label,l.text].map(hn);l.hidden=!c.some(h=>h.includes(o)),s&&a&&it(l)&&(l.selected=c.includes(o))}t.hidden=r;const u=fn(t);clearTimeout(un),un=setTimeout(()=>{const{length:l}=u.filter(it),c=++xo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;V&&(V.textContent=`${!l&&t.innerText.trim()||h}${c}`)},1e3),Z&&u.map((l,c,h)=>{l.title=`${c+1}/${h}`})};w&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return nt(this).getElementById(d(this,"list")||"")}}),Tt.define("u-datalist",Ao);var mn=" ".repeat(100),Po="insertReplacementText",Ct=({value:t})=>t.split(mn)[0];function vn(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Po);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!it(r));t.target.value=o.split(mn)[i?1:0]}return n}var Ro=tn||Z,Ho=$o||To,z=ln("polite"),gn="input,focusin,focusout,keydown",bn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},jo=class extends Et{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=Ze({},bn),this.attachShadow({mode:"open"}).append(O("slot"),O("style",`:host(:not([hidden])){ display: inline-block }
4
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Ie(this._content,"beforematch",this),Ie(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ce(this._content,"beforematch",this),Ce(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&I(r,"aria-expanded",`${i}`);if(this._content&&(I(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const r=Wn(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of r)s!==this&&(s.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Kn(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){I(this,"open",t?"":null)}get name(){return I(this,"name")||""}set name(t){I(this,"name",t)}},Gn=class extends we{connectedCallback(){I(this,"role","button"),this.slot="summary",this.tabIndex=0}};xe.define("u-details",Xn),xe.define("u-summary",Gn);const Le=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&f(n,"data-closedby")==="any"){const{top:i,right:r,bottom:s,left:a}=n.getBoundingClientRect();i<=e&&e<=s&&a<=t&&t<=r||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function Qn(t){g(t,"click",Le,v)}function Jn(t){L(t,"click",Le,v)}var Zn=Object.defineProperty,Ae=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,ke=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,no=(t,e)=>{for(var n in e||(e={}))to.call(e,n)&&ke(t,n,e[n]);if(Ae)for(var n of Ae(e))eo.call(e,n)&&ke(t,n,e[n]);return t},C=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",oo=C&&/android/i.test(navigator.userAgent),ft=C&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oe=C&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Me;C&&/^Mac/i.test(((Me=navigator.userAgentData)==null?void 0:Me.platform)||navigator.platform);var io=`${oo?"data":"aria"}-labelledby`,De=`${Oe?"aria":"data"}-multiselectable`,Pe=":host(:not([hidden])) { display: block }",so="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Re=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var He=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},pt=(t,...e)=>He("add",t,e),ht=(t,...e)=>He("remove",t,e),je=(t,e)=>t.attachShadow({mode:"open"}).append(mt("slot"),mt("style",e)),Q=new WeakMap,Ne=(t,e)=>{if(e===void 0)return Q.get(t);try{Q.get(t).disconnect(),Q.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Q.set(t,n)}},Be=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ro=0,_t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ro).toString(32)}`),t.id):"",mt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},qe={define:(t,e)=>!C||window.customElements.get(t)||window.customElements.define(t,e)},ao=t=>{if(!C)return null;const e=mt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Fe(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var vt="disabled",j="selected",lo=class extends Re{static get observedAttributes(){return[vt,j]}constructor(){super(),je(this,`${Pe}:host(:focus){${so}}:host{ cursor: pointer }`)}connectedCallback(){ft||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[j]}set defaultSelected(e){this[j]=e}get disabled(){return p(this,vt)!==null}set disabled(e){p(this,vt,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,j)!==null}set selected(e){p(this,j,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};qe.define("u-option",lo);var bt=!1,Ue,co=0,N=ao("assertive"),uo=Oe&&!ft,Ve="click,focusout,input,keydown,mousedown,mouseup",ze={singular:"%d hit",plural:"%d hits"},Ye=class extends Re{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=no({},ze),je(this,`${Pe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Fe(ze)]}connectedCallback(){this.hidden=!0,this._root=Be(this),N&&!N.isConnected&&document.body.append(N),p(this,"role","listbox"),pt(this._root,"focusin",this),pt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ht(this._root||this,"focus",this,!0),ht(this._root||this,"focusin",this),gt(this),this._root=null}attributeChangedCallback(e,n,o){var i;Fe(this._texts,e,o);const r=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const s of r||[])We(this,s)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ho(this,e),(n==="focus"||n==="focusin")&&fo(this,e),n==="focusout"&&po(this),n==="keydown"&&_o(this,e),(n==="mutation"||n==="input")&&Ge(this,e),n==="mouseup"&&(bt=!1),n==="mousedown"&&(bt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},fo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&gt(t),t._input=e,p(t,io,_t((n=t._input.labels)==null?void 0:n[0])),pt(t._root||t,Ve,t),Ne(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},po=t=>{bt||(t._blurTimer=setTimeout(()=>gt(t)))},ho=(t,{target:e})=>{var n,o,i,r,s;const a=p(t,De)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(c&&J(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},_o=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=Ke(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&We(t,t._input,e),e&&Ge(t)},gt=t=>{ht(t._root||t,Ve,t),Ne(t,!1),k(t,!1),t._input=null},Ke=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),J=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",We=(t,e,n=!1)=>{p(e,"popovertarget",_t(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",_t(t)),p(e,"aria-expanded",`${uo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},Xe=t=>(t==null?void 0:t.toLowerCase().trim())||"",Ge=(t,e)=>{var n;const o=Xe((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=p(t,De)!=="true",a=e instanceof InputEvent&&!bo(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(Xe);l.hidden=!u.some(h=>h.includes(o)),s&&a&&J(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=Ke(t);clearTimeout(Ue),Ue=setTimeout(()=>{const{length:l}=c.filter(J),u=++co%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;N&&(N.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),ft&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};C&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Be(this).getElementById(p(this,"list")||"")}}),qe.define("u-datalist",Ye);var mo=" ".repeat(100),vo="insertReplacementText";function bo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===vo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!J(r));t.target.value=o.split(mo)[i?1:0]}return n}var go=Object.defineProperty,Qe=Object.getOwnPropertySymbols,yo=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Je=(t,e,n)=>e in t?go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))yo.call(e,n)&&Je(t,n,e[n]);if(Qe)for(var n of Qe(e))Eo.call(e,n)&&Je(t,n,e[n]);return t},w=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tn=w&&/android/i.test(navigator.userAgent),$o=w&&/firefox/i.test(navigator.userAgent),Z=w&&/iPad|iPhone|iPod/.test(navigator.userAgent),en=w&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),nn,To=w&&/^Mac/i.test(((nn=navigator.userAgentData)==null?void 0:nn.platform)||navigator.platform),wo=`${tn?"data":"aria"}-labelledby`,yt=`${en?"aria":"data"}-multiselectable`,on=":host(:not([hidden])) { display: block }",sn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Et=typeof HTMLElement>"u"?class{}:HTMLElement;function d(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var rn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},B=(t,...e)=>rn("add",t,e),q=(t,...e)=>rn("remove",t,e),an=(t,e)=>t.attachShadow({mode:"open"}).append(O("slot"),O("style",e)),tt=new WeakMap,et=(t,e)=>{if(e===void 0)return tt.get(t);try{tt.get(t).disconnect(),tt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),tt.set(t,n)}},So=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},nt=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Io=0,$t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Io).toString(32)}`),t.id):"",O=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))d(o,i,r);return o},Tt={define:(t,e)=>!w||window.customElements.get(t)||window.customElements.define(t,e)},ln=t=>{if(!w)return null;const e=O("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",d(e,"aria-live",t),document.body.appendChild(e)};function ot(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var wt="disabled",F="selected",Co=class extends Et{static get observedAttributes(){return[wt,F]}constructor(){super(),an(this,`${on}:host(:focus){${sn}}:host{ cursor: pointer }`)}connectedCallback(){Z||(this.tabIndex=-1),d(this,"role")||d(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){d(this,"aria-disabled",`${this.disabled}`),d(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[F]}set defaultSelected(t){this[F]=t}get disabled(){return d(this,wt)!==null}set disabled(t){d(this,wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return d(this,"label")||this.text}set label(t){d(this,"label",t)}get selected(){return d(this,F)!==null}set selected(t){d(this,F,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return d(this,"value")||this.text}set value(t){d(this,"value",t)}};Tt.define("u-option",Co);var St=!1,cn,xo=0,U=ln("assertive"),Lo=en&&!Z,un="click,focusout,input,keydown,mousedown,mouseup",dn={singular:"%d hit",plural:"%d hits"},Ao=class extends Et{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=Ze({},dn),an(this,`${on}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ot(dn)]}connectedCallback(){this.hidden=!0,this._root=nt(this),U&&!U.isConnected&&document.body.append(U),d(this,"role","listbox"),B(this._root,"focusin",this),B(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){q(this._root||this,"focus",this,!0),q(this._root||this,"focusin",this),It(this),this._root=null}attributeChangedCallback(t,e,n){var o;ot(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const r of i||[])pn(this,r)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&Mo(this,t),(e==="focus"||e==="focusin")&&ko(this,t),e==="focusout"&&Oo(this),e==="keydown"&&Do(this,t),(e==="mutation"||e==="input")&&_n(this,t),e==="mouseup"&&(St=!1),e==="mousedown"&&(St=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},ko=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&d(e,"list")===t.id&&(t._input&&It(t),t._input=e,d(t,wo,$t((n=t._input.labels)==null?void 0:n[0])),B(t._root||t,un,t),et(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),M(t,!0))},Oo=t=>{St||(t._blurTimer=setTimeout(()=>It(t)))},Mo=(t,{target:e})=>{var n,o,i,r,s;const a=d(t,yt)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)M(t,!0);else if(c&&it(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),M(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},Do=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&M(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=fn(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&M(t,!1)},M=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&pn(t,t._input,e),e&&_n(t)},It=t=>{q(t._root||t,un,t),et(t,!1),M(t,!1),t._input=null},fn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),it=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",pn=(t,e,n=!1)=>{d(e,"popovertarget",$t(t)),d(e,"aria-autocomplete","list"),d(e,"aria-controls",$t(t)),d(e,"aria-expanded",`${Lo||n}`),d(e,"autocomplete","off"),d(e,"role","combobox")},hn=t=>(t==null?void 0:t.toLowerCase().trim())||"",_n=(t,e)=>{var n;const o=hn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=d(t,yt)!=="true",a=e instanceof InputEvent&&!vn(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(hn);l.hidden=!u.some(h=>h.includes(o)),s&&a&&it(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=fn(t);clearTimeout(cn),cn=setTimeout(()=>{const{length:l}=c.filter(it),u=++xo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;U&&(U.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),Z&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};w&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return nt(this).getElementById(d(this,"list")||"")}}),Tt.define("u-datalist",Ao);var mn=" ".repeat(100),Po="insertReplacementText",Ct=({value:t})=>t.split(mn)[0];function vn(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Po);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!it(r));t.target.value=o.split(mn)[i?1:0]}return n}var Ro=tn||Z,Ho=$o||To,V=ln("polite"),bn="input,focusin,focusout,keydown",gn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},jo=class extends Et{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=Ze({},gn),this.attachShadow({mode:"open"}).append(O("slot"),O("style",`:host(:not([hidden])){ display: inline-block }
5
5
  ::slotted(data) { cursor: pointer; display: inline-block; outline: none; pointer-events: none }
6
6
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto }
7
- ::slotted(data:focus)::after { ${sn} }`))}static get observedAttributes(){return ot(bn)}connectedCallback(){this._root=nt(this),z&&!z.isConnected&&document.body.append(z),et(this,{childList:!0}),B(this._root,"click",this),B(this,gn,this),setTimeout(()=>st(this))}attributeChangedCallback(t,e,n){ot(this._texts,t,n)}disconnectedCallback(){et(this,!1),F(this._root||this,"click",this),F(this,gn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&Fo(this,t),t.type==="focusin"&&No(this,t),t.type==="focusout"&&Bo(this),t.type==="input"&&Uo(this,t),t.type==="keydown"&&Vo(this,t),t.type==="mutation"&&st(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},xt=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),st=(t,e)=>{var n,o,i,r,s;const a=t._texts,u=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(u==null?void 0:u.addedNodes[0])||(u==null?void 0:u.removedNodes[0]),c=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",m=[];d(t,"role","group"),d(t,"aria-label",h),t.items.forEach((_,Y,{length:K})=>{var at;const lt=`${c}${_.textContent}, ${a.remove}, ${Y+1} ${a.of} ${K}`;d(_,"aria-label",lt),d(_,"role","button"),_.tabIndex=-1,_.value=_.value||((at=_.textContent)==null?void 0:at.trim())||"",m.push(_.value)});const S=t.control,Ot=`${c}${h}, ${m.length?a.found.replace("%d",`${m.length}`):a.empty}`,D=S&&document.getElementById(d(S,"list")||""),rt=D==null?void 0:D.children;S&&d(S,"aria-label",Ot),D&&d(D,yt,"true");for(const _ of rt||[])_.selected=m.includes(Ct(_));if(c){const _=t.items[(t._focusIndex||1)-1]||S,Y=_===((r=nt(t))==null?void 0:r.activeElement),K=rt||t.items;t._blurAnnounceReset=!1,_===S?(Y&&(Ro&&z?z.textContent=c:(s=K[0])==null||s.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!Ho)return st(t);t._blurAnnounceReset=!0},500)}},No=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},Bo=t=>{t._blurAnnounceReset&&st(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},Fo=(t,{target:e,clientX:n,clientY:o})=>{var i;const r=t.contains(e)?[...t.items]:null,s=r==null?void 0:r.find(u=>u.contains(e)),a=r==null?void 0:r.find(u=>{const{top:l,right:c,bottom:h,left:m}=u.getBoundingClientRect();return o>=l&&o<=h&&n>=m&&n<=c});s?xt(t,s)&&s.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},Uo=(t,e)=>{var n;const o=e.target;if(!vn(e)||!(o!=null&&o.value.trim()))return;const i=Ct(o),r=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(c=>Ct(c)===i),u=r.find(c=>c.value===i),l=O("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!xt(t,u||l)){if(u)return u.remove();if(!r[0])return t.prepend(l);r[r.length-1].insertAdjacentElement("afterend",l)}},Vo=(t,e)=>{var n,o;const{key:i,repeat:r,target:s}=e,a=t.control===s?t.control:null,u=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&So(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!u)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!u){const c=!r&&t.items[l];if(e.preventDefault(),c)return xt(t,c)&&c.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};Tt.define("u-tags",jo);const Lt=g.field.split(" ")[0],zo="--mtds-text-count-over",Yo="--mtds-text-count-under",yn=g.validation.split(" "),Ko=yn[0];function Wo(t){for(const e of t){const n=[],o=[];let i=null,r=null,s=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof Ke?r=a:ut(a)?i=a:a.classList.contains(Ko)?(s=f(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);Xo(i,r),$n(i),En(i),f(i,"aria-describedby",o.join(" ")),f(i,"aria-invalid",`${!s}`)}}}function En(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Xo(t,e){if(f(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||f(t,"placeholder","");const n=window.getComputedStyle(e),o=n.getPropertyValue("--mtds-text-datalist-singular"),i=n.getPropertyValue("--mtds-text-datalist-plural");f(e,"data-sr-plural",i),f(e,"data-sr-singular",o)}function $n(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&f(e,"data-count");if(e&&n){const r=Number(n)-t.value.length,s=r<0,a=f(e,"aria-live")==="polite",u=window.getComputedStyle(e||t),l=((o=u.getPropertyValue(zo))==null?void 0:o.slice(1,-1))||"",c=((i=u.getPropertyValue(Yo))==null?void 0:i.slice(1,-1))||"";if(a!==s){f(e,"aria-live",s?"polite":"off");for(const h of yn)e.classList.toggle(h,s)}e.textContent=(s?l:c).replace("%d",`${Math.abs(r)}`)}}function Tn({target:t}){ut(t)&&($n(t),En(t))}function wn(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Lt}`)&&t.preventDefault()}function qo(t){T(t,Lt,Wo),b(t,"input",Tn,v),b(t,"invalid",wn,!0)}function Go(t){T(t,Lt,!1),L(t,"input",Tn,v),L(t,"invalid",wn,!0)}const Sn=g.fieldset.split(" ")[0],Qo=g.validation.split(" ")[0];function Jo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Qo)?o=R(i):ut(i)&&n.push(i);for(const i of n)f(i,"aria-describedby",o),f(i,"aria-invalid",`${!!o}`)}}const Zo=t=>T(t,Sn,Jo),ti=t=>T(t,Sn,!1),In=g.app.split(" ")[0],ei=`.${In} > header + :not(main) > button:empty:first-child`,ni="mtds-app-menu",Cn=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(ei));if(!e)return;const n=e.closest(`.${In} > *`),o=`${n&&f(n,"data-expanded")==="false"}`,i=()=>n&&f(n,"data-expanded",o);oi(ni,o),document.startViewTransition?document.startViewTransition(()=>i()):i()};function oi(t,e){try{if(e)window.localStorage.setItem(t,e);else return window.localStorage.getItem(t)}catch{return null}}function ii(t){b(t,"click",Cn,v)}function si(t){L(t,"click",Cn,v)}const At=g.logo.split(" ")[0];let kt;function xn(t){var s,a;const e=(s=t[0])==null?void 0:s.firstElementChild;if(!e)return;if(!kt){const u=document.head.getElementsByTagName("link[rel~='icon']"),l=document.createElement("link");for(const c of u)c.remove();kt=document.head.appendChild(Object.assign(l,{rel:"icon"}))}const n=(a=e.parentElement)==null?void 0:a.hasAttribute("data-color"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("background-color");kt.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`))}</g></svg>`}P&&setTimeout(()=>xn(document.getElementsByClassName(At)),300);const ri=t=>T(t,At,xn),ai=t=>T(t,At,!1),Ln=g.popover.split(" ")[0];function li(t){b(t,"toggle",An,v),b(t,"click",kn)}function ui(t){L(t,"toggle",An,v),L(t,"click",kn)}function An({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Ln)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?H(t,!1):o&&H(t,o,f(t,"data-position")||"bottom")}}function kn({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),r=((o=i.getElementById)==null?void 0:o.call(i,f(e,"popovertarget")||""))||e.closest(`.${Ln}`),s=f(e,"popovertargetaction")||"toggle";r==null||r.togglePopover(s==="show"||(s==="hide"?!1:void 0))}}const On=g.table.split(" ")[0];function ci(t){for(const e of t){const n=[];f(e,"role","table"),e.caption&&f(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){f(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const r of o.rows){f(r,"role","row");for(const s of r.cells)i?f(s,"data-th",n[s.cellIndex]||":empty"):n.push(s.innerText.trim()),s.nodeName==="TD"?f(s,"role","cell"):(f(s,"role",i?"rowheader":"columnheader"),f(s,"scope",i?"row":"col"))}}}}const di=t=>T(t,On,ci),fi=t=>T(t,On,!1);if(P){const t=document.readyState==="loading",e=()=>Mn(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function Mn(t){Qn(t),qo(t),Zo(t),ii(t),ri(t),li(t),di(t)}function pi(t){Jn(t),Go(t),ti(t),si(t),ai(t),ui(t),fi(t)}return x.observe=Mn,x.pagination=Hn,x.styles=Pn,x.unobserve=pi,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({});
7
+ ::slotted(data:focus)::after { ${sn} }`))}static get observedAttributes(){return ot(gn)}connectedCallback(){this._root=nt(this),V&&!V.isConnected&&document.body.append(V),et(this,{childList:!0}),B(this._root,"click",this),B(this,bn,this),setTimeout(()=>st(this))}attributeChangedCallback(t,e,n){ot(this._texts,t,n)}disconnectedCallback(){et(this,!1),q(this._root||this,"click",this),q(this,bn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&qo(this,t),t.type==="focusin"&&No(this,t),t.type==="focusout"&&Bo(this),t.type==="input"&&Fo(this,t),t.type==="keydown"&&Uo(this,t),t.type==="mutation"&&st(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},xt=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),st=(t,e)=>{var n,o,i,r,s;const a=t._texts,c=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(c==null?void 0:c.addedNodes[0])||(c==null?void 0:c.removedNodes[0]),u=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",m=[];d(t,"role","group"),d(t,"aria-label",h),t.items.forEach((_,z,{length:Y})=>{var at;const lt=`${u}${_.textContent}, ${a.remove}, ${z+1} ${a.of} ${Y}`;d(_,"aria-label",lt),d(_,"role","button"),_.tabIndex=-1,_.value=_.value||((at=_.textContent)==null?void 0:at.trim())||"",m.push(_.value)});const S=t.control,Ot=`${u}${h}, ${m.length?a.found.replace("%d",`${m.length}`):a.empty}`,D=S&&document.getElementById(d(S,"list")||""),rt=D==null?void 0:D.children;S&&d(S,"aria-label",Ot),D&&d(D,yt,"true");for(const _ of rt||[])_.selected=m.includes(Ct(_));if(u){const _=t.items[(t._focusIndex||1)-1]||S,z=_===((r=nt(t))==null?void 0:r.activeElement),Y=rt||t.items;t._blurAnnounceReset=!1,_===S?(z&&(Ro&&V?V.textContent=u:(s=Y[0])==null||s.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!Ho)return st(t);t._blurAnnounceReset=!0},500)}},No=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},Bo=t=>{t._blurAnnounceReset&&st(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},qo=(t,{target:e,clientX:n,clientY:o})=>{var i;const r=t.contains(e)?[...t.items]:null,s=r==null?void 0:r.find(c=>c.contains(e)),a=r==null?void 0:r.find(c=>{const{top:l,right:u,bottom:h,left:m}=c.getBoundingClientRect();return o>=l&&o<=h&&n>=m&&n<=u});s?xt(t,s)&&s.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},Fo=(t,e)=>{var n;const o=e.target;if(!vn(e)||!(o!=null&&o.value.trim()))return;const i=Ct(o),r=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(u=>Ct(u)===i),c=r.find(u=>u.value===i),l=O("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!xt(t,c||l)){if(c)return c.remove();if(!r[0])return t.prepend(l);r[r.length-1].insertAdjacentElement("afterend",l)}},Uo=(t,e)=>{var n,o;const{key:i,repeat:r,target:s}=e,a=t.control===s?t.control:null,c=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&So(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!c)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!c){const u=!r&&t.items[l];if(e.preventDefault(),u)return xt(t,u)&&u.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};Tt.define("u-tags",jo);const Lt=b.field.split(" ")[0],Vo="--mtds-text-count-over",zo="--mtds-text-count-under",yn=b.validation.split(" "),Yo=yn[0];function Ko(t){for(const e of t){const n=[],o=[];let i=null,r=null,s=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof Ye?r=a:ct(a)?i=a:a.classList.contains(Yo)?(s=f(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);Wo(i,r),$n(i),En(i),f(i,"aria-describedby",o.join(" ")),f(i,"aria-invalid",`${!s}`)}}}function En(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Wo(t,e){if(f(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||f(t,"placeholder","");const n=window.getComputedStyle(e),o=n.getPropertyValue("--mtds-text-datalist-singular"),i=n.getPropertyValue("--mtds-text-datalist-plural");f(e,"data-sr-plural",i),f(e,"data-sr-singular",o)}function $n(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&f(e,"data-count");if(e&&n){const r=Number(n)-t.value.length,s=r<0,a=f(e,"aria-live")==="polite",c=window.getComputedStyle(e||t),l=((o=c.getPropertyValue(Vo))==null?void 0:o.slice(1,-1))||"",u=((i=c.getPropertyValue(zo))==null?void 0:i.slice(1,-1))||"";if(a!==s){f(e,"aria-live",s?"polite":"off");for(const h of yn)e.classList.toggle(h,s)}e.textContent=(s?l:u).replace("%d",`${Math.abs(r)}`)}}function Tn({target:t}){ct(t)&&($n(t),En(t))}function wn(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Lt}`)&&t.preventDefault()}function Xo(t){T(t,Lt,Ko),g(t,"input",Tn,v),g(t,"invalid",wn,!0)}function Go(t){T(t,Lt,!1),L(t,"input",Tn,v),L(t,"invalid",wn,!0)}const Sn=b.fieldset.split(" ")[0],Qo=b.validation.split(" ")[0];function Jo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Qo)?o=R(i):ct(i)&&n.push(i);for(const i of n)f(i,"aria-describedby",o),f(i,"aria-invalid",`${!!o}`)}}const Zo=t=>T(t,Sn,Jo),ti=t=>T(t,Sn,!1),In=b.app.split(" ")[0],ei=`.${In} > header + :not(main) > button:empty:first-child`,ni="mtds-app-menu",Cn=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(ei));if(!e)return;const n=e.closest(`.${In} > *`),o=`${n&&f(n,"data-expanded")==="false"}`,i=()=>n&&f(n,"data-expanded",o);oi(ni,o),document.startViewTransition?document.startViewTransition(()=>i()):i()};function oi(t,e){try{if(e)window.localStorage.setItem(t,e);else return window.localStorage.getItem(t)}catch{return null}}function ii(t){g(t,"click",Cn,v)}function si(t){L(t,"click",Cn,v)}const At=b.logo.split(" ")[0];let kt;function xn(t){var s,a;const e=(s=t[0])==null?void 0:s.firstElementChild;if(!e)return;if(!kt){const c=document.head.getElementsByTagName("link[rel~='icon']"),l=document.createElement("link");for(const u of c)u.remove();kt=document.head.appendChild(Object.assign(l,{rel:"icon"}))}const n=(a=e.parentElement)==null?void 0:a.hasAttribute("data-color"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("background-color");kt.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`))}</g></svg>`}P&&setTimeout(()=>xn(document.getElementsByClassName(At)),300);const ri=t=>T(t,At,xn),ai=t=>T(t,At,!1),Ln=b.popover.split(" ")[0];function li(t){g(t,"beforetoggle",An,v),g(t,"click",kn)}function ci(t){L(t,"beforetoggle",An,v),L(t,"click",kn)}function An({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Ln)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?H(t,!1):o&&H(t,o,f(t,"data-position")||"bottom")}}function kn({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),r=((o=i.getElementById)==null?void 0:o.call(i,f(e,"popovertarget")||""))||e.closest(`.${Ln}`),s=f(e,"popovertargetaction")||"toggle";r==null||r.togglePopover(s==="show"||(s==="hide"?!1:void 0))}}const On=b.table.split(" ")[0];function ui(t){for(const e of t){const n=[];f(e,"role","table"),e.caption&&f(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){f(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const r of o.rows){f(r,"role","row");for(const s of r.cells)i?f(s,"data-th",n[s.cellIndex]||":empty"):n.push(s.innerText.trim()),s.nodeName==="TD"?f(s,"role","cell"):(f(s,"role",i?"rowheader":"columnheader"),f(s,"scope",i?"row":"col"))}}}}const di=t=>T(t,On,ui),fi=t=>T(t,On,!1);if(P){const t=document.readyState==="loading",e=()=>Mn(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function Mn(t){Qn(t),Xo(t),Zo(t),ii(t),ri(t),li(t),di(t)}function pi(t){Jn(t),Go(t),ti(t),si(t),ai(t),ci(t),fi(t)}return x.observe=Mn,x.pagination=Hn,x.styles=Pn,x.unobserve=pi,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({});
8
8
  //# sourceMappingURL=index.iife.js.map