@mattilsynet/design 3.1.12 → 3.1.14

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,4 +1,4 @@
1
- var mtds=(function(E){"use strict";var La=Object.defineProperty,eo=Object.getOwnPropertySymbols,Ca=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable,no=(t,e,n)=>e in t?La(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ma=(t,e)=>{for(var n in e||(e={}))Ca.call(e,n)&&no(t,n,e[n]);if(eo)for(var n of eo(e))Oa.call(e,n)&&no(t,n,e[n]);return t},Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ia=Yt&&/android/i.test(navigator.userAgent),oo=Yt&&/iPad|iPhone|iPod/.test(navigator.userAgent),io;Yt&&/^Mac/i.test(((io=navigator.userAgentData)==null?void 0:io.platform)||navigator.platform);var Na="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ra=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var ro=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qt=(t,...e)=>ro("add",t,e),qa=(t,...e)=>ro("remove",t,e),_t=new WeakMap,Fe=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),_t.set(t,n)}},Pa=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},ao=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},Wa=0,so=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Wa).toString(32)}`),t.id):"",kt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))T(o,i,r);return o},Va={define:(t,e)=>!Yt||window.customElements.get(t)||window.customElements.define(t,e)},Ua=t=>{var e;const n=T(t,"aria-label")||"";return[...(((e=T(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},st,Da=0,Be=t=>{st||(st=kt("div"),st.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(st,"aria-live","assertive")),st.isConnected||document.body.append(st),t&&(st.textContent=`${t}${Da++%2?" ":""}`)},lo=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Ge=!1,He=t=>(t?.type==="mouseup"&&(Ge=!1),t?.type==="mousedown"&&(Ge=!0,Qt(document,"mouseup",He,{once:!0})),Ge),za=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Je=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
1
+ var mtds=(function(E){"use strict";var Aa=Object.defineProperty,no=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,Ca=Object.prototype.propertyIsEnumerable,oo=(t,e,n)=>e in t?Aa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ma=(t,e)=>{for(var n in e||(e={}))La.call(e,n)&&oo(t,n,e[n]);if(no)for(var n of no(e))Ca.call(e,n)&&oo(t,n,e[n]);return t},Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Oa=Yt&&/android/i.test(navigator.userAgent),io=Yt&&/iPad|iPhone|iPod/.test(navigator.userAgent),ro;Yt&&/^Mac/i.test(((ro=navigator.userAgentData)==null?void 0:ro.platform)||navigator.platform);var Ia="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ra=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var ao=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qt=(t,...e)=>ao("add",t,e),Na=(t,...e)=>ao("remove",t,e),_t=new WeakMap,ze=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),_t.set(t,n)}},qa=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},so=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},Pa=0,lo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Pa).toString(32)}`),t.id):"",kt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))T(o,i,r);return o},Wa={define:(t,e)=>!Yt||window.customElements.get(t)||window.customElements.define(t,e)},Va=t=>{var e;const n=T(t,"aria-label")||"";return[...(((e=T(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},st,Ua=0,Fe=t=>{st||(st=kt("div"),st.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(st,"aria-live","assertive")),st.isConnected||document.body.append(st),t&&(st.textContent=`${t}${Ua++%2?" ":""}`)},co=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Be=!1,Ge=t=>(t?.type==="mouseup"&&(Be=!1),t?.type==="mousedown"&&(Be=!0,Qt(document,"mouseup",Ge,{once:!0})),Be),Da=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,He=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
2
2
  :host(:not([data-multiple])) ::slotted(data),
3
3
  :host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
4
4
  [role="listbox"] { position: absolute } /* Avoid affecting CSS like flex on the <u-combobox> */
@@ -6,12 +6,12 @@ var mtds=(function(E){"use strict";var La=Object.defineProperty,eo=Object.getOwn
6
6
  ::slotted(del) { text-decoration: none }
7
7
  ::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
8
8
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
9
- ::slotted(data:focus) { ${Na} }`,Fa=za(Je),co="beforeinput,blur,focus,click,input,keydown,mousedown",uo={once:!0,capture:!0,passive:!0},$t="false",te=Ia||oo,mo="​".repeat(5),po="deleteContentBackward",Ba="insertText",Ga=" ",ee={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},Xe=class extends Ra{constructor(){super(),this._item="",this._speak="",this._texts=Ma({},ee),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(kt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),kt("slot"),kt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),kt("style",Je))}static get observedAttributes(){return Object.keys(ee).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=ao(this),Qt(this,co,this,!0),Fe(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ne,0,this),setTimeout(oe,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];ee[o]&&(this._texts[o]=n||ee[o])}disconnectedCallback(){Fe(this,!1),qa(this,co,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;Ze(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ja(this),t.type==="click"&&ja(this,t),t.type==="focus"&&Ha(this,t),t.type==="input"&&Za(this,t),t.type==="keydown"&&Ka(this,t),t.type==="mousedown"&&He(t),t.type==="mutation"&&ne(this,t))}get multiple(){var t;return((t=T(this,"data-multiple"))!=null?t:$t)!==$t}set multiple(t){T(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=T(this,"data-creatable"))!=null?t:$t)!==$t}set creatable(t){T(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;n&&(this._options=this.getElementsByTagName(n))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},lt=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},je=t=>t instanceof HTMLDataElement,Ze=({control:t})=>t?.disabled||t?.readOnly||!1,ne=(t,e)=>{var n,o;const{_focus:i,_texts:r,items:a,control:s,list:c,multiple:l}=t;if(!s)return;const d=Ua(s),u=d.endsWith(mo)?T(s,"data-label"):d;T(s,"data-label",u);let p=`${u}${l?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const f=[];for(const{addedNodes:y,removedNodes:A}of e?.detail||[]){for(const k of y)je(k)&&f.unshift(k);for(const k of A)je(k)&&f.push(k)}const b=l?f.length===1:f[0]===i;if(i&&b){const y=T(s,"aria-expanded"),A=T(s,"inputmode"),k=je(i)?s:i,I=!f[0].isConnected;t._speak=`${r[I?"removed":"added"]} ${lt(f[0])}, `,(te||i===s)&&Be(t._speak),s!==k&&(te&&T(s,"aria-expanded",null),te&&T(s,"inputmode","none"),p=Ga,s.focus()),setTimeout(()=>{var F;T(s,"aria-expanded",y),T(s,"inputmode",I?"none":A),(F=k?.focus)==null||F.call(k),T(s,"inputmode",A),t._speak="",te?setTimeout(ne,100,t):Qt(t,"blur",()=>ne(t),uo)},100)}let m=0;const g=t.querySelector("select"),h=Ze(t)?"":r.remove,w=(n=t.shadowRoot)==null?void 0:n.firstElementChild;w&&T(w,"aria-label",r.items);for(const y of a){const A=g?.options[m++],k=lt(y),I=y.value||k,F=`${t._speak}${k}, ${h}`;T(y,"aria-label",F),T(y,"aria-selected","true"),T(y,"role","option"),T(y,"slot","items"),T(y,"tabindex","-1"),T(y,"value",I),A?Object.assign(A,{textContent:k,value:I}):g?.appendChild(new Option(k,I,!0,!0)),oo&&T(y,"title",`${m} ${r.of} ${a.length}`)}g&&T(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(m))y.remove();!l&&m>1&&console.warn(t," Multiple <data> found in single mode."),c&&(T(c,"aria-multiselectable",`${l}`),T(s,"list",so(c)),T(s,"aria-label",`${t._speak}${p}${mo}`),c.hasAttribute("popover")&&(T(s,"popovertarget",so(c)),T(c,"popover","manual")),c._of=r.of);const x=lt(a[0]);x!==t._item&&oe(t),t._item=x,fo(t),ho(t),(o=Fe(t))==null||o.takeRecords()},fo=t=>{var e;t.clear&&T(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Ze(t))},ho=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=T(r,"value"))!=null?e:lt(r);T(r,"aria-label",n?`${n}${lt(r)}`:null),T(r,"selected",i.includes(a)?"":null)}},oe=t=>{const{multiple:e,control:n,items:o}=t,i=lt(o[0]);!e&&n&&i!==n.value&&lo(n,i,i?Ba:po)},Ke=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:c}=t,l=((n=a?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(T(f,"label")||lt(f)).trim().toLowerCase()===d);const p={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",p))||(u=[...i].find(f=>f.selected)),e)return ho(t),u?Tt(t,u,!1):r&&l?Tt(t,{value:l},!1):(!c&&!l&&s[0]?Tt(t,s[0]):oe(t),Be(o.invalid));for(const f of i)f.selected=f===u},Tt=(t,e,n=!0)=>{var o,i,r;const{control:a,items:s,multiple:c}=t,l=kt("data",e.label||e.value,{value:e.value}),d=[...s].find(f=>f.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!n)return oe(t);if(d===((o=ao(t))==null?void 0:o.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const f of[...s])f.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Ha=(t,{target:e})=>{const{_form:n,control:o,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&n===void 0&&o&&e===o&&(t._form=T(o,"form"),T(o,"form","#")),Be()},Ja=t=>He()||setTimeout(Xa,0,t),Xa=t=>{const{_focus:e,_root:n,_form:o,multiple:i,control:r}=t;!e||t.contains(n?.activeElement)||(i||Ke(t),o&&r&&T(r,"form",o),t._focus=t._form=void 0)},ja=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&lo(a,"",po),a?.focus();for(const c of s){const{top:l,right:d,bottom:u,left:p}=c.getBoundingClientRect();if(c.contains(i))return Tt(t,c);if(o>=l&&o<=u&&n>=p&&n<=d)return c.focus()}i===t&&a?.focus()},Za=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of o)if(c.value&&c.value===a)return Tt(t,c,r)}else r||Ke(t,!1);fo(t)},Ka=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let p=l?r.length:[...r].indexOf(c);if(l&&a==="Tab"&&!e.shiftKey&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Qt(o,"blur",()=>T(o,"tabindex",null),uo)),!(!l&&Pa(e)||p===-1||u)){if(a==="ArrowRight"&&!l)p+=1;else if(a==="ArrowLeft"&&!d)p-=1;else{if(a==="Enter"&&l)return Ke(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[p])return Tt(t,r[p]);l&&(p-=1)}else return l||i?.focus()}e.preventDefault(),(n=r[Math.max(0,p)]||i)==null||n.focus()}};Va.define("u-combobox",Xe);var Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ya=Ye&&/android/i.test(navigator.userAgent),go;Ye&&/^Mac/i.test(((go=navigator.userAgentData)==null?void 0:go.platform)||navigator.platform);var Qa=`${Ya?"data":"aria"}-labelledby`,Qe=":host(:not([hidden])) { display: block }",ie=typeof HTMLElement>"u"?class{}:HTMLElement;function O(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var vo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},_a=(t,...e)=>vo("add",t,e),$a=(t,...e)=>vo("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(xo("slot"),xo("style",e)),ae=new WeakMap,bo=(t,e)=>{if(e===void 0)return ae.get(t);try{ae.get(t).disconnect(),ae.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ae.set(t,n)}},ts=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},wo=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},es=0,yo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++es).toString(32)}`),t.id):"",xo=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},se={define:(t,e)=>!Ye||window.customElements.get(t)||window.customElements.define(t,e)},le=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,_e=Qe,$e=Qe,tn=Qe,en=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',ns=le(_e),os=le($e),is=le(en),rs=le(tn),ce="aria-controls",At="aria-selected",So="data-utabs",nn=class extends ie{constructor(){super(),re(this,_e)}connectedCallback(){O(this,So,"")}get tabList(){return de("tablist",this)[0]||null}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){mn(this.tabs[t])}get tabs(){return de("tab",this)}get panels(){return de("tabpanel",this)}},on=class extends ie{constructor(){super(),re(this,$e)}connectedCallback(){O(this,"role","tablist"),_a(this,"click,keydown",this),bo(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){$a(this,"click,keydown",this),bo(this,!1)}handleEvent(t){var e,n;if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(At,"true")}const{key:o}=t,i=[...this.tabs],r=i.findIndex(s=>s.contains(t.target));let a=r;if(!(t.defaultPrevented||r===-1)&&(t.type==="click"&&mn(i[r]),t.type==="keydown"&&!ts(t))){if(o==="ArrowDown"||o==="ArrowRight")a=(r+1)%i.length;else if(o==="ArrowUp"||o==="ArrowLeft")a=(r||i.length)-1;else if(o==="End")a=i.length-1;else if(o==="Home")a=0;else if(o==="Tab")a=ue(i);else return;setTimeout(()=>{O(i[r],"tabindex","-1"),O(i[a],"tabindex","0")}),o!=="Tab"&&(t.preventDefault(),(n=(e=i[a]).focus)==null||n.call(e))}}get tabsElement(){return dn(this)}get tabs(){return un(this)}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){mn(this.tabs[t])}},rn=!1,an=class extends ie{static get observedAttributes(){return["id",At,ce]}constructor(){super(),re(this,en)}connectedCallback(){O(this,"role","tab"),O(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!rn&&this.selected&&this.tabList){rn=!0;const t=this.tabList?un(this.tabList):[],e=de("tabpanel",this.tabsElement||this),n=cn(this,e[[...t].indexOf(this)]);n&&O(n,Qa,yo(this));let o=0;for(const i of t){const r=cn(i,e[o++]);O(i,"tabindex",i===this?"0":"-1"),O(i,At,`${i===this}`),r?.id&&O(i,ce,r.id),r&&(r.hidden=r!==n)}rn=!1}}get tabsElement(){return dn(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return O(this,At)==="true"}set selected(t){O(this,At,`${!!t}`)}get index(){const t=this.tabList;return t?[...un(t)].indexOf(this):0}get panel(){return cn(this)}},sn=!1,ln=class extends ie{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,tn)}connectedCallback(){var t,e;O(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(sn)return;sn=!0;const t=as(this.firstChild);this.hidden=ue(this.tabs)===-1,O(this,"aria-hidden",`${this.hidden}`),O(this,"tabindex",this.hidden||t?null:"0"),sn=!1}get tabsElement(){return dn(this)}get tabs(){return wo(this).querySelectorAll(`[role="tab"][${ce}="${this.id}"]`)}},de=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),cn=(t,e)=>wo(t).getElementById(O(t,ce)||yo(e)),ue=t=>[...t].findIndex(e=>O(e,At)==="true"),dn=t=>t.closest(`[${So}]`),un=t=>t.querySelectorAll(':scope > [role="tab"]'),mn=t=>t&&O(t,"aria-disabled")!=="true"&&O(t,"aria-selected","true"),as=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');se.define("u-tabs",nn),se.define("u-tablist",on),se.define("u-tab",an),se.define("u-tabpanel",ln);var Eo=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ko;Eo&&/^Mac/i.test(((ko=navigator.userAgentData)==null?void 0:ko.platform)||navigator.platform);var ss=":host(:not([hidden])) { display: block }",To=typeof HTMLElement>"u"?class{}:HTMLElement;function _(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ao=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Lo=(t,...e)=>Ao("add",t,e),Co=(t,...e)=>Ao("remove",t,e),ls=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},cs=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},pn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))_(o,i,r);return o},Oo={define:(t,e)=>!Eo||window.customElements.get(t)||window.customElements.define(t,e)},ds=`${ss}
9
+ ::slotted(data:focus) { ${Ia} }`,za=Da(He),uo="beforeinput,blur,focus,click,input,keydown,mousedown",mo={once:!0,capture:!0,passive:!0},$t="false",te=Oa||io,po="​".repeat(5),fo="deleteContentBackward",Fa="insertText",Ba=" ",ee={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},Je=class extends Ra{constructor(){super(),this._item="",this._speak="",this._texts=Ma({},ee),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(kt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),kt("slot"),kt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),kt("style",He))}static get observedAttributes(){return Object.keys(ee).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=so(this),Qt(this,uo,this,!0),ze(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ne,0,this),setTimeout(oe,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];ee[o]&&(this._texts[o]=n||ee[o])}disconnectedCallback(){ze(this,!1),Na(this,uo,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;je(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ha(this),t.type==="click"&&Xa(this,t),t.type==="focus"&&Ga(this,t),t.type==="input"&&ja(this,t),t.type==="keydown"&&Za(this,t),t.type==="mousedown"&&Ge(t),t.type==="mutation"&&ne(this,t))}get multiple(){var t;return((t=T(this,"data-multiple"))!=null?t:$t)!==$t}set multiple(t){T(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=T(this,"data-creatable"))!=null?t:$t)!==$t}set creatable(t){T(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;n&&(this._options=this.getElementsByTagName(n))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},lt=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Xe=t=>t instanceof HTMLDataElement,je=({control:t})=>t?.disabled||t?.readOnly||!1,ne=(t,e)=>{var n,o;const{_focus:i,_texts:r,items:a,control:s,list:c,multiple:l}=t;if(!s)return;const d=Va(s),u=d.endsWith(po)?T(s,"data-label"):d;T(s,"data-label",u);let p=`${u}${l?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const f=[];for(const{addedNodes:y,removedNodes:A}of e?.detail||[]){for(const k of y)Xe(k)&&f.unshift(k);for(const k of A)Xe(k)&&f.push(k)}const b=l?f.length===1:f[0]===i;if(i&&b){const y=T(s,"aria-expanded"),A=T(s,"inputmode"),k=Xe(i)?s:i,I=!f[0].isConnected;t._speak=`${r[I?"removed":"added"]} ${lt(f[0])}, `,(te||i===s)&&Fe(t._speak),s!==k&&(te&&T(s,"aria-expanded",null),te&&T(s,"inputmode","none"),p=Ba,s.focus()),setTimeout(()=>{var F;T(s,"aria-expanded",y),T(s,"inputmode",I?"none":A),(F=k?.focus)==null||F.call(k),T(s,"inputmode",A),t._speak="",te?setTimeout(ne,100,t):Qt(t,"blur",()=>ne(t),mo)},100)}let m=0;const g=t.querySelector("select"),h=je(t)?"":r.remove,w=(n=t.shadowRoot)==null?void 0:n.firstElementChild;w&&T(w,"aria-label",r.items);for(const y of a){const A=g?.options[m++],k=lt(y),I=y.value||k,F=`${t._speak}${k}, ${h}`;T(y,"aria-label",F),T(y,"aria-selected","true"),T(y,"role","option"),T(y,"slot","items"),T(y,"tabindex","-1"),T(y,"value",I),A?Object.assign(A,{textContent:k,value:I}):g?.appendChild(new Option(k,I,!0,!0)),io&&T(y,"title",`${m} ${r.of} ${a.length}`)}g&&T(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(m))y.remove();!l&&m>1&&console.warn(t," Multiple <data> found in single mode."),c&&(T(c,"aria-multiselectable",`${l}`),T(s,"list",lo(c)),T(s,"aria-label",`${t._speak}${p}${po}`),c.hasAttribute("popover")&&(T(s,"popovertarget",lo(c)),T(c,"popover","manual")),c._of=r.of);const x=lt(a[0]);x!==t._item&&oe(t),t._item=x,ho(t),go(t),(o=ze(t))==null||o.takeRecords()},ho=t=>{var e;t.clear&&T(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||je(t))},go=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=T(r,"value"))!=null?e:lt(r);T(r,"aria-label",n?`${n}${lt(r)}`:null),T(r,"selected",i.includes(a)?"":null)}},oe=t=>{const{multiple:e,control:n,items:o}=t,i=lt(o[0]);!e&&n&&i!==n.value&&co(n,i,i?Fa:fo)},Ze=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:c}=t,l=((n=a?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(T(f,"label")||lt(f)).trim().toLowerCase()===d);const p={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",p))||(u=[...i].find(f=>f.selected)),e)return go(t),u?Tt(t,u,!1):r&&l?Tt(t,{value:l},!1):(!c&&!l&&s[0]?Tt(t,s[0]):oe(t),Fe(o.invalid));for(const f of i)f.selected=f===u},Tt=(t,e,n=!0)=>{var o,i,r;const{control:a,items:s,multiple:c}=t,l=kt("data",e.label||e.value,{value:e.value}),d=[...s].find(f=>f.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!n)return oe(t);if(d===((o=so(t))==null?void 0:o.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const f of[...s])f.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Ga=(t,{target:e})=>{const{_form:n,control:o,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&n===void 0&&o&&e===o&&(t._form=T(o,"form"),T(o,"form","#")),Fe()},Ha=t=>Ge()||setTimeout(Ja,0,t),Ja=t=>{const{_focus:e,_root:n,_form:o,multiple:i,control:r}=t;!e||t.contains(n?.activeElement)||(i||Ze(t),o&&r&&T(r,"form",o),t._focus=t._form=void 0)},Xa=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&co(a,"",fo),a?.focus();for(const c of s){const{top:l,right:d,bottom:u,left:p}=c.getBoundingClientRect();if(c.contains(i))return Tt(t,c);if(o>=l&&o<=u&&n>=p&&n<=d)return c.focus()}i===t&&a?.focus()},ja=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of o)if(c.value&&c.value===a)return Tt(t,c,r)}else r||Ze(t,!1);ho(t)},Za=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let p=l?r.length:[...r].indexOf(c);if(l&&a==="Tab"&&!e.shiftKey&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Qt(o,"blur",()=>T(o,"tabindex",null),mo)),!(!l&&qa(e)||p===-1||u)){if(a==="ArrowRight"&&!l)p+=1;else if(a==="ArrowLeft"&&!d)p-=1;else{if(a==="Enter"&&l)return Ze(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[p])return Tt(t,r[p]);l&&(p-=1)}else return l||i?.focus()}e.preventDefault(),(n=r[Math.max(0,p)]||i)==null||n.focus()}};Wa.define("u-combobox",Je);var Ke=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ka=Ke&&/android/i.test(navigator.userAgent),vo;Ke&&/^Mac/i.test(((vo=navigator.userAgentData)==null?void 0:vo.platform)||navigator.platform);var Ya=`${Ka?"data":"aria"}-labelledby`,Ye=":host(:not([hidden])) { display: block }",ie=typeof HTMLElement>"u"?class{}:HTMLElement;function M(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var bo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qa=(t,...e)=>bo("add",t,e),_a=(t,...e)=>bo("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(So("slot"),So("style",e)),ae=new WeakMap,wo=(t,e)=>{if(e===void 0)return ae.get(t);try{ae.get(t).disconnect(),ae.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ae.set(t,n)}},$a=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},yo=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},ts=0,xo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ts).toString(32)}`),t.id):"",So=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},se={define:(t,e)=>!Ke||window.customElements.get(t)||window.customElements.define(t,e)},le=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Qe=Ye,_e=Ye,$e=Ye,tn=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',es=le(Qe),ns=le(_e),os=le(tn),is=le($e),ce="aria-controls",At="aria-selected",Eo="data-utabs",en=class extends ie{constructor(){super(),re(this,Qe)}connectedCallback(){M(this,Eo,"")}get tabList(){return de("tablist",this)[0]||null}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){un(this.tabs[t])}get tabs(){return de("tab",this)}get panels(){return de("tabpanel",this)}},nn=class extends ie{constructor(){super(),re(this,_e)}connectedCallback(){M(this,"role","tablist"),Qa(this,"click,keydown",this),wo(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){_a(this,"click,keydown",this),wo(this,!1)}handleEvent(t){var e,n;if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(At,"true")}const{key:o}=t,i=[...this.tabs],r=i.findIndex(s=>s.contains(t.target));let a=r;if(!(t.defaultPrevented||r===-1)&&(t.type==="click"&&un(i[r]),t.type==="keydown"&&!$a(t))){if(o==="ArrowDown"||o==="ArrowRight")a=(r+1)%i.length;else if(o==="ArrowUp"||o==="ArrowLeft")a=(r||i.length)-1;else if(o==="End")a=i.length-1;else if(o==="Home")a=0;else if(o==="Tab")a=ue(i);else return;setTimeout(()=>{M(i[r],"tabindex","-1"),M(i[a],"tabindex","0")}),o!=="Tab"&&(t.preventDefault(),(n=(e=i[a]).focus)==null||n.call(e))}}get tabsElement(){return cn(this)}get tabs(){return dn(this)}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){un(this.tabs[t])}},on=!1,rn=class extends ie{static get observedAttributes(){return["id",At,ce]}constructor(){super(),re(this,tn)}connectedCallback(){M(this,"role","tab"),M(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!on&&this.selected&&this.tabList){on=!0;const t=this.tabList?dn(this.tabList):[],e=de("tabpanel",this.tabsElement||this),n=ln(this,e[[...t].indexOf(this)]);n&&M(n,Ya,xo(this));let o=0;for(const i of t){const r=ln(i,e[o++]);M(i,"tabindex",i===this?"0":"-1"),M(i,At,`${i===this}`),r?.id&&M(i,ce,r.id),r&&(r.hidden=r!==n)}on=!1}}get tabsElement(){return cn(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return M(this,At)==="true"}set selected(t){M(this,At,`${!!t}`)}get index(){const t=this.tabList;return t?[...dn(t)].indexOf(this):0}get panel(){return ln(this)}},an=!1,sn=class extends ie{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,$e)}connectedCallback(){var t,e;M(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(an)return;an=!0;const t=rs(this.firstChild);this.hidden=ue(this.tabs)===-1,M(this,"aria-hidden",`${this.hidden}`),M(this,"tabindex",this.hidden||t?null:"0"),an=!1}get tabsElement(){return cn(this)}get tabs(){return yo(this).querySelectorAll(`[role="tab"][${ce}="${this.id}"]`)}},de=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),ln=(t,e)=>yo(t).getElementById(M(t,ce)||xo(e)),ue=t=>[...t].findIndex(e=>M(e,At)==="true"),cn=t=>t.closest(`[${Eo}]`),dn=t=>t.querySelectorAll(':scope > [role="tab"]'),un=t=>t&&M(t,"aria-disabled")!=="true"&&M(t,"aria-selected","true"),rs=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');se.define("u-tabs",en),se.define("u-tablist",nn),se.define("u-tab",rn),se.define("u-tabpanel",sn);var ko=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",To;ko&&/^Mac/i.test(((To=navigator.userAgentData)==null?void 0:To.platform)||navigator.platform);var as=":host(:not([hidden])) { display: block }",Ao=typeof HTMLElement>"u"?class{}:HTMLElement;function _(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Lo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Co=(t,...e)=>Lo("add",t,e),Mo=(t,...e)=>Lo("remove",t,e),ss=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},ls=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},mn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))_(o,i,r);return o},Oo={define:(t,e)=>!ko||window.customElements.get(t)||window.customElements.define(t,e)},cs=`${as}
10
10
  ::slotted([slot="summary"]) { cursor: pointer; display: block }
11
11
  ::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
12
12
  ::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
13
- :host > [part="details-content"]:not([hidden=""]) { display: block }`,us=class extends To{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(pn("slot",null,{name:"summary"}),pn("slot",null,{part:"details-content"}),pn("style",ds)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
14
- Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],_(this,"role","group"),Lo(this._content,"beforematch",this),Lo(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Co(this._content,"beforematch",this),Co(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"&&_(r,"aria-expanded",`${i}`);if(this._content&&(_(this._content,"aria-hidden",`${!i}`),_(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=cs(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const n=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&ls(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){_(this,"open",t?"":null)}get name(){return _(this,"name")||""}set name(t){_(this,"name",t)}},ms=class extends To{connectedCallback(){_(this,"role","button"),this.slot="summary",this.tabIndex=0}};Oo.define("u-details",us),Oo.define("u-summary",ms);const ps=`@font-face {
13
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`,ds=class extends Ao{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(mn("slot",null,{name:"summary"}),mn("slot",null,{part:"details-content"}),mn("style",cs)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
14
+ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],_(this,"role","group"),Co(this._content,"beforematch",this),Co(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Mo(this._content,"beforematch",this),Mo(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"&&_(r,"aria-expanded",`${i}`);if(this._content&&(_(this._content,"aria-hidden",`${!i}`),_(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=ls(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const n=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&ss(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){_(this,"open",t?"":null)}get name(){return _(this,"name")||""}set name(t){_(this,"name",t)}},us=class extends Ao{connectedCallback(){_(this,"role","button"),this.slot="summary",this.tabIndex=0}};Oo.define("u-details",ds),Oo.define("u-summary",us);const ms=`@font-face {
15
15
  font-family: 'Mattilsynet Sans';
16
16
  font-style: normal italic;
17
17
  font-weight: 100 900;
@@ -46,13 +46,13 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
46
46
  --mtdsc-print-front-color: #054449;
47
47
  --mtdsc-print-back-background: #e2f1df;
48
48
  --mtdsc-print-back-color: #054449;
49
+ --mtdsc-print-office: "hovedkontoret";
50
+ --mtdsc-print-department: "";
49
51
  --mtdsc-print-back-tagline: "Sammen trygger vi framtiden\\00000afor mennesker, dyr og natur";
50
- --mtdsc-print-back-footer: "Mattilsynet\\00000a" var(--mtdsc-print-bottom-center);;
52
+ --mtdsc-print-back-footer: "Mattilsynet\\00000a" var(--mtdsc-print-bottom-center);
51
53
  --mtdsc-print-bottom-left: "Mattilsynet\\00000a" var(--mtdsc-print-office) "\\00000a" var(--mtdsc-print-department);
52
54
  --mtdsc-print-bottom-center: "Felles postmottak\\00000aPostboks 383\\00000a2381 BRUMUNDDAL";
53
55
  --mtdsc-print-bottom-right: "Tlf: 22 40 00 00\\00000aE-post: postmottak@mattilsynet.no\\00000aOrg.nr: 985399077";
54
- --mtdsc-print-office: "hovedkontoret";
55
- --mtdsc-print-deparment: "";
56
56
  --mtdsc-print-classification: "Unntatt offentlighet\\00000affl. § 13 første ledd jf fvl. § 13 første ledd";
57
57
 
58
58
  --_mtdsc-print-footer-demo: "Footer added when printing\\00000aor when generating PDF";
@@ -191,12 +191,12 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
191
191
  }
192
192
  @bottom-center { content: none }
193
193
  @bottom-right { content: none }
194
- }`,B={passive:!0,capture:!0},ct=()=>typeof window<"u"&&typeof document<"u",fs=()=>ct()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),me=typeof HTMLElement>"u"?class{}:HTMLElement;function Lt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const dt=(t,...e)=>typeof window>"u"||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),S=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),hs=/^["']|["']$/g,qt=(t,e)=>{let n=S(t,e);return n||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(hs,"").trim()||null,n||dt(`Missing ${e} on:`,t),n},q=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>fn(t,...e)},fn=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},ut=(t,e)=>{ct()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))};let hn=!1;const mt=(t,e,n)=>{let o=0,i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{!hn&&!o&&(o=requestAnimationFrame(i))});return a.observe(t,n),requestAnimationFrame(i),r},Mo=(t,e)=>{hn=!0,t.textContent=e,requestAnimationFrame(gs)},gs=()=>{hn=!1},Io=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))S(n,o,i);return n},$={define:(t,e)=>!ct()||window.customElements.get(t)||window.customElements.define(t,e)};let vs=0;const bs=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function pt(t){return t&&!t.id&&(t.id=`${bs}${++vs}`),t?.id||""}const No=":click-delegate-hover",Ro="data-clickdelegatefor",ws=`[${Ro}]`,ys=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.isTrusted&&t.button<2&&qo(t);if(!(!n||n.contains(t.target))){if(e&&n instanceof HTMLAnchorElement)return window.open(n.href,void 0,n.rel);t.stopImmediatePropagation(),n.click()}};let pe;const xs=t=>{let e=qo(t);pe!==e&&(pe&&pe.classList.remove(No),e&&e.classList.add(No),pe=e)},qo=({target:t})=>{let e=(t instanceof Element?t.closest(ws):null)?.getAttribute(Ro),n=e&&document.getElementById(e)||void 0,o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&!n?.disabled?n:void 0};ut("clickdelegatefor",()=>[q(window,"click auxclick",ys,!0),q(document,"mouseover",xs,B)]);let gn=!1;const Ss=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();gn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!gn&&S(e,"closedby")==="any";gn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},Es=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))S(t,"aria-haspopup","dialog")},ks=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();ut("dialog",()=>[q(document,"command",ks,B),q(document,"pointerdown pointerup",Ss,B),mt(document,Es,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Ct=Math.min,U=Math.max,fe=Math.round,he=Math.floor,Z=t=>({x:t,y:t}),Ts={left:"right",right:"left",bottom:"top",top:"bottom"},As={start:"end",end:"start"};function Po(t,e,n){return U(t,Ct(e,n))}function ft(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function vn(t){return t==="x"?"y":"x"}function Wo(t){return t==="y"?"height":"width"}const Ls=new Set(["top","bottom"]);function K(t){return Ls.has(tt(t))?"y":"x"}function Vo(t){return vn(K(t))}function Cs(t,e,n){n===void 0&&(n=!1);const o=Pt(t),i=Vo(t),r=Wo(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ge(a)),[a,ge(a)]}function Os(t){const e=ge(t);return[bn(t),e,bn(e)]}function bn(t){return t.replace(/start|end/g,e=>As[e])}const Uo=["left","right"],Do=["right","left"],Ms=["top","bottom"],Is=["bottom","top"];function Ns(t,e,n){switch(t){case"top":case"bottom":return n?e?Do:Uo:e?Uo:Do;case"left":case"right":return e?Ms:Is;default:return[]}}function Rs(t,e,n,o){const i=Pt(t);let r=Ns(tt(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(bn)))),r}function ge(t){return t.replace(/left|right|bottom|top/g,e=>Ts[e])}function qs(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ps(t){return typeof t!="number"?qs(t):{top:t,right:t,bottom:t,left:t}}function ve(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function zo(t,e,n){let{reference:o,floating:i}=t;const r=K(e),a=Vo(e),s=Wo(a),c=tt(e),l=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pt(e)){case"start":f[a]-=p*(n&&l?-1:1);break;case"end":f[a]+=p*(n&&l?-1:1);break}return f}async function Ws(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=ft(e,t),b=Ps(f),g=s[p?u==="floating"?"reference":"floating":u],h=ve(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),y=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},A=ve(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(h.top-A.top+b.top)/y.y,bottom:(A.bottom-h.bottom+b.bottom)/y.y,left:(h.left-A.left+b.left)/y.x,right:(A.right-h.right+b.right)/y.x}}const Vs=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=zo(l,o,c),p=o,f={},b=0;for(let g=0;g<s.length;g++){var m;const{name:h,fn:w}=s[g],{x,y,data:A,reset:k}=await w({x:d,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:l,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:Ws},elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[h]:{...f[h],...A}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:d,y:u}=zo(l,p,c)),g=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:f}},Us=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=ft(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),w=K(s),x=tt(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),A=p||(x||!m?[ge(s)]:Os(s)),k=b!=="none";!p&&k&&A.push(...Rs(s,m,b,y));const I=[s,...A],F=await c.detectOverflow(e,g),xt=[];let nt=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&xt.push(F[h]),u){const St=Cs(i,a,y);xt.push(F[St[0]],F[St[1]])}if(nt=[...nt,{placement:i,overflows:xt}],!xt.every(St=>St<=0)){var Xt,jt;const St=(((Xt=r.flip)==null?void 0:Xt.index)||0)+1,to=I[St];if(to&&(!(u==="alignment"?w!==K(to):!1)||nt.every(j=>K(j.placement)===w?j.overflows[0]>0:!0)))return{data:{index:St,overflows:nt},reset:{placement:to}};let Kt=(jt=nt.filter(Et=>Et.overflows[0]<=0).sort((Et,j)=>Et.overflows[1]-j.overflows[1])[0])==null?void 0:jt.placement;if(!Kt)switch(f){case"bestFit":{var Zt;const Et=(Zt=nt.filter(j=>{if(k){const at=K(j.placement);return at===w||at==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(at=>at>0).reduce((at,du)=>at+du,0)]).sort((j,at)=>j[1]-at[1])[0])==null?void 0:Zt[0];Et&&(Kt=Et);break}case"initialPlacement":Kt=s;break}if(i!==Kt)return{reset:{placement:Kt}}}return{}}}},Fo=new Set(["left","top"]);async function Ds(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=tt(n),s=Pt(n),c=K(n)==="y",l=Fo.has(a)?-1:1,d=r&&c?-1:1,u=ft(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),c?{x:f*d,y:p*l}:{x:p*l,y:f*d}}const zs=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=e,c=await Ds(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:a}}}}},Fs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:h=>{let{x:w,y:x}=h;return{x:w,y:x}}},...l}=ft(t,e),d={x:n,y:o},u=await r.detectOverflow(e,l),p=K(tt(i)),f=vn(p);let b=d[f],m=d[p];if(a){const h=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=b+u[h],y=b-u[w];b=Po(x,b,y)}if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=m+u[h],y=m-u[w];m=Po(x,m,y)}const g=c.fn({...e,[f]:b,[p]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:a,[p]:s}}}}}},Bs=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ft(t,e),d={x:n,y:o},u=K(i),p=vn(u);let f=d[p],b=d[u];const m=ft(s,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=p==="y"?"height":"width",y=r.reference[p]-r.floating[x]+g.mainAxis,A=r.reference[p]+r.reference[x]-g.mainAxis;f<y?f=y:f>A&&(f=A)}if(l){var h,w;const x=p==="y"?"width":"height",y=Fo.has(tt(i)),A=r.reference[u]-r.floating[x]+(y&&((h=a.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[x]+(y?0:((w=a.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);b<A?b=A:b>k&&(b=k)}return{[p]:f,[u]:b}}}},Gs=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:c=()=>{},...l}=ft(t,e),d=await a.detectOverflow(e,l),u=tt(i),p=Pt(i),f=K(i)==="y",{width:b,height:m}=r.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(h=u,g=p==="end"?"top":"bottom");const w=m-d.top-d.bottom,x=b-d.left-d.right,y=Ct(m-d[g],w),A=Ct(b-d[h],x),k=!e.middlewareData.shift;let I=y,F=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(F=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(I=w),k&&!p){const nt=U(d.left,0),Xt=U(d.right,0),jt=U(d.top,0),Zt=U(d.bottom,0);f?F=b-2*(nt!==0||Xt!==0?nt+Xt:U(d.left,d.right)):I=m-2*(jt!==0||Zt!==0?jt+Zt:U(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:I});const xt=await a.getDimensions(s.floating);return b!==xt.width||m!==xt.height?{reset:{rects:!0}}:{}}}};function be(){return typeof window<"u"}function Ot(t){return Bo(t)?(t.nodeName||"").toLowerCase():"#document"}function D(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Bo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Bo(t){return be()?t instanceof Node||t instanceof D(t).Node:!1}function G(t){return be()?t instanceof Element||t instanceof D(t).Element:!1}function Q(t){return be()?t instanceof HTMLElement||t instanceof D(t).HTMLElement:!1}function Go(t){return!be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof D(t).ShadowRoot}const Hs=new Set(["inline","contents"]);function Wt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Hs.has(i)}const Js=new Set(["table","td","th"]);function Xs(t){return Js.has(Ot(t))}const js=[":popover-open",":modal"];function we(t){return js.some(e=>{try{return t.matches(e)}catch{return!1}})}const Zs=["transform","translate","scale","rotate","perspective"],Ks=["transform","translate","scale","rotate","perspective","filter"],Ys=["paint","layout","strict","content"];function wn(t){const e=yn(),n=G(t)?H(t):t;return Zs.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ks.some(o=>(n.willChange||"").includes(o))||Ys.some(o=>(n.contain||"").includes(o))}function Qs(t){let e=ot(t);for(;Q(e)&&!Mt(e);){if(wn(e))return e;if(we(e))return null;e=ot(e)}return null}function yn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _s=new Set(["html","body","#document"]);function Mt(t){return _s.has(Ot(t))}function H(t){return D(t).getComputedStyle(t)}function ye(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ot(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Go(t)&&t.host||Y(t);return Go(e)?e.host:e}function Ho(t){const e=ot(t);return Mt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Q(e)&&Wt(e)?e:Ho(e)}function Vt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ho(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=D(i);if(r){const s=xn(a);return e.concat(a,a.visualViewport||[],Wt(i)?i:[],s&&n?Vt(s):[])}return e.concat(i,Vt(i,[],n))}function xn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Jo(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Q(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=fe(n)!==r||fe(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function Sn(t){return G(t)?t:t.contextElement}function It(t){const e=Sn(t);if(!Q(e))return Z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Jo(e);let a=(r?fe(n.width):n.width)/o,s=(r?fe(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const $s=Z(0);function Xo(t){const e=D(t);return!yn()||!e.visualViewport?$s:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function tl(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==D(t)?!1:e}function ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Sn(t);let a=Z(1);e&&(o?G(o)&&(a=It(o)):a=It(t));const s=tl(r,n,o)?Xo(r):Z(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const p=D(r),f=o&&G(o)?D(o):o;let b=p,m=xn(b);for(;m&&o&&f!==b;){const g=It(m),h=m.getBoundingClientRect(),w=H(m),x=h.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=x,l+=y,b=D(m),m=xn(b)}}return ve({width:d,height:u,x:c,y:l})}function xe(t,e){const n=ye(t).scrollLeft;return e?e.left+n:ht(Y(t)).left+n}function jo(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-xe(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function el(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=Y(o),s=e?we(e.floating):!1;if(o===a||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=Z(1);const d=Z(0),u=Q(o);if((u||!u&&!r)&&((Ot(o)!=="body"||Wt(a))&&(c=ye(o)),Q(o))){const f=ht(o);l=It(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const p=a&&!u&&!r?jo(a,c):Z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function nl(t){return Array.from(t.getClientRects())}function ol(t){const e=Y(t),n=ye(t),o=t.ownerDocument.body,i=U(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=U(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+xe(t);const s=-n.scrollTop;return H(o).direction==="rtl"&&(a+=U(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Zo=25;function il(t,e){const n=D(t),o=Y(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;const d=yn();(!d||d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=xe(o);if(l<=0){const d=o.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(o.clientWidth-u.clientWidth-f);b<=Zo&&(r-=b)}else l<=Zo&&(r+=l);return{width:r,height:a,x:s,y:c}}const rl=new Set(["absolute","fixed"]);function al(t,e){const n=ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Q(t)?It(t):Z(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:a,height:s,x:c,y:l}}function Ko(t,e,n){let o;if(e==="viewport")o=il(t,n);else if(e==="document")o=ol(Y(t));else if(G(e))o=al(e,n);else{const i=Xo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ve(o)}function Yo(t,e){const n=ot(t);return n===e||!G(n)||Mt(n)?!1:H(n).position==="fixed"||Yo(n,e)}function sl(t,e){const n=e.get(t);if(n)return n;let o=Vt(t,[],!1).filter(s=>G(s)&&Ot(s)!=="body"),i=null;const r=H(t).position==="fixed";let a=r?ot(t):t;for(;G(a)&&!Mt(a);){const s=H(a),c=wn(a);!c&&s.position==="fixed"&&(i=null),(r?!c&&!i:!c&&s.position==="static"&&!!i&&rl.has(i.position)||Wt(a)&&!c&&Yo(t,a))?o=o.filter(d=>d!==a):i=s,a=ot(a)}return e.set(t,o),o}function ll(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?we(e)?[]:sl(e,this._c):[].concat(n),o],s=a[0],c=a.reduce((l,d)=>{const u=Ko(e,d,i);return l.top=U(u.top,l.top),l.right=Ct(u.right,l.right),l.bottom=Ct(u.bottom,l.bottom),l.left=U(u.left,l.left),l},Ko(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function cl(t){const{width:e,height:n}=Jo(t);return{width:e,height:n}}function dl(t,e,n){const o=Q(e),i=Y(e),r=n==="fixed",a=ht(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=Z(0);function l(){c.x=xe(i)}if(o||!o&&!r)if((Ot(e)!=="body"||Wt(i))&&(s=ye(e)),o){const f=ht(e,!0,r,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();r&&!o&&i&&l();const d=i&&!o&&!r?jo(i,s):Z(0),u=a.left+s.scrollLeft-c.x-d.x,p=a.top+s.scrollTop-c.y-d.y;return{x:u,y:p,width:a.width,height:a.height}}function En(t){return H(t).position==="static"}function Qo(t,e){if(!Q(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function _o(t,e){const n=D(t);if(we(t))return n;if(!Q(t)){let i=ot(t);for(;i&&!Mt(i);){if(G(i)&&!En(i))return i;i=ot(i)}return n}let o=Qo(t,e);for(;o&&Xs(o)&&En(o);)o=Qo(o,e);return o&&Mt(o)&&En(o)&&!wn(o)?n:o||Qs(t)||n}const ul=async function(t){const e=this.getOffsetParent||_o,n=this.getDimensions,o=await n(t.floating);return{reference:dl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ml(t){return H(t).direction==="rtl"}const pl={convertOffsetParentRelativeRectToViewportRelativeRect:el,getDocumentElement:Y,getClippingRect:ll,getOffsetParent:_o,getElementRects:ul,getClientRects:nl,getDimensions:cl,getScale:It,isElement:G,isRTL:ml};function $o(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fl(t,e){let n=null,o;const i=Y(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();const l=t.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=l;if(s||e(),!p||!f)return;const b=he(u),m=he(i.clientWidth-(d+p)),g=he(i.clientHeight-(u+f)),h=he(d),x={rootMargin:-b+"px "+-m+"px "+-g+"px "+-h+"px",threshold:U(0,Ct(1,c))||1};let y=!0;function A(k){const I=k[0].intersectionRatio;if(I!==c){if(!y)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!$o(l,t.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return a(!0),r}function hl(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Sn(t),d=i||r?[...l?Vt(l):[],...Vt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=l&&s?fl(l,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let b,m=c?ht(t):null;c&&g();function g(){const h=ht(t);m&&!$o(m,h)&&n(),m=h,b=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(b)}}const gl=zs,vl=Fs,bl=Us,wl=Gs,yl=Bs,xl=(t,e,n)=>{const o=new Map,i={platform:pl,...n},r={...i.platform,_c:o};return Vs(t,e,{...i,platform:r})},ti="data-placement",ei="data-autoplacement",Ut=new Map;function Sl(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&ni(o,"--_ds-floating");if(!r)return;if(e==="closed")return Ut.get(o)?.();if(!i){let b=o.getRootNode(),m=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&b?.querySelector?.(m)||void 0}if(!i||i===o||n&&n===e)return;let a=ni(o,"--_ds-floating-overscroll"),s=S(o,ti)||S(i,ti)||r,c=S(o,ei)||S(i,ei),l=parseFloat(getComputedStyle(o,"::before").height)||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(s==="none")return;let p={strategy:"absolute",placement:s,middleware:[gl(l||0),vl({padding:10,limiter:yl({offset:{mainAxis:u}})}),kl(),...c==="false"?[]:[bl({padding:10,crossAxis:!1})],...a?[wl({apply({availableHeight:b}){a==="fit"&&(o.style.width=`${i.clientWidth}px`),o.style.maxHeight=`${Math.max(50,b-20)}px`}})]:[]]},f=hl(i,o,async()=>{if(!i?.isConnected)return Ut.get(o)?.();let{x:b,y:m}=await xl(i,o,p);o.style.translate=`${b}px ${m}px`});Ut.set(o,()=>Ut.delete(o)&&f())}let Se;const El=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Ut)e.showPopover()};ut("popover",()=>[q(document,"mousedown scroll mouseup",El,!0),q(document,"toggle ds-toggle-source",Sl,B)]);const ni=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),kl=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),S(e,"data-floating",t.placement),t}}),kn=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||S(t,"aria-readonly")==="true"),Tl=t=>{if(t.key!=="Tab"&&kn(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&S(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),n=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+n)%e.length]?.focus()}},Al=t=>{let e=t.target?.closest?.("label")?.control||t.target;kn(e)&&(t.preventDefault(),e.focus())},Ll=t=>{t.target instanceof HTMLSelectElement&&kn(t.target)&&t.preventDefault()};ut("readonly",()=>[q(document,"keydown",Tl),q(document,"click",Al),q(document,"mousedown",Ll)]);const Tn="data-toggle-group",oi=`[${Tn}]`,Cl=Lt(()=>{for(let t of document.querySelectorAll(oi))S(t,"aria-label",qt(t,Tn))},0),Ol=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(oi);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let n=e.getElementsByTagName("input"),o=[...n].indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+o+i)%n.length]?.focus()}};ut("toggle-group",()=>[q(document,"keydown",Ol),mt(document,Cl,{attributeFilter:[Tn],attributes:!0,childList:!0,subtree:!0})]);let P,Ee,ii=0,ri=0;const gt="data-tooltip",An="data-color",ai="aria-label",si="aria-description",Ml=`[${An}]`,Il=`[${gt}]`,Ln="data-color-scheme",Nl=`[${Ln}]`,li=t=>{t&&!(t instanceof HTMLElement)&&dt("setTooltipElement expects an HTMLElement, got: ",t),P=t||void 0},Rl=Lt(()=>{for(let t of document.querySelectorAll(Il)){let e=t.getAttribute(ai)||t.getAttribute(si),n=t.getAttribute(gt)||qt(t,gt);if(e!==n){let o=S(t,"role")!=="img"&&t.textContent?.trim();S(t,gt,n),S(t,ai,o?null:n),S(t,si,o?n:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||dt('Missing tabindex="0" attribute on: ',t)}}},0),ci=({type:t,target:e})=>{if(clearTimeout(ii),e===P)return;if(t==="mouseover"&&!Ee){ii=setTimeout(ci,300,{target:e});return}let n=e?.closest?.(`[${gt}]`);if(n===Ee)return;if(!n)return di();P||=Io("div",{class:"ds-tooltip"}),P.isConnected||document.body.appendChild(P);let o=n.closest(Ml),i=n.closest(Nl),r=o!==i&&o?.contains(i);clearTimeout(ri),S(P,"popover","manual"),S(P,Ln,i?.getAttribute(Ln)||null),S(P,An,r&&o?.getAttribute(An)||null),Mo(P,S(n,gt)),P.showPopover(),P.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),Ee=n},di=()=>P?.isConnected&&P.popover&&P.hidePopover(),ui=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&di();t?t.target===P&&t.newState==="closed"&&(ri=setTimeout(ui,300)):Ee=void 0};ut("tooltip",()=>[q(document,"blur focus mouseover",ci,B),q(document,"toggle keydown",ui,B),mt(document,Rl,{attributeFilter:[gt],attributes:!0,childList:!0,subtree:!0})]);const Cn="aria-label";var mi=class extends me{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Cn]}connectedCallback(){this._label=qt(this,Cn),this._items=this.getElementsByTagName("a"),this._render=Lt(()=>ql(this),100),this._unresize=q(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,n,o){o&&(this._label=o),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const ql=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;S(t,"role",o?null:"navigation"),S(t,Cn,o?null:t._label);for(let i of t._items||[])S(i,"aria-current",i===n?"page":null)};$.define("ds-breadcrumbs",mi);var pi=class extends me{connectedCallback(){q(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let n=this.querySelector("h2,h3,h4,h5,h6");n&&S(this,"aria-labelledby",pt(n)),S(this,"tabindex","-1"),this.focus()}disconnectedCallback(){fn(this,"animationend",this,B)}};$.define("ds-error-summary",pi);const fi="data-indeterminate",On=new Set,hi=new WeakMap,Pl=ct()?document.getElementsByTagName("fieldset"):[],Wl=ct()&&CSS.supports("field-sizing","content"),Vl=fs()?800:200,gi=new WeakSet,vi=Lt(()=>{for(let t of Pl)S(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of On){let e=[],n=[],o,i,r=!1,a=!1;for(let s of t.getElementsByTagName("*"))if(s instanceof HTMLLabelElement&&n.push(s),!s.hidden)if(Dl(s))o?dt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):o=s;else{let c=s.getAttribute("data-field");c==="counter"&&(i=s),c==="validation"?(e.unshift(s),r=!0,a||=wi(s)):c&&e.push(s)}if(!o)dt("Field is missing input element:",t);else{i&&hi.set(o,i);for(let d of n)S(d,"for",pt(o));let s=o.type==="radio"||o.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(r=!0,a||=wi(c),e.unshift(c));let l=S(o,fi);l&&(o.indeterminate=l==="true"),S(t,"data-clickdelegatefor",s?pt(o):null),S(o,"aria-describedby",e.map(pt).join(" ")||null),(r||gi.has(o))&&(gi[r?"add":"delete"](o),S(o,"aria-invalid",`${a}`)),bi(o)}}},0),Dt=ct()?Io("div",{"aria-live":"polite",style:"position:fixed;white-space:nowrap;clip:rect(0 0 0 0)"}):null,bi=t=>{let e=t.target||t,n=hi.get(e);if(n?.isConnected){let o=(Number(S(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",r=qt(n,`data-${i}`)?.replace("%d",`${Math.abs(o)}`);S(n,"data-label",r),S(n,"data-state",i),S(n,"data-color",o<0?"danger":null),t.type==="input"&&Dt&&r&&(Dt?.isConnected||document.body.appendChild(Dt),Ul(e,r))}!Wl&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Ul=Lt((t,e)=>{let n=document.activeElement===t;Dt?.isConnected&&n&&Mo(Dt,e)},Vl),wi=t=>t.getAttribute("data-color")!=="success",Dl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var ke=class extends me{connectedCallback(){On.add(this),vi()}disconnectedCallback(){On.delete(this)}};$.define("ds-field",ke),ut("field",()=>[q(document,"input",bi,B),mt(document,vi,{attributeFilter:["data-field","data-limit","hidden","value",fi],attributes:!0,childList:!0,subtree:!0})]);const Mn="aria-label",Te="data-current",Ae="data-total",yi="data-href",xi=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Fl(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var Si=class extends me{_unmutate;_render;static get observedAttributes(){return[Mn,Te,Ae,yi]}connectedCallback(){let t=S(this,Ae),e=S(this,Te);e&&!t&&dt(`Missing ${Ae} attribute on:`,this),t&&!e&&dt(`Missing ${Te} attribute on:`,this),S(this,Mn,qt(this,Mn)),S(this,"role","navigation"),this._render=Lt(()=>zl(this),0),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const zl=t=>{let e=Number(S(t,Te)),n=Number(S(t,Ae));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,r=S(t,yi),{next:a,prev:s,pages:c}=xi({current:e,total:n,show:i});o.forEach((l,d)=>{let u=d?o[d+1]?c[d-1]?.page:a:s;S(l,"aria-current",c[d-1]?.current?"true":null),S(l,"aria-label",`${u??"hidden"}`),S(l,"role",u?null:"none"),S(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&S(l,"value",`${u}`),r&&l instanceof HTMLAnchorElement&&S(l,"href",r.replace("%d",`${u}`))})}},Fl=(t,e,n=1/0)=>{let 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),a=Array.from({length:r+1-i},(s,c)=>c+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a};$.define("ds-pagination",Si);var Ei=class extends Xe{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Bl(this),this._unmutate=mt(this,this._render,{childList:!0}),q(this,"toggle",ki,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,fn(this,"toggle",ki,B)}};const Bl=({control:t,list:e})=>{t&&!t.placeholder&&S(t,"placeholder"," "),t&&S(t,"popovertarget",pt(e)||null),e&&S(e,"popover","manual")},ki=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};$.define("ds-suggestion",Ei);var Ti=class extends nn{},Ai=class extends on{},Li=class extends an{},Ci=class extends ln{};$.define("ds-tabs",Ti),$.define("ds-tablist",Ai),$.define("ds-tab",Li),$.define("ds-tabpanel",Ci);function Gl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Hl(){document.addEventListener("invoke",m=>{m.type=="invoke"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0),document.addEventListener("command",m=>{m.type=="command"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0);function t(m,g,h=!0){Object.defineProperty(m,g,{...Object.getOwnPropertyDescriptor(m,g),enumerable:h})}function e(m){return m&&typeof m.getRootNode=="function"?m.getRootNode():m&&m.parentNode?e(m.parentNode):m}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:x}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");n.set(this,w||null),o.set(this,x!==void 0?String(x):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const g=n.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(m){Object.defineProperties(m.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),a.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?a.set(this,g):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=a.get(this);if(g)return g.isConnected?g:(a.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(m){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof m=="object"||typeof m=="function"?m:null),typeof m=="function"&&this.addEventListener("command",m)}}});function l(m){for(const g of m)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(m=>{for(const g of m){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function p(m){if(u.has(m)||(u.add(m),m.defaultPrevented)||m.type!=="click")return;const g=m.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=m.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw m.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const A=h.hasAttribute("command")?"command":"commandfor",k=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${A} attribute must also have a ${k} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const x=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(x),x.defaultPrevented)return;const y=x.command.toLowerCase();if(w.popover){const A=!w.matches(":popover-open");A&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!A&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const A=!w.hasAttribute("open");A&&y=="show-modal"?w.showModal():!A&&y=="close"?w.close(h.value?h.value:void 0):!A&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const k=new Event("cancel",{cancelable:!0});this.dispatchEvent(k),k.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function f(m){m.addEventListener("click",p,!0)}function b(m,g){const h=m.prototype.attachShadow;m.prototype.attachShadow=function(x){const y=h.call(this,x);return g(y),y};const w=m.prototype.attachInternals;m.prototype.attachInternals=function(){const x=w.call(this);return x.shadowRoot&&g(x.shadowRoot),x}}s(HTMLButtonElement),b(HTMLElement,m=>{f(m),d.observe(m,{attributeFilter:["oncommand"]}),l(m.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}var Le=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Jl=Le&&/android/i.test(navigator.userAgent),Xl=Le&&/firefox/i.test(navigator.userAgent),Oi;Le&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);function Mi(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ce="__uDetailsPolyfillSummarys";if(Le&&Jl&&Xl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const n=e.parentElement;Mi(e,"role","button"),Mi(e,"aria-expanded",`${!!n&&!!n.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var jl=Object.defineProperty,Ii=Object.getOwnPropertySymbols,Zl=Object.prototype.hasOwnProperty,Kl=Object.prototype.propertyIsEnumerable,Ni=(t,e,n)=>e in t?jl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yl=(t,e)=>{for(var n in e||(e={}))Zl.call(e,n)&&Ni(t,n,e[n]);if(Ii)for(var n of Ii(e))Kl.call(e,n)&&Ni(t,n,e[n]);return t},zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Oe=zt&&/android/i.test(navigator.userAgent),In=zt&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ri;zt&&/^Mac/i.test(((Ri=navigator.userAgentData)==null?void 0:Ri.platform)||navigator.platform);var Ql=`${Oe?"data":"aria"}-labelledby`,_l=":host(:not([hidden])) { display: block }",$l="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",qi=typeof HTMLElement>"u"?class{}:HTMLElement;function L(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Pi=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ft=(t,...e)=>Pi("add",t,e),Me=(t,...e)=>Pi("remove",t,e),tc=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(qn("slot"),qn("style",e)),Ie=new WeakMap,Nn=(t,e)=>{if(e===void 0)return Ie.get(t);try{Ie.get(t).disconnect(),Ie.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ie.set(t,n)}},Wi=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},ec=0,Rn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ec).toString(32)}`),t.id):"",qn=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},Vi={define:(t,e)=>!zt||window.customElements.get(t)||window.customElements.define(t,e)},vt,nc=0,Ui=t=>{vt||(vt=qn("div"),vt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",L(vt,"aria-live","assertive")),vt.isConnected||document.body.append(vt),t&&(vt.textContent=`${t}${nc++%2?" ":""}`)},oc=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Pn=!1,Wn=t=>(t?.type==="mouseup"&&(Pn=!1),t?.type==="mousedown"&&(Pn=!0,Ft(document,"mouseup",Wn,{once:!0})),Pn),ic=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Vn="disabled",Bt="selected",rc=class extends qi{static get observedAttributes(){return[Vn,Bt]}connectedCallback(){In||(this.tabIndex=-1),this.hasAttribute("role")||L(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){L(this,"aria-disabled",`${this.disabled}`),L(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Bt]}set defaultSelected(t){this[Bt]=t}get disabled(){return L(this,Vn)!==null}set disabled(t){L(this,Vn,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=L(this,"label"))!=null?t:this.text}set label(t){L(this,"label",t)}get selected(){return L(this,Bt)!==null}set selected(t){L(this,Bt,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=L(this,"value"))!=null?t:this.text}set value(t){L(this,"value",t)}};Vi.define("u-option",rc);var Un=`${_l}
194
+ }`,B={passive:!0,capture:!0},ct=()=>typeof window<"u"&&typeof document<"u",ps=()=>ct()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),me=typeof HTMLElement>"u"?class{}:HTMLElement;function Lt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const dt=(t,...e)=>typeof window>"u"||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),S=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),fs=/^["']|["']$/g,qt=(t,e)=>{let n=S(t,e);return n||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(fs,"").trim()||null,n||dt(`Missing ${e} on:`,t),n},q=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>pn(t,...e)},pn=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},ut=(t,e)=>{ct()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))};let fn=!1;const mt=(t,e,n)=>{let o=0,i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{!fn&&!o&&(o=requestAnimationFrame(i))});return a.observe(t,n),requestAnimationFrame(i),r},Io=(t,e)=>{fn=!0,t.textContent=e,requestAnimationFrame(hs)},hs=()=>{fn=!1},Ro=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))S(n,o,i);return n},$={define:(t,e)=>!ct()||window.customElements.get(t)||window.customElements.define(t,e)};let gs=0;const vs=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function pt(t){return t&&!t.id&&(t.id=`${vs}${++gs}`),t?.id||""}const No=":click-delegate-hover",qo="data-clickdelegatefor",bs=`[${qo}]`,ws=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.isTrusted&&t.button<2&&Po(t);if(!(!n||n.contains(t.target))){if(e&&n instanceof HTMLAnchorElement)return window.open(n.href,void 0,n.rel);t.stopImmediatePropagation(),n.click()}};let pe;const ys=t=>{let e=Po(t);pe!==e&&(pe&&pe.classList.remove(No),e&&e.classList.add(No),pe=e)},Po=({target:t})=>{let e=(t instanceof Element?t.closest(bs):null)?.getAttribute(qo),n=e&&document.getElementById(e)||void 0,o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&!n?.disabled?n:void 0};ut("clickdelegatefor",()=>[q(window,"click auxclick",ws,!0),q(document,"mouseover",ys,B)]);let hn=!1;const xs=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();hn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!hn&&S(e,"closedby")==="any";hn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},Ss=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))S(t,"aria-haspopup","dialog")},Es=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();ut("dialog",()=>[q(document,"command",Es,B),q(document,"pointerdown pointerup",xs,B),mt(document,Ss,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Ct=Math.min,U=Math.max,fe=Math.round,he=Math.floor,Z=t=>({x:t,y:t}),ks={left:"right",right:"left",bottom:"top",top:"bottom"},Ts={start:"end",end:"start"};function Wo(t,e,n){return U(t,Ct(e,n))}function ft(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function gn(t){return t==="x"?"y":"x"}function Vo(t){return t==="y"?"height":"width"}const As=new Set(["top","bottom"]);function K(t){return As.has(tt(t))?"y":"x"}function Uo(t){return gn(K(t))}function Ls(t,e,n){n===void 0&&(n=!1);const o=Pt(t),i=Uo(t),r=Vo(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ge(a)),[a,ge(a)]}function Cs(t){const e=ge(t);return[vn(t),e,vn(e)]}function vn(t){return t.replace(/start|end/g,e=>Ts[e])}const Do=["left","right"],zo=["right","left"],Ms=["top","bottom"],Os=["bottom","top"];function Is(t,e,n){switch(t){case"top":case"bottom":return n?e?zo:Do:e?Do:zo;case"left":case"right":return e?Ms:Os;default:return[]}}function Rs(t,e,n,o){const i=Pt(t);let r=Is(tt(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(vn)))),r}function ge(t){return t.replace(/left|right|bottom|top/g,e=>ks[e])}function Ns(t){return{top:0,right:0,bottom:0,left:0,...t}}function qs(t){return typeof t!="number"?Ns(t):{top:t,right:t,bottom:t,left:t}}function ve(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Fo(t,e,n){let{reference:o,floating:i}=t;const r=K(e),a=Uo(e),s=Vo(a),c=tt(e),l=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pt(e)){case"start":f[a]-=p*(n&&l?-1:1);break;case"end":f[a]+=p*(n&&l?-1:1);break}return f}async function Ps(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=ft(e,t),b=qs(f),g=s[p?u==="floating"?"reference":"floating":u],h=ve(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),y=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},A=ve(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(h.top-A.top+b.top)/y.y,bottom:(A.bottom-h.bottom+b.bottom)/y.y,left:(h.left-A.left+b.left)/y.x,right:(A.right-h.right+b.right)/y.x}}const Ws=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Fo(l,o,c),p=o,f={},b=0;for(let g=0;g<s.length;g++){var m;const{name:h,fn:w}=s[g],{x,y,data:A,reset:k}=await w({x:d,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:l,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:Ps},elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[h]:{...f[h],...A}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:d,y:u}=Fo(l,p,c)),g=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:f}},Vs=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=ft(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),w=K(s),x=tt(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),A=p||(x||!m?[ge(s)]:Cs(s)),k=b!=="none";!p&&k&&A.push(...Rs(s,m,b,y));const I=[s,...A],F=await c.detectOverflow(e,g),xt=[];let nt=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&xt.push(F[h]),u){const St=Ls(i,a,y);xt.push(F[St[0]],F[St[1]])}if(nt=[...nt,{placement:i,overflows:xt}],!xt.every(St=>St<=0)){var Xt,jt;const St=(((Xt=r.flip)==null?void 0:Xt.index)||0)+1,eo=I[St];if(eo&&(!(u==="alignment"?w!==K(eo):!1)||nt.every(j=>K(j.placement)===w?j.overflows[0]>0:!0)))return{data:{index:St,overflows:nt},reset:{placement:eo}};let Kt=(jt=nt.filter(Et=>Et.overflows[0]<=0).sort((Et,j)=>Et.overflows[1]-j.overflows[1])[0])==null?void 0:jt.placement;if(!Kt)switch(f){case"bestFit":{var Zt;const Et=(Zt=nt.filter(j=>{if(k){const at=K(j.placement);return at===w||at==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(at=>at>0).reduce((at,cu)=>at+cu,0)]).sort((j,at)=>j[1]-at[1])[0])==null?void 0:Zt[0];Et&&(Kt=Et);break}case"initialPlacement":Kt=s;break}if(i!==Kt)return{reset:{placement:Kt}}}return{}}}},Bo=new Set(["left","top"]);async function Us(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=tt(n),s=Pt(n),c=K(n)==="y",l=Bo.has(a)?-1:1,d=r&&c?-1:1,u=ft(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),c?{x:f*d,y:p*l}:{x:p*l,y:f*d}}const Ds=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=e,c=await Us(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:a}}}}},zs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:h=>{let{x:w,y:x}=h;return{x:w,y:x}}},...l}=ft(t,e),d={x:n,y:o},u=await r.detectOverflow(e,l),p=K(tt(i)),f=gn(p);let b=d[f],m=d[p];if(a){const h=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=b+u[h],y=b-u[w];b=Wo(x,b,y)}if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=m+u[h],y=m-u[w];m=Wo(x,m,y)}const g=c.fn({...e,[f]:b,[p]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:a,[p]:s}}}}}},Fs=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ft(t,e),d={x:n,y:o},u=K(i),p=gn(u);let f=d[p],b=d[u];const m=ft(s,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=p==="y"?"height":"width",y=r.reference[p]-r.floating[x]+g.mainAxis,A=r.reference[p]+r.reference[x]-g.mainAxis;f<y?f=y:f>A&&(f=A)}if(l){var h,w;const x=p==="y"?"width":"height",y=Bo.has(tt(i)),A=r.reference[u]-r.floating[x]+(y&&((h=a.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[x]+(y?0:((w=a.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);b<A?b=A:b>k&&(b=k)}return{[p]:f,[u]:b}}}},Bs=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:c=()=>{},...l}=ft(t,e),d=await a.detectOverflow(e,l),u=tt(i),p=Pt(i),f=K(i)==="y",{width:b,height:m}=r.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(h=u,g=p==="end"?"top":"bottom");const w=m-d.top-d.bottom,x=b-d.left-d.right,y=Ct(m-d[g],w),A=Ct(b-d[h],x),k=!e.middlewareData.shift;let I=y,F=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(F=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(I=w),k&&!p){const nt=U(d.left,0),Xt=U(d.right,0),jt=U(d.top,0),Zt=U(d.bottom,0);f?F=b-2*(nt!==0||Xt!==0?nt+Xt:U(d.left,d.right)):I=m-2*(jt!==0||Zt!==0?jt+Zt:U(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:I});const xt=await a.getDimensions(s.floating);return b!==xt.width||m!==xt.height?{reset:{rects:!0}}:{}}}};function be(){return typeof window<"u"}function Mt(t){return Go(t)?(t.nodeName||"").toLowerCase():"#document"}function D(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Go(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Go(t){return be()?t instanceof Node||t instanceof D(t).Node:!1}function G(t){return be()?t instanceof Element||t instanceof D(t).Element:!1}function Q(t){return be()?t instanceof HTMLElement||t instanceof D(t).HTMLElement:!1}function Ho(t){return!be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof D(t).ShadowRoot}const Gs=new Set(["inline","contents"]);function Wt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Gs.has(i)}const Hs=new Set(["table","td","th"]);function Js(t){return Hs.has(Mt(t))}const Xs=[":popover-open",":modal"];function we(t){return Xs.some(e=>{try{return t.matches(e)}catch{return!1}})}const js=["transform","translate","scale","rotate","perspective"],Zs=["transform","translate","scale","rotate","perspective","filter"],Ks=["paint","layout","strict","content"];function bn(t){const e=wn(),n=G(t)?H(t):t;return js.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Zs.some(o=>(n.willChange||"").includes(o))||Ks.some(o=>(n.contain||"").includes(o))}function Ys(t){let e=ot(t);for(;Q(e)&&!Ot(e);){if(bn(e))return e;if(we(e))return null;e=ot(e)}return null}function wn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qs=new Set(["html","body","#document"]);function Ot(t){return Qs.has(Mt(t))}function H(t){return D(t).getComputedStyle(t)}function ye(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Mt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ho(t)&&t.host||Y(t);return Ho(e)?e.host:e}function Jo(t){const e=ot(t);return Ot(e)?t.ownerDocument?t.ownerDocument.body:t.body:Q(e)&&Wt(e)?e:Jo(e)}function Vt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Jo(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=D(i);if(r){const s=yn(a);return e.concat(a,a.visualViewport||[],Wt(i)?i:[],s&&n?Vt(s):[])}return e.concat(i,Vt(i,[],n))}function yn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Xo(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Q(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=fe(n)!==r||fe(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function xn(t){return G(t)?t:t.contextElement}function It(t){const e=xn(t);if(!Q(e))return Z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Xo(e);let a=(r?fe(n.width):n.width)/o,s=(r?fe(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const _s=Z(0);function jo(t){const e=D(t);return!wn()||!e.visualViewport?_s:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $s(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==D(t)?!1:e}function ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=xn(t);let a=Z(1);e&&(o?G(o)&&(a=It(o)):a=It(t));const s=$s(r,n,o)?jo(r):Z(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const p=D(r),f=o&&G(o)?D(o):o;let b=p,m=yn(b);for(;m&&o&&f!==b;){const g=It(m),h=m.getBoundingClientRect(),w=H(m),x=h.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=x,l+=y,b=D(m),m=yn(b)}}return ve({width:d,height:u,x:c,y:l})}function xe(t,e){const n=ye(t).scrollLeft;return e?e.left+n:ht(Y(t)).left+n}function Zo(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-xe(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function tl(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=Y(o),s=e?we(e.floating):!1;if(o===a||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=Z(1);const d=Z(0),u=Q(o);if((u||!u&&!r)&&((Mt(o)!=="body"||Wt(a))&&(c=ye(o)),Q(o))){const f=ht(o);l=It(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const p=a&&!u&&!r?Zo(a,c):Z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function el(t){return Array.from(t.getClientRects())}function nl(t){const e=Y(t),n=ye(t),o=t.ownerDocument.body,i=U(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=U(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+xe(t);const s=-n.scrollTop;return H(o).direction==="rtl"&&(a+=U(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Ko=25;function ol(t,e){const n=D(t),o=Y(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;const d=wn();(!d||d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=xe(o);if(l<=0){const d=o.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(o.clientWidth-u.clientWidth-f);b<=Ko&&(r-=b)}else l<=Ko&&(r+=l);return{width:r,height:a,x:s,y:c}}const il=new Set(["absolute","fixed"]);function rl(t,e){const n=ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Q(t)?It(t):Z(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:a,height:s,x:c,y:l}}function Yo(t,e,n){let o;if(e==="viewport")o=ol(t,n);else if(e==="document")o=nl(Y(t));else if(G(e))o=rl(e,n);else{const i=jo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ve(o)}function Qo(t,e){const n=ot(t);return n===e||!G(n)||Ot(n)?!1:H(n).position==="fixed"||Qo(n,e)}function al(t,e){const n=e.get(t);if(n)return n;let o=Vt(t,[],!1).filter(s=>G(s)&&Mt(s)!=="body"),i=null;const r=H(t).position==="fixed";let a=r?ot(t):t;for(;G(a)&&!Ot(a);){const s=H(a),c=bn(a);!c&&s.position==="fixed"&&(i=null),(r?!c&&!i:!c&&s.position==="static"&&!!i&&il.has(i.position)||Wt(a)&&!c&&Qo(t,a))?o=o.filter(d=>d!==a):i=s,a=ot(a)}return e.set(t,o),o}function sl(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?we(e)?[]:al(e,this._c):[].concat(n),o],s=a[0],c=a.reduce((l,d)=>{const u=Yo(e,d,i);return l.top=U(u.top,l.top),l.right=Ct(u.right,l.right),l.bottom=Ct(u.bottom,l.bottom),l.left=U(u.left,l.left),l},Yo(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ll(t){const{width:e,height:n}=Xo(t);return{width:e,height:n}}function cl(t,e,n){const o=Q(e),i=Y(e),r=n==="fixed",a=ht(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=Z(0);function l(){c.x=xe(i)}if(o||!o&&!r)if((Mt(e)!=="body"||Wt(i))&&(s=ye(e)),o){const f=ht(e,!0,r,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();r&&!o&&i&&l();const d=i&&!o&&!r?Zo(i,s):Z(0),u=a.left+s.scrollLeft-c.x-d.x,p=a.top+s.scrollTop-c.y-d.y;return{x:u,y:p,width:a.width,height:a.height}}function Sn(t){return H(t).position==="static"}function _o(t,e){if(!Q(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function $o(t,e){const n=D(t);if(we(t))return n;if(!Q(t)){let i=ot(t);for(;i&&!Ot(i);){if(G(i)&&!Sn(i))return i;i=ot(i)}return n}let o=_o(t,e);for(;o&&Js(o)&&Sn(o);)o=_o(o,e);return o&&Ot(o)&&Sn(o)&&!bn(o)?n:o||Ys(t)||n}const dl=async function(t){const e=this.getOffsetParent||$o,n=this.getDimensions,o=await n(t.floating);return{reference:cl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ul(t){return H(t).direction==="rtl"}const ml={convertOffsetParentRelativeRectToViewportRelativeRect:tl,getDocumentElement:Y,getClippingRect:sl,getOffsetParent:$o,getElementRects:dl,getClientRects:el,getDimensions:ll,getScale:It,isElement:G,isRTL:ul};function ti(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function pl(t,e){let n=null,o;const i=Y(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();const l=t.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=l;if(s||e(),!p||!f)return;const b=he(u),m=he(i.clientWidth-(d+p)),g=he(i.clientHeight-(u+f)),h=he(d),x={rootMargin:-b+"px "+-m+"px "+-g+"px "+-h+"px",threshold:U(0,Ct(1,c))||1};let y=!0;function A(k){const I=k[0].intersectionRatio;if(I!==c){if(!y)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!ti(l,t.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return a(!0),r}function fl(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=xn(t),d=i||r?[...l?Vt(l):[],...Vt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=l&&s?pl(l,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let b,m=c?ht(t):null;c&&g();function g(){const h=ht(t);m&&!ti(m,h)&&n(),m=h,b=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(b)}}const hl=Ds,gl=zs,vl=Vs,bl=Bs,wl=Fs,yl=(t,e,n)=>{const o=new Map,i={platform:ml,...n},r={...i.platform,_c:o};return Ws(t,e,{...i,platform:r})},ei="data-placement",ni="data-autoplacement",Ut=new Map;function xl(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&oi(o,"--_ds-floating");if(!r)return;if(e==="closed")return Ut.get(o)?.();if(!i){let b=o.getRootNode(),m=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&b?.querySelector?.(m)||void 0}if(!i||i===o||n&&n===e)return;let a=oi(o,"--_ds-floating-overscroll"),s=S(o,ei)||S(i,ei)||r,c=S(o,ni)||S(i,ni),l=parseFloat(getComputedStyle(o,"::before").height)||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(s==="none")return;let p={strategy:"absolute",placement:s,middleware:[hl(l||0),gl({padding:10,limiter:wl({offset:{mainAxis:u}})}),El(),...c==="false"?[]:[vl({padding:10,crossAxis:!1})],...a?[bl({apply({availableHeight:b}){a==="fit"&&(o.style.width=`${i.clientWidth}px`),o.style.maxHeight=`${Math.max(50,b-20)}px`}})]:[]]},f=fl(i,o,async()=>{if(!i?.isConnected)return Ut.get(o)?.();let{x:b,y:m}=await yl(i,o,p);o.style.translate=`${b}px ${m}px`});Ut.set(o,()=>Ut.delete(o)&&f())}let Se;const Sl=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Ut)e.showPopover()};ut("popover",()=>[q(document,"mousedown scroll mouseup",Sl,!0),q(document,"toggle ds-toggle-source",xl,B)]);const oi=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),El=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),S(e,"data-floating",t.placement),t}}),En=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||S(t,"aria-readonly")==="true"),kl=t=>{if(t.key!=="Tab"&&En(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&S(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),n=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+n)%e.length]?.focus()}},Tl=t=>{let e=t.target?.closest?.("label")?.control||t.target;En(e)&&(t.preventDefault(),e.focus())},Al=t=>{t.target instanceof HTMLSelectElement&&En(t.target)&&t.preventDefault()};ut("readonly",()=>[q(document,"keydown",kl),q(document,"click",Tl),q(document,"mousedown",Al)]);const kn="data-toggle-group",ii=`[${kn}]`,Ll=Lt(()=>{for(let t of document.querySelectorAll(ii))S(t,"aria-label",qt(t,kn))},0),Cl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(ii);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let n=e.getElementsByTagName("input"),o=[...n].indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+o+i)%n.length]?.focus()}};ut("toggle-group",()=>[q(document,"keydown",Cl),mt(document,Ll,{attributeFilter:[kn],attributes:!0,childList:!0,subtree:!0})]);let P,Ee,ri=0,ai=0;const gt="data-tooltip",Tn="data-color",si="aria-label",li="aria-description",Ml=`[${Tn}]`,Ol=`[${gt}]`,An="data-color-scheme",Il=`[${An}]`,ci=t=>{t&&!(t instanceof HTMLElement)&&dt("setTooltipElement expects an HTMLElement, got: ",t),P=t||void 0},Rl=Lt(()=>{for(let t of document.querySelectorAll(Ol)){let e=t.getAttribute(si)||t.getAttribute(li),n=t.getAttribute(gt)||qt(t,gt);if(e!==n){let o=S(t,"role")!=="img"&&t.textContent?.trim();S(t,gt,n),S(t,si,o?null:n),S(t,li,o?n:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||dt('Missing tabindex="0" attribute on: ',t)}}},0),di=({type:t,target:e})=>{if(clearTimeout(ri),e===P)return;if(t==="mouseover"&&!Ee){ri=setTimeout(di,300,{target:e});return}let n=e?.closest?.(`[${gt}]`);if(n===Ee)return;if(!n)return ui();P||=Ro("div",{class:"ds-tooltip"}),P.isConnected||document.body.appendChild(P);let o=n.closest(Ml),i=n.closest(Il),r=o!==i&&o?.contains(i);clearTimeout(ai),S(P,"popover","manual"),S(P,An,i?.getAttribute(An)||null),S(P,Tn,r&&o?.getAttribute(Tn)||null),Io(P,S(n,gt)),P.showPopover(),P.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),Ee=n},ui=()=>P?.isConnected&&P.popover&&P.hidePopover(),mi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&ui();t?t.target===P&&t.newState==="closed"&&(ai=setTimeout(mi,300)):Ee=void 0};ut("tooltip",()=>[q(document,"blur focus mouseover",di,B),q(document,"toggle keydown",mi,B),mt(document,Rl,{attributeFilter:[gt],attributes:!0,childList:!0,subtree:!0})]);const Ln="aria-label";var pi=class extends me{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Ln]}connectedCallback(){this._label=qt(this,Ln),this._items=this.getElementsByTagName("a"),this._render=Lt(()=>Nl(this),100),this._unresize=q(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,n,o){o&&(this._label=o),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Nl=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;S(t,"role",o?null:"navigation"),S(t,Ln,o?null:t._label);for(let i of t._items||[])S(i,"aria-current",i===n?"page":null)};$.define("ds-breadcrumbs",pi);var fi=class extends me{connectedCallback(){q(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let n=this.querySelector("h2,h3,h4,h5,h6");n&&S(this,"aria-labelledby",pt(n)),S(this,"tabindex","-1"),this.focus()}disconnectedCallback(){pn(this,"animationend",this,B)}};$.define("ds-error-summary",fi);const hi="data-indeterminate",Cn=new Set,gi=new WeakMap,ql=ct()?document.getElementsByTagName("fieldset"):[],Pl=ct()&&CSS.supports("field-sizing","content"),Wl=ps()?800:200,vi=new WeakSet,bi=Lt(()=>{for(let t of ql)S(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of Cn){let e=[],n=[],o,i,r=!1,a=!1;for(let s of t.getElementsByTagName("*"))if(s instanceof HTMLLabelElement&&n.push(s),!s.hidden)if(Ul(s))o?dt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):o=s;else{let c=s.getAttribute("data-field");c==="counter"&&(i=s),c==="validation"?(e.unshift(s),r=!0,a||=yi(s)):c&&e.push(s)}if(!o)dt("Field is missing input element:",t);else{i&&gi.set(o,i);for(let d of n)S(d,"for",pt(o));let s=o.type==="radio"||o.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(r=!0,a||=yi(c),e.unshift(c));let l=S(o,hi);l&&(o.indeterminate=l==="true"),S(t,"data-clickdelegatefor",s?pt(o):null),S(o,"aria-describedby",e.map(pt).join(" ")||null),(r||vi.has(o))&&(vi[r?"add":"delete"](o),S(o,"aria-invalid",`${a}`)),wi(o)}}},0),Dt=ct()?Ro("div",{"aria-live":"polite",style:"position:fixed;white-space:nowrap;clip:rect(0 0 0 0)"}):null,wi=t=>{let e=t.target||t,n=gi.get(e);if(n?.isConnected){let o=(Number(S(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",r=qt(n,`data-${i}`)?.replace("%d",`${Math.abs(o)}`);S(n,"data-label",r),S(n,"data-state",i),S(n,"data-color",o<0?"danger":null),t.type==="input"&&Dt&&r&&(Dt?.isConnected||document.body.appendChild(Dt),Vl(e,r))}!Pl&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Vl=Lt((t,e)=>{let n=document.activeElement===t;Dt?.isConnected&&n&&Io(Dt,e)},Wl),yi=t=>t.getAttribute("data-color")!=="success",Ul=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var ke=class extends me{connectedCallback(){Cn.add(this),bi()}disconnectedCallback(){Cn.delete(this)}};$.define("ds-field",ke),ut("field",()=>[q(document,"input",wi,B),mt(document,bi,{attributeFilter:["data-field","data-limit","hidden","value",hi],attributes:!0,childList:!0,subtree:!0})]);const Mn="aria-label",Te="data-current",Ae="data-total",xi="data-href",Si=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:zl(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var Ei=class extends me{_unmutate;_render;static get observedAttributes(){return[Mn,Te,Ae,xi]}connectedCallback(){let t=S(this,Ae),e=S(this,Te);e&&!t&&dt(`Missing ${Ae} attribute on:`,this),t&&!e&&dt(`Missing ${Te} attribute on:`,this),S(this,Mn,qt(this,Mn)),S(this,"role","navigation"),this._render=Lt(()=>Dl(this),0),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Dl=t=>{let e=Number(S(t,Te)),n=Number(S(t,Ae));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,r=S(t,xi),{next:a,prev:s,pages:c}=Si({current:e,total:n,show:i});o.forEach((l,d)=>{let u=d?o[d+1]?c[d-1]?.page:a:s;S(l,"aria-current",c[d-1]?.current?"true":null),S(l,"aria-label",`${u??"hidden"}`),S(l,"role",u?null:"none"),S(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&S(l,"value",`${u}`),r&&l instanceof HTMLAnchorElement&&S(l,"href",r.replace("%d",`${u}`))})}},zl=(t,e,n=1/0)=>{let 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),a=Array.from({length:r+1-i},(s,c)=>c+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a};$.define("ds-pagination",Ei);var ki=class extends Je{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Fl(this),this._unmutate=mt(this,this._render,{childList:!0}),q(this,"toggle",Ti,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,pn(this,"toggle",Ti,B)}};const Fl=({control:t,list:e})=>{t&&!t.placeholder&&S(t,"placeholder"," "),t&&S(t,"popovertarget",pt(e)||null),e&&S(e,"popover","manual")},Ti=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};$.define("ds-suggestion",ki);var Ai=class extends en{},Li=class extends nn{},Ci=class extends rn{},Mi=class extends sn{};$.define("ds-tabs",Ai),$.define("ds-tablist",Li),$.define("ds-tab",Ci),$.define("ds-tabpanel",Mi);function Bl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Gl(){document.addEventListener("invoke",m=>{m.type=="invoke"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0),document.addEventListener("command",m=>{m.type=="command"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0);function t(m,g,h=!0){Object.defineProperty(m,g,{...Object.getOwnPropertyDescriptor(m,g),enumerable:h})}function e(m){return m&&typeof m.getRootNode=="function"?m.getRootNode():m&&m.parentNode?e(m.parentNode):m}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:x}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");n.set(this,w||null),o.set(this,x!==void 0?String(x):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const g=n.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(m){Object.defineProperties(m.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),a.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?a.set(this,g):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=a.get(this);if(g)return g.isConnected?g:(a.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(m){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof m=="object"||typeof m=="function"?m:null),typeof m=="function"&&this.addEventListener("command",m)}}});function l(m){for(const g of m)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(m=>{for(const g of m){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function p(m){if(u.has(m)||(u.add(m),m.defaultPrevented)||m.type!=="click")return;const g=m.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=m.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw m.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const A=h.hasAttribute("command")?"command":"commandfor",k=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${A} attribute must also have a ${k} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const x=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(x),x.defaultPrevented)return;const y=x.command.toLowerCase();if(w.popover){const A=!w.matches(":popover-open");A&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!A&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const A=!w.hasAttribute("open");A&&y=="show-modal"?w.showModal():!A&&y=="close"?w.close(h.value?h.value:void 0):!A&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const k=new Event("cancel",{cancelable:!0});this.dispatchEvent(k),k.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function f(m){m.addEventListener("click",p,!0)}function b(m,g){const h=m.prototype.attachShadow;m.prototype.attachShadow=function(x){const y=h.call(this,x);return g(y),y};const w=m.prototype.attachInternals;m.prototype.attachInternals=function(){const x=w.call(this);return x.shadowRoot&&g(x.shadowRoot),x}}s(HTMLButtonElement),b(HTMLElement,m=>{f(m),d.observe(m,{attributeFilter:["oncommand"]}),l(m.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}var Le=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Hl=Le&&/android/i.test(navigator.userAgent),Jl=Le&&/firefox/i.test(navigator.userAgent),Oi;Le&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);function Ii(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ce="__uDetailsPolyfillSummarys";if(Le&&Hl&&Jl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const n=e.parentElement;Ii(e,"role","button"),Ii(e,"aria-expanded",`${!!n&&!!n.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Xl=Object.defineProperty,Ri=Object.getOwnPropertySymbols,jl=Object.prototype.hasOwnProperty,Zl=Object.prototype.propertyIsEnumerable,Ni=(t,e,n)=>e in t?Xl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kl=(t,e)=>{for(var n in e||(e={}))jl.call(e,n)&&Ni(t,n,e[n]);if(Ri)for(var n of Ri(e))Zl.call(e,n)&&Ni(t,n,e[n]);return t},zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Me=zt&&/android/i.test(navigator.userAgent),On=zt&&/iPad|iPhone|iPod/.test(navigator.userAgent),qi;zt&&/^Mac/i.test(((qi=navigator.userAgentData)==null?void 0:qi.platform)||navigator.platform);var Yl=`${Me?"data":"aria"}-labelledby`,Ql=":host(:not([hidden])) { display: block }",_l="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Pi=typeof HTMLElement>"u"?class{}:HTMLElement;function L(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Wi=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ft=(t,...e)=>Wi("add",t,e),Oe=(t,...e)=>Wi("remove",t,e),$l=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Nn("slot"),Nn("style",e)),Ie=new WeakMap,In=(t,e)=>{if(e===void 0)return Ie.get(t);try{Ie.get(t).disconnect(),Ie.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ie.set(t,n)}},Vi=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},tc=0,Rn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++tc).toString(32)}`),t.id):"",Nn=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},Ui={define:(t,e)=>!zt||window.customElements.get(t)||window.customElements.define(t,e)},vt,ec=0,Di=t=>{vt||(vt=Nn("div"),vt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",L(vt,"aria-live","assertive")),vt.isConnected||document.body.append(vt),t&&(vt.textContent=`${t}${ec++%2?" ":""}`)},nc=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},qn=!1,Pn=t=>(t?.type==="mouseup"&&(qn=!1),t?.type==="mousedown"&&(qn=!0,Ft(document,"mouseup",Pn,{once:!0})),qn),oc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Wn="disabled",Bt="selected",ic=class extends Pi{static get observedAttributes(){return[Wn,Bt]}connectedCallback(){On||(this.tabIndex=-1),this.hasAttribute("role")||L(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){L(this,"aria-disabled",`${this.disabled}`),L(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Bt]}set defaultSelected(t){this[Bt]=t}get disabled(){return L(this,Wn)!==null}set disabled(t){L(this,Wn,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=L(this,"label"))!=null?t:this.text}set label(t){L(this,"label",t)}get selected(){return L(this,Bt)!==null}set selected(t){L(this,Bt,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=L(this,"value"))!=null?t:this.text}set value(t){L(this,"value",t)}};Ui.define("u-option",ic);var Vn=`${Ql}
195
195
  ::slotted([role="option"]) { display: block; cursor: pointer }
196
- ::slotted([role="option"]:focus) { ${$l} }
196
+ ::slotted([role="option"]:focus) { ${_l} }
197
197
  ::slotted([role="option"][aria-hidden="true"]),
198
198
  ::slotted([role="option"][disabled]),
199
- ::slotted([role="option"][hidden]) { display: none !important }`,ac=ic(Un),Di,zi=0,sc=In||Oe,Fi="click,focusout,input,keydown,mousedown,mouseup",Bi="focus,focusin,blur,focusout",Ne={singular:"%d hit",plural:"%d hits"},Gi=class extends qi{constructor(){super(),this._texts=Yl({},Ne),this._value="",this._of="/",tc(this,Un)}static get observedAttributes(){return["id",...Object.keys(Ne).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Wi(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),Nn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Nn(this,!1),Dn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ne[o])this._texts[o]=n||Ne[o];else if(this._root){this._input&&zn(this,this._input);for(const r of this._root.querySelectorAll(i))zn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&dc(this,t),(n==="focus"||n==="focusin")&&lc(this,t),(n==="blur"||n==="focusout")&&cc(this,t),n==="keydown"&&uc(this,t),n==="mousedown"&&this.contains(e)&&Wn(t),(n==="mutation"||n==="input")&&(clearTimeout(zi),zi=setTimeout(Xi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Hi=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Hi(t?._input)||!e,(n=Nn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&zn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&Xi(t)},Dn=t=>{t._input&&(Me(t._input||t,Bi,t),Me(t._root||t,Fi,t),Gt(t,!1),t._input=void 0)},zn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",Rn(t)),Ft(e,Bi,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",Rn(t)),L(e,"aria-expanded",`${!sc||n}`),L(e,"autocomplete","off"),L(e,"role",Hi(e)?null:"combobox")},lc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Dn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Ql,Rn((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Fi,t),Gt(t,L(t._input,"inputmode")!=="none"),Ui())},cc=(t,e)=>{!Oe&&!Wn()&&t._input&&setTimeout(Ji,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Ji=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Dn(t))},dc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),oc(t._input,o.value);Oe&&Ji(t)},uc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},Xi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(Di),e?.type==="input"&&a!==t._value&&(Di=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Ui(p),t._value=a},1e3));let u=0;if(In)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Wi(this).getElementById(L(this,"list")||"")}}),Vi.define("u-datalist",Gi),ct()&&!Gl()&&Hl();const mc="3.1.12",ji="_alert_1d3iq_1 _ds-alert_s9m4f_3",Zi="_app_1d3iq_1",Ki="_sticky_1d3iq_1",Yi="_avatar_1d3iq_1 _ds-avatar_s9m4f_1",Qi="_badge_1d3iq_1",_i="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_s9m4f_5",$i="_button_1d3iq_1 _ds-button_s9m4f_1",tr="_card_1d3iq_1",er="_group_1d3iq_1",nr="_chip_1d3iq_1 _ds-chip_s9m4f_5",or="_details_1d3iq_1 _ds-details_s9m4f_3",ir="_dialog_1d3iq_1 _ds-dialog_s9m4f_5",rr="__drawer_1d3iq_1",ar="_divider_1d3iq_1",sr="_errorsummary_1d3iq_1 _ds-error-summary_s9m4f_5",lr="_field_1d3iq_1 _ds-field_s9m4f_1",cr="_suggestion_1d3iq_1 _ds-suggestion_s9m4f_5",dr="_affixes_1d3iq_1 _ds-field-affixes_s9m4f_3",ur="_fieldset_1d3iq_1 _ds-fieldset_s9m4f_3",mr="_fileupload_1d3iq_1",pr="_helptext_1d3iq_1 _ds-focus_s9m4f_1",fr="_input_1d3iq_1 _ds-input_s9m4f_1",hr="_law_1d3iq_1",gr="_grid_1d3iq_1",vr="_flex_1d3iq_1",br="_link_1d3iq_1",wr="_logo_1d3iq_1",yr="__logo_1d3iq_1",xr="_pagination_1d3iq_1 _ds-pagination_s9m4f_5",Sr="_popover_1d3iq_1 _ds-popover_s9m4f_3",Er="_progress_1d3iq_1",kr="__indeterminate_1d3iq_1",Tr="_skeleton_1d3iq_1 _ds-skeleton_s9m4f_5",Ar="__skeleton_1d3iq_1",Lr="_spinner_1d3iq_1",Cr="_steps_1d3iq_1",Or="_table_1d3iq_1 _ds-table_s9m4f_5",Mr="__scrollShadow_1d3iq_1",Ir="_tabs_1d3iq_1 _ds-tabs_s9m4f_5",Nr="__scrollMask_1d3iq_1",Rr="_tag_1d3iq_1 _ds-tag_s9m4f_5",qr="_toast_1d3iq_1",Pr="__toastClose_1d3iq_1",Wr="__toastOpen_1d3iq_1",Vr="__toastTimeout_1d3iq_1",Ur="_togglegroup_1d3iq_1 _ds-toggle-group_s9m4f_5",Dr="__tooltip_1d3iq_1 _ds-tooltip_s9m4f_5",zr="_heading_1d3iq_1 _ds-heading_s9m4f_1",Fr="_ingress_1d3iq_1",Br="_muted_1d3iq_1",Gr="_info_1d3iq_1",Hr="_prose_1d3iq_1",Jr="_validation_1d3iq_1 _ds-validation-message_s9m4f_1",Xr="_body_1d3iq_161",jr="__checked_1d3iq_1",C={alert:ji,app:Zi,sticky:Ki,avatar:Yi,badge:Qi,breadcrumbs:_i,button:$i,card:tr,group:er,chip:nr,details:or,dialog:ir,_drawer:rr,divider:ar,errorsummary:sr,field:lr,suggestion:cr,affixes:dr,fieldset:ur,fileupload:mr,helptext:pr,input:fr,law:hr,grid:gr,flex:vr,link:br,logo:wr,_logo:yr,pagination:xr,popover:Sr,progress:Er,_indeterminate:kr,skeleton:Tr,_skeleton:Ar,spinner:Lr,steps:Cr,table:Or,_scrollShadow:Mr,tabs:Ir,_scrollMask:Nr,tag:Rr,toast:qr,_toastClose:Pr,_toastOpen:Wr,_toastTimeout:Vr,togglegroup:Ur,_tooltip:Dr,heading:zr,ingress:Fr,muted:Br,info:Gr,prose:Hr,validation:Jr,body:Xr,_checked:jr},pc=Object.freeze(Object.defineProperty({__proto__:null,_checked:jr,_drawer:rr,_indeterminate:kr,_logo:yr,_scrollMask:Nr,_scrollShadow:Mr,_skeleton:Ar,_toastClose:Pr,_toastOpen:Wr,_toastTimeout:Vr,_tooltip:Dr,affixes:dr,alert:ji,app:Zi,avatar:Yi,badge:Qi,body:Xr,breadcrumbs:_i,button:$i,card:tr,chip:nr,default:C,details:or,dialog:ir,divider:ar,errorsummary:sr,field:lr,fieldset:ur,fileupload:mr,flex:vr,grid:gr,group:er,heading:zr,helptext:pr,info:Gr,ingress:Fr,input:fr,law:hr,link:br,logo:wr,muted:Br,pagination:xr,popover:Sr,progress:Er,prose:Hr,skeleton:Tr,spinner:Lr,steps:Cr,sticky:Ki,suggestion:cr,table:Or,tabs:Ir,tag:Rr,toast:qr,togglegroup:Ur,validation:Jr},Symbol.toStringTag,{value:"Module"}));function Zr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Zr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function fc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Zr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},J=()=>typeof window<"u"&&typeof document<"u",bt=t=>J()?document.getElementsByClassName(C[t].split(" ")[0]):[];function Nt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),N=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Kr(t,...e)},Kr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{if(!J())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?N(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Re=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))v(o,i,r);return o},hc=typeof HTMLElement>"u"?class{}:HTMLElement,gc=(t,e)=>!J()||window.customElements.get(t)||window.customElements.define(t,e),vc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,bc=(t,e)=>{if(!vc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},wc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,yc=`.${C.breadcrumbs.split(" ")[0]}`,xc=`.${C.card.split(" ")[0]}`,Yr=`.${C.chip.split(" ")[0]}`,Sc=`.${C.helptext.split(" ")[0]}`,Ec=`.${C.pagination.split(" ")[0]}`,kc='summary,u-summary,a,button,[role="tab"],[role="button"]',Fn="mattilsynet.matomo.cloud",Tc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],X="mtds-analytics-banner",Ac="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function Qr(t,e={}){if(J()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Fn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&Lc();const a=r?`https://cdn.matomo.cloud/${Fn}/container_${r}.js`:`https://cdn.matomo.cloud/${Fn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;Tc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function Lc(){if(document.getElementById(X)||window.localStorage.getItem(X))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${X}" data-analytics="ignore"><style>
199
+ ::slotted([role="option"][hidden]) { display: none !important }`,rc=oc(Vn),zi,Fi=0,ac=On||Me,Bi="click,focusout,input,keydown,mousedown,mouseup",Gi="focus,focusin,blur,focusout",Re={singular:"%d hit",plural:"%d hits"},Hi=class extends Pi{constructor(){super(),this._texts=Kl({},Re),this._value="",this._of="/",$l(this,Vn)}static get observedAttributes(){return["id",...Object.keys(Re).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Vi(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),In(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Oe(this._root||this,"focus",this,!0),Oe(this._root||this,"focusin",this),In(this,!1),Un(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Re[o])this._texts[o]=n||Re[o];else if(this._root){this._input&&Dn(this,this._input);for(const r of this._root.querySelectorAll(i))Dn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&cc(this,t),(n==="focus"||n==="focusin")&&sc(this,t),(n==="blur"||n==="focusout")&&lc(this,t),n==="keydown"&&dc(this,t),n==="mousedown"&&this.contains(e)&&Pn(t),(n==="mutation"||n==="input")&&(clearTimeout(Fi),Fi=setTimeout(ji,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Ji=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Ji(t?._input)||!e,(n=In(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Dn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&ji(t)},Un=t=>{t._input&&(Oe(t._input||t,Gi,t),Oe(t._root||t,Bi,t),Gt(t,!1),t._input=void 0)},Dn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",Rn(t)),Ft(e,Gi,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",Rn(t)),L(e,"aria-expanded",`${!ac||n}`),L(e,"autocomplete","off"),L(e,"role",Ji(e)?null:"combobox")},sc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Un(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Yl,Rn((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Bi,t),Gt(t,L(t._input,"inputmode")!=="none"),Di())},lc=(t,e)=>{!Me&&!Pn()&&t._input&&setTimeout(Xi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Xi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Un(t))},cc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),nc(t._input,o.value);Me&&Xi(t)},dc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},ji=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(zi),e?.type==="input"&&a!==t._value&&(zi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Di(p),t._value=a},1e3));let u=0;if(On)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Vi(this).getElementById(L(this,"list")||"")}}),Ui.define("u-datalist",Hi),ct()&&!Bl()&&Gl();const uc="3.1.14",Zi="_alert_1d3iq_1 _ds-alert_s9m4f_3",Ki="_app_1d3iq_1",Yi="_sticky_1d3iq_1",Qi="_avatar_1d3iq_1 _ds-avatar_s9m4f_1",_i="_badge_1d3iq_1",$i="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_s9m4f_5",tr="_button_1d3iq_1 _ds-button_s9m4f_1",er="_card_1d3iq_1",nr="_group_1d3iq_1",or="_chip_1d3iq_1 _ds-chip_s9m4f_5",ir="_details_1d3iq_1 _ds-details_s9m4f_3",rr="_dialog_1d3iq_1 _ds-dialog_s9m4f_5",ar="__drawer_1d3iq_1",sr="_divider_1d3iq_1",lr="_errorsummary_1d3iq_1 _ds-error-summary_s9m4f_5",cr="_field_1d3iq_1 _ds-field_s9m4f_1",dr="_suggestion_1d3iq_1 _ds-suggestion_s9m4f_5",ur="_affixes_1d3iq_1 _ds-field-affixes_s9m4f_3",mr="_fieldset_1d3iq_1 _ds-fieldset_s9m4f_3",pr="_fileupload_1d3iq_1",fr="_helptext_1d3iq_1 _ds-focus_s9m4f_1",hr="_input_1d3iq_1 _ds-input_s9m4f_1",gr="_law_1d3iq_1",vr="_grid_1d3iq_1",br="_flex_1d3iq_1",wr="_link_1d3iq_1",yr="_logo_1d3iq_1",xr="__logo_1d3iq_1",Sr="_pagination_1d3iq_1 _ds-pagination_s9m4f_5",Er="_popover_1d3iq_1 _ds-popover_s9m4f_3",kr="_progress_1d3iq_1",Tr="__indeterminate_1d3iq_1",Ar="_skeleton_1d3iq_1 _ds-skeleton_s9m4f_5",Lr="__skeleton_1d3iq_1",Cr="_spinner_1d3iq_1",Mr="_steps_1d3iq_1",Or="_table_1d3iq_1 _ds-table_s9m4f_5",Ir="__scrollShadow_1d3iq_1",Rr="_tabs_1d3iq_1 _ds-tabs_s9m4f_5",Nr="__scrollMask_1d3iq_1",qr="_tag_1d3iq_1 _ds-tag_s9m4f_5",Pr="_toast_1d3iq_1",Wr="__toastClose_1d3iq_1",Vr="__toastOpen_1d3iq_1",Ur="__toastTimeout_1d3iq_1",Dr="_togglegroup_1d3iq_1 _ds-toggle-group_s9m4f_5",zr="__tooltip_1d3iq_1 _ds-tooltip_s9m4f_5",Fr="_heading_1d3iq_1 _ds-heading_s9m4f_1",Br="_ingress_1d3iq_1",Gr="_muted_1d3iq_1",Hr="_info_1d3iq_1",Jr="_prose_1d3iq_1",Xr="_validation_1d3iq_1 _ds-validation-message_s9m4f_1",jr="_body_1d3iq_161",Zr="__checked_1d3iq_1",C={alert:Zi,app:Ki,sticky:Yi,avatar:Qi,badge:_i,breadcrumbs:$i,button:tr,card:er,group:nr,chip:or,details:ir,dialog:rr,_drawer:ar,divider:sr,errorsummary:lr,field:cr,suggestion:dr,affixes:ur,fieldset:mr,fileupload:pr,helptext:fr,input:hr,law:gr,grid:vr,flex:br,link:wr,logo:yr,_logo:xr,pagination:Sr,popover:Er,progress:kr,_indeterminate:Tr,skeleton:Ar,_skeleton:Lr,spinner:Cr,steps:Mr,table:Or,_scrollShadow:Ir,tabs:Rr,_scrollMask:Nr,tag:qr,toast:Pr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,togglegroup:Dr,_tooltip:zr,heading:Fr,ingress:Br,muted:Gr,info:Hr,prose:Jr,validation:Xr,body:jr,_checked:Zr},mc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Zr,_drawer:ar,_indeterminate:Tr,_logo:xr,_scrollMask:Nr,_scrollShadow:Ir,_skeleton:Lr,_toastClose:Wr,_toastOpen:Vr,_toastTimeout:Ur,_tooltip:zr,affixes:ur,alert:Zi,app:Ki,avatar:Qi,badge:_i,body:jr,breadcrumbs:$i,button:tr,card:er,chip:or,default:C,details:ir,dialog:rr,divider:sr,errorsummary:lr,field:cr,fieldset:mr,fileupload:pr,flex:br,grid:vr,group:nr,heading:Fr,helptext:fr,info:Hr,ingress:Br,input:hr,law:gr,link:wr,logo:yr,muted:Gr,pagination:Sr,popover:Er,progress:kr,prose:Jr,skeleton:Ar,spinner:Cr,steps:Mr,sticky:Yi,suggestion:dr,table:Or,tabs:Rr,tag:qr,toast:Pr,togglegroup:Dr,validation:Xr},Symbol.toStringTag,{value:"Module"}));function Kr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Kr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function pc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Kr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},J=()=>typeof window<"u"&&typeof document<"u",bt=t=>J()?document.getElementsByClassName(C[t].split(" ")[0]):[];function Rt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),R=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Yr(t,...e)},Yr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{if(!J())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?R(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Ne=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))v(o,i,r);return o},fc=typeof HTMLElement>"u"?class{}:HTMLElement,hc=(t,e)=>!J()||window.customElements.get(t)||window.customElements.define(t,e),gc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,vc=(t,e)=>{if(!gc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(O("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},bc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,wc=`.${C.breadcrumbs.split(" ")[0]}`,yc=`.${C.card.split(" ")[0]}`,Qr=`.${C.chip.split(" ")[0]}`,xc=`.${C.helptext.split(" ")[0]}`,Sc=`.${C.pagination.split(" ")[0]}`,Ec='summary,u-summary,a,button,[role="tab"],[role="button"]',zn="mattilsynet.matomo.cloud",kc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],X="mtds-analytics-banner",Tc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function _r(t,e={}){if(J()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${zn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&Ac();const a=r?`https://cdn.matomo.cloud/${zn}/container_${r}.js`:`https://cdn.matomo.cloud/${zn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;kc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function Ac(){if(document.getElementById(X)||window.localStorage.getItem(X))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${X}" data-analytics="ignore"><style>
200
200
  #${X}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
