@mattilsynet/design 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mtds/atlas/atlas-element.js +1 -1
- package/mtds/index.iife.js +10 -10
- package/mtds/index.js +15 -15
- package/mtds/index.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/styles.css +1 -1
- package/package.json +2 -2
package/mtds/index.iife.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var mtds=(function(L){"use strict";var
|
|
1
|
+
var mtds=(function(L){"use strict";var kr=Object.defineProperty,hn=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,gn=(t,e,n)=>e in t?kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lr=(t,e)=>{for(var n in e||(e={}))Tr.call(e,n)&&gn(t,n,e[n]);if(hn)for(var n of hn(e))Ar.call(e,n)&&gn(t,n,e[n]);return t},xt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",vn=xt&&/android/i.test(navigator.userAgent),Cr=xt&&/firefox/i.test(navigator.userAgent),Or=xt&&/iPad|iPhone|iPod/.test(navigator.userAgent),bn;xt&&/^Mac/i.test(((bn=navigator.userAgentData)==null?void 0:bn.platform)||navigator.platform);var Ir="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Mr=typeof HTMLElement>"u"?class{}:HTMLElement;function S(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var wn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ut=(t,...e)=>wn("add",t,e),Nr=(t,...e)=>wn("remove",t,e),zt=new WeakMap,Ee=(t,e)=>{if(e===void 0)return zt.get(t);try{zt.get(t).disconnect(),zt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),zt.set(t,n)}},Pr=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},Rr=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Wr=0,yn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Wr).toString(32)}`),t.id):"",Ft=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))S(o,i,r);return o},qr={define:(t,e)=>!xt||window.customElements.get(t)||window.customElements.define(t,e)},Vr=t=>{var e;const n=S(t,"aria-label")||"";return[...(((e=S(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},nt,Dr=0,Se=t=>{nt||(nt=Ft("div"),nt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",S(nt,"aria-live","assertive")),nt.isConnected||document.body.append(nt),t&&(nt.textContent=`${t}${Dr++%2?" ":""}`)},xn=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},ke=!1,Te=t=>(t?.type==="mouseup"&&(ke=!1),t?.type==="mousedown"&&(ke=!0,Ut(document,"mouseup",Te,{once:!0})),ke),Ur=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
|
|
2
2
|
:host(:not([data-multiple])) ::slotted(data),
|
|
3
3
|
:host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
|
|
4
4
|
::slotted(input[inputmode="none"]) { outline: none } /* Hide temporary foucs outline flash */
|
|
5
5
|
::slotted(del) { text-decoration: none }
|
|
6
6
|
::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
|
|
7
7
|
::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
|
|
8
|
-
::slotted(data:focus) { ${Or} }`,xn="beforeinput,blur,focus,click,input,keydown,mousedown",En={once:!0,passive:!0},Bt="false",Ur=Lr&&!gn,zr=gn||Cr,Sn="".repeat(5),kn="deleteContentBackward",Fr="insertText",Gt={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",of:"of",remove:"Press to remove",removed:"Removed"},Ae=class extends Ir{constructor(){super(),this._item="",this._speak="",this._texts=Ar({},Gt),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Ft("slot"),Ft("style",Dr))}static get observedAttributes(){return Object.keys(Gt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Rr(this),Ut(this,xn,this,!0),Ee(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Jt,0,this),setTimeout(Ht,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];Gt[o]&&(this._texts[o]=n||Gt[o])}disconnectedCallback(){Ee(this,!1),Mr(this,xn,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;Ce(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Gr(this),t.type==="click"&&Hr(this,t),t.type==="focus"&&Br(this,t),t.type==="input"&&Xr(this,t),t.type==="keydown"&&jr(this,t),t.type==="mousedown"&&Te(t),t.type==="mutation"&&Jt(this,t))}get multiple(){var t;return((t=S(this,"data-multiple"))!=null?t:Bt)!==Bt}set multiple(t){S(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=S(this,"data-creatable"))!=null?t:Bt)!==Bt}set creatable(t){S(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("u-datalist,datalist")),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(n)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},ot=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Le=t=>t instanceof HTMLDataElement,Ce=({control:t})=>t?.disabled||t?.readOnly||!1,Jt=(t,e)=>{var n;const{_focus:o,_texts:i,items:r,control:a,list:s,multiple:l}=t;if(!a||!s)return;const c=qr(a),d=c.endsWith(Sn)?S(a,"data-label"):c;S(a,"data-label",d);let u=`${d}${l?`, ${r.length?i.found.replace("%d",`${r.length}`):i.empty}`:""}`;const h=[];for(const{addedNodes:b,removedNodes:y}of e?.detail||[]){for(const x of b)Le(x)&&h.unshift(x);for(const x of y)Le(x)&&h.push(x)}const g=l?h.length===1:h[0]===o;if(o&&g){const b=S(a,"aria-expanded"),y=S(a,"inputmode"),x=Le(o)?a:o,E=!h[0].isConnected;t._speak=`${i[E?"removed":"added"]} ${ot(h[0])}, `,(zr||o===a)&&Se(t._speak),a!==x&&(S(a,"aria-expanded",null),S(a,"inputmode","none"),u=" ",a.focus()),setTimeout(()=>{var C;S(a,"aria-expanded",b),S(a,"inputmode",E?"none":y),(C=x?.focus)==null||C.call(x),S(a,"inputmode",y),t._speak="",Ur?Ut(t,"blur",()=>Jt(t),En):setTimeout(Jt,100,t)},100)}let w=0;const p=t.querySelector("select"),v=Ce(t)?"":`${i.remove}, `;for(const b of r){const y=p?.options[w],x=ot(b),E=b.value||x,C=`${t._speak}${x}, ${v}${++w} ${i.of} ${r.length}`;S(b,"role","button"),S(b,"value",E),S(b,"tabindex","-1"),S(b,"aria-label",C),y?Object.assign(y,{textContent:x,value:E}):p?.appendChild(new Option(x,E,!0,!0))}p&&S(p,"multiple",l?"":null);for(const b of[...p?.options||[]].slice(w))b.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),S(s,"aria-multiselectable",`${l}`),S(a,"list",wn(s)),S(a,"aria-label",`${t._speak}${u}${Sn}`),s.hasAttribute("popover")&&(S(a,"popovertarget",wn(s)),S(s,"popover","manual"));const f=ot(r[0]);f!==t._item&&Ht(t),t._item=f,Tn(t),An(t),(n=Ee(t))==null||n.takeRecords()},Tn=t=>{var e;t.clear&&S(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Ce(t))},An=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=S(r,"value"))!=null?e:ot(r);S(r,"aria-label",n?`${n}${ot(r)}`:null),S(r,"selected",i.includes(a)?"":null)}},Ht=t=>{const{multiple:e,control:n,items:o}=t,i=ot(o[0]);!e&&n&&i!==n.value&&yn(n,i,i?Fr:kn)},Oe=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:l}=t,c=((n=a?.value)==null?void 0:n.trim())||"",d=c.toLowerCase()||null;let u=[...i].find(g=>(S(g,"label")||ot(g)).trim().toLowerCase()===d);const h={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",h))||(u=[...i].find(g=>g.selected)),e)return An(t),u?ft(t,u,!1):r&&c?ft(t,{value:c},!1):(!l&&!c&&s[0]?ft(t,s[0]):Ht(t),Se(o.invalid));for(const g of i)g.selected=g===u},ft=(t,e,n=!0)=>{const{control:o,items:i,multiple:r}=t,a=Ft("data",e.label||e.value,{value:e.value}),s=[...i].find(d=>d.value===e.value),l={bubbles:!0,cancelable:!0,detail:s||a};if(s&&!n)return Ht(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",l))){if(!r)for(const d of[...i])d.remove();s?s.remove():o?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("comboboxafterselect",l))}},Br=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),Se()},Gr=t=>Te()||setTimeout(Jr,0,t),Jr=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Oe(t),t._focus=void 0)},Hr=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&yn(a,"",kn),a?.focus();for(const l of s){const{top:c,right:d,bottom:u,left:h}=l.getBoundingClientRect();if(l.contains(i))return ft(t,l);if(o>=c&&o<=u&&n>=h&&n<=d)return l.focus()}i===t&&a?.focus()},Xr=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const l of o)if(l.value&&l.value===a)return ft(t,l,r)}else r||Oe(t,!1);Tn(t)},jr=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:l}=e,c=i&&i===l,d=c&&i.selectionEnd,u=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;let h=c?r.length:[...r].indexOf(l);if(c&&a==="Tab"&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Ut(o,"blur",()=>S(o,"tabindex",null),En)),!(!c&&Nr(e)||h===-1||u)){if(a==="ArrowRight"&&!c)h+=1;else if(a==="ArrowLeft"&&!d)h-=1;else if(a==="Enter"&&c){const g=S(i,"form");return S(i,"form","#"),requestAnimationFrame(()=>S(i,"form",g)),Oe(t)}else if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[h])return ft(t,r[h]);c&&(h-=1)}else return c||i?.focus();e.preventDefault(),(n=r[Math.max(0,h)]||i)==null||n.focus()}};Wr.define("u-combobox",Ae);var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Zr=Ie&&/android/i.test(navigator.userAgent),Ln;Ie&&/^Mac/i.test(((Ln=navigator.userAgentData)==null?void 0:Ln.platform)||navigator.platform);var Kr=`${Zr?"data":"aria"}-labelledby`,Me=":host(:not([hidden])) { display: block }",Xt=typeof HTMLElement>"u"?class{}:HTMLElement;function N(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Cn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Yr=(t,...e)=>Cn("add",t,e),Qr=(t,...e)=>Cn("remove",t,e),jt=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Nn("slot"),Nn("style",e)),Zt=new WeakMap,On=(t,e)=>{if(e===void 0)return Zt.get(t);try{Zt.get(t).disconnect(),Zt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Zt.set(t,n)}},_r=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},In=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},$r=0,Mn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++$r).toString(32)}`),t.id):"",Nn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Kt={define:(t,e)=>!Ie||window.customElements.get(t)||window.customElements.define(t,e)},ta=Me,ea=Me,na=Me,oa=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',Yt="aria-controls",ht="aria-selected",Rn=class extends Xt{constructor(){super(),jt(this,ta)}get tabList(){return Qt("u-tablist",this)[0]||null}get selectedIndex(){return _t(this.tabs)}set selectedIndex(t){Pe(this.tabs[t])}get tabs(){return Qt("u-tab",this)}get panels(){return Qt("u-tabpanel",this)}},Pn=class extends Xt{constructor(){super(),jt(this,ea)}connectedCallback(){N(this,"role","tablist"),Yr(this,"click,keydown",this),On(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){Qr(this,"click,keydown",this),On(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const r=this.tabs[Math.max(this.selectedIndex,0)];return r?.setAttribute(ht,"true")}const{key:e}=t,n=[...this.tabs],o=n.findIndex(r=>r.contains(t.target));let i=o;if(!(t.defaultPrevented||o===-1)&&(t.type==="click"&&Pe(n[o]),t.type==="keydown"&&!_r(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(o+1)%n.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(o||n.length)-1;else if(e==="End")i=n.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=_t(n);else return;setTimeout(()=>{n[o].tabIndex=-1,n[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),n[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return _t(this.tabs)}set selectedIndex(t){Pe(this.tabs[t])}},Ne=!1,Wn=class extends Xt{static get observedAttributes(){return["id",ht,Yt]}constructor(){super(),jt(this,oa)}connectedCallback(){N(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!Ne&&this.selected&&this.tabList){Ne=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=Qt("u-tabpanel",this.tabsElement||this),n=Re(this,e[t.indexOf(this)]);n&&N(n,Kr,Mn(this)),t.forEach((o,i)=>{const r=Re(o,e[i]);o.tabIndex=o===this?0:-1,N(o,ht,`${o===this}`),N(o,Yt,r?.id||null),r&&(r.hidden=r!==n)}),Ne=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return N(this,ht)==="true"}set selected(t){N(this,ht,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return Re(this)}},qn=class extends Xt{static get observedAttributes(){return["hidden"]}constructor(){super(),jt(this,na)}connectedCallback(){N(this,"role","tabpanel"),this.hidden=_t(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){const t=this.hidden;N(this,"aria-hidden",`${t}`),N(this,"tabindex",t||ia(this.firstChild)?null:"0")}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${Yt}="${this.id}"]`;return In(this).querySelectorAll(t)}},Qt=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),Re=(t,e)=>{const n=N(t,Yt)||Mn(e),o=In(t).getElementById(n);return o?.nodeName==="U-TABPANEL"?o:null},_t=t=>[...t].findIndex(e=>N(e,ht)==="true"),Pe=t=>t&&N(t,"aria-disabled")!=="true"&&N(t,"aria-selected","true"),ia=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');Kt.define("u-tabs",Rn),Kt.define("u-tablist",Pn),Kt.define("u-tab",Wn),Kt.define("u-tabpanel",qn);function ra(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function aa(){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,v,f=!0){Object.defineProperty(p,v,{...Object.getOwnPropertyDescriptor(p,v),enumerable:f})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(v,f={}){super(v,f);const{source:b,command:y}=f;if(b!=null&&!(b instanceof Element))throw new TypeError("source must be an element");n.set(this,b||null),o.set(this,y!==void 0?String(y):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const v=n.get(this);if(!(v instanceof Element))return null;const f=e(v);return f!==e(this.target||document)?f.host:v}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(v,f={}){throw super(v,f),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(v){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(v===null)this.removeAttribute("commandfor"),a.delete(this);else if(v instanceof Element){this.setAttribute("commandfor","");const f=e(v);e(this)===f||f===this.ownerDocument?a.set(this,v):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const v=a.get(this);if(v)return v.isConnected?v:(a.delete(this),null);const f=e(this),b=this.getAttribute("commandfor");return(f instanceof Document||f instanceof ShadowRoot)&&b&&f.getElementById(b)||null}},command:{enumerable:!0,configurable:!0,get(){const v=this.getAttribute("command")||"";if(v.startsWith("--"))return v;const f=v.toLowerCase();switch(f){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return f}return""},set(v){this.setAttribute("command",v)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(v){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(v){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const l=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),l.get(this)||null},set(p){const v=l.get(this)||null;v&&this.removeEventListener("command",v),l.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function c(p){for(const v of p)v.oncommand=new Function("event",v.getAttribute("oncommand"))}const d=new MutationObserver(p=>{for(const v of p){const{target:f}=v;v.type==="childList"?c(f.querySelectorAll("[oncommand]")):c([f])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),c(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function h(p){if(u.has(p)||(u.add(p),p.defaultPrevented)||p.type!=="click")return;const v=p.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(v&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),v.matches("input")))throw new Error("Input elements no longer support `commandfor`");const f=p.target.closest("button[commandfor], button[command]");if(!f)return;if(f.form&&f.getAttribute("type")!=="button")throw p.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(f.hasAttribute("command")!==f.hasAttribute("commandfor")){const E=f.hasAttribute("command")?"command":"commandfor",C=f.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${E} attribute must also have a ${C} attribute to function.`)}if(f.command!=="show-popover"&&f.command!=="hide-popover"&&f.command!=="toggle-popover"&&f.command!=="show-modal"&&f.command!=="request-close"&&f.command!=="close"&&!f.command.startsWith("--")){console.warn(`"${f.command}" is not a valid command value. Custom commands must begin with --`);return}const b=f.commandForElement;if(!b)return;const y=new i("command",{command:f.command,source:f,cancelable:!0});if(b.dispatchEvent(y),y.defaultPrevented)return;const x=y.command.toLowerCase();if(b.popover){const E=!b.matches(":popover-open");E&&(x==="toggle-popover"||x==="show-popover")?b.showPopover({source:f}):!E&&x==="hide-popover"&&b.hidePopover()}else if(b.localName==="dialog"){const E=!b.hasAttribute("open");E&&x=="show-modal"?b.showModal():!E&&x=="close"?b.close(f.value?f.value:void 0):!E&&x=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const C=new Event("cancel",{cancelable:!0});this.dispatchEvent(C),C.defaultPrevented||this.close()}),b.requestClose(f.value?f.value:void 0))}}function g(p){p.addEventListener("click",h,!0)}function w(p,v){const f=p.prototype.attachShadow;p.prototype.attachShadow=function(y){const x=f.call(this,y);return v(x),x};const b=p.prototype.attachInternals;p.prototype.attachInternals=function(){const y=b.call(this);return y.shadowRoot&&v(y.shadowRoot),y}}s(HTMLButtonElement),w(HTMLElement,p=>{g(p),d.observe(p,{attributeFilter:["oncommand"]}),c(p.querySelectorAll("[oncommand]"))}),g(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}ra()||aa();var $t=new WeakMap;function te(t){const e=t.getAttribute("closedby");return e==="closerequest"||e==="none"?e:"any"}function sa(t){const e=Array.from(Et);return e[e.length-1]===t}var Et=new Set;function Vn(t){if(t.key!=="Escape"||Et.size===0)return;let e=!1,n=!1;const o=Array.from(Et).reverse();for(const i of o){const r=te(i);if(r==="none"){e=!0;break}if(r==="any"||r==="closerequest"){i.close(),n=!0;break}}(e||n)&&t.preventDefault()}document.addEventListener("keydown",Vn);function la(t){return function(n){if(!sa(t)||te(t)!=="any"||!t.open)return;const o=t.getBoundingClientRect(),{clientX:i,clientY:r}=n;o.top<=r&&r<=o.bottom&&o.left<=i&&i<=o.right||t.close()}}function ca(t){return function(n){if(n.target!==t||te(t)!=="any")return;const o=t.getBoundingClientRect();o.top<n.clientY&&n.clientY<o.bottom&&o.left<n.clientX&&n.clientX<o.right||t.close()}}function da(t){return function(n){te(t)==="none"&&n.preventDefault()}}function St(t){if($t.has(t))return;const e={handleEscape:Vn,handleClick:ca(t),handleDocClick:la(t),handleCancel:da(t),attrObserver:new MutationObserver(()=>{})};t.addEventListener("click",e.handleClick),t.addEventListener("cancel",e.handleCancel),document.addEventListener("click",e.handleDocClick,!0),e.attrObserver.observe(t,{attributes:!0,attributeFilter:["closedby"]}),Et.add(t),$t.set(t,e)}function ee(t){const e=$t.get(t);e&&(t.removeEventListener("click",e.handleClick),t.removeEventListener("cancel",e.handleCancel),document.removeEventListener("click",e.handleDocClick,!0),e.attrObserver.disconnect(),Et.delete(t),$t.delete(t))}function We(t){t.querySelectorAll("dialog[closedby]").forEach(o=>{o instanceof HTMLDialogElement&&o.open&&St(o)});const e=new MutationObserver(o=>{o.forEach(i=>{i.addedNodes.forEach(r=>{r instanceof HTMLDialogElement&&r.open&&r.hasAttribute("closedby")&&St(r),r instanceof Element&&r.querySelectorAll("dialog[closedby]").forEach(a=>{a instanceof HTMLDialogElement&&a.open&&St(a)})}),i.removedNodes.forEach(r=>{r instanceof HTMLDialogElement&&ee(r),r instanceof Element&&r.querySelectorAll("dialog").forEach(ee)})})}),n=t===document?document.body:t;e.observe(n,{childList:!0,subtree:!0})}function Dn(t){const e=[];t.shadowRoot&&e.push(t.shadowRoot);for(const n of Array.from(t.children))e.push(...Dn(n));return e}function ua(){We(document),document.body&&Dn(document.body).forEach(We);const t=HTMLElement.prototype.attachShadow;HTMLElement.prototype.attachShadow=function(n){const o=t.call(this,n);return We(o),o}}var Un=!1;function zn(){return typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype=="object"&&"closedBy"in HTMLDialogElement.prototype}function pa(){if(Un||zn())return;if(!("showModal"in HTMLDialogElement.prototype)){console.warn("[closedBy polyfill] <dialog> API not found – polyfill skipped.");return}const t=HTMLDialogElement.prototype.showModal,e=HTMLDialogElement.prototype.close;HTMLDialogElement.prototype.showModal=function(){t.call(this),this.open&&this.hasAttribute("closedby")&&St(this)},HTMLDialogElement.prototype.close=function(o){ee(this),e.call(this,o)},Object.defineProperty(HTMLDialogElement.prototype,"closedBy",{get(){const n=this.getAttribute("closedby");return n==="closerequest"||n==="none"?n:"any"},set(n){n==="any"||n==="closerequest"||n==="none"?this.setAttribute("closedby",n):(console.warn(`[closedBy polyfill] Invalid value '${n}'. Falling back to 'any'.`),this.setAttribute("closedby","any")),this.open&&(this.hasAttribute("closedby")?St(this):ee(this))},enumerable:!0,configurable:!0}),ua(),Un=!0}zn()||pa();const ma=`@font-face {
|
|
8
|
+
::slotted(data:focus) { ${Ir} }`,En="beforeinput,blur,focus,click,input,keydown,mousedown",Sn={once:!0,passive:!0},Bt="false",zr=Cr&&!vn,Fr=vn||Or,kn="".repeat(5),Tn="deleteContentBackward",Br="insertText",Gt={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",of:"of",remove:"Press to remove",removed:"Removed"},Ae=class extends Mr{constructor(){super(),this._item="",this._speak="",this._texts=Lr({},Gt),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Ft("slot"),Ft("style",Ur))}static get observedAttributes(){return Object.keys(Gt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Rr(this),Ut(this,En,this,!0),Ee(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Jt,0,this),setTimeout(Ht,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];Gt[o]&&(this._texts[o]=n||Gt[o])}disconnectedCallback(){Ee(this,!1),Nr(this,En,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;Ce(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Jr(this),t.type==="click"&&jr(this,t),t.type==="focus"&&Gr(this,t),t.type==="input"&&Xr(this,t),t.type==="keydown"&&Zr(this,t),t.type==="mousedown"&&Te(t),t.type==="mutation"&&Jt(this,t))}get multiple(){var t;return((t=S(this,"data-multiple"))!=null?t:Bt)!==Bt}set multiple(t){S(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=S(this,"data-creatable"))!=null?t:Bt)!==Bt}set creatable(t){S(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("u-datalist,datalist")),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(n)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},ot=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Le=t=>t instanceof HTMLDataElement,Ce=({control:t})=>t?.disabled||t?.readOnly||!1,Jt=(t,e)=>{var n;const{_focus:o,_texts:i,items:r,control:a,list:s,multiple:l}=t;if(!a||!s)return;const c=Vr(a),d=c.endsWith(kn)?S(a,"data-label"):c;S(a,"data-label",d);let u=`${d}${l?`, ${r.length?i.found.replace("%d",`${r.length}`):i.empty}`:""}`;const h=[];for(const{addedNodes:b,removedNodes:y}of e?.detail||[]){for(const x of b)Le(x)&&h.unshift(x);for(const x of y)Le(x)&&h.push(x)}const g=l?h.length===1:h[0]===o;if(o&&g){const b=S(a,"aria-expanded"),y=S(a,"inputmode"),x=Le(o)?a:o,E=!h[0].isConnected;t._speak=`${i[E?"removed":"added"]} ${ot(h[0])}, `,(Fr||o===a)&&Se(t._speak),a!==x&&(S(a,"aria-expanded",null),S(a,"inputmode","none"),u=" ",a.focus()),setTimeout(()=>{var C;S(a,"aria-expanded",b),S(a,"inputmode",E?"none":y),(C=x?.focus)==null||C.call(x),S(a,"inputmode",y),t._speak="",zr?Ut(t,"blur",()=>Jt(t),Sn):setTimeout(Jt,100,t)},100)}let w=0;const p=t.querySelector("select"),v=Ce(t)?"":`${i.remove}, `;for(const b of r){const y=p?.options[w],x=ot(b),E=b.value||x,C=`${t._speak}${x}, ${v}${++w} ${i.of} ${r.length}`;S(b,"role","button"),S(b,"value",E),S(b,"tabindex","-1"),S(b,"aria-label",C),y?Object.assign(y,{textContent:x,value:E}):p?.appendChild(new Option(x,E,!0,!0))}p&&S(p,"multiple",l?"":null);for(const b of[...p?.options||[]].slice(w))b.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),S(s,"aria-multiselectable",`${l}`),S(a,"list",yn(s)),S(a,"aria-label",`${t._speak}${u}${kn}`),s.hasAttribute("popover")&&(S(a,"popovertarget",yn(s)),S(s,"popover","manual"));const f=ot(r[0]);f!==t._item&&Ht(t),t._item=f,An(t),Ln(t),(n=Ee(t))==null||n.takeRecords()},An=t=>{var e;t.clear&&S(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Ce(t))},Ln=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=S(r,"value"))!=null?e:ot(r);S(r,"aria-label",n?`${n}${ot(r)}`:null),S(r,"selected",i.includes(a)?"":null)}},Ht=t=>{const{multiple:e,control:n,items:o}=t,i=ot(o[0]);!e&&n&&i!==n.value&&xn(n,i,i?Br:Tn)},Oe=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:l}=t,c=((n=a?.value)==null?void 0:n.trim())||"",d=c.toLowerCase()||null;let u=[...i].find(g=>(S(g,"label")||ot(g)).trim().toLowerCase()===d);const h={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",h))||(u=[...i].find(g=>g.selected)),e)return Ln(t),u?ft(t,u,!1):r&&c?ft(t,{value:c},!1):(!l&&!c&&s[0]?ft(t,s[0]):Ht(t),Se(o.invalid));for(const g of i)g.selected=g===u},ft=(t,e,n=!0)=>{const{control:o,items:i,multiple:r}=t,a=Ft("data",e.label||e.value,{value:e.value}),s=[...i].find(d=>d.value===e.value),l={bubbles:!0,cancelable:!0,detail:s||a};if(s&&!n)return Ht(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",l))){if(!r)for(const d of[...i])d.remove();s?s.remove():o?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("comboboxafterselect",l))}},Gr=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),Se()},Jr=t=>Te()||setTimeout(Hr,0,t),Hr=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Oe(t),t._focus=void 0)},jr=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&xn(a,"",Tn),a?.focus();for(const l of s){const{top:c,right:d,bottom:u,left:h}=l.getBoundingClientRect();if(l.contains(i))return ft(t,l);if(o>=c&&o<=u&&n>=h&&n<=d)return l.focus()}i===t&&a?.focus()},Xr=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const l of o)if(l.value&&l.value===a)return ft(t,l,r)}else r||Oe(t,!1);An(t)},Zr=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:l}=e,c=i&&i===l,d=c&&i.selectionEnd,u=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;let h=c?r.length:[...r].indexOf(l);if(c&&a==="Tab"&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Ut(o,"blur",()=>S(o,"tabindex",null),Sn)),!(!c&&Pr(e)||h===-1||u)){if(a==="ArrowRight"&&!c)h+=1;else if(a==="ArrowLeft"&&!d)h-=1;else if(a==="Enter"&&c){const g=S(i,"form");return S(i,"form","#"),requestAnimationFrame(()=>S(i,"form",g)),Oe(t)}else if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[h])return ft(t,r[h]);c&&(h-=1)}else return c||i?.focus();e.preventDefault(),(n=r[Math.max(0,h)]||i)==null||n.focus()}};qr.define("u-combobox",Ae);var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Kr=Ie&&/android/i.test(navigator.userAgent),Cn;Ie&&/^Mac/i.test(((Cn=navigator.userAgentData)==null?void 0:Cn.platform)||navigator.platform);var Yr=`${Kr?"data":"aria"}-labelledby`,Me=":host(:not([hidden])) { display: block }",jt=typeof HTMLElement>"u"?class{}:HTMLElement;function P(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var On=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qr=(t,...e)=>On("add",t,e),_r=(t,...e)=>On("remove",t,e),Xt=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Pn("slot"),Pn("style",e)),Zt=new WeakMap,In=(t,e)=>{if(e===void 0)return Zt.get(t);try{Zt.get(t).disconnect(),Zt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Zt.set(t,n)}},$r=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Mn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ta=0,Nn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ta).toString(32)}`),t.id):"",Pn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Kt={define:(t,e)=>!Ie||window.customElements.get(t)||window.customElements.define(t,e)},ea=Me,na=Me,oa=Me,ia=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',Yt="aria-controls",ht="aria-selected",Rn=class extends jt{constructor(){super(),Xt(this,ea)}get tabList(){return Qt("u-tablist",this)[0]||null}get selectedIndex(){return _t(this.tabs)}set selectedIndex(t){Re(this.tabs[t])}get tabs(){return Qt("u-tab",this)}get panels(){return Qt("u-tabpanel",this)}},Wn=class extends jt{constructor(){super(),Xt(this,na)}connectedCallback(){P(this,"role","tablist"),Qr(this,"click,keydown",this),In(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){_r(this,"click,keydown",this),In(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const r=this.tabs[Math.max(this.selectedIndex,0)];return r?.setAttribute(ht,"true")}const{key:e}=t,n=[...this.tabs],o=n.findIndex(r=>r.contains(t.target));let i=o;if(!(t.defaultPrevented||o===-1)&&(t.type==="click"&&Re(n[o]),t.type==="keydown"&&!$r(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(o+1)%n.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(o||n.length)-1;else if(e==="End")i=n.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=_t(n);else return;setTimeout(()=>{n[o].tabIndex=-1,n[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),n[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return _t(this.tabs)}set selectedIndex(t){Re(this.tabs[t])}},Ne=!1,qn=class extends jt{static get observedAttributes(){return["id",ht,Yt]}constructor(){super(),Xt(this,ia)}connectedCallback(){P(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!Ne&&this.selected&&this.tabList){Ne=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=Qt("u-tabpanel",this.tabsElement||this),n=Pe(this,e[t.indexOf(this)]);n&&P(n,Yr,Nn(this)),t.forEach((o,i)=>{const r=Pe(o,e[i]);o.tabIndex=o===this?0:-1,P(o,ht,`${o===this}`),P(o,Yt,r?.id||null),r&&(r.hidden=r!==n)}),Ne=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return P(this,ht)==="true"}set selected(t){P(this,ht,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return Pe(this)}},Vn=class extends jt{static get observedAttributes(){return["hidden"]}constructor(){super(),Xt(this,oa)}connectedCallback(){P(this,"role","tabpanel"),this.hidden=_t(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){const t=this.hidden;P(this,"aria-hidden",`${t}`),P(this,"tabindex",t||ra(this.firstChild)?null:"0")}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${Yt}="${this.id}"]`;return Mn(this).querySelectorAll(t)}},Qt=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),Pe=(t,e)=>{const n=P(t,Yt)||Nn(e),o=Mn(t).getElementById(n);return o?.nodeName==="U-TABPANEL"?o:null},_t=t=>[...t].findIndex(e=>P(e,ht)==="true"),Re=t=>t&&P(t,"aria-disabled")!=="true"&&P(t,"aria-selected","true"),ra=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');Kt.define("u-tabs",Rn),Kt.define("u-tablist",Wn),Kt.define("u-tab",qn),Kt.define("u-tabpanel",Vn);const aa=`@font-face {
|
|
9
9
|
font-family: 'Mattilsynet Sans';
|
|
10
10
|
font-style: normal italic;
|
|
11
11
|
font-weight: 100 900;
|
|
@@ -155,7 +155,7 @@ var mtds=(function(L){"use strict";var Sr=Object.defineProperty,fn=Object.getOwn
|
|
|
155
155
|
white-space: pre-wrap;
|
|
156
156
|
width: calc(var(--mtdsc-print-inner-width) / 3);
|
|
157
157
|
}
|
|
158
|
-
}`,fa="2.3.2",Fn="_alert_1p489_1 _ds-alert_1331q_3",Bn="_app_1p489_1",Gn="_sticky_1p489_1",Jn="_avatar_1p489_1 _ds-avatar_1331q_1",Hn="_badge_1p489_1",Xn="_breadcrumbs_1p489_1 _ds-breadcrumbs_1331q_5",jn="_button_1p489_1 _ds-button_1331q_1",Zn="_card_1p489_1",Kn="_group_1p489_1",Yn="_chip_1p489_1 _ds-chip_1331q_5",Qn="_details_1p489_1 _ds-details_1331q_3",_n="_dialog_1p489_1 _ds-dialog_1331q_5",$n="__drawer_1p489_1",to="_divider_1p489_1",eo="_errorsummary_1p489_1 _ds-error-summary_1331q_5",no="__errorsummary_1p489_1",oo="_field_1p489_1 _ds-field_1331q_1",io="__datalist_1p489_1",ro="_affixes_1p489_1 _ds-field-affixes_1331q_3",ao="_fieldset_1p489_1 _ds-fieldset_1331q_3",so="_fileupload_1p489_1",lo="_helptext_1p489_1 _ds-focus_1331q_1",co="_input_1p489_1 _ds-input_1331q_1",uo="_law_1p489_1",po="_grid_1p489_1",mo="_flex_1p489_1",fo="_link_1p489_1",ho="_logo_1p489_1",go="_pagination_1p489_1 _ds-pagination_1331q_5",vo="_popover_1p489_1",bo="_progress_1p489_1",wo="__indeterminate_1p489_1",yo="_skeleton_1p489_1 _ds-skeleton_1331q_5",xo="__skeleton_1p489_1",Eo="_spinner_1p489_1",So="_steps_1p489_1",ko="_table_1p489_1 _ds-table_1331q_5",To="__scrollShadow_1p489_1",Ao="_tabs_1p489_1 _ds-tabs_1331q_5",Lo="__scrollMask_1p489_1",Co="_tag_1p489_1 _ds-tag_1331q_5",Oo="_toast_1p489_1",Io="__toastClose_1p489_1",Mo="__toastOpen_1p489_1",No="__toastTimeout_1p489_1",Ro="_togglegroup_1p489_1",Po="__tooltip_1p489_1",Wo="_heading_1p489_1 _ds-heading_1331q_1",qo="_ingress_1p489_1",Vo="_muted_1p489_1",Do="_info_1p489_1",Uo="_prose_1p489_1",zo="_validation_1p489_1 _ds-validation-message_1331q_1",Fo="_body_1p489_186",Bo="__checked_1p489_1",k={alert:Fn,app:Bn,sticky:Gn,avatar:Jn,badge:Hn,breadcrumbs:Xn,button:jn,card:Zn,group:Kn,chip:Yn,details:Qn,dialog:_n,_drawer:$n,divider:to,errorsummary:eo,_errorsummary:no,field:oo,_datalist:io,affixes:ro,fieldset:ao,fileupload:so,helptext:lo,input:co,law:uo,grid:po,flex:mo,link:fo,logo:ho,pagination:go,popover:vo,progress:bo,_indeterminate:wo,skeleton:yo,_skeleton:xo,spinner:Eo,steps:So,table:ko,_scrollShadow:To,tabs:Ao,_scrollMask:Lo,tag:Co,toast:Oo,_toastClose:Io,_toastOpen:Mo,_toastTimeout:No,togglegroup:Ro,_tooltip:Po,heading:Wo,ingress:qo,muted:Vo,info:Do,prose:Uo,validation:zo,body:Fo,_checked:Bo},ha=Object.freeze(Object.defineProperty({__proto__:null,_checked:Bo,_datalist:io,_drawer:$n,_errorsummary:no,_indeterminate:wo,_scrollMask:Lo,_scrollShadow:To,_skeleton:xo,_toastClose:Io,_toastOpen:Mo,_toastTimeout:No,_tooltip:Po,affixes:ro,alert:Fn,app:Bn,avatar:Jn,badge:Hn,body:Fo,breadcrumbs:Xn,button:jn,card:Zn,chip:Yn,default:k,details:Qn,dialog:_n,divider:to,errorsummary:eo,field:oo,fieldset:ao,fileupload:so,flex:mo,grid:po,group:Kn,heading:Wo,helptext:lo,info:Do,ingress:qo,input:co,law:uo,link:fo,logo:ho,muted:Vo,pagination:go,popover:vo,progress:bo,prose:Uo,skeleton:yo,spinner:Eo,steps:So,sticky:Gn,table:ko,tabs:Ao,tag:Co,toast:Oo,togglegroup:Ro,validation:zo},Symbol.toStringTag,{value:"Module"})),gt=Math.min,q=Math.max,ne=Math.round,oe=Math.floor,J=t=>({x:t,y:t}),ga={left:"right",right:"left",bottom:"top",top:"bottom"},va={start:"end",end:"start"};function Go(t,e,n){return q(t,gt(e,n))}function ie(t,e){return typeof t=="function"?t(e):t}function it(t){return t.split("-")[0]}function re(t){return t.split("-")[1]}function Jo(t){return t==="x"?"y":"x"}function Ho(t){return t==="y"?"height":"width"}const ba=new Set(["top","bottom"]);function $(t){return ba.has(it(t))?"y":"x"}function Xo(t){return Jo($(t))}function wa(t,e,n){n===void 0&&(n=!1);const o=re(t),i=Xo(t),r=Ho(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ae(a)),[a,ae(a)]}function ya(t){const e=ae(t);return[qe(t),e,qe(e)]}function qe(t){return t.replace(/start|end/g,e=>va[e])}const jo=["left","right"],Zo=["right","left"],xa=["top","bottom"],Ea=["bottom","top"];function Sa(t,e,n){switch(t){case"top":case"bottom":return n?e?Zo:jo:e?jo:Zo;case"left":case"right":return e?xa:Ea;default:return[]}}function ka(t,e,n,o){const i=re(t);let r=Sa(it(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(qe)))),r}function ae(t){return t.replace(/left|right|bottom|top/g,e=>ga[e])}function Ta(t){return{top:0,right:0,bottom:0,left:0,...t}}function Aa(t){return typeof t!="number"?Ta(t):{top:t,right:t,bottom:t,left:t}}function se(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Ko(t,e,n){let{reference:o,floating:i}=t;const r=$(e),a=Xo(e),s=Ho(a),l=it(e),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-i.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-i.width,y:u};break;default:g={x:o.x,y:o.y}}switch(re(e)){case"start":g[a]-=h*(n&&c?-1:1);break;case"end":g[a]+=h*(n&&c?-1:1);break}return g}const La=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),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}=Ko(c,o,l),h=o,g={},w=0;for(let p=0;p<s.length;p++){const{name:v,fn:f}=s[p],{x:b,y,data:x,reset:E}=await f({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});d=b??d,u=y??u,g={...g,[v]:{...g[v],...x}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=Ko(c,h,l)),p=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}};async function Ve(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=ie(e,t),w=Aa(g),v=s[h?u==="floating"?"reference":"floating":u],f=se(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},E=se(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(f.top-E.top+w.top)/x.y,bottom:(E.bottom-f.bottom+w.bottom)/x.y,left:(f.left-E.left+w.left)/x.x,right:(E.right-f.right+w.right)/x.x}}const Ca=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...v}=ie(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const f=it(i),b=$(s),y=it(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(y||!p?[ae(s)]:ya(s)),C=w!=="none";!h&&C&&E.push(...ka(s,p,w,x));const B=[s,...E],dt=await Ve(e,v),ut=[];let _=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&ut.push(dt[f]),u){const pt=wa(i,a,x);ut.push(dt[pt[0]],dt[pt[1]])}if(_=[..._,{placement:i,overflows:ut}],!ut.every(pt=>pt<=0)){var Wt,qt;const pt=(((Wt=r.flip)==null?void 0:Wt.index)||0)+1,mn=B[pt];if(mn&&(!(u==="alignment"?b!==$(mn):!1)||_.every(G=>$(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:pt,overflows:_},reset:{placement:mn}};let Dt=(qt=_.filter(mt=>mt.overflows[0]<=0).sort((mt,G)=>mt.overflows[1]-G.overflows[1])[0])==null?void 0:qt.placement;if(!Dt)switch(g){case"bestFit":{var Vt;const mt=(Vt=_.filter(G=>{if(C){const et=$(G.placement);return et===b||et==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(et=>et>0).reduce((et,Fc)=>et+Fc,0)]).sort((G,et)=>G[1]-et[1])[0])==null?void 0:Vt[0];mt&&(Dt=mt);break}case"initialPlacement":Dt=s;break}if(i!==Dt)return{reset:{placement:Dt}}}return{}}}},Oa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:f,y:b}=v;return{x:f,y:b}}},...l}=ie(t,e),c={x:n,y:o},d=await Ve(e,l),u=$(it(i)),h=Jo(u);let g=c[h],w=c[u];if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",b=g+d[v],y=g-d[f];g=Go(b,g,y)}if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",b=w+d[v],y=w-d[f];w=Go(b,w,y)}const p=s.fn({...e,[h]:g,[u]:w});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[h]:r,[u]:a}}}}}},Ia=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=ie(t,e),d=await Ve(e,c),u=it(i),h=re(i),g=$(i)==="y",{width:w,height:p}=r.floating;let v,f;u==="top"||u==="bottom"?(v=u,f=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(f=u,v=h==="end"?"top":"bottom");const b=p-d.top-d.bottom,y=w-d.left-d.right,x=gt(p-d[v],b),E=gt(w-d[f],y),C=!e.middlewareData.shift;let B=x,dt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(dt=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(B=b),C&&!h){const _=q(d.left,0),Wt=q(d.right,0),qt=q(d.top,0),Vt=q(d.bottom,0);g?dt=w-2*(_!==0||Wt!==0?_+Wt:q(d.left,d.right)):B=p-2*(qt!==0||Vt!==0?qt+Vt:q(d.top,d.bottom))}await l({...e,availableWidth:dt,availableHeight:B});const ut=await a.getDimensions(s.floating);return w!==ut.width||p!==ut.height?{reset:{rects:!0}}:{}}}};function le(){return typeof window<"u"}function vt(t){return Yo(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function H(t){var e;return(e=(Yo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yo(t){return le()?t instanceof Node||t instanceof V(t).Node:!1}function D(t){return le()?t instanceof Element||t instanceof V(t).Element:!1}function X(t){return le()?t instanceof HTMLElement||t instanceof V(t).HTMLElement:!1}function Qo(t){return!le()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof V(t).ShadowRoot}const Ma=new Set(["inline","contents"]);function kt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ma.has(i)}const Na=new Set(["table","td","th"]);function Ra(t){return Na.has(vt(t))}const Pa=[":popover-open",":modal"];function ce(t){return Pa.some(e=>{try{return t.matches(e)}catch{return!1}})}const Wa=["transform","translate","scale","rotate","perspective"],qa=["transform","translate","scale","rotate","perspective","filter"],Va=["paint","layout","strict","content"];function De(t){const e=Ue(),n=D(t)?U(t):t;return Wa.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||qa.some(o=>(n.willChange||"").includes(o))||Va.some(o=>(n.contain||"").includes(o))}function Da(t){let e=tt(t);for(;X(e)&&!bt(e);){if(De(e))return e;if(ce(e))return null;e=tt(e)}return null}function Ue(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ua=new Set(["html","body","#document"]);function bt(t){return Ua.has(vt(t))}function U(t){return V(t).getComputedStyle(t)}function de(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if(vt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Qo(t)&&t.host||H(t);return Qo(e)?e.host:e}function _o(t){const e=tt(t);return bt(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&kt(e)?e:_o(e)}function Tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=_o(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=V(i);if(r){const s=ze(a);return e.concat(a,a.visualViewport||[],kt(i)?i:[],s&&n?Tt(s):[])}return e.concat(i,Tt(i,[],n))}function ze(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $o(t){const e=U(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=X(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=ne(n)!==r||ne(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function Fe(t){return D(t)?t:t.contextElement}function wt(t){const e=Fe(t);if(!X(e))return J(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=$o(e);let a=(r?ne(n.width):n.width)/o,s=(r?ne(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const za=J(0);function ti(t){const e=V(t);return!Ue()||!e.visualViewport?za:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fa(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==V(t)?!1:e}function rt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Fe(t);let a=J(1);e&&(o?D(o)&&(a=wt(o)):a=wt(t));const s=Fa(r,n,o)?ti(r):J(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 h=V(r),g=o&&D(o)?V(o):o;let w=h,p=ze(w);for(;p&&o&&g!==w;){const v=wt(p),f=p.getBoundingClientRect(),b=U(p),y=f.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,x=f.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=y,c+=x,w=V(p),p=ze(w)}}return se({width:d,height:u,x:l,y:c})}function ue(t,e){const n=de(t).scrollLeft;return e?e.left+n:rt(H(t)).left+n}function ei(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ue(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Ba(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=H(o),s=e?ce(e.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=J(1);const d=J(0),u=X(o);if((u||!u&&!r)&&((vt(o)!=="body"||kt(a))&&(l=de(o)),X(o))){const g=rt(o);c=wt(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}const h=a&&!u&&!r?ei(a,l):J(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function Ga(t){return Array.from(t.getClientRects())}function Ja(t){const e=H(t),n=de(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+ue(t);const s=-n.scrollTop;return U(o).direction==="rtl"&&(a+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const ni=25;function Ha(t,e){const n=V(t),o=H(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=Ue();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=ue(o);if(c<=0){const d=o.ownerDocument,u=d.body,h=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-u.clientWidth-g);w<=ni&&(r-=w)}else c<=ni&&(r+=c);return{width:r,height:a,x:s,y:l}}const Xa=new Set(["absolute","fixed"]);function ja(t,e){const n=rt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=X(t)?wt(t):J(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function oi(t,e,n){let o;if(e==="viewport")o=Ha(t,n);else if(e==="document")o=Ja(H(t));else if(D(e))o=ja(e,n);else{const i=ti(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return se(o)}function ii(t,e){const n=tt(t);return n===e||!D(n)||bt(n)?!1:U(n).position==="fixed"||ii(n,e)}function Za(t,e){const n=e.get(t);if(n)return n;let o=Tt(t,[],!1).filter(s=>D(s)&&vt(s)!=="body"),i=null;const r=U(t).position==="fixed";let a=r?tt(t):t;for(;D(a)&&!bt(a);){const s=U(a),l=De(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&Xa.has(i.position)||kt(a)&&!l&&ii(t,a))?o=o.filter(d=>d!==a):i=s,a=tt(a)}return e.set(t,o),o}function Ka(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?ce(e)?[]:Za(e,this._c):[].concat(n),o],s=a[0],l=a.reduce((c,d)=>{const u=oi(e,d,i);return c.top=q(u.top,c.top),c.right=gt(u.right,c.right),c.bottom=gt(u.bottom,c.bottom),c.left=q(u.left,c.left),c},oi(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ya(t){const{width:e,height:n}=$o(t);return{width:e,height:n}}function Qa(t,e,n){const o=X(e),i=H(e),r=n==="fixed",a=rt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=J(0);function c(){l.x=ue(i)}if(o||!o&&!r)if((vt(e)!=="body"||kt(i))&&(s=de(e)),o){const g=rt(e,!0,r,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else i&&c();r&&!o&&i&&c();const d=i&&!o&&!r?ei(i,s):J(0),u=a.left+s.scrollLeft-l.x-d.x,h=a.top+s.scrollTop-l.y-d.y;return{x:u,y:h,width:a.width,height:a.height}}function Be(t){return U(t).position==="static"}function ri(t,e){if(!X(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function ai(t,e){const n=V(t);if(ce(t))return n;if(!X(t)){let i=tt(t);for(;i&&!bt(i);){if(D(i)&&!Be(i))return i;i=tt(i)}return n}let o=ri(t,e);for(;o&&Ra(o)&&Be(o);)o=ri(o,e);return o&&bt(o)&&Be(o)&&!De(o)?n:o||Da(t)||n}const _a=async function(t){const e=this.getOffsetParent||ai,n=this.getDimensions,o=await n(t.floating);return{reference:Qa(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $a(t){return U(t).direction==="rtl"}const ts={convertOffsetParentRelativeRectToViewportRelativeRect:Ba,getDocumentElement:H,getClippingRect:Ka,getOffsetParent:ai,getElementRects:_a,getClientRects:Ga,getDimensions:Ya,getScale:wt,isElement:D,isRTL:$a};function si(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function es(t,e){let n=null,o;const i=H(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=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:h,height:g}=c;if(s||e(),!h||!g)return;const w=oe(u),p=oe(i.clientWidth-(d+h)),v=oe(i.clientHeight-(u+g)),f=oe(d),y={rootMargin:-w+"px "+-p+"px "+-v+"px "+-f+"px",threshold:q(0,gt(1,l))||1};let x=!0;function E(C){const B=C[0].intersectionRatio;if(B!==l){if(!x)return a();B?a(!1,B):o=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!si(c,t.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(t)}return a(!0),r}function ns(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=Fe(t),d=i||r?[...c?Tt(c):[],...Tt(e)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),r&&f.addEventListener("resize",n)});const u=c&&s?es(c,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(e)})),n()}),c&&!l&&g.observe(c),g.observe(e));let w,p=l?rt(t):null;l&&v();function v(){const f=rt(t);p&&!si(p,f)&&n(),p=f,w=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u?.(),(f=g)==null||f.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const li=Oa,ci=Ca,os=Ia,is=(t,e,n)=>{const o=new Map,i={platform:ts,...n},r={...i.platform,_c:o};return La(t,e,{...i,platform:r})};function di(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=di(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function rs(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=di(t))&&(o&&(o+=" "),o+=e);return o}const R={capture:!0,passive:!0},P=()=>typeof window<"u"&&typeof document<"u";function ui(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const At=(t,e,...n)=>console.warn(`\x1B[1m@mattilsynet/design - deprecation warning:\x1B[m \x1B[103m${t}\x1B[m is deprecated, please use \x1B[103m${e}\x1B[m instead`,...n);function m(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let as=0;const ss=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function pe(t){return t.id||(t.id=`${ss}${++as}`),t.id}const pi=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},A=(t,...e)=>(pi("add",t,e),()=>mi(t,...e)),mi=(t,...e)=>pi("remove",t,e),I=t=>{if(!P()||!window.requestAnimationFrame)return;window._mtdsCleanups||(window._mtdsCleanups=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsCleanups?.get(n)?.map(o=>o()),window._mtdsCleanups?.set(n,t())});document.readyState==="complete"?e():A(window,"load",e)},Ge=new WeakMap,ls=`.${k.dialog.split(" ")[0]}`;function at(t,e,{contain:n,middleware:o,placement:i,...r}={}){if(Ge.get(t)?.(),Ge.delete(t),e){const a=t.closest(ls)?.querySelector(":scope > footer"),s=Number(m(t,"data-inset"))||20,c={bottom:(a?.clientHeight||0)+s,left:s,right:s,top:s},d=m(t,"data-position")??"bottom";Ge.set(t,ns(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return at(t,!1);is(e,t,{...r,placement:i||d,middleware:[ci({padding:c}),li(),...n?[os({padding:c,apply:n})]:[],...o||[]]}).then(({x:u,y:h})=>{t.style.left=`${u}px`,t.style.top=`${h}px`})}))}}function j(t,e){let n=0;const o=Array.isArray(e)||typeof e=="string"?{attr:e}:e,i=()=>setTimeout(r,o?.delay??200),r=()=>{if(!P())return s();t(a),a.takeRecords(),n=0},a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))}),s=()=>{try{a.disconnect()}catch{}};return a.observe(o?.root||document.documentElement,{attributeFilter:[].concat(o.attr),attributes:!0,childList:!0,subtree:!0}),t(a),s}function cs(t,e){const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}const Je=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))m(o,i,r);return o},ds=typeof HTMLElement>"u"?class{}:HTMLElement,us=(t,e)=>!P()||window.customElements.get(t)||window.customElements.define(t,e),ps=`[data-command="toggle-app-expanded"],.${k.app.split(" ")[0]} > [command="show-modal"]`,ms=`.${k.breadcrumbs.split(" ")[0]}`,fs=`.${k.card.split(" ")[0]}`,fi=`.${k.chip.split(" ")[0]}`,hs=`.${k.helptext.split(" ")[0]}`,gs=`.${k.pagination.split(" ")[0]}`,vs='summary,u-summary,a,button,[role="tab"],[role="button"]',bs="click,toggle,submit,change",He="mattilsynet.matomo.cloud",ws=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",ys="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function hi(t,e={}){if(P()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${He}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&xs();const a=r?`https://cdn.matomo.cloud/${He}/container_${r}.js`:`https://cdn.matomo.cloud/${He}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;ws.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function xs(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
158
|
+
}`,sa="2.3.3",Dn="_alert_1p489_1 _ds-alert_1331q_3",Un="_app_1p489_1",zn="_sticky_1p489_1",Fn="_avatar_1p489_1 _ds-avatar_1331q_1",Bn="_badge_1p489_1",Gn="_breadcrumbs_1p489_1 _ds-breadcrumbs_1331q_5",Jn="_button_1p489_1 _ds-button_1331q_1",Hn="_card_1p489_1",jn="_group_1p489_1",Xn="_chip_1p489_1 _ds-chip_1331q_5",Zn="_details_1p489_1 _ds-details_1331q_3",Kn="_dialog_1p489_1 _ds-dialog_1331q_5",Yn="__drawer_1p489_1",Qn="_divider_1p489_1",_n="_errorsummary_1p489_1 _ds-error-summary_1331q_5",$n="__errorsummary_1p489_1",to="_field_1p489_1 _ds-field_1331q_1",eo="__datalist_1p489_1",no="_affixes_1p489_1 _ds-field-affixes_1331q_3",oo="_fieldset_1p489_1 _ds-fieldset_1331q_3",io="_fileupload_1p489_1",ro="_helptext_1p489_1 _ds-focus_1331q_1",ao="_input_1p489_1 _ds-input_1331q_1",so="_law_1p489_1",lo="_grid_1p489_1",co="_flex_1p489_1",uo="_link_1p489_1",po="_logo_1p489_1",mo="_pagination_1p489_1 _ds-pagination_1331q_5",fo="_popover_1p489_1",ho="_progress_1p489_1",go="__indeterminate_1p489_1",vo="_skeleton_1p489_1 _ds-skeleton_1331q_5",bo="__skeleton_1p489_1",wo="_spinner_1p489_1",yo="_steps_1p489_1",xo="_table_1p489_1 _ds-table_1331q_5",Eo="__scrollShadow_1p489_1",So="_tabs_1p489_1 _ds-tabs_1331q_5",ko="__scrollMask_1p489_1",To="_tag_1p489_1 _ds-tag_1331q_5",Ao="_toast_1p489_1",Lo="__toastClose_1p489_1",Co="__toastOpen_1p489_1",Oo="__toastTimeout_1p489_1",Io="_togglegroup_1p489_1",Mo="__tooltip_1p489_1",No="_heading_1p489_1 _ds-heading_1331q_1",Po="_ingress_1p489_1",Ro="_muted_1p489_1",Wo="_info_1p489_1",qo="_prose_1p489_1",Vo="_validation_1p489_1 _ds-validation-message_1331q_1",Do="_body_1p489_186",Uo="__checked_1p489_1",k={alert:Dn,app:Un,sticky:zn,avatar:Fn,badge:Bn,breadcrumbs:Gn,button:Jn,card:Hn,group:jn,chip:Xn,details:Zn,dialog:Kn,_drawer:Yn,divider:Qn,errorsummary:_n,_errorsummary:$n,field:to,_datalist:eo,affixes:no,fieldset:oo,fileupload:io,helptext:ro,input:ao,law:so,grid:lo,flex:co,link:uo,logo:po,pagination:mo,popover:fo,progress:ho,_indeterminate:go,skeleton:vo,_skeleton:bo,spinner:wo,steps:yo,table:xo,_scrollShadow:Eo,tabs:So,_scrollMask:ko,tag:To,toast:Ao,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,togglegroup:Io,_tooltip:Mo,heading:No,ingress:Po,muted:Ro,info:Wo,prose:qo,validation:Vo,body:Do,_checked:Uo},la=Object.freeze(Object.defineProperty({__proto__:null,_checked:Uo,_datalist:eo,_drawer:Yn,_errorsummary:$n,_indeterminate:go,_scrollMask:ko,_scrollShadow:Eo,_skeleton:bo,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,_tooltip:Mo,affixes:no,alert:Dn,app:Un,avatar:Fn,badge:Bn,body:Do,breadcrumbs:Gn,button:Jn,card:Hn,chip:Xn,default:k,details:Zn,dialog:Kn,divider:Qn,errorsummary:_n,field:to,fieldset:oo,fileupload:io,flex:co,grid:lo,group:jn,heading:No,helptext:ro,info:Wo,ingress:Po,input:ao,law:so,link:uo,logo:po,muted:Ro,pagination:mo,popover:fo,progress:ho,prose:qo,skeleton:vo,spinner:wo,steps:yo,sticky:zn,table:xo,tabs:So,tag:To,toast:Ao,togglegroup:Io,validation:Vo},Symbol.toStringTag,{value:"Module"})),gt=Math.min,q=Math.max,$t=Math.round,te=Math.floor,J=t=>({x:t,y:t}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},da={start:"end",end:"start"};function zo(t,e,n){return q(t,gt(e,n))}function ee(t,e){return typeof t=="function"?t(e):t}function it(t){return t.split("-")[0]}function ne(t){return t.split("-")[1]}function Fo(t){return t==="x"?"y":"x"}function Bo(t){return t==="y"?"height":"width"}const ua=new Set(["top","bottom"]);function $(t){return ua.has(it(t))?"y":"x"}function Go(t){return Fo($(t))}function pa(t,e,n){n===void 0&&(n=!1);const o=ne(t),i=Go(t),r=Bo(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=oe(a)),[a,oe(a)]}function ma(t){const e=oe(t);return[We(t),e,We(e)]}function We(t){return t.replace(/start|end/g,e=>da[e])}const Jo=["left","right"],Ho=["right","left"],fa=["top","bottom"],ha=["bottom","top"];function ga(t,e,n){switch(t){case"top":case"bottom":return n?e?Ho:Jo:e?Jo:Ho;case"left":case"right":return e?fa:ha;default:return[]}}function va(t,e,n,o){const i=ne(t);let r=ga(it(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(We)))),r}function oe(t){return t.replace(/left|right|bottom|top/g,e=>ca[e])}function ba(t){return{top:0,right:0,bottom:0,left:0,...t}}function wa(t){return typeof t!="number"?ba(t):{top:t,right:t,bottom:t,left:t}}function ie(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function jo(t,e,n){let{reference:o,floating:i}=t;const r=$(e),a=Go(e),s=Bo(a),l=it(e),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-i.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-i.width,y:u};break;default:g={x:o.x,y:o.y}}switch(ne(e)){case"start":g[a]-=h*(n&&c?-1:1);break;case"end":g[a]+=h*(n&&c?-1:1);break}return g}const ya=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),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}=jo(c,o,l),h=o,g={},w=0;for(let p=0;p<s.length;p++){const{name:v,fn:f}=s[p],{x:b,y,data:x,reset:E}=await f({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});d=b??d,u=y??u,g={...g,[v]:{...g[v],...x}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=jo(c,h,l)),p=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}};async function qe(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=ee(e,t),w=wa(g),v=s[h?u==="floating"?"reference":"floating":u],f=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},E=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(f.top-E.top+w.top)/x.y,bottom:(E.bottom-f.bottom+w.bottom)/x.y,left:(f.left-E.left+w.left)/x.x,right:(E.right-f.right+w.right)/x.x}}const xa=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...v}=ee(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const f=it(i),b=$(s),y=it(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(y||!p?[oe(s)]:ma(s)),C=w!=="none";!h&&C&&E.push(...va(s,p,w,x));const B=[s,...E],dt=await qe(e,v),ut=[];let _=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&ut.push(dt[f]),u){const pt=pa(i,a,x);ut.push(dt[pt[0]],dt[pt[1]])}if(_=[..._,{placement:i,overflows:ut}],!ut.every(pt=>pt<=0)){var Wt,qt;const pt=(((Wt=r.flip)==null?void 0:Wt.index)||0)+1,fn=B[pt];if(fn&&(!(u==="alignment"?b!==$(fn):!1)||_.every(G=>$(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:pt,overflows:_},reset:{placement:fn}};let Dt=(qt=_.filter(mt=>mt.overflows[0]<=0).sort((mt,G)=>mt.overflows[1]-G.overflows[1])[0])==null?void 0:qt.placement;if(!Dt)switch(g){case"bestFit":{var Vt;const mt=(Vt=_.filter(G=>{if(C){const et=$(G.placement);return et===b||et==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(et=>et>0).reduce((et,Gc)=>et+Gc,0)]).sort((G,et)=>G[1]-et[1])[0])==null?void 0:Vt[0];mt&&(Dt=mt);break}case"initialPlacement":Dt=s;break}if(i!==Dt)return{reset:{placement:Dt}}}return{}}}},Ea=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:f,y:b}=v;return{x:f,y:b}}},...l}=ee(t,e),c={x:n,y:o},d=await qe(e,l),u=$(it(i)),h=Fo(u);let g=c[h],w=c[u];if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",b=g+d[v],y=g-d[f];g=zo(b,g,y)}if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",b=w+d[v],y=w-d[f];w=zo(b,w,y)}const p=s.fn({...e,[h]:g,[u]:w});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[h]:r,[u]:a}}}}}},Sa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=ee(t,e),d=await qe(e,c),u=it(i),h=ne(i),g=$(i)==="y",{width:w,height:p}=r.floating;let v,f;u==="top"||u==="bottom"?(v=u,f=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(f=u,v=h==="end"?"top":"bottom");const b=p-d.top-d.bottom,y=w-d.left-d.right,x=gt(p-d[v],b),E=gt(w-d[f],y),C=!e.middlewareData.shift;let B=x,dt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(dt=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(B=b),C&&!h){const _=q(d.left,0),Wt=q(d.right,0),qt=q(d.top,0),Vt=q(d.bottom,0);g?dt=w-2*(_!==0||Wt!==0?_+Wt:q(d.left,d.right)):B=p-2*(qt!==0||Vt!==0?qt+Vt:q(d.top,d.bottom))}await l({...e,availableWidth:dt,availableHeight:B});const ut=await a.getDimensions(s.floating);return w!==ut.width||p!==ut.height?{reset:{rects:!0}}:{}}}};function re(){return typeof window<"u"}function vt(t){return Xo(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function H(t){var e;return(e=(Xo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xo(t){return re()?t instanceof Node||t instanceof V(t).Node:!1}function D(t){return re()?t instanceof Element||t instanceof V(t).Element:!1}function j(t){return re()?t instanceof HTMLElement||t instanceof V(t).HTMLElement:!1}function Zo(t){return!re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof V(t).ShadowRoot}const ka=new Set(["inline","contents"]);function Et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!ka.has(i)}const Ta=new Set(["table","td","th"]);function Aa(t){return Ta.has(vt(t))}const La=[":popover-open",":modal"];function ae(t){return La.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ca=["transform","translate","scale","rotate","perspective"],Oa=["transform","translate","scale","rotate","perspective","filter"],Ia=["paint","layout","strict","content"];function Ve(t){const e=De(),n=D(t)?U(t):t;return Ca.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Oa.some(o=>(n.willChange||"").includes(o))||Ia.some(o=>(n.contain||"").includes(o))}function Ma(t){let e=tt(t);for(;j(e)&&!bt(e);){if(Ve(e))return e;if(ae(e))return null;e=tt(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Na=new Set(["html","body","#document"]);function bt(t){return Na.has(vt(t))}function U(t){return V(t).getComputedStyle(t)}function se(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if(vt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Zo(t)&&t.host||H(t);return Zo(e)?e.host:e}function Ko(t){const e=tt(t);return bt(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&Et(e)?e:Ko(e)}function St(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ko(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=V(i);if(r){const s=Ue(a);return e.concat(a,a.visualViewport||[],Et(i)?i:[],s&&n?St(s):[])}return e.concat(i,St(i,[],n))}function Ue(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yo(t){const e=U(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=$t(n)!==r||$t(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function ze(t){return D(t)?t:t.contextElement}function wt(t){const e=ze(t);if(!j(e))return J(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Yo(e);let a=(r?$t(n.width):n.width)/o,s=(r?$t(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Pa=J(0);function Qo(t){const e=V(t);return!De()||!e.visualViewport?Pa:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ra(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==V(t)?!1:e}function rt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=ze(t);let a=J(1);e&&(o?D(o)&&(a=wt(o)):a=wt(t));const s=Ra(r,n,o)?Qo(r):J(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 h=V(r),g=o&&D(o)?V(o):o;let w=h,p=Ue(w);for(;p&&o&&g!==w;){const v=wt(p),f=p.getBoundingClientRect(),b=U(p),y=f.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,x=f.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=y,c+=x,w=V(p),p=Ue(w)}}return ie({width:d,height:u,x:l,y:c})}function le(t,e){const n=se(t).scrollLeft;return e?e.left+n:rt(H(t)).left+n}function _o(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-le(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Wa(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=H(o),s=e?ae(e.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=J(1);const d=J(0),u=j(o);if((u||!u&&!r)&&((vt(o)!=="body"||Et(a))&&(l=se(o)),j(o))){const g=rt(o);c=wt(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}const h=a&&!u&&!r?_o(a,l):J(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function qa(t){return Array.from(t.getClientRects())}function Va(t){const e=H(t),n=se(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+le(t);const s=-n.scrollTop;return U(o).direction==="rtl"&&(a+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const $o=25;function Da(t,e){const n=V(t),o=H(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=De();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=le(o);if(c<=0){const d=o.ownerDocument,u=d.body,h=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-u.clientWidth-g);w<=$o&&(r-=w)}else c<=$o&&(r+=c);return{width:r,height:a,x:s,y:l}}const Ua=new Set(["absolute","fixed"]);function za(t,e){const n=rt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?wt(t):J(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function ti(t,e,n){let o;if(e==="viewport")o=Da(t,n);else if(e==="document")o=Va(H(t));else if(D(e))o=za(e,n);else{const i=Qo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ie(o)}function ei(t,e){const n=tt(t);return n===e||!D(n)||bt(n)?!1:U(n).position==="fixed"||ei(n,e)}function Fa(t,e){const n=e.get(t);if(n)return n;let o=St(t,[],!1).filter(s=>D(s)&&vt(s)!=="body"),i=null;const r=U(t).position==="fixed";let a=r?tt(t):t;for(;D(a)&&!bt(a);){const s=U(a),l=Ve(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&Ua.has(i.position)||Et(a)&&!l&&ei(t,a))?o=o.filter(d=>d!==a):i=s,a=tt(a)}return e.set(t,o),o}function Ba(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?ae(e)?[]:Fa(e,this._c):[].concat(n),o],s=a[0],l=a.reduce((c,d)=>{const u=ti(e,d,i);return c.top=q(u.top,c.top),c.right=gt(u.right,c.right),c.bottom=gt(u.bottom,c.bottom),c.left=q(u.left,c.left),c},ti(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ga(t){const{width:e,height:n}=Yo(t);return{width:e,height:n}}function Ja(t,e,n){const o=j(e),i=H(e),r=n==="fixed",a=rt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=J(0);function c(){l.x=le(i)}if(o||!o&&!r)if((vt(e)!=="body"||Et(i))&&(s=se(e)),o){const g=rt(e,!0,r,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else i&&c();r&&!o&&i&&c();const d=i&&!o&&!r?_o(i,s):J(0),u=a.left+s.scrollLeft-l.x-d.x,h=a.top+s.scrollTop-l.y-d.y;return{x:u,y:h,width:a.width,height:a.height}}function Fe(t){return U(t).position==="static"}function ni(t,e){if(!j(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function oi(t,e){const n=V(t);if(ae(t))return n;if(!j(t)){let i=tt(t);for(;i&&!bt(i);){if(D(i)&&!Fe(i))return i;i=tt(i)}return n}let o=ni(t,e);for(;o&&Aa(o)&&Fe(o);)o=ni(o,e);return o&&bt(o)&&Fe(o)&&!Ve(o)?n:o||Ma(t)||n}const Ha=async function(t){const e=this.getOffsetParent||oi,n=this.getDimensions,o=await n(t.floating);return{reference:Ja(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ja(t){return U(t).direction==="rtl"}const Xa={convertOffsetParentRelativeRectToViewportRelativeRect:Wa,getDocumentElement:H,getClippingRect:Ba,getOffsetParent:oi,getElementRects:Ha,getClientRects:qa,getDimensions:Ga,getScale:wt,isElement:D,isRTL:ja};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Za(t,e){let n=null,o;const i=H(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=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:h,height:g}=c;if(s||e(),!h||!g)return;const w=te(u),p=te(i.clientWidth-(d+h)),v=te(i.clientHeight-(u+g)),f=te(d),y={rootMargin:-w+"px "+-p+"px "+-v+"px "+-f+"px",threshold:q(0,gt(1,l))||1};let x=!0;function E(C){const B=C[0].intersectionRatio;if(B!==l){if(!x)return a();B?a(!1,B):o=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!ii(c,t.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(t)}return a(!0),r}function Ka(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ze(t),d=i||r?[...c?St(c):[],...St(e)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),r&&f.addEventListener("resize",n)});const u=c&&s?Za(c,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(e)})),n()}),c&&!l&&g.observe(c),g.observe(e));let w,p=l?rt(t):null;l&&v();function v(){const f=rt(t);p&&!ii(p,f)&&n(),p=f,w=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u?.(),(f=g)==null||f.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const ri=Ea,ai=xa,Ya=Sa,Qa=(t,e,n)=>{const o=new Map,i={platform:Xa,...n},r={...i.platform,_c:o};return ya(t,e,{...i,platform:r})};function si(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=si(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function _a(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=si(t))&&(o&&(o+=" "),o+=e);return o}const R={capture:!0,passive:!0},I=()=>typeof window<"u"&&typeof document<"u";function li(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const kt=(t,e,...n)=>console.warn(`\x1B[1m@mattilsynet/design - deprecation warning:\x1B[m \x1B[103m${t}\x1B[m is deprecated, please use \x1B[103m${e}\x1B[m instead`,...n);function m(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let $a=0;const ts=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ce(t){return t.id||(t.id=`${ts}${++$a}`),t.id}const ci=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},A=(t,...e)=>(ci("add",t,e),()=>di(t,...e)),di=(t,...e)=>ci("remove",t,e),M=t=>{if(!I()||!window.requestAnimationFrame)return;window._mtdsCleanups||(window._mtdsCleanups=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsCleanups?.get(n)?.map(o=>o()),window._mtdsCleanups?.set(n,t())});document.readyState==="complete"?e():A(window,"load",e)},Be=new WeakMap,es=`.${k.dialog.split(" ")[0]}`;function at(t,e,{contain:n,middleware:o,placement:i,...r}={}){if(Be.get(t)?.(),Be.delete(t),e){const a=t.closest(es)?.querySelector(":scope > footer"),s=Number(m(t,"data-inset"))||20,c={bottom:(a?.clientHeight||0)+s,left:s,right:s,top:s},d=m(t,"data-position")??"bottom";Be.set(t,Ka(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return at(t,!1);Qa(e,t,{...r,placement:i||d,middleware:[ai({padding:c}),ri(),...n?[Ya({padding:c,apply:n})]:[],...o||[]]}).then(({x:u,y:h})=>{t.style.left=`${u}px`,t.style.top=`${h}px`})}))}}function X(t,e){let n=0;const o=Array.isArray(e)||typeof e=="string"?{attr:e}:e,i=()=>setTimeout(r,o?.delay??200),r=()=>{if(!I())return s();t(a),a.takeRecords(),n=0},a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))}),s=()=>{try{a.disconnect()}catch{}};return a.observe(o?.root||document.documentElement,{attributeFilter:[].concat(o.attr),attributes:!0,childList:!0,subtree:!0}),t(a),s}function ns(t,e){const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}const Ge=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))m(o,i,r);return o},os=typeof HTMLElement>"u"?class{}:HTMLElement,is=(t,e)=>!I()||window.customElements.get(t)||window.customElements.define(t,e),rs=`[data-command="toggle-app-expanded"],.${k.app.split(" ")[0]} > [command="show-modal"]`,as=`.${k.breadcrumbs.split(" ")[0]}`,ss=`.${k.card.split(" ")[0]}`,ui=`.${k.chip.split(" ")[0]}`,ls=`.${k.helptext.split(" ")[0]}`,cs=`.${k.pagination.split(" ")[0]}`,ds='summary,u-summary,a,button,[role="tab"],[role="button"]',us="click,toggle,submit,change",Je="mattilsynet.matomo.cloud",ps=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",ms="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function pi(t,e={}){if(I()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Je}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&fs();const a=r?`https://cdn.matomo.cloud/${Je}/container_${r}.js`:`https://cdn.matomo.cloud/${Je}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;ps.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function fs(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
159
159
|
#${z}[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 }
|
|
160
160
|
#${z} 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 }
|
|
161
161
|
#${z} button:focus-visible { outline: 2px solid }
|
|
@@ -163,9 +163,9 @@ var mtds=(function(L){"use strict";var Sr=Object.defineProperty,fn=Object.getOwn
|
|
|
163
163
|
#${z} button:active { background: #054449; scale: .9 }
|
|
164
164
|
#${z} p { margin: 0 .25em }
|
|
165
165
|
</style>
|
|
166
|
-
<p>Vi bruker <a href="${
|
|
166
|
+
<p>Vi bruker <a href="${ms}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
|
|
167
167
|
<form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">×</button></form>
|
|
168
|
-
</dialog>`);const e=document.getElementById(z),n=()=>window.localStorage.setItem(z,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function
|
|
168
|
+
</dialog>`);const e=document.getElementById(z),n=()=>window.localStorage.setItem(z,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function hs(t){window._mtdsTracking?.enabled&&setTimeout(gs,0,t)}function gs({type:t,target:e}){const n=t==="click"?e?.closest?.(ds):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=mi(n)||ws(n)||m(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=m(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(ui)?"Chip":"Form",o="change",r=mi(s||n)||Tt(s?.querySelector("legend"))||Tt(n?.labels?.[0])}else if(m(n,"role")==="tab")i="Tab",o="navigate";else if(m(n,"popovertarget")){if(!vs(n)?.matches(":popover-open"))return;i=n.closest(ls)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(rs)){const a=bs(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&m(n,"data-tooltip")||Tt(n)}else if(n.closest(as))i="Breadcrumbs",o="navigate";else if(n.closest(cs))i="Pagintation",o="navigate";else if(n.closest(ss))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(ui))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(m(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");pi("event",{category:m(n,"data-analytics-category")??i,action:m(n,"data-analytics-action")??o,name:m(n,"data-analytics-name")??r})}const Tt=t=>t?.textContent?.trim()||"",mi=t=>t&&m(t,"aria-label")||"",vs=t=>document.getElementById(m(t,"popovertarget")||""),bs=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),ws=t=>{const e=Tt(t),n=Tt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};M(()=>[A(document,us,hs,R)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const He=k.app.split(" ")[0],ys=k.sticky.split(" ")[0],xs=`[data-command="toggle-app-expanded"],.${He} > [command="show-modal"]`,je=`.${He} > dialog,.${He} dialog ~ main`,fi=I()?document.getElementsByClassName(ys):[],hi=t=>{document.startViewTransition?document.startViewTransition(t):t()},gi=t=>hi(()=>window.mtdsToggleAppExpanded?.(t));function Es(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(je))return vi();if(n||!(e instanceof HTMLButtonElement)||!e.matches(xs))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?gi():hi(()=>{const r=document.querySelector(je);r?.setAttribute("closedby","any"),r?.showModal()})}function vi(){document.querySelector(je)?.close()}let Xe=0,yt,Z=0,Ze=0,de=0,Ke=!1,Ye=0,st=0;function Ss(){if(!fi?.length)return;const t=fi[0],e=window.scrollY,n=e<st;st=e,n!==yt&&(Xe=(t.parentElement?.getBoundingClientRect().top||0)+st,yt=n,Ze=t.offsetHeight,de=t.getBoundingClientRect().top+st,Ke=t.offsetHeight<=window.innerHeight,Ye=window.innerHeight),!(Z===-1&&Ke)&&(Z!==-1&&(Ke||yt&&st<=de)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),Z=-1):Z===-1&&!yt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,st-Xe)}px`),Z=0):Z!==1&&!yt&&st+Ye>=de+Ze?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Ye-Ze}px`),Z=1):Z===1&&yt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${de-Xe}px`),Z=0))}M(()=>[A(document,"click",Es,!0),A(window,"resize",li(vi,100),R),A(window,"scroll",Ss,R)]);const ks=/<[^>]+\bid="([^"]+)[^>]+>/gi,bi=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Ts=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,As=/kapittel-\d+-ledd-\d+/,Ls=/<button[^>]+>.*?<\/button>/g,Cs=/►m\d+/i,ue=/<[^>]+>/g,Os=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Is=/<(\/?)(article|footer|section)/gi,Ms=/(src|href)="([^"]+)"/gi,Ns=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Ps=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Rs=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,wi="https://lovdata.no/",Ws={legacyid:{label:"Datokode",value:""},titleshort:{label:"Korttittel",value:""},title:{label:"Tittel",value:""},url:{label:"Url",value:""}},Qe=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),qs=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Vs=(t,e)=>{const n=Qe(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&m(o,"aria-checked",`${m(o,"aria-checked")!=="true"}`)})},Ds=(t,e)=>{const n=Qe(t);e?.querySelectorAll("button").forEach(o=>{m(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Us=(t,e)=>{const n=yi(e);return Qe(t).map(o=>Fs(o,n)).filter(o=>!!o)},zs=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Ws};for(const o of e.matchAll(Os)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},yi=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Is,"<$1div").replace(Ns,"$1$2$3").replace(Ms,(e,n,o)=>`${n}="${o.includes(":")?"":wi}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Rs,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${lt("id",n)}-ledd-0">${i}</div>`).replace(Ps,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(ks,(e,n,o,i)=>{const r=xi(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,Fs=(t,e)=>{const n=As.test(t),o=t.split("-").map((s,l,c)=>l%2?Bs(c.slice(0,l+1).join("-"),e,n):null).filter(s=>!!s);if(!o.length)return null;const i=o.filter(({url:s})=>s).pop()?.url||"",r=o.filter(s=>s.className==="section"&&bi.test(s.label)),a=o.slice(o.indexOf(r.pop()||o[0])).map(s=>s.label).join(", ");return{...o.slice(-1)[0],path:o,label:a,url:i}},Bs=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=lt("class",i),a=lt("data-lovdata-url",i),s=xi(i,t,o,e);return{id:t,className:r,html:Gs(t,e),url:a?`${wi}${a}`:"",label:!n&&r==="section"&&s?.match(bi)?.[0]||s}},lt=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},Gs=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(Ls,""):""},xi=(t,e,n,o)=>Js[lt("class",t)]?.(t,e,n,o)||"",Js={numberedLegalP:t=>`nr. ${lt("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Ts)?.[2]?.replace(ue,"")?.replace(Cs,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(ue,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),l=lt("data-name",t)||"-",c=lt("type",s)||"-";let d="punkt";return c==="1"&&(d="tall"),c==="a"&&(d="bokstav"),c==="i"&&(d="romtertall"),`${d} ${l==="-"?i.pop():l.replace(ue,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(ue,"")}`}},Hs=(t,e,n=Number.POSITIVE_INFINITY)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),a=Array.from({length:r+1-i},(s,l)=>l+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a},js=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Hs(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});function N(t,e={}){const n=document.getElementById(e.id||"")||O("dialog");return m(n,"aria-busy",e.busy?"true":null),m(n,"class",_a(k.toast,e.className)),m(n,"closedby",e.closedby||null),m(n,"data-color",e.color||null),m(n,"data-icon",`${e.icon??""}`||null),m(n,"data-timeout",`${e.timeout??""}`||null),m(n,"id",e.id||`${Date.now()}`),m(n,"open",e.open===!1?null:""),n.innerHTML=t,A(n,"animationend",Xs,{once:!0}),document.body.appendChild(n),n.id}function Xs({animationName:t,target:e}){t===k._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,n){const{loading:o,success:i,error:r,...a}=n,s=N(o,{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 Zs=k.breadcrumbs.split(" ")[0],Ei=I()?document.getElementsByClassName(Zs):[];function Ks(){if(Ei)for(const t of Ei)t.querySelectorAll("a").forEach((e,n,{length:o})=>{m(e,"aria-current",n===o-1?"page":null)})}M(()=>[X(Ks,"class")]);const Ys=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
169
169
|
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
170
170
|
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
171
171
|
|
|
@@ -332,17 +332,17 @@ var mtds=(function(L){"use strict";var Sr=Object.defineProperty,fn=Object.getOwn
|
|
|
332
332
|
vertical-align: middle;
|
|
333
333
|
width: var(--mtds-5);
|
|
334
334
|
}
|
|
335
|
-
`,il=[.1,.2,.25,.5,1];function rl(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((w,p,v)=>{const f=t.map(y=>y[v].number),b=f.reduce((y,x)=>y+x,0);return Math.max(w,...i?[b]:f)},0),a=r/10,s=10**`${Math.round(a)}`.length,l=a/s,c=(il.find(w=>w>l)||1)*s,d=Math.ceil(r/c)*c,u=O("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure",style:`${e?`--mtdsc-chart-aspect: ${e};`:""} --bars: ${t[0]?.length-1}; --groups: ${t.length-1}; --total: ${d}`}),h=u.appendChild(O("div",{class:"axisSteps"})),g=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(w,p)=>al(c*p)).reverse().map(w=>h.append(O("div",{class:"axisStep","data-label":w}))),{total:d,groups:g,axis:u}}const al=new Intl.NumberFormat().format;function sl(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,style:s,number:l})=>r.appendChild(O("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",style:`${s}; --value: ${l}`,tabindex:"0"}))),i})}function ll(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=O("div",{class:"lineContainer",role:"list",style:a[0].style}),l=cl(a.map(({number:u},h,{length:g})=>[100/(g-1)*h,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");m(c,"aria-hidden","true"),m(c,"preserveAspectRatio","none"),m(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(m(d,"class","line"),m(d,"d",l),m(d,"fill","none"),m(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);m(u,"d",`M-100,100 L${l.slice(1)}L200,100`),m(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:h,event:g})=>{const w=O("div",{role:"listitem"});w.appendChild(O("div",{"aria-label":h,"data-event":g,tabindex:"0",class:"linePoint",role:"img",style:`--value: ${u}`})),s.append(w)}),s.appendChild(c).append(d),r.append(s)}),r}const cl=(t,e)=>t.map(([n,o],i,r)=>i?dl(i,r,e):`M${n},${o}`).join(" "),Ai=([t,e],[n,o])=>[t+n,e+o],Li=([t,e],[n,o])=>[t-n,e-o],Ci=(t,[e,n])=>[t*e,t*n],dl=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=Ai(o,Ci(n,Li(i,e[t-2]||o))),[s,l]=Ai(i,Ci(n,Li(o,e[t+1]||i)));return`C ${r},${a} ${s},${l} ${i[0]},${i[1]}`};function ul(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),m(o,"class","pie"),m(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="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,style:u}])=>{if(!c)return;const h=document.createElementNS("http://www.w3.org/2000/svg","path"),g=i/s;i+=c;const w=Math.min(i/s,.99999),p=w-g>.5?1:0,v=2*Math.PI*(g-.25),f=2*Math.PI*(w-.25),b=Math.cos(v),y=Math.sin(v),x=Math.cos(f),E=Math.sin(f),C=`M ${r+a*b} ${r+a*y} L ${r+r*b} ${r+r*y} A ${r} ${r} 0 ${p} 1 ${r+r*x} ${r+r*E} L ${r+a*x} ${r+a*E} A ${a} ${a} 0 ${p} 0 ${r+a*b} ${r+a*y}`;m(h,"aria-label",l),m(h,"data-event",d),m(h,"style",u),m(h,"d",C),m(h,"role","img"),m(h,"tabindex","0"),o.appendChild(h)}),o}const Oi="click,keydown,mousemove,mouseout",Ii="mtds-chart-tooltip",K=P()?document.getElementById(Ii)||O("div",{"aria-hidden":"true",class:k._tooltip,hidden:"",id:Ii}):null;class pl extends ds{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.#e=cs(()=>this.handleResize(),this),this.#t=j(()=>this.attributeChangedCallback(),{attr:"data-tooltip",root:this}),this.attributeChangedCallback(),A(this,Oi,this)}disconnectedCallback(){K&&(K.hidden=!0),mi(this,Oi,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=hl(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(d=>d.remove());const[n,o]=(m(this,"data-variant")||"column").split("-"),i=m(this,"data-aspect")||void 0,r=O("style",{},ol),a=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:d,style:u}])=>{a.appendChild(O("div",{class:"legend",style:u},d))});const{axis:s,groups:l,total:c}=rl(e,{aspect:i,type:o});(n==="column"||n==="bar")&&l.append(...sl(e)),(n==="line"||n==="area")&&l.append(ll(e,{total:c,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(ul(e,{aspect:i,variant:n})),this.shadowRoot?.append(s,a,r)}handleEvent(e){e.type==="click"||e.type==="keydown"?ml(e,this):fl(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function ml(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&m(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let Mi="";function fl(t){if(!K)return;K?.isConnected||document.body.append(K);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(K.style.transform=`translate(${Math.min(t.clientX,window.innerWidth-K.clientWidth-10)}px, ${t.clientY}px)`),n!==Mi&&(n&&(K.textContent=n),Mi=n,K.hidden=!n)}const Ct=t=>t?.textContent?.trim()||"",hl=t=>Array.from(t?.rows||[],(e,n)=>Array.from(e.cells,(o,i)=>{const r=Ct(e.cells[0]),a=Ct(t?.rows[0].cells[i]),s=`${r}: ${Ct(o)}${a?` (${a})`:""}`;return{number:i&&n&&Number.parseFloat(Ct(o))||0,event:o.querySelector("a,button")&&`${n}-${i}`,style:`--color: var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base))`,value:Ct(o),tooltip:m(o,"data-tooltip")||s}}));us("mtds-chart",pl);const gl=k.dialog.split(" ")[0],Ni=P()?document.getElementsByClassName(gl):[];function vl(){for(const t of Ni)if(t.getAttribute("data-variant")==="drawer"&&At('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t),t.isConnected&&t.showModal&&t.close){const e=m(t,"data-closedby");e&&(m(t,"closedby",e),At(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.matches('[open]:not([data-modal="false"]):not(:modal)')?(At('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>'),m(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(m(t,"open",""),t.close())}}function bl({target:t}){for(const e of Ni)e.open&&e.contains(t)&&t?.closest?.('[data-command="close"]')&&e.close()}const Ri=new WeakSet;function wl(){document.querySelectorAll("[data-command").forEach(t=>{if(Ri.has(t))return;const e=m(t,"data-command");Ri.add(t),e==="row"?At(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):At(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)})}I(()=>[A(document,"click",bl,R),j(vl,["open","data-drawer"]),j(wl,"data-command")]);function yl(t){if(t.animationName!==k._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(m(e,"tabindex","-1"),e.focus())}I(()=>[A(document,"animationend",yl,R)]);var xl=Object.defineProperty,Pi=Object.getOwnPropertySymbols,El=Object.prototype.hasOwnProperty,Sl=Object.prototype.propertyIsEnumerable,Wi=(t,e,n)=>e in t?xl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kl=(t,e)=>{for(var n in e||(e={}))El.call(e,n)&&Wi(t,n,e[n]);if(Pi)for(var n of Pi(e))Sl.call(e,n)&&Wi(t,n,e[n]);return t},Ot=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",he=Ot&&/android/i.test(navigator.userAgent),$e=Ot&&/iPad|iPhone|iPod/.test(navigator.userAgent),qi;Ot&&/^Mac/i.test(((qi=navigator.userAgentData)==null?void 0:qi.platform)||navigator.platform);var Tl=`${he?"data":"aria"}-labelledby`,Al=":host(:not([hidden])) { display: block }",Ll="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Vi=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Di=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},It=(t,...e)=>Di("add",t,e),ge=(t,...e)=>Di("remove",t,e),Cl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(nn("slot"),nn("style",e)),ve=new WeakMap,tn=(t,e)=>{if(e===void 0)return ve.get(t);try{ve.get(t).disconnect(),ve.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ve.set(t,n)}},Ui=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Ol=0,en=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Ol).toString(32)}`),t.id):"",nn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},zi={define:(t,e)=>!Ot||window.customElements.get(t)||window.customElements.define(t,e)},ct,Il=0,Fi=t=>{ct||(ct=nn("div"),ct.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(ct,"aria-live","assertive")),ct.isConnected||document.body.append(ct),t&&(ct.textContent=`${t}${Il++%2?" ":""}`)},Ml=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},on=!1,rn=t=>(t?.type==="mouseup"&&(on=!1),t?.type==="mousedown"&&(on=!0,It(document,"mouseup",rn,{once:!0})),on),an="disabled",Mt="selected",Nl=class extends Vi{static get observedAttributes(){return[an,Mt]}connectedCallback(){$e||(this.tabIndex=-1),this.hasAttribute("role")||T(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){T(this,"aria-disabled",`${this.disabled}`),T(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Mt]}set defaultSelected(t){this[Mt]=t}get disabled(){return T(this,an)!==null}set disabled(t){T(this,an,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,Mt)!==null}set selected(t){T(this,Mt,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)}};zi.define("u-option",Nl);var Rl=`${Al}
|
|
335
|
+
`,Qs=[.1,.2,.25,.5,1];function _s(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((w,p,v)=>{const f=t.map(y=>y[v].number),b=f.reduce((y,x)=>y+x,0);return Math.max(w,...i?[b]:f)},0),a=r/10,s=10**`${Math.round(a)}`.length,l=a/s,c=(Qs.find(w=>w>l)||1)*s,d=Math.ceil(r/c)*c,u=O("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure",style:`${e?`--mtdsc-chart-aspect: ${e};`:""} --bars: ${t[0]?.length-1}; --groups: ${t.length-1}; --total: ${d}`}),h=u.appendChild(O("div",{class:"axisSteps"})),g=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(w,p)=>$s(c*p)).reverse().map(w=>h.append(O("div",{class:"axisStep","data-label":w}))),{total:d,groups:g,axis:u}}const $s=new Intl.NumberFormat().format;function tl(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,style:s,number:l})=>r.appendChild(O("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",style:`${s}; --value: ${l}`,tabindex:"0"}))),i})}function el(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=O("div",{class:"lineContainer",role:"list",style:a[0].style}),l=nl(a.map(({number:u},h,{length:g})=>[100/(g-1)*h,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");m(c,"aria-hidden","true"),m(c,"preserveAspectRatio","none"),m(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(m(d,"class","line"),m(d,"d",l),m(d,"fill","none"),m(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);m(u,"d",`M-100,100 L${l.slice(1)}L200,100`),m(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:h,event:g})=>{const w=O("div",{role:"listitem"});w.appendChild(O("div",{"aria-label":h,"data-event":g,tabindex:"0",class:"linePoint",role:"img",style:`--value: ${u}`})),s.append(w)}),s.appendChild(c).append(d),r.append(s)}),r}const nl=(t,e)=>t.map(([n,o],i,r)=>i?ol(i,r,e):`M${n},${o}`).join(" "),Si=([t,e],[n,o])=>[t+n,e+o],ki=([t,e],[n,o])=>[t-n,e-o],Ti=(t,[e,n])=>[t*e,t*n],ol=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=Si(o,Ti(n,ki(i,e[t-2]||o))),[s,l]=Si(i,Ti(n,ki(o,e[t+1]||i)));return`C ${r},${a} ${s},${l} ${i[0]},${i[1]}`};function il(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),m(o,"class","pie"),m(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="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,style:u}])=>{if(!c)return;const h=document.createElementNS("http://www.w3.org/2000/svg","path"),g=i/s;i+=c;const w=Math.min(i/s,.99999),p=w-g>.5?1:0,v=2*Math.PI*(g-.25),f=2*Math.PI*(w-.25),b=Math.cos(v),y=Math.sin(v),x=Math.cos(f),E=Math.sin(f),C=`M ${r+a*b} ${r+a*y} L ${r+r*b} ${r+r*y} A ${r} ${r} 0 ${p} 1 ${r+r*x} ${r+r*E} L ${r+a*x} ${r+a*E} A ${a} ${a} 0 ${p} 0 ${r+a*b} ${r+a*y}`;m(h,"aria-label",l),m(h,"data-event",d),m(h,"style",u),m(h,"d",C),m(h,"role","img"),m(h,"tabindex","0"),o.appendChild(h)}),o}const Ai="click,keydown,mousemove,mouseout",Li="mtds-chart-tooltip",K=I()?document.getElementById(Li)||O("div",{"aria-hidden":"true",class:k._tooltip,hidden:"",id:Li}):null;class rl extends os{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.#e=ns(()=>this.handleResize(),this),this.#t=X(()=>this.attributeChangedCallback(),{attr:"data-tooltip",root:this}),this.attributeChangedCallback(),A(this,Ai,this)}disconnectedCallback(){K&&(K.hidden=!0),di(this,Ai,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=ll(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(d=>d.remove());const[n,o]=(m(this,"data-variant")||"column").split("-"),i=m(this,"data-aspect")||void 0,r=O("style",{},Ys),a=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:d,style:u}])=>{a.appendChild(O("div",{class:"legend",style:u},d))});const{axis:s,groups:l,total:c}=_s(e,{aspect:i,type:o});(n==="column"||n==="bar")&&l.append(...tl(e)),(n==="line"||n==="area")&&l.append(el(e,{total:c,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(il(e,{aspect:i,variant:n})),this.shadowRoot?.append(s,a,r)}handleEvent(e){e.type==="click"||e.type==="keydown"?al(e,this):sl(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function al(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&m(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let Ci="";function sl(t){if(!K)return;K?.isConnected||document.body.append(K);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(K.style.transform=`translate(${Math.min(t.clientX,window.innerWidth-K.clientWidth-10)}px, ${t.clientY}px)`),n!==Ci&&(n&&(K.textContent=n),Ci=n,K.hidden=!n)}const At=t=>t?.textContent?.trim()||"",ll=t=>Array.from(t?.rows||[],(e,n)=>Array.from(e.cells,(o,i)=>{const r=At(e.cells[0]),a=At(t?.rows[0].cells[i]),s=`${r}: ${At(o)}${a?` (${a})`:""}`;return{number:i&&n&&Number.parseFloat(At(o))||0,event:o.querySelector("a,button")&&`${n}-${i}`,style:`--color: var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base))`,value:At(o),tooltip:m(o,"data-tooltip")||s}}));is("mtds-chart",rl);const cl=k.dialog.split(" ")[0],Oi=I()?document.getElementsByClassName(cl):[];function dl(){for(const t of Oi)if(t.getAttribute("data-variant")==="drawer"&&kt('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t),t.isConnected&&t.showModal&&t.close){const e=m(t,"data-closedby");e&&(m(t,"closedby",e),kt(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.matches('[open]:not([data-modal="false"]):not(:modal)')?(kt('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>'),m(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(m(t,"open",""),t.close())}}function ul({target:t}){for(const e of Oi)e.open&&e.contains(t)&&t?.closest?.('[data-command="close"]')&&e.close()}const Ii=new WeakSet;function pl(){document.querySelectorAll("[data-command").forEach(t=>{if(Ii.has(t))return;const e=m(t,"data-command");Ii.add(t),e==="row"?kt(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):kt(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)})}M(()=>[A(document,"click",ul,R),X(dl,["open","data-drawer"]),X(pl,"data-command")]);function ml(t){if(t.animationName!==k._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(m(e,"tabindex","-1"),e.focus())}M(()=>[A(document,"animationend",ml,R)]);var fl=Object.defineProperty,Mi=Object.getOwnPropertySymbols,hl=Object.prototype.hasOwnProperty,gl=Object.prototype.propertyIsEnumerable,Ni=(t,e,n)=>e in t?fl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e)=>{for(var n in e||(e={}))hl.call(e,n)&&Ni(t,n,e[n]);if(Mi)for(var n of Mi(e))gl.call(e,n)&&Ni(t,n,e[n]);return t},Lt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",pe=Lt&&/android/i.test(navigator.userAgent),_e=Lt&&/iPad|iPhone|iPod/.test(navigator.userAgent),Pi;Lt&&/^Mac/i.test(((Pi=navigator.userAgentData)==null?void 0:Pi.platform)||navigator.platform);var bl=`${pe?"data":"aria"}-labelledby`,wl=":host(:not([hidden])) { display: block }",yl="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ri=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Wi=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ct=(t,...e)=>Wi("add",t,e),me=(t,...e)=>Wi("remove",t,e),xl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(en("slot"),en("style",e)),fe=new WeakMap,$e=(t,e)=>{if(e===void 0)return fe.get(t);try{fe.get(t).disconnect(),fe.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),fe.set(t,n)}},qi=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},El=0,tn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++El).toString(32)}`),t.id):"",en=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Vi={define:(t,e)=>!Lt||window.customElements.get(t)||window.customElements.define(t,e)},ct,Sl=0,Di=t=>{ct||(ct=en("div"),ct.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(ct,"aria-live","assertive")),ct.isConnected||document.body.append(ct),t&&(ct.textContent=`${t}${Sl++%2?" ":""}`)},kl=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},nn=!1,on=t=>(t?.type==="mouseup"&&(nn=!1),t?.type==="mousedown"&&(nn=!0,Ct(document,"mouseup",on,{once:!0})),nn),rn="disabled",Ot="selected",Tl=class extends Ri{static get observedAttributes(){return[rn,Ot]}connectedCallback(){_e||(this.tabIndex=-1),this.hasAttribute("role")||T(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){T(this,"aria-disabled",`${this.disabled}`),T(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Ot]}set defaultSelected(t){this[Ot]=t}get disabled(){return T(this,rn)!==null}set disabled(t){T(this,rn,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,Ot)!==null}set selected(t){T(this,Ot,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)}};Vi.define("u-option",Tl);var Al=`${wl}
|
|
336
336
|
::slotted(u-option) { display: block; cursor: pointer }
|
|
337
|
-
::slotted(u-option:focus) { ${
|
|
337
|
+
::slotted(u-option:focus) { ${yl} }
|
|
338
338
|
::slotted(u-option[aria-hidden="true"]),
|
|
339
339
|
::slotted(u-option[disabled]),
|
|
340
|
-
::slotted(u-option[hidden]) { display: none !important }`,Bi,Gi=0,Pl=$e||he,Ji="click,focusout,input,keydown,mousedown,mouseup",Hi="focus,focusin,blur,focusout",be={singular:"%d hit",plural:"%d hits"},Xi=class extends Vi{constructor(){super(),this._texts=kl({},be),this._value="",Cl(this,Rl)}static get observedAttributes(){return["id",...Object.keys(be).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ui(this),T(this,"role","listbox"),T(this,"tabindex","-1"),It(this._root,"focusin",this),It(this._root,"focus",this,!0),tn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ge(this._root||this,"focus",this,!0),ge(this._root||this,"focusin",this),tn(this,!1),sn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(be[o])this._texts[o]=n||be[o];else if(this._root){this._input&&ln(this,this._input);for(const r of this._root.querySelectorAll(i))ln(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&Vl(this,t),(n==="focus"||n==="focusin")&&Wl(this,t),(n==="blur"||n==="focusout")&&ql(this,t),n==="keydown"&&Dl(this,t),n==="mousedown"&&this.contains(e)&&rn(t),(n==="mutation"||n==="input")&&(clearTimeout(Gi),Gi=setTimeout(Ki,0,this,t)))}get options(){return this.getElementsByTagName("u-option")}},ji=t=>t?.disabled||t?.readOnly||!1,Nt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=ji(t?._input)||!e,(n=tn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&ln(t,t._input,e),r&&T(t,"popover","manual"),r&&t.togglePopover(e),e&&Ki(t)},sn=t=>{t._input&&(ge(t._input||t,Hi,t),ge(t._root||t,Ji,t),Nt(t,!1),t._input=void 0)},ln=(t,e,n=!1)=>{t.popover&&T(e,"popovertarget",en(t)),It(e,Hi,t,!0),T(e,"aria-autocomplete","list"),T(e,"aria-controls",en(t)),T(e,"aria-expanded",`${!Pl||n}`),T(e,"autocomplete","off"),T(e,"role",ji(e)?null:"combobox")},Wl=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&sn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),T(t,Tl,en((n=t._input.labels)==null?void 0:n[0])),It(t._root||t,Ji,t),Nt(t,T(t._input,"inputmode")!=="none"),Fi())},ql=(t,e)=>{!he&&!rn()&&t._input&&setTimeout(Zi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Zi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),sn(t))},Vl=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Nt(t,!0);for(const o of t.options)if(o.contains(e))return T(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Nt(t,!1)),Ml(t._input,o.value);he&&Zi(t)},Dl=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:l}=e,c=o==="Escape"||o==="Esc";if(r||a||l||s||o==="Tab")return;c&&!t.hidden&&e?.preventDefault(),Nt(t,!c);const d=[...t.options].filter(g=>T(g,"aria-hidden")!=="true"&&g.offsetHeight),u=d.indexOf(i);let h=-1;if(o==="ArrowDown"&&(h=(u+1)%d.length),o==="ArrowUp"&&(h=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(h=0),(o==="End"||o==="PageDown")&&(h=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[h])for(const g of d)g.tabIndex=-1;d[h]&&e.preventDefault(),(n=d[h]||t._input)==null||n.focus(),!d[h]&&o==="ArrowUp"&&setTimeout(()=>{var g;return(g=t._input)==null?void 0:g.setSelectionRange(999,999)})},Ki=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),l=[],c=[];for(const u of r)(u.disabled||u.hidden||s&&!u.label.toLowerCase().includes(a)?l:c).push(u);for(const u of l)T(u,"aria-hidden","true");for(const u of c)T(u,"aria-hidden","false");const d=c.length;clearTimeout(Bi),e?.type==="input"&&a!==t._value&&(Bi=setTimeout(()=>{const u=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Fi(u),t._value=a},1e3)),$e&&c.map((u,h)=>T(u,"title",`${h+1}/${d}`))};Ot&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ui(this).getElementById(T(this,"list")||"")}}),zi.define("u-datalist",Xi);const Ul=k.field.split(" ")[0],Yi=k.validation.split(" "),zl=Yi[0],Fl=P()?document.getElementsByClassName(Ul):[];function Bl(){for(const t of Fl)if(t.isConnected){const e=[],n=[];let o=null,i=null,r=!0;for(const a of t.getElementsByTagName("*"))a instanceof HTMLLabelElement?e.push(a):a instanceof Ae?o=a:Je(a)&&!a.hidden?i=a:a.hasAttribute("data-description")?n.push(a):a.classList.contains(zl)?(r=m(a,"data-color")==="success"||!a.clientHeight,n.unshift(a)):a instanceof HTMLParagraphElement&&!a.closest("[popover]")&&(n.some(s=>s.contains(a))||n.push(a));if(i){for(const a of e)a.htmlFor=pe(i);Jl(o),Qi(i),m(i,"aria-describedby",n.map(pe).join(" ")),m(i,"aria-invalid",`${!r}`)}}}function Gl({target:t}){t instanceof HTMLTextAreaElement&&(t.style.setProperty("--_mtds-field-sizing","auto"),t.style.setProperty("--_mtds-field-sizing",`${t.scrollHeight}px`))}const F=(t,e)=>t.getPropertyValue(`--mtds-text-${e}`)?.slice(1,-1)||"";function Jl(t){const{control:e,list:n}=t||{};if(t&&n&&!t.hasAttribute("data-sr-added")){const o=window.getComputedStyle(t);m(t,"data-sr-added",F(o,"combobox-added")),m(t,"data-sr-empty",F(o,"combobox-empty")),m(t,"data-sr-found",F(o,"combobox-found")),m(t,"data-sr-invalid",F(o,"combobox-invalid")),m(t,"data-sr-of",F(o,"combobox-of")),m(t,"data-sr-remove",F(o,"combobox-remove")),m(t,"data-sr-removed",F(o,"combobox-removed")),m(n,"data-sr-plural",F(o,"datalist-plural")),m(n,"data-sr-singular",F(o,"datalist-singular"))}n&&e&&!n.hasAttribute("popover")&&(m(n,"popover","manual"),m(e,"popovertarget",pe(n)))}function Qi(t){const e=t?.nextElementSibling,n=e&&m(e,"data-count");if(e&&n){const o=Number(n)-t.value.length,i=o<0,r=m(e,"aria-live")==="polite",a=window.getComputedStyle(e||t),s=F(a,"count-over"),l=F(a,"count-under"),c=`${(i?s:l).replace("%d",`${Math.abs(o)}`)}`;if(r!==i){m(e,"aria-live",i?"polite":"off");for(const d of Yi)e.classList.toggle(d,i)}m(e,"aria-label",c)}}function Hl({target:t,newState:e}){if(t instanceof Xi){const o=t.getRootNode()?.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?at(t,!1):o&&at(t,o,{contain({availableHeight:i}){t.style.width=`${o.clientWidth}px`,t.style.maxHeight=`${Math.max(50,i)}px`}})}}function Xl(t){Je(t.target)&&Qi(t.target)}I(()=>[j(Bl,"class"),A(document,"input",Xl,R),A(document,"toggle",Hl,R),A(document,"input",Gl,R)]);const jl=k.fieldset.split(" ")[0],Zl=k.validation.split(" ")[0],_i="aria-describedby",Kl="aria-invalid",Yl=P()?document.getElementsByClassName(jl):[];function Ql(){setTimeout(()=>{for(const t of Yl)if(t.isConnected){const e=[];let n=null,o=!0;for(const i of t.getElementsByTagName("*"))i.classList.contains(Zl)?(o=m(i,"data-color")==="success"||!i.clientHeight,n=pe(i)):Je(i)&&e.push(i);for(const i of e){const r=m(i,_i)?.replace(n||"#","");m(i,_i,`${n||""} ${r||""}`.trim()),m(i,Kl,`${!o}`)}}})}I(()=>[j(Ql,"class")]);const _l=k.logo.split(" ")[0],$l=P()?document.getElementsByClassName(_l):[];function tc(){const t=$l[0],e=t?.firstElementChild;if(e instanceof SVGSVGElement){for(const s of document.head.querySelectorAll("link[rel~='icon']"))s.setAttribute("rel","disabled");const n=t?.hasAttribute("data-env"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("--mtdsc-logo-background"),a=e.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`);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":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${a}</g></svg>`)}`,rel:"icon"}))}}I(()=>[j(tc,"class")]);const Rt=k.popover.split(" ")[0],Pt="popovertarget",ec=P()?document.getElementsByClassName(Rt):[];function nc({target:t,newState:e}){if(t instanceof HTMLElement&&t.classList.contains(Rt)){const n=document.querySelector(`[${Pt}="${t.id}"]`);e==="closed"?at(t,!1):n&&at(t,n,{contain:m(t,"data-overscroll")==="contain"&&(({availableHeight:o})=>{t.style.maxHeight=`${Math.max(50,o)}px`})})}}function oc({target:t,newState:e}){e==="open"&&t instanceof HTMLElement&&t.classList.contains(Rt)&&m(t,"popover")!=="manual"&&m(t,"popover","manual")}function ic(t){const e=t.target?.closest?.("a,button"),n=e&&m(e,Pt),o=n?document.getElementById(n):e?.closest(`.${Rt}`);for(const i of ec)o!==i&&!i.contains(t.target)&&i.hasAttribute("popover")&&i.hidePopover();if(o?.classList.contains(Rt)&&e){const i=m(e,`${Pt}action`),r=i==="show"||(i==="hide"?!1:void 0),a=e instanceof HTMLButtonElement;if(a&&!i&&o.contains(e))return;if(o instanceof HTMLElement&&o.isConnected){if(a&&n)return;if(o.hasAttribute("popover"))return o.togglePopover(r);console.error(`Element "${o.id}" is missing "popover" attribute`)}}}function rc(t){if(t.key==="Escape"&&t.target instanceof Element){const e=t.target.closest(`[popover],[${Pt}]`),n=e&&document.getElementById(m(e,Pt)||e.id);n instanceof HTMLElement&&n.hidePopover(),n&&t.preventDefault?.()}}I(()=>[A(document,"click",ic),A(document,"toggle",nc,R),A(document,"beforetoggle",oc,R),A(document,"keydown",rc)]);const ac=k.table.split(" ")[0],sc='a,button,label,input,select,textarea,[role="button"]',lc=P()?document.getElementsByClassName(ac):[];function cc(){for(const t of lc){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)m(i,"data-th",e[i.cellIndex]||":empty")}}function dc({target:t}){if(!(t instanceof Element))return;const n=t.closest("tr")?.querySelector('[data-command="row"]');n&&!t.closest(sc)&&n.click?.()}I(()=>[A(document,"click",dc),j(cc,"data-mobile")]);const $i="data-clickdelegatefor",uc=`[${$i}]`,pc='a,button,label,input,select,textarea,dialog,[role="button"],[popover],[contenteditable]',mc=t=>{const e=t.button===1||t.metaKey||t.ctrlKey,o=t.isTrusted&&t.button<2&&tr(t);o instanceof HTMLAnchorElement&&e?window.open(o.href,void 0,o.rel):o instanceof HTMLElement&&!o.contains(t.target)&&(t.stopImmediatePropagation(),o.click())};let we;const fc=t=>{const e=tr(t);we!==e&&(we&&we.classList.remove(":click-delegate-hover"),e&&e.classList.add(":click-delegate-hover"),we=e)},tr=({target:t})=>{const n=(t instanceof Element?t.closest(uc):null)?.getAttribute($i),o=document.getElementById(n||""),i=o&&t.closest(pc);return(!i||i===o)&&o||void 0};I(()=>[A(window,"click,auxclick",mc,!0),A(document,"mouseover",fc,{passive:!0})]);const er=k.toast.split(" ")[0],ye="data-sort";function hc({animationName:t,target:e}){const n=e;if(t===k._toastTimeout&&n.close(),t!==k._toastOpen)return;const o=Number(m(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(ye)||m(n,ye,`${Date.now()}`),m(n,"tabindex","0"),[...document.querySelectorAll(`.${er}[open]`)].sort((i,r)=>Number(m(r,ye))-Number(m(i,ye))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function gc({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(er)&&m(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),l=o.right-Number.parseInt(i.paddingRight,10),c=l-Number.parseInt(r.width,10);a<=n&&n<=s&&c<=e&&e<=l&&t.close()}}I(()=>[A(document,"animationstart",hc),A(document,"click",gc)]);const vc=`.${k.togglegroup.split(" ")[0]}`;function bc(t){const{key:e,target:n}=t,o=n instanceof HTMLInputElement&&n.closest(vc);if(o&&(e==="Enter"&&n.click(),e?.startsWith("Arrow"))){t.preventDefault();const i=o.getElementsByTagName("input"),r=[...i].indexOf(n),a=e.match(/Arrow(Right|Down)/)?1:-1;i[(i.length+r+a)%i.length]?.focus()}}I(()=>[A(document,"keydown",bc)]);const nr="Escape",wc=300,or="mtds-tooltip",Y=P()?document.getElementById(or)||O("div",{class:k._tooltip,id:or,popover:"manual"}):null;let ir=null,rr=Number.NEGATIVE_INFINITY,ar=0;function cn({target:t,type:e,key:n}){if(e==="keydown"&&n!==nr)return;const o=rr+wc-Date.now();clearTimeout(ar),ar=setTimeout(yc,Math.max(o,0),n===nr?null:t)}function yc(t){if(rr=Date.now(),!Y||t===Y)return;Y?.isConnected||document.body.append(Y);let e=t?.closest?.("[data-tooltip]")||null;if(e===ir)return;const n=e&&m(e,"data-tooltip")||"",o=e&&m(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue("--mtds-tooltip-position")?.trim()||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(Y.textContent=n),at(Y,!1),ir=e,Y.hidePopover(),Y.togglePopover(!!e),at(Y,e||!1,{strategy:"fixed",placement:o,middleware:[ci(),li({padding:10})]})}function xc(){document.querySelectorAll("[data-tooltip]").forEach(t=>{const e=!t?.textContent?.trim(),n=m(t,"data-tooltip");m(t,`aria-${e?"label":"description"}`,n)})}I(()=>[A(document,"blur,focus,mouseout,mouseover",cn,R),A(window,"keydown",cn,R),A(window,"blur",cn,R),j(xc,"data-tooltip")]);const dn='[data-validation="form"] :is(input,textarea,select)',Ec=`:scope > .${k.validation.split(" ")[0]}`,Sc=`.${k.field.split(" ")[0]}`;function kc(t){const e=t.target.closest?.("form");e&&(t.type==="invalid"&&(t.preventDefault(),sr(e)),t.type==="submit"&&lr(e)&&t.preventDefault())}const sr=ui(lr,10);function lr(t,e=!0){let n=null;for(const o of t.querySelectorAll(dn)){if(!o.clientHeight)continue;const i=o.closest("fieldset")||o.closest(Sc)||t,r=o.closest("u-combobox"),a=r?o?.getAttribute("aria-required")==="true"&&!!r?.items.length:o.validity.valid;!n&&!a&&(n=o);for(const s of i.querySelectorAll(dn))m(s,"aria-invalid",`${!a}`);for(const s of i.querySelectorAll(Ec))m(s,"data-validation",a?"valid":"invalid"),m(s,"hidden",a?"":null)}return e&&n?.focus(),n}function Tc({target:t}){const e=t instanceof HTMLElement?t:null,n=e?.getAttribute("aria-invalid")==="true"&&e?.matches?.(dn)&&e?.closest?.("form");n&&sr(n,!1)}I(()=>[A(document,"invalid,submit",kc,!0),A(document,"input",Tc,R)]);var cr=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",dr;cr&&/^Mac/i.test(((dr=navigator.userAgentData)==null?void 0:dr.platform)||navigator.platform);var Ac=":host(:not([hidden])) { display: block }",ur=typeof HTMLElement>"u"?class{}:HTMLElement;function Q(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var pr=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},mr=(t,...e)=>pr("add",t,e),fr=(t,...e)=>pr("remove",t,e),Lc=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Cc=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},un=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))Q(o,i,r);return o},hr={define:(t,e)=>!cr||window.customElements.get(t)||window.customElements.define(t,e)},Oc=`${Ac}
|
|
340
|
+
::slotted(u-option[hidden]) { display: none !important }`,Ui,zi=0,Ll=_e||pe,Fi="click,focusout,input,keydown,mousedown,mouseup",Bi="focus,focusin,blur,focusout",he={singular:"%d hit",plural:"%d hits"},Gi=class extends Ri{constructor(){super(),this._texts=vl({},he),this._value="",xl(this,Al)}static get observedAttributes(){return["id",...Object.keys(he).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=qi(this),T(this,"role","listbox"),T(this,"tabindex","-1"),Ct(this._root,"focusin",this),Ct(this._root,"focus",this,!0),$e(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),$e(this,!1),an(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(he[o])this._texts[o]=n||he[o];else if(this._root){this._input&&sn(this,this._input);for(const r of this._root.querySelectorAll(i))sn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&Il(this,t),(n==="focus"||n==="focusin")&&Cl(this,t),(n==="blur"||n==="focusout")&&Ol(this,t),n==="keydown"&&Ml(this,t),n==="mousedown"&&this.contains(e)&&on(t),(n==="mutation"||n==="input")&&(clearTimeout(zi),zi=setTimeout(ji,0,this,t)))}get options(){return this.getElementsByTagName("u-option")}},Ji=t=>t?.disabled||t?.readOnly||!1,It=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Ji(t?._input)||!e,(n=$e(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&sn(t,t._input,e),r&&T(t,"popover","manual"),r&&t.togglePopover(e),e&&ji(t)},an=t=>{t._input&&(me(t._input||t,Bi,t),me(t._root||t,Fi,t),It(t,!1),t._input=void 0)},sn=(t,e,n=!1)=>{t.popover&&T(e,"popovertarget",tn(t)),Ct(e,Bi,t,!0),T(e,"aria-autocomplete","list"),T(e,"aria-controls",tn(t)),T(e,"aria-expanded",`${!Ll||n}`),T(e,"autocomplete","off"),T(e,"role",Ji(e)?null:"combobox")},Cl=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&an(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),T(t,bl,tn((n=t._input.labels)==null?void 0:n[0])),Ct(t._root||t,Fi,t),It(t,T(t._input,"inputmode")!=="none"),Di())},Ol=(t,e)=>{!pe&&!on()&&t._input&&setTimeout(Hi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Hi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),an(t))},Il=(t,{target:e})=>{var n;if(!t._input||t._input===e)return It(t,!0);for(const o of t.options)if(o.contains(e))return T(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),It(t,!1)),kl(t._input,o.value);pe&&Hi(t)},Ml=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:l}=e,c=o==="Escape"||o==="Esc";if(r||a||l||s||o==="Tab")return;c&&!t.hidden&&e?.preventDefault(),It(t,!c);const d=[...t.options].filter(g=>T(g,"aria-hidden")!=="true"&&g.offsetHeight),u=d.indexOf(i);let h=-1;if(o==="ArrowDown"&&(h=(u+1)%d.length),o==="ArrowUp"&&(h=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(h=0),(o==="End"||o==="PageDown")&&(h=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[h])for(const g of d)g.tabIndex=-1;d[h]&&e.preventDefault(),(n=d[h]||t._input)==null||n.focus(),!d[h]&&o==="ArrowUp"&&setTimeout(()=>{var g;return(g=t._input)==null?void 0:g.setSelectionRange(999,999)})},ji=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),l=[],c=[];for(const u of r)(u.disabled||u.hidden||s&&!u.label.toLowerCase().includes(a)?l:c).push(u);for(const u of l)T(u,"aria-hidden","true");for(const u of c)T(u,"aria-hidden","false");const d=c.length;clearTimeout(Ui),e?.type==="input"&&a!==t._value&&(Ui=setTimeout(()=>{const u=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Di(u),t._value=a},1e3)),_e&&c.map((u,h)=>T(u,"title",`${h+1}/${d}`))};Lt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return qi(this).getElementById(T(this,"list")||"")}}),Vi.define("u-datalist",Gi);const Nl=k.field.split(" ")[0],Xi=k.validation.split(" "),Pl=Xi[0],Rl=I()?document.getElementsByClassName(Nl):[];function Wl(){for(const t of Rl)if(t.isConnected){const e=[],n=[];let o=null,i=null,r=!0;for(const a of t.getElementsByTagName("*"))a instanceof HTMLLabelElement?e.push(a):a instanceof Ae?o=a:Ge(a)&&!a.hidden?i=a:a.hasAttribute("data-description")?n.push(a):a.classList.contains(Pl)?(r=m(a,"data-color")==="success"||!a.clientHeight,n.unshift(a)):a instanceof HTMLParagraphElement&&!a.closest("[popover]")&&(n.some(s=>s.contains(a))||n.push(a));if(i){for(const a of e)a.htmlFor=ce(i);Vl(o),Zi(i),m(i,"aria-describedby",n.map(ce).join(" ")),m(i,"aria-invalid",`${!r}`)}}}function ql({target:t}){t instanceof HTMLTextAreaElement&&(t.style.setProperty("--_mtds-field-sizing","auto"),t.style.setProperty("--_mtds-field-sizing",`${t.scrollHeight}px`))}const F=(t,e)=>t.getPropertyValue(`--mtds-text-${e}`)?.slice(1,-1)||"";function Vl(t){const{control:e,list:n}=t||{};if(t&&n&&!t.hasAttribute("data-sr-added")){const o=window.getComputedStyle(t);m(t,"data-sr-added",F(o,"combobox-added")),m(t,"data-sr-empty",F(o,"combobox-empty")),m(t,"data-sr-found",F(o,"combobox-found")),m(t,"data-sr-invalid",F(o,"combobox-invalid")),m(t,"data-sr-of",F(o,"combobox-of")),m(t,"data-sr-remove",F(o,"combobox-remove")),m(t,"data-sr-removed",F(o,"combobox-removed")),m(n,"data-sr-plural",F(o,"datalist-plural")),m(n,"data-sr-singular",F(o,"datalist-singular"))}n&&e&&!n.hasAttribute("popover")&&(m(n,"popover","manual"),m(e,"popovertarget",ce(n)))}function Zi(t){const e=t?.nextElementSibling,n=e&&m(e,"data-count");if(e&&n){const o=Number(n)-t.value.length,i=o<0,r=m(e,"aria-live")==="polite",a=window.getComputedStyle(e||t),s=F(a,"count-over"),l=F(a,"count-under"),c=`${(i?s:l).replace("%d",`${Math.abs(o)}`)}`;if(r!==i){m(e,"aria-live",i?"polite":"off");for(const d of Xi)e.classList.toggle(d,i)}m(e,"aria-label",c)}}function Dl({target:t,newState:e}){if(t instanceof Gi){const o=t.getRootNode()?.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?at(t,!1):o&&at(t,o,{contain({availableHeight:i}){t.style.width=`${o.clientWidth}px`,t.style.maxHeight=`${Math.max(50,i)}px`}})}}function Ul(t){Ge(t.target)&&Zi(t.target)}M(()=>[X(Wl,"class"),A(document,"input",Ul,R),A(document,"toggle",Dl,R),A(document,"input",ql,R)]);const zl=k.fieldset.split(" ")[0],Fl=k.validation.split(" ")[0],Ki="aria-describedby",Bl="aria-invalid",Gl=I()?document.getElementsByClassName(zl):[];function Jl(){setTimeout(()=>{for(const t of Gl)if(t.isConnected){const e=[];let n=null,o=!0;for(const i of t.getElementsByTagName("*"))i.classList.contains(Fl)?(o=m(i,"data-color")==="success"||!i.clientHeight,n=ce(i)):Ge(i)&&e.push(i);for(const i of e){const r=m(i,Ki)?.replace(n||"#","");m(i,Ki,`${n||""} ${r||""}`.trim()),m(i,Bl,`${!o}`)}}})}M(()=>[X(Jl,"class")]);const Hl=k.logo.split(" ")[0],jl=I()?document.getElementsByClassName(Hl):[];function Xl(){const t=jl[0],e=t?.firstElementChild;if(e instanceof SVGSVGElement){for(const s of document.head.querySelectorAll("link[rel~='icon']"))s.setAttribute("rel","disabled");const n=t?.hasAttribute("data-env"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("--mtdsc-logo-background"),a=e.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`);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":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${a}</g></svg>`)}`,rel:"icon"}))}}M(()=>[X(Xl,"class")]);const Mt=k.popover.split(" ")[0],Nt="popovertarget",Zl=I()?document.getElementsByClassName(Mt):[];function Kl({target:t,newState:e}){if(t instanceof HTMLElement&&t.classList.contains(Mt)){const n=document.querySelector(`[${Nt}="${t.id}"]`);e==="closed"?at(t,!1):n&&at(t,n,{contain:m(t,"data-overscroll")==="contain"&&(({availableHeight:o})=>{t.style.maxHeight=`${Math.max(50,o)}px`})})}}function Yl({target:t,newState:e}){e==="open"&&t instanceof HTMLElement&&t.classList.contains(Mt)&&m(t,"popover")!=="manual"&&m(t,"popover","manual")}function Ql(t){const e=t.target?.closest?.("a,button"),n=e&&m(e,Nt),o=n?document.getElementById(n):e?.closest(`.${Mt}`);for(const i of Zl)o!==i&&!i.contains(t.target)&&i.hasAttribute("popover")&&i.hidePopover();if(o?.classList.contains(Mt)&&e){const i=m(e,`${Nt}action`),r=i==="show"||(i==="hide"?!1:void 0),a=e instanceof HTMLButtonElement;if(a&&!i&&o.contains(e))return;if(o instanceof HTMLElement&&o.isConnected){if(a&&n)return;if(o.hasAttribute("popover"))return o.togglePopover(r);console.error(`Element "${o.id}" is missing "popover" attribute`)}}}function _l(t){if(t.key==="Escape"&&t.target instanceof Element){const e=t.target.closest(`[popover],[${Nt}]`),n=e&&document.getElementById(m(e,Nt)||e.id);n instanceof HTMLElement&&n.hidePopover(),n&&t.preventDefault?.()}}M(()=>[A(document,"click",Ql),A(document,"toggle",Kl,R),A(document,"beforetoggle",Yl,R),A(document,"keydown",_l)]);const $l=k.table.split(" ")[0],tc='a,button,label,input,select,textarea,[role="button"]',ec=I()?document.getElementsByClassName($l):[];function nc(){for(const t of ec){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)m(i,"data-th",e[i.cellIndex]||":empty")}}function oc({target:t}){if(!(t instanceof Element))return;const n=t.closest("tr")?.querySelector('[data-command="row"]');n&&!t.closest(tc)&&n.click?.()}M(()=>[A(document,"click",oc),X(nc,"data-mobile")]);const Yi="data-clickdelegatefor",ic=`[${Yi}]`,rc='a,button,label,input,select,textarea,dialog,[role="button"],[popover],[contenteditable]',ac=t=>{const e=t.button===1||t.metaKey||t.ctrlKey,o=t.isTrusted&&t.button<2&&Qi(t);o instanceof HTMLAnchorElement&&e?window.open(o.href,void 0,o.rel):o instanceof HTMLElement&&!o.contains(t.target)&&(t.stopImmediatePropagation(),o.click())};let ge;const sc=t=>{const e=Qi(t);ge!==e&&(ge&&ge.classList.remove(":click-delegate-hover"),e&&e.classList.add(":click-delegate-hover"),ge=e)},Qi=({target:t})=>{const n=(t instanceof Element?t.closest(ic):null)?.getAttribute(Yi),o=document.getElementById(n||""),i=o&&t.closest(rc);return(!i||i===o)&&o||void 0};M(()=>[A(window,"click,auxclick",ac,!0),A(document,"mouseover",sc,{passive:!0})]);const _i=k.toast.split(" ")[0],ve="data-sort";function lc({animationName:t,target:e}){const n=e;if(t===k._toastTimeout&&n.close(),t!==k._toastOpen)return;const o=Number(m(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(ve)||m(n,ve,`${Date.now()}`),m(n,"tabindex","0"),[...document.querySelectorAll(`.${_i}[open]`)].sort((i,r)=>Number(m(r,ve))-Number(m(i,ve))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function cc({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(_i)&&m(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),l=o.right-Number.parseInt(i.paddingRight,10),c=l-Number.parseInt(r.width,10);a<=n&&n<=s&&c<=e&&e<=l&&t.close()}}M(()=>[A(document,"animationstart",lc),A(document,"click",cc)]);const dc=`.${k.togglegroup.split(" ")[0]}`;function uc(t){const{key:e,target:n}=t,o=n instanceof HTMLInputElement&&n.closest(dc);if(o&&(e==="Enter"&&n.click(),e?.startsWith("Arrow"))){t.preventDefault();const i=o.getElementsByTagName("input"),r=[...i].indexOf(n),a=e.match(/Arrow(Right|Down)/)?1:-1;i[(i.length+r+a)%i.length]?.focus()}}M(()=>[A(document,"keydown",uc)]);const $i="Escape",pc=300,tr="mtds-tooltip",Y=I()?document.getElementById(tr)||O("div",{class:k._tooltip,id:tr,popover:"manual"}):null;let er=null,nr=Number.NEGATIVE_INFINITY,or=0;function ln({target:t,type:e,key:n}){if(e==="keydown"&&n!==$i)return;const o=nr+pc-Date.now();clearTimeout(or),or=setTimeout(mc,Math.max(o,0),n===$i?null:t)}function mc(t){if(nr=Date.now(),!Y||t===Y)return;Y?.isConnected||document.body.append(Y);let e=t?.closest?.("[data-tooltip]")||null;if(e===er)return;const n=e&&m(e,"data-tooltip")||"",o=e&&m(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue("--mtds-tooltip-position")?.trim()||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(Y.textContent=n),at(Y,!1),er=e,Y.hidePopover(),Y.togglePopover(!!e),at(Y,e||!1,{strategy:"fixed",placement:o,middleware:[ai(),ri({padding:10})]})}function fc(){document.querySelectorAll("[data-tooltip]").forEach(t=>{const e=!t?.textContent?.trim(),n=m(t,"data-tooltip");m(t,`aria-${e?"label":"description"}`,n)})}M(()=>[A(document,"blur,focus,mouseout,mouseover",ln,R),A(window,"keydown",ln,R),A(window,"blur",ln,R),X(fc,"data-tooltip")]);const cn='[data-validation="form"] :is(input,textarea,select)',hc=`:scope > .${k.validation.split(" ")[0]}`,gc=`.${k.field.split(" ")[0]}`;function vc(t){const e=t.target.closest?.("form");e&&(t.type==="invalid"&&(t.preventDefault(),ir(e)),t.type==="submit"&&rr(e)&&t.preventDefault())}const ir=li(rr,10);function rr(t,e=!0){let n=null;for(const o of t.querySelectorAll(cn)){if(!o.clientHeight)continue;const i=o.closest("fieldset")||o.closest(gc)||t,r=o.closest("u-combobox"),a=r?o?.getAttribute("aria-required")==="true"&&!!r?.items.length:o.validity.valid;!n&&!a&&(n=o);for(const s of i.querySelectorAll(cn))m(s,"aria-invalid",`${!a}`);for(const s of i.querySelectorAll(hc))m(s,"data-validation",a?"valid":"invalid"),m(s,"hidden",a?"":null)}return e&&n?.focus(),n}function bc({target:t}){const e=t instanceof HTMLElement?t:null,n=e?.getAttribute("aria-invalid")==="true"&&e?.matches?.(cn)&&e?.closest?.("form");n&&ir(n,!1)}M(()=>[A(document,"invalid,submit",vc,!0),A(document,"input",bc,R)]);var ar=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",sr;ar&&/^Mac/i.test(((sr=navigator.userAgentData)==null?void 0:sr.platform)||navigator.platform);var wc=":host(:not([hidden])) { display: block }",lr=typeof HTMLElement>"u"?class{}:HTMLElement;function Q(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var cr=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},dr=(t,...e)=>cr("add",t,e),ur=(t,...e)=>cr("remove",t,e),yc=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},xc=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))Q(o,i,r);return o},pr={define:(t,e)=>!ar||window.customElements.get(t)||window.customElements.define(t,e)},Ec=`${wc}
|
|
341
341
|
::slotted(u-summary) { cursor: pointer; display: block }
|
|
342
342
|
::slotted(u-summary)::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
|
|
343
343
|
::slotted(u-summary[aria-expanded="true"])::before { rotate: 90deg }
|
|
344
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`,
|
|
344
|
+
:host > [part="details-content"]:not([hidden=""]) { display: block }`,Sc=class extends lr{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(dn("slot",null,{name:"summary"}),dn("slot",null,{part:"details-content"}),dn("style",Ec))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Q(this,"role","group"),dr(this._content,"beforematch",this),dr(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&ur(this._content,"beforematch",this),ur(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&Q(r,"aria-expanded",`${i}`);if(this._content&&(Q(this._content,"aria-hidden",`${!i}`),Q(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=xc(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e?.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&yc(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){Q(this,"open",t?"":null)}get name(){return Q(this,"name")||""}set name(t){Q(this,"name",t)}},kc=class extends lr{connectedCallback(){Q(this,"role","button"),this.slot="summary",this.tabIndex=0}};pr.define("u-details",Sc),pr.define("u-summary",kc);var be=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",mr=be&&/firefox/i.test(navigator.userAgent),Tc=be&&/iPad|iPhone|iPod/.test(navigator.userAgent),fr;be&&/^Mac/i.test(((fr=navigator.userAgentData)==null?void 0:fr.platform)||navigator.platform);var Ac=typeof HTMLElement>"u"?class{}:HTMLElement;function W(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Lc=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Cc=0,Oc=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Cc).toString(32)}`),t.id):"",hr=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))W(o,i,r);return o},Ic={define:(t,e)=>!be||window.customElements.get(t)||window.customElements.define(t,e)},Mc=t=>{var e;const n=W(t,"aria-label")||"";return[...(((e=W(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},Nc=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
345
345
|
:host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
|
|
346
346
|
:host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
|
|
347
347
|
@media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
|
|
348
|
-
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,pn=!1,wr=class extends Rc{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(br("slot",null,{hidden:""}),br("style",Uc))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(pn)return;pn=!0;const t=Nc||gr,e=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${e}%`);let n=Dc(this);if(t&&(n=`${n.replace(/\d+%$/,"")} ${e}%`),gr)for(const o of this.labels)W(o,"aria-label",n);W(this,"aria-busy",`${this.position===-1}`),W(this,"aria-label",n.trim()),W(this,"aria-labelledby",null),W(this,"aria-valuemax","100"),W(this,"aria-valuemin","0"),W(this,"aria-valuenow",`${e}`),W(this,"role",t?"img":"progressbar"),pn=!1}get labels(){const t=this.closest("label:not([for])"),e=qc(this);return t&&(t.htmlFor=e),Pc(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return xr(this,"value")}set value(t){Er(this,"value",t)}get max(){return xr(this,"max")||1}set max(t){Er(this,"max",t)}};wr.formAssociated=!0;var yr=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),xr=(t,e)=>{const n=W(t,e);return yr(n)?Math.max(0,Number.parseFloat(n)):null},Er=(t,e,n)=>{if(n===null||yr(n))W(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${W}': '${n}'`)};Vc.define("u-progress",wr);const zc=String(ma).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");return L.UHTMLComboboxElement=Ae,L.UHTMLTabElement=Wn,L.UHTMLTabListElement=Pn,L.UHTMLTabPanelElement=qn,L.UHTMLTabsElement=Rn,L.analytics=hi,L.fixLawHtml=Si,L.getLawChecked=Gs,L.pagination=$s,L.parseLawIds=Xs,L.parseLawMeta=js,L.printcss=zc,L.setLawChecked=Hs,L.styles=ha,L.toast=M,L.toggleAppExpanded=wi,L.toggleLawChecked=Js,L.version=fa,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),L})({});
|
|
348
|
+
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,un=!1,gr=class extends Ac{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(hr("slot",null,{hidden:""}),hr("style",Nc))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(un)return;un=!0;const t=Tc||mr,e=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${e}%`);let n=Mc(this);if(t&&(n=`${n.replace(/\d+%$/,"")} ${e}%`),mr)for(const o of this.labels)W(o,"aria-label",n);W(this,"aria-busy",`${this.position===-1}`),W(this,"aria-label",n.trim()),W(this,"aria-labelledby",null),W(this,"aria-valuemax","100"),W(this,"aria-valuemin","0"),W(this,"aria-valuenow",`${e}`),W(this,"role",t?"img":"progressbar"),un=!1}get labels(){const t=this.closest("label:not([for])"),e=Oc(this);return t&&(t.htmlFor=e),Lc(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return br(this,"value")}set value(t){wr(this,"value",t)}get max(){return br(this,"max")||1}set max(t){wr(this,"max",t)}};gr.formAssociated=!0;var vr=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),br=(t,e)=>{const n=W(t,e);return vr(n)?Math.max(0,Number.parseFloat(n)):null},wr=(t,e,n)=>{if(n===null||vr(n))W(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${W}': '${n}'`)};Ic.define("u-progress",gr),I()&&(Promise.resolve().then(()=>qc),Promise.resolve().then(()=>Bc));const Pc=String(aa).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");function Rc(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Wc(){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,v,f=!0){Object.defineProperty(p,v,{...Object.getOwnPropertyDescriptor(p,v),enumerable:f})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(v,f={}){super(v,f);const{source:b,command:y}=f;if(b!=null&&!(b instanceof Element))throw new TypeError("source must be an element");n.set(this,b||null),o.set(this,y!==void 0?String(y):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const v=n.get(this);if(!(v instanceof Element))return null;const f=e(v);return f!==e(this.target||document)?f.host:v}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(v,f={}){throw super(v,f),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(v){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(v===null)this.removeAttribute("commandfor"),a.delete(this);else if(v instanceof Element){this.setAttribute("commandfor","");const f=e(v);e(this)===f||f===this.ownerDocument?a.set(this,v):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const v=a.get(this);if(v)return v.isConnected?v:(a.delete(this),null);const f=e(this),b=this.getAttribute("commandfor");return(f instanceof Document||f instanceof ShadowRoot)&&b&&f.getElementById(b)||null}},command:{enumerable:!0,configurable:!0,get(){const v=this.getAttribute("command")||"";if(v.startsWith("--"))return v;const f=v.toLowerCase();switch(f){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return f}return""},set(v){this.setAttribute("command",v)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(v){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(v){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const l=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),l.get(this)||null},set(p){const v=l.get(this)||null;v&&this.removeEventListener("command",v),l.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function c(p){for(const v of p)v.oncommand=new Function("event",v.getAttribute("oncommand"))}const d=new MutationObserver(p=>{for(const v of p){const{target:f}=v;v.type==="childList"?c(f.querySelectorAll("[oncommand]")):c([f])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),c(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function h(p){if(u.has(p)||(u.add(p),p.defaultPrevented)||p.type!=="click")return;const v=p.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(v&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),v.matches("input")))throw new Error("Input elements no longer support `commandfor`");const f=p.target.closest("button[commandfor], button[command]");if(!f)return;if(f.form&&f.getAttribute("type")!=="button")throw p.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(f.hasAttribute("command")!==f.hasAttribute("commandfor")){const E=f.hasAttribute("command")?"command":"commandfor",C=f.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${E} attribute must also have a ${C} attribute to function.`)}if(f.command!=="show-popover"&&f.command!=="hide-popover"&&f.command!=="toggle-popover"&&f.command!=="show-modal"&&f.command!=="request-close"&&f.command!=="close"&&!f.command.startsWith("--")){console.warn(`"${f.command}" is not a valid command value. Custom commands must begin with --`);return}const b=f.commandForElement;if(!b)return;const y=new i("command",{command:f.command,source:f,cancelable:!0});if(b.dispatchEvent(y),y.defaultPrevented)return;const x=y.command.toLowerCase();if(b.popover){const E=!b.matches(":popover-open");E&&(x==="toggle-popover"||x==="show-popover")?b.showPopover({source:f}):!E&&x==="hide-popover"&&b.hidePopover()}else if(b.localName==="dialog"){const E=!b.hasAttribute("open");E&&x=="show-modal"?b.showModal():!E&&x=="close"?b.close(f.value?f.value:void 0):!E&&x=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const C=new Event("cancel",{cancelable:!0});this.dispatchEvent(C),C.defaultPrevented||this.close()}),b.requestClose(f.value?f.value:void 0))}}function g(p){p.addEventListener("click",h,!0)}function w(p,v){const f=p.prototype.attachShadow;p.prototype.attachShadow=function(y){const x=f.call(this,y);return v(x),x};const b=p.prototype.attachInternals;p.prototype.attachInternals=function(){const y=b.call(this);return y.shadowRoot&&v(y.shadowRoot),y}}s(HTMLButtonElement),w(HTMLElement,p=>{g(p),d.observe(p,{attributeFilter:["oncommand"]}),c(p.querySelectorAll("[oncommand]"))}),g(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}Rc()||Wc();const qc=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var we=new WeakMap;function ye(t){const e=t.getAttribute("closedby");return e==="closerequest"||e==="none"?e:"any"}function Vc(t){const e=Array.from(Pt);return e[e.length-1]===t}var Pt=new Set;function yr(t){if(t.key!=="Escape"||Pt.size===0)return;let e=!1,n=!1;const o=Array.from(Pt).reverse();for(const i of o){const r=ye(i);if(r==="none"){e=!0;break}if(r==="any"||r==="closerequest"){i.close(),n=!0;break}}(e||n)&&t.preventDefault()}document.addEventListener("keydown",yr);function Dc(t){return function(n){if(!Vc(t)||ye(t)!=="any"||!t.open)return;const o=t.getBoundingClientRect(),{clientX:i,clientY:r}=n;o.top<=r&&r<=o.bottom&&o.left<=i&&i<=o.right||t.close()}}function Uc(t){return function(n){if(n.target!==t||ye(t)!=="any")return;const o=t.getBoundingClientRect();o.top<n.clientY&&n.clientY<o.bottom&&o.left<n.clientX&&n.clientX<o.right||t.close()}}function zc(t){return function(n){ye(t)==="none"&&n.preventDefault()}}function Rt(t){if(we.has(t))return;const e={handleEscape:yr,handleClick:Uc(t),handleDocClick:Dc(t),handleCancel:zc(t),attrObserver:new MutationObserver(()=>{})};t.addEventListener("click",e.handleClick),t.addEventListener("cancel",e.handleCancel),document.addEventListener("click",e.handleDocClick,!0),e.attrObserver.observe(t,{attributes:!0,attributeFilter:["closedby"]}),Pt.add(t),we.set(t,e)}function xe(t){const e=we.get(t);e&&(t.removeEventListener("click",e.handleClick),t.removeEventListener("cancel",e.handleCancel),document.removeEventListener("click",e.handleDocClick,!0),e.attrObserver.disconnect(),Pt.delete(t),we.delete(t))}function pn(t){t.querySelectorAll("dialog[closedby]").forEach(o=>{o instanceof HTMLDialogElement&&o.open&&Rt(o)});const e=new MutationObserver(o=>{o.forEach(i=>{i.addedNodes.forEach(r=>{r instanceof HTMLDialogElement&&r.open&&r.hasAttribute("closedby")&&Rt(r),r instanceof Element&&r.querySelectorAll("dialog[closedby]").forEach(a=>{a instanceof HTMLDialogElement&&a.open&&Rt(a)})}),i.removedNodes.forEach(r=>{r instanceof HTMLDialogElement&&xe(r),r instanceof Element&&r.querySelectorAll("dialog").forEach(xe)})})}),n=t===document?document.body:t;e.observe(n,{childList:!0,subtree:!0})}function xr(t){const e=[];t.shadowRoot&&e.push(t.shadowRoot);for(const n of Array.from(t.children))e.push(...xr(n));return e}function Fc(){pn(document),document.body&&xr(document.body).forEach(pn);const t=HTMLElement.prototype.attachShadow;HTMLElement.prototype.attachShadow=function(n){const o=t.call(this,n);return pn(o),o}}var Er=!1;function mn(){return typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype=="object"&&"closedBy"in HTMLDialogElement.prototype}function Sr(){if(Er||mn())return;if(!("showModal"in HTMLDialogElement.prototype)){console.warn("[closedBy polyfill] <dialog> API not found – polyfill skipped.");return}const t=HTMLDialogElement.prototype.showModal,e=HTMLDialogElement.prototype.close;HTMLDialogElement.prototype.showModal=function(){t.call(this),this.open&&this.hasAttribute("closedby")&&Rt(this)},HTMLDialogElement.prototype.close=function(o){xe(this),e.call(this,o)},Object.defineProperty(HTMLDialogElement.prototype,"closedBy",{get(){const n=this.getAttribute("closedby");return n==="closerequest"||n==="none"?n:"any"},set(n){n==="any"||n==="closerequest"||n==="none"?this.setAttribute("closedby",n):(console.warn(`[closedBy polyfill] Invalid value '${n}'. Falling back to 'any'.`),this.setAttribute("closedby","any")),this.open&&(this.hasAttribute("closedby")?Rt(this):xe(this))},enumerable:!0,configurable:!0}),Fc(),Er=!0}mn()||Sr();const Bc=Object.freeze(Object.defineProperty({__proto__:null,apply:Sr,isSupported:mn},Symbol.toStringTag,{value:"Module"}));return L.UHTMLComboboxElement=Ae,L.UHTMLTabElement=qn,L.UHTMLTabListElement=Wn,L.UHTMLTabPanelElement=Vn,L.UHTMLTabsElement=Rn,L.analytics=pi,L.fixLawHtml=yi,L.getLawChecked=qs,L.pagination=js,L.parseLawIds=Us,L.parseLawMeta=zs,L.printcss=Pc,L.setLawChecked=Ds,L.styles=la,L.toast=N,L.toggleAppExpanded=gi,L.toggleLawChecked=Vs,L.version=sa,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),L})({});
|