@mattilsynet/design 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mtds/index.iife.js +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
|
@@ -5,7 +5,7 @@ var mtds=function(T){"use strict";var _n=Object.defineProperty,se=Object.getOwnP
|
|
|
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) { ${$n} }`))}static get observedAttributes(){return Object.keys(it).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Cn(this),tt(this,ue,this,!0),Tt(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(rt,0,this),setTimeout(at,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];it[n]&&(this._texts[n]=o||it[n])}disconnectedCallback(){Tt(this,!1),Tn(this,ue,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;At(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Pn(this),t.type==="click"&&Rn(this,t),t.type==="focus"&&Dn(this,t),t.type==="input"&&Hn(this,t),t.type==="keydown"&&Bn(this,t),t.type==="mousedown"&&kt(t),t.type==="mutation"&&rt(this,t))}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:nt)!==nt}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:nt)!==nt}set creatable(t){f(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 o=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},It=t=>t instanceof HTMLDataElement,At=({control:t})=>t?.disabled||t?.readOnly||!1,rt=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:r,control:a,list:u,multiple:l}=t;let p=`${O((o=a?.labels)==null?void 0:o[0])}${l?`, ${r.length?s.found.replace("%d",`${r.length}`):s.empty}`:""}`;const d=[];for(const{addedNodes:E,removedNodes:S}of e?.detail||[]){for(const v of E)It(v)&&d.unshift(v);for(const v of S)It(v)&&d.push(v)}const _=l?d.length===1:d[0]===i;if(i&&a&&_){const E=f(a,"aria-expanded"),S=f(a,"inputmode"),v=It(i)?a:i,P=!d[0].isConnected;t._speak=`${s[P?"removed":"added"]} ${O(d[0])}, `,(On||i===a)&&xt(t._speak),a!==v&&(f(a,"aria-expanded",null),f(a,"inputmode","none"),p=" ",a.focus()),setTimeout(()=>{var j;f(a,"aria-expanded",E),f(a,"inputmode",P?"none":S),(j=v?.focus)==null||j.call(v),f(a,"inputmode",S),t._speak="",Mn?tt(t,"blur",()=>rt(t),pe):setTimeout(rt,100,t)},100)}let h=0;const A=t.querySelector("select"),St=At(t)?"":`${s.remove}, `;for(const E of r){const S=A?.options[h],v=O(E),P=E.value||v,j=`${t._speak}${v}, ${St}${++h} ${s.of} ${r.length}`;f(E,"role","button"),f(E,"value",P),f(E,"tabindex","-1"),f(E,"aria-label",j),S?Object.assign(S,{textContent:v,value:P}):A?.appendChild(new Option(v,P,!0,!0))}A&&f(A,"multiple",l?"":null);for(const E of[...A?.options||[]].slice(h))E.remove();!l&&h>1&&console.warn("u-combobox: Multiple <data> found in single mode."),u&&f(u,"aria-multiselectable",`${l}`),a&&f(a,"list",In(u)),a&&f(a,"aria-label",`${t._speak}${p}`);const Z=O(r[0]);Z!==t._item&&at(t),t._item=Z,fe(t),me(t),(n=Tt(t))==null||n.takeRecords()},fe=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||At(t))},me=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const r=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(r)?"":null)}},at=t=>{const{multiple:e,control:o,items:n}=t,i=O(n[0]);!e&&o&&i!==o.value&&de(o,i,i?"insertText":"deleteContent")},Lt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:r,items:a,multiple:u}=t,l=((o=r?.value)==null?void 0:o.trim())||"",p=l.toLowerCase()||null;let d=[...i].find(h=>(f(h,"label")||O(h)).trim().toLowerCase()===p);const _={bubbles:!0,cancelable:!0,detail:d};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",_))||(d=[...i].find(h=>h.selected)),e)return me(t),d?U(t,d,!1):s&&l?U(t,{value:l},!1):(!u&&!l&&a[0]?U(t,a[0]):at(t),xt(n.invalid));for(const h of i)h.selected=h===d},U=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,r=ot("data",e.label||e.value,{value:e.value}),a=[...i].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:a||r};if(a&&!o)return at(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!s)for(const p of[...i])p.remove();a?a.remove():n?.insertAdjacentElement("beforebegin",r),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Dn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),xt()},Pn=t=>kt()||setTimeout(Nn,0,t),Nn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Lt(t),t._focus=void 0)},Rn=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:r,items:a}=t;if(s?.contains(i))return r&&de(r,"","deleteContentBackward"),r?.focus();for(const u of a){const{top:l,right:p,bottom:d,left:_}=u.getBoundingClientRect();if(u.contains(i))return U(t,u);if(n>=l&&n<=d&&o>=_&&o<=p)return u.focus()}i===t&&r?.focus()},Hn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,r=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!r){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const u of n)if(u.value&&u.value===r)return U(t,u,s)}else s||Lt(t,!1);fe(t)},Bn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:r,repeat:a,target:u}=e,l=i&&i===u,p=l&&i?.selectionEnd;let d=l?s.length:[...s].indexOf(u);if(l&&r==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),tt(n,"blur",()=>f(n,"tabindex",null),pe)),!(!l&&xn(e)||d===-1)){if(r==="ArrowRight"&&!l)d+=1;else if(r==="ArrowLeft"&&!p)d-=1;else if(r==="Enter"&&l){const _=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",_)),Lt(t)}else if((r==="Backspace"||r==="Delete")&&!p){if(e.preventDefault(),!a&&s[d])return U(t,s[d]);l&&(d-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,d)]||i)==null||o.focus()}};An.define("u-combobox",st);var Mt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Un=Mt&&/android/i.test(navigator.userAgent),he;Mt&&/^Mac/i.test(((he=navigator.userAgentData)==null?void 0:he.platform)||navigator.platform);var qn=`${Un?"data":"aria"}-labelledby`,Ot=":host(:not([hidden])) { display: block }",lt=typeof HTMLElement>"u"?class{}:HTMLElement;function x(t,e,o){var n;return o===void 0?(n=t.getAttribute(e))!=null?n:null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var ve=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Fn=(t,...e)=>ve("add",t,e),Vn=(t,...e)=>ve("remove",t,e),ct=(t,e)=>t.attachShadow({mode:"open"}).append(ye("slot"),ye("style",e)),dt=new WeakMap,_e=(t,e)=>{if(e===void 0)return dt.get(t);try{dt.get(t).disconnect(),dt.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),dt.set(t,o)}},Yn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},be=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},jn=0,ge=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++jn).toString(32)}`),t.id):"",ye=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},ut={define:(t,e)=>!Mt||window.customElements.get(t)||window.customElements.define(t,e)},pt="aria-controls",q="aria-selected",we=class extends lt{constructor(){super(),ct(this,Ot)}get tabList(){return ft("u-tablist",this)[0]||null}get selectedIndex(){return mt(this.tabs)}set selectedIndex(t){Nt(this.tabs[t])}get tabs(){return ft("u-tab",this)}get panels(){return ft("u-tabpanel",this)}},Ee=class extends lt{constructor(){super(),ct(this,Ot)}connectedCallback(){x(this,"role","tablist"),Fn(this,"click,keydown",this),_e(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){Vn(this,"click,keydown",this),_e(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(q,"true")}const{key:e}=t,o=[...this.tabs],n=o.findIndex(s=>s.contains(t.target));let i=n;if(!(t.defaultPrevented||n===-1)&&(t.type==="click"&&Nt(o[n]),t.type==="keydown"&&!Yn(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(n+1)%o.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(n||o.length)-1;else if(e==="End")i=o.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=mt(o);else return;setTimeout(()=>{o[n].tabIndex=-1,o[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),o[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return mt(this.tabs)}set selectedIndex(t){Nt(this.tabs[t])}},Dt=!1,$e=class extends lt{static get observedAttributes(){return["id",q,pt]}constructor(){super(),ct(this,":host(:not([hidden])) { cursor: pointer; display: inline-block }")}connectedCallback(){x(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!Dt&&this.selected&&this.tabList){Dt=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=ft("u-tabpanel",this.tabsElement||this),o=Pt(this,e[t.indexOf(this)]);o&&x(o,qn,ge(this)),t.forEach((n,i)=>{const s=Pt(n,e[i]);n.tabIndex=n===this?0:-1,x(n,q,`${n===this}`),s&&(s.hidden=s!==o),s&&x(n,pt,s.id)}),Dt=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return x(this,q)==="true"}set selected(t){x(this,q,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return Pt(this)}},Se=class extends lt{static get observedAttributes(){return["hidden"]}constructor(){super(),ct(this,Ot)}connectedCallback(){x(this,"role","tabpanel"),this.hidden=mt(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){this.hidden||Kn(this.firstChild)?x(this,"tabindex",null):this.tabIndex=0}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${pt}="${this.id}"]`;return be(this).querySelectorAll(t)}},ft=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),Pt=(t,e)=>{const o=x(t,pt)||ge(e),n=be(t).getElementById(o);return n?.nodeName==="U-TABPANEL"?n:null},mt=t=>[...t].findIndex(e=>x(e,q)==="true"),Nt=t=>t&&x(t,"aria-selected","true"),Kn=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ut.define("u-tabs",we),ut.define("u-tablist",Ee),ut.define("u-tab",$e),ut.define("u-tabpanel",Se);const Wn="2.0.0",$={capture:!0,passive:!0},W=typeof window<"u"&&typeof document<"u";function Xn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let Gn=0;const zn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ht(t){return t.id||(t.id=`${zn}${++Gn}`),t.id}const Qn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Qn("add",t,e),X=W?document.createElement("div"):null,vt=new Map,Jn=()=>{for(const[t,e]of vt)e()};X&&(X.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Jn,$));const F={top:0,right:1,bottom:2,left:3};function L(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return vt.delete(t);X?.isConnected||document.body.append(X||""),vt.has(t)||vt.set(t,()=>L(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:r,offsetHeight:a}=t,u=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:p,height:d,left:_,top:h}=e.getBoundingClientRect(),A=window.visualViewport?.width||window.innerWidth,St=window.visualViewport?.height||window.innerHeight,Z=window.pageXOffset||document.documentElement.scrollLeft,E=window.pageYOffset||document.documentElement.scrollTop,S=Math.round(_-(u-p)/2),v=Math.round(h-(l-d)/2),P=Math.min(Math.max(10,S-(r-u)/2),A-r-10),j=Math.min(Math.max(10,v-(a-l)/2),St-a-10),cs=S-r>0,ds=S+u+r<A,us=v-a>0,ps=v+l+a<St,hn=i===F.top||i===F.bottom,fs=i===F.right&&(n||ds)||!cs,vn=i===F.bottom&&(n||ps)||!us,ms=Math.round(hn?P:fs?S+u:S-r),hs=Math.round(hn?vn?v+l:v-a:j);t.style.position="absolute",t.style.left=`${ms+Z}px`,t.style.top=`${hs+E}px`,X?.style.setProperty("translate",`0px ${Math.round(vn?Z+v+l+a+30:0)}px`)}function Te(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Rt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Rt.get(t)||[];i.length||(Rt.set(t,i),Te((s,r)=>{if(t.isConnected&&i?.length)for(const a of i)a();else r?.disconnect(),Rt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},C=t=>{if(!W)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Ht=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),xe="mattilsynet.matomo.cloud";let Bt=!0;function Zn(t,e={}){if(W){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${xe}/matomo.php`])),t==="init"){const{matomoId:o,enabled:n}=e;Bt=n??window.location.hostname==="localhost",window._paq.push(["setSiteId",o]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${xe}/matomo.js`}))}if(Bt==="debug")return console.info(`Analytics: "${t}"`,e);if(Bt!==!1)if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:s}=e,r=["trackEvent",o,n,i,s];window._paq.push(r.filter(a=>a!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const Ce="_alert_1run0_1 _ds-alert_im5h3_1",ke="_app_1run0_1",Ie="_sticky_1run0_1",Ae="_avatar_1run0_1 _ds-avatar_im5h3_1",Le="_badge_1run0_1",Me="_breadcrumbs_1run0_1 _ds-breadcrumbs_im5h3_1",Oe="_button_1run0_1 _ds-button_im5h3_1",De="_card_1run0_1",Pe="_group_1run0_1",Ne="_chip_1run0_1 _ds-chip_im5h3_1",Re="_details_1run0_1 _ds-details_im5h3_1",He="_dialog_1run0_1 _ds-dialog_im5h3_1",Be="_divider_1run0_1",Ue="_errorsummary_1run0_1 _ds-error-summary_im5h3_1",qe="__errorsummary_1run0_1",Fe="_field_1run0_1 _ds-field_im5h3_1",Ve="__datalist_1run0_1",Ye="_affixes_1run0_1 _ds-field-affixes_im5h3_1",je="_fieldset_1run0_1 _ds-fieldset_im5h3_1",Ke="_heading_1run0_1 _ds-heading_im5h3_1",We="_ingress_1run0_1",Xe="_muted_1run0_1",Ge="_info_1run0_1",ze="_prose_1run0_1",Qe="_helptext_1run0_1 _ds-focus_im5h3_1",Je="_input_1run0_1 _ds-input_im5h3_1",Ze="_grid_1run0_1",to="_flex_1run0_1",eo="_link_1run0_1",oo="_logo_1run0_1",no="_pagination_1run0_1 _ds-pagination_im5h3_1",io="_popover_1run0_1",so="_progress_1run0_1",ro="__indeterminate_1run0_1",ao="_skeleton_1run0_1 _ds-skeleton_im5h3_1",lo="__skeleton_1run0_1",co="_spinner_1run0_1",uo="_steps_1run0_1",po="_table_1run0_1 _ds-table_im5h3_1",fo="__scrollShadow_1run0_1",mo="_tabs_1run0_1 _ds-tabs_im5h3_1",ho="__scrollMask_1run0_1",vo="_tag_1run0_1 _ds-tag_im5h3_1",_o="_togglegroup_1run0_1",bo="__tooltip_1run0_1",go="_validation_1run0_1 _ds-validation-message_im5h3_1",yo="_body_1run0_153",wo="__checked_1run0_1",g={alert:Ce,app:ke,sticky:Ie,avatar:Ae,badge:Le,breadcrumbs:Me,button:Oe,card:De,group:Pe,chip:Ne,details:Re,dialog:He,divider:Be,errorsummary:Ue,_errorsummary:qe,field:Fe,_datalist:Ve,affixes:Ye,fieldset:je,heading:Ke,ingress:We,muted:Xe,info:Ge,prose:ze,helptext:Qe,input:Je,grid:Ze,flex:to,link:eo,logo:oo,pagination:no,popover:io,progress:so,_indeterminate:ro,skeleton:ao,_skeleton:lo,spinner:co,steps:uo,table:po,_scrollShadow:fo,tabs:mo,_scrollMask:ho,tag:vo,togglegroup:_o,_tooltip:bo,validation:go,body:yo,_checked:wo},ti=Object.freeze(Object.defineProperty({__proto__:null,_checked:wo,_datalist:Ve,_errorsummary:qe,_indeterminate:ro,_scrollMask:ho,_scrollShadow:fo,_skeleton:lo,_tooltip:bo,affixes:Ye,alert:Ce,app:ke,avatar:Ae,badge:Le,body:yo,breadcrumbs:Me,button:Oe,card:De,chip:Ne,default:g,details:Re,dialog:He,divider:Be,errorsummary:Ue,field:Fe,fieldset:je,flex:to,grid:Ze,group:Pe,heading:Ke,helptext:Qe,info:Ge,ingress:We,input:Je,link:eo,logo:oo,muted:Xe,pagination:no,popover:io,progress:so,prose:ze,skeleton:ao,spinner:co,steps:uo,sticky:Ie,table:po,tabs:mo,tag:vo,togglegroup:_o,validation:go},Symbol.toStringTag,{value:"Module"}));typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const Eo=g.app.split(" ")[0],ei=g.sticky.split(" ")[0],oi='[data-command="toggle-app-expanded"]',Ut=`.${Eo} > dialog,.${Eo} dialog ~ main`,$o=t=>{document.startViewTransition?document.startViewTransition(t):t()},So=t=>$o(()=>window.mtdsToggleAppExpanded?.(t));function ni({target:t,defaultPrevented:e}){const o=t?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Ut))return To();if(e||!(t instanceof HTMLButtonElement)||!t.matches(oi))return;getComputedStyle(t).position==="sticky"?So():$o(()=>{const i=document.querySelector(Ut);i?.setAttribute("data-closedby","any"),i?.showModal()})}function To(){document.querySelector(Ut)?.close()}let qt=0,Y,M=0,y,Ft=0,_t=0,Vt=!1,Yt=0,R=0;function ii([t]){y=t,xo()}function xo(){if(!y?.isConnected)return;const t=window.scrollY,e=t<R;R=t,e!==Y&&(qt=(y.parentElement?.getBoundingClientRect().top||0)+R,Y=e,Ft=y.offsetHeight,_t=y.getBoundingClientRect().top+R,Vt=y.offsetHeight<=window.innerHeight,Yt=window.innerHeight),!(M===-1&&Vt)&&(M!==-1&&(Vt||Y&&R<=_t)?(y.style.setProperty("--pos","sticky"),y.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(y.style.setProperty("--pos","relative"),y.style.setProperty("--top",`${Math.max(0,R-qt)}px`),M=0):M!==1&&!Y&&R+Yt>=_t+Ft?(y.style.setProperty("--pos","sticky"),y.style.setProperty("--top",`${Yt-Ft}px`),M=1):M===1&&Y&&(y.style.setProperty("--pos","relative"),y.style.setProperty("--top",`${_t-qt}px`),M=0))}C(()=>{V(document.documentElement,ei,ii),b(document,"click",ni,$),b(window,"resize",Xn(To,100),$),b(window,"scroll",xo,$)});const si=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),r=Array.from({length:s+1-i},(a,u)=>u+i);return o>4&&i>1&&r.splice(0,2,1,0),o>3&&s<e&&r.splice(-2,2,0,e),r},ri=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:si(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),ai=g.breadcrumbs.split(" ")[0];function li(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}C(()=>V(document.documentElement,ai,li));const ci=g.dialog.split(" ")[0],di=W?document.getElementsByClassName(ci):[],ui=()=>{for(const t of di)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},pi=({clientX:t,clientY:e,target:o})=>{const n=o?.closest?.("dialog");if(n){if(o.closest('[data-command="close"]'))return n.close();if(c(n,"data-closedby")==="any"){const{top:i,right:s,bottom:r,left:a}=n.getBoundingClientRect();i<=e&&e<=r&&a<=t&&t<=s||n.close()}}};C(()=>{b(document,"click",pi,$),Te(ui).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function fi(t){if(t.animationName!==g._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}C(()=>b(document,"animationend",fi,$));var mi=Object.defineProperty,Co=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable,ko=(t,e,o)=>e in t?mi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,_i=(t,e)=>{for(var o in e||(e={}))hi.call(e,o)&&ko(t,o,e[o]);if(Co)for(var o of Co(e))vi.call(e,o)&&ko(t,o,e[o]);return t},G=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=G&&/android/i.test(navigator.userAgent),jt=G&&/iPad|iPhone|iPod/.test(navigator.userAgent),Io;G&&/^Mac/i.test(((Io=navigator.userAgentData)==null?void 0:Io.platform)||navigator.platform);var bi=`${bt?"data":"aria"}-labelledby`,gi=":host(:not([hidden])) { display: block }",yi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ao=typeof HTMLElement>"u"?class{}:HTMLElement;function m(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Lo=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},z=(t,...e)=>Lo("add",t,e),gt=(t,...e)=>Lo("remove",t,e),wi=(t,e)=>t.attachShadow({mode:"open"}).append(Xt("slot"),Xt("style",e)),yt=new WeakMap,Kt=(t,e)=>{if(e===void 0)return yt.get(t);try{yt.get(t).disconnect(),yt.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),yt.set(t,o)}},Mo=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Ei=0,Wt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Ei).toString(32)}`),t.id):"",Xt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Oo={define:(t,e)=>!G||window.customElements.get(t)||window.customElements.define(t,e)},H,$i=0,Do=t=>{H||(H=Xt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",m(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${$i++%2?" ":""}`)},Si=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},r=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(r,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Gt=!1,zt=t=>(t?.type==="mouseup"&&(Gt=!1),t?.type==="mousedown"&&(Gt=!0,z(document,"mouseup",zt,{once:!0})),Gt),Qt="disabled",Q="selected",Ti=class extends Ao{static get observedAttributes(){return[Qt,Q]}connectedCallback(){jt||(this.tabIndex=-1),this.hasAttribute("role")||m(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){m(this,"aria-disabled",`${this.disabled}`),m(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Q]}set defaultSelected(t){this[Q]=t}get disabled(){return m(this,Qt)!==null}set disabled(t){m(this,Qt,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=m(this,"label"))!=null?t:this.text}set label(t){m(this,"label",t)}get selected(){return m(this,Q)!==null}set selected(t){m(this,Q,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=m(this,"value"))!=null?t:this.text}set value(t){m(this,"value",t)}};Oo.define("u-option",Ti);var Po,No=0,xi=jt||bt,Ro="click,focusout,input,keydown,mousedown,mouseup",Ho="focus,focusin,blur,focusout",wt={singular:"%d hit",plural:"%d hits"},Bo=class extends Ao{constructor(){super(),this._texts=_i({},wt),this._value="",wi(this,`${gi}
|
|
8
|
+
::slotted(data:focus) { ${$n} }`))}static get observedAttributes(){return Object.keys(it).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Cn(this),tt(this,ue,this,!0),Tt(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(rt,0,this),setTimeout(at,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];it[n]&&(this._texts[n]=o||it[n])}disconnectedCallback(){Tt(this,!1),Tn(this,ue,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;At(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Pn(this),t.type==="click"&&Rn(this,t),t.type==="focus"&&Dn(this,t),t.type==="input"&&Hn(this,t),t.type==="keydown"&&Bn(this,t),t.type==="mousedown"&&kt(t),t.type==="mutation"&&rt(this,t))}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:nt)!==nt}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:nt)!==nt}set creatable(t){f(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 o=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},It=t=>t instanceof HTMLDataElement,At=({control:t})=>t?.disabled||t?.readOnly||!1,rt=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:r,control:a,list:u,multiple:l}=t;let p=`${O((o=a?.labels)==null?void 0:o[0])}${l?`, ${r.length?s.found.replace("%d",`${r.length}`):s.empty}`:""}`;const d=[];for(const{addedNodes:E,removedNodes:S}of e?.detail||[]){for(const v of E)It(v)&&d.unshift(v);for(const v of S)It(v)&&d.push(v)}const _=l?d.length===1:d[0]===i;if(i&&a&&_){const E=f(a,"aria-expanded"),S=f(a,"inputmode"),v=It(i)?a:i,P=!d[0].isConnected;t._speak=`${s[P?"removed":"added"]} ${O(d[0])}, `,(On||i===a)&&xt(t._speak),a!==v&&(f(a,"aria-expanded",null),f(a,"inputmode","none"),p=" ",a.focus()),setTimeout(()=>{var j;f(a,"aria-expanded",E),f(a,"inputmode",P?"none":S),(j=v?.focus)==null||j.call(v),f(a,"inputmode",S),t._speak="",Mn?tt(t,"blur",()=>rt(t),pe):setTimeout(rt,100,t)},100)}let h=0;const A=t.querySelector("select"),St=At(t)?"":`${s.remove}, `;for(const E of r){const S=A?.options[h],v=O(E),P=E.value||v,j=`${t._speak}${v}, ${St}${++h} ${s.of} ${r.length}`;f(E,"role","button"),f(E,"value",P),f(E,"tabindex","-1"),f(E,"aria-label",j),S?Object.assign(S,{textContent:v,value:P}):A?.appendChild(new Option(v,P,!0,!0))}A&&f(A,"multiple",l?"":null);for(const E of[...A?.options||[]].slice(h))E.remove();!l&&h>1&&console.warn("u-combobox: Multiple <data> found in single mode."),u&&f(u,"aria-multiselectable",`${l}`),a&&f(a,"list",In(u)),a&&f(a,"aria-label",`${t._speak}${p}`);const Z=O(r[0]);Z!==t._item&&at(t),t._item=Z,fe(t),me(t),(n=Tt(t))==null||n.takeRecords()},fe=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||At(t))},me=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const r=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(r)?"":null)}},at=t=>{const{multiple:e,control:o,items:n}=t,i=O(n[0]);!e&&o&&i!==o.value&&de(o,i,i?"insertText":"deleteContent")},Lt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:r,items:a,multiple:u}=t,l=((o=r?.value)==null?void 0:o.trim())||"",p=l.toLowerCase()||null;let d=[...i].find(h=>(f(h,"label")||O(h)).trim().toLowerCase()===p);const _={bubbles:!0,cancelable:!0,detail:d};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",_))||(d=[...i].find(h=>h.selected)),e)return me(t),d?U(t,d,!1):s&&l?U(t,{value:l},!1):(!u&&!l&&a[0]?U(t,a[0]):at(t),xt(n.invalid));for(const h of i)h.selected=h===d},U=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,r=ot("data",e.label||e.value,{value:e.value}),a=[...i].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:a||r};if(a&&!o)return at(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!s)for(const p of[...i])p.remove();a?a.remove():n?.insertAdjacentElement("beforebegin",r),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Dn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),xt()},Pn=t=>kt()||setTimeout(Nn,0,t),Nn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Lt(t),t._focus=void 0)},Rn=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:r,items:a}=t;if(s?.contains(i))return r&&de(r,"","deleteContentBackward"),r?.focus();for(const u of a){const{top:l,right:p,bottom:d,left:_}=u.getBoundingClientRect();if(u.contains(i))return U(t,u);if(n>=l&&n<=d&&o>=_&&o<=p)return u.focus()}i===t&&r?.focus()},Hn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,r=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!r){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const u of n)if(u.value&&u.value===r)return U(t,u,s)}else s||Lt(t,!1);fe(t)},Bn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:r,repeat:a,target:u}=e,l=i&&i===u,p=l&&i?.selectionEnd;let d=l?s.length:[...s].indexOf(u);if(l&&r==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),tt(n,"blur",()=>f(n,"tabindex",null),pe)),!(!l&&xn(e)||d===-1)){if(r==="ArrowRight"&&!l)d+=1;else if(r==="ArrowLeft"&&!p)d-=1;else if(r==="Enter"&&l){const _=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",_)),Lt(t)}else if((r==="Backspace"||r==="Delete")&&!p){if(e.preventDefault(),!a&&s[d])return U(t,s[d]);l&&(d-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,d)]||i)==null||o.focus()}};An.define("u-combobox",st);var Mt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Un=Mt&&/android/i.test(navigator.userAgent),he;Mt&&/^Mac/i.test(((he=navigator.userAgentData)==null?void 0:he.platform)||navigator.platform);var qn=`${Un?"data":"aria"}-labelledby`,Ot=":host(:not([hidden])) { display: block }",lt=typeof HTMLElement>"u"?class{}:HTMLElement;function x(t,e,o){var n;return o===void 0?(n=t.getAttribute(e))!=null?n:null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var ve=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Fn=(t,...e)=>ve("add",t,e),Vn=(t,...e)=>ve("remove",t,e),ct=(t,e)=>t.attachShadow({mode:"open"}).append(ye("slot"),ye("style",e)),dt=new WeakMap,_e=(t,e)=>{if(e===void 0)return dt.get(t);try{dt.get(t).disconnect(),dt.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),dt.set(t,o)}},Yn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},be=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},jn=0,ge=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++jn).toString(32)}`),t.id):"",ye=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},ut={define:(t,e)=>!Mt||window.customElements.get(t)||window.customElements.define(t,e)},pt="aria-controls",q="aria-selected",we=class extends lt{constructor(){super(),ct(this,Ot)}get tabList(){return ft("u-tablist",this)[0]||null}get selectedIndex(){return mt(this.tabs)}set selectedIndex(t){Nt(this.tabs[t])}get tabs(){return ft("u-tab",this)}get panels(){return ft("u-tabpanel",this)}},Ee=class extends lt{constructor(){super(),ct(this,Ot)}connectedCallback(){x(this,"role","tablist"),Fn(this,"click,keydown",this),_e(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){Vn(this,"click,keydown",this),_e(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(q,"true")}const{key:e}=t,o=[...this.tabs],n=o.findIndex(s=>s.contains(t.target));let i=n;if(!(t.defaultPrevented||n===-1)&&(t.type==="click"&&Nt(o[n]),t.type==="keydown"&&!Yn(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(n+1)%o.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(n||o.length)-1;else if(e==="End")i=o.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=mt(o);else return;setTimeout(()=>{o[n].tabIndex=-1,o[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),o[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return mt(this.tabs)}set selectedIndex(t){Nt(this.tabs[t])}},Dt=!1,$e=class extends lt{static get observedAttributes(){return["id",q,pt]}constructor(){super(),ct(this,":host(:not([hidden])) { cursor: pointer; display: inline-block }")}connectedCallback(){x(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!Dt&&this.selected&&this.tabList){Dt=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=ft("u-tabpanel",this.tabsElement||this),o=Pt(this,e[t.indexOf(this)]);o&&x(o,qn,ge(this)),t.forEach((n,i)=>{const s=Pt(n,e[i]);n.tabIndex=n===this?0:-1,x(n,q,`${n===this}`),s&&(s.hidden=s!==o),s&&x(n,pt,s.id)}),Dt=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return x(this,q)==="true"}set selected(t){x(this,q,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return Pt(this)}},Se=class extends lt{static get observedAttributes(){return["hidden"]}constructor(){super(),ct(this,Ot)}connectedCallback(){x(this,"role","tabpanel"),this.hidden=mt(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){this.hidden||Kn(this.firstChild)?x(this,"tabindex",null):this.tabIndex=0}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${pt}="${this.id}"]`;return be(this).querySelectorAll(t)}},ft=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),Pt=(t,e)=>{const o=x(t,pt)||ge(e),n=be(t).getElementById(o);return n?.nodeName==="U-TABPANEL"?n:null},mt=t=>[...t].findIndex(e=>x(e,q)==="true"),Nt=t=>t&&x(t,"aria-selected","true"),Kn=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ut.define("u-tabs",we),ut.define("u-tablist",Ee),ut.define("u-tab",$e),ut.define("u-tabpanel",Se);const Wn="2.0.1",$={capture:!0,passive:!0},W=typeof window<"u"&&typeof document<"u";function Xn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let Gn=0;const zn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ht(t){return t.id||(t.id=`${zn}${++Gn}`),t.id}const Qn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Qn("add",t,e),X=W?document.createElement("div"):null,vt=new Map,Jn=()=>{for(const[t,e]of vt)e()};X&&(X.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Jn,$));const F={top:0,right:1,bottom:2,left:3};function L(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return vt.delete(t);X?.isConnected||document.body.append(X||""),vt.has(t)||vt.set(t,()=>L(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:r,offsetHeight:a}=t,u=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:p,height:d,left:_,top:h}=e.getBoundingClientRect(),A=window.visualViewport?.width||window.innerWidth,St=window.visualViewport?.height||window.innerHeight,Z=window.pageXOffset||document.documentElement.scrollLeft,E=window.pageYOffset||document.documentElement.scrollTop,S=Math.round(_-(u-p)/2),v=Math.round(h-(l-d)/2),P=Math.min(Math.max(10,S-(r-u)/2),A-r-10),j=Math.min(Math.max(10,v-(a-l)/2),St-a-10),cs=S-r>0,ds=S+u+r<A,us=v-a>0,ps=v+l+a<St,hn=i===F.top||i===F.bottom,fs=i===F.right&&(n||ds)||!cs,vn=i===F.bottom&&(n||ps)||!us,ms=Math.round(hn?P:fs?S+u:S-r),hs=Math.round(hn?vn?v+l:v-a:j);t.style.position="absolute",t.style.left=`${ms+Z}px`,t.style.top=`${hs+E}px`,X?.style.setProperty("translate",`0px ${Math.round(vn?Z+v+l+a+30:0)}px`)}function Te(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Rt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Rt.get(t)||[];i.length||(Rt.set(t,i),Te((s,r)=>{if(t.isConnected&&i?.length)for(const a of i)a();else r?.disconnect(),Rt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},C=t=>{if(!W)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Ht=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),xe="mattilsynet.matomo.cloud";let Bt=!0;function Zn(t,e={}){if(W){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${xe}/matomo.php`])),t==="init"){const{matomoId:o,enabled:n}=e;Bt=n??window.location.hostname==="localhost",window._paq.push(["setSiteId",o]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${xe}/matomo.js`}))}if(Bt==="debug")return console.info(`Analytics: "${t}"`,e);if(Bt!==!1)if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:s}=e,r=["trackEvent",o,n,i,s];window._paq.push(r.filter(a=>a!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const Ce="_alert_1run0_1 _ds-alert_im5h3_1",ke="_app_1run0_1",Ie="_sticky_1run0_1",Ae="_avatar_1run0_1 _ds-avatar_im5h3_1",Le="_badge_1run0_1",Me="_breadcrumbs_1run0_1 _ds-breadcrumbs_im5h3_1",Oe="_button_1run0_1 _ds-button_im5h3_1",De="_card_1run0_1",Pe="_group_1run0_1",Ne="_chip_1run0_1 _ds-chip_im5h3_1",Re="_details_1run0_1 _ds-details_im5h3_1",He="_dialog_1run0_1 _ds-dialog_im5h3_1",Be="_divider_1run0_1",Ue="_errorsummary_1run0_1 _ds-error-summary_im5h3_1",qe="__errorsummary_1run0_1",Fe="_field_1run0_1 _ds-field_im5h3_1",Ve="__datalist_1run0_1",Ye="_affixes_1run0_1 _ds-field-affixes_im5h3_1",je="_fieldset_1run0_1 _ds-fieldset_im5h3_1",Ke="_heading_1run0_1 _ds-heading_im5h3_1",We="_ingress_1run0_1",Xe="_muted_1run0_1",Ge="_info_1run0_1",ze="_prose_1run0_1",Qe="_helptext_1run0_1 _ds-focus_im5h3_1",Je="_input_1run0_1 _ds-input_im5h3_1",Ze="_grid_1run0_1",to="_flex_1run0_1",eo="_link_1run0_1",oo="_logo_1run0_1",no="_pagination_1run0_1 _ds-pagination_im5h3_1",io="_popover_1run0_1",so="_progress_1run0_1",ro="__indeterminate_1run0_1",ao="_skeleton_1run0_1 _ds-skeleton_im5h3_1",lo="__skeleton_1run0_1",co="_spinner_1run0_1",uo="_steps_1run0_1",po="_table_1run0_1 _ds-table_im5h3_1",fo="__scrollShadow_1run0_1",mo="_tabs_1run0_1 _ds-tabs_im5h3_1",ho="__scrollMask_1run0_1",vo="_tag_1run0_1 _ds-tag_im5h3_1",_o="_togglegroup_1run0_1",bo="__tooltip_1run0_1",go="_validation_1run0_1 _ds-validation-message_im5h3_1",yo="_body_1run0_153",wo="__checked_1run0_1",g={alert:Ce,app:ke,sticky:Ie,avatar:Ae,badge:Le,breadcrumbs:Me,button:Oe,card:De,group:Pe,chip:Ne,details:Re,dialog:He,divider:Be,errorsummary:Ue,_errorsummary:qe,field:Fe,_datalist:Ve,affixes:Ye,fieldset:je,heading:Ke,ingress:We,muted:Xe,info:Ge,prose:ze,helptext:Qe,input:Je,grid:Ze,flex:to,link:eo,logo:oo,pagination:no,popover:io,progress:so,_indeterminate:ro,skeleton:ao,_skeleton:lo,spinner:co,steps:uo,table:po,_scrollShadow:fo,tabs:mo,_scrollMask:ho,tag:vo,togglegroup:_o,_tooltip:bo,validation:go,body:yo,_checked:wo},ti=Object.freeze(Object.defineProperty({__proto__:null,_checked:wo,_datalist:Ve,_errorsummary:qe,_indeterminate:ro,_scrollMask:ho,_scrollShadow:fo,_skeleton:lo,_tooltip:bo,affixes:Ye,alert:Ce,app:ke,avatar:Ae,badge:Le,body:yo,breadcrumbs:Me,button:Oe,card:De,chip:Ne,default:g,details:Re,dialog:He,divider:Be,errorsummary:Ue,field:Fe,fieldset:je,flex:to,grid:Ze,group:Pe,heading:Ke,helptext:Qe,info:Ge,ingress:We,input:Je,link:eo,logo:oo,muted:Xe,pagination:no,popover:io,progress:so,prose:ze,skeleton:ao,spinner:co,steps:uo,sticky:Ie,table:po,tabs:mo,tag:vo,togglegroup:_o,validation:go},Symbol.toStringTag,{value:"Module"}));typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const Eo=g.app.split(" ")[0],ei=g.sticky.split(" ")[0],oi='[data-command="toggle-app-expanded"]',Ut=`.${Eo} > dialog,.${Eo} dialog ~ main`,$o=t=>{document.startViewTransition?document.startViewTransition(t):t()},So=t=>$o(()=>window.mtdsToggleAppExpanded?.(t));function ni({target:t,defaultPrevented:e}){const o=t?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Ut))return To();if(e||!(t instanceof HTMLButtonElement)||!t.matches(oi))return;getComputedStyle(t).position==="sticky"?So():$o(()=>{const i=document.querySelector(Ut);i?.setAttribute("data-closedby","any"),i?.showModal()})}function To(){document.querySelector(Ut)?.close()}let qt=0,Y,M=0,y,Ft=0,_t=0,Vt=!1,Yt=0,R=0;function ii([t]){y=t,xo()}function xo(){if(!y?.isConnected)return;const t=window.scrollY,e=t<R;R=t,e!==Y&&(qt=(y.parentElement?.getBoundingClientRect().top||0)+R,Y=e,Ft=y.offsetHeight,_t=y.getBoundingClientRect().top+R,Vt=y.offsetHeight<=window.innerHeight,Yt=window.innerHeight),!(M===-1&&Vt)&&(M!==-1&&(Vt||Y&&R<=_t)?(y.style.setProperty("--pos","sticky"),y.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(y.style.setProperty("--pos","relative"),y.style.setProperty("--top",`${Math.max(0,R-qt)}px`),M=0):M!==1&&!Y&&R+Yt>=_t+Ft?(y.style.setProperty("--pos","sticky"),y.style.setProperty("--top",`${Yt-Ft}px`),M=1):M===1&&Y&&(y.style.setProperty("--pos","relative"),y.style.setProperty("--top",`${_t-qt}px`),M=0))}C(()=>{V(document.documentElement,ei,ii),b(document,"click",ni,$),b(window,"resize",Xn(To,100),$),b(window,"scroll",xo,$)});const si=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),r=Array.from({length:s+1-i},(a,u)=>u+i);return o>4&&i>1&&r.splice(0,2,1,0),o>3&&s<e&&r.splice(-2,2,0,e),r},ri=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:si(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),ai=g.breadcrumbs.split(" ")[0];function li(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}C(()=>V(document.documentElement,ai,li));const ci=g.dialog.split(" ")[0],di=W?document.getElementsByClassName(ci):[],ui=()=>{for(const t of di)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},pi=({clientX:t,clientY:e,target:o})=>{const n=o?.closest?.("dialog");if(n){if(o.closest('[data-command="close"]'))return n.close();if(c(n,"data-closedby")==="any"){const{top:i,right:s,bottom:r,left:a}=n.getBoundingClientRect();i<=e&&e<=r&&a<=t&&t<=s||n.close()}}};C(()=>{b(document,"click",pi,$),Te(ui).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function fi(t){if(t.animationName!==g._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}C(()=>b(document,"animationend",fi,$));var mi=Object.defineProperty,Co=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable,ko=(t,e,o)=>e in t?mi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,_i=(t,e)=>{for(var o in e||(e={}))hi.call(e,o)&&ko(t,o,e[o]);if(Co)for(var o of Co(e))vi.call(e,o)&&ko(t,o,e[o]);return t},G=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=G&&/android/i.test(navigator.userAgent),jt=G&&/iPad|iPhone|iPod/.test(navigator.userAgent),Io;G&&/^Mac/i.test(((Io=navigator.userAgentData)==null?void 0:Io.platform)||navigator.platform);var bi=`${bt?"data":"aria"}-labelledby`,gi=":host(:not([hidden])) { display: block }",yi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ao=typeof HTMLElement>"u"?class{}:HTMLElement;function m(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Lo=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},z=(t,...e)=>Lo("add",t,e),gt=(t,...e)=>Lo("remove",t,e),wi=(t,e)=>t.attachShadow({mode:"open"}).append(Xt("slot"),Xt("style",e)),yt=new WeakMap,Kt=(t,e)=>{if(e===void 0)return yt.get(t);try{yt.get(t).disconnect(),yt.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),yt.set(t,o)}},Mo=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Ei=0,Wt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Ei).toString(32)}`),t.id):"",Xt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Oo={define:(t,e)=>!G||window.customElements.get(t)||window.customElements.define(t,e)},H,$i=0,Do=t=>{H||(H=Xt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",m(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${$i++%2?" ":""}`)},Si=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},r=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(r,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Gt=!1,zt=t=>(t?.type==="mouseup"&&(Gt=!1),t?.type==="mousedown"&&(Gt=!0,z(document,"mouseup",zt,{once:!0})),Gt),Qt="disabled",Q="selected",Ti=class extends Ao{static get observedAttributes(){return[Qt,Q]}connectedCallback(){jt||(this.tabIndex=-1),this.hasAttribute("role")||m(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){m(this,"aria-disabled",`${this.disabled}`),m(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Q]}set defaultSelected(t){this[Q]=t}get disabled(){return m(this,Qt)!==null}set disabled(t){m(this,Qt,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=m(this,"label"))!=null?t:this.text}set label(t){m(this,"label",t)}get selected(){return m(this,Q)!==null}set selected(t){m(this,Q,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=m(this,"value"))!=null?t:this.text}set value(t){m(this,"value",t)}};Oo.define("u-option",Ti);var Po,No=0,xi=jt||bt,Ro="click,focusout,input,keydown,mousedown,mouseup",Ho="focus,focusin,blur,focusout",wt={singular:"%d hit",plural:"%d hits"},Bo=class extends Ao{constructor(){super(),this._texts=_i({},wt),this._value="",wi(this,`${gi}
|
|
9
9
|
::slotted(u-option) { display: block; cursor: pointer }
|
|
10
10
|
::slotted(u-option:focus) { ${yi} }
|
|
11
11
|
::slotted(u-option[aria-hidden="true"]),
|
package/mtds/package.json.js
CHANGED