201
201
  #${X} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
202
202
  #${X} button:focus-visible { outline: 2px solid }
@@ -204,9 +204,9 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
204
204
  #${X} button:active { background: #054449; scale: .9 }
205
205
  #${X} p { margin: 0 .25em }
206
206
  </style>
207
- <p>Vi bruker <a href="${Ac}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
207
+ <p>Vi bruker <a href="${Tc}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
208
208
  <form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">&times;</button></form>
209
- </dialog>`);const e=document.getElementById(X),n=()=>window.localStorage.setItem(X,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function Cc(t){window._mtdsTracking?.enabled&&setTimeout(Oc,0,t)}function Oc({type:t,target:e}){const n=t==="click"?e?.closest?.(kc):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=_r(n)||Nc(n)||v(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=v(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(Yr)?"Chip":"Form",o="change",r=_r(s||n)||Jt(s?.querySelector("legend"))||Jt(n?.labels?.[0])}else if(v(n,"role")==="tab")i="Tab",o="navigate";else if(v(n,"popovertarget")){if(!Mc(n)?.matches(":popover-open"))return;i=n.closest(Sc)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(wc)){const a=Ic(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&v(n,"data-tooltip")||Jt(n)}else if(n.closest(yc))i="Breadcrumbs",o="navigate";else if(n.closest(Ec))i="Pagination",o="navigate";else if(n.closest(xc))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(Yr))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(v(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");Qr("event",{category:v(n,"data-analytics-category")??i,action:v(n,"data-analytics-action")??o,name:v(n,"data-analytics-name")??r})}const Jt=t=>t?.textContent?.trim()||"",_r=t=>t&&v(t,"aria-label")||"",Mc=t=>document.getElementById(v(t,"popovertarget")||""),Ic=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Nc=t=>{const e=Jt(t),n=Jt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};it("analytics",()=>[N(document,"click toggle submit change",Cc,Ht)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const Bn=C.app.split(" ")[0],Rc=`[data-command="toggle-app-expanded"],.${Bn} > [command="show-modal"]`,Gn=`.${Bn} > dialog,.${Bn} dialog ~ main`,$r=bt("sticky"),ta=t=>{document.startViewTransition?document.startViewTransition(t):t()},ea=t=>ta(()=>window.mtdsToggleAppExpanded?.(t));function qc(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Gn))return na();if(n||!(e instanceof HTMLButtonElement)||!e.matches(Rc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?ea():ta(()=>{const r=document.querySelector(Gn);r?.setAttribute("closedby","any"),r?.showModal()})}function na(){document.querySelector(Gn)?.close()}let Hn=0,Rt,et=0,Jn=0,qe=0,Xn=!1,jn=0,wt=0;function Pc(){if(!$r?.length)return;const t=$r[0],e=window.scrollY,n=e<wt;wt=e,n!==Rt&&(Hn=(t.parentElement?.getBoundingClientRect().top||0)+wt,Rt=n,Jn=t.offsetHeight,qe=t.getBoundingClientRect().top+wt,Xn=t.offsetHeight<=window.innerHeight,jn=window.innerHeight),!(et===-1&&Xn)&&(et!==-1&&(Xn||Rt&&wt<=qe)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),et=-1):et===-1&&!Rt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,wt-Hn)}px`),et=0):et!==1&&!Rt&&wt+jn>=qe+Jn?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${jn-Jn}px`),et=1):et===1&&Rt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${qe-Hn}px`),et=0))}it("app",()=>[N(document,"click",qc,!0),N(window,"resize",Nt(na,100),Ht),N(window,"scroll",Pc,Ht)]);const Wc=/<[^>]+\bid="([^"]+)[^>]+>/gi,oa=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Vc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Uc=/kapittel-\d+-ledd-\d+/,Dc=/<button[^>]+>.*?<\/button>/g,zc=/►m\d+/i,Pe=/<[^>]+>/g,Fc=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Bc=/<(\/?)(article|footer|section)/gi,Gc=/(src|href)="([^"]+)"/gi,Hc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Jc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Xc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ia="https://lovdata.no/",jc="https://www.mattilsynet.no/regelveiledning/?regelverk=",Zc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Zn=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Kc=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Yc=(t,e)=>{const n=Zn(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&v(o,"aria-checked",`${v(o,"aria-checked")!=="true"}`)})},Qc=(t,e)=>{const n=Zn(t);e?.querySelectorAll("button").forEach(o=>{v(o,"aria-checked",`${n.includes(o.value)||!1}`)})},_c=(t,e)=>{const n=ra(e);return Zn(t).map(o=>td(o,n)).filter(o=>!!o)},$c=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Zc};for(const o of e.matchAll(Fc)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},ra=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Bc,"<$1div").replace(Hc,"$1$2$3").replace(Gc,(e,n,o)=>`${n}="${o.includes(":")?"":ia}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Xc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${yt("id",n)}-ledd-0">${i}</div>`).replace(Jc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(Wc,(e,n,o,i)=>{const r=aa(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,td=(t,e)=>{const n=Uc.test(t),o=t.split("-").map((l,d,u)=>d%2?ed(u.slice(0,d+1).join("-"),e,n):null).filter(l=>!!l);if(!o.length)return null;const i=o.filter(({guideUrl:l})=>l).pop()?.guideUrl,r=o.filter(({url:l})=>l).pop(),a=o.filter(l=>l.className==="section"&&oa.test(l.label)).pop(),s=r?`${ia}${r.url}`:"",c=o.slice(o.indexOf(a||o[0])).map(({label:l})=>l).join(", ");return{...o.slice(-1)[0],path:o,label:c,url:s,guideUrl:i}},ed=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=yt("class",i),a=yt("data-lovdata-url",i),s=aa(i,t,o,e),[c,l,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${jc}${u}_${t}`,html:nd(t,e),url:a,label:!n&&r==="section"&&s?.match(oa)?.[0]||s}},yt=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},nd=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(Dc,""):""},aa=(t,e,n,o)=>od[yt("class",t)]?.(t,e,n,o)||"",od={numberedLegalP:t=>`nr. ${yt("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Vc)?.[2]?.replace(Pe,"")?.replace(zc,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(Pe,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),c=yt("data-name",t)||"-",l=yt("type",s)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(Pe,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(Pe,"")}`}};function W(t,e={}){const n=document.getElementById(e.id||"")||M("dialog");return v(n,"aria-busy",e.busy?"true":null),v(n,"class",fc(C.toast,e.className)),v(n,"closedby",e.closedby||null),v(n,"data-color",e.color||null),v(n,"data-icon",`${e.icon??""}`||null),v(n,"data-timeout",`${e.timeout??""}`||null),v(n,"id",e.id||`${Date.now()}`),v(n,"open",e.open===!1?null:""),n.innerHTML=t,N(n,"animationend",id,{once:!0}),document.body.appendChild(n),n.id}function id({animationName:t,target:e}){t===C._toastClose&&e.remove()}W.success=(t,e)=>W(t,{color:"success",...e}),W.danger=(t,e)=>W(t,{color:"danger",...e}),W.info=(t,e)=>W(t,{color:"info",...e}),W.warning=(t,e)=>W(t,{color:"warning",...e}),W.neutral=(t,e)=>W(t,{color:"neutral",...e}),W.promise=async function(e,n){const{loading:o,success:i,error:r,...a}=n,s=W(o,{busy:!0,...a});try{const c=await e();return W.success(i,{id:s,busy:!1}),c}catch(c){throw W.danger(r,{id:s,busy:!1}),c}};const rd=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
209
+ </dialog>`);const e=document.getElementById(X),n=()=>window.localStorage.setItem(X,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function Lc(t){window._mtdsTracking?.enabled&&setTimeout(Cc,0,t)}function Cc({type:t,target:e}){const n=t==="click"?e?.closest?.(Ec):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=$r(n)||Ic(n)||v(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=v(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(Qr)?"Chip":"Form",o="change",r=$r(s||n)||Jt(s?.querySelector("legend"))||Jt(n?.labels?.[0])}else if(v(n,"role")==="tab")i="Tab",o="navigate";else if(v(n,"popovertarget")){if(!Mc(n)?.matches(":popover-open"))return;i=n.closest(xc)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(bc)){const a=Oc(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&v(n,"data-tooltip")||Jt(n)}else if(n.closest(wc))i="Breadcrumbs",o="navigate";else if(n.closest(Sc))i="Pagination",o="navigate";else if(n.closest(yc))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(Qr))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(v(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");_r("event",{category:v(n,"data-analytics-category")??i,action:v(n,"data-analytics-action")??o,name:v(n,"data-analytics-name")??r})}const Jt=t=>t?.textContent?.trim()||"",$r=t=>t&&v(t,"aria-label")||"",Mc=t=>document.getElementById(v(t,"popovertarget")||""),Oc=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Ic=t=>{const e=Jt(t),n=Jt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};it("analytics",()=>[R(document,"click toggle submit change",Lc,Ht)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const Fn=C.app.split(" ")[0],Rc=`[data-command="toggle-app-expanded"],.${Fn} > [command="show-modal"]`,Bn=`.${Fn} > dialog,.${Fn} dialog ~ main`,ta=bt("sticky"),ea=t=>{document.startViewTransition?document.startViewTransition(t):t()},na=t=>ea(()=>window.mtdsToggleAppExpanded?.(t));function Nc(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Bn))return oa();if(n||!(e instanceof HTMLButtonElement)||!e.matches(Rc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?na():ea(()=>{const r=document.querySelector(Bn);r?.setAttribute("closedby","any"),r?.showModal()})}function oa(){document.querySelector(Bn)?.close()}let Gn=0,Nt,et=0,Hn=0,qe=0,Jn=!1,Xn=0,wt=0;function qc(){if(!ta?.length)return;const t=ta[0],e=window.scrollY,n=e<wt;wt=e,n!==Nt&&(Gn=(t.parentElement?.getBoundingClientRect().top||0)+wt,Nt=n,Hn=t.offsetHeight,qe=t.getBoundingClientRect().top+wt,Jn=t.offsetHeight<=window.innerHeight,Xn=window.innerHeight),!(et===-1&&Jn)&&(et!==-1&&(Jn||Nt&&wt<=qe)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),et=-1):et===-1&&!Nt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,wt-Gn)}px`),et=0):et!==1&&!Nt&&wt+Xn>=qe+Hn?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Xn-Hn}px`),et=1):et===1&&Nt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${qe-Gn}px`),et=0))}it("app",()=>[R(document,"click",Nc,!0),R(window,"resize",Rt(oa,100),Ht),R(window,"scroll",qc,Ht)]);const Pc=/<[^>]+\bid="([^"]+)[^>]+>/gi,ia=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Wc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Vc=/kapittel-\d+-ledd-\d+/,Uc=/<button[^>]+>.*?<\/button>/g,Dc=/►m\d+/i,Pe=/<[^>]+>/g,zc=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Fc=/<(\/?)(article|footer|section)/gi,Bc=/(src|href)="([^"]+)"/gi,Gc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Hc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Jc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ra="https://lovdata.no/",Xc="https://www.mattilsynet.no/regelveiledning/?regelverk=",jc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},jn=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Zc=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Kc=(t,e)=>{const n=jn(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&v(o,"aria-checked",`${v(o,"aria-checked")!=="true"}`)})},Yc=(t,e)=>{const n=jn(t);e?.querySelectorAll("button").forEach(o=>{v(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Qc=(t,e)=>{const n=aa(e);return jn(t).map(o=>$c(o,n)).filter(o=>!!o)},_c=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...jc};for(const o of e.matchAll(zc)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},aa=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Fc,"<$1div").replace(Gc,"$1$2$3").replace(Bc,(e,n,o)=>`${n}="${o.includes(":")?"":ra}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Jc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${yt("id",n)}-ledd-0">${i}</div>`).replace(Hc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(Pc,(e,n,o,i)=>{const r=sa(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,$c=(t,e)=>{const n=Vc.test(t),o=t.split("-").map((l,d,u)=>d%2?td(u.slice(0,d+1).join("-"),e,n):null).filter(l=>!!l);if(!o.length)return null;const i=o.filter(({guideUrl:l})=>l).pop()?.guideUrl,r=o.filter(({url:l})=>l).pop(),a=o.filter(l=>l.className==="section"&&ia.test(l.label)).pop(),s=r?`${ra}${r.url}`:"",c=o.slice(o.indexOf(a||o[0])).map(({label:l})=>l).join(", ");return{...o.slice(-1)[0],path:o,label:c,url:s,guideUrl:i}},td=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=yt("class",i),a=yt("data-lovdata-url",i),s=sa(i,t,o,e),[c,l,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${Xc}${u}_${t}`,html:ed(t,e),url:a,label:!n&&r==="section"&&s?.match(ia)?.[0]||s}},yt=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},ed=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(Uc,""):""},sa=(t,e,n,o)=>nd[yt("class",t)]?.(t,e,n,o)||"",nd={numberedLegalP:t=>`nr. ${yt("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Wc)?.[2]?.replace(Pe,"")?.replace(Dc,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(Pe,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),c=yt("data-name",t)||"-",l=yt("type",s)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(Pe,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(Pe,"")}`}};function W(t,e={}){const n=document.getElementById(e.id||"")||O("dialog");return v(n,"aria-busy",e.busy?"true":null),v(n,"class",pc(C.toast,e.className)),v(n,"closedby",e.closedby||null),v(n,"data-color",e.color||null),v(n,"data-icon",`${e.icon??""}`||null),v(n,"data-timeout",`${e.timeout??""}`||null),v(n,"id",e.id||`${Date.now()}`),v(n,"open",e.open===!1?null:""),n.innerHTML=t,R(n,"animationend",od,{once:!0}),document.body.appendChild(n),n.id}function od({animationName:t,target:e}){t===C._toastClose&&e.remove()}W.success=(t,e)=>W(t,{color:"success",...e}),W.danger=(t,e)=>W(t,{color:"danger",...e}),W.info=(t,e)=>W(t,{color:"info",...e}),W.warning=(t,e)=>W(t,{color:"warning",...e}),W.neutral=(t,e)=>W(t,{color:"neutral",...e}),W.promise=async function(e,n){const{loading:o,success:i,error:r,...a}=n,s=W(o,{busy:!0,...a});try{const c=await e();return W.success(i,{id:s,busy:!1}),c}catch(c){throw W.danger(r,{id:s,busy:!1}),c}};const id=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
210
210
  :host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
