@mattilsynet/design 3.1.19 → 3.2.1
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/atlas-element.js.map +1 -1
- package/mtds/atlas/cluster.js.map +1 -1
- package/mtds/illustrations/barn-water.svg +1 -0
- package/mtds/illustrations/barn.svg +1 -0
- package/mtds/illustrations/bowl-food-stacked.svg +1 -0
- package/mtds/illustrations/bowl.svg +1 -0
- package/mtds/illustrations/debatt.svg +26 -1
- package/mtds/illustrations/fertilizer.svg +1 -0
- package/mtds/illustrations/flagg-eu.svg +1 -0
- package/mtds/illustrations/flask-lab.svg +1 -0
- package/mtds/illustrations/flowerpot.svg +1 -0
- package/mtds/illustrations/fork-sausage.svg +1 -0
- package/mtds/illustrations/glas.svg +1 -0
- package/mtds/illustrations/index.json +166 -0
- package/mtds/illustrations/leaf.svg +1 -0
- package/mtds/illustrations/parasite.svg +1 -0
- package/mtds/illustrations/person-ham.svg +1 -1
- package/mtds/illustrations/person-inspect-border.svg +1 -0
- package/mtds/illustrations/person-inspect-kitchen.svg +1 -0
- package/mtds/illustrations/person-inspect-meat.svg +1 -0
- package/mtds/illustrations/person-inspect-plants.svg +1 -0
- package/mtds/illustrations/person-lab-clipboard.svg +1 -0
- package/mtds/illustrations/person-lab-greet.svg +1 -0
- package/mtds/illustrations/person-meat.svg +1 -22
- package/mtds/illustrations/person-pear.svg +1 -2
- package/mtds/illustrations/pitchfork-soil.svg +1 -0
- package/mtds/illustrations/plant-pot.svg +1 -0
- package/mtds/illustrations/sailboat-people.svg +1 -0
- package/mtds/illustrations/salami.svg +1 -0
- package/mtds/illustrations/sausage.svg +1 -0
- package/mtds/illustrations/seed-group.svg +1 -0
- package/mtds/illustrations/seed.svg +1 -0
- package/mtds/illustrations/shopping-basket.svg +1 -0
- package/mtds/illustrations/skinke.svg +1 -1
- package/mtds/illustrations/sprouts-soil.svg +1 -0
- package/mtds/illustrations/stove.svg +1 -0
- package/mtds/illustrations/supplement-group.svg +1 -1
- package/mtds/illustrations/supplement-jar.svg +1 -1
- package/mtds/illustrations/supplement-tube.svg +1 -1
- package/mtds/illustrations/test-tube-wide.svg +1 -0
- package/mtds/illustrations/test-tube.svg +1 -0
- package/mtds/illustrations/tractor-pesticides.svg +1 -0
- package/mtds/illustrations/turnip-meat.svg +1 -1
- package/mtds/illustrations/virus.svg +1 -0
- package/mtds/index.iife.js +31 -19
- 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/steps/steps.stories.d.ts +1 -0
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +45 -45
- package/mtds/styles.module.css.js +60 -60
- package/package.json +19 -19
package/mtds/index.iife.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
var mtds=(function(
|
|
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
|
+
:is(:host(:not([data-multiple])), :host([data-multiple="false"])) [part="items"] { display: none }
|
|
3
|
+
[role="listbox"] { display: contents }
|
|
4
|
+
::slotted(button[type="reset"]),::slotted(del) { font: inherit; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; text-decoration: none }
|
|
5
|
+
::slotted(data) { cursor: pointer; pointer-events: none }
|
|
6
|
+
::slotted(data)::after { padding-inline: .5ch; pointer-events: auto }
|
|
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) { ${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
|
+
::slotted([role="tab"]:not([hidden])) { display: inline-block; cursor: pointer }
|
|
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
|
+
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
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
|
+
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
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 */
|
|
2
16
|
:host(:not([data-multiple])) ::slotted(data),
|
|
3
17
|
:host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
|
|
4
18
|
[role="listbox"] { position: absolute } /* Avoid affecting CSS like flex on the <u-combobox> */
|
|
@@ -6,27 +20,22 @@ var mtds=(function(E){"use strict";var Ms=Object.defineProperty,rn=Object.getOwn
|
|
|
6
20
|
::slotted(del) { text-decoration: none }
|
|
7
21
|
::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
|
|
8
22
|
::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
|
|
9
|
-
::slotted(data:focus) { ${Ps} }`,Vs=Gs(Ve),hn="beforeinput,blur,focus,click,input,keydown,mousedown",gn={once:!0,capture:!0,passive:!0},ee="false",oe=Ds||cn,bn="".repeat(5),vn="deleteContentBackward",zs="insertText",Xs=" ",ne={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"},ze=class extends Hs{constructor(){super(),this._item="",this._speak="",this._texts=Os({},ne),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Tt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),Tt("slot"),Tt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),Tt("style",Ve))}static get observedAttributes(){return Object.keys(ne).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=fn(this),Zt(this,hn,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ie,0,this),setTimeout(ae,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];ne[n]&&(this._texts[n]=o||ne[n])}disconnectedCallback(){Ue(this,!1),Ns(this,hn,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;je(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ks(this),t.type==="click"&&Qs(this,t),t.type==="focus"&&js(this,t),t.type==="input"&&Js(this,t),t.type==="keydown"&&Zs(this,t),t.type==="mousedown"&&Ge(t),t.type==="mutation"&&ie(this,t))}get multiple(){var t;return((t=$(this,"data-multiple"))!=null?t:ee)!==ee}set multiple(t){$(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=$(this,"data-creatable"))!=null?t:ee)!==ee}set creatable(t){$(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const 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)}},ut=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Xe=t=>t instanceof HTMLDataElement,je=({control:t})=>t?.disabled||t?.readOnly||!1,ie=(t,e)=>{var o,n;const{_focus:i,_texts:a,items:s,control:r,list:c,multiple:l}=t;if(!r)return;const d=Fs(r),u=d.endsWith(bn)?$(r,"data-label"):d;$(r,"data-label",u);let m=`${u}${l?`, ${s.length?a.found.replace("%d",`${s.length}`):a.empty}`:""}`;const p=[];for(const{addedNodes:y,removedNodes:T}of e?.detail||[]){for(const S of y)Xe(S)&&p.unshift(S);for(const S of T)Xe(S)&&p.push(S)}const v=l?p.length===1:p[0]===i;if(i&&v){const y=$(r,"aria-expanded"),T=$(r,"inputmode"),S=Xe(i)?r:i,R=!p[0].isConnected;t._speak=`${a[R?"removed":"added"]} ${ut(p[0])}, `,(oe||i===r)&&Fe(t._speak),r!==S&&(oe&&$(r,"aria-expanded",null),oe&&$(r,"inputmode","none"),m=Xs,r.focus()),setTimeout(()=>{var F;$(r,"aria-expanded",y),$(r,"inputmode",R?"none":T),(F=S?.focus)==null||F.call(S),$(r,"inputmode",T),t._speak="",oe?setTimeout(ie,100,t):Zt(t,"blur",()=>ie(t),gn)},100)}let f=0;const g=t.querySelector("select"),h=je(t)?"":a.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&$(w,"aria-label",a.items);for(const y of s){const T=g?.options[f++],S=ut(y),R=y.value||S,F=`${t._speak}${S}, ${h}`;$(y,"aria-label",F),$(y,"aria-selected","true"),$(y,"role","option"),$(y,"slot","items"),$(y,"tabindex","-1"),$(y,"value",R),T?Object.assign(T,{textContent:S,value:R}):g?.appendChild(new Option(S,R,!0,!0)),cn&&$(y,"title",`${f} ${a.of} ${s.length}`)}g&&$(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(f))y.remove();!l&&f>1&&console.warn(t," Multiple <data> found in single mode."),c&&($(c,"aria-multiselectable",`${l}`),$(r,"list",mn(c)),$(r,"aria-label",`${t._speak}${m}${bn}`),c.hasAttribute("popover")&&($(r,"popovertarget",mn(c)),$(c,"popover","manual")),c._of=a.of);const _=ut(s[0]);_!==t._item&&ae(t),t._item=_,wn(t),yn(t),(n=Ue(t))==null||n.takeRecords()},wn=t=>{var e;t.clear&&$(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||je(t))},yn=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const a of n){const s=(e=$(a,"value"))!=null?e:ut(a);$(a,"aria-label",o?`${o}${ut(a)}`:null),$(a,"selected",i.includes(s)?"":null)}},ae=t=>{const{multiple:e,control:o,items:n}=t,i=ut(n[0]);!e&&o&&i!==o.value&&pn(o,i,i?zs:vn)},Ke=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:a,control:s,items:r,multiple:c}=t,l=((o=s?.value)==null?void 0:o.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(p=>($(p,"label")||ut(p)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(p=>p.selected)),e)return yn(t),u?kt(t,u,!1):a&&l?kt(t,{value:l},!1):(!c&&!l&&r[0]?kt(t,r[0]):ae(t),Fe(n.invalid));for(const p of i)p.selected=p===u},kt=(t,e,o=!0)=>{var n,i,a;const{control:s,items:r,multiple:c}=t,l=Tt("data",e.label||e.value,{value:e.value}),d=[...r].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!o)return ae(t);if(d===((n=fn(t))==null?void 0:n.activeElement)&&((a=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||a.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const p of[...r])p.remove();d?d.remove():s?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},js=(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=$(n,"form"),$(n,"form","#")),Fe()},Ks=t=>Ge()||setTimeout(Ys,0,t),Ys=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:a}=t;!e||t.contains(o?.activeElement)||(i||Ke(t),n&&a&&$(a,"form",n),t._focus=t._form=void 0)},Qs=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:a,control:s,items:r}=t;if(a?.contains(i))return s&&pn(s,"",vn),s?.focus();for(const c of r){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return kt(t,c);if(n>=l&&n<=u&&o>=m&&o<=d)return c.focus()}i===t&&s?.focus()},Js=(t,e)=>{var o;const{options:n=[],control:i,multiple:a}=t,s=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!s){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of n)if(c.value&&c.value===s)return kt(t,c,a)}else a||Ke(t,!1);wn(t)},Zs=(t,e)=>{var o;const{clear:n,control:i,items:a}=t,{key:s,repeat:r,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let m=l?a.length:[...a].indexOf(c);if(l&&s==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),Zt(n,"blur",()=>$(n,"tabindex",null),gn)),!(!l&&qs(e)||m===-1||u)){if(s==="ArrowRight"&&!l)m+=1;else if(s==="ArrowLeft"&&!d)m-=1;else{if(s==="Enter"&&l)return Ke(t);if(s==="Backspace"&&!d){if(e.preventDefault(),!r&&a[m])return kt(t,a[m]);l&&(m-=1)}else return l||i?.focus()}e.preventDefault(),(o=a[Math.max(0,m)]||i)==null||o.focus()}};Us.define("u-combobox",ze);var Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tr=Ye&&/android/i.test(navigator.userAgent),_n;Ye&&/^Mac/i.test(((_n=navigator.userAgentData)==null?void 0:_n.platform)||navigator.platform);var er=`${tr?"data":"aria"}-labelledby`,Qe=":host(:not([hidden])) { display: block }",se=typeof HTMLElement>"u"?class{}:HTMLElement;function C(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 xn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},or=(t,...e)=>xn("add",t,e),nr=(t,...e)=>xn("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Tn("slot"),Tn("style",e)),le=new WeakMap,En=(t,e)=>{if(e===void 0)return le.get(t);try{le.get(t).disconnect(),le.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),le.set(t,o)}},ir=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},Sn=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},ar=0,$n=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ar).toString(32)}`),t.id):"",Tn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},ce={define:(t,e)=>!Ye||window.customElements.get(t)||window.customElements.define(t,e)},de=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Je=Qe,Ze=Qe,to=Qe,eo=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',sr=de(Je),rr=de(Ze),lr=de(eo),cr=de(to),ue="aria-controls",At="aria-selected",kn="data-utabs",oo=class extends se{constructor(){super(),re(this,Je)}connectedCallback(){C(this,kn,"")}get tabList(){return fe("tablist",this)[0]||null}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}get tabs(){return fe("tab",this)}get panels(){return fe("tabpanel",this)}},no=class extends se{constructor(){super(),re(this,Ze)}connectedCallback(){C(this,"role","tablist"),or(this,"click,keydown",this),En(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){nr(this,"click,keydown",this),En(this,!1)}handleEvent(t){var e,o;if(!t||t.type==="mutation"){const r=this.tabs[Math.max(this.selectedIndex,0)];return r?.setAttribute(At,"true")}const{key:n}=t,i=[...this.tabs],a=i.findIndex(r=>r.contains(t.target));let s=a;if(!(t.defaultPrevented||a===-1)&&(t.type==="click"&&fo(i[a]),t.type==="keydown"&&!ir(t))){if(n==="ArrowDown"||n==="ArrowRight")s=(a+1)%i.length;else if(n==="ArrowUp"||n==="ArrowLeft")s=(a||i.length)-1;else if(n==="End")s=i.length-1;else if(n==="Home")s=0;else if(n==="Tab")s=me(i);else return;setTimeout(()=>{C(i[a],"tabindex","-1"),C(i[s],"tabindex","0")}),n!=="Tab"&&(t.preventDefault(),(o=(e=i[s]).focus)==null||o.call(e))}}get tabsElement(){return co(this)}get tabs(){return uo(this)}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}},io=!1,ao=class extends se{static get observedAttributes(){return["id",At,ue]}constructor(){super(),re(this,eo)}connectedCallback(){C(this,"role","tab"),C(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!io&&this.selected&&this.tabList){io=!0;const t=this.tabList?uo(this.tabList):[],e=fe("tabpanel",this.tabsElement||this),o=lo(this,e[[...t].indexOf(this)]);o&&C(o,er,$n(this));let n=0;for(const i of t){const a=lo(i,e[n++]);C(i,"tabindex",i===this?"0":"-1"),C(i,At,`${i===this}`),a?.id&&C(i,ue,a.id),a&&(a.hidden=a!==o)}io=!1}}get tabsElement(){return co(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return C(this,At)==="true"}set selected(t){C(this,At,`${!!t}`)}get index(){const t=this.tabList;return t?[...uo(t)].indexOf(this):0}get panel(){return lo(this)}},so=!1,ro=class extends se{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,to)}connectedCallback(){var t,e;C(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(so)return;so=!0;const t=dr(this.firstChild);this.hidden=me(this.tabs)===-1,C(this,"aria-hidden",`${this.hidden}`),C(this,"tabindex",this.hidden||t?null:"0"),so=!1}get tabsElement(){return co(this)}get tabs(){return Sn(this).querySelectorAll(`[role="tab"][${ue}="${this.id}"]`)}},fe=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),lo=(t,e)=>Sn(t).getElementById(C(t,ue)||$n(e)),me=t=>[...t].findIndex(e=>C(e,At)==="true"),co=t=>t.closest(`[${kn}]`),uo=t=>t.querySelectorAll(':scope > [role="tab"]'),fo=t=>t&&C(t,"aria-disabled")!=="true"&&C(t,"aria-selected","true"),dr=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ce.define("u-tabs",oo),ce.define("u-tablist",no),ce.define("u-tab",ao),ce.define("u-tabpanel",ro);var An=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Cn;An&&/^Mac/i.test(((Cn=navigator.userAgentData)==null?void 0:Cn.platform)||navigator.platform);var ur=":host(:not([hidden])) { display: block }",Ln=typeof HTMLElement>"u"?class{}:HTMLElement;function J(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 Mn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Rn=(t,...e)=>Mn("add",t,e),In=(t,...e)=>Mn("remove",t,e),fr=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},mr=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},mo=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,a]of Object.entries(o))J(n,i,a);return n},On={define:(t,e)=>!An||window.customElements.get(t)||window.customElements.define(t,e)},pr=`${ur}
|
|
10
|
-
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
11
|
-
::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
|
|
12
|
-
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
13
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`,hr=class extends Ln{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(mo("slot",null,{name:"summary"}),mo("slot",null,{part:"details-content"}),mo("style",pr)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
|
|
14
|
-
Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],J(this,"role","group"),Rn(this._content,"beforematch",this),Rn(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&In(this._content,"beforematch",this),In(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const a of this.children)a.nodeName==="U-SUMMARY"&&J(a,"aria-expanded",`${i}`);if(this._content&&(J(this._content,"aria-hidden",`${!i}`),J(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const a=mr(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of a)s!==this&&(s.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const o=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),o&&t.type==="keydown"&&fr(t),o&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){J(this,"open",t?"":null)}get name(){return J(this,"name")||""}set name(t){J(this,"name",t)}},gr=class extends Ln{connectedCallback(){J(this,"role","button"),this.slot="summary",this.tabIndex=0}};On.define("u-details",hr),On.define("u-summary",gr);const B={passive:!0,capture:!0},Z=()=>typeof window<"u"&&typeof document<"u",br=()=>Z()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),pe=typeof HTMLElement>"u"?class{}:HTMLElement;function Ct(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const ft=(t,...e)=>!Z()||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),x=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),vr=/^["']|["']$/g,Pt=(t,e)=>{let o=x(t,e);return o||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(vr,"").trim()||null,o||ft(`Missing ${e} on:`,t),o},I=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>po(t,...e)},po=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},at=(t,e)=>{Z()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))};let ho=!1;const mt=(t,e,o)=>{let n=0,i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{!ho&&!n&&(n=requestAnimationFrame(i))});return s.observe(t,o),requestAnimationFrame(i),a},go=(t,e)=>{ho=!0,t.textContent=e,requestAnimationFrame(wr)},wr=()=>{ho=!1},Dn=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))x(o,n,i);return o},tt={define:(t,e)=>!Z()||window.customElements.get(t)||window.customElements.define(t,e)};let yr=0;function pt(t){return Z()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++yr}`}let j,_r=0,Pn=0;const bo=t=>{clearTimeout(Pn),j&&go(j,`${t}${_r++%2?" ":""}`),t&&(Pn=setTimeout(bo,2e3,""))},xr=()=>{document.readyState==="complete"&&(j||(j=Dn("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))};at("announce",()=>[I(document,"focus mouseover",xr,B)]);const Hn=":click-delegate-hover",Nn="data-clickdelegatefor",Er=`[${Nn}]`,Sr=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.isTrusted&&t.button<2&&qn(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 he;const $r=t=>{let e=qn(t);he!==e&&(he&&he.classList.remove(Hn),e&&e.classList.add(Hn),he=e)},qn=({target:t})=>{let e=(t instanceof Element?t.closest(Er):null)?.getAttribute(Nn),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};at("clickdelegatefor",()=>[I(window,"click auxclick",Sr,!0),I(document,"mouseover",$r,B)]);let vo=!1;const Tr=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();vo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!vo&&x(e,"closedby")==="any";vo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},kr=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))x(t,"aria-haspopup","dialog")},Ar=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();at("dialog",()=>[I(document,"command",Ar,B),I(document,"pointerdown pointerup",Tr,B),mt(document,kr,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Lt=Math.min,N=Math.max,ge=Math.round,be=Math.floor,K=t=>({x:t,y:t}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t,e,o){return N(t,Lt(e,o))}function ht(t,e){return typeof t=="function"?t(e):t}function et(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function wo(t){return t==="x"?"y":"x"}function Un(t){return t==="y"?"height":"width"}function Y(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Fn(t){return wo(Y(t))}function Lr(t,e,o){o===void 0&&(o=!1);const n=Ht(t),i=Fn(t),a=Un(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=ve(s)),[s,ve(s)]}function Mr(t){const e=ve(t);return[yo(t),e,yo(e)]}function yo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Wn=["left","right"],Gn=["right","left"],Rr=["top","bottom"],Ir=["bottom","top"];function Or(t,e,o){switch(t){case"top":case"bottom":return o?e?Gn:Wn:e?Wn:Gn;case"left":case"right":return e?Rr:Ir;default:return[]}}function Dr(t,e,o,n){const i=Ht(t);let a=Or(et(t),o==="start",n);return i&&(a=a.map(s=>s+"-"+i),e&&(a=a.concat(a.map(yo)))),a}function ve(t){const e=et(t);return Cr[e]+t.slice(e.length)}function Pr(t){return{top:0,right:0,bottom:0,left:0,...t}}function Hr(t){return typeof t!="number"?Pr(t):{top:t,right:t,bottom:t,left:t}}function we(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 Vn(t,e,o){let{reference:n,floating:i}=t;const a=Y(e),s=Fn(e),r=Un(s),c=et(e),l=a==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,m=n[r]/2-i[r]/2;let p;switch(c){case"top":p={x:d,y:n.y-i.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-i.width,y:u};break;default:p={x:n.x,y:n.y}}switch(Ht(e)){case"start":p[s]-=m*(o&&l?-1:1);break;case"end":p[s]+=m*(o&&l?-1:1);break}return p}async function Nr(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:s,elements:r,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=ht(e,t),v=Hr(p),g=r[m?u==="floating"?"reference":"floating":u],h=we(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(g)))==null||o?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(r.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(r.floating)),y=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},T=we(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:_,strategy:c}):w);return{top:(h.top-T.top+v.top)/y.y,bottom:(T.bottom-h.bottom+v.bottom)/y.y,left:(h.left-T.left+v.left)/y.x,right:(T.right-h.right+v.right)/y.x}}const qr=50,Br=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,r=s.detectOverflow?s:{...s,detectOverflow:Nr},c=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Vn(l,n,c),m=n,p=0;const v={};for(let f=0;f<a.length;f++){const g=a[f];if(!g)continue;const{name:h,fn:w}=g,{x:_,y,data:T,reset:S}=await w({x:d,y:u,initialPlacement:n,placement:m,strategy:i,middlewareData:v,rects:l,platform:r,elements:{reference:t,floating:e}});d=_??d,u=y??u,v[h]={...v[h],...T},S&&p<qr&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:d,y:u}=Vn(l,m,c)),f=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:v}},Ur=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:r,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=ht(t,e);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const h=et(i),w=Y(r),_=et(r)===r,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=m||(_||!f?[ve(r)]:Mr(r)),S=v!=="none";!m&&S&&T.push(...Dr(r,f,v,y));const R=[r,...T],F=await c.detectOverflow(e,g),Et=[];let it=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&Et.push(F[h]),u){const St=Lr(i,s,y);Et.push(F[St[0]],F[St[1]])}if(it=[...it,{placement:i,overflows:Et}],!Et.every(St=>St<=0)){var jt,Kt;const St=(((jt=a.flip)==null?void 0:jt.index)||0)+1,sn=R[St];if(sn&&(!(u==="alignment"?w!==Y(sn):!1)||it.every(X=>Y(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:St,overflows:it},reset:{placement:sn}};let Qt=(Kt=it.filter($t=>$t.overflows[0]<=0).sort(($t,X)=>$t.overflows[1]-X.overflows[1])[0])==null?void 0:Kt.placement;if(!Qt)switch(p){case"bestFit":{var Yt;const $t=(Yt=it.filter(X=>{if(S){const ct=Y(X.placement);return ct===w||ct==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(ct=>ct>0).reduce((ct,lu)=>ct+lu,0)]).sort((X,ct)=>X[1]-ct[1])[0])==null?void 0:Yt[0];$t&&(Qt=$t);break}case"initialPlacement":Qt=r;break}if(i!==Qt)return{reset:{placement:Qt}}}return{}}}},zn=new Set(["left","top"]);async function Fr(t,e){const{placement:o,platform:n,elements:i}=t,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=et(o),r=Ht(o),c=Y(o)==="y",l=zn.has(s)?-1:1,d=a&&c?-1:1,u=ht(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&typeof v=="number"&&(p=r==="end"?v*-1:v),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const Wr=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:a,placement:s,middlewareData:r}=e,c=await Fr(e,t);return s===((o=r.offset)==null?void 0:o.placement)&&(n=r.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Gr=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:a}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:h=>{let{x:w,y:_}=h;return{x:w,y:_}}},...l}=ht(t,e),d={x:o,y:n},u=await a.detectOverflow(e,l),m=Y(et(i)),p=wo(m);let v=d[p],f=d[m];if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",_=v+u[h],y=v-u[w];v=Bn(_,v,y)}if(r){const h=m==="y"?"top":"left",w=m==="y"?"bottom":"right",_=f+u[h],y=f-u[w];f=Bn(_,f,y)}const g=c.fn({...e,[p]:v,[m]:f});return{...g,data:{x:g.x-o,y:g.y-n,enabled:{[p]:s,[m]:r}}}}}},Vr=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:a,middlewareData:s}=e,{offset:r=0,mainAxis:c=!0,crossAxis:l=!0}=ht(t,e),d={x:o,y:n},u=Y(i),m=wo(u);let p=d[m],v=d[u];const f=ht(r,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=m==="y"?"height":"width",y=a.reference[m]-a.floating[_]+g.mainAxis,T=a.reference[m]+a.reference[_]-g.mainAxis;p<y?p=y:p>T&&(p=T)}if(l){var h,w;const _=m==="y"?"width":"height",y=zn.has(et(i)),T=a.reference[u]-a.floating[_]+(y&&((h=s.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),S=a.reference[u]+a.reference[_]+(y?0:((w=s.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);v<T?v=T:v>S&&(v=S)}return{[m]:p,[u]:v}}}},zr=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:a,platform:s,elements:r}=e,{apply:c=()=>{},...l}=ht(t,e),d=await s.detectOverflow(e,l),u=et(i),m=Ht(i),p=Y(i)==="y",{width:v,height:f}=a.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=m===(await(s.isRTL==null?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(h=u,g=m==="end"?"top":"bottom");const w=f-d.top-d.bottom,_=v-d.left-d.right,y=Lt(f-d[g],w),T=Lt(v-d[h],_),S=!e.middlewareData.shift;let R=y,F=T;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(F=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(R=w),S&&!m){const it=N(d.left,0),jt=N(d.right,0),Kt=N(d.top,0),Yt=N(d.bottom,0);p?F=v-2*(it!==0||jt!==0?it+jt:N(d.left,d.right)):R=f-2*(Kt!==0||Yt!==0?Kt+Yt:N(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:R});const Et=await s.getDimensions(r.floating);return v!==Et.width||f!==Et.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function Mt(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Q(t){var e;return(e=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xn(t){return ye()?t instanceof Node||t instanceof q(t).Node:!1}function W(t){return ye()?t instanceof Element||t instanceof q(t).Element:!1}function ot(t){return ye()?t instanceof HTMLElement||t instanceof q(t).HTMLElement:!1}function jn(t){return!ye()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof q(t).ShadowRoot}function Nt(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 Xr(t){return/^(table|td|th)$/.test(Mt(t))}function _e(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const jr=/transform|translate|scale|rotate|perspective|filter/,Kr=/paint|layout|strict|content/,gt=t=>!!t&&t!=="none";let _o;function xo(t){const e=W(t)?G(t):t;return gt(e.transform)||gt(e.translate)||gt(e.scale)||gt(e.rotate)||gt(e.perspective)||!Eo()&&(gt(e.backdropFilter)||gt(e.filter))||jr.test(e.willChange||"")||Kr.test(e.contain||"")}function Yr(t){let e=st(t);for(;ot(e)&&!Rt(e);){if(xo(e))return e;if(_e(e))return null;e=st(e)}return null}function Eo(){return _o==null&&(_o=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_o}function Rt(t){return/^(html|body|#document)$/.test(Mt(t))}function G(t){return q(t).getComputedStyle(t)}function xe(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if(Mt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jn(t)&&t.host||Q(t);return jn(e)?e.host:e}function Kn(t){const e=st(t);return Rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&Nt(e)?e:Kn(e)}function qt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Kn(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=q(i);if(a){const r=So(s);return e.concat(s,s.visualViewport||[],Nt(i)?i:[],r&&o?qt(r):[])}else return e.concat(i,qt(i,[],o))}function So(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yn(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ot(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,r=ge(o)!==a||ge(n)!==s;return r&&(o=a,n=s),{width:o,height:n,$:r}}function $o(t){return W(t)?t:t.contextElement}function It(t){const e=$o(t);if(!ot(e))return K(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:a}=Yn(e);let s=(a?ge(o.width):o.width)/n,r=(a?ge(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!r||!Number.isFinite(r))&&(r=1),{x:s,y:r}}const Qr=K(0);function Qn(t){const e=q(t);return!Eo()||!e.visualViewport?Qr:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jr(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==q(t)?!1:e}function bt(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),a=$o(t);let s=K(1);e&&(n?W(n)&&(s=It(n)):s=It(t));const r=Jr(a,o,n)?Qn(a):K(0);let c=(i.left+r.x)/s.x,l=(i.top+r.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(a){const m=q(a),p=n&&W(n)?q(n):n;let v=m,f=So(v);for(;f&&n&&p!==v;){const g=It(f),h=f.getBoundingClientRect(),w=G(f),_=h.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=_,l+=y,v=q(f),f=So(v)}}return we({width:d,height:u,x:c,y:l})}function Ee(t,e){const o=xe(t).scrollLeft;return e?e.left+o:bt(Q(t)).left+o}function Jn(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-Ee(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Zr(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const a=i==="fixed",s=Q(n),r=e?_e(e.floating):!1;if(n===s||r&&a)return o;let c={scrollLeft:0,scrollTop:0},l=K(1);const d=K(0),u=ot(n);if((u||!u&&!a)&&((Mt(n)!=="body"||Nt(s))&&(c=xe(n)),u)){const p=bt(n);l=It(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=s&&!u&&!a?Jn(s,c):K(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-c.scrollLeft*l.x+d.x+m.x,y:o.y*l.y-c.scrollTop*l.y+d.y+m.y}}function tl(t){return Array.from(t.getClientRects())}function el(t){const e=Q(t),o=xe(t),n=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=N(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Ee(t);const r=-o.scrollTop;return G(n).direction==="rtl"&&(s+=N(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:r}}const Zn=25;function ol(t,e){const o=q(t),n=Q(t),i=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,r=0,c=0;if(i){a=i.width,s=i.height;const d=Eo();(!d||d&&e==="fixed")&&(r=i.offsetLeft,c=i.offsetTop)}const l=Ee(n);if(l<=0){const d=n.ownerDocument,u=d.body,m=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-p);v<=Zn&&(a-=v)}else l<=Zn&&(a+=l);return{width:a,height:s,x:r,y:c}}function nl(t,e){const o=bt(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=ot(t)?It(t):K(1),s=t.clientWidth*a.x,r=t.clientHeight*a.y,c=i*a.x,l=n*a.y;return{width:s,height:r,x:c,y:l}}function ti(t,e,o){let n;if(e==="viewport")n=ol(t,o);else if(e==="document")n=el(Q(t));else if(W(e))n=nl(e,o);else{const i=Qn(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return we(n)}function ei(t,e){const o=st(t);return o===e||!W(o)||Rt(o)?!1:G(o).position==="fixed"||ei(o,e)}function il(t,e){const o=e.get(t);if(o)return o;let n=qt(t,[],!1).filter(r=>W(r)&&Mt(r)!=="body"),i=null;const a=G(t).position==="fixed";let s=a?st(t):t;for(;W(s)&&!Rt(s);){const r=G(s),c=xo(s);!c&&r.position==="fixed"&&(i=null),(a?!c&&!i:!c&&r.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Nt(s)&&!c&&ei(t,s))?n=n.filter(d=>d!==s):i=r,s=st(s)}return e.set(t,n),n}function al(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_e(e)?[]:il(e,this._c):[].concat(o),n],r=ti(e,s[0],i);let c=r.top,l=r.right,d=r.bottom,u=r.left;for(let m=1;m<s.length;m++){const p=ti(e,s[m],i);c=N(p.top,c),l=Lt(p.right,l),d=Lt(p.bottom,d),u=N(p.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function sl(t){const{width:e,height:o}=Yn(t);return{width:e,height:o}}function rl(t,e,o){const n=ot(e),i=Q(e),a=o==="fixed",s=bt(t,!0,a,e);let r={scrollLeft:0,scrollTop:0};const c=K(0);function l(){c.x=Ee(i)}if(n||!n&&!a)if((Mt(e)!=="body"||Nt(i))&&(r=xe(e)),n){const p=bt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else i&&l();a&&!n&&i&&l();const d=i&&!n&&!a?Jn(i,r):K(0),u=s.left+r.scrollLeft-c.x-d.x,m=s.top+r.scrollTop-c.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function To(t){return G(t).position==="static"}function oi(t,e){if(!ot(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return Q(t)===o&&(o=o.ownerDocument.body),o}function ni(t,e){const o=q(t);if(_e(t))return o;if(!ot(t)){let i=st(t);for(;i&&!Rt(i);){if(W(i)&&!To(i))return i;i=st(i)}return o}let n=oi(t,e);for(;n&&Xr(n)&&To(n);)n=oi(n,e);return n&&Rt(n)&&To(n)&&!xo(n)?o:n||Yr(t)||o}const ll=async function(t){const e=this.getOffsetParent||ni,o=this.getDimensions,n=await o(t.floating);return{reference:rl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function cl(t){return G(t).direction==="rtl"}const dl={convertOffsetParentRelativeRectToViewportRelativeRect:Zr,getDocumentElement:Q,getClippingRect:al,getOffsetParent:ni,getElementRects:ll,getClientRects:tl,getDimensions:sl,getScale:It,isElement:W,isRTL:cl};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ul(t,e){let o=null,n;const i=Q(t);function a(){var r;clearTimeout(n),(r=o)==null||r.disconnect(),o=null}function s(r,c){r===void 0&&(r=!1),c===void 0&&(c=1),a();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:p}=l;if(r||e(),!m||!p)return;const v=be(u),f=be(i.clientWidth-(d+m)),g=be(i.clientHeight-(u+p)),h=be(d),_={rootMargin:-v+"px "+-f+"px "+-g+"px "+-h+"px",threshold:N(0,Lt(1,c))||1};let y=!0;function T(S){const R=S[0].intersectionRatio;if(R!==c){if(!y)return s();R?s(!1,R):n=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ii(l,t.getBoundingClientRect())&&s(),y=!1}try{o=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(T,_)}o.observe(t)}return s(!0),a}function fl(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=$o(t),d=i||a?[...l?qt(l):[],...e?qt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",o,{passive:!0}),a&&h.addEventListener("resize",o)});const u=l&&r?ul(l,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&p&&e&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(e)})),o()}),l&&!c&&p.observe(l),e&&p.observe(e));let v,f=c?bt(t):null;c&&g();function g(){const h=bt(t);f&&!ii(f,h)&&o(),f=h,v=requestAnimationFrame(g)}return o(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",o),a&&w.removeEventListener("resize",o)}),u?.(),(h=p)==null||h.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const ml=Wr,pl=Gr,hl=Ur,gl=zr,bl=Vr,vl=(t,e,o)=>{const n=new Map,i={platform:dl,...o},a={...i.platform,_c:n};return Br(t,e,{...i,platform:a})},ai="data-placement",si="data-autoplacement",Bt=new Map;function wl(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,a=n instanceof HTMLElement&&x(n,"popover")!==null&&ri(n,"--_ds-floating");if(!a)return;if(e==="closed")return Bt.get(n)?.();if(!i){let v=n.getRootNode(),f=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&v?.querySelector?.(f)||void 0}if(!i||i===n||o&&o===e)return;let s=ri(n,"--_ds-floating-overscroll"),r=x(n,ai)||x(i,ai)||a,c=x(n,si)||x(i,si),l=parseFloat(getComputedStyle(n,"::before").height)||0,d=r.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(r==="none")return;let m={strategy:"absolute",placement:r,middleware:[ml(l||0),pl({padding:10,limiter:bl({offset:{mainAxis:u}})}),_l(),...c==="false"?[]:[hl({padding:10,crossAxis:!1})],...s?[gl({apply({availableHeight:v}){s==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,v-20)}px`}})]:[]]},p=fl(i,n,async()=>{if(!i?.isConnected)return Bt.get(n)?.();let{x:v,y:f}=await vl(i,n,m);n.style.translate=`${v}px ${f}px`});Bt.set(n,()=>Bt.delete(n)&&p())}let Se;const yl=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Bt)e.showPopover()};at("popover",()=>[I(document,"mousedown scroll mouseup",yl,!0),I(document,"toggle ds-toggle-source",wl,B)]);const ri=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),_l=()=>({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),x(e,"data-floating",t.placement),t}}),ko=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||x(t,"aria-readonly")==="true"),xl=t=>{if(t.key!=="Tab"&&ko(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&x(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),o=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+o)%e.length]?.focus()}},El=t=>{let e=t.target?.closest?.("label")?.control||t.target;ko(e)&&(t.preventDefault(),e.focus())},Sl=t=>{t.target instanceof HTMLSelectElement&&ko(t.target)&&t.preventDefault()};at("readonly",()=>[I(document,"keydown",xl),I(document,"click",El),I(document,"mousedown",Sl)]);const Ao="data-toggle-group",li=`[${Ao}]`,$l=Ct(()=>{for(let t of document.querySelectorAll(li))x(t,"aria-label",Pt(t,Ao))},0),Tl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(li);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let o=[...e.getElementsByTagName("input")],n=o.indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1,a=n;for(let s=0;s<o.length;s++)if(a=(o.length+a+i)%o.length,!o[a]?.disabled){o[a]?.focus();break}}};at("toggle-group",()=>[I(document,"keydown",Tl),mt(document,$l,{attributeFilter:[Ao],attributes:!0,childList:!0,subtree:!0})]);let L,Ut,ci=0,di=0;const kl=Z()&&/iPad|iPhone|iPod/.test(navigator.userAgent),vt="data-tooltip",Co="data-color",ui="aria-label",fi="aria-description",Al=`[${Co}]`,Cl=`[${vt}]`,Lo="data-color-scheme",Ll=`[${Lo}]`,mi=t=>{t&&!(t instanceof HTMLElement)&&ft("setTooltipElement expects an HTMLElement, got: ",t),L=t||void 0},Ml=Ct(()=>{for(let t of document.querySelectorAll(Cl)){let e=t.getAttribute(ui)||t.getAttribute(fi),o=t.getAttribute(vt)||Pt(t,vt);if(e!==o){let a=x(t,"role")!=="img"&&t.textContent?.trim();x(t,vt,o),x(t,ui,a?null:o),x(t,fi,a?o:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||ft('Missing tabindex="0" attribute on: ',t)}let n=t===Ut&&L?.matches(":popover-open"),i=n&&o&&L?.textContent!==o;n&&i&&(L&&go(L,o),document.activeElement===t&&bo(o))}},0),pi=({type:t,target:e})=>{if(clearTimeout(ci),e===L)return;if(t==="mouseover"&&!Ut&&!kl){ci=setTimeout(pi,300,{target:e});return}let o=e?.closest?.(`[${vt}]`);if(o===Ut)return;if(!o)return hi();L||=Dn("div",{class:"ds-tooltip"}),L.isConnected||document.body.appendChild(L);let n=o.closest(Al),i=o.closest(Ll),a=n!==i&&n?.contains(i);clearTimeout(di),x(L,"popover","manual"),x(L,Lo,i?.getAttribute(Lo)||null),x(L,Co,a&&n?.getAttribute(Co)||null),go(L,x(o,vt)),L.showPopover(),L.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),Ut=o},hi=()=>L?.isConnected&&L.popover&&L.hidePopover(),gi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&hi();t?t.target===L&&t.newState==="closed"&&(di=setTimeout(gi,300)):Ut=void 0};at("tooltip",()=>[I(document,"blur focus mouseover",pi,B),I(document,"toggle keydown",gi,B),mt(document,Ml,{attributeFilter:[vt],attributes:!0,childList:!0,subtree:!0})]);const Mo="aria-label";var bi=class extends pe{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Mo]}connectedCallback(){this._label=Pt(this,Mo),this._items=this.getElementsByTagName("a"),this._render=Ct(()=>Rl(this),100),this._unresize=I(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){n&&(this._label=n),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Rl=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;x(t,"role",n?null:"navigation"),x(t,Mo,n?null:t._label);for(let i of t._items||[])x(i,"aria-current",i===o?"page":null)};tt.define("ds-breadcrumbs",bi);var vi=class extends pe{connectedCallback(){I(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let o=this.querySelector("h2,h3,h4,h5,h6");o&&x(this,"aria-labelledby",pt(o)),x(this,"tabindex","-1"),this.focus()}disconnectedCallback(){po(this,"animationend",this,B)}};tt.define("ds-error-summary",vi);const wi="data-indeterminate",Ro=new Set,yi=new WeakMap,Il=Z()?document.getElementsByTagName("fieldset"):[],Ol=Z()&&CSS.supports("field-sizing","content"),Dl=br()?800:200,_i=new WeakSet,xi=Ct(()=>{for(let t of Il)x(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of Ro){let e=[],o=[],n,i,a=!1,s=!1;for(let r of t.getElementsByTagName("*"))if(r instanceof HTMLLabelElement&&o.push(r),!r.hidden)if(Hl(r))n?ft("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):n=r;else{let c=r.getAttribute("data-field");c==="counter"&&(i=r),c==="validation"?(e.unshift(r),a=!0,s||=Si(r)):c&&e.push(r)}if(!n)ft("Field is missing input element:",t);else{i&&yi.set(n,i);for(let d of o)x(d,"for",pt(n));let r=n.type==="radio"||n.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(a=!0,s||=Si(c),e.unshift(c));let l=x(n,wi);l&&(n.indeterminate=l==="true"),x(t,"data-clickdelegatefor",r?pt(n):null),x(n,"aria-describedby",e.map(pt).join(" ")||null),(a||_i.has(n))&&(_i[a?"add":"delete"](n),x(n,"aria-invalid",`${s}`)),Ei(n)}}},0),Ei=t=>{let e=t.target||t,o=yi.get(e);if(o?.isConnected){let n=(Number(x(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",a=Pt(o,`data-${i}`)?.replace("%d",`${Math.abs(n)}`);x(o,"data-label",a),x(o,"data-state",i),x(o,"data-color",n<0?"danger":null),t.type==="input"&&a&&Pl(e,a)}!Ol&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Pl=Ct((t,e)=>{document.activeElement===t&&bo(e)},Dl),Si=t=>t.getAttribute("data-color")!=="success",Hl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var $e=class extends pe{connectedCallback(){Ro.add(this),xi()}disconnectedCallback(){Ro.delete(this)}};tt.define("ds-field",$e),at("field",()=>[I(document,"input",Ei,B),mt(document,xi,{attributeFilter:["data-field","data-limit","hidden","value",wi],attributes:!0,childList:!0,subtree:!0})]);const Io="aria-label",Te="data-current",ke="data-total",$i="data-href",Ti=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:ql(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var ki=class extends pe{_unmutate;_render;static get observedAttributes(){return[Io,Te,ke,$i]}connectedCallback(){let t=x(this,ke),e=x(this,Te);e&&!t&&ft(`Missing ${ke} attribute on:`,this),t&&!e&&ft(`Missing ${Te} attribute on:`,this),x(this,Io,Pt(this,Io)),x(this,"role","navigation"),this._render=Ct(()=>Nl(this),0),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Nl=t=>{let e=Number(x(t,Te)),o=Number(x(t,ke));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,a=x(t,$i),{next:s,prev:r,pages:c}=Ti({current:e,total:o,show:i});n.forEach((l,d)=>{let u=d?n[d+1]?c[d-1]?.page:s:r;x(l,"aria-current",c[d-1]?.current?"true":null),x(l,"aria-label",`${u??"hidden"}`),x(l,"role",u?null:"none"),x(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&x(l,"value",`${u}`),a&&l instanceof HTMLAnchorElement&&x(l,"href",a.replace("%d",`${u}`))})}},ql=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),a=Math.min(Math.max(t+Math.ceil(n),o),e),s=Array.from({length:a+1-i},(r,c)=>c+i);return o>4&&i>1&&s.splice(0,2,1,0),o>3&&a<e&&s.splice(-2,2,0,e),s};tt.define("ds-pagination",ki);var Ai=class extends ze{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Bl(this),this._unmutate=mt(this,this._render,{childList:!0}),I(this,"toggle",Ci,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,po(this,"toggle",Ci,B)}};const Bl=({control:t,list:e})=>{t&&!t.placeholder&&x(t,"placeholder"," "),t&&x(t,"popovertarget",pt(e)||null),e&&x(e,"popover","manual")},Ci=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};tt.define("ds-suggestion",Ai);var Li=class extends oo{},Mi=class extends no{},Ri=class extends ao{},Ii=class extends ro{};tt.define("ds-tabs",Li),tt.define("ds-tablist",Mi),tt.define("ds-tab",Ri),tt.define("ds-tabpanel",Ii);function Ul(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Fl(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,g,h=!0){Object.defineProperty(f,g,{...Object.getOwnPropertyDescriptor(f,g),enumerable:h})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}const o=new WeakMap,n=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:_}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");o.set(this,w||null),n.set(this,_!==void 0?String(_):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw new TypeError("illegal invocation");const g=o.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!n.has(this))throw new TypeError("illegal invocation");return n.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class a extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const s=new WeakMap;function r(f){Object.defineProperties(f.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),s.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?s.set(this,g):s.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=s.get(this);if(g)return g.isConnected?g:(s.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(f){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(const g of f)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(f=>{for(const g of f){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function m(f){if(u.has(f)||(u.add(f),f.defaultPrevented)||f.type!=="click")return;const g=f.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=f.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw f.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const T=h.hasAttribute("command")?"command":"commandfor",S=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${T} attribute must also have a ${S} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const _=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(_),_.defaultPrevented)return;const y=_.command.toLowerCase();if(w.popover){const T=!w.matches(":popover-open");T&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!T&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const T=!w.hasAttribute("open");T&&y=="show-modal"?w.showModal():!T&&y=="close"?w.close(h.value?h.value:void 0):!T&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const S=new Event("cancel",{cancelable:!0});this.dispatchEvent(S),S.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function p(f){f.addEventListener("click",m,!0)}function v(f,g){const h=f.prototype.attachShadow;f.prototype.attachShadow=function(_){const y=h.call(this,_);return g(y),y};const w=f.prototype.attachInternals;f.prototype.attachInternals=function(){const _=w.call(this);return _.shadowRoot&&g(_.shadowRoot),_}}r(HTMLButtonElement),v(HTMLElement,f=>{p(f),d.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),p(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:a})}var Ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Wl=Ae&&/android/i.test(navigator.userAgent),Gl=Ae&&/firefox/i.test(navigator.userAgent),Oi;Ae&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);function Di(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 Ce="__uDetailsPolyfillSummarys";if(Ae&&Wl&&Gl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const o=e.parentElement;Di(e,"role","button"),Di(e,"aria-expanded",`${!!o&&!!o.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Vl=Object.defineProperty,Pi=Object.getOwnPropertySymbols,zl=Object.prototype.hasOwnProperty,Xl=Object.prototype.propertyIsEnumerable,Hi=(t,e,o)=>e in t?Vl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,jl=(t,e)=>{for(var o in e||(e={}))zl.call(e,o)&&Hi(t,o,e[o]);if(Pi)for(var o of Pi(e))Xl.call(e,o)&&Hi(t,o,e[o]);return t},Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Le=Ft&&/android/i.test(navigator.userAgent),Oo=Ft&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ni;Ft&&/^Mac/i.test(((Ni=navigator.userAgentData)==null?void 0:Ni.platform)||navigator.platform);var Kl=`${Le?"data":"aria"}-labelledby`,Yl=":host(:not([hidden])) { display: block }",Ql="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",qi=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 Bi=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Wt=(t,...e)=>Bi("add",t,e),Me=(t,...e)=>Bi("remove",t,e),Jl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Ho("slot"),Ho("style",e)),Re=new WeakMap,Do=(t,e)=>{if(e===void 0)return Re.get(t);try{Re.get(t).disconnect(),Re.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Re.set(t,o)}},Ui=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},Zl=0,Po=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Zl).toString(32)}`),t.id):"",Ho=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Fi={define:(t,e)=>!Ft||window.customElements.get(t)||window.customElements.define(t,e)},wt,tc=0,Wi=t=>{wt||(wt=Ho("div"),wt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(wt,"aria-live","assertive")),wt.isConnected||document.body.append(wt),t&&(wt.textContent=`${t}${tc++%2?" ":""}`)},ec=(t,e,o="")=>{var n,i;const a={bubbles:!0,composed:!0,data:e,inputType:o},s=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(n=Object.getOwnPropertyDescriptor(s,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},No=!1,qo=t=>(t?.type==="mouseup"&&(No=!1),t?.type==="mousedown"&&(No=!0,Wt(document,"mouseup",qo,{once:!0})),No),oc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Bo="disabled",Gt="selected",nc=class extends qi{static get observedAttributes(){return[Bo,Gt]}connectedCallback(){Oo||(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[Gt]}set defaultSelected(t){this[Gt]=t}get disabled(){return k(this,Bo)!==null}set disabled(t){k(this,Bo,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=k(this,"label"))!=null?t:this.text}set label(t){k(this,"label",t)}get selected(){return k(this,Gt)!==null}set selected(t){k(this,Gt,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=k(this,"value"))!=null?t:this.text}set value(t){k(this,"value",t)}};Fi.define("u-option",nc);var Uo=`${Yl}
|
|
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}
|
|
15
24
|
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
16
|
-
::slotted([role="option"]:focus) { ${
|
|
25
|
+
::slotted([role="option"]:focus) { ${ru} }
|
|
17
26
|
::slotted([role="option"][aria-hidden="true"]),
|
|
18
27
|
::slotted([role="option"][disabled]),
|
|
19
|
-
::slotted([role="option"][hidden]) { display: none !important }`,ic=oc(Uo),Gi,Vi=0,ac=Oo||Le,zi="click,focusout,input,keydown,mousedown,mouseup",Xi="focus,focusin,blur,focusout",Ie={singular:"%d hit",plural:"%d hits"},ji=class extends qi{constructor(){super(),this._texts=jl({},Ie),this._value="",this._of="/",Jl(this,Uo)}static get observedAttributes(){return["id",...Object.keys(Ie).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ui(this),k(this,"role","listbox"),k(this,"tabindex","-1"),Wt(this._root,"focusin",this),Wt(this._root,"focus",this,!0),Do(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Do(this,!1),Fo(this),this._root=void 0}attributeChangedCallback(t,e,o){const n=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ie[n])this._texts[n]=o||Ie[n];else if(this._root){this._input&&Wo(this,this._input);for(const a of this._root.querySelectorAll(i))Wo(this,a)}}handleEvent(t){const{target:e,type:o}=t;t.defaultPrevented||(o==="click"&&lc(this,t),(o==="focus"||o==="focusin")&&sc(this,t),(o==="blur"||o==="focusout")&&rc(this,t),o==="keydown"&&cc(this,t),o==="mousedown"&&this.contains(e)&&qo(t),(o==="mutation"||o==="input")&&(clearTimeout(Vi),Vi=setTimeout(Qi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Ki=t=>t?.disabled||t?.readOnly||!1,Vt=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=Ki(t?._input)||!e,(o=Do(t))==null||o.takeRecords();const a=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Wo(t,t._input,e),a&&k(t,"popover","manual"),a&&t.togglePopover(e),e&&Qi(t)},Fo=t=>{t._input&&(Me(t._input||t,Xi,t),Me(t._root||t,zi,t),Vt(t,!1),t._input=void 0)},Wo=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",Po(t)),Wt(e,Xi,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",Po(t)),k(e,"aria-expanded",`${!ac||o}`),k(e,"autocomplete","off"),k(e,"role",Ki(e)?null:"combobox")},sc=(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&&Fo(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,Kl,Po((o=t._input.labels)==null?void 0:o[0])),Wt(t._root||t,zi,t),Vt(t,k(t._input,"inputmode")!=="none"),Wi())},rc=(t,e)=>{!Le&&!qo()&&t._input&&setTimeout(Yi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Yi=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})),Fo(t))},lc=(t,{target:e})=>{var o;if(!t._input||t._input===e)return Vt(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),Vt(t,!1)),ec(t._input,n.value);Le&&Yi(t)},cc=(t,e)=>{var o;const{key:n,target:i,altKey:a,ctrlKey:s,shiftKey:r,metaKey:c}=e,l=n==="Escape"||n==="Esc";if(a||s||c||r||n==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Vt(t,!l);const d=[...t.options].filter(p=>k(p,"aria-hidden")!=="true"&&p.offsetHeight),u=d.indexOf(i);let m=-1;if(n==="ArrowDown"&&(m=(u+1)%d.length),n==="ArrowUp"&&(m=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(m=0),(n==="End"||n==="PageDown")&&(m=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[m])for(const p of d)p.tabIndex=-1;d[m]&&e.preventDefault(),(o=d[m]||t._input)==null||o.focus(),!d[m]&&n==="ArrowUp"&&setTimeout(()=>{var p;return(p=t._input)==null?void 0:p.setSelectionRange(999,999)})},Qi=(t,e)=>{const{_texts:o,_root:n,_input:i,options:a}=t,s=i?.value.toLowerCase().trim()||"",r=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const m of a)(m.disabled||m.hidden||r&&!m.label.toLowerCase().includes(s)?c:l).push(m);for(const m of c)k(m,"aria-hidden","true");for(const m of l)k(m,"aria-hidden","false");const d=l.length;clearTimeout(Gi),e?.type==="input"&&s!==t._value&&(Gi=setTimeout(()=>{const m=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&Wi(m),t._value=s},1e3));let u=0;if(Oo)for(const m of l)k(m,"title",`${++u} ${t._of} ${d}`)};Ft&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ui(this).getElementById(k(this,"list")||"")}}),Fi.define("u-datalist",ji),Z()&&!Ul()&&Fl();const dc="3.1.19",Ji="_alert_1gd8q_1 _ds-alert_1hobb_3",Zi="_app_1gd8q_1",ta="_sticky_1gd8q_1",ea="_avatar_1gd8q_1 _ds-avatar_1hobb_1",oa="_badge_1gd8q_1",na="_breadcrumbs_1gd8q_1 _ds-breadcrumbs_1hobb_5",ia="_button_1gd8q_1 _ds-button_1hobb_1",aa="_card_1gd8q_1",sa="_group_1gd8q_1",ra="_chip_1gd8q_1 _ds-chip_1hobb_5",la="_details_1gd8q_1 _ds-details_1hobb_3",ca="_dialog_1gd8q_1 _ds-dialog_1hobb_5",da="__drawer_1gd8q_1",ua="_divider_1gd8q_1",fa="_errorsummary_1gd8q_1 _ds-error-summary_1hobb_5",ma="_field_1gd8q_1 _ds-field_1hobb_1",pa="_suggestion_1gd8q_1 _ds-suggestion_1hobb_5",ha="_affixes_1gd8q_1 _ds-field-affixes_1hobb_3",ga="_fieldset_1gd8q_1 _ds-fieldset_1hobb_3",ba="_fileupload_1gd8q_1",va="_helptext_1gd8q_1 _ds-focus_1hobb_1",wa="_input_1gd8q_1 _ds-input_1hobb_1",ya="_law_1gd8q_1",_a="_grid_1gd8q_1",xa="_flex_1gd8q_1",Ea="_link_1gd8q_1",Sa="_logo_1gd8q_1",$a="__logo_1gd8q_1",Ta="_pagination_1gd8q_1 _ds-pagination_1hobb_5",ka="_popover_1gd8q_1 _ds-popover_1hobb_3",Aa="_print_1gd8q_1",Ca="_progress_1gd8q_1",La="__indeterminate_1gd8q_1",Ma="_skeleton_1gd8q_1 _ds-skeleton_1hobb_5",Ra="__skeleton_1gd8q_1",Ia="_spinner_1gd8q_1",Oa="_steps_1gd8q_1",Da="_table_1gd8q_1 _ds-table_1hobb_5",Pa="__scrollShadow_1gd8q_1",Ha="_tabs_1gd8q_1 _ds-tabs_1hobb_5",Na="__scrollMask_1gd8q_1",qa="_tag_1gd8q_1 _ds-tag_1hobb_5",Ba="_toast_1gd8q_1",Ua="__toastClose_1gd8q_1",Fa="__toastOpen_1gd8q_1",Wa="__toastTimeout_1gd8q_1",Ga="_togglegroup_1gd8q_1 _ds-toggle-group_1hobb_5",Va="__tooltip_1gd8q_1 _ds-tooltip_1hobb_5",za="_heading_1gd8q_1 _ds-heading_1hobb_1",Xa="_ingress_1gd8q_1",ja="_muted_1gd8q_1",Ka="_info_1gd8q_1",Ya="_prose_1gd8q_1",Qa="_validation_1gd8q_1 _ds-validation-message_1hobb_1",Ja="_body_1gd8q_162",Za="__checked_1gd8q_1",A={alert:Ji,app:Zi,sticky:ta,avatar:ea,badge:oa,breadcrumbs:na,button:ia,card:aa,group:sa,chip:ra,details:la,dialog:ca,_drawer:da,divider:ua,errorsummary:fa,field:ma,suggestion:pa,affixes:ha,fieldset:ga,fileupload:ba,helptext:va,input:wa,law:ya,grid:_a,flex:xa,link:Ea,logo:Sa,_logo:$a,pagination:Ta,popover:ka,print:Aa,progress:Ca,_indeterminate:La,skeleton:Ma,_skeleton:Ra,spinner:Ia,steps:Oa,table:Da,_scrollShadow:Pa,tabs:Ha,_scrollMask:Na,tag:qa,toast:Ba,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,togglegroup:Ga,_tooltip:Va,heading:za,ingress:Xa,muted:ja,info:Ka,prose:Ya,validation:Qa,body:Ja,_checked:Za},uc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Za,_drawer:da,_indeterminate:La,_logo:$a,_scrollMask:Na,_scrollShadow:Pa,_skeleton:Ra,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,_tooltip:Va,affixes:ha,alert:Ji,app:Zi,avatar:ea,badge:oa,body:Ja,breadcrumbs:na,button:ia,card:aa,chip:ra,default:A,details:la,dialog:ca,divider:ua,errorsummary:fa,field:ma,fieldset:ga,fileupload:ba,flex:xa,grid:_a,group:sa,heading:za,helptext:va,info:Ka,ingress:Xa,input:wa,law:ya,link:Ea,logo:Sa,muted:ja,pagination:Ta,popover:ka,print:Aa,progress:Ca,prose:Ya,skeleton:Ma,spinner:Ia,steps:Oa,sticky:ta,suggestion:pa,table:Da,tabs:Ha,tag:qa,toast:Ba,togglegroup:Ga,validation:Qa},Symbol.toStringTag,{value:"Module"}));function ts(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=ts(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function fc(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=ts(t))&&(n&&(n+=" "),n+=e);return n}const zt={capture:!0,passive:!0},V=()=>typeof window<"u"&&typeof document<"u",yt=t=>V()?document.getElementsByClassName(A[t].split(" ")[0]):[];function Ot(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const b=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),O=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>es(t,...e)},es=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},rt=(t,e)=>{if(!V())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?O(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},Oe=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return s.observe(t,o),i(),a},M=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,a]of Object.entries(e))b(n,i,a);return n},mc=typeof HTMLElement>"u"?class{}:HTMLElement,pc=(t,e)=>!V()||window.customElements.get(t)||window.customElements.define(t,e),hc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,gc=(t,e)=>{if(!hc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},bc=`[data-command="toggle-app-expanded"],.${A.app.split(" ")[0]} > [command="show-modal"]`,vc=`.${A.breadcrumbs.split(" ")[0]}`,wc=`.${A.card.split(" ")[0]}`,os=`.${A.chip.split(" ")[0]}`,yc=`.${A.helptext.split(" ")[0]}`,_c=`.${A.pagination.split(" ")[0]}`,xc='summary,u-summary,a,button,[role="tab"],[role="button"]',Go="mattilsynet.matomo.cloud",Ec=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",Sc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ns(t,e={}){if(V()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Go}/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:a}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&$c();const s=a?`https://cdn.matomo.cloud/${Go}/container_${a}.js`:`https://cdn.matomo.cloud/${Go}/matomo.js`;document.querySelector(`script[src="${s}"]`)||document.head.append(M("script",{async:"",src:s}))}}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:a}=e,s=["trackEvent",o,n,i,a];let r=location.href;window._paq.push([function(){r=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",r.split("#")[0]]),window._paq.push(s.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",r])}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;Ec.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function $c(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
20
|
-
#${
|
|
21
|
-
#${
|
|
22
|
-
#${
|
|
23
|
-
#${
|
|
24
|
-
#${
|
|
25
|
-
#${
|
|
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.1",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
|
+
#${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
|
+
#${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
|
+
#${K} button:focus-visible { outline: 2px solid }
|
|
32
|
+
#${K} button:hover { background: #0a4e4f }
|
|
33
|
+
#${K} button:active { background: #054449; scale: .9 }
|
|
34
|
+
#${K} p { margin: 0 .25em }
|
|
26
35
|
</style>
|
|
27
|
-
<p>Vi bruker <a href="${
|
|
36
|
+
<p>Vi bruker <a href="${Mu}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
|
|
28
37
|
<form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">×</button></form>
|
|
29
|
-
</dialog>`);const e=document.getElementById(
|
|
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 */
|
|
30
39
|
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
31
40
|
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
32
41
|
|
|
@@ -193,8 +202,11 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
193
202
|
vertical-align: middle;
|
|
194
203
|
width: var(--mtds-5);
|
|
195
204
|
}
|
|
196
|
-
`,id=[.1,.2,.25,.5,1];function ad(t,{aspect:e,type:o}){const i=o==="stacked",a=t[0].reduce((v,f,g)=>{const h=t.map(_=>_[g].number),w=h.reduce((_,y)=>_+y,0);return Math.max(v,...i?[w]:h)},0),s=a/10,r=10**`${Math.round(s)}`.length,c=s/r,l=(id.find(v=>v>c)||1)*r,d=Math.ceil(a/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const m=u.appendChild(M("div",{class:"axisSteps"})),p=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(v,f)=>sd(l*f)).reverse().map(v=>m.append(M("div",{class:"axisStep","data-label":v}))),{total:d,groups:p,axis:u}}const sd=new Intl.NumberFormat().format;function rd(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=M("div",{class:"axisGroup","data-label":e}),a=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(s=>s[n+1]).map(({tooltip:s,color:r,number:c})=>{const l=M("div",{"aria-label":s,"data-event":o,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",r),l.style.setProperty("--value",`${c}`),a.appendChild(l)}),i})}function ld(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"0")||0,a=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...s])=>{const r=M("div",{class:"lineContainer",role:"list"});r.style.setProperty("--color",s[0].color);const c=cd(s.map(({number:u},m,{length:p})=>[100/(p-1)*m,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");b(l,"aria-hidden","true"),b(l,"preserveAspectRatio","none"),b(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(b(d,"class","line"),b(d,"d",c),b(d,"fill","none"),b(d,"stroke","currentColor"),n==="area"){const u=d.cloneNode(!0);b(u,"d",`M-100,100 L${c.slice(1)}L200,100`),b(u,"class","lineShade"),l.append(u)}s.forEach(({number:u,tooltip:m,event:p})=>{const v=M("div",{role:"listitem"}),f=M("div",{"aria-label":m,"data-event":p,tabindex:"0",class:"linePoint",role:"img"});f.style.setProperty("--value",`${u}`),v.appendChild(f),r.append(v)}),r.appendChild(l).append(d),a.append(r)}),a}const cd=(t,e)=>t.map(([o,n],i,a)=>i?dd(i,a,e):`M${o},${n}`).join(" "),ms=([t,e],[o,n])=>[t+o,e+n],ps=([t,e],[o,n])=>[t-o,e-n],hs=(t,[e,o])=>[t*e,t*o],dd=(t,e,o)=>{const n=e[t-1],i=e[t],[a,s]=ms(n,hs(o,ps(i,e[t-2]||n))),[r,c]=ms(i,hs(o,ps(n,e[t+1]||i)));return`C ${a},${s} ${r},${c} ${i[0]},${i[1]}`};function ud(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),b(n,"class","pie"),b(n,"viewBox","0 0 100 100");let i=0;const a=50,s=o==="doughnut"?25:0,r=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,color:u}])=>{if(!l)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=i/r;i+=l;const v=Math.min(i/r,.99999),f=v-p>.5?1:0,g=2*Math.PI*(p-.25),h=2*Math.PI*(v-.25),w=Math.cos(g),_=Math.sin(g),y=Math.cos(h),T=Math.sin(h),S=`M ${a+s*w} ${a+s*_} L ${a+a*w} ${a+a*_} A ${a} ${a} 0 ${f} 1 ${a+a*y} ${a+a*T} L ${a+s*y} ${a+s*T} A ${s} ${s} 0 ${f} 0 ${a+s*w} ${a+s*_}`;m.style.setProperty("--color",u),b(m,"aria-label",c),b(m,"data-event",d),b(m,"d",S),b(m,"role","img"),b(m,"tabindex","0"),n.appendChild(m)}),n}const gs="click keydown mousemove mouseout",bs="mtds-chart-tooltip",lt=V()?document.getElementById(bs)||M("div",{"aria-hidden":"true",class:A._tooltip,hidden:"",id:bs}):null;class fd extends mc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Ot(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=Oe(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),O(this,gs,this)}disconnectedCallback(){lt&&(lt.hidden=!0),es(this,gs,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=hd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[o,n]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,a=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=M("div",{class:"legend"},l);a.appendChild(u).style.setProperty("--color",d)});const{axis:s,groups:r,total:c}=ad(e,{aspect:i,type:n});(o==="column"||o==="bar")&&r.append(...rd(e)),(o==="line"||o==="area")&&r.append(ld(e,{total:c,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(ud(e,{aspect:i,variant:o})),this.shadowRoot?.append(s,a),gc(this,nd)}handleEvent(e){e.type==="click"||e.type==="keydown"?md(e,this):pd(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 md(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,a]=o instanceof Element&&b(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[a]?.querySelector("a,button")?.click?.()}let vs="";function pd(t){if(!lt)return;lt?.isConnected||document.body.append(lt);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(lt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==vs&&(o&&(lt.textContent=o),vs=o,lt.hidden=!o)}const Jo=t=>t?.textContent?.trim()||"",hd=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,a)=>{const s=Jo(e.cells[0]),r=Jo(t?.rows[0].cells[a]),c=Jo(i),l=n===2?`${r}: ${c}`:`${s}: ${c}${r?` (${r})`:""}`;return b(i,"tabindex","-1"),{number:a&&o&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${o}-${a}`,color:`var(--mtdsc-chart-color-${o}-${a}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:b(i,"data-tooltip")||l}}));pc("mtds-chart",fd);const ws=new WeakSet,H=t=>!ws.has(t)&&ws.add(t),D=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),gd=yt("togglegroup"),ys=A.button.split(" "),bd=()=>{for(const t of gd){H(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),D('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))H(e)&&!e.classList.contains(ys[0])&&(e.classList.add(...ys),D('Only setting class="styles.button"','<label class="styles.button">',e))}},vd=yt("breadcrumbs"),wd=()=>{for(const t of vd)H(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...A.breadcrumbs.split(" ")),D('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},yd=yt("errorsummary"),_d=()=>{for(const t of yd)H(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&D('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},xd=yt("dialog"),_s=()=>{for(const t of xd){if(H(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),D(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&D('<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)')?(D('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),b(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(b(t,"open",""),t.close()))}},Ed=()=>{for(const t of document.querySelectorAll("[data-count]"))if(H(t)){const e=b(t,"data-count");t.classList.add(...A.validation.split(" ")),b(t,"data-limit",e),D(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Sd=()=>{for(const t of document.querySelectorAll("[data-command]"))if(H(t)){const e=b(t,"data-command");e==="row"?D(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):D(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},$d=V()?document.getElementsByTagName("u-tabs"):[],Td=()=>{for(const t of $d)H(t)&&D("u-tabs","ds-tabs",t)},Zo=A.suggestion.split(" "),kd=V()?document.getElementsByTagName("u-combobox"):[],Ad=V()?document.getElementsByTagName("ds-suggestion"):[],Cd=()=>{for(const t of kd)H(t)&&(t.classList.add(...Zo),D("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Ad)H(t)&&!t.classList.contains(Zo[0])&&(t.classList.add(...Zo),D("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Ld=({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()},Md=yt("field"),He=new Set,Rd=()=>{for(const t of Md)t.nodeName!=="DS-FIELD"&&(H(t)||D('Only setting class="styles.field"','<ds-field class="styles.field">',t),!He.has(t)&&He.add(t)&&$e.prototype.connectedCallback.call(t))},Id=()=>{for(const t of He)$e.prototype.disconnectedCallback.call(t),He.delete(t)},Od=`[data-description], .${A.field.split(" ")[0]} label + p`,Dd=()=>{for(const t of document.querySelectorAll(Od))H(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),D("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Pd=yt("validation"),Hd=()=>{for(const t of Pd)H(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),D('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Nd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))H(t)&&(b(t,"data-placement",b(t,"data-position")),D("data-position","data-placement",t))},qd=Ot(()=>{Ed(),Sd(),wd(),_s(),_d(),Dd(),Hd(),Nd(),Rd(),bd(),Cd(),Td()},200);rt("deprecations",()=>[Id,O(document,"click",Ld,zt),O(document,"toggle",_s,!0),Oe(document,qd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Bd=Ot(t=>{if(t.animationName!==A._logo)return;const e=t.target.closest?.(`.${A.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),a=i.getPropertyValue("color"),s=i.getPropertyValue("--mtdsc-logo-background"),r=o.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${a}"`);document.head.appendChild(M("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":s}' width='51' height='51' x='2' y='2' stroke='${a}' 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)">${r}</g></svg>`)}`,rel:"icon"}))}},200);rt("logo",()=>[O(document,"animationend",Bd)]);const Ud=A.popover.split(" ")[0];function Fd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&b(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(Ud)&&e){const a=b(e,"popovertargetaction"),s=a==="show"||(a==="hide"?!1:void 0);if(o&&!a&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(s)}}rt("popover",()=>[O(document,"click",Fd)]);const Wd=V()?document.getElementsByTagName("table"):[],Gd=()=>{for(const t of Wd){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)b(i,"data-th",e[i.cellIndex]||":empty")}};rt("table",()=>[Oe(document,Ot(Gd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const xs=A.toast.split(" ")[0],Ne="data-sort";function Vd({animationName:t,target:e}){const o=e;if(t===A._toastTimeout&&o.close(),t!==A._toastOpen)return;const n=Number(b(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(Ne)||b(o,Ne,`${Date.now()}`),b(o,"tabindex","0"),[...document.querySelectorAll(`.${xs}[open]`)].sort((i,a)=>Number(b(a,Ne))-Number(b(i,Ne))).reduce((i,a)=>(a.style.translate=`0 ${a===e?0:i}px`,i+a.offsetHeight+5),0)}function zd({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(xs)&&b(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=window.getComputedStyle(t,"::after"),s=n.top+Number.parseInt(i.paddingTop,10),r=s+Number.parseInt(a.height,10),c=n.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(a.width,10);s<=o&&o<=r&&l<=e&&e<=c&&t.close()}}rt("toast",()=>[O(document,"animationstart",Vd),O(document,"click",zd)]),V()&&mi(document.getElementById("mtds-tooltip")||M("div",{class:A._tooltip,id:"mtds-tooltip",popover:"manual"}));const tn=`.${A.field.split(" ")[0]}`,Xd=`${tn} :is(input,textarea,select)`,jd="ds-suggestion,u-combobox",Kd=A.validation.split(" ")[0],qe=t=>t instanceof HTMLFormElement&&b(t,"data-validation")==="form",en=t=>t.closest(tn),on=t=>t?.querySelectorAll(Xd)||[],Be=t=>t?.getElementsByClassName(Kd)||[],Es=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||b(t,"aria-readonly")==="true"||b(t,"aria-disabled")==="true",o=t.closest(jd)?.items,n=b(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Ss=t=>{const e=t.target?.form||t.target;let o;if(qe(e)){for(const n of e.querySelectorAll(tn)){const i=[...on(n)].find(Es);!o&&i&&(o=i);for(const a of Be(n))b(a,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...on(n)].some(Es);for(const a of Be(n))en(a)||b(a,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},Yd=({target:t})=>{const e=t;if(!qe(e.form))for(const o of Be(e.closest("fieldset")||en(e)))b(o,"hidden","")},Qd=t=>qe(t.target.form)&&t?.preventDefault(),Jd=V()?Be(document):[],Zd=()=>{for(const t of Jd)if(!t.hasAttribute("data-validation")){const e=on(en(t))[0];b(t,"data-validation","form"),qe(e?.form)&&b(t,"hidden","")}};rt("validations",()=>[O(document,"input comboboxbeforeselect",Yd,!0),O(document,"invalid",Qd,!0),O(document,"invalid",Ot(Ss,10),zt),O(document,"submit",Ss,!0),Oe(document,Zd,{childList:!0,subtree:!0})]);var nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",$s=nn&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ts;nn&&/^Mac/i.test(((Ts=navigator.userAgentData)==null?void 0:Ts.platform)||navigator.platform);var tu=typeof HTMLElement>"u"?class{}:HTMLElement;function U(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 eu=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},ou=0,nu=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ou).toString(32)}`),t.id):"",iu=(t,e,o)=>{const n=document.createElement(t);return n.textContent=e,n},au={define:(t,e)=>!nn||window.customElements.get(t)||window.customElements.define(t,e)},su=t=>{var e;const o=U(t,"aria-label")||"";return[...(((e=U(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var s;return i||((s=a?.innerText)==null?void 0:s.trim())||""},o)},ru=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
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
|
+
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
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 }
|
|
197
209
|
:host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
|
|
198
210
|
:host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
|
|
199
211
|
@media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
|
|
200
|
-
@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})({});
|