@mattilsynet/design 3.2.0 → 3.2.2
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.
- package/mtds/app/app-observer.js +1 -1
- package/mtds/app/app-toggle.js +10 -26
- package/mtds/app/app-toggle.js.map +1 -1
- package/mtds/app/app-toggle2.js +26 -10
- package/mtds/app/app-toggle2.js.map +1 -1
- package/mtds/app/app.js +1 -1
- package/mtds/atlas/atlas-element.js +1 -1
- package/mtds/atlas/cluster.js.map +1 -1
- package/mtds/illustrations/debatt.svg +26 -1
- package/mtds/illustrations/person-pear.svg +1 -2
- package/mtds/index.iife.js +14 -14
- package/mtds/package.json.js +1 -1
- package/mtds/steps/steps.d.ts +2 -0
- package/mtds/steps/steps.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/tabs/tabs.d.ts +9 -9
- package/mtds/tabs/tabs.js +8 -8
- package/mtds/tabs/tabs.js.map +1 -1
- package/package.json +10 -10
package/mtds/index.iife.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var mtds=(function(S){"use strict";var
|
|
1
|
+
var mtds=(function(S){"use strict";var el=Object.defineProperty,Zn=Object.getOwnPropertySymbols,ol=Object.prototype.hasOwnProperty,nl=Object.prototype.propertyIsEnumerable,ti=(t,e,o)=>e in t?el(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,il=(t,e)=>{for(var o in e||(e={}))ol.call(e,o)&&ti(t,o,e[o]);if(Zn)for(var o of Zn(e))nl.call(e,o)&&ti(t,o,e[o]);return t},yo=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ve=yo(),_o=ve?navigator.userAgent:"",ei=/android/i.test(_o),rl=/firefox/i.test(_o),oi=/iPad|iPhone|iPod/.test(_o),ni,al=ve&&/^Mac/i.test(((ni=navigator.userAgentData)==null?void 0:ni.platform)||navigator.platform),sl=ve&&window.CSSStyleSheet&&document.adoptedStyleSheets,ii={once:!0,capture:!0,passive:!0},ll=":host(:not([hidden])) { display: block }",cl="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",dl=`${ei?"data":"aria"}-multiselectable`,ul=typeof HTMLElement>"u"?class{}:HTMLElement,$=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),wo=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>ri(t,...e)},ri=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},fl=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Kt("slot")),!o.querySelector("style"))if(!sl)o.append(Kt("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},pl=(t,e,o)=>{const n=new MutationObserver(r=>{if(!yo()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},ml=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Eo=t=>ml(t).activeElement,hl=t=>{var e;const o=$(t,"aria-label")||"";return[...(((e=$(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},o).trim()},vl=t=>{if(!t||!ve)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Kt=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))$(n,i,r);return n},gl={define:(t,e)=>!yo()||window.customElements.get(t)||window.customElements.define(t,e)},ai=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},So=new WeakSet,si=(t,e)=>(e?.type==="pointerdown"&&(So.add(t),wo(document,"pointerup",()=>So.delete(t),ii)),So.has(t)),bl=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,yl=t=>{const e=$(t,"form");$(t,"form","#"),setTimeout(_l,0,t,e)},_l=(t,e)=>$(t,"form",e),It=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Y,wl=0,li=0,ge=t=>{clearTimeout(li),Y||(Y=Kt("div",{"aria-live":"assertive"}),Y.style.overflow="hidden",Y.style.position="fixed",Y.style.whiteSpace="nowrap",Y.style.width="1px"),Y.isConnected||document.body.append(Y),t===""&&(Y.textContent=""),t&&(Y.textContent=`${t}${wl++%2?" ":""}`,li=setTimeout(ge,!al&&rl?2e3:300,""))},xo=`${ll}
|
|
2
2
|
:is(:host(:not([data-multiple])), :host([data-multiple="false"])) [part="items"] { display: none }
|
|
3
3
|
[role="listbox"] { display: contents }
|
|
4
4
|
::slotted(button[type="reset"]),::slotted(del) { font: inherit; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; text-decoration: none }
|
|
5
5
|
::slotted(data) { cursor: pointer; pointer-events: none }
|
|
6
6
|
::slotted(data)::after { padding-inline: .5ch; pointer-events: auto }
|
|
7
7
|
::slotted(data)::after,::slotted(button[type="reset"]:empty)::before,::slotted(del:empty)::before { content: '\\00D7'; content: '\\00D7' / '' }
|
|
8
|
-
::slotted(data:focus),::slotted(del:focus),::slotted(button[type="reset"]:focus) { ${
|
|
8
|
+
::slotted(data:focus),::slotted(del:focus),::slotted(button[type="reset"]:focus) { ${cl} }`,El=bl(xo),ft="aria-label",Sl='button[type="reset"],del',xl='datalist,[role="listbox"]',$l='option,[role="option"]',ci="blur focus click input keydown pointerdown",be="false",ye={added:"Added",clear:"Clear input",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},di=class extends ul{constructor(){super(),this._focusMoved=!1,this._itemSingleVale="",this._speak="",this._texts=il({},ye),this._value="";const e=fl(this,xo);this._listbox=e.querySelector('[role="listbox"]')||Kt("div"),this._listbox.innerHTML='<slot name="items"></slot>',$(this._listbox,"aria-orientation","horizontal"),$(this._listbox,"role","listbox"),$(this._listbox,"part","items"),$(this._listbox,"tabindex","-1"),e.prepend(this._listbox)}static get observedAttributes(){return Object.keys(ye).map(e=>`data-sr-${e}`)}connectedCallback(){wo(this,ci,this,!0),this._umutate=pl(this,Ol,{attributeFilter:["id","value","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),_e(this),$o(this)}attributeChangedCallback(e,o,n){const i=e.split("data-sr-")[1];ye[i]&&(this._texts[i]=n||ye[i]),i==="clear"&&this.clear&&$(this.clear,ft,this._texts.clear)}disconnectedCallback(){var e;ri(this,ci,this,!0),(e=this._umutate)==null||e.call(this),this._umutate=this._list=this._options=this._match=void 0,this._items=this._clear=this._control=this._select=void 0}handleEvent(e){var o,n;(o=this.control)!=null&&o.disabled||(n=this.control)!=null&&n.readOnly||(e.type==="blur"&&Tl(this),e.type==="click"&&Al(this,e),e.type==="focus"&&ge(),e.type==="input"&&kl(this,e),e.type==="keydown"&&Ll(this,e),e.type==="pointerdown"&&si(this,e))}get multiple(){var e;return((e=$(this,"data-multiple"))!=null?e:be)!==be}set multiple(e){$(this,"data-multiple",e?"":null)}get creatable(){var e;return((e=$(this,"data-creatable"))!=null?e:be)!==be}set creatable(e){$(this,"data-creatable",e?"":null)}get control(){var e;return(e=this._control)!=null&&e.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var e;return(e=this._list)!=null&&e.isConnected||(this._list=this.querySelector(xl),this._options=void 0),this._list}get clear(){var e;return(e=this._clear)!=null&&e.isConnected||(this._clear=this.querySelector(Sl)),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var e,o,n;const i=!this._options&&((o=(e=this.list)==null?void 0:e.querySelector($l))==null?void 0:o.nodeName);return i&&(this._options=(n=this.list)==null?void 0:n.getElementsByTagName(i)),this._options||this.getElementsByTagName("-")}get values(){return Array.from(this.items,({value:e})=>e)}},ui=t=>{var e;const{creatable:o,control:n,options:i,multiple:r}=t,a=((e=n?.value)==null?void 0:e.trim())||"",s=a.toLowerCase()||null;let l=[...i].find(d=>d.label.trim().toLowerCase()===s);const c={bubbles:!0,cancelable:!0,detail:l};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",c))||(l=[...i].find(d=>d.selected)),r)pi(t);else for(const d of i)d.selected=d===l;return!l&&o&&a?{value:a,label:a}:l&&{value:l.value,label:l.label}},Mt=(t,e,o=!0)=>{const{_texts:n,control:i,items:r,multiple:a}=t;if(!e)return a?ge(n.invalid):!i?.value&&r[0]?Mt(t,r[0]):_e(t);const s=[...r].findIndex(f=>f.value===e.value),l=r[s],c=l===Eo(t)&&(a&&(r[s-1]||r[s+1])||i);if(l&&!o)return _e(t);c&&c.focus(),t._focusMoved=!!c;const d=Kt("data",{value:e.value},e.label||e.value),u={bubbles:!0,cancelable:!0,detail:l||d};if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!a)for(const f of[...r])f.remove();l?l.remove():i?.insertAdjacentElement("beforebegin",d),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Tl=t=>si(t)||setTimeout(Cl,0,t),Cl=t=>t.multiple||t.contains(Eo(t))||Mt(t,t._match,!1),Al=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:r,control:a,items:s}=t;if(a&&r?.contains(i))return e.preventDefault(),ai(a,"","deleteContentBackward"),a.focus();for(const l of s){if(l.contains(i))return Mt(t,l);const c=l.getBoundingClientRect(),{top:d,right:u,bottom:f,left:h,width:p,height:m}=c;if(p&&m&&n>=d&&n<=f&&o>=h&&o<=u)return l.focus()}i===t&&a?.focus()},kl=(t,e)=>{var o;const{control:n,options:i,multiple:r}=t,a=n?.value||null,s=e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!n?.value;if(s||(t._value=n?.value||""),s){(o=e.stopImmediatePropagation)==null||o.call(e);const l=[...i].find(c=>c.value===a);if(n&&(n.value=t._value),l)return Mt(t,l,r)}else r||(t._match=ui(t));$o(t)},Ll=(t,e)=>{e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt"||(t.control===e.target?Il(t,e):Ml(t,e))},Il=(t,e)=>{var o;const{_match:n,clear:i,control:r,items:a,multiple:s}=t;(e.key==="ArrowLeft"||e.key==="Backspace")&&!r?.selectionEnd&&((o=a[a.length-1])==null||o.focus()),e.key==="Enter"&&r&&(yl(r),Mt(t,s?ui(t):n,s)),e.key==="Tab"&&!e.shiftKey&&i&&!i.hidden&&(e.preventDefault(),$(i,"aria-hidden","false"),$(i,"tabindex","0"),i.focus(),wo(i,"blur",()=>$o(t),ii))},Ml=(t,e)=>{var o,n,i;const{clear:r,control:a,items:s}=t,{key:l,repeat:c,target:d}=e,u=[...s].indexOf(d);if((l===" "||l==="Enter")&&(s[u]||d===r))return(o=s[u]||r)==null||o.click(),e.preventDefault();if(s[u]){if(l==="ArrowLeft")return(n=s[u-1])==null?void 0:n.focus();if(l==="ArrowRight")return(i=s[u+1]||a)==null?void 0:i.focus();if(l==="Backspace")return e.preventDefault(),c||Mt(t,s[u]);a?.focus()}},Ol=(t,e)=>{var o;if(!t.control)return;const{_texts:n,control:i,items:r,list:a,multiple:s}=t,l=[];for(const{addedNodes:f,removedNodes:h}of e||[]){for(const p of f)p instanceof HTMLDataElement&&l.unshift(p);for(const p of h)p instanceof HTMLDataElement&&l.push(p)}const c=Eo(t);if((s?l.length===1:l[0]===c)&&t.contains(c)){const f=i?$(i,ft):null;t._speak=`${n[l[0].isConnected?"added":"removed"]} ${It(l[0])}, `,$(i,ft,`${t._speak}${hl(i)}`),t._focusMoved||setTimeout(()=>ge(t._speak.slice(0,-2))),setTimeout(Rl,300,t,f)}if(!s){const f=It(r[0]);f!==t._itemSingleVale&&_e(t),t._itemSingleVale=f}fi(t),pi(t),Dl(t);const u=`${r.length?n.found.replace("%d",`${r.length}`):n.empty}`;$(i,"aria-description",s?u:null),$(i,"list",vl(a)),$(t._listbox,ft,n.items),(o=t._umutate)==null||o.takeRecords()},Rl=(t,e)=>{t._speak="",t.control&&$(t.control,ft,e),fi(t)},fi=t=>{const{_texts:e,_speak:o,items:n}=t;let i=0;for(const r of n){const a=`${o}${It(r)}, ${e.remove}${oi?`, ${++i} ${e.of} ${n.length}`:""}`;$(r,ft,a),$(r,"role","option"),$(r,"slot","items"),$(r,"tabindex","-1"),$(r,"value",r.value||It(r))}},Dl=t=>{var e,o;if((e=t._select)!=null&&e.isConnected||(t._select=t.querySelector("select")),!t._select)return;const{_select:n,items:i,multiple:r}=t,a=[];let s=0;$(n,"multiple",r?"":null);for(const l of i){const c=n?.options[s++],d=It(l),u=l?.value;c?Object.assign(c,{defaultSelected:!0,selected:!0,text:d,value:u}):a.push(new Option(d,u,!0,!0))}if(a.length)n.append(...a);else for(const l of[...n.options].slice(s))l.remove();(o=t._umutate)==null||o.takeRecords()},$o=t=>{if(!t.clear)return;const{clear:e,control:o}=t,n=!o?.value||o?.disabled||o?.readOnly;e.nodeName==="DEL"&&$(e,"role","button"),$(e,ft)||$(e,ft,t._texts.clear),$(e,"aria-hidden",`${oi||ei}`),$(e,"hidden",n?"":null),$(e,"tabindex","-1")},pi=t=>{if(!t.list)return;const{_texts:e,list:o,multiple:n,options:i,values:r}=t;$(o,"data-sr-of",e.of),$(o,dl,`${n}`);for(const a of i)a.selected=r.includes(a.value)},_e=t=>{if(!t.control||t.multiple)return;const{control:e,items:o}=t,n=It(o[0]),i=n?"insertText":"deleteContentBackward";n!==e.value&&ai(e,n,i)};gl.define("u-combobox",di);var To=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",we=To(),Pl=we?navigator.userAgent:"",Hl=/android/i.test(Pl),mi;we&&/^Mac/i.test(((mi=navigator.userAgentData)==null?void 0:mi.platform)||navigator.platform);var Nl=we&&window.CSSStyleSheet&&document.adoptedStyleSheets,Co=":host(:not([hidden])) { display: block }",Bl=`${Hl?"data":"aria"}-labelledby`,Ee=typeof HTMLElement>"u"?class{}:HTMLElement,M=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),ql=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>hi(t,...e)},hi=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},Ao=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(gi("slot")),!o.querySelector("style"))if(!Nl)o.append(gi("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Ul=(t,e,o)=>{const n=new MutationObserver(r=>{if(!To()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},vi=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},ko=t=>{if(!t||!we)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},gi=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))M(n,i,r);return n},Se={define:(t,e)=>!To()||window.customElements.get(t)||window.customElements.define(t,e)},Lo=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Ot="aria-controls",bi="aria-disabled",Xt="aria-selected",Yt="tabindex",Io=Co,Mo=Co,Fl="",Oo=`${Co}
|
|
9
9
|
::slotted([role="tab"]:not([hidden])) { display: inline-block; cursor: pointer }
|
|
10
|
-
::slotted([role="tab"][${bi}="true"]) { cursor: default }`,
|
|
10
|
+
::slotted([role="tab"][${bi}="true"]) { cursor: default }`,zl=Lo(Io),Vl=Lo(Oo),Wl="",Gl=Lo(Mo),xe=class extends Ee{constructor(){super(),Ao(this,Io)}get tabList(){return this.querySelector('[role="tablist"]:not(:scope [role="tabpanel"] [role="tablist"])')}get selectedIndex(){const t=gt(this.tabList);return t.indexOf(Dt(t))}set selectedIndex(t){bt(this.tabs[t])}get tabs(){return this.querySelectorAll('[role="tab"]:not(:scope [role="tabpanel"] [role="tab"])')}get panels(){return this.querySelectorAll('[role="tabpanel"]:not(:scope [role="tabpanel"] [role="tabpanel"])')}},$e=class extends Ee{constructor(){super(),Ao(this,Oo)}connectedCallback(){M(this,"role","tablist"),ql(this,"click keydown",this),this._umutate=Ul(this,jl,{attributeFilter:["id","role",Ot,Xt],attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;hi(this,"click keydown",this),(t=this._umutate)==null||t.call(this),this._umutate=void 0}handleEvent(t){var e,o,n,i;const{key:r,type:a,target:s}=t,l=gt(this),c=l.findIndex(f=>f.contains(s)),d=r===" "||r==="Enter";let u=c;if(!(t.defaultPrevented||c===-1)&&(a==="click"&&bt(l[c]),a==="keydown")){if(d){(e=t.preventDefault)==null||e.call(t);const f={bubbles:!0,cancelable:!0,composed:!0};return l[c].dispatchEvent(new MouseEvent("click",f))}if(r==="ArrowDown"||r==="ArrowRight")u=(c+1)%l.length;else if(r==="ArrowUp"||r==="ArrowLeft")u=(c||l.length)-1;else if(r==="End")u=l.length-1;else if(r==="Home")u=0;else if(r==="Tab"&&!Rt(l[c])){const f=Dt(l);return f&&M(f,Yt,"-1"),f&&setTimeout(()=>M(f,Yt,"0"))}else return;(o=t.preventDefault)==null||o.call(t),(i=(n=l[u]).focus)==null||i.call(n)}}get tabsElement(){return Pt(this)}get tabs(){return this.querySelectorAll(':scope > [role="tab"]')}get selectedIndex(){const t=gt(this);return t.indexOf(Dt(t))}set selectedIndex(t){bt(this.tabs[t])}},Ro=class extends Ee{static get observedAttributes(){return["id",Xt,Ot]}connectedCallback(){var t;M(this,"role","tab"),M(this,Xt,`${this.selected}`),M(this,Yt,this.selected?"0":"-1"),Dt((t=this.parentElement)==null?void 0:t.children)||bt(this)}attributeChangedCallback(){!Po.has(this.parentElement)&&this.selected&&bt(this)}get tabsElement(){return Pt(this)}get tabList(){const t=this.parentElement;return t instanceof $e?t:null}get selected(){return Rt(this)}set selected(t){t&&bt(this)}get index(){return Math.max(gt(this.parentElement).indexOf(this),0)}get panel(){var t;const e=(t=Pt(this))==null?void 0:t.panels,o=gt(this.parentElement).indexOf(this);return Ho(this,e?.[o])}},Do=class extends Ee{constructor(){super(),Ao(this,Mo)}connectedCallback(){M(this,"role","tabpanel");const t=new Set(this.tabs),e=Pt(this),o=e?.tabs[Array.prototype.indexOf.call(e?.panels,this)];o&&!o.hasAttribute(Ot)&&t.add(o);const n=Dt(t)||t.values().next().value;_i(n,()=>yi(this,n,!!n&&Rt(n)))}get tabsElement(){return Pt(this)}get tabs(){return vi(this).querySelectorAll(`[${Ot}="${ko(this)}"]`)}},jl=(t,e=[])=>{let o;const n=gt(t);for(const{target:i}of e)i instanceof Element&&M(i,"role")==="tab"&&Rt(i)&&(o=i);!o&&!Dt(n)&&(o=n.find(wi)),bt(o)},yi=(t,e,o=!1)=>{M(t,"aria-hidden",`${!o}`),M(t,"hidden",o?null:""),M(t,Yt,o?"0":null),e&&M(e,Ot,ko(t)),e&&o&&Rt(e)&&M(t,Bl,ko(e))},Po=new Set,_i=(t,e)=>{var o;const n=t?.parentElement;n&&Po.add(n),e(),n&&Po.delete(n),(o=n?._umutate)==null||o.takeRecords()},wi=t=>M(t,bi)!=="true",Rt=t=>M(t,Xt)==="true",Dt=(t=[])=>{for(const e of t)if(Rt(e))return e},gt=t=>{const e=[];for(const o of t?.children||[])o.getAttribute("role")==="tab"&&e.push(o);return e},Ho=(t,e=null)=>{const o=M(t,Ot);return o?vi(t).getElementById(o):e},Pt=t=>{for(let e=t;e;e=e.parentNode||e.host)if(e instanceof xe)return e;return null},bt=t=>t&&wi(t)&&_i(t,()=>{var e;const o=gt(t.parentElement),n=((e=Pt(t))==null?void 0:e.panels)||[],i=Ho(t,n?.[o.indexOf(t)]);let r=0;for(const a of o){const s=Ho(a,n[r++]);M(a,Xt,`${a===t}`),M(a,Yt,a===t?"0":"-1"),s&&yi(s,a,s===i)}});Se.define("u-tabs",xe),Se.define("u-tablist",$e),Se.define("u-tab",Ro),Se.define("u-tabpanel",Do);var Ei=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Si=Ei(),xi;Si&&/^Mac/i.test(((xi=navigator.userAgentData)==null?void 0:xi.platform)||navigator.platform);var Kl=Si&&window.CSSStyleSheet&&document.adoptedStyleSheets,Xl=":host(:not([hidden])) { display: block }",$i=typeof HTMLElement>"u"?class{}:HTMLElement,nt=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Ti=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>No(t,...e)},No=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},Yl=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Te("slot")),!o.querySelector("style"))if(!Kl)o.append(Te("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Ql=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Te=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))nt(n,i,r);return n},Ci={define:(t,e)=>!Ei()||window.customElements.get(t)||window.customElements.define(t,e)},Jl=`${Xl}
|
|
11
11
|
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
12
12
|
::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 }
|
|
13
13
|
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
14
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`,
|
|
15
|
-
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)}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],nt(this,"role","group"),$i(this._content,"beforematch",this),$i(this,"click keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Po(this._content,"beforematch",this),Po(this,"click keydown",this),this._content=void 0}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&nt(r,"aria-expanded",`${i}`);if(this._content&&(nt(this._content,"aria-hidden",`${!i}`),nt(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const r=Kl(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e,o;const n=t.key===" "||t.key==="Enter",i=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),i&&t.type==="click"&&(this.open=!this.open),i&&t.type==="keydown"&&n&&((o=t.preventDefault)==null||o.call(t),t.target.dispatchEvent(new MouseEvent("click",t))))}get open(){return this.hasAttribute("open")}set open(t){nt(this,"open",t?"":null)}get name(){return nt(this,"name")||""}set name(t){nt(this,"name",t)}},Ql=class extends xi{connectedCallback(){nt(this,"role","button"),this.slot="summary",this.tabIndex=0}};Ti.define("u-details",Yl),Ti.define("u-summary",Ql);function Jl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Zl(){document.addEventListener("invoke",p=>{p.type=="invoke"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0),document.addEventListener("command",p=>{p.type=="command"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0);function t(p,m,v=!0){Object.defineProperty(p,m,{...Object.getOwnPropertyDescriptor(p,m),enumerable:v})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}let o=new WeakMap,n=new WeakMap;class i extends Event{constructor(m,v={}){super(m,v);let{source:b,command:w}=v;if(b!=null&&!(b instanceof Element))throw TypeError("source must be an element");o.set(this,b||null),n.set(this,w===void 0?"":String(w))}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw TypeError("illegal invocation");let m=o.get(this);if(!(m instanceof Element))return null;let v=e(m);return v===e(this.target||document)?m:v.host}get command(){if(!n.has(this))throw TypeError("illegal invocation");return n.get(this)}}t(i.prototype,"source"),t(i.prototype,"command");let r=new WeakMap;function a(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(m){if(m===null)this.removeAttribute("commandfor"),r.delete(this);else if(m instanceof Element){this.setAttribute("commandfor","");let v=e(m);e(this)===v||v===this.ownerDocument?r.set(this,m):r.delete(this)}else throw TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button"||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;let m=r.get(this);if(m)return m.isConnected?m:(r.delete(this),null);let v=e(this),b=this.getAttribute("commandfor");return(v instanceof Document||v instanceof ShadowRoot)&&b&&v.getElementById(b)||null}},command:{enumerable:!0,configurable:!0,get(){let m=this.getAttribute("command")||"";if(m.startsWith("--"))return m;let v=m.toLowerCase();switch(v){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return v}return""},set(m){this.setAttribute("command",m)}}})}let l=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),l.get(this)||null},set(p){let m=l.get(this)||null;m&&this.removeEventListener("command",m),l.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function s(p){for(let m of p)m.oncommand=Function("event",m.getAttribute("oncommand"))}let c=new MutationObserver(p=>{for(let m of p){let{target:v}=m;m.type==="childList"?s(v.querySelectorAll("[oncommand]")):s([v])}});c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),s(document.querySelectorAll("[oncommand]"));let d=new WeakSet;function u(p){if(d.has(p)||(d.add(p),p.defaultPrevented)||p.type!=="click")return;let m=p.composedPath().find(_=>_.matches?.("button[commandfor], button[command]"));if(!m)return;if(m.form&&m.getAttribute("type")!=="button")throw p.preventDefault(),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(m.hasAttribute("command")!==m.hasAttribute("commandfor")){let _=m.hasAttribute("command")?"command":"commandfor",E=m.hasAttribute("command")?"commandfor":"command";throw Error(`Element with ${_} attribute must also have a ${E} attribute to function.`)}if(m.command!=="show-popover"&&m.command!=="hide-popover"&&m.command!=="toggle-popover"&&m.command!=="show-modal"&&m.command!=="request-close"&&m.command!=="close"&&!m.command.startsWith("--")){console.warn(`"${m.command}" is not a valid command value. Custom commands must begin with --`);return}let v=m.commandForElement;if(!v)return;let b=new i("command",{command:m.command,source:m,cancelable:!0});if(v.dispatchEvent(b),b.defaultPrevented)return;let w=b.command.toLowerCase();if(v.popover){let _=!v.matches(":popover-open");_&&(w==="toggle-popover"||w==="show-popover")?v.showPopover({source:m}):!_&&w==="hide-popover"&&v.hidePopover()}else if(v.localName==="dialog"){let _=!v.hasAttribute("open");_&&w=="show-modal"?v.showModal():!_&&w=="close"?v.close(m.value?m.value:void 0):!_&&w=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){let E=new Event("cancel",{cancelable:!0});this.dispatchEvent(E),E.defaultPrevented||this.close()}),v.requestClose(m.value?m.value:void 0))}}function f(p){p.addEventListener("click",u,!0)}function h(p,m){let v=p.prototype.attachShadow;p.prototype.attachShadow=function(w){let _=v.call(this,w);return m(_),_};let b=p.prototype.attachInternals;p.prototype.attachInternals=function(){let w=b.call(this);return w.shadowRoot&&m(w.shadowRoot),w}}a(HTMLButtonElement),h(HTMLElement,p=>{f(p),c.observe(p,{attributeFilter:["oncommand"]}),s(p.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i})}const z={passive:!0,capture:!0},Q=()=>typeof window<"u"&&typeof document<"u",tc=()=>Q()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),Ae=typeof HTMLElement>"u"?class{}:HTMLElement;function Ci(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const Pt=(t,...e)=>!Q()||window.dsWarnings===!1||console.log(`\x1B[1mDesignsystemet:\x1B[m ${t}`,...e),y=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Ho=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),ec=/^["']|["']$/g,Ht=(t,e)=>{let o=y(t,e);return o||=Ho(t,`--_ds-${e}`).replace(ec,"").trim(),o||Pt(`Missing ${e} on:`,t),o||null},R=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>No(t,...e)},No=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},it=(t,e)=>{Q()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))},rt=(t,e,o)=>{let n=()=>i.disconnect(),i=new MutationObserver(r=>{if(!Q()||!t.isConnected)return n();e(t,r)});return e(t),i.observe(t,o),n},Ai=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))y(o,n,i);return o},at={define:(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e)};let oc=0;function st(t){return Q()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++oc}`}let J,nc=0,ki=0;const Bo=t=>{clearTimeout(ki),J&&(J.textContent=`${t}${nc++%2?" ":""}`),t&&(ki=setTimeout(Bo,2e3,""))},ic=()=>{document.readyState==="complete"&&(J||(J=Ai("div",{"aria-live":"assertive"}),J.style.overflow="hidden",J.style.position="fixed",J.style.whiteSpace="nowrap",J.style.width="1px"),J.isConnected||document.body.appendChild(J))};it("announce",()=>[R(document,"focus mouseover",ic,z)]);const Li=":click-delegate-hover",Ii="data-clickdelegatefor",rc=`[${Ii}]`,ac=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.button<2&&Mi(t);if(!(!o||o.contains(t.target))){if(e&&o instanceof HTMLAnchorElement)return window.open(o.href,void 0,o.rel);t.stopImmediatePropagation(),o.click()}};let ke;const sc=t=>{let e=Mi(t);ke!==e&&(ke&&ke.classList.remove(Li),e&&e.classList.add(Li),ke=e)},Mi=({target:t})=>{let e=(t instanceof Element?t.closest(rc):null)?.getAttribute(Ii),o=e&&document.getElementById(e)||void 0,n=o&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!n||n===o)&&!o?.disabled?o:void 0};it("clickdelegatefor",()=>[R(window,"click auxclick",ac,!0),R(document,"mouseover",sc,z)]);let qo=!1;const lc=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();qo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!qo&&y(e,"closedby")==="any";qo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},cc=Q()?document.getElementsByTagName("button"):[],dc=()=>{for(let t of cc)t.getAttribute("command")?.endsWith("-modal")&&t.setAttribute("aria-haspopup","dialog")},uc=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();it("dialog",()=>[R(document,"command",uc,z),R(document,"pointerdown pointerup",lc,z),rt(document,dc,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const fc=Q()?document.getElementsByTagName("fieldset"):[],pc=()=>{for(let t of fc)t.hasAttribute("aria-labelledby")||y(t,"aria-labelledby",`${st(t.querySelector("legend"))} ${st(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null)};it("fieldset",()=>[rt(document,pc,{childList:!0,subtree:!0})]);const Nt=Math.min,q=Math.max,Le=Math.round,Ie=Math.floor,Z=t=>({x:t,y:t}),mc={left:"right",right:"left",bottom:"top",top:"bottom"};function Oi(t,e,o){return q(t,Nt(e,o))}function bt(t,e){return typeof t=="function"?t(e):t}function lt(t){return t.split("-")[0]}function Jt(t){return t.split("-")[1]}function Uo(t){return t==="x"?"y":"x"}function Ri(t){return t==="y"?"height":"width"}function tt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Di(t){return Uo(tt(t))}function hc(t,e,o){o===void 0&&(o=!1);const n=Jt(t),i=Di(t),r=Ri(i);let a=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=Me(a)),[a,Me(a)]}function vc(t){const e=Me(t);return[Fo(t),e,Fo(e)]}function Fo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Pi=["left","right"],Hi=["right","left"],gc=["top","bottom"],bc=["bottom","top"];function yc(t,e,o){switch(t){case"top":case"bottom":return o?e?Hi:Pi:e?Pi:Hi;case"left":case"right":return e?gc:bc;default:return[]}}function _c(t,e,o,n){const i=Jt(t);let r=yc(lt(t),o==="start",n);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(Fo)))),r}function Me(t){const e=lt(t);return mc[e]+t.slice(e.length)}function wc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ec(t){return typeof t!="number"?wc(t):{top:t,right:t,bottom:t,left:t}}function Oe(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Ni(t,e,o){let{reference:n,floating:i}=t;const r=tt(e),a=Di(e),l=Ri(a),s=lt(e),c=r==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,f=n[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Jt(e)){case"start":h[a]-=f*(o&&c?-1:1);break;case"end":h[a]+=f*(o&&c?-1:1);break}return h}async function Sc(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:a,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=bt(e,t),p=Ec(h),v=l[f?u==="floating"?"reference":"floating":u],b=Oe(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(v)))==null||o?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),w=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),E=await(r.isElement==null?void 0:r.isElement(_))?await(r.getScale==null?void 0:r.getScale(_))||{x:1,y:1}:{x:1,y:1},A=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:_,strategy:s}):w);return{top:(b.top-A.top+p.top)/E.y,bottom:(A.bottom-b.bottom+p.bottom)/E.y,left:(b.left-A.left+p.left)/E.x,right:(A.right-b.right+p.right)/E.x}}const xc=50,$c=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:a}=o,l=a.detectOverflow?a:{...a,detectOverflow:Sc},s=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Ni(c,n,s),f=n,h=0;const p={};for(let m=0;m<r.length;m++){const v=r[m];if(!v)continue;const{name:b,fn:w}=v,{x:_,y:E,data:A,reset:C}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});d=_??d,u=E??u,p[b]={...p[b],...A},C&&h<xc&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:d,y:u}=Ni(c,f,s)),m=-1)}return{x:d,y:u,placement:f,strategy:i,middlewareData:p}},Tc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:a,initialPlacement:l,platform:s,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=bt(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const b=lt(i),w=tt(l),_=lt(l)===l,E=await(s.isRTL==null?void 0:s.isRTL(c.floating)),A=f||(_||!m?[Me(l)]:vc(l)),C=p!=="none";!f&&C&&A.push(..._c(l,m,p,E));const H=[l,...A],V=await s.detectOverflow(e,v),Ct=[];let ut=((n=r.flip)==null?void 0:n.overflows)||[];if(d&&Ct.push(V[b]),u){const At=hc(i,a,E);Ct.push(V[At[0]],V[At[1]])}if(ut=[...ut,{placement:i,overflows:Ct}],!Ct.every(At=>At<=0)){var pe,me;const At=(((pe=r.flip)==null?void 0:pe.index)||0)+1,Jn=H[At];if(Jn&&(!(u==="alignment"?w!==tt(Jn):!1)||ut.every(X=>tt(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:At,overflows:ut},reset:{placement:Jn}};let ve=(me=ut.filter(kt=>kt.overflows[0]<=0).sort((kt,X)=>kt.overflows[1]-X.overflows[1])[0])==null?void 0:me.placement;if(!ve)switch(h){case"bestFit":{var he;const kt=(he=ut.filter(X=>{if(C){const vt=tt(X.placement);return vt===w||vt==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(vt=>vt>0).reduce((vt,Fp)=>vt+Fp,0)]).sort((X,vt)=>X[1]-vt[1])[0])==null?void 0:he[0];kt&&(ve=kt);break}case"initialPlacement":ve=l;break}if(i!==ve)return{reset:{placement:ve}}}return{}}}},Bi=new Set(["left","top"]);async function Cc(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=lt(o),l=Jt(o),s=tt(o)==="y",c=Bi.has(a)?-1:1,d=r&&s?-1:1,u=bt(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),s?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const Ac=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:a,middlewareData:l}=e,s=await Cc(e,t);return a===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+s.x,y:r+s.y,data:{...s,placement:a}}}}},kc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:b=>{let{x:w,y:_}=b;return{x:w,y:_}}},...c}=bt(t,e),d={x:o,y:n},u=await r.detectOverflow(e,c),f=tt(lt(i)),h=Uo(f);let p=d[h],m=d[f];if(a){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",_=p+u[b],E=p-u[w];p=Oi(_,p,E)}if(l){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",_=m+u[b],E=m-u[w];m=Oi(_,m,E)}const v=s.fn({...e,[h]:p,[f]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[h]:a,[f]:l}}}}}},Lc=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:r,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=bt(t,e),d={x:o,y:n},u=tt(i),f=Uo(u);let h=d[f],p=d[u];const m=bt(l,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const _=f==="y"?"height":"width",E=r.reference[f]-r.floating[_]+v.mainAxis,A=r.reference[f]+r.reference[_]-v.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var b,w;const _=f==="y"?"width":"height",E=Bi.has(lt(i)),A=r.reference[u]-r.floating[_]+(E&&((b=a.offset)==null?void 0:b[u])||0)+(E?0:v.crossAxis),C=r.reference[u]+r.reference[_]+(E?0:((w=a.offset)==null?void 0:w[u])||0)-(E?v.crossAxis:0);p<A?p=A:p>C&&(p=C)}return{[f]:h,[u]:p}}}},Ic=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:r,platform:a,elements:l}=e,{apply:s=()=>{},...c}=bt(t,e),d=await a.detectOverflow(e,c),u=lt(i),f=Jt(i),h=tt(i)==="y",{width:p,height:m}=r.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,v=f==="end"?"top":"bottom");const w=m-d.top-d.bottom,_=p-d.left-d.right,E=Nt(m-d[v],w),A=Nt(p-d[b],_),C=!e.middlewareData.shift;let H=E,V=A;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(V=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(H=w),C&&!f){const ut=q(d.left,0),pe=q(d.right,0),me=q(d.top,0),he=q(d.bottom,0);h?V=p-2*(ut!==0||pe!==0?ut+pe:q(d.left,d.right)):H=m-2*(me!==0||he!==0?me+he:q(d.top,d.bottom))}await s({...e,availableWidth:V,availableHeight:H});const Ct=await a.getDimensions(l.floating);return p!==Ct.width||m!==Ct.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<"u"}function Bt(t){return qi(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function et(t){var e;return(e=(qi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qi(t){return Re()?t instanceof Node||t instanceof U(t).Node:!1}function W(t){return Re()?t instanceof Element||t instanceof U(t).Element:!1}function ct(t){return Re()?t instanceof HTMLElement||t instanceof U(t).HTMLElement:!1}function Ui(t){return!Re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof U(t).ShadowRoot}function Zt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Mc(t){return/^(table|td|th)$/.test(Bt(t))}function De(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Oc=/transform|translate|scale|rotate|perspective|filter/,Rc=/paint|layout|strict|content/,yt=t=>!!t&&t!=="none";let zo;function Vo(t){const e=W(t)?G(t):t;return yt(e.transform)||yt(e.translate)||yt(e.scale)||yt(e.rotate)||yt(e.perspective)||!Wo()&&(yt(e.backdropFilter)||yt(e.filter))||Oc.test(e.willChange||"")||Rc.test(e.contain||"")}function Dc(t){let e=pt(t);for(;ct(e)&&!qt(e);){if(Vo(e))return e;if(De(e))return null;e=pt(e)}return null}function Wo(){return zo==null&&(zo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zo}function qt(t){return/^(html|body|#document)$/.test(Bt(t))}function G(t){return U(t).getComputedStyle(t)}function Pe(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(Bt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ui(t)&&t.host||et(t);return Ui(e)?e.host:e}function Fi(t){const e=pt(t);return qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ct(e)&&Zt(e)?e:Fi(e)}function te(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Fi(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),a=U(i);if(r){const l=Go(a);return e.concat(a,a.visualViewport||[],Zt(i)?i:[],l&&o?te(l):[])}else return e.concat(i,te(i,[],o))}function Go(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function zi(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ct(t),r=i?t.offsetWidth:o,a=i?t.offsetHeight:n,l=Le(o)!==r||Le(n)!==a;return l&&(o=r,n=a),{width:o,height:n,$:l}}function jo(t){return W(t)?t:t.contextElement}function Ut(t){const e=jo(t);if(!ct(e))return Z(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=zi(e);let a=(r?Le(o.width):o.width)/n,l=(r?Le(o.height):o.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Pc=Z(0);function Vi(t){const e=U(t);return!Wo()||!e.visualViewport?Pc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Hc(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==U(t)?!1:e}function _t(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=jo(t);let a=Z(1);e&&(n?W(n)&&(a=Ut(n)):a=Ut(t));const l=Hc(r,o,n)?Vi(r):Z(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const f=U(r),h=n&&W(n)?U(n):n;let p=f,m=Go(p);for(;m&&n&&h!==p;){const v=Ut(m),b=m.getBoundingClientRect(),w=G(m),_=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,E=b.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,u*=v.y,s+=_,c+=E,p=U(m),m=Go(p)}}return Oe({width:d,height:u,x:s,y:c})}function He(t,e){const o=Pe(t).scrollLeft;return e?e.left+o:_t(et(t)).left+o}function Wi(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-He(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Nc(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",a=et(n),l=e?De(e.floating):!1;if(n===a||l&&r)return o;let s={scrollLeft:0,scrollTop:0},c=Z(1);const d=Z(0),u=ct(n);if((u||!u&&!r)&&((Bt(n)!=="body"||Zt(a))&&(s=Pe(n)),u)){const h=_t(n);c=Ut(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=a&&!u&&!r?Wi(a,s):Z(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:o.y*c.y-s.scrollTop*c.y+d.y+f.y}}function Bc(t){return Array.from(t.getClientRects())}function qc(t){const e=et(t),o=Pe(t),n=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+He(t);const l=-o.scrollTop;return G(n).direction==="rtl"&&(a+=q(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:a,y:l}}const Gi=25;function Uc(t,e){const o=U(t),n=et(t),i=o.visualViewport;let r=n.clientWidth,a=n.clientHeight,l=0,s=0;if(i){r=i.width,a=i.height;const d=Wo();(!d||d&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}const c=He(n);if(c<=0){const d=n.ownerDocument,u=d.body,f=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(n.clientWidth-u.clientWidth-h);p<=Gi&&(r-=p)}else c<=Gi&&(r+=c);return{width:r,height:a,x:l,y:s}}function Fc(t,e){const o=_t(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=ct(t)?Ut(t):Z(1),a=t.clientWidth*r.x,l=t.clientHeight*r.y,s=i*r.x,c=n*r.y;return{width:a,height:l,x:s,y:c}}function ji(t,e,o){let n;if(e==="viewport")n=Uc(t,o);else if(e==="document")n=qc(et(t));else if(W(e))n=Fc(e,o);else{const i=Vi(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Oe(n)}function Ki(t,e){const o=pt(t);return o===e||!W(o)||qt(o)?!1:G(o).position==="fixed"||Ki(o,e)}function zc(t,e){const o=e.get(t);if(o)return o;let n=te(t,[],!1).filter(l=>W(l)&&Bt(l)!=="body"),i=null;const r=G(t).position==="fixed";let a=r?pt(t):t;for(;W(a)&&!qt(a);){const l=G(a),s=Vo(a);!s&&l.position==="fixed"&&(i=null),(r?!s&&!i:!s&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Zt(a)&&!s&&Ki(t,a))?n=n.filter(d=>d!==a):i=l,a=pt(a)}return e.set(t,n),n}function Vc(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const a=[...o==="clippingAncestors"?De(e)?[]:zc(e,this._c):[].concat(o),n],l=ji(e,a[0],i);let s=l.top,c=l.right,d=l.bottom,u=l.left;for(let f=1;f<a.length;f++){const h=ji(e,a[f],i);s=q(h.top,s),c=Nt(h.right,c),d=Nt(h.bottom,d),u=q(h.left,u)}return{width:c-u,height:d-s,x:u,y:s}}function Wc(t){const{width:e,height:o}=zi(t);return{width:e,height:o}}function Gc(t,e,o){const n=ct(e),i=et(e),r=o==="fixed",a=_t(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const s=Z(0);function c(){s.x=He(i)}if(n||!n&&!r)if((Bt(e)!=="body"||Zt(i))&&(l=Pe(e)),n){const h=_t(e,!0,r,e);s.x=h.x+e.clientLeft,s.y=h.y+e.clientTop}else i&&c();r&&!n&&i&&c();const d=i&&!n&&!r?Wi(i,l):Z(0),u=a.left+l.scrollLeft-s.x-d.x,f=a.top+l.scrollTop-s.y-d.y;return{x:u,y:f,width:a.width,height:a.height}}function Ko(t){return G(t).position==="static"}function Xi(t,e){if(!ct(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return et(t)===o&&(o=o.ownerDocument.body),o}function Yi(t,e){const o=U(t);if(De(t))return o;if(!ct(t)){let i=pt(t);for(;i&&!qt(i);){if(W(i)&&!Ko(i))return i;i=pt(i)}return o}let n=Xi(t,e);for(;n&&Mc(n)&&Ko(n);)n=Xi(n,e);return n&&qt(n)&&Ko(n)&&!Vo(n)?o:n||Dc(t)||o}const jc=async function(t){const e=this.getOffsetParent||Yi,o=this.getDimensions,n=await o(t.floating);return{reference:Gc(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Kc(t){return G(t).direction==="rtl"}const Xc={convertOffsetParentRelativeRectToViewportRelativeRect:Nc,getDocumentElement:et,getClippingRect:Vc,getOffsetParent:Yi,getElementRects:jc,getClientRects:Bc,getDimensions:Wc,getScale:Ut,isElement:W,isRTL:Kc};function Qi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Yc(t,e){let o=null,n;const i=et(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(l||e(),!f||!h)return;const p=Ie(u),m=Ie(i.clientWidth-(d+f)),v=Ie(i.clientHeight-(u+h)),b=Ie(d),_={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:q(0,Nt(1,s))||1};let E=!0;function A(C){const H=C[0].intersectionRatio;if(H!==s){if(!E)return a();H?a(!1,H):n=setTimeout(()=>{a(!1,1e-7)},1e3)}H===1&&!Qi(c,t.getBoundingClientRect())&&a(),E=!1}try{o=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,_)}o.observe(t)}return a(!0),r}function Qc(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,c=jo(t),d=i||r?[...c?te(c):[],...e?te(e):[]]:[];d.forEach(b=>{i&&b.addEventListener("scroll",o,{passive:!0}),r&&b.addEventListener("resize",o)});const u=c&&l?Yc(c,o):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),o()}),c&&!s&&h.observe(c),e&&h.observe(e));let p,m=s?_t(t):null;s&&v();function v(){const b=_t(t);m&&!Qi(m,b)&&o(),m=b,p=requestAnimationFrame(v)}return o(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",o),r&&w.removeEventListener("resize",o)}),u?.(),(b=h)==null||b.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const Jc=Ac,Zc=kc,td=Tc,ed=Ic,od=Lc,nd=(t,e,o)=>{const n=new Map,i={platform:Xc,...o},r={...i.platform,_c:n};return $c(t,e,{...i,platform:r})},Ji="data-placement",Zi="data-autoplacement",ee=new Map;function id(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,r=n instanceof HTMLElement&&y(n,"popover")!==null&&Ho(n,"--_ds-floating");if(!r)return;if(e==="closed")return ee.get(n)?.();if(!i){let p=n.getRootNode(),m=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&p?.querySelector?.(m)||void 0}if(!i||i===n||o&&o===e)return;let a=Ho(n,"--_ds-floating-overscroll"),l=y(n,Ji)||y(i,Ji)||r,s=y(n,Zi)||y(i,Zi),c=parseFloat(getComputedStyle(n,"::before").height)||0,d=l.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+c;if(l==="none")return;let f={strategy:"absolute",placement:l,middleware:[Jc(c||0),Zc({padding:10,limiter:od({offset:{mainAxis:u}})}),ad(),...s==="false"?[]:[td({padding:10,crossAxis:!1})],...a?[ed({apply({availableHeight:p}){a==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,p-20)}px`}})]:[]]},h=Qc(i,n,async()=>{if(!i?.isConnected)return ee.get(n)?.();let{x:p,y:m}=await nd(i,n,f);n.style.translate=`${p}px ${m}px`});ee.set(n,()=>ee.delete(n)&&h())}let Ne;const rd=({type:t})=>{if(t==="mousedown"&&(Ne=!1),t==="scroll"&&Ne===!1&&(Ne=!0),t==="mouseup"&&Ne)for(let[e]of ee)e.showPopover()};it("popover",()=>[R(document,"mousedown scroll mouseup",rd,!0),R(document,"toggle ds-toggle-source",id,z)]);const ad=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,o=t.rects.reference,n=`${Math.round(o.width/2+o.x-t.x)}px`,i=`${Math.round(o.height/2+o.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",n),e.style.setProperty("--_ds-floating-arrow-y",i),y(e,"data-floating",t.placement),t}}),Xo=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||y(t,"aria-readonly")==="true"),sd=t=>{if(t.key!=="Tab"&&Xo(t.target)){let e=t.key?.startsWith("Arrow"),o=t.altKey||t.ctrlKey||t.metaKey;if((e||!o)&&t.preventDefault(),e&&y(t.target,"type")==="radio"){let n=document.querySelectorAll(`input[name="${t.target.name}"]`),i=t.key?.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+[...n].indexOf(t.target)+i)%n.length]?.focus()}}},ld=t=>{let e=t.target?.closest?.("label")?.control||t.target;Xo(e)&&(t.preventDefault(),e.focus())},cd=t=>{t.target instanceof HTMLSelectElement&&Xo(t.target)&&t.preventDefault()};it("readonly",()=>[R(document,"keydown",sd),R(document,"click",ld),R(document,"mousedown",cd)]);const tr="aria-label",Be="data-toggle-group",er=`[${Be}]`,dd=()=>{for(let t of document.querySelectorAll(er))y(t,"aria-label",Ht(t,Be))},ud=t=>{let{key:e,target:o}=t,n=o instanceof HTMLInputElement&&o.closest(er);if(n&&(!y(n,tr)&&!y(n,"aria-labelledby")&&y(n,tr,Ht(n,Be)),e==="Enter"&&o.click(),e?.startsWith("Arrow"))){t.preventDefault?.();let i=[...n.getElementsByTagName("input")],r=i.indexOf(o),a=e.match(/Arrow(Right|Down)/)?1:-1,l=r;for(let s=0;s<i.length;s++)if(l=(i.length+l+a)%i.length,!i[l]?.disabled){i[l]?.focus();break}}};it("toggle-group",()=>[R(document,"keydown",ud),rt(document,dd,{attributeFilter:[Be],attributes:!0,childList:!0,subtree:!0})]);let I,oe,qe=!1,Yo=0,Qo=0;const fd=Q()&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ft="data-tooltip",Jo="data-color",or="aria-label",nr="aria-description",pd=`[${Jo}]`,md=`[${Ft}]`,Zo="data-color-scheme",hd=`[${Zo}]`,ir=t=>{t&&!(t instanceof HTMLElement)&&Pt("setTooltipElement expects an HTMLElement, got: ",t),clearTimeout(Qo),clearTimeout(Yo),oe=void 0,qe=!1,I=t||void 0},vd=()=>{for(let t of document.querySelectorAll(md)){let e=Ht(t,Ft);if(!e)return;if(e!==(t.getAttribute(or)||t.getAttribute(nr))){let i=y(t,"role")!=="img"&&t.textContent?.trim();y(t,Ft,e),y(t,or,i?null:e),y(t,nr,i?e:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||Pt('Missing tabindex="0" attribute on: ',t)}let o=t===oe&&I?.offsetHeight&&I?.offsetWidth,n=o&&e&&I?.textContent!==e;o&&n&&(I&&(I.textContent=e),document.activeElement===t&&Bo(e))}},rr=({type:t,target:e})=>{if(clearTimeout(Yo),e===I)return;if(t==="mouseover"&&!qe&&!fd){Yo=setTimeout(rr,300,{target:e});return}let o=e?.closest?.(`[${Ft}]`);if(o===oe)return;if(!o)return ar();I||=Ai("div",{class:"ds-tooltip"}),I.isConnected||document.body.appendChild(I);let n=o.closest(pd),i=o.closest(hd),r=n!==i&&n?.contains(i);clearTimeout(Qo),y(I,"popover","manual"),y(I,Zo,i?.getAttribute(Zo)||null),y(I,Jo,r&&n?.getAttribute(Jo)||null),I.textContent=y(o,Ft),I.showPopover(),I.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),qe=!0,oe=o},ar=()=>I?.isConnected&&I.popover&&I.hidePopover(),sr=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&ar();t?t.target===I&&t.newState==="closed"&&(oe=void 0,Qo=setTimeout(sr,300)):qe=!1};it("tooltip",()=>[R(document,"blur focus mouseover",rr,z),R(document,"toggle keydown",sr,z),rt(document,vd,{attributeFilter:[Ft],attributes:!0,childList:!0,subtree:!0})]);const tn="aria-label";var lr=class extends Ae{_items;_label=null;_unresize;_unmutate;static get observedAttributes(){return[tn]}connectedCallback(){let e=Ci(()=>en(this),100);this._label=Ht(this,tn),this._items=this.getElementsByTagName("a"),this._unresize=R(window,"resize",e),this._unmutate=rt(this,en,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){!this._unmutate||!n||(this._label=n,en(this))}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._items=void 0}};const en=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;y(t,"role",n?null:"navigation"),y(t,tn,n?null:t._label);for(let i of t._items||[])y(i,"aria-current",i===o?"page":null)};at.define("ds-breadcrumbs",lr);var cr=class extends Ae{_unmutate;connectedCallback(){R(this,"animationend",this,z),y(this,"tabindex","-1"),this._unmutate=rt(this,gd,{childList:!0,subtree:!0}),this.focus()}handleEvent({target:e}){e===this&&this.focus()}disconnectedCallback(){No(this,"animationend",this,z),this._unmutate?.(),this._unmutate=void 0}};const gd=t=>{let e=t.querySelector("h2,h3,h4,h5,h6");e&&y(t,"aria-labelledby",st(e))};at.define("ds-error-summary",cr);const on="aria-invalid",dr="aria-describedby",ur="data-indeterminate",bd=tc()?800:200,fr=new WeakMap,ne=new Map,nn=new WeakSet,yd=(t,e=[])=>{for(let{target:o}of e){let n=o instanceof HTMLFieldSetElement;for(let[i]of ne)(n?o.contains(i):i.contains(o))&&pr(i)}},pr=t=>{let e=[],o=[],n=ne.get(t)||[],i,r,a=!1,l=!1;for(let f of t.getElementsByTagName("*"))if(f instanceof HTMLLabelElement&&e.push(f),!f.hidden)if(Ed(f))i?Pt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):i=f;else{let h=f.getAttribute("data-field");h==="counter"&&(r=f),h==="validation"?(o.unshift(st(f)),a=!0,l||=hr(f)):h&&o.push(st(f))}if(!i)return;r&&fr.set(i,r);for(let f of e)y(f,"for",st(i));let s=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');s&&!s?.hidden&&(a=!0,l||=hr(s),o.unshift(st(s)));let c=y(i,ur);c&&(i.indeterminate=c==="true"),(i.type==="radio"||i.type==="checkbox")&&y(t,"data-clickdelegatefor",st(i));let d=y(i,dr)?.trim().split(/\s+/)?.filter(f=>!n.includes(f))||[];y(i,dr,[...o,...d].join(" ")||null),ne.set(t,o);let u=nn.has(i);a&&!u&&!i.hasAttribute(on)?(y(i,on,"true"),nn.add(i)):!a&&u&&(y(i,on,null),nn.delete(i)),mr(i)},_d={over:"%d tegn for mye",under:"%d tegn igjen"},mr=t=>{let e=t.target||t,o=fr.get(e);if(o?.isConnected){let n=(Number(y(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",r=(Ht(o,`data-${i}`)||_d[i])?.replace("%d",`${Math.abs(n)}`);y(o,"data-label",r),y(o,"data-state",i),y(o,"data-color",n<0?"danger":null),t.type==="input"&&r&&wd(e,r)}e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},wd=Ci((t,e)=>{document.activeElement===t&&Bo(e)},bd),hr=t=>t.getAttribute("data-color")!=="success",Ed=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var Ue=class extends Ae{connectedCallback(){ne.set(this,[]),pr(this)}disconnectedCallback(){ne.delete(this)}};at.define("ds-field",Ue),it("field",()=>[R(document,"input",mr,z),rt(document,yd,{attributeFilter:["data-field","data-limit","hidden","id","value",ur],attributes:!0,childList:!0,subtree:!0})]);const rn="aria-label",Fe="data-current",ze="data-total",vr="data-href",gr=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Sd(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var br=class extends Ae{_unmutate;_render;static get observedAttributes(){return[rn,Fe,ze,vr]}connectedCallback(){let t=y(this,ze),e=y(this,Fe);e&&!t&&Pt(`Missing ${ze} attribute on:`,this),t&&!e&&Pt(`Missing ${Fe} attribute on:`,this),y(this,rn,Ht(this,rn)),y(this,"role","navigation"),this._unmutate=rt(this,yr,{childList:!0,subtree:!0})}attributeChangedCallback(){this._unmutate&&yr(this)}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const yr=t=>{let e=Number(y(t,Fe)),o=Number(y(t,ze));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,r=y(t,vr),{next:a,prev:l,pages:s}=gr({current:e,total:o,show:i});n.forEach((c,d)=>{let u=d?n[d+1]?s[d-1]?.page:a:l;y(c,"aria-current",s[d-1]?.current?"true":null),y(c,"aria-label",`${u??"hidden"}`),y(c,"role",u?null:"none"),y(c,"tabindex",u?null:"-1"),c instanceof HTMLButtonElement&&y(c,"value",`${u}`),r&&c instanceof HTMLAnchorElement&&y(c,"href",r.replace("%d",`${u}`))})}},Sd=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),r=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:r+1-i},(l,s)=>s+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&r<e&&a.splice(-2,2,0,e),a};at.define("ds-pagination",br);var xd=Object.defineProperty,_r=Object.getOwnPropertySymbols,$d=Object.prototype.hasOwnProperty,Td=Object.prototype.propertyIsEnumerable,wr=(t,e,o)=>e in t?xd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Cd=(t,e)=>{for(var o in e||(e={}))$d.call(e,o)&&wr(t,o,e[o]);if(_r)for(var o of _r(e))Td.call(e,o)&&wr(t,o,e[o]);return t},Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ad=Ve&&/android/i.test(navigator.userAgent),Er=Ve&&/iPad|iPhone|iPod/.test(navigator.userAgent),Sr;Ve&&/^Mac/i.test(((Sr=navigator.userAgentData)==null?void 0:Sr.platform)||navigator.platform);var kd="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ld=typeof HTMLElement>"u"?class{}:HTMLElement;function x(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var xr=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},We=(t,...e)=>xr("add",t,e),Id=(t,...e)=>xr("remove",t,e),Ge=new WeakMap,an=(t,e)=>{if(e===void 0)return Ge.get(t);try{Ge.get(t).disconnect(),Ge.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Ge.set(t,o)}},Md=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},$r=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Od=0,Tr=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Od).toString(32)}`),t.id):"",zt=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,r]of Object.entries(o))x(n,i,r);return n},Rd={define:(t,e)=>!Ve||window.customElements.get(t)||window.customElements.define(t,e)},Dd=t=>{var e;const o=x(t,"aria-label")||"";return[...(((e=x(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())||""},o)},wt,Pd=0,sn=t=>{wt||(wt=zt("div"),wt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",x(wt,"aria-live","assertive")),wt.isConnected||document.body.append(wt),t&&(wt.textContent=`${t}${Pd++%2?" ":""}`)},Cr=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},ln=!1,cn=t=>(t?.type==="mouseup"&&(ln=!1),t?.type==="mousedown"&&(ln=!0,We(document,"mouseup",cn,{once:!0})),ln),Hd=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
|
|
14
|
+
:host > [part="details-content"]:not([hidden=""]) { display: block }`,Zl=class extends $i{static get observedAttributes(){return["open"]}constructor(){var t;super(),Yl(this,Jl),(t=this.shadowRoot)==null||t.prepend(Te("slot",{name:"summary"}),Te("slot",{part:"details-content"})),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
|
|
15
|
+
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)}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],nt(this,"role","group"),Ti(this._content,"beforematch",this),Ti(this,"click keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&No(this._content,"beforematch",this),No(this,"click keydown",this),this._content=void 0}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&nt(r,"aria-expanded",`${i}`);if(this._content&&(nt(this._content,"aria-hidden",`${!i}`),nt(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const r=Ql(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e,o;const n=t.key===" "||t.key==="Enter",i=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),i&&t.type==="click"&&(this.open=!this.open),i&&t.type==="keydown"&&n&&((o=t.preventDefault)==null||o.call(t),t.target.dispatchEvent(new MouseEvent("click",t))))}get open(){return this.hasAttribute("open")}set open(t){nt(this,"open",t?"":null)}get name(){return nt(this,"name")||""}set name(t){nt(this,"name",t)}},tc=class extends $i{connectedCallback(){nt(this,"role","button"),this.slot="summary",this.tabIndex=0}};Ci.define("u-details",Zl),Ci.define("u-summary",tc);function ec(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function oc(){document.addEventListener("invoke",p=>{p.type=="invoke"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0),document.addEventListener("command",p=>{p.type=="command"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0);function t(p,m,v=!0){Object.defineProperty(p,m,{...Object.getOwnPropertyDescriptor(p,m),enumerable:v})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}let o=new WeakMap,n=new WeakMap;class i extends Event{constructor(m,v={}){super(m,v);let{source:b,command:w}=v;if(b!=null&&!(b instanceof Element))throw TypeError("source must be an element");o.set(this,b||null),n.set(this,w===void 0?"":String(w))}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw TypeError("illegal invocation");let m=o.get(this);if(!(m instanceof Element))return null;let v=e(m);return v===e(this.target||document)?m:v.host}get command(){if(!n.has(this))throw TypeError("illegal invocation");return n.get(this)}}t(i.prototype,"source"),t(i.prototype,"command");let r=new WeakMap;function a(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(m){if(m===null)this.removeAttribute("commandfor"),r.delete(this);else if(m instanceof Element){this.setAttribute("commandfor","");let v=e(m);e(this)===v||v===this.ownerDocument?r.set(this,m):r.delete(this)}else throw TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button"||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;let m=r.get(this);if(m)return m.isConnected?m:(r.delete(this),null);let v=e(this),b=this.getAttribute("commandfor");return(v instanceof Document||v instanceof ShadowRoot)&&b&&v.getElementById(b)||null}},command:{enumerable:!0,configurable:!0,get(){let m=this.getAttribute("command")||"";if(m.startsWith("--"))return m;let v=m.toLowerCase();switch(v){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return v}return""},set(m){this.setAttribute("command",m)}}})}let s=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),s.get(this)||null},set(p){let m=s.get(this)||null;m&&this.removeEventListener("command",m),s.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function l(p){for(let m of p)m.oncommand=Function("event",m.getAttribute("oncommand"))}let c=new MutationObserver(p=>{for(let m of p){let{target:v}=m;m.type==="childList"?l(v.querySelectorAll("[oncommand]")):l([v])}});c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));let d=new WeakSet;function u(p){if(d.has(p)||(d.add(p),p.defaultPrevented)||p.type!=="click")return;let m=p.composedPath().find(_=>_.matches?.("button[commandfor], button[command]"));if(!m)return;if(m.form&&m.getAttribute("type")!=="button")throw p.preventDefault(),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(m.hasAttribute("command")!==m.hasAttribute("commandfor")){let _=m.hasAttribute("command")?"command":"commandfor",E=m.hasAttribute("command")?"commandfor":"command";throw Error(`Element with ${_} attribute must also have a ${E} attribute to function.`)}if(m.command!=="show-popover"&&m.command!=="hide-popover"&&m.command!=="toggle-popover"&&m.command!=="show-modal"&&m.command!=="request-close"&&m.command!=="close"&&!m.command.startsWith("--")){console.warn(`"${m.command}" is not a valid command value. Custom commands must begin with --`);return}let v=m.commandForElement;if(!v)return;let b=new i("command",{command:m.command,source:m,cancelable:!0});if(v.dispatchEvent(b),b.defaultPrevented)return;let w=b.command.toLowerCase();if(v.popover){let _=!v.matches(":popover-open");_&&(w==="toggle-popover"||w==="show-popover")?v.showPopover({source:m}):!_&&w==="hide-popover"&&v.hidePopover()}else if(v.localName==="dialog"){let _=!v.hasAttribute("open");_&&w=="show-modal"?v.showModal():!_&&w=="close"?v.close(m.value?m.value:void 0):!_&&w=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){let E=new Event("cancel",{cancelable:!0});this.dispatchEvent(E),E.defaultPrevented||this.close()}),v.requestClose(m.value?m.value:void 0))}}function f(p){p.addEventListener("click",u,!0)}function h(p,m){let v=p.prototype.attachShadow;p.prototype.attachShadow=function(w){let _=v.call(this,w);return m(_),_};let b=p.prototype.attachInternals;p.prototype.attachInternals=function(){let w=b.call(this);return w.shadowRoot&&m(w.shadowRoot),w}}a(HTMLButtonElement),h(HTMLElement,p=>{f(p),c.observe(p,{attributeFilter:["oncommand"]}),l(p.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i})}const z={passive:!0,capture:!0},Q=()=>typeof window<"u"&&typeof document<"u",nc=()=>Q()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),Ce=typeof HTMLElement>"u"?class{}:HTMLElement;function Ai(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const Ht=(t,...e)=>!Q()||window.dsWarnings===!1||console.log(`\x1B[1mDesignsystemet:\x1B[m ${t}`,...e),y=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Bo=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),ic=/^["']|["']$/g,Nt=(t,e)=>{let o=y(t,e);return o||=Bo(t,`--_ds-${e}`).replace(ic,"").trim(),o||Ht(`Missing ${e} on:`,t),o||null},R=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>qo(t,...e)},qo=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},it=(t,e)=>{Q()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))},rt=(t,e,o)=>{let n=()=>i.disconnect(),i=new MutationObserver(r=>{if(!Q()||!t.isConnected)return n();e(t,r)});return e(t),i.observe(t,o),n},ki=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))y(o,n,i);return o},at={define:(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e)};let rc=0;function st(t){return Q()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++rc}`}let J,ac=0,Li=0;const Uo=t=>{clearTimeout(Li),J&&(J.textContent=`${t}${ac++%2?" ":""}`),t&&(Li=setTimeout(Uo,2e3,""))},sc=()=>{document.readyState==="complete"&&(J||(J=ki("div",{"aria-live":"assertive"}),J.style.overflow="hidden",J.style.position="fixed",J.style.whiteSpace="nowrap",J.style.width="1px"),J.isConnected||document.body.appendChild(J))};it("announce",()=>[R(document,"focus mouseover",sc,z)]);const Ii=":click-delegate-hover",Mi="data-clickdelegatefor",lc=`[${Mi}]`,cc=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.button<2&&Oi(t);if(!(!o||o.contains(t.target))){if(e&&o instanceof HTMLAnchorElement)return window.open(o.href,void 0,o.rel);t.stopImmediatePropagation(),o.click()}};let Ae;const dc=t=>{let e=Oi(t);Ae!==e&&(Ae&&Ae.classList.remove(Ii),e&&e.classList.add(Ii),Ae=e)},Oi=({target:t})=>{let e=(t instanceof Element?t.closest(lc):null)?.getAttribute(Mi),o=e&&document.getElementById(e)||void 0,n=o&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!n||n===o)&&!o?.disabled?o:void 0};it("clickdelegatefor",()=>[R(window,"click auxclick",cc,!0),R(document,"mouseover",dc,z)]);let Fo=!1;const uc=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();Fo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!Fo&&y(e,"closedby")==="any";Fo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},fc=Q()?document.getElementsByTagName("button"):[],pc=()=>{for(let t of fc)t.getAttribute("command")?.endsWith("-modal")&&t.setAttribute("aria-haspopup","dialog")},mc=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();it("dialog",()=>[R(document,"command",mc,z),R(document,"pointerdown pointerup",uc,z),rt(document,pc,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const hc=Q()?document.getElementsByTagName("fieldset"):[],vc=()=>{for(let t of hc)t.hasAttribute("aria-labelledby")||y(t,"aria-labelledby",`${st(t.querySelector("legend"))} ${st(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null)};it("fieldset",()=>[rt(document,vc,{childList:!0,subtree:!0})]);const Bt=Math.min,q=Math.max,ke=Math.round,Le=Math.floor,Z=t=>({x:t,y:t}),gc={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t,e,o){return q(t,Bt(e,o))}function yt(t,e){return typeof t=="function"?t(e):t}function lt(t){return t.split("-")[0]}function Qt(t){return t.split("-")[1]}function zo(t){return t==="x"?"y":"x"}function Di(t){return t==="y"?"height":"width"}function tt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Pi(t){return zo(tt(t))}function bc(t,e,o){o===void 0&&(o=!1);const n=Qt(t),i=Pi(t),r=Di(i);let a=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=Ie(a)),[a,Ie(a)]}function yc(t){const e=Ie(t);return[Vo(t),e,Vo(e)]}function Vo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Hi=["left","right"],Ni=["right","left"],_c=["top","bottom"],wc=["bottom","top"];function Ec(t,e,o){switch(t){case"top":case"bottom":return o?e?Ni:Hi:e?Hi:Ni;case"left":case"right":return e?_c:wc;default:return[]}}function Sc(t,e,o,n){const i=Qt(t);let r=Ec(lt(t),o==="start",n);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(Vo)))),r}function Ie(t){const e=lt(t);return gc[e]+t.slice(e.length)}function xc(t){return{top:0,right:0,bottom:0,left:0,...t}}function $c(t){return typeof t!="number"?xc(t):{top:t,right:t,bottom:t,left:t}}function Me(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Bi(t,e,o){let{reference:n,floating:i}=t;const r=tt(e),a=Pi(e),s=Di(a),l=lt(e),c=r==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,f=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Qt(e)){case"start":h[a]-=f*(o&&c?-1:1);break;case"end":h[a]+=f*(o&&c?-1:1);break}return h}async function Tc(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=yt(e,t),p=$c(h),v=s[f?u==="floating"?"reference":"floating":u],b=Me(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(v)))==null||o?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),E=await(r.isElement==null?void 0:r.isElement(_))?await(r.getScale==null?void 0:r.getScale(_))||{x:1,y:1}:{x:1,y:1},A=Me(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:_,strategy:l}):w);return{top:(b.top-A.top+p.top)/E.y,bottom:(A.bottom-b.bottom+p.bottom)/E.y,left:(b.left-A.left+p.left)/E.x,right:(A.right-b.right+p.right)/E.x}}const Cc=50,Ac=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:a}=o,s=a.detectOverflow?a:{...a,detectOverflow:Tc},l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Bi(c,n,l),f=n,h=0;const p={};for(let m=0;m<r.length;m++){const v=r[m];if(!v)continue;const{name:b,fn:w}=v,{x:_,y:E,data:A,reset:C}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=_??d,u=E??u,p[b]={...p[b],...A},C&&h<Cc&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:d,y:u}=Bi(c,f,l)),m=-1)}return{x:d,y:u,placement:f,strategy:i,middlewareData:p}},kc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=yt(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const b=lt(i),w=tt(s),_=lt(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=f||(_||!m?[Ie(s)]:yc(s)),C=p!=="none";!f&&C&&A.push(...Sc(s,m,p,E));const H=[s,...A],V=await l.detectOverflow(e,v),At=[];let ut=((n=r.flip)==null?void 0:n.overflows)||[];if(d&&At.push(V[b]),u){const kt=bc(i,a,E);At.push(V[kt[0]],V[kt[1]])}if(ut=[...ut,{placement:i,overflows:At}],!At.every(kt=>kt<=0)){var fe,pe;const kt=(((fe=r.flip)==null?void 0:fe.index)||0)+1,Jn=H[kt];if(Jn&&(!(u==="alignment"?w!==tt(Jn):!1)||ut.every(X=>tt(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:kt,overflows:ut},reset:{placement:Jn}};let he=(pe=ut.filter(Lt=>Lt.overflows[0]<=0).sort((Lt,X)=>Lt.overflows[1]-X.overflows[1])[0])==null?void 0:pe.placement;if(!he)switch(h){case"bestFit":{var me;const Lt=(me=ut.filter(X=>{if(C){const vt=tt(X.placement);return vt===w||vt==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(vt=>vt>0).reduce((vt,Wp)=>vt+Wp,0)]).sort((X,vt)=>X[1]-vt[1])[0])==null?void 0:me[0];Lt&&(he=Lt);break}case"initialPlacement":he=s;break}if(i!==he)return{reset:{placement:he}}}return{}}}},qi=new Set(["left","top"]);async function Lc(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=lt(o),s=Qt(o),l=tt(o)==="y",c=qi.has(a)?-1:1,d=r&&l?-1:1,u=yt(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const Ic=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:a,middlewareData:s}=e,l=await Lc(e,t);return a===((o=s.offset)==null?void 0:o.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:a}}}}},Mc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:w,y:_}=b;return{x:w,y:_}}},...c}=yt(t,e),d={x:o,y:n},u=await r.detectOverflow(e,c),f=tt(lt(i)),h=zo(f);let p=d[h],m=d[f];if(a){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",_=p+u[b],E=p-u[w];p=Ri(_,p,E)}if(s){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",_=m+u[b],E=m-u[w];m=Ri(_,m,E)}const v=l.fn({...e,[h]:p,[f]:m});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[h]:a,[f]:s}}}}}},Oc=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=yt(t,e),d={x:o,y:n},u=tt(i),f=zo(u);let h=d[f],p=d[u];const m=yt(s,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const _=f==="y"?"height":"width",E=r.reference[f]-r.floating[_]+v.mainAxis,A=r.reference[f]+r.reference[_]-v.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var b,w;const _=f==="y"?"width":"height",E=qi.has(lt(i)),A=r.reference[u]-r.floating[_]+(E&&((b=a.offset)==null?void 0:b[u])||0)+(E?0:v.crossAxis),C=r.reference[u]+r.reference[_]+(E?0:((w=a.offset)==null?void 0:w[u])||0)-(E?v.crossAxis:0);p<A?p=A:p>C&&(p=C)}return{[f]:h,[u]:p}}}},Rc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=yt(t,e),d=await a.detectOverflow(e,c),u=lt(i),f=Qt(i),h=tt(i)==="y",{width:p,height:m}=r.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,v=f==="end"?"top":"bottom");const w=m-d.top-d.bottom,_=p-d.left-d.right,E=Bt(m-d[v],w),A=Bt(p-d[b],_),C=!e.middlewareData.shift;let H=E,V=A;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(V=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(H=w),C&&!f){const ut=q(d.left,0),fe=q(d.right,0),pe=q(d.top,0),me=q(d.bottom,0);h?V=p-2*(ut!==0||fe!==0?ut+fe:q(d.left,d.right)):H=m-2*(pe!==0||me!==0?pe+me:q(d.top,d.bottom))}await l({...e,availableWidth:V,availableHeight:H});const At=await a.getDimensions(s.floating);return p!==At.width||m!==At.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<"u"}function qt(t){return Ui(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function et(t){var e;return(e=(Ui(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ui(t){return Oe()?t instanceof Node||t instanceof U(t).Node:!1}function W(t){return Oe()?t instanceof Element||t instanceof U(t).Element:!1}function ct(t){return Oe()?t instanceof HTMLElement||t instanceof U(t).HTMLElement:!1}function Fi(t){return!Oe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof U(t).ShadowRoot}function Jt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Dc(t){return/^(table|td|th)$/.test(qt(t))}function Re(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Pc=/transform|translate|scale|rotate|perspective|filter/,Hc=/paint|layout|strict|content/,_t=t=>!!t&&t!=="none";let Wo;function Go(t){const e=W(t)?G(t):t;return _t(e.transform)||_t(e.translate)||_t(e.scale)||_t(e.rotate)||_t(e.perspective)||!jo()&&(_t(e.backdropFilter)||_t(e.filter))||Pc.test(e.willChange||"")||Hc.test(e.contain||"")}function Nc(t){let e=pt(t);for(;ct(e)&&!Ut(e);){if(Go(e))return e;if(Re(e))return null;e=pt(e)}return null}function jo(){return Wo==null&&(Wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wo}function Ut(t){return/^(html|body|#document)$/.test(qt(t))}function G(t){return U(t).getComputedStyle(t)}function De(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(qt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Fi(t)&&t.host||et(t);return Fi(e)?e.host:e}function zi(t){const e=pt(t);return Ut(e)?t.ownerDocument?t.ownerDocument.body:t.body:ct(e)&&Jt(e)?e:zi(e)}function Zt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=zi(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),a=U(i);if(r){const s=Ko(a);return e.concat(a,a.visualViewport||[],Jt(i)?i:[],s&&o?Zt(s):[])}else return e.concat(i,Zt(i,[],o))}function Ko(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Vi(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ct(t),r=i?t.offsetWidth:o,a=i?t.offsetHeight:n,s=ke(o)!==r||ke(n)!==a;return s&&(o=r,n=a),{width:o,height:n,$:s}}function Xo(t){return W(t)?t:t.contextElement}function Ft(t){const e=Xo(t);if(!ct(e))return Z(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Vi(e);let a=(r?ke(o.width):o.width)/n,s=(r?ke(o.height):o.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Bc=Z(0);function Wi(t){const e=U(t);return!jo()||!e.visualViewport?Bc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qc(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==U(t)?!1:e}function wt(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=Xo(t);let a=Z(1);e&&(n?W(n)&&(a=Ft(n)):a=Ft(t));const s=qc(r,o,n)?Wi(r):Z(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const f=U(r),h=n&&W(n)?U(n):n;let p=f,m=Ko(p);for(;m&&n&&h!==p;){const v=Ft(m),b=m.getBoundingClientRect(),w=G(m),_=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,E=b.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=_,c+=E,p=U(m),m=Ko(p)}}return Me({width:d,height:u,x:l,y:c})}function Pe(t,e){const o=De(t).scrollLeft;return e?e.left+o:wt(et(t)).left+o}function Gi(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-Pe(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Uc(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",a=et(n),s=e?Re(e.floating):!1;if(n===a||s&&r)return o;let l={scrollLeft:0,scrollTop:0},c=Z(1);const d=Z(0),u=ct(n);if((u||!u&&!r)&&((qt(n)!=="body"||Jt(a))&&(l=De(n)),u)){const h=wt(n);c=Ft(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=a&&!u&&!r?Gi(a,l):Z(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:o.y*c.y-l.scrollTop*c.y+d.y+f.y}}function Fc(t){return Array.from(t.getClientRects())}function zc(t){const e=et(t),o=De(t),n=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+Pe(t);const s=-o.scrollTop;return G(n).direction==="rtl"&&(a+=q(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:a,y:s}}const ji=25;function Vc(t,e){const o=U(t),n=et(t),i=o.visualViewport;let r=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=jo();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Pe(n);if(c<=0){const d=n.ownerDocument,u=d.body,f=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(n.clientWidth-u.clientWidth-h);p<=ji&&(r-=p)}else c<=ji&&(r+=c);return{width:r,height:a,x:s,y:l}}function Wc(t,e){const o=wt(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=ct(t)?Ft(t):Z(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=n*r.y;return{width:a,height:s,x:l,y:c}}function Ki(t,e,o){let n;if(e==="viewport")n=Vc(t,o);else if(e==="document")n=zc(et(t));else if(W(e))n=Wc(e,o);else{const i=Wi(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Me(n)}function Xi(t,e){const o=pt(t);return o===e||!W(o)||Ut(o)?!1:G(o).position==="fixed"||Xi(o,e)}function Gc(t,e){const o=e.get(t);if(o)return o;let n=Zt(t,[],!1).filter(s=>W(s)&&qt(s)!=="body"),i=null;const r=G(t).position==="fixed";let a=r?pt(t):t;for(;W(a)&&!Ut(a);){const s=G(a),l=Go(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Jt(a)&&!l&&Xi(t,a))?n=n.filter(d=>d!==a):i=s,a=pt(a)}return e.set(t,n),n}function jc(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const a=[...o==="clippingAncestors"?Re(e)?[]:Gc(e,this._c):[].concat(o),n],s=Ki(e,a[0],i);let l=s.top,c=s.right,d=s.bottom,u=s.left;for(let f=1;f<a.length;f++){const h=Ki(e,a[f],i);l=q(h.top,l),c=Bt(h.right,c),d=Bt(h.bottom,d),u=q(h.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Kc(t){const{width:e,height:o}=Vi(t);return{width:e,height:o}}function Xc(t,e,o){const n=ct(e),i=et(e),r=o==="fixed",a=wt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=Z(0);function c(){l.x=Pe(i)}if(n||!n&&!r)if((qt(e)!=="body"||Jt(i))&&(s=De(e)),n){const h=wt(e,!0,r,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();r&&!n&&i&&c();const d=i&&!n&&!r?Gi(i,s):Z(0),u=a.left+s.scrollLeft-l.x-d.x,f=a.top+s.scrollTop-l.y-d.y;return{x:u,y:f,width:a.width,height:a.height}}function Yo(t){return G(t).position==="static"}function Yi(t,e){if(!ct(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return et(t)===o&&(o=o.ownerDocument.body),o}function Qi(t,e){const o=U(t);if(Re(t))return o;if(!ct(t)){let i=pt(t);for(;i&&!Ut(i);){if(W(i)&&!Yo(i))return i;i=pt(i)}return o}let n=Yi(t,e);for(;n&&Dc(n)&&Yo(n);)n=Yi(n,e);return n&&Ut(n)&&Yo(n)&&!Go(n)?o:n||Nc(t)||o}const Yc=async function(t){const e=this.getOffsetParent||Qi,o=this.getDimensions,n=await o(t.floating);return{reference:Xc(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qc(t){return G(t).direction==="rtl"}const Jc={convertOffsetParentRelativeRectToViewportRelativeRect:Uc,getDocumentElement:et,getClippingRect:jc,getOffsetParent:Qi,getElementRects:Yc,getClientRects:Fc,getDimensions:Kc,getScale:Ft,isElement:W,isRTL:Qc};function Ji(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Zc(t,e){let o=null,n;const i=et(t);function r(){var s;clearTimeout(n),(s=o)==null||s.disconnect(),o=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(s||e(),!f||!h)return;const p=Le(u),m=Le(i.clientWidth-(d+f)),v=Le(i.clientHeight-(u+h)),b=Le(d),_={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:q(0,Bt(1,l))||1};let E=!0;function A(C){const H=C[0].intersectionRatio;if(H!==l){if(!E)return a();H?a(!1,H):n=setTimeout(()=>{a(!1,1e-7)},1e3)}H===1&&!Ji(c,t.getBoundingClientRect())&&a(),E=!1}try{o=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,_)}o.observe(t)}return a(!0),r}function td(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Xo(t),d=i||r?[...c?Zt(c):[],...e?Zt(e):[]]:[];d.forEach(b=>{i&&b.addEventListener("scroll",o,{passive:!0}),r&&b.addEventListener("resize",o)});const u=c&&s?Zc(c,o):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),o()}),c&&!l&&h.observe(c),e&&h.observe(e));let p,m=l?wt(t):null;l&&v();function v(){const b=wt(t);m&&!Ji(m,b)&&o(),m=b,p=requestAnimationFrame(v)}return o(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",o),r&&w.removeEventListener("resize",o)}),u?.(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const ed=Ic,od=Mc,nd=kc,id=Rc,rd=Oc,ad=(t,e,o)=>{const n=new Map,i={platform:Jc,...o},r={...i.platform,_c:n};return Ac(t,e,{...i,platform:r})},Zi="data-placement",tr="data-autoplacement",te=new Map;function sd(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,r=n instanceof HTMLElement&&y(n,"popover")!==null&&Bo(n,"--_ds-floating");if(!r)return;if(e==="closed")return te.get(n)?.();if(!i){let p=n.getRootNode(),m=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&p?.querySelector?.(m)||void 0}if(!i||i===n||o&&o===e)return;let a=Bo(n,"--_ds-floating-overscroll"),s=y(n,Zi)||y(i,Zi)||r,l=y(n,tr)||y(i,tr),c=parseFloat(getComputedStyle(n,"::before").height)||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+c;if(s==="none")return;let f={strategy:"absolute",placement:s,middleware:[ed(c||0),od({padding:10,limiter:rd({offset:{mainAxis:u}})}),cd(),...l==="false"?[]:[nd({padding:10,crossAxis:!1})],...a?[id({apply({availableHeight:p}){a==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,p-20)}px`}})]:[]]},h=td(i,n,async()=>{if(!i?.isConnected)return te.get(n)?.();let{x:p,y:m}=await ad(i,n,f);n.style.translate=`${p}px ${m}px`});te.set(n,()=>te.delete(n)&&h())}let He;const ld=({type:t})=>{if(t==="mousedown"&&(He=!1),t==="scroll"&&He===!1&&(He=!0),t==="mouseup"&&He)for(let[e]of te)e.showPopover()};it("popover",()=>[R(document,"mousedown scroll mouseup",ld,!0),R(document,"toggle ds-toggle-source",sd,z)]);const cd=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,o=t.rects.reference,n=`${Math.round(o.width/2+o.x-t.x)}px`,i=`${Math.round(o.height/2+o.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",n),e.style.setProperty("--_ds-floating-arrow-y",i),y(e,"data-floating",t.placement),t}}),Qo=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||y(t,"aria-readonly")==="true"),dd=t=>{if(t.key!=="Tab"&&Qo(t.target)){let e=t.key?.startsWith("Arrow"),o=t.altKey||t.ctrlKey||t.metaKey;if((e||!o)&&t.preventDefault(),e&&y(t.target,"type")==="radio"){let n=document.querySelectorAll(`input[name="${t.target.name}"]`),i=t.key?.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+[...n].indexOf(t.target)+i)%n.length]?.focus()}}},ud=t=>{let e=t.target?.closest?.("label")?.control||t.target;Qo(e)&&(t.preventDefault(),e.focus())},fd=t=>{t.target instanceof HTMLSelectElement&&Qo(t.target)&&t.preventDefault()};it("readonly",()=>[R(document,"keydown",dd),R(document,"click",ud),R(document,"mousedown",fd)]);const er="aria-label",Ne="data-toggle-group",or=`[${Ne}]`,pd=()=>{for(let t of document.querySelectorAll(or))y(t,"aria-label",Nt(t,Ne))},md=t=>{let{key:e,target:o}=t,n=o instanceof HTMLInputElement&&o.closest(or);if(n&&(!y(n,er)&&!y(n,"aria-labelledby")&&y(n,er,Nt(n,Ne)),e==="Enter"&&o.click(),e?.startsWith("Arrow"))){t.preventDefault?.();let i=[...n.getElementsByTagName("input")],r=i.indexOf(o),a=e.match(/Arrow(Right|Down)/)?1:-1,s=r;for(let l=0;l<i.length;l++)if(s=(i.length+s+a)%i.length,!i[s]?.disabled){i[s]?.focus();break}}};it("toggle-group",()=>[R(document,"keydown",md),rt(document,pd,{attributeFilter:[Ne],attributes:!0,childList:!0,subtree:!0})]);let I,ee,Be=!1,Jo=0,Zo=0;const hd=Q()&&/iPad|iPhone|iPod/.test(navigator.userAgent),zt="data-tooltip",tn="data-color",nr="aria-label",ir="aria-description",vd=`[${tn}]`,gd=`[${zt}]`,en="data-color-scheme",bd=`[${en}]`,rr=t=>{t&&!(t instanceof HTMLElement)&&Ht("setTooltipElement expects an HTMLElement, got: ",t),clearTimeout(Zo),clearTimeout(Jo),ee=void 0,Be=!1,I=t||void 0},yd=()=>{for(let t of document.querySelectorAll(gd)){let e=Nt(t,zt);if(!e)return;if(e!==(t.getAttribute(nr)||t.getAttribute(ir))){let i=y(t,"role")!=="img"&&t.textContent?.trim();y(t,zt,e),y(t,nr,i?null:e),y(t,ir,i?e:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||Ht('Missing tabindex="0" attribute on: ',t)}let o=t===ee&&I?.offsetHeight&&I?.offsetWidth,n=o&&e&&I?.textContent!==e;o&&n&&(I&&(I.textContent=e),document.activeElement===t&&Uo(e))}},ar=({type:t,target:e})=>{if(clearTimeout(Jo),e===I)return;if(t==="mouseover"&&!Be&&!hd){Jo=setTimeout(ar,300,{target:e});return}let o=e?.closest?.(`[${zt}]`);if(o===ee)return;if(!o)return sr();I||=ki("div",{class:"ds-tooltip"}),I.isConnected||document.body.appendChild(I);let n=o.closest(vd),i=o.closest(bd),r=n!==i&&n?.contains(i);clearTimeout(Zo),y(I,"popover","manual"),y(I,en,i?.getAttribute(en)||null),y(I,tn,r&&n?.getAttribute(tn)||null),I.textContent=y(o,zt),I.showPopover(),I.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),Be=!0,ee=o},sr=()=>I?.isConnected&&I.popover&&I.hidePopover(),lr=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&sr();t?t.target===I&&t.newState==="closed"&&(ee=void 0,Zo=setTimeout(lr,300)):Be=!1};it("tooltip",()=>[R(document,"blur focus mouseover",ar,z),R(document,"toggle keydown",lr,z),rt(document,yd,{attributeFilter:[zt],attributes:!0,childList:!0,subtree:!0})]);const on="aria-label";var cr=class extends Ce{_items;_label=null;_unresize;_unmutate;static get observedAttributes(){return[on]}connectedCallback(){let e=Ai(()=>nn(this),100);this._label=Nt(this,on),this._items=this.getElementsByTagName("a"),this._unresize=R(window,"resize",e),this._unmutate=rt(this,nn,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){!this._unmutate||!n||(this._label=n,nn(this))}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._items=void 0}};const nn=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;y(t,"role",n?null:"navigation"),y(t,on,n?null:t._label);for(let i of t._items||[])y(i,"aria-current",i===o?"page":null)};at.define("ds-breadcrumbs",cr);var dr=class extends Ce{_unmutate;connectedCallback(){R(this,"animationend",this,z),y(this,"tabindex","-1"),this._unmutate=rt(this,_d,{childList:!0,subtree:!0}),this.focus()}handleEvent({target:e}){e===this&&this.focus()}disconnectedCallback(){qo(this,"animationend",this,z),this._unmutate?.(),this._unmutate=void 0}};const _d=t=>{let e=t.querySelector("h2,h3,h4,h5,h6");e&&y(t,"aria-labelledby",st(e))};at.define("ds-error-summary",dr);const rn="aria-invalid",ur="aria-describedby",fr="data-indeterminate",wd=nc()?800:200,pr=new WeakMap,oe=new Map,an=new WeakSet,Ed=(t,e=[])=>{for(let{target:o}of e){let n=o instanceof HTMLFieldSetElement;for(let[i]of oe)(n?o.contains(i):i.contains(o))&&mr(i)}},mr=t=>{let e=[],o=[],n=oe.get(t)||[],i,r,a=!1,s=!1;for(let f of t.getElementsByTagName("*"))if(f instanceof HTMLLabelElement&&e.push(f),!f.hidden)if($d(f))i?Ht("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):i=f;else{let h=f.getAttribute("data-field");h==="counter"&&(r=f),h==="validation"?(o.unshift(st(f)),a=!0,s||=vr(f)):h&&o.push(st(f))}if(!i)return;r&&pr.set(i,r);for(let f of e)y(f,"for",st(i));let l=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');l&&!l?.hidden&&(a=!0,s||=vr(l),o.unshift(st(l)));let c=y(i,fr);c&&(i.indeterminate=c==="true"),(i.type==="radio"||i.type==="checkbox")&&y(t,"data-clickdelegatefor",st(i));let d=y(i,ur)?.trim().split(/\s+/)?.filter(f=>!n.includes(f))||[];y(i,ur,[...o,...d].join(" ")||null),oe.set(t,o);let u=an.has(i);a&&!u&&!i.hasAttribute(rn)?(y(i,rn,"true"),an.add(i)):!a&&u&&(y(i,rn,null),an.delete(i)),hr(i)},Sd={over:"%d tegn for mye",under:"%d tegn igjen"},hr=t=>{let e=t.target||t,o=pr.get(e);if(o?.isConnected){let n=(Number(y(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",r=(Nt(o,`data-${i}`)||Sd[i])?.replace("%d",`${Math.abs(n)}`);y(o,"data-label",r),y(o,"data-state",i),y(o,"data-color",n<0?"danger":null),t.type==="input"&&r&&xd(e,r)}e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},xd=Ai((t,e)=>{document.activeElement===t&&Uo(e)},wd),vr=t=>t.getAttribute("data-color")!=="success",$d=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var qe=class extends Ce{connectedCallback(){oe.set(this,[]),mr(this)}disconnectedCallback(){oe.delete(this)}};at.define("ds-field",qe),it("field",()=>[R(document,"input",hr,z),rt(document,Ed,{attributeFilter:["data-field","data-limit","hidden","id","value",fr],attributes:!0,childList:!0,subtree:!0})]);const sn="aria-label",Ue="data-current",Fe="data-total",gr="data-href",br=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Td(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var yr=class extends Ce{_unmutate;_render;static get observedAttributes(){return[sn,Ue,Fe,gr]}connectedCallback(){let t=y(this,Fe),e=y(this,Ue);e&&!t&&Ht(`Missing ${Fe} attribute on:`,this),t&&!e&&Ht(`Missing ${Ue} attribute on:`,this),y(this,sn,Nt(this,sn)),y(this,"role","navigation"),this._unmutate=rt(this,_r,{childList:!0,subtree:!0})}attributeChangedCallback(){this._unmutate&&_r(this)}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const _r=t=>{let e=Number(y(t,Ue)),o=Number(y(t,Fe));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,r=y(t,gr),{next:a,prev:s,pages:l}=br({current:e,total:o,show:i});n.forEach((c,d)=>{let u=d?n[d+1]?l[d-1]?.page:a:s;y(c,"aria-current",l[d-1]?.current?"true":null),y(c,"aria-label",`${u??"hidden"}`),y(c,"role",u?null:"none"),y(c,"tabindex",u?null:"-1"),c instanceof HTMLButtonElement&&y(c,"value",`${u}`),r&&c instanceof HTMLAnchorElement&&y(c,"href",r.replace("%d",`${u}`))})}},Td=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),r=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:r+1-i},(s,l)=>l+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&r<e&&a.splice(-2,2,0,e),a};at.define("ds-pagination",yr);var Cd=Object.defineProperty,wr=Object.getOwnPropertySymbols,Ad=Object.prototype.hasOwnProperty,kd=Object.prototype.propertyIsEnumerable,Er=(t,e,o)=>e in t?Cd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Ld=(t,e)=>{for(var o in e||(e={}))Ad.call(e,o)&&Er(t,o,e[o]);if(wr)for(var o of wr(e))kd.call(e,o)&&Er(t,o,e[o]);return t},ze=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Id=ze&&/android/i.test(navigator.userAgent),Sr=ze&&/iPad|iPhone|iPod/.test(navigator.userAgent),xr;ze&&/^Mac/i.test(((xr=navigator.userAgentData)==null?void 0:xr.platform)||navigator.platform);var Md="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Od=typeof HTMLElement>"u"?class{}:HTMLElement;function x(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var $r=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Ve=(t,...e)=>$r("add",t,e),Rd=(t,...e)=>$r("remove",t,e),We=new WeakMap,ln=(t,e)=>{if(e===void 0)return We.get(t);try{We.get(t).disconnect(),We.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),We.set(t,o)}},Dd=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},Tr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Pd=0,Cr=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Pd).toString(32)}`),t.id):"",Vt=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,r]of Object.entries(o))x(n,i,r);return n},Hd={define:(t,e)=>!ze||window.customElements.get(t)||window.customElements.define(t,e)},Nd=t=>{var e;const o=x(t,"aria-label")||"";return[...(((e=x(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())||""},o)},Et,Bd=0,cn=t=>{Et||(Et=Vt("div"),Et.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",x(Et,"aria-live","assertive")),Et.isConnected||document.body.append(Et),t&&(Et.textContent=`${t}${Bd++%2?" ":""}`)},Ar=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},dn=!1,un=t=>(t?.type==="mouseup"&&(dn=!1),t?.type==="mousedown"&&(dn=!0,Ve(document,"mouseup",un,{once:!0})),dn),qd=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
|
|
16
16
|
:host(:not([data-multiple])) ::slotted(data),
|
|
17
17
|
:host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
|
|
18
18
|
[role="listbox"] { position: absolute } /* Avoid affecting CSS like flex on the <u-combobox> */
|
|
@@ -20,12 +20,12 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
20
20
|
::slotted(del) { text-decoration: none }
|
|
21
21
|
::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
|
|
22
22
|
::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
|
|
23
|
-
::slotted(data:focus) { ${kd} }`,Ar="beforeinput,blur,focus,click,input,keydown,mousedown",kr={once:!0,capture:!0,passive:!0},je="false",Ke=Ad||Er,Lr="".repeat(5),Ir="deleteContentBackward",Nd="insertText",Bd=" ",Xe={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"},Mr=class extends Ld{constructor(){super(),this._item="",this._speak="",this._texts=Cd({},Xe),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(zt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),zt("slot"),zt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),zt("style",Hd))}static get observedAttributes(){return Object.keys(Xe).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=$r(this),We(this,Ar,this,!0),an(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Ye,0,this),setTimeout(Qe,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];Xe[n]&&(this._texts[n]=o||Xe[n])}disconnectedCallback(){an(this,!1),Id(this,Ar,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;un(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ud(this),t.type==="click"&&zd(this,t),t.type==="focus"&&qd(this,t),t.type==="input"&&Vd(this,t),t.type==="keydown"&&Wd(this,t),t.type==="mousedown"&&cn(t),t.type==="mutation"&&Ye(this,t))}get multiple(){var t;return((t=x(this,"data-multiple"))!=null?t:je)!==je}set multiple(t){x(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=x(this,"data-creatable"))!=null?t:je)!==je}set creatable(t){x(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 o=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},Et=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},dn=t=>t instanceof HTMLDataElement,un=({control:t})=>t?.disabled||t?.readOnly||!1,Ye=(t,e)=>{var o,n;const{_focus:i,_texts:r,items:a,control:l,list:s,multiple:c}=t;if(!l)return;const d=Dd(l),u=d.endsWith(Lr)?x(l,"data-label"):d;x(l,"data-label",u);let f=`${u}${c?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const h=[];for(const{addedNodes:E,removedNodes:A}of e?.detail||[]){for(const C of E)dn(C)&&h.unshift(C);for(const C of A)dn(C)&&h.push(C)}const p=c?h.length===1:h[0]===i;if(i&&p){const E=x(l,"aria-expanded"),A=x(l,"inputmode"),C=dn(i)?l:i,H=!h[0].isConnected;t._speak=`${r[H?"removed":"added"]} ${Et(h[0])}, `,(Ke||i===l)&&sn(t._speak),l!==C&&(Ke&&x(l,"aria-expanded",null),Ke&&x(l,"inputmode","none"),f=Bd,l.focus()),setTimeout(()=>{var V;x(l,"aria-expanded",E),x(l,"inputmode",H?"none":A),(V=C?.focus)==null||V.call(C),x(l,"inputmode",A),t._speak="",Ke?setTimeout(Ye,100,t):We(t,"blur",()=>Ye(t),kr)},100)}let m=0;const v=t.querySelector("select"),b=un(t)?"":r.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&x(w,"aria-label",r.items);for(const E of a){const A=v?.options[m++],C=Et(E),H=E.value||C,V=`${t._speak}${C}, ${b}`;x(E,"aria-label",V),x(E,"aria-selected","true"),x(E,"role","option"),x(E,"slot","items"),x(E,"tabindex","-1"),x(E,"value",H),A?Object.assign(A,{textContent:C,value:H}):v?.appendChild(new Option(C,H,!0,!0)),Er&&x(E,"title",`${m} ${r.of} ${a.length}`)}v&&x(v,"multiple",c?"":null);for(const E of[...v?.options||[]].slice(m))E.remove();!c&&m>1&&console.warn(t," Multiple <data> found in single mode."),s&&(x(s,"aria-multiselectable",`${c}`),x(l,"list",Tr(s)),x(l,"aria-label",`${t._speak}${f}${Lr}`),s.hasAttribute("popover")&&(x(l,"popovertarget",Tr(s)),x(s,"popover","manual")),s._of=r.of);const _=Et(a[0]);_!==t._item&&Qe(t),t._item=_,Or(t),Rr(t),(n=an(t))==null||n.takeRecords()},Or=t=>{var e;t.clear&&x(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||un(t))},Rr=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const r of n){const a=(e=x(r,"value"))!=null?e:Et(r);x(r,"aria-label",o?`${o}${Et(r)}`:null),x(r,"selected",i.includes(a)?"":null)}},Qe=t=>{const{multiple:e,control:o,items:n}=t,i=Et(n[0]);!e&&o&&i!==o.value&&Cr(o,i,i?Nd:Ir)},fn=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:r,control:a,items:l,multiple:s}=t,c=((o=a?.value)==null?void 0:o.trim())||"",d=c.toLowerCase()||null;let u=[...i].find(h=>(x(h,"label")||Et(h)).trim().toLowerCase()===d);const f={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",f))||(u=[...i].find(h=>h.selected)),e)return Rr(t),u?Vt(t,u,!1):r&&c?Vt(t,{value:c},!1):(!s&&!c&&l[0]?Vt(t,l[0]):Qe(t),sn(n.invalid));for(const h of i)h.selected=h===u},Vt=(t,e,o=!0)=>{var n,i,r;const{control:a,items:l,multiple:s}=t,c=zt("data",e.label||e.value,{value:e.value}),d=[...l].find(h=>h.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||c};if(d&&!o)return Qe(t);if(d===((n=$r(t))==null?void 0:n.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!s)for(const h of[...l])h.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",c),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},qd=(t,{target:e})=>{const{_form:o,control:n,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&o===void 0&&n&&e===n&&(t._form=x(n,"form"),x(n,"form","#")),sn()},Ud=t=>cn()||setTimeout(Fd,0,t),Fd=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:r}=t;!e||t.contains(o?.activeElement)||(i||fn(t),n&&r&&x(r,"form",n),t._focus=t._form=void 0)},zd=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:r,control:a,items:l}=t;if(r?.contains(i))return a&&Cr(a,"",Ir),a?.focus();for(const s of l){const{top:c,right:d,bottom:u,left:f}=s.getBoundingClientRect();if(s.contains(i))return Vt(t,s);if(n>=c&&n<=u&&o>=f&&o<=d)return s.focus()}i===t&&a?.focus()},Vd=(t,e)=>{var o;const{options:n=[],control:i,multiple:r}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const s of n)if(s.value&&s.value===a)return Vt(t,s,r)}else r||fn(t,!1);Or(t)},Wd=(t,e)=>{var o;const{clear:n,control:i,items:r}=t,{key:a,repeat:l,target:s}=e,c=i&&i===s,d=c&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let f=c?r.length:[...r].indexOf(s);if(c&&a==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),We(n,"blur",()=>x(n,"tabindex",null),kr)),!(!c&&Md(e)||f===-1||u)){if(a==="ArrowRight"&&!c)f+=1;else if(a==="ArrowLeft"&&!d)f-=1;else{if(a==="Enter"&&c)return fn(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!l&&r[f])return Vt(t,r[f]);c&&(f-=1)}else return c||i?.focus()}e.preventDefault(),(o=r[Math.max(0,f)]||i)==null||o.focus()}};Rd.define("u-combobox",Mr);var Dr=class extends Mr{_render;_unmutate;connectedCallback(){super.connectedCallback(),this._unmutate=rt(this,Gd,{childList:!0}),R(this,"toggle",Pr,z)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,No(this,"toggle",Pr,z)}};const Gd=({control:t,list:e})=>{t&&!t.placeholder&&y(t,"placeholder"," "),t&&y(t,"popovertarget",st(e)||null),e&&y(e,"popover","manual")},Pr=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};at.define("ds-suggestion",Dr);var Hr=class extends xe{},Nr=class extends $e{},Br=class extends Ro{},qr=class extends Do{};at.define("ds-tabs",Hr),at.define("ds-tablist",Nr),at.define("ds-tab",Br),at.define("ds-tabpanel",qr);var pn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ur=pn(),Fr=Ur?navigator.userAgent:"",jd=/android/i.test(Fr),Kd=/firefox/i.test(Fr),zr;Ur&&/^Mac/i.test(((zr=navigator.userAgentData)==null?void 0:zr.platform)||navigator.platform);var Vr=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Xd=(t,e,o)=>{const n=new MutationObserver(r=>{if(!pn()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},Wr="__uDetailsPolyfillSummarys";if(pn()&&jd&&Kd&&!window[Wr]){const t=document.getElementsByTagName("summary"),e=()=>{for(const o of t){const n=o.parentElement;Vr(o,"role","button"),Vr(o,"aria-expanded",`${!!n?.open}`)}};window[Wr]=Xd(document,e,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Yd=Object.defineProperty,Gr=Object.getOwnPropertySymbols,Qd=Object.prototype.hasOwnProperty,Jd=Object.prototype.propertyIsEnumerable,jr=(t,e,o)=>e in t?Yd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Zd=(t,e)=>{for(var o in e||(e={}))Qd.call(e,o)&&jr(t,o,e[o]);if(Gr)for(var o of Gr(e))Jd.call(e,o)&&jr(t,o,e[o]);return t},ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Je=ie&&/android/i.test(navigator.userAgent),mn=ie&&/iPad|iPhone|iPod/.test(navigator.userAgent),Kr;ie&&/^Mac/i.test(((Kr=navigator.userAgentData)==null?void 0:Kr.platform)||navigator.platform);var tu=`${Je?"data":"aria"}-labelledby`,eu=":host(:not([hidden])) { display: block }",ou="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Xr=typeof HTMLElement>"u"?class{}:HTMLElement;function k(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Yr=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},re=(t,...e)=>Yr("add",t,e),Ze=(t,...e)=>Yr("remove",t,e),nu=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(gn("slot"),gn("style",e)),to=new WeakMap,hn=(t,e)=>{if(e===void 0)return to.get(t);try{to.get(t).disconnect(),to.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),to.set(t,o)}},Qr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},iu=0,vn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++iu).toString(32)}`),t.id):"",gn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Jr={define:(t,e)=>!ie||window.customElements.get(t)||window.customElements.define(t,e)},St,ru=0,Zr=t=>{St||(St=gn("div"),St.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(St,"aria-live","assertive")),St.isConnected||document.body.append(St),t&&(St.textContent=`${t}${ru++%2?" ":""}`)},au=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},bn=!1,yn=t=>(t?.type==="mouseup"&&(bn=!1),t?.type==="mousedown"&&(bn=!0,re(document,"mouseup",yn,{once:!0})),bn),su=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,_n="disabled",ae="selected",lu=class extends Xr{static get observedAttributes(){return[_n,ae]}connectedCallback(){mn||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[ae]}set defaultSelected(e){this[ae]=e}get disabled(){return k(this,_n)!==null}set disabled(e){k(this,_n,e?"":null)}get form(){return this.closest("form")}get index(){var e;return[...((e=this.parentElement)==null?void 0:e.options)||[this]].indexOf(this)}get label(){var e;return(e=k(this,"label"))!=null?e:this.text}set label(e){k(this,"label",e)}get selected(){return k(this,ae)!==null}set selected(e){k(this,ae,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){var e;return(e=k(this,"value"))!=null?e:this.text}set value(e){k(this,"value",e)}};Jr.define("u-option",lu);var wn=`${eu}
|
|
23
|
+
::slotted(data:focus) { ${Md} }`,kr="beforeinput,blur,focus,click,input,keydown,mousedown",Lr={once:!0,capture:!0,passive:!0},Ge="false",je=Id||Sr,Ir="".repeat(5),Mr="deleteContentBackward",Ud="insertText",Fd=" ",Ke={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"},Or=class extends Od{constructor(){super(),this._item="",this._speak="",this._texts=Ld({},Ke),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Vt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),Vt("slot"),Vt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),Vt("style",qd))}static get observedAttributes(){return Object.keys(Ke).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Tr(this),Ve(this,kr,this,!0),ln(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Xe,0,this),setTimeout(Ye,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];Ke[n]&&(this._texts[n]=o||Ke[n])}disconnectedCallback(){ln(this,!1),Rd(this,kr,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;pn(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Vd(this),t.type==="click"&&Gd(this,t),t.type==="focus"&&zd(this,t),t.type==="input"&&jd(this,t),t.type==="keydown"&&Kd(this,t),t.type==="mousedown"&&un(t),t.type==="mutation"&&Xe(this,t))}get multiple(){var t;return((t=x(this,"data-multiple"))!=null?t:Ge)!==Ge}set multiple(t){x(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=x(this,"data-creatable"))!=null?t:Ge)!==Ge}set creatable(t){x(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 o=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},St=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},fn=t=>t instanceof HTMLDataElement,pn=({control:t})=>t?.disabled||t?.readOnly||!1,Xe=(t,e)=>{var o,n;const{_focus:i,_texts:r,items:a,control:s,list:l,multiple:c}=t;if(!s)return;const d=Nd(s),u=d.endsWith(Ir)?x(s,"data-label"):d;x(s,"data-label",u);let f=`${u}${c?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const h=[];for(const{addedNodes:E,removedNodes:A}of e?.detail||[]){for(const C of E)fn(C)&&h.unshift(C);for(const C of A)fn(C)&&h.push(C)}const p=c?h.length===1:h[0]===i;if(i&&p){const E=x(s,"aria-expanded"),A=x(s,"inputmode"),C=fn(i)?s:i,H=!h[0].isConnected;t._speak=`${r[H?"removed":"added"]} ${St(h[0])}, `,(je||i===s)&&cn(t._speak),s!==C&&(je&&x(s,"aria-expanded",null),je&&x(s,"inputmode","none"),f=Fd,s.focus()),setTimeout(()=>{var V;x(s,"aria-expanded",E),x(s,"inputmode",H?"none":A),(V=C?.focus)==null||V.call(C),x(s,"inputmode",A),t._speak="",je?setTimeout(Xe,100,t):Ve(t,"blur",()=>Xe(t),Lr)},100)}let m=0;const v=t.querySelector("select"),b=pn(t)?"":r.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&x(w,"aria-label",r.items);for(const E of a){const A=v?.options[m++],C=St(E),H=E.value||C,V=`${t._speak}${C}, ${b}`;x(E,"aria-label",V),x(E,"aria-selected","true"),x(E,"role","option"),x(E,"slot","items"),x(E,"tabindex","-1"),x(E,"value",H),A?Object.assign(A,{textContent:C,value:H}):v?.appendChild(new Option(C,H,!0,!0)),Sr&&x(E,"title",`${m} ${r.of} ${a.length}`)}v&&x(v,"multiple",c?"":null);for(const E of[...v?.options||[]].slice(m))E.remove();!c&&m>1&&console.warn(t," Multiple <data> found in single mode."),l&&(x(l,"aria-multiselectable",`${c}`),x(s,"list",Cr(l)),x(s,"aria-label",`${t._speak}${f}${Ir}`),l.hasAttribute("popover")&&(x(s,"popovertarget",Cr(l)),x(l,"popover","manual")),l._of=r.of);const _=St(a[0]);_!==t._item&&Ye(t),t._item=_,Rr(t),Dr(t),(n=ln(t))==null||n.takeRecords()},Rr=t=>{var e;t.clear&&x(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||pn(t))},Dr=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const r of n){const a=(e=x(r,"value"))!=null?e:St(r);x(r,"aria-label",o?`${o}${St(r)}`:null),x(r,"selected",i.includes(a)?"":null)}},Ye=t=>{const{multiple:e,control:o,items:n}=t,i=St(n[0]);!e&&o&&i!==o.value&&Ar(o,i,i?Ud:Mr)},mn=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:r,control:a,items:s,multiple:l}=t,c=((o=a?.value)==null?void 0:o.trim())||"",d=c.toLowerCase()||null;let u=[...i].find(h=>(x(h,"label")||St(h)).trim().toLowerCase()===d);const f={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",f))||(u=[...i].find(h=>h.selected)),e)return Dr(t),u?Wt(t,u,!1):r&&c?Wt(t,{value:c},!1):(!l&&!c&&s[0]?Wt(t,s[0]):Ye(t),cn(n.invalid));for(const h of i)h.selected=h===u},Wt=(t,e,o=!0)=>{var n,i,r;const{control:a,items:s,multiple:l}=t,c=Vt("data",e.label||e.value,{value:e.value}),d=[...s].find(h=>h.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||c};if(d&&!o)return Ye(t);if(d===((n=Tr(t))==null?void 0:n.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!l)for(const h of[...s])h.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",c),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},zd=(t,{target:e})=>{const{_form:o,control:n,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&o===void 0&&n&&e===n&&(t._form=x(n,"form"),x(n,"form","#")),cn()},Vd=t=>un()||setTimeout(Wd,0,t),Wd=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:r}=t;!e||t.contains(o?.activeElement)||(i||mn(t),n&&r&&x(r,"form",n),t._focus=t._form=void 0)},Gd=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&Ar(a,"",Mr),a?.focus();for(const l of s){const{top:c,right:d,bottom:u,left:f}=l.getBoundingClientRect();if(l.contains(i))return Wt(t,l);if(n>=c&&n<=u&&o>=f&&o<=d)return l.focus()}i===t&&a?.focus()},jd=(t,e)=>{var o;const{options:n=[],control:i,multiple:r}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const l of n)if(l.value&&l.value===a)return Wt(t,l,r)}else r||mn(t,!1);Rr(t)},Kd=(t,e)=>{var o;const{clear:n,control:i,items:r}=t,{key:a,repeat:s,target:l}=e,c=i&&i===l,d=c&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let f=c?r.length:[...r].indexOf(l);if(c&&a==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),Ve(n,"blur",()=>x(n,"tabindex",null),Lr)),!(!c&&Dd(e)||f===-1||u)){if(a==="ArrowRight"&&!c)f+=1;else if(a==="ArrowLeft"&&!d)f-=1;else{if(a==="Enter"&&c)return mn(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[f])return Wt(t,r[f]);c&&(f-=1)}else return c||i?.focus()}e.preventDefault(),(o=r[Math.max(0,f)]||i)==null||o.focus()}};Hd.define("u-combobox",Or);var Pr=class extends Or{_render;_unmutate;connectedCallback(){super.connectedCallback(),this._unmutate=rt(this,Xd,{childList:!0}),R(this,"toggle",Hr,z)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,qo(this,"toggle",Hr,z)}};const Xd=({control:t,list:e})=>{t&&!t.placeholder&&y(t,"placeholder"," "),t&&y(t,"popovertarget",st(e)||null),e&&y(e,"popover","manual")},Hr=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};at.define("ds-suggestion",Pr);var Nr=class extends xe{},Br=class extends $e{},qr=class extends Ro{},Ur=class extends Do{};at.define("ds-tabs",Nr),at.define("ds-tablist",Br),at.define("ds-tab",qr),at.define("ds-tabpanel",Ur);var hn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Fr=hn(),zr=Fr?navigator.userAgent:"",Yd=/android/i.test(zr),Qd=/firefox/i.test(zr),Vr;Fr&&/^Mac/i.test(((Vr=navigator.userAgentData)==null?void 0:Vr.platform)||navigator.platform);var Wr=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Jd=(t,e,o)=>{const n=new MutationObserver(r=>{if(!hn()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},Gr="__uDetailsPolyfillSummarys";if(hn()&&Yd&&Qd&&!window[Gr]){const t=document.getElementsByTagName("summary"),e=()=>{for(const o of t){const n=o.parentElement;Wr(o,"role","button"),Wr(o,"aria-expanded",`${!!n?.open}`)}};window[Gr]=Jd(document,e,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Zd=Object.defineProperty,jr=Object.getOwnPropertySymbols,tu=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,Kr=(t,e,o)=>e in t?Zd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,ou=(t,e)=>{for(var o in e||(e={}))tu.call(e,o)&&Kr(t,o,e[o]);if(jr)for(var o of jr(e))eu.call(e,o)&&Kr(t,o,e[o]);return t},ne=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Qe=ne&&/android/i.test(navigator.userAgent),vn=ne&&/iPad|iPhone|iPod/.test(navigator.userAgent),Xr;ne&&/^Mac/i.test(((Xr=navigator.userAgentData)==null?void 0:Xr.platform)||navigator.platform);var nu=`${Qe?"data":"aria"}-labelledby`,iu=":host(:not([hidden])) { display: block }",ru="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Yr=typeof HTMLElement>"u"?class{}:HTMLElement;function k(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Qr=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},ie=(t,...e)=>Qr("add",t,e),Je=(t,...e)=>Qr("remove",t,e),au=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(yn("slot"),yn("style",e)),Ze=new WeakMap,gn=(t,e)=>{if(e===void 0)return Ze.get(t);try{Ze.get(t).disconnect(),Ze.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Ze.set(t,o)}},Jr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},su=0,bn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++su).toString(32)}`),t.id):"",yn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Zr={define:(t,e)=>!ne||window.customElements.get(t)||window.customElements.define(t,e)},xt,lu=0,ta=t=>{xt||(xt=yn("div"),xt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(xt,"aria-live","assertive")),xt.isConnected||document.body.append(xt),t&&(xt.textContent=`${t}${lu++%2?" ":""}`)},cu=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},_n=!1,wn=t=>(t?.type==="mouseup"&&(_n=!1),t?.type==="mousedown"&&(_n=!0,ie(document,"mouseup",wn,{once:!0})),_n),du=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,En="disabled",re="selected",uu=class extends Yr{static get observedAttributes(){return[En,re]}connectedCallback(){vn||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[re]}set defaultSelected(e){this[re]=e}get disabled(){return k(this,En)!==null}set disabled(e){k(this,En,e?"":null)}get form(){return this.closest("form")}get index(){var e;return[...((e=this.parentElement)==null?void 0:e.options)||[this]].indexOf(this)}get label(){var e;return(e=k(this,"label"))!=null?e:this.text}set label(e){k(this,"label",e)}get selected(){return k(this,re)!==null}set selected(e){k(this,re,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){var e;return(e=k(this,"value"))!=null?e:this.text}set value(e){k(this,"value",e)}};Zr.define("u-option",uu);var Sn=`${iu}
|
|
24
24
|
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
25
|
-
::slotted([role="option"]:focus) { ${
|
|
25
|
+
::slotted([role="option"]:focus) { ${ru} }
|
|
26
26
|
::slotted([role="option"][aria-hidden="true"]),
|
|
27
27
|
::slotted([role="option"][disabled]),
|
|
28
|
-
::slotted([role="option"][hidden]) { display: none !important }`,cu=su(wn),ta,ea=0,du=mn||Je,oa="click,focusout,input,keydown,mousedown,mouseup",na="focus,focusin,blur,focusout",eo={singular:"%d hit",plural:"%d hits"},ia=class extends Xr{constructor(){super(),this._texts=Zd({},eo),this._value="",this._of="/",nu(this,wn)}static get observedAttributes(){return["id",...Object.keys(eo).map(e=>`data-sr-${e}`)]}connectedCallback(){this.hidden=!0,this._root=Qr(this),k(this,"role","listbox"),k(this,"tabindex","-1"),re(this._root,"focusin",this),re(this._root,"focus",this,!0),hn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Ze(this._root||this,"focus",this,!0),Ze(this._root||this,"focusin",this),hn(this,!1),En(this),this._root=void 0}attributeChangedCallback(e,o,n){const i=e?.split("data-sr-")[1],r=`input[list="${this.id}"]`;if(eo[i])this._texts[i]=n||eo[i];else if(this._root){this._input&&Sn(this,this._input);for(const a of this._root.querySelectorAll(r))Sn(this,a)}}handleEvent(e){const{target:o,type:n}=e;e.defaultPrevented||(n==="click"&&pu(this,e),(n==="focus"||n==="focusin")&&uu(this,e),(n==="blur"||n==="focusout")&&fu(this,e),n==="keydown"&&mu(this,e),n==="mousedown"&&this.contains(o)&&yn(e),(n==="mutation"||n==="input")&&(clearTimeout(ea),ea=setTimeout(sa,0,this,e)))}get options(){var e;if(!this._options){const o=(e=this.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options||this.getElementsByTagName("option")}},ra=t=>t?.disabled||t?.readOnly||!1,se=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=ra(t?._input)||!e,(o=hn(t))==null||o.takeRecords();const r=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Sn(t,t._input,e),r&&k(t,"popover","manual"),r&&t.togglePopover(e),e&&sa(t)},En=t=>{t._input&&(Ze(t._input||t,na,t),Ze(t._root||t,oa,t),se(t,!1),t._input=void 0)},Sn=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",vn(t)),re(e,na,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",vn(t)),k(e,"aria-expanded",`${!du||o}`),k(e,"autocomplete","off"),k(e,"role",ra(e)?null:"combobox")},uu=(t,e)=>{var o;const n=e.target instanceof HTMLInputElement;n&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&n&&e.target.list===t&&(t._input&&En(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,tu,vn((o=t._input.labels)==null?void 0:o[0])),re(t._root||t,oa,t),se(t,k(t._input,"inputmode")!=="none"),Zr())},fu=(t,e)=>{!Je&&!yn()&&t._input&&setTimeout(aa,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},aa=t=>{var e;const o=((e=t._root)==null?void 0:e.activeElement)||null,n=t._input;n&&n!==o&&!t.contains(o)&&(n.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o})),En(t))},pu=(t,{target:e})=>{var o;if(!t._input||t._input===e)return se(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),se(t,!1)),au(t._input,n.value);Je&&aa(t)},mu=(t,e)=>{var o;const{key:n,target:i,altKey:r,ctrlKey:a,shiftKey:l,metaKey:s}=e,c=n==="Escape"||n==="Esc";if(r||a||s||l||n==="Tab")return;c&&!t.hidden&&e?.preventDefault(),se(t,!c);const d=[...t.options].filter(h=>k(h,"aria-hidden")!=="true"&&h.offsetHeight),u=d.indexOf(i);let f=-1;if(n==="ArrowDown"&&(f=(u+1)%d.length),n==="ArrowUp"&&(f=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(f=0),(n==="End"||n==="PageDown")&&(f=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[f])for(const h of d)h.tabIndex=-1;d[f]&&e.preventDefault(),(o=d[f]||t._input)==null||o.focus(),!d[f]&&n==="ArrowUp"&&setTimeout(()=>{var h;return(h=t._input)==null?void 0:h.setSelectionRange(999,999)})},sa=(t,e)=>{const{_texts:o,_root:n,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",l=!t.hasAttribute("data-nofilter"),s=[],c=[];for(const f of r)(f.disabled||f.hidden||l&&!f.label.toLowerCase().includes(a)?s:c).push(f);for(const f of s)k(f,"aria-hidden","true");for(const f of c)k(f,"aria-hidden","false");const d=c.length;clearTimeout(ta),e?.type==="input"&&a!==t._value&&(ta=setTimeout(()=>{const f=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&Zr(f),t._value=a},1e3));let u=0;if(mn)for(const f of c)k(f,"title",`${++u} ${t._of} ${d}`)};ie&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Qr(this).getElementById(k(this,"list")||"")}}),Jr.define("u-datalist",ia),Q()&&!Jl()&&Zl();const hu="3.2.0",la="_alert_14zqc_1 _ds-alert_w6yvp_3",ca="_app_14zqc_1",da="_sticky_14zqc_1",ua="_avatar_14zqc_1 _ds-avatar_w6yvp_1",fa="_badge_14zqc_1",pa="_breadcrumbs_14zqc_1 _ds-breadcrumbs_w6yvp_5",ma="_button_14zqc_1 _ds-button_w6yvp_1",ha="_card_14zqc_1",va="_group_14zqc_1",ga="_chip_14zqc_1 _ds-chip_w6yvp_5",ba="_details_14zqc_1 _ds-details_w6yvp_3",ya="_dialog_14zqc_1 _ds-dialog_w6yvp_5",_a="__drawer_14zqc_1",wa="_divider_14zqc_1",Ea="_errorsummary_14zqc_1 _ds-error-summary_w6yvp_5",Sa="_field_14zqc_1 _ds-field_w6yvp_1",xa="_suggestion_14zqc_1 _ds-suggestion_w6yvp_5",$a="_affixes_14zqc_1 _ds-field-affixes_w6yvp_3",Ta="_fieldset_14zqc_1 _ds-fieldset_w6yvp_3",Ca="_fileupload_14zqc_1",Aa="_helptext_14zqc_1 _ds-focus_w6yvp_1",ka="_input_14zqc_1 _ds-input_w6yvp_1",La="_law_14zqc_1",Ia="_grid_14zqc_1",Ma="_flex_14zqc_1",Oa="_link_14zqc_1",Ra="_logo_14zqc_1",Da="__logo_14zqc_1",Pa="_pagination_14zqc_1 _ds-pagination_w6yvp_5",Ha="_popover_14zqc_1 _ds-popover_w6yvp_3",Na="_print_14zqc_1",Ba="_progress_14zqc_1",qa="__indeterminate_14zqc_1",Ua="_skeleton_14zqc_1 _ds-skeleton_w6yvp_5",Fa="__skeleton_14zqc_1",za="_spinner_14zqc_1",Va="_steps_14zqc_1",Wa="_table_14zqc_1 _ds-table_w6yvp_5",Ga="__scrollShadow_14zqc_1",ja="_tabs_14zqc_1 _ds-tabs_w6yvp_5",Ka="__scrollMask_14zqc_1",Xa="_tag_14zqc_1 _ds-tag_w6yvp_5",Ya="_toast_14zqc_1",Qa="__toastClose_14zqc_1",Ja="__toastOpen_14zqc_1",Za="__toastTimeout_14zqc_1",ts="_togglegroup_14zqc_1 _ds-toggle-group_w6yvp_5",es="__tooltip_14zqc_1 _ds-tooltip_w6yvp_5",os="_heading_14zqc_1 _ds-heading_w6yvp_1",ns="_ingress_14zqc_1",is="_muted_14zqc_1",rs="_info_14zqc_1",as="_prose_14zqc_1",ss="_validation_14zqc_1 _ds-validation-message_w6yvp_1",ls="_body_14zqc_162",cs="__checked_14zqc_1",L={alert:la,app:ca,sticky:da,avatar:ua,badge:fa,breadcrumbs:pa,button:ma,card:ha,group:va,chip:ga,details:ba,dialog:ya,_drawer:_a,divider:wa,errorsummary:Ea,field:Sa,suggestion:xa,affixes:$a,fieldset:Ta,fileupload:Ca,helptext:Aa,input:ka,law:La,grid:Ia,flex:Ma,link:Oa,logo:Ra,_logo:Da,pagination:Pa,popover:Ha,print:Na,progress:Ba,_indeterminate:qa,skeleton:Ua,_skeleton:Fa,spinner:za,steps:Va,table:Wa,_scrollShadow:Ga,tabs:ja,_scrollMask:Ka,tag:Xa,toast:Ya,_toastClose:Qa,_toastOpen:Ja,_toastTimeout:Za,togglegroup:ts,_tooltip:es,heading:os,ingress:ns,muted:is,info:rs,prose:as,validation:ss,body:ls,_checked:cs},vu=Object.freeze(Object.defineProperty({__proto__:null,_checked:cs,_drawer:_a,_indeterminate:qa,_logo:Da,_scrollMask:Ka,_scrollShadow:Ga,_skeleton:Fa,_toastClose:Qa,_toastOpen:Ja,_toastTimeout:Za,_tooltip:es,affixes:$a,alert:la,app:ca,avatar:ua,badge:fa,body:ls,breadcrumbs:pa,button:ma,card:ha,chip:ga,default:L,details:ba,dialog:ya,divider:wa,errorsummary:Ea,field:Sa,fieldset:Ta,fileupload:Ca,flex:Ma,grid:Ia,group:va,heading:os,helptext:Aa,info:rs,ingress:ns,input:ka,law:La,link:Oa,logo:Ra,muted:is,pagination:Pa,popover:Ha,print:Na,progress:Ba,prose:as,skeleton:Ua,spinner:za,steps:Va,sticky:da,suggestion:xa,table:Wa,tabs:ja,tag:Xa,toast:Ya,togglegroup:ts,validation:ss},Symbol.toStringTag,{value:"Module"}));function ds(t){var e,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(o=ds(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function gu(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=ds(t))&&(n&&(n+=" "),n+=e);return n}const le={capture:!0,passive:!0},j=()=>typeof window<"u"&&typeof document<"u",xt=t=>j()?document.getElementsByClassName(L[t].split(" ")[0]):[];function Wt(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const g=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),D=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>us(t,...e)},us=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},mt=(t,e)=>{if(!j())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?D(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},oo=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),n=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return a.observe(t,o),i(),r},O=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))g(n,i,r);return n},bu=typeof HTMLElement>"u"?class{}:HTMLElement,yu=(t,e)=>!j()||window.customElements.get(t)||window.customElements.define(t,e),_u=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,wu=(t,e)=>{if(!_u)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(O("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},Eu=`[data-command="toggle-app-expanded"],.${L.app.split(" ")[0]} > [command="show-modal"]`,Su=`.${L.breadcrumbs.split(" ")[0]}`,xu=`.${L.card.split(" ")[0]}`,fs=`.${L.chip.split(" ")[0]}`,$u=`.${L.helptext.split(" ")[0]}`,Tu=`.${L.pagination.split(" ")[0]}`,Cu='summary,u-summary,a,button,[role="tab"],[role="button"]',xn="mattilsynet.matomo.cloud",Au=["setCustomUrl","setDocumentTitle","setReferrerUrl"],K="mtds-analytics-banner",ku="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ps(t,e={}){if(j()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${xn}/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:o,enabled:n,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&Lu();const a=r?`https://cdn.matomo.cloud/${xn}/container_${r}.js`:`https://cdn.matomo.cloud/${xn}/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:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:r}=e,a=["trackEvent",o,n,i,r];let l=location.href;window._paq.push([function(){l=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",l.split("#")[0]]),window._paq.push(a.filter(s=>s!==void 0)),window._paq.push(["setCustomUrl",l])}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else if(t==="matomo"){const o=e;Au.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function Lu(){if(document.getElementById(K)||window.localStorage.getItem(K))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${K}" data-analytics="ignore"><style>
|
|
28
|
+
::slotted([role="option"][hidden]) { display: none !important }`,fu=du(Sn),ea,oa=0,pu=vn||Qe,na="click,focusout,input,keydown,mousedown,mouseup",ia="focus,focusin,blur,focusout",to={singular:"%d hit",plural:"%d hits"},ra=class extends Yr{constructor(){super(),this._texts=ou({},to),this._value="",this._of="/",au(this,Sn)}static get observedAttributes(){return["id",...Object.keys(to).map(e=>`data-sr-${e}`)]}connectedCallback(){this.hidden=!0,this._root=Jr(this),k(this,"role","listbox"),k(this,"tabindex","-1"),ie(this._root,"focusin",this),ie(this._root,"focus",this,!0),gn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Je(this._root||this,"focus",this,!0),Je(this._root||this,"focusin",this),gn(this,!1),xn(this),this._root=void 0}attributeChangedCallback(e,o,n){const i=e?.split("data-sr-")[1],r=`input[list="${this.id}"]`;if(to[i])this._texts[i]=n||to[i];else if(this._root){this._input&&$n(this,this._input);for(const a of this._root.querySelectorAll(r))$n(this,a)}}handleEvent(e){const{target:o,type:n}=e;e.defaultPrevented||(n==="click"&&vu(this,e),(n==="focus"||n==="focusin")&&mu(this,e),(n==="blur"||n==="focusout")&&hu(this,e),n==="keydown"&&gu(this,e),n==="mousedown"&&this.contains(o)&&wn(e),(n==="mutation"||n==="input")&&(clearTimeout(oa),oa=setTimeout(la,0,this,e)))}get options(){var e;if(!this._options){const o=(e=this.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options||this.getElementsByTagName("option")}},aa=t=>t?.disabled||t?.readOnly||!1,ae=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=aa(t?._input)||!e,(o=gn(t))==null||o.takeRecords();const r=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&$n(t,t._input,e),r&&k(t,"popover","manual"),r&&t.togglePopover(e),e&&la(t)},xn=t=>{t._input&&(Je(t._input||t,ia,t),Je(t._root||t,na,t),ae(t,!1),t._input=void 0)},$n=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",bn(t)),ie(e,ia,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",bn(t)),k(e,"aria-expanded",`${!pu||o}`),k(e,"autocomplete","off"),k(e,"role",aa(e)?null:"combobox")},mu=(t,e)=>{var o;const n=e.target instanceof HTMLInputElement;n&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&n&&e.target.list===t&&(t._input&&xn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,nu,bn((o=t._input.labels)==null?void 0:o[0])),ie(t._root||t,na,t),ae(t,k(t._input,"inputmode")!=="none"),ta())},hu=(t,e)=>{!Qe&&!wn()&&t._input&&setTimeout(sa,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},sa=t=>{var e;const o=((e=t._root)==null?void 0:e.activeElement)||null,n=t._input;n&&n!==o&&!t.contains(o)&&(n.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o})),xn(t))},vu=(t,{target:e})=>{var o;if(!t._input||t._input===e)return ae(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),ae(t,!1)),cu(t._input,n.value);Qe&&sa(t)},gu=(t,e)=>{var o;const{key:n,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:l}=e,c=n==="Escape"||n==="Esc";if(r||a||l||s||n==="Tab")return;c&&!t.hidden&&e?.preventDefault(),ae(t,!c);const d=[...t.options].filter(h=>k(h,"aria-hidden")!=="true"&&h.offsetHeight),u=d.indexOf(i);let f=-1;if(n==="ArrowDown"&&(f=(u+1)%d.length),n==="ArrowUp"&&(f=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(f=0),(n==="End"||n==="PageDown")&&(f=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[f])for(const h of d)h.tabIndex=-1;d[f]&&e.preventDefault(),(o=d[f]||t._input)==null||o.focus(),!d[f]&&n==="ArrowUp"&&setTimeout(()=>{var h;return(h=t._input)==null?void 0:h.setSelectionRange(999,999)})},la=(t,e)=>{const{_texts:o,_root:n,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),l=[],c=[];for(const f of r)(f.disabled||f.hidden||s&&!f.label.toLowerCase().includes(a)?l:c).push(f);for(const f of l)k(f,"aria-hidden","true");for(const f of c)k(f,"aria-hidden","false");const d=c.length;clearTimeout(ea),e?.type==="input"&&a!==t._value&&(ea=setTimeout(()=>{const f=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&ta(f),t._value=a},1e3));let u=0;if(vn)for(const f of c)k(f,"title",`${++u} ${t._of} ${d}`)};ne&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Jr(this).getElementById(k(this,"list")||"")}}),Zr.define("u-datalist",ra),Q()&&!ec()&&oc();const bu="3.2.2",ca="_alert_14zqc_1 _ds-alert_w6yvp_3",da="_app_14zqc_1",ua="_sticky_14zqc_1",fa="_avatar_14zqc_1 _ds-avatar_w6yvp_1",pa="_badge_14zqc_1",ma="_breadcrumbs_14zqc_1 _ds-breadcrumbs_w6yvp_5",ha="_button_14zqc_1 _ds-button_w6yvp_1",va="_card_14zqc_1",ga="_group_14zqc_1",ba="_chip_14zqc_1 _ds-chip_w6yvp_5",ya="_details_14zqc_1 _ds-details_w6yvp_3",_a="_dialog_14zqc_1 _ds-dialog_w6yvp_5",wa="__drawer_14zqc_1",Ea="_divider_14zqc_1",Sa="_errorsummary_14zqc_1 _ds-error-summary_w6yvp_5",xa="_field_14zqc_1 _ds-field_w6yvp_1",$a="_suggestion_14zqc_1 _ds-suggestion_w6yvp_5",Ta="_affixes_14zqc_1 _ds-field-affixes_w6yvp_3",Ca="_fieldset_14zqc_1 _ds-fieldset_w6yvp_3",Aa="_fileupload_14zqc_1",ka="_helptext_14zqc_1 _ds-focus_w6yvp_1",La="_input_14zqc_1 _ds-input_w6yvp_1",Ia="_law_14zqc_1",Ma="_grid_14zqc_1",Oa="_flex_14zqc_1",Ra="_link_14zqc_1",Da="_logo_14zqc_1",Pa="__logo_14zqc_1",Ha="_pagination_14zqc_1 _ds-pagination_w6yvp_5",Na="_popover_14zqc_1 _ds-popover_w6yvp_3",Ba="_print_14zqc_1",qa="_progress_14zqc_1",Ua="__indeterminate_14zqc_1",Fa="_skeleton_14zqc_1 _ds-skeleton_w6yvp_5",za="__skeleton_14zqc_1",Va="_spinner_14zqc_1",Wa="_steps_14zqc_1",Ga="_table_14zqc_1 _ds-table_w6yvp_5",ja="__scrollShadow_14zqc_1",Ka="_tabs_14zqc_1 _ds-tabs_w6yvp_5",Xa="__scrollMask_14zqc_1",Ya="_tag_14zqc_1 _ds-tag_w6yvp_5",Qa="_toast_14zqc_1",Ja="__toastClose_14zqc_1",Za="__toastOpen_14zqc_1",ts="__toastTimeout_14zqc_1",es="_togglegroup_14zqc_1 _ds-toggle-group_w6yvp_5",os="__tooltip_14zqc_1 _ds-tooltip_w6yvp_5",ns="_heading_14zqc_1 _ds-heading_w6yvp_1",is="_ingress_14zqc_1",rs="_muted_14zqc_1",as="_info_14zqc_1",ss="_prose_14zqc_1",ls="_validation_14zqc_1 _ds-validation-message_w6yvp_1",cs="_body_14zqc_162",ds="__checked_14zqc_1",L={alert:ca,app:da,sticky:ua,avatar:fa,badge:pa,breadcrumbs:ma,button:ha,card:va,group:ga,chip:ba,details:ya,dialog:_a,_drawer:wa,divider:Ea,errorsummary:Sa,field:xa,suggestion:$a,affixes:Ta,fieldset:Ca,fileupload:Aa,helptext:ka,input:La,law:Ia,grid:Ma,flex:Oa,link:Ra,logo:Da,_logo:Pa,pagination:Ha,popover:Na,print:Ba,progress:qa,_indeterminate:Ua,skeleton:Fa,_skeleton:za,spinner:Va,steps:Wa,table:Ga,_scrollShadow:ja,tabs:Ka,_scrollMask:Xa,tag:Ya,toast:Qa,_toastClose:Ja,_toastOpen:Za,_toastTimeout:ts,togglegroup:es,_tooltip:os,heading:ns,ingress:is,muted:rs,info:as,prose:ss,validation:ls,body:cs,_checked:ds},yu=Object.freeze(Object.defineProperty({__proto__:null,_checked:ds,_drawer:wa,_indeterminate:Ua,_logo:Pa,_scrollMask:Xa,_scrollShadow:ja,_skeleton:za,_toastClose:Ja,_toastOpen:Za,_toastTimeout:ts,_tooltip:os,affixes:Ta,alert:ca,app:da,avatar:fa,badge:pa,body:cs,breadcrumbs:ma,button:ha,card:va,chip:ba,default:L,details:ya,dialog:_a,divider:Ea,errorsummary:Sa,field:xa,fieldset:Ca,fileupload:Aa,flex:Oa,grid:Ma,group:ga,heading:ns,helptext:ka,info:as,ingress:is,input:La,law:Ia,link:Ra,logo:Da,muted:rs,pagination:Ha,popover:Na,print:Ba,progress:qa,prose:ss,skeleton:Fa,spinner:Va,steps:Wa,sticky:ua,suggestion:$a,table:Ga,tabs:Ka,tag:Ya,toast:Qa,togglegroup:es,validation:ls},Symbol.toStringTag,{value:"Module"}));function us(t){var e,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(o=us(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function _u(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=us(t))&&(n&&(n+=" "),n+=e);return n}const se={capture:!0,passive:!0},j=()=>typeof window<"u"&&typeof document<"u",$t=t=>j()?document.getElementsByClassName(L[t].split(" ")[0]):[];function Gt(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const g=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),D=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>fs(t,...e)},fs=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},mt=(t,e)=>{if(!j())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?D(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},eo=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),n=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return a.observe(t,o),i(),r},O=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))g(n,i,r);return n},wu=typeof HTMLElement>"u"?class{}:HTMLElement,Eu=(t,e)=>!j()||window.customElements.get(t)||window.customElements.define(t,e),Su=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,xu=(t,e)=>{if(!Su)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(O("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},$u=`[data-command="toggle-app-expanded"],.${L.app.split(" ")[0]} > [command="show-modal"]`,Tu=`.${L.breadcrumbs.split(" ")[0]}`,Cu=`.${L.card.split(" ")[0]}`,ps=`.${L.chip.split(" ")[0]}`,Au=`.${L.helptext.split(" ")[0]}`,ku=`.${L.pagination.split(" ")[0]}`,Lu='summary,u-summary,a,button,[role="tab"],[role="button"]',Tn="mattilsynet.matomo.cloud",Iu=["setCustomUrl","setDocumentTitle","setReferrerUrl"],K="mtds-analytics-banner",Mu="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ms(t,e={}){if(j()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Tn}/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:o,enabled:n,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&Ou();const a=r?`https://cdn.matomo.cloud/${Tn}/container_${r}.js`:`https://cdn.matomo.cloud/${Tn}/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:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:r}=e,a=["trackEvent",o,n,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(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else if(t==="matomo"){const o=e;Iu.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function Ou(){if(document.getElementById(K)||window.localStorage.getItem(K))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${K}" data-analytics="ignore"><style>
|
|
29
29
|
#${K}[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 }
|
|
30
30
|
#${K} 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 }
|
|
31
31
|
#${K} button:focus-visible { outline: 2px solid }
|
|
@@ -33,9 +33,9 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
33
33
|
#${K} button:active { background: #054449; scale: .9 }
|
|
34
34
|
#${K} p { margin: 0 .25em }
|
|
35
35
|
</style>
|
|
36
|
-
<p>Vi bruker <a href="${
|
|
36
|
+
<p>Vi bruker <a href="${Mu}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
|
|
37
37
|
<form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">×</button></form>
|
|
38
|
-
</dialog>`);const e=document.getElementById(K),o=()=>window.localStorage.setItem(K,"seen");e.addEventListener("close",o,{once:!0}),e.show()}function
|
|
38
|
+
</dialog>`);const e=document.getElementById(K),o=()=>window.localStorage.setItem(K,"seen");e.addEventListener("close",o,{once:!0}),e.show()}function Ru(t){window._mtdsTracking?.enabled&&setTimeout(Du,0,t)}function Du({type:t,target:e}){const o=t==="click"?e?.closest?.(Lu):e;if(!(o instanceof Element)||o.closest('[data-analytics="ignore"]'))return;let n="click",i="Button",r=hs(o)||Nu(o)||g(o,"data-tooltip")||"";if(t==="submit")i="Form",n="submit",r=r||document.title;else if(t==="toggle"){if(!o.matches("dialog:modal"))return;i="Dialog",n="open"}else if(t==="change"){const a=g(o,"type"),s=a==="checkbox"||a==="radio"?o.closest("fieldset"):null;i=o.closest(ps)?"Chip":"Form",n="change",r=hs(s||o)||le(s?.querySelector("legend"))||le(o?.labels?.[0])}else if(g(o,"role")==="tab")i="Tab",n="navigate";else if(g(o,"popovertarget")){if(!Pu(o)?.matches(":popover-open"))return;i=o.closest(Au)?"HelpText":"Popover",n="open"}else if(o.nodeName.endsWith("SUMMARY")){if(!o.parentElement.open)return;i="Details",n="open"}else if(o.matches($u)){const a=Hu(o,"--mtds-tooltip-position")==="none";i="Sidebar",n=a?"expand":"minimize",r=a&&g(o,"data-tooltip")||le(o)}else if(o.closest(Tu))i="Breadcrumbs",n="navigate";else if(o.closest(ku))i="Pagination",n="navigate";else if(o.closest(Cu))i="Card",n=o instanceof HTMLAnchorElement?"navigate":"click";else if(o.closest(ps))i="Chip",n=o.hasAttribute("data-removable")?"remove":"click";else if(o.closest("th[aria-sort]"))i="Table",n="sort";else if(o instanceof HTMLAnchorElement)i="Link",n=o.protocol==="mailto:"?"email":"navigate",o.hasAttribute("download")?n="download":o.hash&&o.href.startsWith(location.href.split("#")[0])&&(n="anchor");else if(o.hasAttribute("aria-expanded")){if(g(o,"aria-expanded")!=="true")return;i="Expand",n="open"}else o.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",n="open");ms("event",{category:g(o,"data-analytics-category")??i,action:g(o,"data-analytics-action")??n,name:g(o,"data-analytics-name")??r})}const le=t=>t?.textContent?.trim()||"",hs=t=>t&&g(t,"aria-label")||"",Pu=t=>document.getElementById(g(t,"popovertarget")||""),Hu=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Nu=t=>{const e=le(t),o=le(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(o)&&o||e.slice(0,100).trim()};mt("analytics",()=>[D(document,"click toggle submit change",Ru,se)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const Cn=L.app.split(" ")[0],Bu=`[data-command="toggle-app-expanded"],.${Cn} > [command="show-modal"]`,An=`.${Cn} > dialog,.${Cn} dialog ~ main`,vs=$t("sticky"),gs=t=>{document.startViewTransition?document.startViewTransition(t):t()},bs=t=>gs(()=>window.mtdsToggleAppExpanded?.(t));function qu(t){const{target:e,defaultPrevented:o}=t,n=e?.closest?.("a");if(n?.closest("dialog")&&n?.closest(An))return ys();if(o||!(e instanceof HTMLButtonElement)||!e.matches(Bu))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?bs():gs(()=>{const r=document.querySelector(An);r?.setAttribute("closedby","any"),r?.showModal()})}function ys(){document.querySelector(An)?.close()}let kn=0,jt,dt=0,Ln=0,oo=0,In=!1,Mn=0,Tt=0;function Uu(){if(!vs?.length)return;const t=vs[0],e=window.scrollY,o=e<Tt;Tt=e,o!==jt&&(kn=(t.parentElement?.getBoundingClientRect().top||0)+Tt,jt=o,Ln=t.offsetHeight,oo=t.getBoundingClientRect().top+Tt,In=t.offsetHeight<=window.innerHeight,Mn=window.innerHeight),!(dt===-1&&In)&&(dt!==-1&&(In||jt&&Tt<=oo)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),dt=-1):dt===-1&&!jt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,Tt-kn)}px`),dt=0):dt!==1&&!jt&&Tt+Mn>=oo+Ln?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Mn-Ln}px`),dt=1):dt===1&&jt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${oo-kn}px`),dt=0))}mt("app",()=>[D(document,"click",qu,!0),D(window,"resize",Gt(ys,100),se),D(window,"scroll",Uu,se)]);const Fu=/<[^>]+\bid="([^"]+)[^>]+>/gi,_s=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,zu=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Vu=/kapittel-\d+-ledd-\d+/,Wu=/<button[^>]+>.*?<\/button>/g,Gu=/►m\d+/i,no=/<[^>]+>/g,ju=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Ku=/<(\/?)(article|footer|section)/gi,Xu=/(src|href)="([^"]+)"/gi,Yu=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Qu=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Ju=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ws="https://lovdata.no/",Zu="https://www.mattilsynet.no/regelveiledning/?regelverk=",tf={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},On=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),ef=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),of=(t,e)=>{const o=On(t);e?.querySelectorAll("button").forEach(n=>{o.includes(n.value)&&g(n,"aria-checked",`${g(n,"aria-checked")!=="true"}`)})},nf=(t,e)=>{const o=On(t);e?.querySelectorAll("button").forEach(n=>{g(n,"aria-checked",`${o.includes(n.value)||!1}`)})},rf=(t,e)=>{const o=Es(e);return On(t).map(n=>sf(n,o)).filter(n=>!!n)},af=t=>{const e=t.slice(0,t.indexOf("</dl>")),o={...tf};for(const n of e.matchAll(ju)){const i=n[2].replace(/-/g,"").toLowerCase();o[i]={label:n[3],value:n[4]}}return o},Es=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Ku,"<$1div").replace(Yu,"$1$2$3").replace(Xu,(e,o,n)=>`${o}="${n.includes(":")?"":ws}${n}" ${o==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Ju,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span><div class="legalP" id="${Ct("id",o)}-ledd-0">${i}</div>`).replace(Qu,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span>${i}`).replace(Fu,(e,o,n,i)=>{const r=Ss(e,o,n,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${o}"></button>`:""}`}):t,sf=(t,e)=>{const o=Vu.test(t),n=t.split("-").map((c,d,u)=>d%2?lf(u.slice(0,d+1).join("-"),e,o):null).filter(c=>!!c);if(!n.length)return null;const i=n.filter(({guideUrl:c})=>c).pop()?.guideUrl,r=n.filter(({url:c})=>c).pop(),a=n.filter(c=>c.className==="section"&&_s.test(c.label)).pop(),s=r?`${ws}${r.url}`:"",l=n.slice(n.indexOf(a||n[0])).map(({label:c})=>c).join(", ");return{...n.slice(-1)[0],path:n,label:l,url:s,guideUrl:i}},lf=(t,e,o)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(n,e.indexOf(">",n)+1),r=Ct("class",i),a=Ct("data-lovdata-url",i),s=Ss(i,t,n,e),[l,c,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${c?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${Zu}${u}_${t}`,html:cf(t,e),url:a,label:!o&&r==="section"&&s?.match(_s)?.[0]||s}},Ct=(t,e)=>{const o=` ${t.toLowerCase()}="`,n=e.toLowerCase().indexOf(o),i=n+o.length;return n===-1?"":e.slice(i,e.indexOf('"',i))},cf=(t,e)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),n=e.length;let i=o+1,r=0;for(;i&&i<n;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(o,a).replace(Wu,""):""},Ss=(t,e,o,n)=>df[Ct("class",t)]?.(t,e,o,n)||"",df={numberedLegalP:t=>`nr. ${Ct("data-numerator",t)}.`,section:(t,e,o,n)=>n.slice(o).match(zu)?.[2]?.replace(no,"")?.replace(Gu,"").trim()||"",legalArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("legalArticleValue",o));return n.slice(i+1,n.indexOf("</span>",i)).replace(no,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[o,n,i,r]=e.split("-").reverse();return`avsnitt ${(n==="nummer"?1:Number(o))+(r==="nummer"?1:0)}`},listArticle:(t,e,o,n)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=n.lastIndexOf(r,o),s=n.slice(n.indexOf("<ol",a),o),l=Ct("data-name",t)||"-",c=Ct("type",s)||"-";let d="punkt";return c==="1"&&(d="tall"),c==="a"&&(d="bokstav"),c==="i"&&(d="romtertall"),`${d} ${l==="-"?i.pop():l.replace(no,"")}`},marginIdArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("data-marginOriginalId",o));return`nr. ${n.slice(i+1,n.indexOf("</span>",i)).replace(no,"")}`}};function N(t,e={}){const o=document.getElementById(e.id||"")||O("dialog");return g(o,"aria-busy",e.busy?"true":null),g(o,"class",_u(L.toast,e.className)),g(o,"closedby",e.closedby||null),g(o,"data-color",e.color||null),g(o,"data-icon",`${e.icon??""}`||null),g(o,"data-timeout",`${e.timeout??""}`||null),g(o,"id",e.id||`${Date.now()}`),g(o,"open",e.open===!1?null:""),o.innerHTML=t,D(o,"animationend",uf,{once:!0}),document.body.appendChild(o),o.id}function uf({animationName:t,target:e}){t===L._toastClose&&e.remove()}N.success=(t,e)=>N(t,{color:"success",...e}),N.danger=(t,e)=>N(t,{color:"danger",...e}),N.info=(t,e)=>N(t,{color:"info",...e}),N.warning=(t,e)=>N(t,{color:"warning",...e}),N.neutral=(t,e)=>N(t,{color:"neutral",...e}),N.promise=async function(e,o){const{loading:n,success:i,error:r,...a}=o,s=N(n,{busy:!0,...a});try{const l=await e();return N.success(i,{id:s,busy:!1}),l}catch(l){throw N.danger(r,{id:s,busy:!1}),l}};const ff=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
39
39
|
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
40
40
|
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
41
41
|
|
|
@@ -202,11 +202,11 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
202
202
|
vertical-align: middle;
|
|
203
203
|
width: var(--mtds-5);
|
|
204
204
|
}
|
|
205
|
-
`,df=[.1,.2,.25,.5,1];function uf(t,{aspect:e,type:o}){const i=o==="stacked",r=t[0].reduce((p,m,v)=>{const b=t.map(_=>_[v].number),w=b.reduce((_,E)=>_+E,0);return Math.max(p,...i?[w]:b)},0),a=r/10,l=10**`${Math.round(a)}`.length,s=a/l,c=(df.find(p=>p>s)||1)*l,d=Math.ceil(r/c)*c,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 f=u.appendChild(O("div",{class:"axisSteps"})),h=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(p,m)=>ff(c*m)).reverse().map(p=>f.append(O("div",{class:"axisStep","data-label":p}))),{total:d,groups:h,axis:u}}const ff=new Intl.NumberFormat().format;function pf(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[n+1]).map(({tooltip:a,color:l,number:s})=>{const c=O("div",{"aria-label":a,"data-event":o,class:"bar",role:"img",tabindex:"0"});return c.style.setProperty("--color",l),c.style.setProperty("--value",`${s}`),r.appendChild(c)}),i})}function mf(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const l=O("div",{class:"lineContainer",role:"list"});l.style.setProperty("--color",a[0].color);const s=hf(a.map(({number:u},f,{length:h})=>[100/(h-1)*f,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");g(c,"aria-hidden","true"),g(c,"preserveAspectRatio","none"),g(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(g(d,"class","line"),g(d,"d",s),g(d,"fill","none"),g(d,"stroke","currentColor"),n==="area"){const u=d.cloneNode(!0);g(u,"d",`M-100,100 L${s.slice(1)}L200,100`),g(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:f,event:h})=>{const p=O("div",{role:"listitem"}),m=O("div",{"aria-label":f,"data-event":h,tabindex:"0",class:"linePoint",role:"img"});m.style.setProperty("--value",`${u}`),p.appendChild(m),l.append(p)}),l.appendChild(c).append(d),r.append(l)}),r}const hf=(t,e)=>t.map(([o,n],i,r)=>i?vf(i,r,e):`M${o},${n}`).join(" "),Ss=([t,e],[o,n])=>[t+o,e+n],xs=([t,e],[o,n])=>[t-o,e-n],$s=(t,[e,o])=>[t*e,t*o],vf=(t,e,o)=>{const n=e[t-1],i=e[t],[r,a]=Ss(n,$s(o,xs(i,e[t-2]||n))),[l,s]=Ss(i,$s(o,xs(n,e[t+1]||i)));return`C ${r},${a} ${l},${s} ${i[0]},${i[1]}`};function gf(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),g(n,"class","pie"),g(n,"viewBox","0 0 100 100");let i=0;const r=50,a=o==="doughnut"?25:0,l=t.slice(1).reduce((s,[,c])=>s+c.number,0);return t.slice(1).forEach(([,{tooltip:s,number:c,event:d,color:u}])=>{if(!c)return;const f=document.createElementNS("http://www.w3.org/2000/svg","path"),h=i/l;i+=c;const p=Math.min(i/l,.99999),m=p-h>.5?1:0,v=2*Math.PI*(h-.25),b=2*Math.PI*(p-.25),w=Math.cos(v),_=Math.sin(v),E=Math.cos(b),A=Math.sin(b),C=`M ${r+a*w} ${r+a*_} L ${r+r*w} ${r+r*_} A ${r} ${r} 0 ${m} 1 ${r+r*E} ${r+r*A} L ${r+a*E} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*_}`;f.style.setProperty("--color",u),g(f,"aria-label",s),g(f,"data-event",d),g(f,"d",C),g(f,"role","img"),g(f,"tabindex","0"),n.appendChild(f)}),n}const Ts="click keydown mousemove mouseout",Cs="mtds-chart-tooltip",ht=j()?document.getElementById(Cs)||O("div",{"aria-hidden":"true",class:L._tooltip,hidden:"",id:Cs}):null;class bf extends bu{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Wt(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=oo(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),D(this,Ts,this)}disconnectedCallback(){ht&&(ht.hidden=!0),us(this,Ts,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=wf(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(c=>c.remove());const[o,n]=(g(this,"data-variant")||"column").split("-"),i=g(this,"data-aspect")||void 0,r=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:c,color:d}])=>{const u=O("div",{class:"legend"},c);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:l,total:s}=uf(e,{aspect:i,type:n});(o==="column"||o==="bar")&&l.append(...pf(e)),(o==="line"||o==="area")&&l.append(mf(e,{total:s,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(gf(e,{aspect:i,variant:o})),this.shadowRoot?.append(a,r),wu(this,cf)}handleEvent(e){e.type==="click"||e.type==="keydown"?yf(e,this):_f(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,o=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(o?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(o?.offsetWidth||0)<500)}}function yf(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,r]=o instanceof Element&&g(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let As="";function _f(t){if(!ht)return;ht?.isConnected||document.body.append(ht);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(ht.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==As&&(o&&(ht.textContent=o),As=o,ht.hidden=!o)}const Mn=t=>t?.textContent?.trim()||"",wf=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,r)=>{const a=Mn(e.cells[0]),l=Mn(t?.rows[0].cells[r]),s=Mn(i),c=n===2?`${l}: ${s}`:`${a}: ${s}${l?` (${l})`:""}`;return g(i,"tabindex","-1"),{number:r&&o&&Number.parseFloat(s)||0,event:i.querySelector("a,button")&&`${o}-${r}`,color:`var(--mtdsc-chart-color-${o}-${r}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:s,tooltip:g(i,"data-tooltip")||c}}));yu("mtds-chart",bf);const ks=new WeakSet,B=t=>!ks.has(t)&&ks.add(t),P=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),Ef=xt("togglegroup"),Ls=L.button.split(" "),Sf=()=>{for(const t of Ef){B(t)&&!t.hasAttribute("data-toggle-group")&&(g(t,"data-toggle-group","Valgknapper"),P('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))B(e)&&!e.classList.contains(Ls[0])&&(e.classList.add(...Ls),P('Only setting class="styles.button"','<label class="styles.button">',e))}},xf=xt("breadcrumbs"),$f=()=>{for(const t of xf)B(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...L.breadcrumbs.split(" ")),P('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},Tf=xt("errorsummary"),Cf=()=>{for(const t of Tf)B(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&P('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},Af=xt("dialog"),Is=()=>{for(const t of Af){if(B(t)){const e=g(t,"data-closedby");e&&(g(t,"closedby",e),P(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&P('<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)')?(P('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),g(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(g(t,"open",""),t.close()))}},kf=()=>{for(const t of document.querySelectorAll("[data-count]"))if(B(t)){const e=g(t,"data-count");t.classList.add(...L.validation.split(" ")),g(t,"data-limit",e),P(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Lf=()=>{for(const t of document.querySelectorAll("[data-command]"))if(B(t)){const e=g(t,"data-command");e==="row"?P(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):P(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},If=j()?document.getElementsByTagName("u-tabs"):[],Mf=()=>{for(const t of If)B(t)&&P("u-tabs","ds-tabs",t)},On=L.suggestion.split(" "),Of=j()?document.getElementsByTagName("u-combobox"):[],Rf=j()?document.getElementsByTagName("ds-suggestion"):[],Df=()=>{for(const t of Of)B(t)&&(t.classList.add(...On),P("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Rf)B(t)&&!t.classList.contains(On[0])&&(t.classList.add(...On),P("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Pf=({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 n=t?.closest("dialog");n&&t?.closest('[data-command="close"]')&&n.close()},Hf=xt("field"),ro=new Set,Nf=()=>{for(const t of Hf)t.nodeName!=="DS-FIELD"&&(B(t)||P('Only setting class="styles.field"','<ds-field class="styles.field">',t),!ro.has(t)&&ro.add(t)&&Ue.prototype.connectedCallback.call(t))},Bf=()=>{for(const t of ro)Ue.prototype.disconnectedCallback.call(t),ro.delete(t)},qf=`[data-description], .${L.field.split(" ")[0]} label + p`,Uf=()=>{for(const t of document.querySelectorAll(qf))B(t)&&t.getAttribute("data-field")!=="description"&&(g(t,"data-field","description"),P("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Ff=xt("validation"),zf=()=>{for(const t of Ff)B(t)&&!t.hasAttribute("data-field")&&(g(t,"data-field","validation"),P('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Vf=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))B(t)&&(g(t,"data-placement",g(t,"data-position")),P("data-position","data-placement",t))},Wf=Wt(()=>{kf(),Lf(),$f(),Is(),Cf(),Uf(),zf(),Vf(),Nf(),Sf(),Df(),Mf()},200);mt("deprecations",()=>[Bf,D(document,"click",Pf,le),D(document,"toggle",Is,!0),oo(document,Wf,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Gf=Wt(t=>{if(t.animationName!==L._logo)return;const e=t.target.closest?.(`.${L.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const s of document.head.querySelectorAll("link[rel~='icon']"))s.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),l=o.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='${n?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${l}</g></svg>`)}`,rel:"icon"}))}},200);mt("logo",()=>[D(document,"animationend",Gf)]);const jf=L.popover.split(" ")[0];function Kf({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&g(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(jf)&&e){const r=g(e,"popovertargetaction"),a=r==="show"||(r==="hide"?!1:void 0);if(o&&!r&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(a)}}mt("popover",()=>[D(document,"click",Kf)]);const Xf=j()?document.getElementsByTagName("table"):[],Yf=()=>{for(const t of Xf){const e=Array.from(t.tHead?.rows[0]?.cells||[],o=>o.innerText.trim());for(const o of t.tBodies)for(const n of o.rows)for(const i of n.cells)g(i,"data-th",e[i.cellIndex]||":empty")}};mt("table",()=>[oo(document,Wt(Yf,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const Ms=L.toast.split(" ")[0],ao="data-sort";function Qf({animationName:t,target:e}){const o=e;if(t===L._toastTimeout&&o.close(),t!==L._toastOpen)return;const n=Number(g(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(ao)||g(o,ao,`${Date.now()}`),g(o,"tabindex","0"),[...document.querySelectorAll(`.${Ms}[open]`)].sort((i,r)=>Number(g(r,ao))-Number(g(i,ao))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Jf({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(Ms)&&g(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=n.top+Number.parseInt(i.paddingTop,10),l=a+Number.parseInt(r.height,10),s=n.right-Number.parseInt(i.paddingRight,10),c=s-Number.parseInt(r.width,10);a<=o&&o<=l&&c<=e&&e<=s&&t.close()}}mt("toast",()=>[D(document,"animationstart",Qf),D(document,"click",Jf)]),j()&&ir(document.getElementById("mtds-tooltip")||O("div",{class:L._tooltip,id:"mtds-tooltip",popover:"manual"}));const Rn=`.${L.field.split(" ")[0]}`,Zf=`${Rn} :is(input,textarea,select)`,tp="ds-suggestion,u-combobox",ep=L.validation.split(" ")[0],so=t=>t instanceof HTMLFormElement&&g(t,"data-validation")==="form",Dn=t=>t.closest(Rn),Pn=t=>t?.querySelectorAll(Zf)||[],lo=t=>t?.getElementsByClassName(ep)||[],Os=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||g(t,"aria-readonly")==="true"||g(t,"aria-disabled")==="true",o=t.closest(tp)?.items,n=g(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Rs=t=>{const e=t.target?.form||t.target;let o;if(so(e)){for(const n of e.querySelectorAll(Rn)){const i=[...Pn(n)].find(Os);!o&&i&&(o=i);for(const r of lo(n))g(r,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...Pn(n)].some(Os);for(const r of lo(n))Dn(r)||g(r,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},op=({target:t})=>{const e=t;if(!so(e.form))for(const o of lo(e.closest("fieldset")||Dn(e)))g(o,"hidden","")},np=t=>so(t.target.form)&&t?.preventDefault(),ip=j()?lo(document):[],rp=()=>{for(const t of ip)if(!t.hasAttribute("data-validation")){const e=Pn(Dn(t))[0];g(t,"data-validation","form"),so(e?.form)&&g(t,"hidden","")}};mt("validations",()=>[D(document,"input comboboxbeforeselect",op,!0),D(document,"invalid",np,!0),D(document,"invalid",Wt(Rs,10),le),D(document,"submit",Rs,!0),oo(document,rp,{childList:!0,subtree:!0})]);var ap=Object.defineProperty,Ds=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,Ps=(t,e,o)=>e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,cp=(t,e)=>{for(var o in e||(e={}))sp.call(e,o)&&Ps(t,o,e[o]);if(Ds)for(var o of Ds(e))lp.call(e,o)&&Ps(t,o,e[o]);return t},co=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",uo=co(),Hn=uo?navigator.userAgent:"",fo=/android/i.test(Hn),dp=/firefox/i.test(Hn),up=/iPad|iPhone|iPod/.test(Hn),Hs,fp=uo&&/^Mac/i.test(((Hs=navigator.userAgentData)==null?void 0:Hs.platform)||navigator.platform),pp=uo&&window.CSSStyleSheet&&document.adoptedStyleSheets,mp={once:!0,capture:!0,passive:!0},hp=":host(:not([hidden])) { display: block }",vp="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",gp=`${fo?"data":"aria"}-multiselectable`,Ns=typeof HTMLElement>"u"?class{}:HTMLElement,T=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Nn=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>po(t,...e)},po=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},bp=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(qn("slot")),!o.querySelector("style"))if(!pp)o.append(qn("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},yp=(t,e,o)=>{const n=new MutationObserver(r=>{if(!co()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},Bn=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},de=t=>{if(!t||!uo)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},qn=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))T(n,i,r);return n},Bs={define:(t,e)=>!co()||window.customElements.get(t)||window.customElements.define(t,e)},_p=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Un=!1,Fn=t=>(t?.type==="pointerup"&&(Un=!1),t?.type==="pointerdown"&&(Un=!0,Nn(document,"pointerup",Fn,mp)),Un),wp=t=>{const e=T(t,"form");T(t,"form","#"),setTimeout(Ep,0,t,e)},Ep=(t,e)=>T(t,"form",e),ot,Sp=0,qs=0,zn=t=>{clearTimeout(qs),ot||(ot=qn("div",{"aria-live":"assertive"}),ot.style.overflow="hidden",ot.style.position="fixed",ot.style.whiteSpace="nowrap",ot.style.width="1px"),ot.isConnected||document.body.append(ot),t===""&&(ot.textContent=""),t&&(ot.textContent=`${t}${Sp++%2?" ":""}`,qs=setTimeout(zn,!fp&&dp?2e3:300,""))},Vn="disabled",ue="selected",Wn=!1,xp=class extends Ns{static get observedAttributes(){return["id",Vn,ue]}connectedCallback(){fo&&(this.tabIndex=-1),this.hasAttribute("role")||T(this,"role","option"),T(this,"aria-disabled",`${this.disabled}`),T(this,"aria-selected",`${this.selected}`),de(this)}attributeChangedCallback(t){Wn||(Wn=!0,t==="id"?de(this):T(this,`aria-${t}`,`${this[t]}`),Wn=!1)}get defaultSelected(){return this[ue]}set defaultSelected(t){this[ue]=t}get disabled(){return T(this,Vn)!==null}set disabled(t){T(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=T(this,"label"))!=null?t:this.text}set label(t){T(this,"label",t)}get selected(){return T(this,ue)!==null}set selected(t){T(this,ue,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=T(this,"value"))!=null?t:this.text}set value(t){T(this,"value",t)}};Bs.define("u-option",xp);var Us="data-activedescendant",mo="aria-hidden",$p=`${hp}
|
|
205
|
+
`,pf=[.1,.2,.25,.5,1];function mf(t,{aspect:e,type:o}){const i=o==="stacked",r=t[0].reduce((p,m,v)=>{const b=t.map(_=>_[v].number),w=b.reduce((_,E)=>_+E,0);return Math.max(p,...i?[w]:b)},0),a=r/10,s=10**`${Math.round(a)}`.length,l=a/s,c=(pf.find(p=>p>l)||1)*s,d=Math.ceil(r/c)*c,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 f=u.appendChild(O("div",{class:"axisSteps"})),h=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(p,m)=>hf(c*m)).reverse().map(p=>f.append(O("div",{class:"axisStep","data-label":p}))),{total:d,groups:h,axis:u}}const hf=new Intl.NumberFormat().format;function vf(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[n+1]).map(({tooltip:a,color:s,number:l})=>{const c=O("div",{"aria-label":a,"data-event":o,class:"bar",role:"img",tabindex:"0"});return c.style.setProperty("--color",s),c.style.setProperty("--value",`${l}`),r.appendChild(c)}),i})}function gf(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"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 l=bf(a.map(({number:u},f,{length:h})=>[100/(h-1)*f,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");g(c,"aria-hidden","true"),g(c,"preserveAspectRatio","none"),g(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(g(d,"class","line"),g(d,"d",l),g(d,"fill","none"),g(d,"stroke","currentColor"),n==="area"){const u=d.cloneNode(!0);g(u,"d",`M-100,100 L${l.slice(1)}L200,100`),g(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:f,event:h})=>{const p=O("div",{role:"listitem"}),m=O("div",{"aria-label":f,"data-event":h,tabindex:"0",class:"linePoint",role:"img"});m.style.setProperty("--value",`${u}`),p.appendChild(m),s.append(p)}),s.appendChild(c).append(d),r.append(s)}),r}const bf=(t,e)=>t.map(([o,n],i,r)=>i?yf(i,r,e):`M${o},${n}`).join(" "),xs=([t,e],[o,n])=>[t+o,e+n],$s=([t,e],[o,n])=>[t-o,e-n],Ts=(t,[e,o])=>[t*e,t*o],yf=(t,e,o)=>{const n=e[t-1],i=e[t],[r,a]=xs(n,Ts(o,$s(i,e[t-2]||n))),[s,l]=xs(i,Ts(o,$s(n,e[t+1]||i)));return`C ${r},${a} ${s},${l} ${i[0]},${i[1]}`};function _f(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),g(n,"class","pie"),g(n,"viewBox","0 0 100 100");let i=0;const r=50,a=o==="doughnut"?25:0,s=t.slice(1).reduce((l,[,c])=>l+c.number,0);return t.slice(1).forEach(([,{tooltip:l,number:c,event:d,color:u}])=>{if(!c)return;const f=document.createElementNS("http://www.w3.org/2000/svg","path"),h=i/s;i+=c;const p=Math.min(i/s,.99999),m=p-h>.5?1:0,v=2*Math.PI*(h-.25),b=2*Math.PI*(p-.25),w=Math.cos(v),_=Math.sin(v),E=Math.cos(b),A=Math.sin(b),C=`M ${r+a*w} ${r+a*_} L ${r+r*w} ${r+r*_} A ${r} ${r} 0 ${m} 1 ${r+r*E} ${r+r*A} L ${r+a*E} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*_}`;f.style.setProperty("--color",u),g(f,"aria-label",l),g(f,"data-event",d),g(f,"d",C),g(f,"role","img"),g(f,"tabindex","0"),n.appendChild(f)}),n}const Cs="click keydown mousemove mouseout",As="mtds-chart-tooltip",ht=j()?document.getElementById(As)||O("div",{"aria-hidden":"true",class:L._tooltip,hidden:"",id:As}):null;class wf extends wu{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Gt(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=eo(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),D(this,Cs,this)}disconnectedCallback(){ht&&(ht.hidden=!0),fs(this,Cs,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=xf(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(c=>c.remove());const[o,n]=(g(this,"data-variant")||"column").split("-"),i=g(this,"data-aspect")||void 0,r=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:c,color:d}])=>{const u=O("div",{class:"legend"},c);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:s,total:l}=mf(e,{aspect:i,type:n});(o==="column"||o==="bar")&&s.append(...vf(e)),(o==="line"||o==="area")&&s.append(gf(e,{total:l,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(_f(e,{aspect:i,variant:o})),this.shadowRoot?.append(a,r),xu(this,ff)}handleEvent(e){e.type==="click"||e.type==="keydown"?Ef(e,this):Sf(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,o=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(o?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(o?.offsetWidth||0)<500)}}function Ef(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,r]=o instanceof Element&&g(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let ks="";function Sf(t){if(!ht)return;ht?.isConnected||document.body.append(ht);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(ht.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==ks&&(o&&(ht.textContent=o),ks=o,ht.hidden=!o)}const Rn=t=>t?.textContent?.trim()||"",xf=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,r)=>{const a=Rn(e.cells[0]),s=Rn(t?.rows[0].cells[r]),l=Rn(i),c=n===2?`${s}: ${l}`:`${a}: ${l}${s?` (${s})`:""}`;return g(i,"tabindex","-1"),{number:r&&o&&Number.parseFloat(l)||0,event:i.querySelector("a,button")&&`${o}-${r}`,color:`var(--mtdsc-chart-color-${o}-${r}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:l,tooltip:g(i,"data-tooltip")||c}}));Eu("mtds-chart",wf);const Ls=new WeakSet,B=t=>!Ls.has(t)&&Ls.add(t),P=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),$f=$t("togglegroup"),Is=L.button.split(" "),Tf=()=>{for(const t of $f){B(t)&&!t.hasAttribute("data-toggle-group")&&(g(t,"data-toggle-group","Valgknapper"),P('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))B(e)&&!e.classList.contains(Is[0])&&(e.classList.add(...Is),P('Only setting class="styles.button"','<label class="styles.button">',e))}},Cf=$t("breadcrumbs"),Af=()=>{for(const t of Cf)B(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...L.breadcrumbs.split(" ")),P('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},kf=$t("errorsummary"),Lf=()=>{for(const t of kf)B(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&P('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},If=$t("dialog"),Ms=()=>{for(const t of If){if(B(t)){const e=g(t,"data-closedby");e&&(g(t,"closedby",e),P(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&P('<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)')?(P('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),g(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(g(t,"open",""),t.close()))}},Mf=()=>{for(const t of document.querySelectorAll("[data-count]"))if(B(t)){const e=g(t,"data-count");t.classList.add(...L.validation.split(" ")),g(t,"data-limit",e),P(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Of=()=>{for(const t of document.querySelectorAll("[data-command]"))if(B(t)){const e=g(t,"data-command");e==="row"?P(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):P(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},Rf=j()?document.getElementsByTagName("u-tabs"):[],Df=()=>{for(const t of Rf)B(t)&&P("u-tabs","ds-tabs",t)},Dn=L.suggestion.split(" "),Pf=j()?document.getElementsByTagName("u-combobox"):[],Hf=j()?document.getElementsByTagName("ds-suggestion"):[],Nf=()=>{for(const t of Pf)B(t)&&(t.classList.add(...Dn),P("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Hf)B(t)&&!t.classList.contains(Dn[0])&&(t.classList.add(...Dn),P("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Bf=({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 n=t?.closest("dialog");n&&t?.closest('[data-command="close"]')&&n.close()},qf=$t("field"),io=new Set,Uf=()=>{for(const t of qf)t.nodeName!=="DS-FIELD"&&(B(t)||P('Only setting class="styles.field"','<ds-field class="styles.field">',t),!io.has(t)&&io.add(t)&&qe.prototype.connectedCallback.call(t))},Ff=()=>{for(const t of io)qe.prototype.disconnectedCallback.call(t),io.delete(t)},zf=`[data-description], .${L.field.split(" ")[0]} label + p`,Vf=()=>{for(const t of document.querySelectorAll(zf))B(t)&&t.getAttribute("data-field")!=="description"&&(g(t,"data-field","description"),P("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Wf=$t("validation"),Gf=()=>{for(const t of Wf)B(t)&&!t.hasAttribute("data-field")&&(g(t,"data-field","validation"),P('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},jf=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))B(t)&&(g(t,"data-placement",g(t,"data-position")),P("data-position","data-placement",t))},Kf=Gt(()=>{Mf(),Of(),Af(),Ms(),Lf(),Vf(),Gf(),jf(),Uf(),Tf(),Nf(),Df()},200);mt("deprecations",()=>[Ff,D(document,"click",Bf,se),D(document,"toggle",Ms,!0),eo(document,Kf,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Xf=Gt(t=>{if(t.animationName!==L._logo)return;const e=t.target.closest?.(`.${L.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const l of document.head.querySelectorAll("link[rel~='icon']"))l.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=o.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='${n?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${s}</g></svg>`)}`,rel:"icon"}))}},200);mt("logo",()=>[D(document,"animationend",Xf)]);const Yf=L.popover.split(" ")[0];function Qf({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&g(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(Yf)&&e){const r=g(e,"popovertargetaction"),a=r==="show"||(r==="hide"?!1:void 0);if(o&&!r&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(a)}}mt("popover",()=>[D(document,"click",Qf)]);const Jf=j()?document.getElementsByTagName("table"):[],Zf=()=>{for(const t of Jf){const e=Array.from(t.tHead?.rows[0]?.cells||[],o=>o.innerText.trim());for(const o of t.tBodies)for(const n of o.rows)for(const i of n.cells)g(i,"data-th",e[i.cellIndex]||":empty")}};mt("table",()=>[eo(document,Gt(Zf,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const Os=L.toast.split(" ")[0],ro="data-sort";function tp({animationName:t,target:e}){const o=e;if(t===L._toastTimeout&&o.close(),t!==L._toastOpen)return;const n=Number(g(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(ro)||g(o,ro,`${Date.now()}`),g(o,"tabindex","0"),[...document.querySelectorAll(`.${Os}[open]`)].sort((i,r)=>Number(g(r,ro))-Number(g(i,ro))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function ep({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(Os)&&g(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=n.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),l=n.right-Number.parseInt(i.paddingRight,10),c=l-Number.parseInt(r.width,10);a<=o&&o<=s&&c<=e&&e<=l&&t.close()}}mt("toast",()=>[D(document,"animationstart",tp),D(document,"click",ep)]),j()&&rr(document.getElementById("mtds-tooltip")||O("div",{class:L._tooltip,id:"mtds-tooltip",popover:"manual"}));const Pn=`.${L.field.split(" ")[0]}`,op=`${Pn} :is(input,textarea,select)`,np="ds-suggestion,u-combobox",ip=L.validation.split(" ")[0],ao=t=>t instanceof HTMLFormElement&&g(t,"data-validation")==="form",Hn=t=>t.closest(Pn),Nn=t=>t?.querySelectorAll(op)||[],so=t=>t?.getElementsByClassName(ip)||[],Rs=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||g(t,"aria-readonly")==="true"||g(t,"aria-disabled")==="true",o=t.closest(np)?.items,n=g(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Ds=t=>{const e=t.target?.form||t.target;let o;if(ao(e)){for(const n of e.querySelectorAll(Pn)){const i=[...Nn(n)].find(Rs);!o&&i&&(o=i);for(const r of so(n))g(r,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...Nn(n)].some(Rs);for(const r of so(n))Hn(r)||g(r,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},rp=({target:t})=>{const e=t;if(!ao(e.form))for(const o of so(e.closest("fieldset")||Hn(e)))g(o,"hidden","")},ap=t=>ao(t.target.form)&&t?.preventDefault(),sp=j()?so(document):[],lp=()=>{for(const t of sp)if(!t.hasAttribute("data-validation")){const e=Nn(Hn(t))[0];g(t,"data-validation","form"),ao(e?.form)&&g(t,"hidden","")}};mt("validations",()=>[D(document,"input comboboxbeforeselect",rp,!0),D(document,"invalid",ap,!0),D(document,"invalid",Gt(Ds,10),se),D(document,"submit",Ds,!0),eo(document,lp,{childList:!0,subtree:!0})]);var cp=Object.defineProperty,Ps=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,up=Object.prototype.propertyIsEnumerable,Hs=(t,e,o)=>e in t?cp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,fp=(t,e)=>{for(var o in e||(e={}))dp.call(e,o)&&Hs(t,o,e[o]);if(Ps)for(var o of Ps(e))up.call(e,o)&&Hs(t,o,e[o]);return t},lo=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",co=lo(),Bn=co?navigator.userAgent:"",uo=/android/i.test(Bn),pp=/firefox/i.test(Bn),mp=/iPad|iPhone|iPod/.test(Bn),Ns,hp=co&&/^Mac/i.test(((Ns=navigator.userAgentData)==null?void 0:Ns.platform)||navigator.platform),vp=co&&window.CSSStyleSheet&&document.adoptedStyleSheets,gp={once:!0,capture:!0,passive:!0},bp=":host(:not([hidden])) { display: block }",yp="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",_p=`${uo?"data":"aria"}-multiselectable`,Bs=typeof HTMLElement>"u"?class{}:HTMLElement,T=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),qn=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>fo(t,...e)},fo=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},wp=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Un("slot")),!o.querySelector("style"))if(!vp)o.append(Un("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},Ep=(t,e,o)=>{const n=new MutationObserver(r=>{if(!lo()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>n.disconnect(),{takeRecords:()=>n.takeRecords()});return e(t),n.observe(t,o),i},po=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},qs=t=>po(t).activeElement,ce=t=>{if(!t||!co)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Un=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))T(n,i,r);return n},Us={define:(t,e)=>!lo()||window.customElements.get(t)||window.customElements.define(t,e)},Sp=(t,e,o="")=>{var n,i;const r={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Fn=!1,zn=t=>(t?.type==="pointerup"&&(Fn=!1),t?.type==="pointerdown"&&(Fn=!0,qn(document,"pointerup",zn,gp)),Fn),xp=t=>{const e=T(t,"form");T(t,"form","#"),setTimeout($p,0,t,e)},$p=(t,e)=>T(t,"form",e),ot,Tp=0,Fs=0,Vn=t=>{clearTimeout(Fs),ot||(ot=Un("div",{"aria-live":"assertive"}),ot.style.overflow="hidden",ot.style.position="fixed",ot.style.whiteSpace="nowrap",ot.style.width="1px"),ot.isConnected||document.body.append(ot),t===""&&(ot.textContent=""),t&&(ot.textContent=`${t}${Tp++%2?" ":""}`,Fs=setTimeout(Vn,!hp&&pp?2e3:300,""))},Wn="disabled",de="selected",Cp=class extends Bs{constructor(){super(...arguments),this._skipAttrChange=!1}static get observedAttributes(){return["id",Wn,de]}connectedCallback(){uo&&(this.tabIndex=-1),this.hasAttribute("role")||T(this,"role","option"),T(this,"aria-disabled",`${this.disabled}`),T(this,"aria-selected",`${this.selected}`),ce(this)}attributeChangedCallback(t){this._skipAttrChange||(this._skipAttrChange=!0,t==="id"?ce(this):T(this,`aria-${t}`,`${this[t]}`),this._skipAttrChange=!1)}get defaultSelected(){return this[de]}set defaultSelected(t){this[de]=t}get disabled(){return T(this,Wn)!==null}set disabled(t){T(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=T(this,"label"))!=null?t:this.text}set label(t){T(this,"label",t)}get selected(){return T(this,de)!==null}set selected(t){T(this,de,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=T(this,"value"))!=null?t:this.text}set value(t){T(this,"value",t)}};Us.define("u-option",Cp);var zs="data-activedescendant",mo="aria-hidden",Ap=`${bp}
|
|
206
206
|
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
207
|
-
::slotted([role="option"][${
|
|
208
|
-
::slotted([role="option"]:is([${mo}="true"], [disabled], [hidden])) { display: none !important }`,Gn,
|
|
207
|
+
::slotted([role="option"][${zs}]) { ${yp} }
|
|
208
|
+
::slotted([role="option"]:is([${mo}="true"], [disabled], [hidden])) { display: none !important }`,Gn,Vs="focus click keydown",jn="focusout input pointerdown",ho={of:"of",plural:"%d hits",singular:"%d hit"},kp=class extends Bs{constructor(){super(),this._texts=fp({},ho),wp(this,Ap)}static get observedAttributes(){return["id",...Object.keys(ho).map(t=>`data-sr-${t}`)]}connectedCallback(){this._root=po(this),T(this,"hidden",""),T(this,"role","listbox"),T(this,"tabindex","-1"),qn(this._root,Vs,this,!0),this._umutate=Ep(this,js,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;this._root&&fo(this._root,Vs,this,!0),this._root&&fo(this._root,jn,this),vo(this,null),(t=this._umutate)==null||t.call(this),this._umutate=this._root=this._input=void 0}attributeChangedCallback(t,e,o){const n=t?.split("data-sr-")[1];if(ho[n])this._texts[n]=o||ho[n];else if(this.id){const i=`input[list="${this.id}"]`,r=po(this).querySelector(i);r&&vo(this,r)}}handleEvent(t){t.defaultPrevented||(t.type==="focus"&&Xn(this,t),t.type==="focusout"&&Ip(this,t),t.type==="click"&&Op(this,t),t.type==="input"&&js(this),t.type==="keydown"&&Rp(this,t),t.type==="pointerdown"&&Mp(this,t))}get options(){const t=!this._options&&this.querySelector('[role="option"],option');return t&&(this._options=this.getElementsByTagName(t?.nodeName)),this._options||this.getElementsByTagName("option")}},Ws=t=>t.disabled||t.readOnly,Kn=t=>t instanceof HTMLInputElement,Lp=t=>T(t,mo)!=="true"&&t.clientHeight,ue=(t,e)=>{t._input&&T(t._input,"aria-expanded",`${e}`),!(!t.isConnected||t.hidden!==e)&&(e||Gs(t),t.popover&&t.togglePopover(e),e&&setTimeout(()=>clearTimeout(Gn)),t.hidden=!e)},Gs=(t,e)=>{t._input&&T(t._input,"aria-activedescendant",ce(e));for(const o of t.options)T(o,zs,o===e?"":null);e?.scrollIntoView({block:"nearest"})},vo=(t,e)=>{const o=e||t._input;o&&(t.popover&&(T(t,"popover","manual"),T(o,"popovertarget",e&&ce(t))),T(o,"aria-autocomplete",e&&"list"),T(o,"aria-controls",e&&ce(t)),T(o,"autocomplete",e&&"off"),T(o,"enterkeyhint","done"),T(o,"role",e&&!Ws(o)?"combobox":null))},Xn=(t,{target:e})=>{var o,n;if(t._input!==e)if(Kn(e)&&e.getAttribute("list")===t.id){if(vo(t,null),vo(t,e),Ws(e))return;t._root&&qn(t._root,jn,t),T(t,"aria-label",((n=(o=e.labels)==null?void 0:o[0])==null?void 0:n.textContent.trim())||null),Vn(),t._input=e,uo&&ue(t,!0)}else Yn(t)},Ip=(t,e)=>{zn()?e.stopImmediatePropagation():uo||setTimeout(Yn,0,t,e)},Yn=t=>{const e=qs(t);t._input===e||t.contains(e)||(t._root&&fo(t._root,jn,t),ue(t,!1),t._input=void 0)},Mp=(t,e)=>t.contains(e.target)&&zn(e),Op=(t,e)=>{var o;if(Kn(e.target)&&Xn(t,e),t._input===e.target)return ue(t,!0);if(!t.contains(e.target))return Yn(t);for(const n of t.options)if(n.contains(e.target))return(o=t._input)==null||o.focus(),t._input&&Sp(t._input,n.value),ue(t,T(t,_p)==="true")},Rp=(t,e)=>{if(Kn(e.target)&&Xn(t,e),t._input!==e.target)return;const{key:o,ctrlKey:n,metaKey:i,shiftKey:r,altKey:a}=e;if(n||i||r||o==="Tab"||a&&!o.startsWith("Arrow"))return;o==="Escape"&&!t.hidden&&e.preventDefault(),ue(t,o!=="Escape");const s=o==="Enter",l=T(t._input,"aria-activedescendant"),c=[];let d=-1,u=-1;for(const f of t.options)Lp(f)&&(c.push(f),f.id===l&&(d=c.length-1));!a&&o==="ArrowDown"&&(u=(d+1)%c.length),!a&&o==="ArrowUp"&&(u=(d||c.length)-1),~d&&((o==="Home"||o==="PageUp")&&(u=0),(o==="End"||o==="PageDown")&&(u=c.length-1),s&&(u=d)),c[u]&&(e.preventDefault(),t._input.focus()),s&&c[u]?(e.stopImmediatePropagation(),xp(t._input),c[u].click()):Gs(t,c[u])},js=t=>{var e;if(!t._input||t.hidden)return;const o=t._input.value.toLowerCase().trim()||"",n=!t.hasAttribute("data-nofilter"),i=[],r=[];for(const a of t.options)(a.disabled||a.hidden||n&&!a.label.toLowerCase().includes(o)?i:r).push(a);for(const a of i)T(a,mo,"true");for(const a of r)T(a,mo,"false");clearTimeout(Gn),Gn=setTimeout(Dp,500,t,r),mp&&r.forEach((a,s,{length:l})=>{T(a,"title",`${s+1} ${t._texts.of} ${l}`)}),(e=t._umutate)==null||e.takeRecords()},Dp=(t,e)=>!t.hidden&&t._input===qs(t)&&Vn(`${e.some(({value:o})=>o)?`${t._texts[e[1]?"plural":"singular"]}`.replace("%d",`${e.length}`):t.innerText}`);lo()&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){const t=T(this,"list");return t&&po(this).getElementById(t)}}),Us.define("u-datalist",kp);var Ks=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",go=Ks(),Pp=go?navigator.userAgent:"",Xs=/iPad|iPhone|iPod/.test(Pp),Ys;go&&/^Mac/i.test(((Ys=navigator.userAgentData)==null?void 0:Ys.platform)||navigator.platform);var Hp=go&&window.CSSStyleSheet&&document.adoptedStyleSheets,Np=typeof HTMLElement>"u"?class{}:HTMLElement,F=(t,e,o)=>o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),Bp=(t,e)=>{const o=t.shadowRoot||t.attachShadow({mode:"open"});if(o.querySelector("slot")||o.append(Qs("slot")),!o.querySelector("style"))if(!Hp)o.append(Qs("style",null,e));else{const n=new CSSStyleSheet;n.replaceSync(e),o.adoptedStyleSheets=[n]}return o},qp=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Up=t=>{var e;const o=F(t,"aria-label")||"";return[...(((e=F(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},o).trim()},Fp=t=>{if(!t||!go)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Qs=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,r]of Object.entries(e))F(n,i,r);return n},zp={define:(t,e)=>!Ks()||window.customElements.get(t)||window.customElements.define(t,e)},bo="value",Qn="max",Vp=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
209
209
|
:host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
|
|
210
210
|
:host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
|
|
211
211
|
@media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
|
|
212
|
-
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,
|
|
212
|
+
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,Js=class extends Np{constructor(){var t;super(),this._skipAttrChange=!1,Bp(this,Vp),this._internals=(t=this.attachInternals)==null?void 0:t.call(this)}static get observedAttributes(){return["aria-label","aria-labelledby",bo,Qn]}connectedCallback(){F(this,"aria-valuemin","0"),F(this,"aria-valuemax","100"),F(this,"role",Xs?"img":"progressbar"),this.attributeChangedCallback()}attributeChangedCallback(){if(this._skipAttrChange||!this.hasAttribute("role"))return;this._skipAttrChange=!0;const t=this.position,e=Math.max(0,Math.round(t*100));this.style.setProperty("--percentage",`${e}%`);let o=Up(this);Xs&&(o=`${o.replace(/\(\d+%\)$/,"")} (${e}%)`.trim()),F(this,"aria-busy",`${t===-1}`),F(this,"aria-label",o),F(this,"aria-labelledby",null),F(this,"aria-valuenow",t===-1?null:`${e}`),this._skipAttrChange=!1}get labels(){var t;const e=(t=this._internals)==null?void 0:t.labels;if(e)return e;const o=Fp(this),n=this.closest("label:not([for])");return n&&F(n,"for",o),qp(this).querySelectorAll(`label[for="${o}"]`)}get position(){return this.hasAttribute(bo)?Math.min(this.value/this.max,1):-1}get value(){return Math.min(Zs(this,bo),this.max)}set value(t){tl(this,bo,t)}get max(){return Zs(this,Qn,1)}set max(t){tl(this,Qn,t,1)}};Js.formAssociated=!0;var Zs=(t,e,o=0)=>{const n=F(t,e),i=Number(n);return n===null?o:Number.isFinite(i)&&Math.max(o,i)||o},tl=(t,e,o,n=0)=>{const i=Number(o);if(Number.isFinite(i))return F(t,e,`${Math.max(n,i)||n}`);throw new Error(`Failed to set the '${e}' property on 'UHTMLProgressElement': The provided double value is non-finite.`)};return zp.define("u-progress",Js),S.DSBreadcrumbsElement=cr,S.DSErrorSummaryElement=dr,S.DSFieldElement=qe,S.DSPaginationElement=yr,S.DSSuggestionElement=Pr,S.DSTabElement=qr,S.DSTabListElement=Br,S.DSTabPanelElement=Ur,S.DSTabsElement=Nr,S.UHTMLComboboxElement=di,S.UHTMLComboboxShadowRoot=El,S.UHTMLComboboxStyle=xo,S.UHTMLDataListElement=ra,S.UHTMLDataListShadowRoot=fu,S.UHTMLDataListStyle=Sn,S.UHTMLTabElement=Ro,S.UHTMLTabListElement=$e,S.UHTMLTabListShadowRoot=Vl,S.UHTMLTabListStyle=Oo,S.UHTMLTabPanelElement=Do,S.UHTMLTabPanelShadowRoot=Gl,S.UHTMLTabPanelStyle=Mo,S.UHTMLTabShadowRoot=Wl,S.UHTMLTabStyle=Fl,S.UHTMLTabsElement=xe,S.UHTMLTabsShadowRoot=zl,S.UHTMLTabsStyle=Io,S.analytics=ms,S.fixLawHtml=Es,S.getLawChecked=ef,S.pagination=br,S.parseLawIds=rf,S.parseLawMeta=af,S.setLawChecked=nf,S.setTooltipElement=rr,S.styles=yu,S.toast=N,S.toggleAppExpanded=bs,S.toggleLawChecked=of,S.version=bu,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),S})({});
|