211
211
  [data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
212
212
 
@@ -373,8 +373,8 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
373
373
  vertical-align: middle;
374
374
  width: var(--mtds-5);
375
375
  }
376
- `,ad=[.1,.2,.25,.5,1];function sd(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((b,m,g)=>{const h=t.map(x=>x[g].number),w=h.reduce((x,y)=>x+y,0);return Math.max(b,...i?[w]:h)},0),a=r/10,s=10**`${Math.round(a)}`.length,c=a/s,l=(ad.find(b=>b>c)||1)*s,d=Math.ceil(r/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const p=u.appendChild(M("div",{class:"axisSteps"})),f=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(b,m)=>ld(l*m)).reverse().map(b=>p.append(M("div",{class:"axisStep","data-label":b}))),{total:d,groups:f,axis:u}}const ld=new Intl.NumberFormat().format;function cd(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=M("div",{class:"axisGroup","data-label":e}),r=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,color:s,number:c})=>{const l=M("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",s),l.style.setProperty("--value",`${c}`),r.appendChild(l)}),i})}function dd(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=M("div",{class:"lineContainer",role:"list"});s.style.setProperty("--color",a[0].color);const c=ud(a.map(({number:u},p,{length:f})=>[100/(f-1)*p,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");v(l,"aria-hidden","true"),v(l,"preserveAspectRatio","none"),v(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(v(d,"class","line"),v(d,"d",c),v(d,"fill","none"),v(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);v(u,"d",`M-100,100 L${c.slice(1)}L200,100`),v(u,"class","lineShade"),l.append(u)}a.forEach(({number:u,tooltip:p,event:f})=>{const b=M("div",{role:"listitem"}),m=M("div",{"aria-label":p,"data-event":f,tabindex:"0",class:"linePoint",role:"img"});m.style.setProperty("--value",`${u}`),b.appendChild(m),s.append(b)}),s.appendChild(l).append(d),r.append(s)}),r}const ud=(t,e)=>t.map(([n,o],i,r)=>i?md(i,r,e):`M${n},${o}`).join(" "),sa=([t,e],[n,o])=>[t+n,e+o],la=([t,e],[n,o])=>[t-n,e-o],ca=(t,[e,n])=>[t*e,t*n],md=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=sa(o,ca(n,la(i,e[t-2]||o))),[s,c]=sa(i,ca(n,la(o,e[t+1]||i)));return`C ${r},${a} ${s},${c} ${i[0]},${i[1]}`};function pd(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),v(o,"class","pie"),v(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="doughnut"?25:0,s=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,color:u}])=>{if(!l)return;const p=document.createElementNS("http://www.w3.org/2000/svg","path"),f=i/s;i+=l;const b=Math.min(i/s,.99999),m=b-f>.5?1:0,g=2*Math.PI*(f-.25),h=2*Math.PI*(b-.25),w=Math.cos(g),x=Math.sin(g),y=Math.cos(h),A=Math.sin(h),k=`M ${r+a*w} ${r+a*x} L ${r+r*w} ${r+r*x} A ${r} ${r} 0 ${m} 1 ${r+r*y} ${r+r*A} L ${r+a*y} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*x}`;p.style.setProperty("--color",u),v(p,"aria-label",c),v(p,"data-event",d),v(p,"d",k),v(p,"role","img"),v(p,"tabindex","0"),o.appendChild(p)}),o}const da="click keydown mousemove mouseout",ua="mtds-chart-tooltip",rt=J()?document.getElementById(ua)||M("div",{"aria-hidden":"true",class:C._tooltip,hidden:"",id:ua}):null;class fd extends hc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Nt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Re(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),N(this,da,this)}disconnectedCallback(){rt&&(rt.hidden=!0),Kr(this,da,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=vd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[n,o]=(v(this,"data-variant")||"column").split("-"),i=v(this,"data-aspect")||void 0,r=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=M("div",{class:"legend"},l);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:s,total:c}=sd(e,{aspect:i,type:o});(n==="column"||n==="bar")&&s.append(...cd(e)),(n==="line"||n==="area")&&s.append(dd(e,{total:c,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(pd(e,{aspect:i,variant:n})),this.shadowRoot?.append(a,r),bc(this,rd)}handleEvent(e){e.type==="click"||e.type==="keydown"?hd(e,this):gd(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function hd(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&v(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let ma="";function gd(t){if(!rt)return;rt?.isConnected||document.body.append(rt);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(rt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==ma&&(n&&(rt.textContent=n),ma=n,rt.hidden=!n)}const Kn=t=>t?.textContent?.trim()||"",vd=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const a=Kn(e.cells[0]),s=Kn(t?.rows[0].cells[r]),c=Kn(i),l=o===2?`${s}: ${c}`:`${a}: ${c}${s?` (${s})`:""}`;return v(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${n}-${r}`,color:`var(--mtdsc-chart-color-${n}-${r}, var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:v(i,"data-tooltip")||l}}));gc("mtds-chart",fd);const pa=new WeakSet,V=t=>!pa.has(t)&&pa.add(t),R=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),bd=bt("togglegroup"),fa=C.button.split(" "),wd=()=>{for(const t of bd){V(t)&&!t.hasAttribute("data-toggle-group")&&(v(t,"data-toggle-group","Valgknapper"),R('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))V(e)&&!e.classList.contains(fa[0])&&(e.classList.add(...fa),R('Only setting class="styles.button"','<label class="styles.button">',e))}},yd=bt("breadcrumbs"),xd=()=>{for(const t of yd)V(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...C.breadcrumbs.split(" ")),R('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},Sd=bt("errorsummary"),Ed=()=>{for(const t of Sd)V(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&R('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},kd=bt("dialog"),ha=()=>{for(const t of kd){if(V(t)){const e=v(t,"data-closedby");e&&(v(t,"closedby",e),R(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&R('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(R('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),v(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(v(t,"open",""),t.close()))}},Td=()=>{for(const t of document.querySelectorAll("[data-count]"))if(V(t)){const e=v(t,"data-count");t.classList.add(...C.validation.split(" ")),v(t,"data-limit",e),R(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Ad=()=>{for(const t of document.querySelectorAll("[data-command]"))if(V(t)){const e=v(t,"data-command");e==="row"?R(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):R(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},Ld=J()?document.getElementsByTagName("u-tabs"):[],Cd=()=>{for(const t of Ld)V(t)&&R("u-tabs","ds-tabs",t)},Yn=C.suggestion.split(" "),Od=J()?document.getElementsByTagName("u-combobox"):[],Md=J()?document.getElementsByTagName("ds-suggestion"):[],Id=()=>{for(const t of Od)V(t)&&(t.classList.add(...Yn),R("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Md)V(t)&&!t.classList.contains(Yn[0])&&(t.classList.add(...Yn),R("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Nd=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},Rd=bt("field"),We=new Set,qd=()=>{for(const t of Rd)t.nodeName!=="DS-FIELD"&&(V(t)||R('Only setting class="styles.field"','<ds-field class="styles.field">',t),!We.has(t)&&We.add(t)&&ke.prototype.connectedCallback.call(t))},Pd=()=>{for(const t of We)ke.prototype.disconnectedCallback.call(t),We.delete(t)},Wd=`[data-description], .${C.field.split(" ")[0]} label + p`,Vd=()=>{for(const t of document.querySelectorAll(Wd))V(t)&&t.getAttribute("data-field")!=="description"&&(v(t,"data-field","description"),R("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Ud=bt("validation"),Dd=()=>{for(const t of Ud)V(t)&&!t.hasAttribute("data-field")&&(v(t,"data-field","validation"),R('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},zd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))V(t)&&(v(t,"data-placement",v(t,"data-position")),R("data-position","data-placement",t))},Fd=Nt(()=>{Td(),Ad(),xd(),ha(),Ed(),Vd(),Dd(),zd(),qd(),wd(),Id(),Cd()},200);it("deprecations",()=>[Pd,N(document,"click",Nd,Ht),N(document,"toggle",ha,!0),Re(document,Fd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Bd=Nt(t=>{if(t.animationName!==C._logo)return;const e=t.target.closest?.(`.${C.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(M("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${s}</g></svg>`)}`,rel:"icon"}))}},200);it("logo",()=>[N(document,"animationend",Bd)]);function Gd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),n=e&&v(e,"popovertarget"),o=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&e instanceof HTMLButtonElement)&&e&&o instanceof HTMLElement&&o.popover){const i=v(e,"popovertargetaction"),r=i==="show"||(i==="hide"?!1:void 0);o.togglePopover(r)}}it("popover",()=>[N(document,"click",Gd)]);const Hd=J()?document.getElementsByTagName("table"):[],Jd=()=>{for(const t of Hd){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)v(i,"data-th",e[i.cellIndex]||":empty")}};it("table",()=>[Re(document,Nt(Jd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const ga=C.toast.split(" ")[0],Ve="data-sort";function Xd({animationName:t,target:e}){const n=e;if(t===C._toastTimeout&&n.close(),t!==C._toastOpen)return;const o=Number(v(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(Ve)||v(n,Ve,`${Date.now()}`),v(n,"tabindex","0"),[...document.querySelectorAll(`.${ga}[open]`)].sort((i,r)=>Number(v(r,Ve))-Number(v(i,Ve))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function jd({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(ga)&&v(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),c=o.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(r.width,10);a<=n&&n<=s&&l<=e&&e<=c&&t.close()}}it("toast",()=>[N(document,"animationstart",Xd),N(document,"click",jd)]),J()&&li(document.getElementById("mtds-tooltip")||M("div",{class:C._tooltip,id:"mtds-tooltip",popover:"manual"}));const va=`.${C.field.split(" ")[0]}`,Zd=`${va} :is(input,textarea,select)`,Kd="ds-suggestion,u-combobox",Yd=C.validation.split(" ")[0],Ue=t=>t instanceof HTMLFormElement&&v(t,"data-validation")==="form",De=t=>t.closest(va),Qn=t=>t?.querySelectorAll(Zd)||[],ze=t=>t?.getElementsByClassName(Yd)||[],ba=t=>{if(!t.clientHeight)return!0;const e=t.closest(Kd)?.items;return e?v(t,"aria-required")==="true"&&!!e.length:t.matches(":user-valid")},wa=t=>{const e=t.target?.form||t.target;let n;if(Ue(e)){for(const o of Qn(e)){const i=ba(o);!n&&!i&&(n=o);for(const r of ze(De(o)))v(r,"hidden",i?"":null)}for(const o of e.querySelectorAll("fieldset")){const i=[...Qn(o)].every(ba);for(const r of ze(o))De(r)||v(r,"hidden",i?"":null)}n&&(t.preventDefault(),n.focus())}},Qd=({target:t})=>{const e=t;if(!Ue(e.form))for(const n of ze(e.closest("fieldset")||De(e)))v(n,"hidden","")},_d=t=>Ue(t.target.form)&&t?.preventDefault(),ya=new WeakSet,$d=J()?ze(document):[],tu=()=>{for(const t of $d){if(ya.has(t))continue;ya.add(t);const e=Qn(De(t))[0];Ue(e?.form)&&v(t,"hidden","")}};it("validations",()=>[N(document,"input",Qd,!0),N(document,"invalid",_d,!0),N(document,"invalid",Nt(wa,10),Ht),N(document,"submit",wa,!0),Re(document,tu,{childList:!0,subtree:!0})]);var _n=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",xa=_n&&/iPad|iPhone|iPod/.test(navigator.userAgent),Sa;_n&&/^Mac/i.test(((Sa=navigator.userAgentData)==null?void 0:Sa.platform)||navigator.platform);var eu=typeof HTMLElement>"u"?class{}:HTMLElement;function z(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var nu=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},ou=0,iu=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ou).toString(32)}`),t.id):"",ru=(t,e,n)=>{const o=document.createElement(t);return o.textContent=e,o},au={define:(t,e)=>!_n||window.customElements.get(t)||window.customElements.define(t,e)},su=t=>{var e;const n=z(t,"aria-label")||"";return[...(((e=z(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},lu=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
376
+ `,rd=[.1,.2,.25,.5,1];function ad(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((b,m,g)=>{const h=t.map(x=>x[g].number),w=h.reduce((x,y)=>x+y,0);return Math.max(b,...i?[w]:h)},0),a=r/10,s=10**`${Math.round(a)}`.length,c=a/s,l=(rd.find(b=>b>c)||1)*s,d=Math.ceil(r/l)*l,u=O("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const p=u.appendChild(O("div",{class:"axisSteps"})),f=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(b,m)=>sd(l*m)).reverse().map(b=>p.append(O("div",{class:"axisStep","data-label":b}))),{total:d,groups:f,axis:u}}const sd=new Intl.NumberFormat().format;function ld(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,color:s,number:c})=>{const l=O("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",s),l.style.setProperty("--value",`${c}`),r.appendChild(l)}),i})}function cd(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=O("div",{class:"lineContainer",role:"list"});s.style.setProperty("--color",a[0].color);const c=dd(a.map(({number:u},p,{length:f})=>[100/(f-1)*p,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");v(l,"aria-hidden","true"),v(l,"preserveAspectRatio","none"),v(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(v(d,"class","line"),v(d,"d",c),v(d,"fill","none"),v(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);v(u,"d",`M-100,100 L${c.slice(1)}L200,100`),v(u,"class","lineShade"),l.append(u)}a.forEach(({number:u,tooltip:p,event:f})=>{const b=O("div",{role:"listitem"}),m=O("div",{"aria-label":p,"data-event":f,tabindex:"0",class:"linePoint",role:"img"});m.style.setProperty("--value",`${u}`),b.appendChild(m),s.append(b)}),s.appendChild(l).append(d),r.append(s)}),r}const dd=(t,e)=>t.map(([n,o],i,r)=>i?ud(i,r,e):`M${n},${o}`).join(" "),la=([t,e],[n,o])=>[t+n,e+o],ca=([t,e],[n,o])=>[t-n,e-o],da=(t,[e,n])=>[t*e,t*n],ud=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=la(o,da(n,ca(i,e[t-2]||o))),[s,c]=la(i,da(n,ca(o,e[t+1]||i)));return`C ${r},${a} ${s},${c} ${i[0]},${i[1]}`};function md(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),v(o,"class","pie"),v(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="doughnut"?25:0,s=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,color:u}])=>{if(!l)return;const p=document.createElementNS("http://www.w3.org/2000/svg","path"),f=i/s;i+=l;const b=Math.min(i/s,.99999),m=b-f>.5?1:0,g=2*Math.PI*(f-.25),h=2*Math.PI*(b-.25),w=Math.cos(g),x=Math.sin(g),y=Math.cos(h),A=Math.sin(h),k=`M ${r+a*w} ${r+a*x} L ${r+r*w} ${r+r*x} A ${r} ${r} 0 ${m} 1 ${r+r*y} ${r+r*A} L ${r+a*y} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*x}`;p.style.setProperty("--color",u),v(p,"aria-label",c),v(p,"data-event",d),v(p,"d",k),v(p,"role","img"),v(p,"tabindex","0"),o.appendChild(p)}),o}const ua="click keydown mousemove mouseout",ma="mtds-chart-tooltip",rt=J()?document.getElementById(ma)||O("div",{"aria-hidden":"true",class:C._tooltip,hidden:"",id:ma}):null;class pd extends fc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Rt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Ne(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),R(this,ua,this)}disconnectedCallback(){rt&&(rt.hidden=!0),Yr(this,ua,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=gd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[n,o]=(v(this,"data-variant")||"column").split("-"),i=v(this,"data-aspect")||void 0,r=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=O("div",{class:"legend"},l);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:s,total:c}=ad(e,{aspect:i,type:o});(n==="column"||n==="bar")&&s.append(...ld(e)),(n==="line"||n==="area")&&s.append(cd(e,{total:c,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(md(e,{aspect:i,variant:n})),this.shadowRoot?.append(a,r),vc(this,id)}handleEvent(e){e.type==="click"||e.type==="keydown"?fd(e,this):hd(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function fd(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&v(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let pa="";function hd(t){if(!rt)return;rt?.isConnected||document.body.append(rt);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(rt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==pa&&(n&&(rt.textContent=n),pa=n,rt.hidden=!n)}const Zn=t=>t?.textContent?.trim()||"",gd=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const a=Zn(e.cells[0]),s=Zn(t?.rows[0].cells[r]),c=Zn(i),l=o===2?`${s}: ${c}`:`${a}: ${c}${s?` (${s})`:""}`;return v(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${n}-${r}`,color:`var(--mtdsc-chart-color-${n}-${r}, var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:v(i,"data-tooltip")||l}}));hc("mtds-chart",pd);const fa=new WeakSet,V=t=>!fa.has(t)&&fa.add(t),N=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),vd=bt("togglegroup"),ha=C.button.split(" "),bd=()=>{for(const t of vd){V(t)&&!t.hasAttribute("data-toggle-group")&&(v(t,"data-toggle-group","Valgknapper"),N('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))V(e)&&!e.classList.contains(ha[0])&&(e.classList.add(...ha),N('Only setting class="styles.button"','<label class="styles.button">',e))}},wd=bt("breadcrumbs"),yd=()=>{for(const t of wd)V(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...C.breadcrumbs.split(" ")),N('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},xd=bt("errorsummary"),Sd=()=>{for(const t of xd)V(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&N('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},Ed=bt("dialog"),ga=()=>{for(const t of Ed){if(V(t)){const e=v(t,"data-closedby");e&&(v(t,"closedby",e),N(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&N('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(N('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),v(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(v(t,"open",""),t.close()))}},kd=()=>{for(const t of document.querySelectorAll("[data-count]"))if(V(t)){const e=v(t,"data-count");t.classList.add(...C.validation.split(" ")),v(t,"data-limit",e),N(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Td=()=>{for(const t of document.querySelectorAll("[data-command]"))if(V(t)){const e=v(t,"data-command");e==="row"?N(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):N(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},Ad=J()?document.getElementsByTagName("u-tabs"):[],Ld=()=>{for(const t of Ad)V(t)&&N("u-tabs","ds-tabs",t)},Kn=C.suggestion.split(" "),Cd=J()?document.getElementsByTagName("u-combobox"):[],Md=J()?document.getElementsByTagName("ds-suggestion"):[],Od=()=>{for(const t of Cd)V(t)&&(t.classList.add(...Kn),N("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Md)V(t)&&!t.classList.contains(Kn[0])&&(t.classList.add(...Kn),N("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Id=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},Rd=bt("field"),We=new Set,Nd=()=>{for(const t of Rd)t.nodeName!=="DS-FIELD"&&(V(t)||N('Only setting class="styles.field"','<ds-field class="styles.field">',t),!We.has(t)&&We.add(t)&&ke.prototype.connectedCallback.call(t))},qd=()=>{for(const t of We)ke.prototype.disconnectedCallback.call(t),We.delete(t)},Pd=`[data-description], .${C.field.split(" ")[0]} label + p`,Wd=()=>{for(const t of document.querySelectorAll(Pd))V(t)&&t.getAttribute("data-field")!=="description"&&(v(t,"data-field","description"),N("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Vd=bt("validation"),Ud=()=>{for(const t of Vd)V(t)&&!t.hasAttribute("data-field")&&(v(t,"data-field","validation"),N('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Dd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))V(t)&&(v(t,"data-placement",v(t,"data-position")),N("data-position","data-placement",t))},zd=Rt(()=>{kd(),Td(),yd(),ga(),Sd(),Wd(),Ud(),Dd(),Nd(),bd(),Od(),Ld()},200);it("deprecations",()=>[qd,R(document,"click",Id,Ht),R(document,"toggle",ga,!0),Ne(document,zd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Fd=Rt(t=>{if(t.animationName!==C._logo)return;const e=t.target.closest?.(`.${C.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(O("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${s}</g></svg>`)}`,rel:"icon"}))}},200);it("logo",()=>[R(document,"animationend",Fd)]);function Bd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),n=e&&v(e,"popovertarget"),o=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&e instanceof HTMLButtonElement)&&e&&o instanceof HTMLElement&&o.popover){const i=v(e,"popovertargetaction"),r=i==="show"||(i==="hide"?!1:void 0);o.togglePopover(r)}}it("popover",()=>[R(document,"click",Bd)]);const Gd=J()?document.getElementsByTagName("table"):[],Hd=()=>{for(const t of Gd){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)v(i,"data-th",e[i.cellIndex]||":empty")}};it("table",()=>[Ne(document,Rt(Hd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const va=C.toast.split(" ")[0],Ve="data-sort";function Jd({animationName:t,target:e}){const n=e;if(t===C._toastTimeout&&n.close(),t!==C._toastOpen)return;const o=Number(v(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(Ve)||v(n,Ve,`${Date.now()}`),v(n,"tabindex","0"),[...document.querySelectorAll(`.${va}[open]`)].sort((i,r)=>Number(v(r,Ve))-Number(v(i,Ve))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Xd({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(va)&&v(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),c=o.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(r.width,10);a<=n&&n<=s&&l<=e&&e<=c&&t.close()}}it("toast",()=>[R(document,"animationstart",Jd),R(document,"click",Xd)]),J()&&ci(document.getElementById("mtds-tooltip")||O("div",{class:C._tooltip,id:"mtds-tooltip",popover:"manual"}));const Yn=`.${C.field.split(" ")[0]}`,jd=`${Yn} :is(input,textarea,select)`,Zd="ds-suggestion,u-combobox",Kd=C.validation.split(" ")[0],Ue=t=>t instanceof HTMLFormElement&&v(t,"data-validation")==="form",Qn=t=>t.closest(Yn),_n=t=>t?.querySelectorAll(jd)||[],De=t=>t?.getElementsByClassName(Kd)||[],ba=t=>{const e=!t.clientHeight||t.disabled||v(t,"aria-disabled")==="true",n=t.closest(Zd)?.items,o=v(t,"aria-required")!=="true"||!!n?.length;return n&&t.setCustomValidity(e||o?"":"Required"),e?!1:t.matches(":user-invalid")},wa=t=>{const e=t.target?.form||t.target;let n;if(Ue(e)){for(const o of e.querySelectorAll(Yn)){const i=[..._n(o)].find(ba);!n&&i&&(n=i);for(const r of De(o))v(r,"hidden",i?null:"")}for(const o of e.querySelectorAll("fieldset")){const i=[..._n(o)].some(ba);for(const r of De(o))Qn(r)||v(r,"hidden",i?null:"")}n&&(t.preventDefault(),n.focus())}},Yd=({target:t})=>{const e=t;if(!Ue(e.form))for(const n of De(e.closest("fieldset")||Qn(e)))v(n,"hidden","")},Qd=t=>Ue(t.target.form)&&t?.preventDefault(),_d=J()?De(document):[],$d=()=>{for(const t of _d)if(!t.hasAttribute("data-validation")){const e=_n(Qn(t))[0];v(t,"data-validation","form"),Ue(e?.form)&&v(t,"hidden","")}};it("validations",()=>[R(document,"input comboboxbeforeselect",Yd,!0),R(document,"invalid",Qd,!0),R(document,"invalid",Rt(wa,10),Ht),R(document,"submit",wa,!0),Ne(document,$d,{childList:!0,subtree:!0})]);var $n=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ya=$n&&/iPad|iPhone|iPod/.test(navigator.userAgent),xa;$n&&/^Mac/i.test(((xa=navigator.userAgentData)==null?void 0:xa.platform)||navigator.platform);var tu=typeof HTMLElement>"u"?class{}:HTMLElement;function z(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var eu=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},nu=0,ou=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++nu).toString(32)}`),t.id):"",iu=(t,e,n)=>{const o=document.createElement(t);return o.textContent=e,o},ru={define:(t,e)=>!$n||window.customElements.get(t)||window.customElements.define(t,e)},au=t=>{var e;const n=z(t,"aria-label")||"";return[...(((e=z(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},su=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
377
377
  :host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
378
378
  :host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
379
379
  @media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
380
- @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,$n=!1,Ea=class extends eu{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(ru("style",lu))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if($n)return;$n=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=su(this);xa&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),z(this,"aria-busy",`${this.position===-1}`),z(this,"aria-label",e.trim()),z(this,"aria-labelledby",null),z(this,"aria-valuemax","100"),z(this,"aria-valuemin","0"),z(this,"aria-valuenow",`${t}`),z(this,"role",xa?"img":"progressbar"),$n=!1}get labels(){const t=this.closest("label:not([for])"),e=iu(this);return t&&(t.htmlFor=e),nu(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return Ta(this,"value")}set value(t){Aa(this,"value",t)}get max(){return Ta(this,"max")||1}set max(t){Aa(this,"max",t)}};Ea.formAssociated=!0;var ka=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),Ta=(t,e)=>{const n=z(t,e);return ka(n)?Math.max(0,Number.parseFloat(n)):null},Aa=(t,e,n)=>{if(n===null||ka(n))z(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${z}': '${n}'`)};au.define("u-progress",Ea);const cu=String(ps).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");return E.DSBreadcrumbsElement=mi,E.DSErrorSummaryElement=pi,E.DSFieldElement=ke,E.DSPaginationElement=Si,E.DSSuggestionElement=Ei,E.DSTabElement=Li,E.DSTabListElement=Ai,E.DSTabPanelElement=Ci,E.DSTabsElement=Ti,E.UHTMLComboboxElement=Xe,E.UHTMLComboboxShadowRoot=Fa,E.UHTMLComboboxStyle=Je,E.UHTMLDataListElement=Gi,E.UHTMLDataListShadowRoot=ac,E.UHTMLDataListStyle=Un,E.UHTMLTabElement=an,E.UHTMLTabListElement=on,E.UHTMLTabListShadowRoot=os,E.UHTMLTabListStyle=$e,E.UHTMLTabPanelElement=ln,E.UHTMLTabPanelShadowRoot=rs,E.UHTMLTabPanelStyle=tn,E.UHTMLTabShadowRoot=is,E.UHTMLTabStyle=en,E.UHTMLTabsElement=nn,E.UHTMLTabsShadowRoot=ns,E.UHTMLTabsStyle=_e,E.analytics=Qr,E.fixLawHtml=ra,E.getLawChecked=Kc,E.pagination=xi,E.parseLawIds=_c,E.parseLawMeta=$c,E.printcss=cu,E.setLawChecked=Qc,E.setTooltipElement=li,E.styles=pc,E.toast=W,E.toggleAppExpanded=ea,E.toggleLawChecked=Yc,E.version=mc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E})({});
380
+ @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,to=!1,Sa=class extends tu{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(iu("style",su))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(to)return;to=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=au(this);ya&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),z(this,"aria-busy",`${this.position===-1}`),z(this,"aria-label",e.trim()),z(this,"aria-labelledby",null),z(this,"aria-valuemax","100"),z(this,"aria-valuemin","0"),z(this,"aria-valuenow",`${t}`),z(this,"role",ya?"img":"progressbar"),to=!1}get labels(){const t=this.closest("label:not([for])"),e=ou(this);return t&&(t.htmlFor=e),eu(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return ka(this,"value")}set value(t){Ta(this,"value",t)}get max(){return ka(this,"max")||1}set max(t){Ta(this,"max",t)}};Sa.formAssociated=!0;var Ea=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),ka=(t,e)=>{const n=z(t,e);return Ea(n)?Math.max(0,Number.parseFloat(n)):null},Ta=(t,e,n)=>{if(n===null||Ea(n))z(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${z}': '${n}'`)};ru.define("u-progress",Sa);const lu=String(ms).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");return E.DSBreadcrumbsElement=pi,E.DSErrorSummaryElement=fi,E.DSFieldElement=ke,E.DSPaginationElement=Ei,E.DSSuggestionElement=ki,E.DSTabElement=Ci,E.DSTabListElement=Li,E.DSTabPanelElement=Mi,E.DSTabsElement=Ai,E.UHTMLComboboxElement=Je,E.UHTMLComboboxShadowRoot=za,E.UHTMLComboboxStyle=He,E.UHTMLDataListElement=Hi,E.UHTMLDataListShadowRoot=rc,E.UHTMLDataListStyle=Vn,E.UHTMLTabElement=rn,E.UHTMLTabListElement=nn,E.UHTMLTabListShadowRoot=ns,E.UHTMLTabListStyle=_e,E.UHTMLTabPanelElement=sn,E.UHTMLTabPanelShadowRoot=is,E.UHTMLTabPanelStyle=$e,E.UHTMLTabShadowRoot=os,E.UHTMLTabStyle=tn,E.UHTMLTabsElement=en,E.UHTMLTabsShadowRoot=es,E.UHTMLTabsStyle=Qe,E.analytics=_r,E.fixLawHtml=aa,E.getLawChecked=Zc,E.pagination=Si,E.parseLawIds=Qc,E.parseLawMeta=_c,E.printcss=lu,E.setLawChecked=Yc,E.setTooltipElement=ci,E.styles=mc,E.toast=W,E.toggleAppExpanded=na,E.toggleLawChecked=Kc,E.version=uc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E})({});