@oslokommune/punkt-react 13.20.0 → 13.22.0

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.
@@ -41,9 +41,9 @@
41
41
  * @license
42
42
  * Copyright 2017 Google LLC
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
- */const qs=globalThis,zs=qs.trustedTypes,Zi=zs?zs.createPolicy("lit-html",{createHTML:s=>s}):void 0,Xi="$lit$",ue=`lit$${Math.random().toFixed(9).slice(2)}$`,Ji="?"+ue,Dn=`<${Ji}>`,_e=document,ps=()=>_e.createComment(""),us=s=>s===null||typeof s!="object"&&typeof s!="function",fi=Array.isArray,In=s=>fi(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",gi=`[
45
- \f\r]`,fs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qi=/-->/g,ta=/>/g,we=RegExp(`>|${gi}(?:([^\\s"'>=/]+)(${gi}*=${gi}*(?:[^
46
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ea=/'/g,sa=/"/g,ia=/^(?:script|style|textarea|title)$/i,Ln=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),u=Ln(1),xt=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),aa=new WeakMap,xe=_e.createTreeWalker(_e,129);function na(s,t){if(!fi(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zi!==void 0?Zi.createHTML(t):t}const Bn=(s,t)=>{const e=s.length-1,i=[];let a,n=t===2?"<svg>":t===3?"<math>":"",r=fs;for(let h=0;h<e;h++){const d=s[h];let p,f,g=-1,k=0;for(;k<d.length&&(r.lastIndex=k,f=r.exec(d),f!==null);)k=r.lastIndex,r===fs?f[1]==="!--"?r=Qi:f[1]!==void 0?r=ta:f[2]!==void 0?(ia.test(f[2])&&(a=RegExp("</"+f[2],"g")),r=we):f[3]!==void 0&&(r=we):r===we?f[0]===">"?(r=a??fs,g=-1):f[1]===void 0?g=-2:(g=r.lastIndex-f[2].length,p=f[1],r=f[3]===void 0?we:f[3]==='"'?sa:ea):r===sa||r===ea?r=we:r===Qi||r===ta?r=fs:(r=we,a=void 0);const b=r===we&&s[h+1].startsWith("/>")?" ":"";n+=r===fs?d+Dn:g>=0?(i.push(p),d.slice(0,g)+Xi+d.slice(g)+ue+b):d+ue+(g===-2?h:b)}return[na(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let mi=class En{constructor({strings:t,_$litType$:e},i){let a;this.parts=[];let n=0,r=0;const h=t.length-1,d=this.parts,[p,f]=Bn(t,e);if(this.el=En.createElement(p,i),xe.currentNode=this.el.content,e===2||e===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(a=xe.nextNode())!==null&&d.length<h;){if(a.nodeType===1){if(a.hasAttributes())for(const g of a.getAttributeNames())if(g.endsWith(Xi)){const k=f[r++],b=a.getAttribute(g).split(ue),y=/([.?@])?(.*)/.exec(k);d.push({type:1,index:n,name:y[2],strings:b,ctor:y[1]==="."?Vn:y[1]==="?"?jn:y[1]==="@"?Hn:Rs}),a.removeAttribute(g)}else g.startsWith(ue)&&(d.push({type:6,index:n}),a.removeAttribute(g));if(ia.test(a.tagName)){const g=a.textContent.split(ue),k=g.length-1;if(k>0){a.textContent=zs?zs.emptyScript:"";for(let b=0;b<k;b++)a.append(g[b],ps()),xe.nextNode(),d.push({type:2,index:++n});a.append(g[k],ps())}}}else if(a.nodeType===8)if(a.data===Ji)d.push({type:2,index:n});else{let g=-1;for(;(g=a.data.indexOf(ue,g+1))!==-1;)d.push({type:7,index:n}),g+=ue.length-1}n++}}static createElement(t,e){const i=_e.createElement("template");return i.innerHTML=t,i}};function ze(s,t,e=s,i){var a,n;if(t===xt)return t;let r=i!==void 0?(a=e._$Co)==null?void 0:a[i]:e._$Cl;const h=us(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==h&&((n=r==null?void 0:r._$AO)==null||n.call(r,!1),h===void 0?r=void 0:(r=new h(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=ze(s,r._$AS(s,t.values),r,i)),t}let Fn=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,a=((t==null?void 0:t.creationScope)??_e).importNode(e,!0);xe.currentNode=a;let n=xe.nextNode(),r=0,h=0,d=i[0];for(;d!==void 0;){if(r===d.index){let p;d.type===2?p=new Ws(n,n.nextSibling,this,t):d.type===1?p=new d.ctor(n,d.name,d.strings,this,t):d.type===6&&(p=new Un(n,this,t)),this._$AV.push(p),d=i[++h]}r!==(d==null?void 0:d.index)&&(n=xe.nextNode(),r++)}return xe.currentNode=_e,a}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Ws=class Mn{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,a){this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ze(this,t,e),us(t)?t===$||t==null||t===""?(this._$AH!==$&&this._$AR(),this._$AH=$):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):In(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==$&&us(this._$AH)?this._$AA.nextSibling.data=t:this.T(_e.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:a}=t,n=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=mi.createElement(na(a.h,a.h[0]),this.options)),a);if(((e=this._$AH)==null?void 0:e._$AD)===n)this._$AH.p(i);else{const r=new Fn(n,this),h=r.u(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=aa.get(t.strings);return e===void 0&&aa.set(t.strings,e=new mi(t)),e}k(t){fi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,a=0;for(const n of t)a===e.length?e.push(i=new Mn(this.O(ps()),this.O(ps()),this,this.options)):i=e[a],i._$AI(n),a++;a<e.length&&(this._$AR(i&&i._$AB.nextSibling,a),e.length=a)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},Rs=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,a,n){this.type=1,this._$AH=$,this._$AN=void 0,this.element=t,this.name=e,this._$AM=a,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=$}_$AI(t,e=this,i,a){const n=this.strings;let r=!1;if(n===void 0)t=ze(this,t,e,0),r=!us(t)||t!==this._$AH&&t!==xt,r&&(this._$AH=t);else{const h=t;let d,p;for(t=n[0],d=0;d<n.length-1;d++)p=ze(this,h[i+d],e,d),p===xt&&(p=this._$AH[d]),r||(r=!us(p)||p!==this._$AH[d]),p===$?t=$:t!==$&&(t+=(p??"")+n[d+1]),this._$AH[d]=p}r&&!a&&this.j(t)}j(t){t===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Vn=class extends Rs{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===$?void 0:t}},jn=class extends Rs{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==$)}},Hn=class extends Rs{constructor(t,e,i,a,n){super(t,e,i,a,n),this.type=5}_$AI(t,e=this){if((t=ze(this,t,e,0)??$)===xt)return;const i=this._$AH,a=t===$&&i!==$||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==$&&(i===$||a);a&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}},Un=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ze(this,t)}};const qn={I:Ws},ra=qs.litHtmlPolyfillSupport;ra==null||ra(mi,Ws),(qs.litHtmlVersions??(qs.litHtmlVersions=[])).push("3.3.1");const zn=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let a=i._$litPart$;if(a===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=a=new Ws(t.insertBefore(ps(),n),n,void 0,e??{})}return a._$AI(s),a};/**
44
+ */const qs=globalThis,zs=qs.trustedTypes,Zi=zs?zs.createPolicy("lit-html",{createHTML:s=>s}):void 0,Xi="$lit$",ue=`lit$${Math.random().toFixed(9).slice(2)}$`,Ji="?"+ue,Dn=`<${Ji}>`,we=document,us=()=>we.createComment(""),fs=s=>s===null||typeof s!="object"&&typeof s!="function",fi=Array.isArray,In=s=>fi(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",gi=`[
45
+ \f\r]`,gs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qi=/-->/g,ta=/>/g,xe=RegExp(`>|${gi}(?:([^\\s"'>=/]+)(${gi}*=${gi}*(?:[^
46
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ea=/'/g,sa=/"/g,ia=/^(?:script|style|textarea|title)$/i,Ln=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),u=Ln(1),xt=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),aa=new WeakMap,Se=we.createTreeWalker(we,129);function na(s,t){if(!fi(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zi!==void 0?Zi.createHTML(t):t}const Bn=(s,t)=>{const e=s.length-1,i=[];let a,n=t===2?"<svg>":t===3?"<math>":"",r=gs;for(let h=0;h<e;h++){const d=s[h];let p,f,g=-1,k=0;for(;k<d.length&&(r.lastIndex=k,f=r.exec(d),f!==null);)k=r.lastIndex,r===gs?f[1]==="!--"?r=Qi:f[1]!==void 0?r=ta:f[2]!==void 0?(ia.test(f[2])&&(a=RegExp("</"+f[2],"g")),r=xe):f[3]!==void 0&&(r=xe):r===xe?f[0]===">"?(r=a??gs,g=-1):f[1]===void 0?g=-2:(g=r.lastIndex-f[2].length,p=f[1],r=f[3]===void 0?xe:f[3]==='"'?sa:ea):r===sa||r===ea?r=xe:r===Qi||r===ta?r=gs:(r=xe,a=void 0);const b=r===xe&&s[h+1].startsWith("/>")?" ":"";n+=r===gs?d+Dn:g>=0?(i.push(p),d.slice(0,g)+Xi+d.slice(g)+ue+b):d+ue+(g===-2?h:b)}return[na(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let mi=class En{constructor({strings:t,_$litType$:e},i){let a;this.parts=[];let n=0,r=0;const h=t.length-1,d=this.parts,[p,f]=Bn(t,e);if(this.el=En.createElement(p,i),Se.currentNode=this.el.content,e===2||e===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(a=Se.nextNode())!==null&&d.length<h;){if(a.nodeType===1){if(a.hasAttributes())for(const g of a.getAttributeNames())if(g.endsWith(Xi)){const k=f[r++],b=a.getAttribute(g).split(ue),y=/([.?@])?(.*)/.exec(k);d.push({type:1,index:n,name:y[2],strings:b,ctor:y[1]==="."?Vn:y[1]==="?"?jn:y[1]==="@"?Hn:Rs}),a.removeAttribute(g)}else g.startsWith(ue)&&(d.push({type:6,index:n}),a.removeAttribute(g));if(ia.test(a.tagName)){const g=a.textContent.split(ue),k=g.length-1;if(k>0){a.textContent=zs?zs.emptyScript:"";for(let b=0;b<k;b++)a.append(g[b],us()),Se.nextNode(),d.push({type:2,index:++n});a.append(g[k],us())}}}else if(a.nodeType===8)if(a.data===Ji)d.push({type:2,index:n});else{let g=-1;for(;(g=a.data.indexOf(ue,g+1))!==-1;)d.push({type:7,index:n}),g+=ue.length-1}n++}}static createElement(t,e){const i=we.createElement("template");return i.innerHTML=t,i}};function ze(s,t,e=s,i){var a,n;if(t===xt)return t;let r=i!==void 0?(a=e._$Co)==null?void 0:a[i]:e._$Cl;const h=fs(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==h&&((n=r==null?void 0:r._$AO)==null||n.call(r,!1),h===void 0?r=void 0:(r=new h(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=ze(s,r._$AS(s,t.values),r,i)),t}let Fn=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,a=((t==null?void 0:t.creationScope)??we).importNode(e,!0);Se.currentNode=a;let n=Se.nextNode(),r=0,h=0,d=i[0];for(;d!==void 0;){if(r===d.index){let p;d.type===2?p=new Ws(n,n.nextSibling,this,t):d.type===1?p=new d.ctor(n,d.name,d.strings,this,t):d.type===6&&(p=new Un(n,this,t)),this._$AV.push(p),d=i[++h]}r!==(d==null?void 0:d.index)&&(n=Se.nextNode(),r++)}return Se.currentNode=we,a}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Ws=class Mn{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,a){this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ze(this,t,e),fs(t)?t===$||t==null||t===""?(this._$AH!==$&&this._$AR(),this._$AH=$):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):In(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==$&&fs(this._$AH)?this._$AA.nextSibling.data=t:this.T(we.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:a}=t,n=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=mi.createElement(na(a.h,a.h[0]),this.options)),a);if(((e=this._$AH)==null?void 0:e._$AD)===n)this._$AH.p(i);else{const r=new Fn(n,this),h=r.u(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=aa.get(t.strings);return e===void 0&&aa.set(t.strings,e=new mi(t)),e}k(t){fi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,a=0;for(const n of t)a===e.length?e.push(i=new Mn(this.O(us()),this.O(us()),this,this.options)):i=e[a],i._$AI(n),a++;a<e.length&&(this._$AR(i&&i._$AB.nextSibling,a),e.length=a)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},Rs=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,a,n){this.type=1,this._$AH=$,this._$AN=void 0,this.element=t,this.name=e,this._$AM=a,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=$}_$AI(t,e=this,i,a){const n=this.strings;let r=!1;if(n===void 0)t=ze(this,t,e,0),r=!fs(t)||t!==this._$AH&&t!==xt,r&&(this._$AH=t);else{const h=t;let d,p;for(t=n[0],d=0;d<n.length-1;d++)p=ze(this,h[i+d],e,d),p===xt&&(p=this._$AH[d]),r||(r=!fs(p)||p!==this._$AH[d]),p===$?t=$:t!==$&&(t+=(p??"")+n[d+1]),this._$AH[d]=p}r&&!a&&this.j(t)}j(t){t===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Vn=class extends Rs{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===$?void 0:t}},jn=class extends Rs{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==$)}},Hn=class extends Rs{constructor(t,e,i,a,n){super(t,e,i,a,n),this.type=5}_$AI(t,e=this){if((t=ze(this,t,e,0)??$)===xt)return;const i=this._$AH,a=t===$&&i!==$||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==$&&(i===$||a);a&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}},Un=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ze(this,t)}};const qn={I:Ws},ra=qs.litHtmlPolyfillSupport;ra==null||ra(mi,Ws),(qs.litHtmlVersions??(qs.litHtmlVersions=[])).push("3.3.1");const zn=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let a=i._$litPart$;if(a===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=a=new Ws(t.insertBefore(us(),n),n,void 0,e??{})}return a._$AI(s),a};/**
47
47
  * @license
48
48
  * Copyright 2017 Google LLC
49
49
  * SPDX-License-Identifier: BSD-3-Clause
@@ -55,7 +55,7 @@
55
55
  * @license
56
56
  * Copyright 2017 Google LLC
57
57
  * SPDX-License-Identifier: BSD-3-Clause
58
- */const{is:Gn,defineProperty:Yn,getOwnPropertyDescriptor:Zn,getOwnPropertyNames:Xn,getOwnPropertySymbols:Jn,getPrototypeOf:Qn}=Object,We=globalThis,da=We.trustedTypes,tr=da?da.emptyScript:"",ca=We.reactiveElementPolyfillSupport,gs=(s,t)=>s,Gs={toAttribute(s,t){switch(t){case Boolean:s=s?tr:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},bi=(s,t)=>!Gn(s,t),pa={attribute:!0,type:String,converter:Gs,reflect:!1,useDefault:!1,hasChanged:bi};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),We.litPropertyMetadata??(We.litPropertyMetadata=new WeakMap);let Re=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=pa){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),a=this.getPropertyDescriptor(t,i,e);a!==void 0&&Yn(this.prototype,t,a)}}static getPropertyDescriptor(t,e,i){const{get:a,set:n}=Zn(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:a,set(r){const h=a==null?void 0:a.call(this);n==null||n.call(this,r),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??pa}static _$Ei(){if(this.hasOwnProperty(gs("elementProperties")))return;const t=Qn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(gs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gs("properties"))){const e=this.properties,i=[...Xn(e),...Jn(e)];for(const a of i)this.createProperty(a,e[a])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,a]of e)this.elementProperties.set(i,a)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const a=this._$Eu(e,i);a!==void 0&&this._$Eh.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const a of i)e.unshift(ha(a))}else t!==void 0&&e.push(ha(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kn(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const a=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,a);if(n!==void 0&&a.reflect===!0){const r=(((i=a.converter)==null?void 0:i.toAttribute)!==void 0?a.converter:Gs).toAttribute(e,a.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){var i,a;const n=this.constructor,r=n._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const h=n.getPropertyOptions(r),d=typeof h.converter=="function"?{fromAttribute:h.converter}:((i=h.converter)==null?void 0:i.fromAttribute)!==void 0?h.converter:Gs;this._$Em=r;const p=d.fromAttribute(e,h.type);this[r]=p??((a=this._$Ej)==null?void 0:a.get(r))??p,this._$Em=null}}requestUpdate(t,e,i){var a;if(t!==void 0){const n=this.constructor,r=this[t];if(i??(i=n.getPropertyOptions(t)),!((i.hasChanged??bi)(r,e)||i.useDefault&&i.reflect&&r===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:a,wrapped:n},r){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),a===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[n,r]of a){const{wrapped:h}=r,d=this[n];h!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,r,d)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$EO)==null||t.forEach((a=>{var n;return(n=a.hostUpdate)==null?void 0:n.call(a)})),this.update(i)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((i=>{var a;return(a=i.hostUpdated)==null?void 0:a.call(i)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};Re.elementStyles=[],Re.shadowRootOptions={mode:"open"},Re[gs("elementProperties")]=new Map,Re[gs("finalized")]=new Map,ca==null||ca({ReactiveElement:Re}),(We.reactiveElementVersions??(We.reactiveElementVersions=[])).push("2.1.1");/**
58
+ */const{is:Gn,defineProperty:Yn,getOwnPropertyDescriptor:Zn,getOwnPropertyNames:Xn,getOwnPropertySymbols:Jn,getPrototypeOf:Qn}=Object,We=globalThis,da=We.trustedTypes,tr=da?da.emptyScript:"",ca=We.reactiveElementPolyfillSupport,ms=(s,t)=>s,Gs={toAttribute(s,t){switch(t){case Boolean:s=s?tr:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},bi=(s,t)=>!Gn(s,t),pa={attribute:!0,type:String,converter:Gs,reflect:!1,useDefault:!1,hasChanged:bi};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),We.litPropertyMetadata??(We.litPropertyMetadata=new WeakMap);let Re=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=pa){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),a=this.getPropertyDescriptor(t,i,e);a!==void 0&&Yn(this.prototype,t,a)}}static getPropertyDescriptor(t,e,i){const{get:a,set:n}=Zn(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:a,set(r){const h=a==null?void 0:a.call(this);n==null||n.call(this,r),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??pa}static _$Ei(){if(this.hasOwnProperty(ms("elementProperties")))return;const t=Qn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ms("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ms("properties"))){const e=this.properties,i=[...Xn(e),...Jn(e)];for(const a of i)this.createProperty(a,e[a])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,a]of e)this.elementProperties.set(i,a)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const a=this._$Eu(e,i);a!==void 0&&this._$Eh.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const a of i)e.unshift(ha(a))}else t!==void 0&&e.push(ha(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kn(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const a=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,a);if(n!==void 0&&a.reflect===!0){const r=(((i=a.converter)==null?void 0:i.toAttribute)!==void 0?a.converter:Gs).toAttribute(e,a.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){var i,a;const n=this.constructor,r=n._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const h=n.getPropertyOptions(r),d=typeof h.converter=="function"?{fromAttribute:h.converter}:((i=h.converter)==null?void 0:i.fromAttribute)!==void 0?h.converter:Gs;this._$Em=r;const p=d.fromAttribute(e,h.type);this[r]=p??((a=this._$Ej)==null?void 0:a.get(r))??p,this._$Em=null}}requestUpdate(t,e,i){var a;if(t!==void 0){const n=this.constructor,r=this[t];if(i??(i=n.getPropertyOptions(t)),!((i.hasChanged??bi)(r,e)||i.useDefault&&i.reflect&&r===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:a,wrapped:n},r){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),a===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[n,r]of a){const{wrapped:h}=r,d=this[n];h!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,r,d)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$EO)==null||t.forEach((a=>{var n;return(n=a.hostUpdate)==null?void 0:n.call(a)})),this.update(i)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((i=>{var a;return(a=i.hostUpdated)==null?void 0:a.call(i)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};Re.elementStyles=[],Re.shadowRootOptions={mode:"open"},Re[ms("elementProperties")]=new Map,Re[ms("finalized")]=new Map,ca==null||ca({ReactiveElement:Re}),(We.reactiveElementVersions??(We.reactiveElementVersions=[])).push("2.1.1");/**
59
59
  * @license
60
60
  * Copyright 2017 Google LLC
61
61
  * SPDX-License-Identifier: BSD-3-Clause
@@ -63,43 +63,43 @@
63
63
  * @license
64
64
  * Copyright 2017 Google LLC
65
65
  * SPDX-License-Identifier: BSD-3-Clause
66
- */const ms=globalThis;let Ke=class extends Re{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=zn(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return xt}};var ua;Ke._$litElement$=!0,Ke.finalized=!0,(ua=ms.litElementHydrateSupport)==null||ua.call(ms,{LitElement:Ke});const fa=ms.litElementPolyfillSupport;fa==null||fa({LitElement:Ke}),(ms.litElementVersions??(ms.litElementVersions=[])).push("4.2.1");const ir={hi:"Hei!"},ar={from:"Fra",to:"Til"},nr={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},rr={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},or={search:{placeholder:"Søk…"},labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",rangeUnderflowMin:"Verdien må være større enn eller lik {min}.",rangeOverflowMax:"Verdien må være mindre enn eller lik {max}.",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},helptext:{helptextDropdownButton:"Les mer"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},_t={example:ir,generic:ar,calendar:nr,dates:rr,forms:or};var lr=Object.defineProperty,ga=(s,t,e,i)=>{for(var a=void 0,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=r(t,e,a)||a);return a&&lr(t,e,a),a};let Ys=class extends Ke{constructor(){super(...arguments),this.strings=_t,this.role=null}hotReplacedCallback(){this.requestUpdate()}};ga([o({type:Object})],Ys.prototype,"strings"),ga([o({type:String})],Ys.prototype,"role");let Y=class extends Ys{createRenderRoot(){return this}};/**
66
+ */const vs=globalThis;let Ke=class extends Re{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=zn(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return xt}};var ua;Ke._$litElement$=!0,Ke.finalized=!0,(ua=vs.litElementHydrateSupport)==null||ua.call(vs,{LitElement:Ke});const fa=vs.litElementPolyfillSupport;fa==null||fa({LitElement:Ke}),(vs.litElementVersions??(vs.litElementVersions=[])).push("4.2.1");const ir={hi:"Hei!"},ar={from:"Fra",to:"Til"},nr={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},rr={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},or={search:{placeholder:"Søk…"},labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",rangeUnderflowMin:"Verdien må være større enn eller lik {min}.",rangeOverflowMax:"Verdien må være mindre enn eller lik {max}.",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},helptext:{helptextDropdownButton:"Les mer"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},_t={example:ir,generic:ar,calendar:nr,dates:rr,forms:or};var lr=Object.defineProperty,ga=(s,t,e,i)=>{for(var a=void 0,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=r(t,e,a)||a);return a&&lr(t,e,a),a};let Ys=class extends Ke{constructor(){super(...arguments),this.strings=_t,this.role=null}hotReplacedCallback(){this.requestUpdate()}};ga([o({type:Object})],Ys.prototype,"strings"),ga([o({type:String})],Ys.prototype,"role");let Y=class extends Ys{createRenderRoot(){return this}};/**
67
67
  * @license
68
68
  * Copyright 2017 Google LLC
69
69
  * SPDX-License-Identifier: BSD-3-Clause
70
- */const Rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Se=s=>(...t)=>({_$litDirective$:s,values:t});let Ge=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
70
+ */const Rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Ce=s=>(...t)=>({_$litDirective$:s,values:t});let Ge=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
71
71
  * @license
72
72
  * Copyright 2018 Google LLC
73
73
  * SPDX-License-Identifier: BSD-3-Clause
74
- */const M=Se(class extends Ge{constructor(s){var t;if(super(s),s.type!==Rt.ATTRIBUTE||s.name!=="class"||((t=s.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter((t=>s[t])).join(" ")+" "}update(s,[t]){var e,i;if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((n=>n!==""))));for(const n in t)t[n]&&!((e=this.nt)!=null&&e.has(n))&&this.st.add(n);return this.render(t)}const a=s.element.classList;for(const n of this.st)n in t||(a.remove(n),this.st.delete(n));for(const n in t){const r=!!t[n];r===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(r?(a.add(n),this.st.add(n)):(a.remove(n),this.st.delete(n)))}return xt}});/**
74
+ */const M=Ce(class extends Ge{constructor(s){var t;if(super(s),s.type!==Rt.ATTRIBUTE||s.name!=="class"||((t=s.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter((t=>s[t])).join(" ")+" "}update(s,[t]){var e,i;if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((n=>n!==""))));for(const n in t)t[n]&&!((e=this.nt)!=null&&e.has(n))&&this.st.add(n);return this.render(t)}const a=s.element.classList;for(const n of this.st)n in t||(a.remove(n),this.st.delete(n));for(const n in t){const r=!!t[n];r===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(r?(a.add(n),this.st.add(n)):(a.remove(n),this.st.delete(n)))}return xt}});/**
75
75
  * @license
76
76
  * Copyright 2017 Google LLC
77
77
  * SPDX-License-Identifier: BSD-3-Clause
78
- */function V(s){return o({...s,state:!0,attribute:!1})}function ma(s,t){return t.some(e=>e.value===s)}function vs(s){return s.classList&&(s.classList.contains("_dialog_overlay")||s.classList.contains("backdrop"))?!0:typeof s.hasAttribute=="function"&&s.hasAttribute("data-skip")}function Ye(s){return s.nodeName==="OPTION"||s.nodeName==="DATA"}function hr(s,t){return s.nodeType===Node.ELEMENT_NODE&&!ma(s,t)}function yi(s){var t;return s.nodeType===Node.TEXT_NODE&&((t=s.nodeValue)==null?void 0:t.trim())!==""}let at=class{constructor(t,...e){this.nodes=[],this.filledSlots=new Set,this.skipOptions=!1,this.updatingSlots=!1,this.host=t,this.host.addController(this),this.slots=e,this.nodes=[],this.observer=new MutationObserver(i=>this.handleMutations(i)),this.contentObserver=new MutationObserver(i=>this.handleSlotMutations(i))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0}),this.contentObserver.observe(this.host,{childList:!0,subtree:!0})}hostDisconnected(){this.observer.disconnect(),this.contentObserver.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(t=>{vs(t)||Ye(t)&&this.skipOptions||(!ma(t,this.slots)||yi(t))&&this.nodes.push(t)})}updateSlots(){if(this.updatingSlots)return;this.updatingSlots=!0;const t=new Set;this.slots.forEach(e=>{if(!e.value)return;const i=e.value.getAttribute("name");Array.from(e.value.childNodes).some(n=>{var r,h;if(n.nodeType===Node.COMMENT_NODE)return!1;if(n.nodeType===Node.TEXT_NODE)return!!((r=n.textContent)!=null&&r.trim());if(n.nodeType===Node.ELEMENT_NODE){if(vs(n))return!1;if((h=n.textContent)!=null&&h.trim())return!0}return!1})&&t.add(i);const a=this.nodes.flatMap(n=>yi(n)||n.getAttribute&&n.getAttribute("slot")==i&&!vs(n)?n:[]).filter(n=>e.value&&!e.value.contains(n)&&!n.contains(e.value));if(a.length>0)if(typeof e.value.replaceChildren!="function"){for(;e.value.firstChild;)e.value.removeChild(e.value.firstChild);e.value.append(...a)}else e.value.replaceChildren(...a)}),(this.filledSlots.size!==t.size||![...this.filledSlots].every(e=>t.has(e)))&&(this.filledSlots=t,typeof this.host.updateSlots=="function"&&this.host.updateSlots(this.filledSlots)),this.updatingSlots=!1}handleMutations(t){let e=!1;t.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(a=>{vs(a)||Ye(a)&&this.skipOptions||(hr(a,this.slots)||yi(a))&&(this.nodes.push(a),e=!0)}),i.removedNodes.forEach(a=>{vs(a)||Ye(a)&&this.skipOptions||(this.nodes=this.nodes.filter(n=>n!==a),e=!0)}))}),e&&this.updateSlots()}handleSlotMutations(t){let e=!1;t.forEach(i=>{const a=i.target.parentElement;if(a!=null&&a.hasAttribute("slot")){const n=a.getAttribute("slot"),r=a.hasChildNodes();r&&!this.filledSlots.has(n)?(this.filledSlots.add(n),e=!0):!r&&this.filledSlots.has(n)&&(this.filledSlots.delete(n),e=!0)}}),e&&typeof this.host.updateSlots=="function"&&this.host.updateSlots(this.filledSlots)}};/**
78
+ */function V(s){return o({...s,state:!0,attribute:!1})}function ma(s,t){return t.some(e=>e.value===s)}function bs(s){return s.classList&&(s.classList.contains("_dialog_overlay")||s.classList.contains("backdrop"))?!0:typeof s.hasAttribute=="function"&&s.hasAttribute("data-skip")}function Ye(s){return s.nodeName==="OPTION"||s.nodeName==="DATA"}function hr(s,t){return s.nodeType===Node.ELEMENT_NODE&&!ma(s,t)}function yi(s){var t;return s.nodeType===Node.TEXT_NODE&&((t=s.nodeValue)==null?void 0:t.trim())!==""}let at=class{constructor(t,...e){this.nodes=[],this.filledSlots=new Set,this.skipOptions=!1,this.updatingSlots=!1,this.host=t,this.host.addController(this),this.slots=e,this.nodes=[],this.observer=new MutationObserver(i=>this.handleMutations(i)),this.contentObserver=new MutationObserver(i=>this.handleSlotMutations(i))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0}),this.contentObserver.observe(this.host,{childList:!0,subtree:!0})}hostDisconnected(){this.observer.disconnect(),this.contentObserver.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(t=>{bs(t)||Ye(t)&&this.skipOptions||(!ma(t,this.slots)||yi(t))&&this.nodes.push(t)})}updateSlots(){if(this.updatingSlots)return;this.updatingSlots=!0;const t=new Set;this.slots.forEach(e=>{if(!e.value)return;const i=e.value.getAttribute("name");Array.from(e.value.childNodes).some(n=>{var r,h;if(n.nodeType===Node.COMMENT_NODE)return!1;if(n.nodeType===Node.TEXT_NODE)return!!((r=n.textContent)!=null&&r.trim());if(n.nodeType===Node.ELEMENT_NODE){if(bs(n))return!1;if((h=n.textContent)!=null&&h.trim())return!0}return!1})&&t.add(i);const a=this.nodes.flatMap(n=>yi(n)||n.getAttribute&&n.getAttribute("slot")==i&&!bs(n)?n:[]).filter(n=>e.value&&!e.value.contains(n)&&!n.contains(e.value));if(a.length>0)if(typeof e.value.replaceChildren!="function"){for(;e.value.firstChild;)e.value.removeChild(e.value.firstChild);e.value.append(...a)}else e.value.replaceChildren(...a)}),(this.filledSlots.size!==t.size||![...this.filledSlots].every(e=>t.has(e)))&&(this.filledSlots=t,typeof this.host.updateSlots=="function"&&this.host.updateSlots(this.filledSlots)),this.updatingSlots=!1}handleMutations(t){let e=!1;t.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(a=>{bs(a)||Ye(a)&&this.skipOptions||(hr(a,this.slots)||yi(a))&&(this.nodes.push(a),e=!0)}),i.removedNodes.forEach(a=>{bs(a)||Ye(a)&&this.skipOptions||(this.nodes=this.nodes.filter(n=>n!==a),e=!0)}))}),e&&this.updateSlots()}handleSlotMutations(t){let e=!1;t.forEach(i=>{const a=i.target.parentElement;if(a!=null&&a.hasAttribute("slot")){const n=a.getAttribute("slot"),r=a.hasChildNodes();r&&!this.filledSlots.has(n)?(this.filledSlots.add(n),e=!0):!r&&this.filledSlots.has(n)&&(this.filledSlots.delete(n),e=!0)}}),e&&typeof this.host.updateSlots=="function"&&this.host.updateSlots(this.filledSlots)}};/**
79
79
  * @license
80
80
  * Copyright 2020 Google LLC
81
81
  * SPDX-License-Identifier: BSD-3-Clause
82
- */const{I:dr}=qn,va=s=>s.strings===void 0,ba=()=>document.createComment(""),bs=(s,t,e)=>{var i;const a=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){const r=a.insertBefore(ba(),n),h=a.insertBefore(ba(),n);e=new dr(r,h,s,s.options)}else{const r=e._$AB.nextSibling,h=e._$AM,d=h!==s;if(d){let p;(i=e._$AQ)==null||i.call(e,s),e._$AM=s,e._$AP!==void 0&&(p=s._$AU)!==h._$AU&&e._$AP(p)}if(r!==n||d){let p=e._$AA;for(;p!==r;){const f=p.nextSibling;a.insertBefore(p,n),p=f}}}return e},Ce=(s,t,e=s)=>(s._$AI(t,e),s),cr={},ya=(s,t=cr)=>s._$AH=t,pr=s=>s._$AH,ki=s=>{s._$AR(),s._$AA.remove()};/**
82
+ */const{I:dr}=qn,va=s=>s.strings===void 0,ba=()=>document.createComment(""),ys=(s,t,e)=>{var i;const a=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){const r=a.insertBefore(ba(),n),h=a.insertBefore(ba(),n);e=new dr(r,h,s,s.options)}else{const r=e._$AB.nextSibling,h=e._$AM,d=h!==s;if(d){let p;(i=e._$AQ)==null||i.call(e,s),e._$AM=s,e._$AP!==void 0&&(p=s._$AU)!==h._$AU&&e._$AP(p)}if(r!==n||d){let p=e._$AA;for(;p!==r;){const f=p.nextSibling;a.insertBefore(p,n),p=f}}}return e},Te=(s,t,e=s)=>(s._$AI(t,e),s),cr={},ya=(s,t=cr)=>s._$AH=t,pr=s=>s._$AH,ki=s=>{s._$AR(),s._$AA.remove()};/**
83
83
  * @license
84
84
  * Copyright 2017 Google LLC
85
85
  * SPDX-License-Identifier: BSD-3-Clause
86
- */const ys=(s,t)=>{var e;const i=s._$AN;if(i===void 0)return!1;for(const a of i)(e=a._$AO)==null||e.call(a,t,!1),ys(a,t);return!0},Zs=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while((e==null?void 0:e.size)===0)},ka=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),gr(t)}};function ur(s){this._$AN!==void 0?(Zs(this),this._$AM=s,ka(this)):this._$AM=s}function fr(s,t=!1,e=0){const i=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ys(i[n],!1),Zs(i[n]);else i!=null&&(ys(i,!1),Zs(i));else ys(this,s)}const gr=s=>{s.type==Rt.CHILD&&(s._$AP??(s._$AP=fr),s._$AQ??(s._$AQ=ur))};let mr=class extends Ge{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ka(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,a;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(a=this.disconnected)==null||a.call(this)),e&&(ys(this,t),Zs(this))}setValue(t){if(va(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};/**
86
+ */const ks=(s,t)=>{var e;const i=s._$AN;if(i===void 0)return!1;for(const a of i)(e=a._$AO)==null||e.call(a,t,!1),ks(a,t);return!0},Zs=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while((e==null?void 0:e.size)===0)},ka=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),gr(t)}};function ur(s){this._$AN!==void 0?(Zs(this),this._$AM=s,ka(this)):this._$AM=s}function fr(s,t=!1,e=0){const i=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ks(i[n],!1),Zs(i[n]);else i!=null&&(ks(i,!1),Zs(i));else ks(this,s)}const gr=s=>{s.type==Rt.CHILD&&(s._$AP??(s._$AP=fr),s._$AQ??(s._$AQ=ur))};let mr=class extends Ge{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ka(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,a;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(a=this.disconnected)==null||a.call(this)),e&&(ks(this,t),Zs(this))}setValue(t){if(va(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};/**
87
87
  * @license
88
88
  * Copyright 2020 Google LLC
89
89
  * SPDX-License-Identifier: BSD-3-Clause
90
- */const A=()=>new vr;let vr=class{};const $i=new WeakMap,E=Se(class extends mr{render(s){return $}update(s,[t]){var e;const i=t!==this.G;return i&&this.G!==void 0&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),$}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let e=$i.get(t);e===void 0&&(e=new WeakMap,$i.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,t;return typeof this.G=="function"?(s=$i.get(this.ht??globalThis))==null?void 0:s.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function $a(s,t,e){const i=s.getAttribute("class")||"",a=new Set(i.split(/\s+/).filter(Boolean));e?a.add(t):a.delete(t),s.setAttribute("class",Array.from(a).join(" "))}/**
90
+ */const A=()=>new vr;let vr=class{};const $i=new WeakMap,E=Ce(class extends mr{render(s){return $}update(s,[t]){var e;const i=t!==this.G;return i&&this.G!==void 0&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),$}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let e=$i.get(t);e===void 0&&(e=new WeakMap,$i.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,t;return typeof this.G=="function"?(s=$i.get(this.ht??globalThis))==null?void 0:s.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function $a(s,t,e){const i=s.getAttribute("class")||"",a=new Set(i.split(/\s+/).filter(Boolean));e?a.add(t):a.delete(t),s.setAttribute("class",Array.from(a).join(" "))}/**
91
91
  * @license
92
92
  * Copyright 2017 Google LLC
93
93
  * SPDX-License-Identifier: BSD-3-Clause
94
- */let Xs=class extends Ge{constructor(t){if(super(t),this.it=$,t.type!==Rt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===$||t==null)return this._t=void 0,this.it=t;if(t===xt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Xs.directiveName="unsafeHTML",Xs.resultType=1;const Js=Se(Xs);/**
94
+ */let Xs=class extends Ge{constructor(t){if(super(t),this.it=$,t.type!==Rt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===$||t==null)return this._t=void 0,this.it=t;if(t===xt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Xs.directiveName="unsafeHTML",Xs.resultType=1;const Js=Ce(Xs);/**
95
95
  * @license
96
96
  * Copyright 2017 Google LLC
97
97
  * SPDX-License-Identifier: BSD-3-Clause
98
- */let _i=class extends Xs{};_i.directiveName="unsafeSVG",_i.resultType=2;const _a=Se(_i);var br=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,ks=(s,t,e,i)=>{for(var a=i>1?void 0:i?yr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&br(t,e,a),a};const wi="https://punkt-cdn.oslo.kommune.no/13.20/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||wi);const kr=s=>new Promise(t=>setTimeout(t,s)),Qs='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',xi={},$r=async(s,t)=>{let e=0;for(;xi[t+s+".svg"]==="fetching"&&(e++,!(e>50));)await kr(50);const i=typeof Storage<"u"&&typeof localStorage<"u";return i&&localStorage.getItem(t+s+".svg")?Promise.resolve(localStorage.getItem(t+s+".svg")):typeof window<"u"&&typeof window.pktFetch=="function"?(xi[t+s+".svg"]="fetching",Promise.resolve(window.pktFetch(t+s+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+t+s+".svg"),Qs)).then(a=>(a!==Qs&&i&&localStorage.setItem(t+s+".svg",a),xi[t+s+".svg"]="fetched",a)))):Promise.resolve(Qs)};let Te=class extends Y{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:wi,this.name="",this.icon=_a(Qs),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path=typeof window<"u"?window.pktIconPath:wi),this.icon=_a(await $r(this.name||"",this.path).then(e=>e)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return u`${this.name&&this.icon}`}};ks([o({type:String,reflect:!1})],Te.prototype,"path",2),ks([o({type:String,reflect:!0})],Te.prototype,"name",2),ks([o({type:SVGElement})],Te.prototype,"icon",2),ks([o({type:Array,noAccessor:!0})],Te.prototype,"_updatedProps",2),Te=ks([j("pkt-icon")],Te);/**
98
+ */let _i=class extends Xs{};_i.directiveName="unsafeSVG",_i.resultType=2;const _a=Ce(_i);var br=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,$s=(s,t,e,i)=>{for(var a=i>1?void 0:i?yr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&br(t,e,a),a};const wi="https://punkt-cdn.oslo.kommune.no/13.22/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||wi);const kr=s=>new Promise(t=>setTimeout(t,s)),Qs='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',xi={},$r=async(s,t)=>{let e=0;for(;xi[t+s+".svg"]==="fetching"&&(e++,!(e>50));)await kr(50);const i=typeof Storage<"u"&&typeof localStorage<"u";return i&&localStorage.getItem(t+s+".svg")?Promise.resolve(localStorage.getItem(t+s+".svg")):typeof window<"u"&&typeof window.pktFetch=="function"?(xi[t+s+".svg"]="fetching",Promise.resolve(window.pktFetch(t+s+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+t+s+".svg"),Qs)).then(a=>(a!==Qs&&i&&localStorage.setItem(t+s+".svg",a),xi[t+s+".svg"]="fetched",a)))):Promise.resolve(Qs)};let Ne=class extends Y{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:wi,this.name="",this.icon=_a(Qs),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path=typeof window<"u"?window.pktIconPath:wi),this.icon=_a(await $r(this.name||"",this.path).then(e=>e)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return u`${this.name&&this.icon}`}};$s([o({type:String,reflect:!1})],Ne.prototype,"path",2),$s([o({type:String,reflect:!0})],Ne.prototype,"name",2),$s([o({type:SVGElement})],Ne.prototype,"icon",2),$s([o({type:Array,noAccessor:!0})],Ne.prototype,"_updatedProps",2),Ne=$s([j("pkt-icon")],Ne);/**
99
99
  * @license
100
100
  * Copyright 2018 Google LLC
101
101
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const S=s=>s??$;var _r=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,ft=(s,t,e,i)=>{for(var a=i>1?void 0:i?wr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_r(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.20/animations/";let lt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&i==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&i==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,e={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return u`
102
+ */const S=s=>s??$;var _r=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,ft=(s,t,e,i)=>{for(var a=i>1?void 0:i?wr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_r(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.22/animations/";let lt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&i==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&i==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,e={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return u`
103
103
  <button
104
104
  class=${M(e)}
105
105
  type=${this.type}
@@ -157,7 +157,7 @@
157
157
  ${this.date?u`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`:$}
158
158
  </div>
159
159
  </div>
160
- `}};Jt([o({type:Boolean,reflect:!1})],Kt.prototype,"compact",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"title",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"skin",2),Jt([o({type:String})],Kt.prototype,"ariaLive",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"aria-live",2),Jt([o({type:Boolean,reflect:!0})],Kt.prototype,"closeAlert",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"date",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"role",2),Jt([V()],Kt.prototype,"_isClosed",2),Kt=Jt([j("pkt-alert")],Kt);var Tr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,$s=(s,t,e,i)=>{for(var a=i>1?void 0:i?Nr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Tr(t,e,a),a};let Ze=class extends Ke{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless",this.name=""}updated(t){t.has("skin")&&this.requestUpdate(),t.has("name")&&this.updateAccordionItemNames()}updateAccordionItemNames(){var t;if(this.name){const e=(t=this.renderRoot)==null?void 0:t.querySelector("slot");e&&e.assignedElements().forEach(i=>{i.tagName.toLowerCase()==="pkt-accordion-item"&&(i.hasAttribute("name")||i.setAttribute("name",this.name))})}}firstUpdated(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector("slot");e&&e.addEventListener("slotchange",()=>{this.updateAccordionItemNames()})}render(){const t={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return u`
160
+ `}};Jt([o({type:Boolean,reflect:!1})],Kt.prototype,"compact",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"title",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"skin",2),Jt([o({type:String})],Kt.prototype,"ariaLive",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"aria-live",2),Jt([o({type:Boolean,reflect:!0})],Kt.prototype,"closeAlert",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"date",2),Jt([o({type:String,reflect:!0})],Kt.prototype,"role",2),Jt([V()],Kt.prototype,"_isClosed",2),Kt=Jt([j("pkt-alert")],Kt);var Tr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,_s=(s,t,e,i)=>{for(var a=i>1?void 0:i?Nr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Tr(t,e,a),a};let Ze=class extends Ke{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless",this.name=""}updated(t){t.has("skin")&&this.requestUpdate(),t.has("name")&&this.updateAccordionItemNames()}updateAccordionItemNames(){var t;if(this.name){const e=(t=this.renderRoot)==null?void 0:t.querySelector("slot");e&&e.assignedElements().forEach(i=>{i.tagName.toLowerCase()==="pkt-accordion-item"&&(i.hasAttribute("name")||i.setAttribute("name",this.name))})}}firstUpdated(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector("slot");e&&e.addEventListener("slotchange",()=>{this.updateAccordionItemNames()})}render(){const t={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return u`
161
161
  <div
162
162
  part="container"
163
163
  class=${M(t)}
@@ -166,7 +166,7 @@
166
166
  >
167
167
  <slot></slot>
168
168
  </div>
169
- `}};$s([o({type:String,reflect:!0,attribute:"aria-labelledby"})],Ze.prototype,"ariaLabelledBy",2),$s([o({type:Boolean,reflect:!0,attribute:"compact"})],Ze.prototype,"compact",2),$s([o({type:String,reflect:!0,attribute:"skin"})],Ze.prototype,"skin",2),$s([o({type:String,reflect:!0,attribute:"name"})],Ze.prototype,"name",2),Ze=$s([j("pkt-accordion")],Ze);var Ar=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Ne=(s,t,e,i)=>{for(var a=i>1?void 0:i?Er(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Ar(t,e,a),a};let fe=class extends Y{constructor(){super(),this.defaultOpen=!1,this.title="",this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=A(),this.defaultSlot=A(),this.slotController=new at(this,this.defaultSlot)}firstUpdated(t){this.defaultOpen&&(this.isOpen=!0)}render(){const t={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin};return u`
169
+ `}};_s([o({type:String,reflect:!0,attribute:"aria-labelledby"})],Ze.prototype,"ariaLabelledBy",2),_s([o({type:Boolean,reflect:!0,attribute:"compact"})],Ze.prototype,"compact",2),_s([o({type:String,reflect:!0,attribute:"skin"})],Ze.prototype,"skin",2),_s([o({type:String,reflect:!0,attribute:"name"})],Ze.prototype,"name",2),Ze=_s([j("pkt-accordion")],Ze);var Ar=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Ae=(s,t,e,i)=>{for(var a=i>1?void 0:i?Er(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Ar(t,e,a),a};let fe=class extends Y{constructor(){super(),this.defaultOpen=!1,this.title="",this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=A(),this.defaultSlot=A(),this.slotController=new at(this,this.defaultSlot)}firstUpdated(t){this.defaultOpen&&(this.isOpen=!0)}render(){const t={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin};return u`
170
170
  <details
171
171
  class=${M(t)}
172
172
  id=${this.id}
@@ -190,7 +190,7 @@
190
190
  <div class="pkt-accordion-item__content-inner" ${E(this.defaultSlot)}></div>
191
191
  </div>
192
192
  </details>
193
- `}};Ne([o({type:Boolean})],fe.prototype,"defaultOpen",2),Ne([o({type:String})],fe.prototype,"title",2),Ne([o({type:String,reflect:!0})],fe.prototype,"skin",2),Ne([o({type:Boolean,reflect:!0})],fe.prototype,"compact",2),Ne([o({type:Boolean,reflect:!0})],fe.prototype,"isOpen",2),Ne([o({type:String,reflect:!0})],fe.prototype,"name",2),fe=Ne([j("pkt-accordion-item")],fe);var Mr=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,ei=(s,t,e,i)=>{for(var a=i>1?void 0:i?Pr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Mr(t,e,a),a};let Xe=class extends Y{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(t,e,i){t==="arialabel"&&this.removeAttribute("arialabel"),t==="href"&&this.removeAttribute("href"),t==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(t,e,i)}render(){return u`<nav
193
+ `}};Ae([o({type:Boolean})],fe.prototype,"defaultOpen",2),Ae([o({type:String})],fe.prototype,"title",2),Ae([o({type:String,reflect:!0})],fe.prototype,"skin",2),Ae([o({type:Boolean,reflect:!0})],fe.prototype,"compact",2),Ae([o({type:Boolean,reflect:!0})],fe.prototype,"isOpen",2),Ae([o({type:String,reflect:!0})],fe.prototype,"name",2),fe=Ae([j("pkt-accordion-item")],fe);var Mr=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,ei=(s,t,e,i)=>{for(var a=i>1?void 0:i?Pr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Mr(t,e,a),a};let Xe=class extends Y{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(t,e,i){t==="arialabel"&&this.removeAttribute("arialabel"),t==="href"&&this.removeAttribute("href"),t==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(t,e,i)}render(){return u`<nav
194
194
  class="pkt-back-link"
195
195
  aria-label=${this.ariaLabel||"Gå tilbake til forrige side"}
196
196
  >
@@ -202,7 +202,7 @@
202
202
  ></pkt-icon
203
203
  ><span class="pkt-back-link__text">${this.text}</span></a
204
204
  >
205
- </nav>`}};ei([o({type:String})],Xe.prototype,"href",2),ei([o({type:String})],Xe.prototype,"text",2),ei([o({type:String})],Xe.prototype,"ariaLabel",2),Xe=ei([j("pkt-backlink")],Xe);const wa=6048e5,Or=864e5,xa=Symbol.for("constructDateFrom");function Qt(s,t){return typeof s=="function"?s(t):s&&typeof s=="object"&&xa in s?s[xa](t):s instanceof Date?new s.constructor(t):new Date(t)}function Et(s,t){return Qt(t||s,s)}function Si(s,t,e){const i=Et(s,void 0);return isNaN(t)?Qt(s,NaN):(t&&i.setDate(i.getDate()+t),i)}let Dr={};function si(){return Dr}function _s(s,t){var e,i,a,n;const r=si(),h=(t==null?void 0:t.weekStartsOn)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.weekStartsOn)??r.weekStartsOn??((n=(a=r.locale)==null?void 0:a.options)==null?void 0:n.weekStartsOn)??0,d=Et(s,t==null?void 0:t.in),p=d.getDay(),f=(p<h?7:0)+p-h;return d.setDate(d.getDate()-f),d.setHours(0,0,0,0),d}function ii(s,t){return _s(s,{...t,weekStartsOn:1})}function Sa(s,t){const e=Et(s,void 0),i=e.getFullYear(),a=Qt(e,0);a.setFullYear(i+1,0,4),a.setHours(0,0,0,0);const n=ii(a),r=Qt(e,0);r.setFullYear(i,0,4),r.setHours(0,0,0,0);const h=ii(r);return e.getTime()>=n.getTime()?i+1:e.getTime()>=h.getTime()?i:i-1}function Ca(s){const t=Et(s),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+s-+e}function Ta(s,...t){const e=Qt.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function Na(s,t){const e=Et(s,void 0);return e.setHours(0,0,0,0),e}function Ir(s,t,e){const[i,a]=Ta(void 0,s,t),n=Na(i),r=Na(a),h=+n-Ca(n),d=+r-Ca(r);return Math.round((h-d)/Or)}function Lr(s,t){const e=Sa(s),i=Qt(s,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),ii(i)}function Br(s){return s instanceof Date||typeof s=="object"&&Object.prototype.toString.call(s)==="[object Date]"}function Fr(s){return!(!Br(s)&&typeof s!="number"||isNaN(+Et(s)))}function Vr(s,t){const[e,i]=Ta(s,t.start,t.end);return{start:e,end:i}}function Ci(s,t){const{start:e,end:i}=Vr(void 0,s);let a=+e>+i;const n=a?+e:+i,r=a?i:e;r.setHours(0,0,0,0);let h=1;const d=[];for(;+r<=n;)d.push(Qt(e,r)),r.setDate(r.getDate()+h),r.setHours(0,0,0,0);return a?d.reverse():d}function jr(s,t){const e=Et(s,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Hr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ur=(s,t,e)=>{let i;const a=Hr[s];return typeof a=="string"?i=a:t===1?i=a.one:i=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function Ti(s){return(t={})=>{const e=t.width?String(t.width):s.defaultWidth;return s.formats[e]||s.formats[s.defaultWidth]}}const qr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Wr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rr={date:Ti({formats:qr,defaultWidth:"full"}),time:Ti({formats:zr,defaultWidth:"full"}),dateTime:Ti({formats:Wr,defaultWidth:"full"})},Kr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gr=(s,t,e,i)=>Kr[s];function ws(s){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let a;if(i==="formatting"&&s.formattingValues){const r=s.defaultFormattingWidth||s.defaultWidth,h=e!=null&&e.width?String(e.width):r;a=s.formattingValues[h]||s.formattingValues[r]}else{const r=s.defaultWidth,h=e!=null&&e.width?String(e.width):s.defaultWidth;a=s.values[h]||s.values[r]}const n=s.argumentCallback?s.argumentCallback(t):t;return a[n]}}const Yr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},to={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eo=(s,t)=>{const e=Number(s),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},so={ordinalNumber:eo,era:ws({values:Yr,defaultWidth:"wide"}),quarter:ws({values:Zr,defaultWidth:"wide",argumentCallback:s=>s-1}),month:ws({values:Xr,defaultWidth:"wide"}),day:ws({values:Jr,defaultWidth:"wide"}),dayPeriod:ws({values:Qr,defaultWidth:"wide",formattingValues:to,defaultFormattingWidth:"wide"})};function xs(s){return(t,e={})=>{const i=e.width,a=i&&s.matchPatterns[i]||s.matchPatterns[s.defaultMatchWidth],n=t.match(a);if(!n)return null;const r=n[0],h=i&&s.parsePatterns[i]||s.parsePatterns[s.defaultParseWidth],d=Array.isArray(h)?ao(h,g=>g.test(r)):io(h,g=>g.test(r));let p;p=s.valueCallback?s.valueCallback(d):d,p=e.valueCallback?e.valueCallback(p):p;const f=t.slice(r.length);return{value:p,rest:f}}}function io(s,t){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&t(s[e]))return e}function ao(s,t){for(let e=0;e<s.length;e++)if(t(s[e]))return e}function no(s){return(t,e={})=>{const i=t.match(s.matchPattern);if(!i)return null;const a=i[0],n=t.match(s.parsePattern);if(!n)return null;let r=s.valueCallback?s.valueCallback(n[0]):n[0];r=e.valueCallback?e.valueCallback(r):r;const h=t.slice(a.length);return{value:r,rest:h}}}const ro=/^(\d+)(th|st|nd|rd)?/i,oo=/\d+/i,lo={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ho={any:[/^b/i,/^(a|c)/i]},co={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},po={any:[/1/i,/2/i,/3/i,/4/i]},uo={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fo={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},go={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mo={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vo={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bo={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yo={ordinalNumber:no({matchPattern:ro,parsePattern:oo,valueCallback:s=>parseInt(s,10)}),era:xs({matchPatterns:lo,defaultMatchWidth:"wide",parsePatterns:ho,defaultParseWidth:"any"}),quarter:xs({matchPatterns:co,defaultMatchWidth:"wide",parsePatterns:po,defaultParseWidth:"any",valueCallback:s=>s+1}),month:xs({matchPatterns:uo,defaultMatchWidth:"wide",parsePatterns:fo,defaultParseWidth:"any"}),day:xs({matchPatterns:go,defaultMatchWidth:"wide",parsePatterns:mo,defaultParseWidth:"any"}),dayPeriod:xs({matchPatterns:vo,defaultMatchWidth:"any",parsePatterns:bo,defaultParseWidth:"any"})},ko={code:"en-US",formatDistance:Ur,formatLong:Rr,formatRelative:Gr,localize:so,match:yo,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $o(s,t){const e=Et(s,void 0);return Ir(e,jr(e))+1}function _o(s,t){const e=Et(s,void 0),i=+ii(e)-+Lr(e);return Math.round(i/wa)+1}function Aa(s,t){var e,i,a,n;const r=Et(s,t==null?void 0:t.in),h=r.getFullYear(),d=si(),p=(t==null?void 0:t.firstWeekContainsDate)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((n=(a=d.locale)==null?void 0:a.options)==null?void 0:n.firstWeekContainsDate)??1,f=Qt((t==null?void 0:t.in)||s,0);f.setFullYear(h+1,0,p),f.setHours(0,0,0,0);const g=_s(f,t),k=Qt((t==null?void 0:t.in)||s,0);k.setFullYear(h,0,p),k.setHours(0,0,0,0);const b=_s(k,t);return+r>=+g?h+1:+r>=+b?h:h-1}function wo(s,t){var e,i,a,n;const r=si(),h=(t==null?void 0:t.firstWeekContainsDate)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.firstWeekContainsDate)??r.firstWeekContainsDate??((n=(a=r.locale)==null?void 0:a.options)==null?void 0:n.firstWeekContainsDate)??1,d=Aa(s,t),p=Qt((t==null?void 0:t.in)||s,0);return p.setFullYear(d,0,h),p.setHours(0,0,0,0),_s(p,t)}function Ea(s,t){const e=Et(s,t==null?void 0:t.in),i=+_s(e,t)-+wo(e,t);return Math.round(i/wa)+1}function R(s,t){const e=s<0?"-":"",i=Math.abs(s).toString().padStart(t,"0");return e+i}const ge={y(s,t){const e=s.getFullYear(),i=e>0?e:1-e;return R(t==="yy"?i%100:i,t.length)},M(s,t){const e=s.getMonth();return t==="M"?String(e+1):R(e+1,2)},d(s,t){return R(s.getDate(),t.length)},a(s,t){const e=s.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(s,t){return R(s.getHours()%12||12,t.length)},H(s,t){return R(s.getHours(),t.length)},m(s,t){return R(s.getMinutes(),t.length)},s(s,t){return R(s.getSeconds(),t.length)},S(s,t){const e=t.length,i=s.getMilliseconds(),a=Math.trunc(i*Math.pow(10,e-3));return R(a,t.length)}},Je={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ma={G:function(s,t,e){const i=s.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(s,t,e){if(t==="yo"){const i=s.getFullYear(),a=i>0?i:1-i;return e.ordinalNumber(a,{unit:"year"})}return ge.y(s,t)},Y:function(s,t,e,i){const a=Aa(s,i),n=a>0?a:1-a;if(t==="YY"){const r=n%100;return R(r,2)}return t==="Yo"?e.ordinalNumber(n,{unit:"year"}):R(n,t.length)},R:function(s,t){const e=Sa(s);return R(e,t.length)},u:function(s,t){const e=s.getFullYear();return R(e,t.length)},Q:function(s,t,e){const i=Math.ceil((s.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return R(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(s,t,e){const i=Math.ceil((s.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return R(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(s,t,e){const i=s.getMonth();switch(t){case"M":case"MM":return ge.M(s,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(s,t,e){const i=s.getMonth();switch(t){case"L":return String(i+1);case"LL":return R(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(s,t,e,i){const a=Ea(s,i);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):R(a,t.length)},I:function(s,t,e){const i=_o(s);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):R(i,t.length)},d:function(s,t,e){return t==="do"?e.ordinalNumber(s.getDate(),{unit:"date"}):ge.d(s,t)},D:function(s,t,e){const i=$o(s);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):R(i,t.length)},E:function(s,t,e){const i=s.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(s,t,e,i){const a=s.getDay(),n=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return R(n,2);case"eo":return e.ordinalNumber(n,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(s,t,e,i){const a=s.getDay(),n=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return R(n,t.length);case"co":return e.ordinalNumber(n,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(s,t,e){const i=s.getDay(),a=i===0?7:i;switch(t){case"i":return String(a);case"ii":return R(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(s,t,e){const i=s.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(s,t,e){const i=s.getHours();let a;switch(i===12?a=Je.noon:i===0?a=Je.midnight:a=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(s,t,e){const i=s.getHours();let a;switch(i>=17?a=Je.evening:i>=12?a=Je.afternoon:i>=4?a=Je.morning:a=Je.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(s,t,e){if(t==="ho"){let i=s.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return ge.h(s,t)},H:function(s,t,e){return t==="Ho"?e.ordinalNumber(s.getHours(),{unit:"hour"}):ge.H(s,t)},K:function(s,t,e){const i=s.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):R(i,t.length)},k:function(s,t,e){let i=s.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):R(i,t.length)},m:function(s,t,e){return t==="mo"?e.ordinalNumber(s.getMinutes(),{unit:"minute"}):ge.m(s,t)},s:function(s,t,e){return t==="so"?e.ordinalNumber(s.getSeconds(),{unit:"second"}):ge.s(s,t)},S:function(s,t){return ge.S(s,t)},X:function(s,t,e){const i=s.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return Oa(i);case"XXXX":case"XX":return Ae(i);case"XXXXX":case"XXX":default:return Ae(i,":")}},x:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"x":return Oa(i);case"xxxx":case"xx":return Ae(i);case"xxxxx":case"xxx":default:return Ae(i,":")}},O:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pa(i,":");case"OOOO":default:return"GMT"+Ae(i,":")}},z:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pa(i,":");case"zzzz":default:return"GMT"+Ae(i,":")}},t:function(s,t,e){const i=Math.trunc(+s/1e3);return R(i,t.length)},T:function(s,t,e){return R(+s,t.length)}};function Pa(s,t=""){const e=s>0?"-":"+",i=Math.abs(s),a=Math.trunc(i/60),n=i%60;return n===0?e+String(a):e+String(a)+t+R(n,2)}function Oa(s,t){return s%60===0?(s>0?"-":"+")+R(Math.abs(s)/60,2):Ae(s,t)}function Ae(s,t=""){const e=s>0?"-":"+",i=Math.abs(s),a=R(Math.trunc(i/60),2),n=R(i%60,2);return e+a+t+n}const Da=(s,t)=>{switch(s){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ia=(s,t)=>{switch(s){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},xo=(s,t)=>{const e=s.match(/(P+)(p+)?/)||[],i=e[1],a=e[2];if(!a)return Da(s,t);let n;switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",Da(i,t)).replace("{{time}}",Ia(a,t))},So={p:Ia,P:xo},Co=/^D+$/,To=/^Y+$/,No=["D","DD","YY","YYYY"];function Ao(s){return Co.test(s)}function Eo(s){return To.test(s)}function Mo(s,t,e){const i=Po(s,t,e);if(console.warn(i),No.includes(s))throw new RangeError(i)}function Po(s,t,e){const i=s[0]==="Y"?"years":"days of the month";return`Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Do=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Io=/^'([^]*?)'?$/,Lo=/''/g,Bo=/[a-zA-Z]/;function Fo(s,t,e){var i,a,n,r;const h=si(),d=h.locale??ko,p=h.firstWeekContainsDate??((a=(i=h.locale)==null?void 0:i.options)==null?void 0:a.firstWeekContainsDate)??1,f=h.weekStartsOn??((r=(n=h.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??0,g=Et(s,void 0);if(!Fr(g))throw new RangeError("Invalid time value");let k=t.match(Do).map(y=>{const w=y[0];if(w==="p"||w==="P"){const C=So[w];return C(y,d.formatLong)}return y}).join("").match(Oo).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const w=y[0];if(w==="'")return{isToken:!1,value:Vo(y)};if(Ma[w])return{isToken:!0,value:y};if(w.match(Bo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:y}});d.localize.preprocessor&&(k=d.localize.preprocessor(g,k));const b={firstWeekContainsDate:p,weekStartsOn:f,locale:d};return k.map(y=>{if(!y.isToken)return y.value;const w=y.value;(Eo(w)||Ao(w))&&Mo(w,t,String(s));const C=Ma[w[0]];return C(g,w,d.localize,b)}).join("")}function Vo(s){const t=s.match(Io);return t?t[1].replace(Lo,"'"):s}function jo(s,t){const e=Et(s,void 0).getDay();return e===0?7:e}function Ho(s,t,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:s,timeZoneName:e}).format(t).split(/\s/g).slice(2).join(" ")}const La={},Ss={};function Ee(s,t){try{const e=(La[s]||(La[s]=new Intl.DateTimeFormat("en-US",{timeZone:s,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return e in Ss?Ss[e]:Ba(e,e.split(":"))}catch{if(s in Ss)return Ss[s];const e=s==null?void 0:s.match(Uo);return e?Ba(s,e.slice(1)):NaN}}const Uo=/([+-]\d\d):?(\d\d)?/;function Ba(s,t){const e=+(t[0]||0),i=+(t[1]||0),a=+(t[2]||0)/60;return Ss[s]=e*60+i>0?e*60+i+a:e*60-i-a}let Cs=class Hs extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ee(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Va(this),Ni(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Hs(...e,t):new Hs(Date.now(),t)}withTimeZone(t){return new Hs(+this,t)}getTimezoneOffset(){const t=-Ee(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ni(this),+this}[Symbol.for("constructDateFrom")](t){return new Hs(+new Date(t),this.timeZone)}};const Fa=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(s=>{if(!Fa.test(s))return;const t=s.replace(Fa,"$1UTC");Cs.prototype[t]&&(s.startsWith("get")?Cs.prototype[s]=function(){return this.internal[t]()}:(Cs.prototype[s]=function(){return Date.prototype[t].apply(this.internal,arguments),qo(this),+this},Cs.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ni(this),+this}))});function Ni(s){s.internal.setTime(+s),s.internal.setUTCSeconds(s.internal.getUTCSeconds()-Math.round(-Ee(s.timeZone,s)*60))}function qo(s){Date.prototype.setFullYear.call(s,s.internal.getUTCFullYear(),s.internal.getUTCMonth(),s.internal.getUTCDate()),Date.prototype.setHours.call(s,s.internal.getUTCHours(),s.internal.getUTCMinutes(),s.internal.getUTCSeconds(),s.internal.getUTCMilliseconds()),Va(s)}function Va(s){const t=Ee(s.timeZone,s),e=t>0?Math.floor(t):Math.ceil(t),i=new Date(+s);i.setUTCHours(i.getUTCHours()-1);const a=-new Date(+s).getTimezoneOffset(),n=-new Date(+i).getTimezoneOffset(),r=a-n,h=Date.prototype.getHours.apply(s)!==s.internal.getUTCHours();r&&h&&s.internal.setUTCMinutes(s.internal.getUTCMinutes()+r);const d=a-e;d&&Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+d);const p=new Date(+s);p.setUTCSeconds(0);const f=a>0?p.getSeconds():(p.getSeconds()-60)%60,g=Math.round(-(Ee(s.timeZone,s)*60))%60;(g||f)&&(s.internal.setUTCSeconds(s.internal.getUTCSeconds()+g),Date.prototype.setUTCSeconds.call(s,Date.prototype.getUTCSeconds.call(s)+g+f));const k=Ee(s.timeZone,s),b=k>0?Math.floor(k):Math.ceil(k),y=-new Date(+s).getTimezoneOffset()-b,w=b!==e,C=y-d;if(w&&C){Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+C);const P=Ee(s.timeZone,s),T=P>0?Math.floor(P):Math.ceil(P),I=b-T;I&&(s.internal.setUTCMinutes(s.internal.getUTCMinutes()+I),Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+I))}}let Ai=class Us extends Cs{static tz(t,...e){return e.length?new Us(...e,t):new Us(Date.now(),t)}toISOString(){const[t,e,i]=this.tzComponents(),a=`${t}${e}:${i}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,i,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${i} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,i,a]=this.tzComponents();return`${t} GMT${e}${i}${a} (${Ho(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",i=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,i,a]}withTimeZone(t){return new Us(+this,t)}[Symbol.for("constructDateFrom")](t){return new Us(+new Date(t),this.timeZone)}};window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const zo=(s=window.pktTz)=>{const t=new Ai(new Date().toISOString(),s);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function me(s){if(!s||s==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(s)){const[t,e,i]=s.split("-").map(Number);return new Date(t,e-1,i)}if(/^\d{4}-\d{2}$/.test(s)){const[t,e]=s.split("-").map(Number);return new Date(t,e-1,1)}return/^\d{4}$/.test(s)?new Date(Number(s),0,1):new Date(s)}const nt=s=>{if(!s||isNaN(s.getTime()))return"";const t=s.getFullYear(),e=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0");return`${t}-${e}-${i}`},ve=s=>{if(!s)return null;const t=me(s);return isNaN(t.getTime())?null:t},ja=(s,t)=>{const e=re(s);return isNaN(e.getTime())?"":Fo(e,t)},re=(s="",t)=>{const e=typeof s=="string"?me(s):s;return!e||isNaN(e.getTime())?new Date:e},be=(s,t,e=1)=>{if(typeof s!="number"||typeof t!="number"||typeof e!="number"||isNaN(s)||isNaN(t)||isNaN(e))return new Date;const i=new Date(s,t,e);return isNaN(i.getTime())?new Date:i},Ts=s=>{let t;return typeof s=="number"?t=new Ai(s,window.pktTz):t=new Ai(s,window.pktTz),t.setHours(12,0,0,0),t},Wo=s=>!s||isNaN(s.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(s),Ro=(s,t,e)=>{if(!s||isNaN(s.getTime()))return!1;const i=t?re(t):null,a=e?re(e):null;return!(i&&s<i||a&&s>a)},Ko=(s,t)=>{if(!s||isNaN(s.getTime())||!Array.isArray(t))return!1;const e=nt(s);return t.includes(e)},Go=(s,t)=>{if(!s||isNaN(s.getTime())||!Array.isArray(t))return!1;const e=s.getDay().toString();return t.includes(e)},Ha=(s,t,e,i,a)=>!(!s||isNaN(s.getTime())||!Ro(s,t,e)||i&&Ko(s,i)||a&&Go(s,a)),Yo=(s,t,e,i,a)=>s.filter(n=>{const r=ve(n);return r&&Ha(r,t,e,i,a)}),Ua=s=>s.slice().sort((t,e)=>{const i=ve(t),a=ve(e);return!i||!a?0:i.getTime()-a.getTime()}),Zo=(s,t)=>{const e=ve(s),i=ve(t);return!e||!i?!1:e<=i},Ns=s=>s?Array.isArray(s)?s.filter(Boolean):String(s).split(",").map(t=>t.trim()).filter(Boolean):[],Xo=s=>s.join(","),qa=s=>Ns(s),Jo=s=>s?me(s):null,Qo=s=>{if(typeof s=="string")return s.split(",").map(t=>me(t));if(Array.isArray(s))return s.map(t=>me(t))},Qe={csvToArray:qa,stringToDate:Jo,stringsToDate:Qo},tl={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Me={props:tl};var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,G=(s,t,e,i)=>{for(var a=i>1?void 0:i?sl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&el(t,e,a),a};let K=class extends Y{constructor(){super(...arguments),this.multiple=Me.props.multiple.default,this.maxMultiple=Me.props.maxMultiple.default,this.range=Me.props.range.default,this.weeknumbers=Me.props.weeknumbers.default,this.withcontrols=Me.props.withcontrols.default,this.selected=[],this.earliest=Me.props.earliest.default,this.latest=Me.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(t,e,i){t==="selected"&&i&&this.convertSelected(),super.attributeChangedCallback(t,e,i)}updated(t){super.updated(t),t.has("selected")&&this.convertSelected()}firstUpdated(t){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(t=>me(t)),this.range&&this.selected.length===2){const t=Ci({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let i=0;i<t.length;i++){const a=t[i],n=a>this._selected[0]&&a<this._selected[1];e[nt(a)]=n}this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched&&(this.currentmonthtouched=!0),this.selected.length&&this.selected[0]!==""){const t=me(this.selected[this.selected.length-1]);this.currentmonth=isNaN(t.getTime())?Ts(new Date):t}else this.currentmonth===null&&(this.currentmonth=Ts(new Date));(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=Ts(new Date)),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var i,a,n,r,h;if(((i=t.target)==null?void 0:i.nodeName)==="INPUT"||((a=t.target)==null?void 0:a.nodeName)==="SELECT"||((n=t.target)==null?void 0:n.nodeName)==="BUTTON"&&!((h=(r=t.target)==null?void 0:r.dataset)!=null&&h.date))return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const d=this.focusedDate?re(this.focusedDate):be(this.year,this.month,1);let p=Si(d,e);if(p){let f=this.querySelector(`button[data-date="${nt(p)}"]`);if(f instanceof HTMLButtonElement){if(f.dataset.disabled){p=Si(p,e);let g=this.querySelector(`button[data-date="${nt(p)}"]`);for(;g&&g instanceof HTMLButtonElement&&g.dataset.disabled;)p=Si(p,e),g=this.querySelector(`button[data-date="${nt(p)}"]`);f=g}f instanceof HTMLButtonElement&&!f.dataset.disabled&&(this.focusedDate=nt(p),f.focus())}}}render(){return u`
205
+ </nav>`}};ei([o({type:String})],Xe.prototype,"href",2),ei([o({type:String})],Xe.prototype,"text",2),ei([o({type:String})],Xe.prototype,"ariaLabel",2),Xe=ei([j("pkt-backlink")],Xe);const wa=6048e5,Or=864e5,xa=Symbol.for("constructDateFrom");function Qt(s,t){return typeof s=="function"?s(t):s&&typeof s=="object"&&xa in s?s[xa](t):s instanceof Date?new s.constructor(t):new Date(t)}function Et(s,t){return Qt(t||s,s)}function Si(s,t,e){const i=Et(s,void 0);return isNaN(t)?Qt(s,NaN):(t&&i.setDate(i.getDate()+t),i)}let Dr={};function si(){return Dr}function ws(s,t){var e,i,a,n;const r=si(),h=(t==null?void 0:t.weekStartsOn)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.weekStartsOn)??r.weekStartsOn??((n=(a=r.locale)==null?void 0:a.options)==null?void 0:n.weekStartsOn)??0,d=Et(s,t==null?void 0:t.in),p=d.getDay(),f=(p<h?7:0)+p-h;return d.setDate(d.getDate()-f),d.setHours(0,0,0,0),d}function ii(s,t){return ws(s,{...t,weekStartsOn:1})}function Sa(s,t){const e=Et(s,void 0),i=e.getFullYear(),a=Qt(e,0);a.setFullYear(i+1,0,4),a.setHours(0,0,0,0);const n=ii(a),r=Qt(e,0);r.setFullYear(i,0,4),r.setHours(0,0,0,0);const h=ii(r);return e.getTime()>=n.getTime()?i+1:e.getTime()>=h.getTime()?i:i-1}function Ca(s){const t=Et(s),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+s-+e}function Ta(s,...t){const e=Qt.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function Na(s,t){const e=Et(s,void 0);return e.setHours(0,0,0,0),e}function Ir(s,t,e){const[i,a]=Ta(void 0,s,t),n=Na(i),r=Na(a),h=+n-Ca(n),d=+r-Ca(r);return Math.round((h-d)/Or)}function Lr(s,t){const e=Sa(s),i=Qt(s,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),ii(i)}function Br(s){return s instanceof Date||typeof s=="object"&&Object.prototype.toString.call(s)==="[object Date]"}function Fr(s){return!(!Br(s)&&typeof s!="number"||isNaN(+Et(s)))}function Vr(s,t){const[e,i]=Ta(s,t.start,t.end);return{start:e,end:i}}function Ci(s,t){const{start:e,end:i}=Vr(void 0,s);let a=+e>+i;const n=a?+e:+i,r=a?i:e;r.setHours(0,0,0,0);let h=1;const d=[];for(;+r<=n;)d.push(Qt(e,r)),r.setDate(r.getDate()+h),r.setHours(0,0,0,0);return a?d.reverse():d}function jr(s,t){const e=Et(s,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Hr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ur=(s,t,e)=>{let i;const a=Hr[s];return typeof a=="string"?i=a:t===1?i=a.one:i=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function Ti(s){return(t={})=>{const e=t.width?String(t.width):s.defaultWidth;return s.formats[e]||s.formats[s.defaultWidth]}}const qr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Wr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rr={date:Ti({formats:qr,defaultWidth:"full"}),time:Ti({formats:zr,defaultWidth:"full"}),dateTime:Ti({formats:Wr,defaultWidth:"full"})},Kr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gr=(s,t,e,i)=>Kr[s];function xs(s){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let a;if(i==="formatting"&&s.formattingValues){const r=s.defaultFormattingWidth||s.defaultWidth,h=e!=null&&e.width?String(e.width):r;a=s.formattingValues[h]||s.formattingValues[r]}else{const r=s.defaultWidth,h=e!=null&&e.width?String(e.width):s.defaultWidth;a=s.values[h]||s.values[r]}const n=s.argumentCallback?s.argumentCallback(t):t;return a[n]}}const Yr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},to={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eo=(s,t)=>{const e=Number(s),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},so={ordinalNumber:eo,era:xs({values:Yr,defaultWidth:"wide"}),quarter:xs({values:Zr,defaultWidth:"wide",argumentCallback:s=>s-1}),month:xs({values:Xr,defaultWidth:"wide"}),day:xs({values:Jr,defaultWidth:"wide"}),dayPeriod:xs({values:Qr,defaultWidth:"wide",formattingValues:to,defaultFormattingWidth:"wide"})};function Ss(s){return(t,e={})=>{const i=e.width,a=i&&s.matchPatterns[i]||s.matchPatterns[s.defaultMatchWidth],n=t.match(a);if(!n)return null;const r=n[0],h=i&&s.parsePatterns[i]||s.parsePatterns[s.defaultParseWidth],d=Array.isArray(h)?ao(h,g=>g.test(r)):io(h,g=>g.test(r));let p;p=s.valueCallback?s.valueCallback(d):d,p=e.valueCallback?e.valueCallback(p):p;const f=t.slice(r.length);return{value:p,rest:f}}}function io(s,t){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&t(s[e]))return e}function ao(s,t){for(let e=0;e<s.length;e++)if(t(s[e]))return e}function no(s){return(t,e={})=>{const i=t.match(s.matchPattern);if(!i)return null;const a=i[0],n=t.match(s.parsePattern);if(!n)return null;let r=s.valueCallback?s.valueCallback(n[0]):n[0];r=e.valueCallback?e.valueCallback(r):r;const h=t.slice(a.length);return{value:r,rest:h}}}const ro=/^(\d+)(th|st|nd|rd)?/i,oo=/\d+/i,lo={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ho={any:[/^b/i,/^(a|c)/i]},co={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},po={any:[/1/i,/2/i,/3/i,/4/i]},uo={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fo={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},go={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mo={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vo={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bo={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yo={ordinalNumber:no({matchPattern:ro,parsePattern:oo,valueCallback:s=>parseInt(s,10)}),era:Ss({matchPatterns:lo,defaultMatchWidth:"wide",parsePatterns:ho,defaultParseWidth:"any"}),quarter:Ss({matchPatterns:co,defaultMatchWidth:"wide",parsePatterns:po,defaultParseWidth:"any",valueCallback:s=>s+1}),month:Ss({matchPatterns:uo,defaultMatchWidth:"wide",parsePatterns:fo,defaultParseWidth:"any"}),day:Ss({matchPatterns:go,defaultMatchWidth:"wide",parsePatterns:mo,defaultParseWidth:"any"}),dayPeriod:Ss({matchPatterns:vo,defaultMatchWidth:"any",parsePatterns:bo,defaultParseWidth:"any"})},ko={code:"en-US",formatDistance:Ur,formatLong:Rr,formatRelative:Gr,localize:so,match:yo,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $o(s,t){const e=Et(s,void 0);return Ir(e,jr(e))+1}function _o(s,t){const e=Et(s,void 0),i=+ii(e)-+Lr(e);return Math.round(i/wa)+1}function Aa(s,t){var e,i,a,n;const r=Et(s,t==null?void 0:t.in),h=r.getFullYear(),d=si(),p=(t==null?void 0:t.firstWeekContainsDate)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((n=(a=d.locale)==null?void 0:a.options)==null?void 0:n.firstWeekContainsDate)??1,f=Qt((t==null?void 0:t.in)||s,0);f.setFullYear(h+1,0,p),f.setHours(0,0,0,0);const g=ws(f,t),k=Qt((t==null?void 0:t.in)||s,0);k.setFullYear(h,0,p),k.setHours(0,0,0,0);const b=ws(k,t);return+r>=+g?h+1:+r>=+b?h:h-1}function wo(s,t){var e,i,a,n;const r=si(),h=(t==null?void 0:t.firstWeekContainsDate)??((i=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:i.firstWeekContainsDate)??r.firstWeekContainsDate??((n=(a=r.locale)==null?void 0:a.options)==null?void 0:n.firstWeekContainsDate)??1,d=Aa(s,t),p=Qt((t==null?void 0:t.in)||s,0);return p.setFullYear(d,0,h),p.setHours(0,0,0,0),ws(p,t)}function Ea(s,t){const e=Et(s,t==null?void 0:t.in),i=+ws(e,t)-+wo(e,t);return Math.round(i/wa)+1}function R(s,t){const e=s<0?"-":"",i=Math.abs(s).toString().padStart(t,"0");return e+i}const ge={y(s,t){const e=s.getFullYear(),i=e>0?e:1-e;return R(t==="yy"?i%100:i,t.length)},M(s,t){const e=s.getMonth();return t==="M"?String(e+1):R(e+1,2)},d(s,t){return R(s.getDate(),t.length)},a(s,t){const e=s.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(s,t){return R(s.getHours()%12||12,t.length)},H(s,t){return R(s.getHours(),t.length)},m(s,t){return R(s.getMinutes(),t.length)},s(s,t){return R(s.getSeconds(),t.length)},S(s,t){const e=t.length,i=s.getMilliseconds(),a=Math.trunc(i*Math.pow(10,e-3));return R(a,t.length)}},Je={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ma={G:function(s,t,e){const i=s.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(s,t,e){if(t==="yo"){const i=s.getFullYear(),a=i>0?i:1-i;return e.ordinalNumber(a,{unit:"year"})}return ge.y(s,t)},Y:function(s,t,e,i){const a=Aa(s,i),n=a>0?a:1-a;if(t==="YY"){const r=n%100;return R(r,2)}return t==="Yo"?e.ordinalNumber(n,{unit:"year"}):R(n,t.length)},R:function(s,t){const e=Sa(s);return R(e,t.length)},u:function(s,t){const e=s.getFullYear();return R(e,t.length)},Q:function(s,t,e){const i=Math.ceil((s.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return R(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(s,t,e){const i=Math.ceil((s.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return R(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(s,t,e){const i=s.getMonth();switch(t){case"M":case"MM":return ge.M(s,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(s,t,e){const i=s.getMonth();switch(t){case"L":return String(i+1);case"LL":return R(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(s,t,e,i){const a=Ea(s,i);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):R(a,t.length)},I:function(s,t,e){const i=_o(s);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):R(i,t.length)},d:function(s,t,e){return t==="do"?e.ordinalNumber(s.getDate(),{unit:"date"}):ge.d(s,t)},D:function(s,t,e){const i=$o(s);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):R(i,t.length)},E:function(s,t,e){const i=s.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(s,t,e,i){const a=s.getDay(),n=(a-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return R(n,2);case"eo":return e.ordinalNumber(n,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(s,t,e,i){const a=s.getDay(),n=(a-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return R(n,t.length);case"co":return e.ordinalNumber(n,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(s,t,e){const i=s.getDay(),a=i===0?7:i;switch(t){case"i":return String(a);case"ii":return R(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(s,t,e){const i=s.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(s,t,e){const i=s.getHours();let a;switch(i===12?a=Je.noon:i===0?a=Je.midnight:a=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(s,t,e){const i=s.getHours();let a;switch(i>=17?a=Je.evening:i>=12?a=Je.afternoon:i>=4?a=Je.morning:a=Je.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(s,t,e){if(t==="ho"){let i=s.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return ge.h(s,t)},H:function(s,t,e){return t==="Ho"?e.ordinalNumber(s.getHours(),{unit:"hour"}):ge.H(s,t)},K:function(s,t,e){const i=s.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):R(i,t.length)},k:function(s,t,e){let i=s.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):R(i,t.length)},m:function(s,t,e){return t==="mo"?e.ordinalNumber(s.getMinutes(),{unit:"minute"}):ge.m(s,t)},s:function(s,t,e){return t==="so"?e.ordinalNumber(s.getSeconds(),{unit:"second"}):ge.s(s,t)},S:function(s,t){return ge.S(s,t)},X:function(s,t,e){const i=s.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return Oa(i);case"XXXX":case"XX":return Ee(i);case"XXXXX":case"XXX":default:return Ee(i,":")}},x:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"x":return Oa(i);case"xxxx":case"xx":return Ee(i);case"xxxxx":case"xxx":default:return Ee(i,":")}},O:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pa(i,":");case"OOOO":default:return"GMT"+Ee(i,":")}},z:function(s,t,e){const i=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pa(i,":");case"zzzz":default:return"GMT"+Ee(i,":")}},t:function(s,t,e){const i=Math.trunc(+s/1e3);return R(i,t.length)},T:function(s,t,e){return R(+s,t.length)}};function Pa(s,t=""){const e=s>0?"-":"+",i=Math.abs(s),a=Math.trunc(i/60),n=i%60;return n===0?e+String(a):e+String(a)+t+R(n,2)}function Oa(s,t){return s%60===0?(s>0?"-":"+")+R(Math.abs(s)/60,2):Ee(s,t)}function Ee(s,t=""){const e=s>0?"-":"+",i=Math.abs(s),a=R(Math.trunc(i/60),2),n=R(i%60,2);return e+a+t+n}const Da=(s,t)=>{switch(s){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ia=(s,t)=>{switch(s){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},xo=(s,t)=>{const e=s.match(/(P+)(p+)?/)||[],i=e[1],a=e[2];if(!a)return Da(s,t);let n;switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",Da(i,t)).replace("{{time}}",Ia(a,t))},So={p:Ia,P:xo},Co=/^D+$/,To=/^Y+$/,No=["D","DD","YY","YYYY"];function Ao(s){return Co.test(s)}function Eo(s){return To.test(s)}function Mo(s,t,e){const i=Po(s,t,e);if(console.warn(i),No.includes(s))throw new RangeError(i)}function Po(s,t,e){const i=s[0]==="Y"?"years":"days of the month";return`Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Do=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Io=/^'([^]*?)'?$/,Lo=/''/g,Bo=/[a-zA-Z]/;function Fo(s,t,e){var i,a,n,r;const h=si(),d=h.locale??ko,p=h.firstWeekContainsDate??((a=(i=h.locale)==null?void 0:i.options)==null?void 0:a.firstWeekContainsDate)??1,f=h.weekStartsOn??((r=(n=h.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??0,g=Et(s,void 0);if(!Fr(g))throw new RangeError("Invalid time value");let k=t.match(Do).map(y=>{const w=y[0];if(w==="p"||w==="P"){const C=So[w];return C(y,d.formatLong)}return y}).join("").match(Oo).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const w=y[0];if(w==="'")return{isToken:!1,value:Vo(y)};if(Ma[w])return{isToken:!0,value:y};if(w.match(Bo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:y}});d.localize.preprocessor&&(k=d.localize.preprocessor(g,k));const b={firstWeekContainsDate:p,weekStartsOn:f,locale:d};return k.map(y=>{if(!y.isToken)return y.value;const w=y.value;(Eo(w)||Ao(w))&&Mo(w,t,String(s));const C=Ma[w[0]];return C(g,w,d.localize,b)}).join("")}function Vo(s){const t=s.match(Io);return t?t[1].replace(Lo,"'"):s}function jo(s,t){const e=Et(s,void 0).getDay();return e===0?7:e}function Ho(s,t,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:s,timeZoneName:e}).format(t).split(/\s/g).slice(2).join(" ")}const La={},Cs={};function Me(s,t){try{const e=(La[s]||(La[s]=new Intl.DateTimeFormat("en-US",{timeZone:s,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return e in Cs?Cs[e]:Ba(e,e.split(":"))}catch{if(s in Cs)return Cs[s];const e=s==null?void 0:s.match(Uo);return e?Ba(s,e.slice(1)):NaN}}const Uo=/([+-]\d\d):?(\d\d)?/;function Ba(s,t){const e=+(t[0]||0),i=+(t[1]||0),a=+(t[2]||0)/60;return Cs[s]=e*60+i>0?e*60+i+a:e*60-i-a}let Ts=class Hs extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Me(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Va(this),Ni(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Hs(...e,t):new Hs(Date.now(),t)}withTimeZone(t){return new Hs(+this,t)}getTimezoneOffset(){const t=-Me(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ni(this),+this}[Symbol.for("constructDateFrom")](t){return new Hs(+new Date(t),this.timeZone)}};const Fa=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(s=>{if(!Fa.test(s))return;const t=s.replace(Fa,"$1UTC");Ts.prototype[t]&&(s.startsWith("get")?Ts.prototype[s]=function(){return this.internal[t]()}:(Ts.prototype[s]=function(){return Date.prototype[t].apply(this.internal,arguments),qo(this),+this},Ts.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ni(this),+this}))});function Ni(s){s.internal.setTime(+s),s.internal.setUTCSeconds(s.internal.getUTCSeconds()-Math.round(-Me(s.timeZone,s)*60))}function qo(s){Date.prototype.setFullYear.call(s,s.internal.getUTCFullYear(),s.internal.getUTCMonth(),s.internal.getUTCDate()),Date.prototype.setHours.call(s,s.internal.getUTCHours(),s.internal.getUTCMinutes(),s.internal.getUTCSeconds(),s.internal.getUTCMilliseconds()),Va(s)}function Va(s){const t=Me(s.timeZone,s),e=t>0?Math.floor(t):Math.ceil(t),i=new Date(+s);i.setUTCHours(i.getUTCHours()-1);const a=-new Date(+s).getTimezoneOffset(),n=-new Date(+i).getTimezoneOffset(),r=a-n,h=Date.prototype.getHours.apply(s)!==s.internal.getUTCHours();r&&h&&s.internal.setUTCMinutes(s.internal.getUTCMinutes()+r);const d=a-e;d&&Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+d);const p=new Date(+s);p.setUTCSeconds(0);const f=a>0?p.getSeconds():(p.getSeconds()-60)%60,g=Math.round(-(Me(s.timeZone,s)*60))%60;(g||f)&&(s.internal.setUTCSeconds(s.internal.getUTCSeconds()+g),Date.prototype.setUTCSeconds.call(s,Date.prototype.getUTCSeconds.call(s)+g+f));const k=Me(s.timeZone,s),b=k>0?Math.floor(k):Math.ceil(k),y=-new Date(+s).getTimezoneOffset()-b,w=b!==e,C=y-d;if(w&&C){Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+C);const P=Me(s.timeZone,s),T=P>0?Math.floor(P):Math.ceil(P),I=b-T;I&&(s.internal.setUTCMinutes(s.internal.getUTCMinutes()+I),Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+I))}}let Ai=class Us extends Ts{static tz(t,...e){return e.length?new Us(...e,t):new Us(Date.now(),t)}toISOString(){const[t,e,i]=this.tzComponents(),a=`${t}${e}:${i}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,i,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${i} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,i,a]=this.tzComponents();return`${t} GMT${e}${i}${a} (${Ho(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",i=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,i,a]}withTimeZone(t){return new Us(+this,t)}[Symbol.for("constructDateFrom")](t){return new Us(+new Date(t),this.timeZone)}};window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const zo=(s=window.pktTz)=>{const t=new Ai(new Date().toISOString(),s);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function me(s){if(!s||s==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(s)){const[t,e,i]=s.split("-").map(Number);return new Date(t,e-1,i)}if(/^\d{4}-\d{2}$/.test(s)){const[t,e]=s.split("-").map(Number);return new Date(t,e-1,1)}return/^\d{4}$/.test(s)?new Date(Number(s),0,1):new Date(s)}const nt=s=>{if(!s||isNaN(s.getTime()))return"";const t=s.getFullYear(),e=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0");return`${t}-${e}-${i}`},ve=s=>{if(!s)return null;const t=me(s);return isNaN(t.getTime())?null:t},ja=(s,t)=>{const e=re(s);return isNaN(e.getTime())?"":Fo(e,t)},re=(s="",t)=>{const e=typeof s=="string"?me(s):s;return!e||isNaN(e.getTime())?new Date:e},be=(s,t,e=1)=>{if(typeof s!="number"||typeof t!="number"||typeof e!="number"||isNaN(s)||isNaN(t)||isNaN(e))return new Date;const i=new Date(s,t,e);return isNaN(i.getTime())?new Date:i},Ns=s=>{let t;return typeof s=="number"?t=new Ai(s,window.pktTz):t=new Ai(s,window.pktTz),t.setHours(12,0,0,0),t},Wo=s=>!s||isNaN(s.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(s),Ro=(s,t,e)=>{if(!s||isNaN(s.getTime()))return!1;const i=t?re(t):null,a=e?re(e):null;return!(i&&s<i||a&&s>a)},Ko=(s,t)=>{if(!s||isNaN(s.getTime())||!Array.isArray(t))return!1;const e=nt(s);return t.includes(e)},Go=(s,t)=>{if(!s||isNaN(s.getTime())||!Array.isArray(t))return!1;const e=s.getDay().toString();return t.includes(e)},Ha=(s,t,e,i,a)=>!(!s||isNaN(s.getTime())||!Ro(s,t,e)||i&&Ko(s,i)||a&&Go(s,a)),Yo=(s,t,e,i,a)=>s.filter(n=>{const r=ve(n);return r&&Ha(r,t,e,i,a)}),Ua=s=>s.slice().sort((t,e)=>{const i=ve(t),a=ve(e);return!i||!a?0:i.getTime()-a.getTime()}),Zo=(s,t)=>{const e=ve(s),i=ve(t);return!e||!i?!1:e<=i},As=s=>s?Array.isArray(s)?s.filter(Boolean):String(s).split(",").map(t=>t.trim()).filter(Boolean):[],Xo=s=>s.join(","),qa=s=>As(s),Jo=s=>s?me(s):null,Qo=s=>{if(typeof s=="string")return s.split(",").map(t=>me(t));if(Array.isArray(s))return s.map(t=>me(t))},Qe={csvToArray:qa,stringToDate:Jo,stringsToDate:Qo},tl={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Pe={props:tl};var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,G=(s,t,e,i)=>{for(var a=i>1?void 0:i?sl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&el(t,e,a),a};let K=class extends Y{constructor(){super(...arguments),this.multiple=Pe.props.multiple.default,this.maxMultiple=Pe.props.maxMultiple.default,this.range=Pe.props.range.default,this.weeknumbers=Pe.props.weeknumbers.default,this.withcontrols=Pe.props.withcontrols.default,this.selected=[],this.earliest=Pe.props.earliest.default,this.latest=Pe.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(t,e,i){t==="selected"&&i&&this.convertSelected(),super.attributeChangedCallback(t,e,i)}updated(t){super.updated(t),t.has("selected")&&this.convertSelected()}firstUpdated(t){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(t=>me(t)),this.range&&this.selected.length===2){const t=Ci({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let i=0;i<t.length;i++){const a=t[i],n=a>this._selected[0]&&a<this._selected[1];e[nt(a)]=n}this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched&&(this.currentmonthtouched=!0),this.selected.length&&this.selected[0]!==""){const t=me(this.selected[this.selected.length-1]);this.currentmonth=isNaN(t.getTime())?Ns(new Date):t}else this.currentmonth===null&&(this.currentmonth=Ns(new Date));(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=Ns(new Date)),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var i,a,n,r,h;if(((i=t.target)==null?void 0:i.nodeName)==="INPUT"||((a=t.target)==null?void 0:a.nodeName)==="SELECT"||((n=t.target)==null?void 0:n.nodeName)==="BUTTON"&&!((h=(r=t.target)==null?void 0:r.dataset)!=null&&h.date))return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const d=this.focusedDate?re(this.focusedDate):be(this.year,this.month,1);let p=Si(d,e);if(p){let f=this.querySelector(`button[data-date="${nt(p)}"]`);if(f instanceof HTMLButtonElement){if(f.dataset.disabled){p=Si(p,e);let g=this.querySelector(`button[data-date="${nt(p)}"]`);for(;g&&g instanceof HTMLButtonElement&&g.dataset.disabled;)p=Si(p,e),g=this.querySelector(`button[data-date="${nt(p)}"]`);f=g}f instanceof HTMLButtonElement&&!f.dataset.disabled&&(this.focusedDate=nt(p),f.focus())}}}render(){return u`
206
206
  <div
207
207
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":""}"
208
208
  @focusout=${this.closeEvent}
@@ -316,7 +316,7 @@
316
316
  </div>
317
317
  </td>`),d++):(g.push(this.renderDayView(d,t)),d++);p.push(u`<tr class="pkt-cal-week-row" role="row">
318
318
  ${g}
319
- </tr>`)}return p}isExcluded(t){const e=this.excludedates.map(i=>typeof i=="string"?i:nt(i));return!Ha(t,this.earliest,this.latest,e,this.excludeweekdays)}isPrevMonthAllowed(){const t=be(this.year,this.month,0);return!(this.earliest&&re(this.earliest)>t)}prevMonth(){const t=this.month===0?11:this.month-1,e=this.month===0?this.year-1:this.year;this.changeMonth(e,t)}isNextMonthAllowed(){const t=be(this.month===11?this.year+1:this.year,this.month===11?0:this.month+1,1);return!(this.latest&&re(this.latest)<t)}nextMonth(){const t=this.month===11?0:this.month+1,e=this.month===11?this.year+1:this.year;this.changeMonth(e,t)}changeMonth(t,e){this.year=typeof t=="string"?parseInt(t):t,this.month=typeof e=="string"?parseInt(e):e,this.currentmonth=Ts(new Date(this.year,this.month,1)),this.tabIndexSet=0,this.focusedDate=null,this.selectableDates=[]}isRangeAllowed(t){let e=!0;if(this._selected.length===1){const i=Ci({start:this._selected[0],end:t});if(Array.isArray(i)&&i.length)for(let a=0;a<i.length;a++)this.excludedates.forEach(n=>{n>this._selected[0]&&n<t&&(e=!1)}),this.excludeweekdays.includes(jo(i[a]).toString())&&(e=!1)}return e}emptySelected(){this.selected=[],this._selected=[],this.inRange={}}addToSelected(t){this.selected.includes(nt(t))||(this.selected=[...this.selected,nt(t)],this._selected=[...this._selected,t],this.range&&this.selected.length===2&&(this.convertSelected(),this.close()))}removeFromSelected(t){if(this.selected.length===1)this.emptySelected();else{const e=this.selected.indexOf(nt(t)),i=[...this.selected],a=[...this._selected];i.splice(e,1),a.splice(e,1),this.selected=i,this._selected=a}}toggleSelected(t){const e=nt(t);this.selected.includes(e)?this.removeFromSelected(t):this.maxMultiple&&this.selected.length>=this.maxMultiple||this.addToSelected(t)}handleRangeSelect(t){const e=nt(t);return this.selected.includes(e)?this.selected.indexOf(e)===0?this.emptySelected():this.removeFromSelected(t):this.selected.length>1?(this.emptySelected(),this.addToSelected(t)):(this.selected.length===1&&!this.isRangeAllowed(t)&&this.emptySelected(),this.selected.length===1&&this._selected[0]>t&&this.emptySelected(),this.addToSelected(t)),Promise.resolve()}handleRangeHover(t){if(this.range&&this._selected.length===1&&this.isRangeAllowed(t)&&this._selected[0]<t){this.rangeHovered=t,this.inRange={};const e=Ci({start:this._selected[0],end:t});if(Array.isArray(e)&&e.length)for(let i=0;i<e.length;i++){const a=e[i],n=a>this._selected[0]&&a<t;this.inRange[nt(a)]=n}}else this.rangeHovered=null}handleDateSelect(t){if(t)return this.range?this.handleRangeSelect(t):this.multiple?this.toggleSelected(t):(this.selected.includes(nt(t))?this.emptySelected():(this.emptySelected(),this.addToSelected(t)),this.close()),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selected,bubbles:!0,composed:!0})),Promise.resolve()}focusOnCurrentDate(){const t=nt(Ts(new Date)),e=this.querySelector(`button[data-date="${t}"]`);if(e instanceof HTMLButtonElement)this.focusedDate=t,e.focus();else{const i=this.selectableDates.find(a=>!a.isDisabled);if(i){const a=this.querySelector(`button[data-date="${i.currentDateISO}"]`);a instanceof HTMLButtonElement&&(this.focusedDate=i.currentDateISO,a.focus())}}}closeEvent(t){!this.contains(t.relatedTarget)&&!t.target.classList.contains("pkt-hide")&&this.close()}close(){this.dispatchEvent(new CustomEvent("close",{detail:!0,bubbles:!0,composed:!0}))}};G([o({type:Boolean})],K.prototype,"multiple",2),G([o({type:Number})],K.prototype,"maxMultiple",2),G([o({type:Boolean})],K.prototype,"range",2),G([o({type:Boolean})],K.prototype,"weeknumbers",2),G([o({type:Boolean})],K.prototype,"withcontrols",2),G([o({converter:Qe.csvToArray})],K.prototype,"selected",2),G([o({type:String})],K.prototype,"earliest",2),G([o({type:String})],K.prototype,"latest",2),G([o({converter:Qe.stringsToDate})],K.prototype,"excludedates",2),G([o({converter:Qe.csvToArray})],K.prototype,"excludeweekdays",2),G([o({converter:Qe.stringToDate})],K.prototype,"currentmonth",2),G([o({type:Array})],K.prototype,"dayStrings",2),G([o({type:Array})],K.prototype,"dayStringsLong",2),G([o({type:Array})],K.prototype,"monthStrings",2),G([o({type:String})],K.prototype,"weekString",2),G([o({type:String})],K.prototype,"prevMonthString",2),G([o({type:String})],K.prototype,"nextMonthString",2),G([o({type:Array})],K.prototype,"_selected",2),G([o({type:Number})],K.prototype,"year",2),G([o({type:Number})],K.prototype,"month",2),G([o({type:Number})],K.prototype,"week",2),G([o({type:Date})],K.prototype,"rangeHovered",2),G([V()],K.prototype,"inRange",2),G([V()],K.prototype,"focusedDate",2),G([V()],K.prototype,"selectableDates",2),G([V()],K.prototype,"currentmonthtouched",2),G([V()],K.prototype,"tabIndexSet",2),K=G([j("pkt-calendar")],K);const il={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},ai={props:il};var al=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,te=(s,t,e,i)=>{for(var a=i>1?void 0:i?nl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&al(t,e,a),a};let Gt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.closeTag=ai.props.closeTag.default,this.size=ai.props.size.default,this.skin=ai.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=ai.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!1,composed:!0}))},this.slotController=new at(this,this.defaultSlot),this._isClosed=!1}firstUpdated(t){var e,i;if(super.firstUpdated(t),this.closeTag&&!this.ariaLabel){const a=(i=(e=this.defaultSlot.value)==null?void 0:e.textContent)==null?void 0:i.trim();a&&(this._ariaDescription=`Klikk for å fjerne ${a}`)}}render(){const t={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},e={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?u`
319
+ </tr>`)}return p}isExcluded(t){const e=this.excludedates.map(i=>typeof i=="string"?i:nt(i));return!Ha(t,this.earliest,this.latest,e,this.excludeweekdays)}isPrevMonthAllowed(){const t=be(this.year,this.month,0);return!(this.earliest&&re(this.earliest)>t)}prevMonth(){const t=this.month===0?11:this.month-1,e=this.month===0?this.year-1:this.year;this.changeMonth(e,t)}isNextMonthAllowed(){const t=be(this.month===11?this.year+1:this.year,this.month===11?0:this.month+1,1);return!(this.latest&&re(this.latest)<t)}nextMonth(){const t=this.month===11?0:this.month+1,e=this.month===11?this.year+1:this.year;this.changeMonth(e,t)}changeMonth(t,e){this.year=typeof t=="string"?parseInt(t):t,this.month=typeof e=="string"?parseInt(e):e,this.currentmonth=Ns(new Date(this.year,this.month,1)),this.tabIndexSet=0,this.focusedDate=null,this.selectableDates=[]}isRangeAllowed(t){let e=!0;if(this._selected.length===1){const i=Ci({start:this._selected[0],end:t});if(Array.isArray(i)&&i.length)for(let a=0;a<i.length;a++)this.excludedates.forEach(n=>{n>this._selected[0]&&n<t&&(e=!1)}),this.excludeweekdays.includes(jo(i[a]).toString())&&(e=!1)}return e}emptySelected(){this.selected=[],this._selected=[],this.inRange={}}addToSelected(t){this.selected.includes(nt(t))||(this.selected=[...this.selected,nt(t)],this._selected=[...this._selected,t],this.range&&this.selected.length===2&&(this.convertSelected(),this.close()))}removeFromSelected(t){if(this.selected.length===1)this.emptySelected();else{const e=this.selected.indexOf(nt(t)),i=[...this.selected],a=[...this._selected];i.splice(e,1),a.splice(e,1),this.selected=i,this._selected=a}}toggleSelected(t){const e=nt(t);this.selected.includes(e)?this.removeFromSelected(t):this.maxMultiple&&this.selected.length>=this.maxMultiple||this.addToSelected(t)}handleRangeSelect(t){const e=nt(t);return this.selected.includes(e)?this.selected.indexOf(e)===0?this.emptySelected():this.removeFromSelected(t):this.selected.length>1?(this.emptySelected(),this.addToSelected(t)):(this.selected.length===1&&!this.isRangeAllowed(t)&&this.emptySelected(),this.selected.length===1&&this._selected[0]>t&&this.emptySelected(),this.addToSelected(t)),Promise.resolve()}handleRangeHover(t){if(this.range&&this._selected.length===1&&this.isRangeAllowed(t)&&this._selected[0]<t){this.rangeHovered=t,this.inRange={};const e=Ci({start:this._selected[0],end:t});if(Array.isArray(e)&&e.length)for(let i=0;i<e.length;i++){const a=e[i],n=a>this._selected[0]&&a<t;this.inRange[nt(a)]=n}}else this.rangeHovered=null}handleDateSelect(t){if(t)return this.range?this.handleRangeSelect(t):this.multiple?this.toggleSelected(t):(this.selected.includes(nt(t))?this.emptySelected():(this.emptySelected(),this.addToSelected(t)),this.close()),this.dispatchEvent(new CustomEvent("date-selected",{detail:this.selected,bubbles:!0,composed:!0})),Promise.resolve()}focusOnCurrentDate(){const t=nt(Ns(new Date)),e=this.querySelector(`button[data-date="${t}"]`);if(e instanceof HTMLButtonElement)this.focusedDate=t,e.focus();else{const i=this.selectableDates.find(a=>!a.isDisabled);if(i){const a=this.querySelector(`button[data-date="${i.currentDateISO}"]`);a instanceof HTMLButtonElement&&(this.focusedDate=i.currentDateISO,a.focus())}}}closeEvent(t){!this.contains(t.relatedTarget)&&!t.target.classList.contains("pkt-hide")&&this.close()}close(){this.dispatchEvent(new CustomEvent("close",{detail:!0,bubbles:!0,composed:!0}))}};G([o({type:Boolean})],K.prototype,"multiple",2),G([o({type:Number})],K.prototype,"maxMultiple",2),G([o({type:Boolean})],K.prototype,"range",2),G([o({type:Boolean})],K.prototype,"weeknumbers",2),G([o({type:Boolean})],K.prototype,"withcontrols",2),G([o({converter:Qe.csvToArray})],K.prototype,"selected",2),G([o({type:String})],K.prototype,"earliest",2),G([o({type:String})],K.prototype,"latest",2),G([o({converter:Qe.stringsToDate})],K.prototype,"excludedates",2),G([o({converter:Qe.csvToArray})],K.prototype,"excludeweekdays",2),G([o({converter:Qe.stringToDate})],K.prototype,"currentmonth",2),G([o({type:Array})],K.prototype,"dayStrings",2),G([o({type:Array})],K.prototype,"dayStringsLong",2),G([o({type:Array})],K.prototype,"monthStrings",2),G([o({type:String})],K.prototype,"weekString",2),G([o({type:String})],K.prototype,"prevMonthString",2),G([o({type:String})],K.prototype,"nextMonthString",2),G([o({type:Array})],K.prototype,"_selected",2),G([o({type:Number})],K.prototype,"year",2),G([o({type:Number})],K.prototype,"month",2),G([o({type:Number})],K.prototype,"week",2),G([o({type:Date})],K.prototype,"rangeHovered",2),G([V()],K.prototype,"inRange",2),G([V()],K.prototype,"focusedDate",2),G([V()],K.prototype,"selectableDates",2),G([V()],K.prototype,"currentmonthtouched",2),G([V()],K.prototype,"tabIndexSet",2),K=G([j("pkt-calendar")],K);const il={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},ai={props:il};var al=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,te=(s,t,e,i)=>{for(var a=i>1?void 0:i?nl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&al(t,e,a),a};let Gt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.closeTag=ai.props.closeTag.default,this.size=ai.props.size.default,this.skin=ai.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=ai.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!1,composed:!0}))},this.slotController=new at(this,this.defaultSlot),this._isClosed=!1}firstUpdated(t){var e,i;if(super.firstUpdated(t),this.closeTag&&!this.ariaLabel){const a=(i=(e=this.defaultSlot.value)==null?void 0:e.textContent)==null?void 0:i.trim();a&&(this._ariaDescription=`Klikk for å fjerne ${a}`)}}render(){const t={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},e={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?u`
320
320
  <button
321
321
  class=${M(e)}
322
322
  type=${this.type}
@@ -341,7 +341,7 @@
341
341
  ></pkt-icon>`}
342
342
  <span ${E(this.defaultSlot)}></span>
343
343
  </span>
344
- `}};te([o({type:Boolean,reflect:!0})],Gt.prototype,"closeTag",2),te([o({type:String,reflect:!0})],Gt.prototype,"size",2),te([o({type:String,reflect:!0})],Gt.prototype,"skin",2),te([o({type:String,reflect:!0})],Gt.prototype,"textStyle",2),te([o({type:String,reflect:!0})],Gt.prototype,"iconName",2),te([o({type:String})],Gt.prototype,"type",2),te([o({type:String})],Gt.prototype,"ariaLabel",2),te([V()],Gt.prototype,"_isClosed",2),te([V()],Gt.prototype,"_ariaDescription",2),Gt=te([j("pkt-tag")],Gt);var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,As=(s,t,e,i)=>{for(var a=i>1?void 0:i?ol(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&rl(t,e,a),a};let Pe=class extends Ys{constructor(){super(...arguments),this.size=void 0,this.level=2,this.visuallyHidden=!1,this.align=void 0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="level"&&i&&this.setLevel(Number(i)),t==="visuallyHidden"&&(this.visuallyHidden=i!==null&&i!=="false"),(t==="size"||t==="visuallyHidden"||t==="align")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&(this.setLevel(this.level),this.hasAttribute("size")||(this.size=this.defaultSizeForLevel)),!this.hasAttribute("size")&&(t.has("level")||this.size===void 0)&&(this.size=this.defaultSizeForLevel),(t.has("size")||t.has("visuallyHidden")||t.has("align"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}get defaultSizeForLevel(){switch(this.level){case 1:return"xlarge";case 2:return"large";case 3:return"medium";case 4:return"small";case 5:return"xsmall";case 6:return"xsmall";default:return"medium"}}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return u`<slot></slot>`}};As([o({type:String,reflect:!0})],Pe.prototype,"size",2),As([o({type:Number,reflect:!0})],Pe.prototype,"level",2),As([o({type:Boolean,reflect:!0})],Pe.prototype,"visuallyHidden",2),As([o({type:String,reflect:!0})],Pe.prototype,"align",2),Pe=As([j("pkt-heading")],Pe);const ll={layout:{default:"vertical"},skin:{type:["outlined","outlined-beige","gray","blue","beige","green"],default:"outlined"},padding:{default:"default"}},ts={props:ll};var hl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,gt=(s,t,e,i)=>{for(var a=i>1?void 0:i?dl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&hl(t,e,a),a};let ht=class extends Y{constructor(){super(),this.defaultSlot=A(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=ts.props.layout.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=ts.props.padding.default,this.skin=ts.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var t,e;const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},a=((t=this.ariaLabel)==null?void 0:t.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),n=((e=this.ariaLabel)==null?void 0:e.trim())||(this.heading?this.heading:"kort");return u`
344
+ `}};te([o({type:Boolean,reflect:!0})],Gt.prototype,"closeTag",2),te([o({type:String,reflect:!0})],Gt.prototype,"size",2),te([o({type:String,reflect:!0})],Gt.prototype,"skin",2),te([o({type:String,reflect:!0})],Gt.prototype,"textStyle",2),te([o({type:String,reflect:!0})],Gt.prototype,"iconName",2),te([o({type:String})],Gt.prototype,"type",2),te([o({type:String})],Gt.prototype,"ariaLabel",2),te([V()],Gt.prototype,"_isClosed",2),te([V()],Gt.prototype,"_ariaDescription",2),Gt=te([j("pkt-tag")],Gt);var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,ts=(s,t,e,i)=>{for(var a=i>1?void 0:i?ol(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&rl(t,e,a),a};let ye=class extends Ys{constructor(){super(...arguments),this.size=void 0,this.level=2,this.weight=void 0,this.visuallyHidden=!1,this.align=void 0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="level"&&i&&this.setLevel(Number(i)),t==="visuallyHidden"&&(this.visuallyHidden=i!==null&&i!=="false"),(t==="size"||t==="visuallyHidden"||t==="align"||t==="weight")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&(this.setLevel(this.level),this.hasAttribute("size")||(this.size=this.defaultSizeForLevel),this.hasAttribute("weight")||(this.weight=this.defaultWeightForLevel)),!this.hasAttribute("size")&&(t.has("level")||this.size===void 0)&&(this.size=this.defaultSizeForLevel),(t.has("size")||t.has("visuallyHidden")||t.has("align")||t.has("weight"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}get defaultSizeForLevel(){switch(this.level){case 1:return"xlarge";case 2:return"large";case 3:return"medium";case 4:return"small";case 5:return"xsmall";case 6:return"xsmall";default:return"medium"}}get defaultWeightForLevel(){switch(this.level){case 1:return"regular";case 2:return"regular";case 3:return"medium";case 4:return"medium";case 5:return"medium";case 6:return"medium";default:return"medium"}}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end","pkt-heading--light","pkt-heading--regular","pkt-heading--medium","pkt-heading--bold"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.weight&&this.classList.add(`pkt-heading--fw-${this.weight}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return u`<slot></slot>`}};ts([o({type:String,reflect:!0})],ye.prototype,"size",2),ts([o({type:Number,reflect:!0})],ye.prototype,"level",2),ts([o({type:String,reflect:!0})],ye.prototype,"weight",2),ts([o({type:Boolean,reflect:!0})],ye.prototype,"visuallyHidden",2),ts([o({type:String,reflect:!0})],ye.prototype,"align",2),ye=ts([j("pkt-heading")],ye);const ll={layout:{default:"vertical"},skin:{type:["outlined","outlined-beige","gray","blue","beige","green"],default:"outlined"},padding:{default:"default"}},es={props:ll};var hl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,gt=(s,t,e,i)=>{for(var a=i>1?void 0:i?dl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&hl(t,e,a),a};let ht=class extends Y{constructor(){super(),this.defaultSlot=A(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=es.props.layout.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=es.props.padding.default,this.skin=es.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var t,e;const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},a=((t=this.ariaLabel)==null?void 0:t.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),n=((e=this.ariaLabel)==null?void 0:e.trim())||(this.heading?this.heading:"kort");return u`
345
345
  <article
346
346
  class=${M(i)}
347
347
  aria-label=${S(this.clickCardLink?a:n)}
@@ -368,6 +368,7 @@
368
368
  .level=${this.headinglevel||3}
369
369
  size="medium"
370
370
  nospacing
371
+ weight="regular"
371
372
  >
372
373
  ${this.heading}
373
374
  </pkt-heading>
@@ -378,6 +379,7 @@
378
379
  class="pkt-card__link-heading pkt-card__heading"
379
380
  .level=${this.headinglevel||3}
380
381
  size="medium"
382
+ weight="regular"
381
383
  nospacing
382
384
  >
383
385
  <a
@@ -427,11 +429,11 @@
427
429
  ${this.metaTrail?u`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>`:$}
428
430
  </footer>
429
431
  `:$}
430
- `}};gt([o({type:String})],ht.prototype,"ariaLabel",2),gt([o({type:String})],ht.prototype,"metaLead",2),gt([o({type:Boolean})],ht.prototype,"borderOnHover",2),gt([o({type:String,reflect:!0})],ht.prototype,"clickCardLink",2),gt([o({type:String})],ht.prototype,"metaTrail",2),gt([o({type:String})],ht.prototype,"layout",2),gt([o({type:String})],ht.prototype,"heading",2),gt([o({type:Number})],ht.prototype,"headinglevel",2),gt([o({type:Object})],ht.prototype,"image",2),gt([o({type:String})],ht.prototype,"imageShape",2),gt([o({type:Boolean})],ht.prototype,"openLinkInNewTab",2),gt([o({type:String})],ht.prototype,"padding",2),gt([o({type:String,converter:{fromAttribute:s=>{const t=ts.props.skin.type;return s&&t.includes(s)?s:(s&&!t.includes(s)&&console.warn(`Invalid skin value "${s}". Using default skin "${ts.props.skin.default}".`),ts.props.skin.default)},toAttribute:s=>s}})],ht.prototype,"skin",2),gt([o({type:String})],ht.prototype,"subheading",2),gt([o({type:String})],ht.prototype,"tagPosition",2),gt([o({type:Array})],ht.prototype,"tags",2),ht=gt([j("pkt-card")],ht);/**
432
+ `}};gt([o({type:String})],ht.prototype,"ariaLabel",2),gt([o({type:String})],ht.prototype,"metaLead",2),gt([o({type:Boolean})],ht.prototype,"borderOnHover",2),gt([o({type:String,reflect:!0})],ht.prototype,"clickCardLink",2),gt([o({type:String})],ht.prototype,"metaTrail",2),gt([o({type:String})],ht.prototype,"layout",2),gt([o({type:String})],ht.prototype,"heading",2),gt([o({type:Number})],ht.prototype,"headinglevel",2),gt([o({type:Object})],ht.prototype,"image",2),gt([o({type:String})],ht.prototype,"imageShape",2),gt([o({type:Boolean})],ht.prototype,"openLinkInNewTab",2),gt([o({type:String})],ht.prototype,"padding",2),gt([o({type:String,converter:{fromAttribute:s=>{const t=es.props.skin.type;return s&&t.includes(s)?s:(s&&!t.includes(s)&&console.warn(`Invalid skin value "${s}". Using default skin "${es.props.skin.default}".`),es.props.skin.default)},toAttribute:s=>s}})],ht.prototype,"skin",2),gt([o({type:String})],ht.prototype,"subheading",2),gt([o({type:String})],ht.prototype,"tagPosition",2),gt([o({type:Array})],ht.prototype,"tags",2),ht=gt([j("pkt-card")],ht);/**
431
433
  * @license
432
434
  * Copyright 2017 Google LLC
433
435
  * SPDX-License-Identifier: BSD-3-Clause
434
- */const za=(s,t,e)=>{const i=new Map;for(let a=t;a<=e;a++)i.set(s[a],a);return i},Ei=Se(class extends Ge{constructor(s){if(super(s),s.type!==Rt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const a=[],n=[];let r=0;for(const h of s)a[r]=i?i(h,r):r,n[r]=e(h,r),r++;return{values:n,keys:a}}render(s,t,e){return this.dt(s,t,e).values}update(s,[t,e,i]){const a=pr(s),{values:n,keys:r}=this.dt(t,e,i);if(!Array.isArray(a))return this.ut=r,n;const h=this.ut??(this.ut=[]),d=[];let p,f,g=0,k=a.length-1,b=0,y=n.length-1;for(;g<=k&&b<=y;)if(a[g]===null)g++;else if(a[k]===null)k--;else if(h[g]===r[b])d[b]=Ce(a[g],n[b]),g++,b++;else if(h[k]===r[y])d[y]=Ce(a[k],n[y]),k--,y--;else if(h[g]===r[y])d[y]=Ce(a[g],n[y]),bs(s,d[y+1],a[g]),g++,y--;else if(h[k]===r[b])d[b]=Ce(a[k],n[b]),bs(s,a[g],a[k]),k--,b++;else if(p===void 0&&(p=za(r,b,y),f=za(h,g,k)),p.has(h[g]))if(p.has(h[k])){const w=f.get(r[b]),C=w!==void 0?a[w]:null;if(C===null){const P=bs(s,a[g]);Ce(P,n[b]),d[b]=P}else d[b]=Ce(C,n[b]),bs(s,a[g],C),a[w]=null;b++}else ki(a[k]),k--;else ki(a[g]),g++;for(;b<=y;){const w=bs(s,d[y+1]);Ce(w,n[b]),d[b++]=w}for(;g<=k;){const w=a[g++];w!==null&&ki(w)}return this.ut=r,ya(s,d),xt}}),Wa=()=>("00000000000000000"+(Math.random()*18446744073709552e3).toString(16)).slice(-16),cl=s=>new Promise(t=>setTimeout(t,s)),ye=()=>{const s=Wa(),t=Wa();return s.slice(0,8)+"-"+s.slice(8,12)+"-4"+s.slice(13)+"-a"+t.slice(1,4)+"-"+t.slice(4)},pl={helptextDropdownButton:{default:"Les mer <span class='pkt-sr-only'>om feltet</span>"},counter:{default:!1},optionalTag:{default:!1},optionalText:{default:"Valgfritt"},requiredTag:{default:!1},requiredText:{default:"Må fylles ut"},hasError:{default:!1},disabled:{default:!1},inline:{default:!1},hasFieldset:{default:!1},useWrapper:{default:!0}},Mt={props:pl};var ul={},Ra;function fl(){return Ra||(Ra=1,(function(){(function(s){const t=new WeakMap,e=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,k=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,C={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},P=(m,c)=>{for(let v in C){c[v]=null;let _=null;const L=C[v];Object.defineProperty(c,v,{get(){return _},set(U){_=U,m.isConnected?rt(m,L,U):f.set(m,c)}})}};function T(m){const c=a.get(m),{form:v}=c;ce(m,v,c),At(m,c.labels)}const I=(m,c=!1)=>{const v=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT,{acceptNode(U){return a.has(U)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let _=v.nextNode();const L=!c||m.disabled;for(;_;)_.formDisabledCallback&&L&&Ft(_,m.disabled),_=v.nextNode()},N={attributes:!0,attributeFilter:["disabled","name"]},W=pe()?new MutationObserver(m=>{for(const c of m){const v=c.target;if(c.attributeName==="disabled"&&(v.constructor.formAssociated?Ft(v,v.hasAttribute("disabled")):v.localName==="fieldset"&&I(v)),c.attributeName==="name"&&v.constructor.formAssociated){const _=a.get(v),L=p.get(v);_.setFormValue(L)}}}):{};function Z(m){m.forEach(c=>{const{addedNodes:v,removedNodes:_}=c,L=Array.from(v),U=Array.from(_);L.forEach(q=>{var jt;if(a.has(q)&&q.constructor.formAssociated&&T(q),f.has(q)){const yt=f.get(q);Object.keys(C).filter(Ht=>yt[Ht]!==null).forEach(Ht=>{rt(q,C[Ht],yt[Ht])}),f.delete(q)}if(w.has(q)){const yt=w.get(q);rt(q,"internals-valid",yt.validity.valid.toString()),rt(q,"internals-invalid",(!yt.validity.valid).toString()),rt(q,"aria-invalid",(!yt.validity.valid).toString()),w.delete(q)}if(q.localName==="form"){const yt=d.get(q),Ht=document.createTreeWalker(q,NodeFilter.SHOW_ELEMENT,{acceptNode(zi){return a.has(zi)&&zi.constructor.formAssociated&&!(yt&&yt.has(zi))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let js=Ht.nextNode();for(;js;)T(js),js=Ht.nextNode()}q.localName==="fieldset"&&((jt=W.observe)===null||jt===void 0||jt.call(W,q,N),I(q,!0))}),U.forEach(q=>{const jt=a.get(q);jt&&i.get(jt)&&Vt(jt),h.has(q)&&h.get(q).disconnect()})})}function wt(m){m.forEach(c=>{const{removedNodes:v}=c;v.forEach(_=>{const L=b.get(c.target);a.has(_)&&qe(_),L.disconnect()})})}const bt=m=>{var c,v;const _=new MutationObserver(wt);!((c=window==null?void 0:window.ShadyDOM)===null||c===void 0)&&c.inUse&&m.mode&&m.host&&(m=m.host),(v=_.observe)===null||v===void 0||v.call(_,m,{childList:!0}),b.set(m,_)};pe()&&new MutationObserver(Z);const Q={childList:!0,subtree:!0},rt=(m,c,v)=>{m.getAttribute(c)!==v&&m.setAttribute(c,v)},Ft=(m,c)=>{m.toggleAttribute("internals-disabled",c),c?rt(m,"aria-disabled","true"):m.removeAttribute("aria-disabled"),m.formDisabledCallback&&m.formDisabledCallback.apply(m,[c])},Vt=m=>{i.get(m).forEach(c=>{c.remove()}),i.set(m,[])},ot=(m,c)=>{const v=document.createElement("input");return v.type="hidden",v.name=m.getAttribute("name"),m.after(v),i.get(c).push(v),v},F=(m,c)=>{var v;i.set(c,[]),(v=W.observe)===null||v===void 0||v.call(W,m,N)},At=(m,c)=>{if(c.length){Array.from(c).forEach(_=>_.addEventListener("click",m.click.bind(m)));let v=c[0].id;c[0].id||(v=`${c[0].htmlFor}_Label`,c[0].id=v),rt(m,"aria-labelledby",v)}},ae=m=>{const c=Array.from(m.elements).filter(U=>!U.tagName.includes("-")&&U.validity).map(U=>U.validity.valid),v=d.get(m)||[],_=Array.from(v).filter(U=>U.isConnected).map(U=>a.get(U).validity.valid),L=[...c,..._].includes(!1);m.toggleAttribute("internals-invalid",L),m.toggleAttribute("internals-valid",!L)},de=m=>{ae(zt(m.target))},ne=m=>{ae(zt(m.target))},He=m=>{const c=["button[type=submit]","input[type=submit]","button:not([type])"].map(v=>`${v}:not([disabled])`).map(v=>`${v}:not([form])${m.id?`,${v}[form='${m.id}']`:""}`).join(",");m.addEventListener("click",v=>{if(v.target.closest(c)){const _=d.get(m);if(m.noValidate)return;_.size&&Array.from(_).reverse().map(L=>a.get(L).reportValidity()).includes(!1)&&v.preventDefault()}})},hs=m=>{const c=d.get(m.target);c&&c.size&&c.forEach(v=>{v.constructor.formAssociated&&v.formResetCallback&&v.formResetCallback.apply(v)})},ce=(m,c,v)=>{if(c){const _=d.get(c);if(_)_.add(m);else{const L=new Set;L.add(m),d.set(c,L),He(c),c.addEventListener("reset",hs),c.addEventListener("input",de),c.addEventListener("change",ne)}r.set(c,{ref:m,internals:v}),m.constructor.formAssociated&&m.formAssociatedCallback&&setTimeout(()=>{m.formAssociatedCallback.apply(m,[c])},0),ae(c)}},zt=m=>{let c=m.parentNode;return c&&c.tagName!=="FORM"&&(c=zt(c)),c},ut=(m,c,v=DOMException)=>{if(!m.constructor.formAssociated)throw new v(c)},Ue=(m,c,v)=>{const _=d.get(m);return _&&_.size&&_.forEach(L=>{a.get(L)[v]()||(c=!1)}),c},qe=m=>{if(m.constructor.formAssociated){const c=a.get(m),{labels:v,form:_}=c;At(m,v),ce(m,_,c)}};function pe(){return typeof MutationObserver<"u"}class ji{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const hi=m=>(m.badInput=!1,m.customError=!1,m.patternMismatch=!1,m.rangeOverflow=!1,m.rangeUnderflow=!1,m.stepMismatch=!1,m.tooLong=!1,m.tooShort=!1,m.typeMismatch=!1,m.valid=!0,m.valueMissing=!1,m),Hi=(m,c,v)=>(m.valid=di(c),Object.keys(c).forEach(_=>m[_]=c[_]),v&&ae(v),m),di=m=>{let c=!0;for(let v in m)v!=="valid"&&m[v]!==!1&&(c=!1);return c},ds=new WeakMap;function cs(m,c){m.toggleAttribute(c,!0),m.part&&m.part.add(c)}class Vs extends Set{static get isPolyfilled(){return!0}constructor(c){if(super(),!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");ds.set(this,c)}add(c){if(!/^--/.test(c)||typeof c!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${c} must start with '--'.`);const v=super.add(c),_=ds.get(this),L=`state${c}`;return _.isConnected?cs(_,L):setTimeout(()=>{cs(_,L)}),v}clear(){for(let[c]of this.entries())this.delete(c);super.clear()}delete(c){const v=super.delete(c),_=ds.get(this);return _.isConnected?(_.toggleAttribute(`state${c}`,!1),_.part&&_.part.remove(`state${c}`)):setTimeout(()=>{_.toggleAttribute(`state${c}`,!1),_.part&&_.part.remove(`state${c}`)}),v}}function ci(m,c,v,_){if(typeof c=="function"?m!==c||!_:!c.has(m))throw new TypeError("Cannot read private member from an object whose class did not declare it");return v==="m"?_:v==="a"?_.call(m):_?_.value:c.get(m)}function Ui(m,c,v,_,L){if(typeof c=="function"?m!==c||!0:!c.has(m))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c.set(m,v),v}var $e;class pi{constructor(c){$e.set(this,void 0),Ui(this,$e,c);for(let v=0;v<c.length;v++){let _=c[v];this[v]=_,_.hasAttribute("name")&&(this[_.getAttribute("name")]=_)}Object.freeze(this)}get length(){return ci(this,$e,"f").length}[($e=new WeakMap,Symbol.iterator)](){return ci(this,$e,"f")[Symbol.iterator]()}item(c){return this[c]==null?null:this[c]}namedItem(c){return this[c]==null?null:this[c]}}function ui(){const m=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=v;const c=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=_;function v(...U){let q=m.apply(this,U);return Ue(this,q,"checkValidity")}function _(...U){let q=c.apply(this,U);return Ue(this,q,"reportValidity")}const{get:L}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...U){const q=L.call(this,...U),jt=Array.from(d.get(this)||[]);if(jt.length===0)return q;const yt=Array.from(q).concat(jt).sort((Ht,js)=>Ht.compareDocumentPosition?Ht.compareDocumentPosition(js)&2?1:-1:0);return new pi(yt)}})}class Cn{static get isPolyfilled(){return!0}constructor(c){if(!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const v=c.getRootNode(),_=new ji;this.states=new Vs(c),t.set(this,c),e.set(this,_),a.set(c,this),P(c,this),F(c,this),Object.seal(this),v instanceof DocumentFragment&&bt(v)}checkValidity(){const c=t.get(this);if(ut(c,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const v=e.get(this);if(!v.valid){const _=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});c.dispatchEvent(_)}return v.valid}get form(){const c=t.get(this);ut(c,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let v;return c.constructor.formAssociated===!0&&(v=zt(c)),v}get labels(){const c=t.get(this);ut(c,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const v=c.getAttribute("id"),_=c.getRootNode();return _&&v?_.querySelectorAll(`[for="${v}"]`):[]}reportValidity(){const c=t.get(this);if(ut(c,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const v=this.checkValidity(),_=k.get(this);if(_&&!c.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!v&&_&&(c.focus(),_.focus()),v}setFormValue(c){const v=t.get(this);if(ut(v,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Vt(this),c!=null&&!(c instanceof FormData)){if(v.getAttribute("name")){const _=ot(v,this);_.value=c}}else c!=null&&c instanceof FormData&&Array.from(c).reverse().forEach(([_,L])=>{if(typeof L=="string"){const U=ot(v,this);U.name=_,U.value=L}});p.set(v,c)}setValidity(c,v,_){const L=t.get(this);if(ut(L,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!c)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");k.set(this,_);const U=e.get(this),q={};for(const Ht in c)q[Ht]=c[Ht];Object.keys(q).length===0&&hi(U);const jt=Object.assign(Object.assign({},U),q);delete jt.valid;const{valid:yt}=Hi(U,jt,this.form);if(!yt&&!v)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");n.set(this,yt?"":v),L.isConnected?(L.toggleAttribute("internals-invalid",!yt),L.toggleAttribute("internals-valid",yt),rt(L,"aria-invalid",`${!yt}`)):w.set(L,this)}get shadowRoot(){const c=t.get(this);return g.get(c)||null}get validationMessage(){const c=t.get(this);return ut(c,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),n.get(this)}get validity(){const c=t.get(this);return ut(c,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),e.get(this)}get willValidate(){const c=t.get(this);return ut(c,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(c.disabled||c.hasAttribute("disabled")||c.hasAttribute("readonly"))}}function md(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class m extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const c=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(c,m);const v=new m;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(_=>_ in v.internals)}let Tn=!1,Nn=!1;function qi(m){Nn||(Nn=!0,window.CustomStateSet=Vs,m&&(HTMLElement.prototype.attachInternals=function(...c){const v=m.call(this,c);return v.states=new Vs(this),v}))}function An(m=!0){if(!Tn){if(Tn=!0,typeof window<"u"&&(window.ElementInternals=Cn),typeof CustomElementRegistry<"u"){const c=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(v,_,L){if(_.formAssociated){const U=_.prototype.connectedCallback;_.prototype.connectedCallback=function(){y.has(this)||(y.set(this,!0),this.hasAttribute("disabled")&&Ft(this,!0)),U!=null&&U.apply(this),qe(this)}}c.call(this,v,_,L)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(a.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Cn(this)}),typeof Element<"u"){let c=function(..._){const L=v.apply(this,_);if(g.set(this,L),pe()){const U=new MutationObserver(Z);window.ShadyDOM?U.observe(this,Q):U.observe(L,Q),h.set(this,U)}return L};const v=Element.prototype.attachShadow;Element.prototype.attachShadow=c}pe()&&typeof document<"u"&&new MutationObserver(Z).observe(document.documentElement,Q),typeof HTMLFormElement<"u"&&ui(),(m||typeof window<"u"&&!window.CustomStateSet)&&qi()}}return customElements.polyfillWrapFlushCallback||(md()?typeof window<"u"&&!window.CustomStateSet&&qi(HTMLElement.prototype.attachInternals):An(!1)),s.forceCustomStateSetPolyfill=qi,s.forceElementInternalsPolyfill=An,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})()),ul}fl();var gl=Object.defineProperty,H=(s,t,e,i)=>{for(var a=void 0,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=r(t,e,a)||a);return a&&gl(t,e,a),a};const ml={fromAttribute(s){return s==null?!1:s===""||s==="true"||s===!0?!0:s==="false"||s===!1?!1:!!s},toAttribute(s){return s?"true":"false"}};let D=class extends Y{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=ye(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Mt.props.helptextDropdownButton.default,this.label=null,this.optionalText=_t.forms.labels.optional,this.requiredText=_t.forms.labels.required,this.tagText=null,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var e,i,a,n,r,h,d,p,f,g,k;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},_t.forms.messages.required,t):(e=t.validity)!=null&&e.typeMismatch||(i=t.validity)!=null&&i.badInput?this.internals.setValidity({typeMismatch:!0},_t.forms.messages.invalid,t):(a=t.validity)!=null&&a.patternMismatch?this.internals.setValidity({patternMismatch:!0},_t.forms.messages.invalidPattern,t):(n=t.validity)!=null&&n.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},_t.forms.messages.tooShort,t):(r=t.validity)!=null&&r.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},_t.forms.messages.tooLong,t):(h=t.validity)!=null&&h.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?_t.forms.messages.rangeUnderflowMin.replace("{min}",(d=this.min)==null?void 0:d.toString()):_t.forms.messages.rangeUnderflow,t):(p=t.validity)!=null&&p.stepMismatch?this.internals.setValidity({stepMismatch:!0},_t.forms.messages.invalid,t):(f=t.validity)!=null&&f.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?_t.forms.messages.rangeOverflowMax.replace("{max}",(g=this.max)==null?void 0:g.toString()):_t.forms.messages.rangeOverflow,t):(k=t.validity)!=null&&k.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(i=>{e.append(this.name,i)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const e=this.internals.form||this.closest("form"),i=e?new FormData(e):null;e&&e.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(a=>{const n=a;n.name===this.name&&n.value!==this.value&&n.checked&&(n.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),i&&i.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),i&&i.delete(this.name),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,e){(e!==this.value||e!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})))}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(t=>{"selected"in t&&(t.selected=!1)}),this.checked!==void 0?(this.checked=!1,this.internals.ariaChecked=!1,this.internals.setFormValue("",""),this.inputRef.value.checked=!1,this.valueChecked(this.checked)):(this.internals.setFormValue(""),this.value=this.defaultValue||(this.multiple||this.range?[]:""),this._value=this.value,this.valueChanged(this.value,null)),this.internals.ariaInvalid=!1}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),!this.form){const e=this.internals.form||this.closest("form");this.form=e}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const e=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=e,this.internals.setFormValue(e?this.value||"on":"",e?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}};H([o()],D.prototype,"defaultValue"),H([o({type:Boolean,reflect:!0})],D.prototype,"disabled"),H([o({type:Boolean,reflect:!0})],D.prototype,"readonly"),H([o({type:Boolean,reflect:!0})],D.prototype,"required"),H([o({type:Number,reflect:!0})],D.prototype,"max"),H([o({type:Number,reflect:!0})],D.prototype,"maxlength"),H([o({type:Number,reflect:!0})],D.prototype,"min"),H([o({type:Number,reflect:!0})],D.prototype,"minlength"),H([o({type:Number,reflect:!0})],D.prototype,"step"),H([o({type:String})],D.prototype,"ariaDescribedBy"),H([o({type:String})],D.prototype,"ariaLabelledby"),H([o({type:String,reflect:!0})],D.prototype,"name"),H([o({type:String,reflect:!0})],D.prototype,"pattern"),H([o({type:String,reflect:!0})],D.prototype,"placeholder"),H([o({type:String,reflect:!0})],D.prototype,"id"),H([o({type:Boolean})],D.prototype,"counter"),H([o({type:Boolean})],D.prototype,"hasError"),H([o({type:Boolean})],D.prototype,"inline"),H([o({type:Boolean})],D.prototype,"hasFieldset"),H([o({type:Boolean})],D.prototype,"optionalTag"),H([o({type:Boolean})],D.prototype,"requiredTag"),H([o({type:Boolean})],D.prototype,"skipForwardTestid"),H([o({type:Boolean,reflect:!0,converter:ml})],D.prototype,"useWrapper"),H([o({type:Boolean,reflect:!0})],D.prototype,"fullwidth"),H([o({type:Number})],D.prototype,"counterMaxLength"),H([o({type:String})],D.prototype,"errorMessage"),H([o({type:String})],D.prototype,"helptext"),H([o({type:String})],D.prototype,"helptextDropdown"),H([o({type:String,reflect:!1})],D.prototype,"helptextDropdownButton"),H([o({type:String})],D.prototype,"label"),H([o({type:String,reflect:!1})],D.prototype,"optionalText"),H([o({type:String,reflect:!1})],D.prototype,"requiredText"),H([o({type:String,reflect:!1})],D.prototype,"tagText"),H([o({type:String,attribute:"data-testid"})],D.prototype,"dataTestid"),H([V()],D.prototype,"touched");let Ka=class{constructor(t){this.nodes=[],this.options=[],this.host=t,this.host.addController(this),this.nodes=[],this.options=[],this.observer=new MutationObserver(e=>this.handleMutations(e))}hostConnected(){Array.from(this.host.childNodes).forEach(t=>{(t.nodeName==="OPTION"||t.nodeName==="DATA")&&this.addNode(t)}),this.observer.observe(this.host,{childList:!0,subtree:!1,attributes:!0})}hostDisconnected(){this.observer.disconnect()}addNode(t){(t.nodeName==="OPTION"||t.nodeName==="DATA")&&(t.hasAttribute("hidden")&&!t.hasAttribute("data-skip")&&t.setAttribute("data-hidden","true"),!t.hasAttribute("hidden")&&t.hasAttribute("data-skip")&&t.hasAttribute("data-hidden")&&t.removeAttribute("data-hidden"),t.setAttribute("class","pkt-hide"),t.setAttribute("data-skip","true"),t.setAttribute("hidden","true"),this.nodes.push(t))}createOptions(){this.options=this.nodes.map(t=>({value:t.hasAttribute("value")?t.getAttribute("value")??"":t.textContent??"",label:t.textContent||t.getAttribute("value")||"",selected:t.hasAttribute("selected"),disabled:t.hasAttribute("disabled"),hidden:t.hasAttribute("data-hidden")})),this.host.setAttribute("options",JSON.stringify(this.options))}handleMutations(t){let e=!1;t.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(a=>{Ye(a)&&(this.addNode(a),e=!0)}),i.removedNodes.forEach(a=>{Ye(a)&&(this.nodes=this.nodes.filter(n=>n!==a),e=!0)})),i.type==="attributes"&&Ye(i.target)&&(this.addNode(i.target),e=!0)}),e&&this.createOptions()}};var vl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,Oe=(s,t,e,i)=>{for(var a=i>1?void 0:i?bl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&vl(t,e,a),a};let oe=class extends Y{constructor(){super(),this.defaultSlot=A(),this.forId=ye(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Mt.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new at(this,this.defaultSlot)}updateSlots(t){this.filledSlots=new Set(t)}render(){const t=()=>{const a=!this.isHelpTextOpen;this.isHelpTextOpen=a,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:a}}))},e=M({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),i=()=>this.helptextDropdown?u`<div class="pkt-inputwrapper__helptext-expandable">
436
+ */const za=(s,t,e)=>{const i=new Map;for(let a=t;a<=e;a++)i.set(s[a],a);return i},Ei=Ce(class extends Ge{constructor(s){if(super(s),s.type!==Rt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const a=[],n=[];let r=0;for(const h of s)a[r]=i?i(h,r):r,n[r]=e(h,r),r++;return{values:n,keys:a}}render(s,t,e){return this.dt(s,t,e).values}update(s,[t,e,i]){const a=pr(s),{values:n,keys:r}=this.dt(t,e,i);if(!Array.isArray(a))return this.ut=r,n;const h=this.ut??(this.ut=[]),d=[];let p,f,g=0,k=a.length-1,b=0,y=n.length-1;for(;g<=k&&b<=y;)if(a[g]===null)g++;else if(a[k]===null)k--;else if(h[g]===r[b])d[b]=Te(a[g],n[b]),g++,b++;else if(h[k]===r[y])d[y]=Te(a[k],n[y]),k--,y--;else if(h[g]===r[y])d[y]=Te(a[g],n[y]),ys(s,d[y+1],a[g]),g++,y--;else if(h[k]===r[b])d[b]=Te(a[k],n[b]),ys(s,a[g],a[k]),k--,b++;else if(p===void 0&&(p=za(r,b,y),f=za(h,g,k)),p.has(h[g]))if(p.has(h[k])){const w=f.get(r[b]),C=w!==void 0?a[w]:null;if(C===null){const P=ys(s,a[g]);Te(P,n[b]),d[b]=P}else d[b]=Te(C,n[b]),ys(s,a[g],C),a[w]=null;b++}else ki(a[k]),k--;else ki(a[g]),g++;for(;b<=y;){const w=ys(s,d[y+1]);Te(w,n[b]),d[b++]=w}for(;g<=k;){const w=a[g++];w!==null&&ki(w)}return this.ut=r,ya(s,d),xt}}),Wa=()=>("00000000000000000"+(Math.random()*18446744073709552e3).toString(16)).slice(-16),cl=s=>new Promise(t=>setTimeout(t,s)),ke=()=>{const s=Wa(),t=Wa();return s.slice(0,8)+"-"+s.slice(8,12)+"-4"+s.slice(13)+"-a"+t.slice(1,4)+"-"+t.slice(4)},pl={helptextDropdownButton:{default:"Les mer <span class='pkt-sr-only'>om feltet</span>"},counter:{default:!1},optionalTag:{default:!1},optionalText:{default:"Valgfritt"},requiredTag:{default:!1},requiredText:{default:"Må fylles ut"},hasError:{default:!1},disabled:{default:!1},inline:{default:!1},hasFieldset:{default:!1},useWrapper:{default:!0}},Mt={props:pl};var ul={},Ra;function fl(){return Ra||(Ra=1,(function(){(function(s){const t=new WeakMap,e=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,k=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,C={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},P=(m,c)=>{for(let v in C){c[v]=null;let _=null;const L=C[v];Object.defineProperty(c,v,{get(){return _},set(U){_=U,m.isConnected?rt(m,L,U):f.set(m,c)}})}};function T(m){const c=a.get(m),{form:v}=c;ce(m,v,c),At(m,c.labels)}const I=(m,c=!1)=>{const v=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT,{acceptNode(U){return a.has(U)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let _=v.nextNode();const L=!c||m.disabled;for(;_;)_.formDisabledCallback&&L&&Ft(_,m.disabled),_=v.nextNode()},N={attributes:!0,attributeFilter:["disabled","name"]},W=pe()?new MutationObserver(m=>{for(const c of m){const v=c.target;if(c.attributeName==="disabled"&&(v.constructor.formAssociated?Ft(v,v.hasAttribute("disabled")):v.localName==="fieldset"&&I(v)),c.attributeName==="name"&&v.constructor.formAssociated){const _=a.get(v),L=p.get(v);_.setFormValue(L)}}}):{};function Z(m){m.forEach(c=>{const{addedNodes:v,removedNodes:_}=c,L=Array.from(v),U=Array.from(_);L.forEach(q=>{var jt;if(a.has(q)&&q.constructor.formAssociated&&T(q),f.has(q)){const yt=f.get(q);Object.keys(C).filter(Ht=>yt[Ht]!==null).forEach(Ht=>{rt(q,C[Ht],yt[Ht])}),f.delete(q)}if(w.has(q)){const yt=w.get(q);rt(q,"internals-valid",yt.validity.valid.toString()),rt(q,"internals-invalid",(!yt.validity.valid).toString()),rt(q,"aria-invalid",(!yt.validity.valid).toString()),w.delete(q)}if(q.localName==="form"){const yt=d.get(q),Ht=document.createTreeWalker(q,NodeFilter.SHOW_ELEMENT,{acceptNode(zi){return a.has(zi)&&zi.constructor.formAssociated&&!(yt&&yt.has(zi))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let js=Ht.nextNode();for(;js;)T(js),js=Ht.nextNode()}q.localName==="fieldset"&&((jt=W.observe)===null||jt===void 0||jt.call(W,q,N),I(q,!0))}),U.forEach(q=>{const jt=a.get(q);jt&&i.get(jt)&&Vt(jt),h.has(q)&&h.get(q).disconnect()})})}function wt(m){m.forEach(c=>{const{removedNodes:v}=c;v.forEach(_=>{const L=b.get(c.target);a.has(_)&&qe(_),L.disconnect()})})}const bt=m=>{var c,v;const _=new MutationObserver(wt);!((c=window==null?void 0:window.ShadyDOM)===null||c===void 0)&&c.inUse&&m.mode&&m.host&&(m=m.host),(v=_.observe)===null||v===void 0||v.call(_,m,{childList:!0}),b.set(m,_)};pe()&&new MutationObserver(Z);const Q={childList:!0,subtree:!0},rt=(m,c,v)=>{m.getAttribute(c)!==v&&m.setAttribute(c,v)},Ft=(m,c)=>{m.toggleAttribute("internals-disabled",c),c?rt(m,"aria-disabled","true"):m.removeAttribute("aria-disabled"),m.formDisabledCallback&&m.formDisabledCallback.apply(m,[c])},Vt=m=>{i.get(m).forEach(c=>{c.remove()}),i.set(m,[])},ot=(m,c)=>{const v=document.createElement("input");return v.type="hidden",v.name=m.getAttribute("name"),m.after(v),i.get(c).push(v),v},F=(m,c)=>{var v;i.set(c,[]),(v=W.observe)===null||v===void 0||v.call(W,m,N)},At=(m,c)=>{if(c.length){Array.from(c).forEach(_=>_.addEventListener("click",m.click.bind(m)));let v=c[0].id;c[0].id||(v=`${c[0].htmlFor}_Label`,c[0].id=v),rt(m,"aria-labelledby",v)}},ae=m=>{const c=Array.from(m.elements).filter(U=>!U.tagName.includes("-")&&U.validity).map(U=>U.validity.valid),v=d.get(m)||[],_=Array.from(v).filter(U=>U.isConnected).map(U=>a.get(U).validity.valid),L=[...c,..._].includes(!1);m.toggleAttribute("internals-invalid",L),m.toggleAttribute("internals-valid",!L)},de=m=>{ae(zt(m.target))},ne=m=>{ae(zt(m.target))},He=m=>{const c=["button[type=submit]","input[type=submit]","button:not([type])"].map(v=>`${v}:not([disabled])`).map(v=>`${v}:not([form])${m.id?`,${v}[form='${m.id}']`:""}`).join(",");m.addEventListener("click",v=>{if(v.target.closest(c)){const _=d.get(m);if(m.noValidate)return;_.size&&Array.from(_).reverse().map(L=>a.get(L).reportValidity()).includes(!1)&&v.preventDefault()}})},ds=m=>{const c=d.get(m.target);c&&c.size&&c.forEach(v=>{v.constructor.formAssociated&&v.formResetCallback&&v.formResetCallback.apply(v)})},ce=(m,c,v)=>{if(c){const _=d.get(c);if(_)_.add(m);else{const L=new Set;L.add(m),d.set(c,L),He(c),c.addEventListener("reset",ds),c.addEventListener("input",de),c.addEventListener("change",ne)}r.set(c,{ref:m,internals:v}),m.constructor.formAssociated&&m.formAssociatedCallback&&setTimeout(()=>{m.formAssociatedCallback.apply(m,[c])},0),ae(c)}},zt=m=>{let c=m.parentNode;return c&&c.tagName!=="FORM"&&(c=zt(c)),c},ut=(m,c,v=DOMException)=>{if(!m.constructor.formAssociated)throw new v(c)},Ue=(m,c,v)=>{const _=d.get(m);return _&&_.size&&_.forEach(L=>{a.get(L)[v]()||(c=!1)}),c},qe=m=>{if(m.constructor.formAssociated){const c=a.get(m),{labels:v,form:_}=c;At(m,v),ce(m,_,c)}};function pe(){return typeof MutationObserver<"u"}class ji{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const hi=m=>(m.badInput=!1,m.customError=!1,m.patternMismatch=!1,m.rangeOverflow=!1,m.rangeUnderflow=!1,m.stepMismatch=!1,m.tooLong=!1,m.tooShort=!1,m.typeMismatch=!1,m.valid=!0,m.valueMissing=!1,m),Hi=(m,c,v)=>(m.valid=di(c),Object.keys(c).forEach(_=>m[_]=c[_]),v&&ae(v),m),di=m=>{let c=!0;for(let v in m)v!=="valid"&&m[v]!==!1&&(c=!1);return c},cs=new WeakMap;function ps(m,c){m.toggleAttribute(c,!0),m.part&&m.part.add(c)}class Vs extends Set{static get isPolyfilled(){return!0}constructor(c){if(super(),!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");cs.set(this,c)}add(c){if(!/^--/.test(c)||typeof c!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${c} must start with '--'.`);const v=super.add(c),_=cs.get(this),L=`state${c}`;return _.isConnected?ps(_,L):setTimeout(()=>{ps(_,L)}),v}clear(){for(let[c]of this.entries())this.delete(c);super.clear()}delete(c){const v=super.delete(c),_=cs.get(this);return _.isConnected?(_.toggleAttribute(`state${c}`,!1),_.part&&_.part.remove(`state${c}`)):setTimeout(()=>{_.toggleAttribute(`state${c}`,!1),_.part&&_.part.remove(`state${c}`)}),v}}function ci(m,c,v,_){if(typeof c=="function"?m!==c||!_:!c.has(m))throw new TypeError("Cannot read private member from an object whose class did not declare it");return v==="m"?_:v==="a"?_.call(m):_?_.value:c.get(m)}function Ui(m,c,v,_,L){if(typeof c=="function"?m!==c||!0:!c.has(m))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c.set(m,v),v}var _e;class pi{constructor(c){_e.set(this,void 0),Ui(this,_e,c);for(let v=0;v<c.length;v++){let _=c[v];this[v]=_,_.hasAttribute("name")&&(this[_.getAttribute("name")]=_)}Object.freeze(this)}get length(){return ci(this,_e,"f").length}[(_e=new WeakMap,Symbol.iterator)](){return ci(this,_e,"f")[Symbol.iterator]()}item(c){return this[c]==null?null:this[c]}namedItem(c){return this[c]==null?null:this[c]}}function ui(){const m=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=v;const c=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=_;function v(...U){let q=m.apply(this,U);return Ue(this,q,"checkValidity")}function _(...U){let q=c.apply(this,U);return Ue(this,q,"reportValidity")}const{get:L}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...U){const q=L.call(this,...U),jt=Array.from(d.get(this)||[]);if(jt.length===0)return q;const yt=Array.from(q).concat(jt).sort((Ht,js)=>Ht.compareDocumentPosition?Ht.compareDocumentPosition(js)&2?1:-1:0);return new pi(yt)}})}class Cn{static get isPolyfilled(){return!0}constructor(c){if(!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const v=c.getRootNode(),_=new ji;this.states=new Vs(c),t.set(this,c),e.set(this,_),a.set(c,this),P(c,this),F(c,this),Object.seal(this),v instanceof DocumentFragment&&bt(v)}checkValidity(){const c=t.get(this);if(ut(c,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const v=e.get(this);if(!v.valid){const _=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});c.dispatchEvent(_)}return v.valid}get form(){const c=t.get(this);ut(c,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let v;return c.constructor.formAssociated===!0&&(v=zt(c)),v}get labels(){const c=t.get(this);ut(c,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const v=c.getAttribute("id"),_=c.getRootNode();return _&&v?_.querySelectorAll(`[for="${v}"]`):[]}reportValidity(){const c=t.get(this);if(ut(c,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const v=this.checkValidity(),_=k.get(this);if(_&&!c.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!v&&_&&(c.focus(),_.focus()),v}setFormValue(c){const v=t.get(this);if(ut(v,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Vt(this),c!=null&&!(c instanceof FormData)){if(v.getAttribute("name")){const _=ot(v,this);_.value=c}}else c!=null&&c instanceof FormData&&Array.from(c).reverse().forEach(([_,L])=>{if(typeof L=="string"){const U=ot(v,this);U.name=_,U.value=L}});p.set(v,c)}setValidity(c,v,_){const L=t.get(this);if(ut(L,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!c)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");k.set(this,_);const U=e.get(this),q={};for(const Ht in c)q[Ht]=c[Ht];Object.keys(q).length===0&&hi(U);const jt=Object.assign(Object.assign({},U),q);delete jt.valid;const{valid:yt}=Hi(U,jt,this.form);if(!yt&&!v)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");n.set(this,yt?"":v),L.isConnected?(L.toggleAttribute("internals-invalid",!yt),L.toggleAttribute("internals-valid",yt),rt(L,"aria-invalid",`${!yt}`)):w.set(L,this)}get shadowRoot(){const c=t.get(this);return g.get(c)||null}get validationMessage(){const c=t.get(this);return ut(c,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),n.get(this)}get validity(){const c=t.get(this);return ut(c,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),e.get(this)}get willValidate(){const c=t.get(this);return ut(c,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(c.disabled||c.hasAttribute("disabled")||c.hasAttribute("readonly"))}}function md(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class m extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const c=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(c,m);const v=new m;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(_=>_ in v.internals)}let Tn=!1,Nn=!1;function qi(m){Nn||(Nn=!0,window.CustomStateSet=Vs,m&&(HTMLElement.prototype.attachInternals=function(...c){const v=m.call(this,c);return v.states=new Vs(this),v}))}function An(m=!0){if(!Tn){if(Tn=!0,typeof window<"u"&&(window.ElementInternals=Cn),typeof CustomElementRegistry<"u"){const c=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(v,_,L){if(_.formAssociated){const U=_.prototype.connectedCallback;_.prototype.connectedCallback=function(){y.has(this)||(y.set(this,!0),this.hasAttribute("disabled")&&Ft(this,!0)),U!=null&&U.apply(this),qe(this)}}c.call(this,v,_,L)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(a.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Cn(this)}),typeof Element<"u"){let c=function(..._){const L=v.apply(this,_);if(g.set(this,L),pe()){const U=new MutationObserver(Z);window.ShadyDOM?U.observe(this,Q):U.observe(L,Q),h.set(this,U)}return L};const v=Element.prototype.attachShadow;Element.prototype.attachShadow=c}pe()&&typeof document<"u"&&new MutationObserver(Z).observe(document.documentElement,Q),typeof HTMLFormElement<"u"&&ui(),(m||typeof window<"u"&&!window.CustomStateSet)&&qi()}}return customElements.polyfillWrapFlushCallback||(md()?typeof window<"u"&&!window.CustomStateSet&&qi(HTMLElement.prototype.attachInternals):An(!1)),s.forceCustomStateSetPolyfill=qi,s.forceElementInternalsPolyfill=An,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})()),ul}fl();var gl=Object.defineProperty,H=(s,t,e,i)=>{for(var a=void 0,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=r(t,e,a)||a);return a&&gl(t,e,a),a};const ml={fromAttribute(s){return s==null?!1:s===""||s==="true"||s===!0?!0:s==="false"||s===!1?!1:!!s},toAttribute(s){return s?"true":"false"}};let D=class extends Y{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=ke(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Mt.props.helptextDropdownButton.default,this.label=null,this.optionalText=_t.forms.labels.optional,this.requiredText=_t.forms.labels.required,this.tagText=null,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var e,i,a,n,r,h,d,p,f,g,k;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},_t.forms.messages.required,t):(e=t.validity)!=null&&e.typeMismatch||(i=t.validity)!=null&&i.badInput?this.internals.setValidity({typeMismatch:!0},_t.forms.messages.invalid,t):(a=t.validity)!=null&&a.patternMismatch?this.internals.setValidity({patternMismatch:!0},_t.forms.messages.invalidPattern,t):(n=t.validity)!=null&&n.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},_t.forms.messages.tooShort,t):(r=t.validity)!=null&&r.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},_t.forms.messages.tooLong,t):(h=t.validity)!=null&&h.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?_t.forms.messages.rangeUnderflowMin.replace("{min}",(d=this.min)==null?void 0:d.toString()):_t.forms.messages.rangeUnderflow,t):(p=t.validity)!=null&&p.stepMismatch?this.internals.setValidity({stepMismatch:!0},_t.forms.messages.invalid,t):(f=t.validity)!=null&&f.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?_t.forms.messages.rangeOverflowMax.replace("{max}",(g=this.max)==null?void 0:g.toString()):_t.forms.messages.rangeOverflow,t):(k=t.validity)!=null&&k.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(i=>{e.append(this.name,i)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const e=this.internals.form||this.closest("form"),i=e?new FormData(e):null;e&&e.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(a=>{const n=a;n.name===this.name&&n.value!==this.value&&n.checked&&(n.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),i&&i.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),i&&i.delete(this.name),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,e){(e!==this.value||e!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})))}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(t=>{"selected"in t&&(t.selected=!1)}),this.checked!==void 0?(this.checked=!1,this.internals.ariaChecked=!1,this.internals.setFormValue("",""),this.inputRef.value.checked=!1,this.valueChecked(this.checked)):(this.internals.setFormValue(""),this.value=this.defaultValue||(this.multiple||this.range?[]:""),this._value=this.value,this.valueChanged(this.value,null)),this.internals.ariaInvalid=!1}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),!this.form){const e=this.internals.form||this.closest("form");this.form=e}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const e=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=e,this.internals.setFormValue(e?this.value||"on":"",e?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}};H([o()],D.prototype,"defaultValue"),H([o({type:Boolean,reflect:!0})],D.prototype,"disabled"),H([o({type:Boolean,reflect:!0})],D.prototype,"readonly"),H([o({type:Boolean,reflect:!0})],D.prototype,"required"),H([o({type:Number,reflect:!0})],D.prototype,"max"),H([o({type:Number,reflect:!0})],D.prototype,"maxlength"),H([o({type:Number,reflect:!0})],D.prototype,"min"),H([o({type:Number,reflect:!0})],D.prototype,"minlength"),H([o({type:Number,reflect:!0})],D.prototype,"step"),H([o({type:String})],D.prototype,"ariaDescribedBy"),H([o({type:String})],D.prototype,"ariaLabelledby"),H([o({type:String,reflect:!0})],D.prototype,"name"),H([o({type:String,reflect:!0})],D.prototype,"pattern"),H([o({type:String,reflect:!0})],D.prototype,"placeholder"),H([o({type:String,reflect:!0})],D.prototype,"id"),H([o({type:Boolean})],D.prototype,"counter"),H([o({type:Boolean})],D.prototype,"hasError"),H([o({type:Boolean})],D.prototype,"inline"),H([o({type:Boolean})],D.prototype,"hasFieldset"),H([o({type:Boolean})],D.prototype,"optionalTag"),H([o({type:Boolean})],D.prototype,"requiredTag"),H([o({type:Boolean})],D.prototype,"skipForwardTestid"),H([o({type:Boolean,reflect:!0,converter:ml})],D.prototype,"useWrapper"),H([o({type:Boolean,reflect:!0})],D.prototype,"fullwidth"),H([o({type:Number})],D.prototype,"counterMaxLength"),H([o({type:String})],D.prototype,"errorMessage"),H([o({type:String})],D.prototype,"helptext"),H([o({type:String})],D.prototype,"helptextDropdown"),H([o({type:String,reflect:!1})],D.prototype,"helptextDropdownButton"),H([o({type:String})],D.prototype,"label"),H([o({type:String,reflect:!1})],D.prototype,"optionalText"),H([o({type:String,reflect:!1})],D.prototype,"requiredText"),H([o({type:String,reflect:!1})],D.prototype,"tagText"),H([o({type:String,attribute:"data-testid"})],D.prototype,"dataTestid"),H([V()],D.prototype,"touched");let Ka=class{constructor(t){this.nodes=[],this.options=[],this.host=t,this.host.addController(this),this.nodes=[],this.options=[],this.observer=new MutationObserver(e=>this.handleMutations(e))}hostConnected(){Array.from(this.host.childNodes).forEach(t=>{(t.nodeName==="OPTION"||t.nodeName==="DATA")&&this.addNode(t)}),this.observer.observe(this.host,{childList:!0,subtree:!1,attributes:!0})}hostDisconnected(){this.observer.disconnect()}addNode(t){(t.nodeName==="OPTION"||t.nodeName==="DATA")&&(t.hasAttribute("hidden")&&!t.hasAttribute("data-skip")&&t.setAttribute("data-hidden","true"),!t.hasAttribute("hidden")&&t.hasAttribute("data-skip")&&t.hasAttribute("data-hidden")&&t.removeAttribute("data-hidden"),t.setAttribute("class","pkt-hide"),t.setAttribute("data-skip","true"),t.setAttribute("hidden","true"),this.nodes.push(t))}createOptions(){this.options=this.nodes.map(t=>({value:t.hasAttribute("value")?t.getAttribute("value")??"":t.textContent??"",label:t.textContent||t.getAttribute("value")||"",selected:t.hasAttribute("selected"),disabled:t.hasAttribute("disabled"),hidden:t.hasAttribute("data-hidden")})),this.host.setAttribute("options",JSON.stringify(this.options))}handleMutations(t){let e=!1;t.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(a=>{Ye(a)&&(this.addNode(a),e=!0)}),i.removedNodes.forEach(a=>{Ye(a)&&(this.nodes=this.nodes.filter(n=>n!==a),e=!0)})),i.type==="attributes"&&Ye(i.target)&&(this.addNode(i.target),e=!0)}),e&&this.createOptions()}};var vl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor,Oe=(s,t,e,i)=>{for(var a=i>1?void 0:i?bl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&vl(t,e,a),a};let oe=class extends Y{constructor(){super(),this.defaultSlot=A(),this.forId=ke(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Mt.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new at(this,this.defaultSlot)}updateSlots(t){this.filledSlots=new Set(t)}render(){const t=()=>{const a=!this.isHelpTextOpen;this.isHelpTextOpen=a,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:a}}))},e=M({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),i=()=>this.helptextDropdown?u`<div class="pkt-inputwrapper__helptext-expandable">
435
437
  <button
436
438
  class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
437
439
  type="button"
@@ -454,7 +456,7 @@
454
456
  ${this.helptext&&Js(this.helptext)}
455
457
  </div>
456
458
  ${i()}
457
- </div>`}`}};Oe([o({type:String,reflect:!0})],oe.prototype,"forId",2),Oe([o({type:String})],oe.prototype,"helptext",2),Oe([o({type:String})],oe.prototype,"helptextDropdown",2),Oe([o({type:String})],oe.prototype,"helptextDropdownButton",2),Oe([V()],oe.prototype,"isHelpTextOpen",2),Oe([V()],oe.prototype,"filledSlots",2),oe=Oe([j("pkt-helptext")],oe);var yl=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,J=(s,t,e,i)=>{for(var a=i>1?void 0:i?kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&yl(t,e,a),a};const $l={fromAttribute(s){return s==null?!1:s===""||s==="true"||s===!0?!0:s==="false"||s===!1?!1:!!s},toAttribute(s){return s?"true":"false"}};let X=class extends Y{constructor(){super(),this.defaultSlot=A(),this.helptextSlot=A(),this.forId=ye(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=Mt.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=Mt.props.optionalTag.default,this.optionalText=Mt.props.optionalText.default,this.requiredTag=Mt.props.requiredTag.default,this.requiredText=Mt.props.requiredText.default,this.tagText=null,this.hasError=Mt.props.hasError.default,this.errorMessage="",this.disabled=Mt.props.disabled.default,this.inline=Mt.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=Mt.props.hasFieldset.default,this.role="group",this.useWrapper=Mt.props.useWrapper.default,this.slotController=new at(this,this.defaultSlot,this.helptextSlot)}updated(t){super.updated(t)}render(){const t={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},e="pkt-tag pkt-tag--small pkt-tag--thin-text",i=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:$,a=()=>u`
459
+ </div>`}`}};Oe([o({type:String,reflect:!0})],oe.prototype,"forId",2),Oe([o({type:String})],oe.prototype,"helptext",2),Oe([o({type:String})],oe.prototype,"helptextDropdown",2),Oe([o({type:String})],oe.prototype,"helptextDropdownButton",2),Oe([V()],oe.prototype,"isHelpTextOpen",2),Oe([V()],oe.prototype,"filledSlots",2),oe=Oe([j("pkt-helptext")],oe);var yl=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,J=(s,t,e,i)=>{for(var a=i>1?void 0:i?kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&yl(t,e,a),a};const $l={fromAttribute(s){return s==null?!1:s===""||s==="true"||s===!0?!0:s==="false"||s===!1?!1:!!s},toAttribute(s){return s?"true":"false"}};let X=class extends Y{constructor(){super(),this.defaultSlot=A(),this.helptextSlot=A(),this.forId=ke(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=Mt.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=Mt.props.optionalTag.default,this.optionalText=Mt.props.optionalText.default,this.requiredTag=Mt.props.requiredTag.default,this.requiredText=Mt.props.requiredText.default,this.tagText=null,this.hasError=Mt.props.hasError.default,this.errorMessage="",this.disabled=Mt.props.disabled.default,this.inline=Mt.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=Mt.props.hasFieldset.default,this.role="group",this.useWrapper=Mt.props.useWrapper.default,this.slotController=new at(this,this.defaultSlot,this.helptextSlot)}updated(t){super.updated(t)}render(){const t={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},e="pkt-tag pkt-tag--small pkt-tag--thin-text",i=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:$,a=()=>u`
458
460
  ${this.tagText?u`<span class=${e+" pkt-tag--gray"}>${this.tagText}</span>`:$}
459
461
  ${this.optionalTag?u`<span class=${e+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
460
462
  ${this.requiredTag?u`<span class=${e+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
@@ -509,7 +511,7 @@
509
511
  ${d()}
510
512
  `,f=()=>this.hasFieldset?u`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
511
513
  ${p()}
512
- </fieldset>`:u`<div class="pkt-inputwrapper__fieldset">${p()}</div>`;return u`<div class=${M(t)}>${f()}</div> `}toggleDropdown(t){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:t.detail.isOpen}}))}handleLabelClick(){this.dispatchEvent(new CustomEvent("labelClick",{bubbles:!0,composed:!0,detail:"label clicked"}))}};J([o({type:String})],X.prototype,"forId",2),J([o({type:String})],X.prototype,"label",2),J([o({type:String})],X.prototype,"helptext",2),J([o({type:String})],X.prototype,"helptextDropdown",2),J([o({type:String})],X.prototype,"helptextDropdownButton",2),J([o({type:Boolean})],X.prototype,"counter",2),J([o({type:Number})],X.prototype,"counterCurrent",2),J([o({type:Number})],X.prototype,"counterMaxLength",2),J([o({type:String})],X.prototype,"counterError",2),J([o({type:String,reflect:!1})],X.prototype,"counterPosition",2),J([o({type:Boolean})],X.prototype,"optionalTag",2),J([o({type:String})],X.prototype,"optionalText",2),J([o({type:Boolean})],X.prototype,"requiredTag",2),J([o({type:String})],X.prototype,"requiredText",2),J([o({type:String})],X.prototype,"tagText",2),J([o({type:Boolean})],X.prototype,"hasError",2),J([o({type:String})],X.prototype,"errorMessage",2),J([o({type:Boolean})],X.prototype,"disabled",2),J([o({type:Boolean})],X.prototype,"inline",2),J([o({type:String})],X.prototype,"ariaDescribedby",2),J([o({type:Boolean})],X.prototype,"hasFieldset",2),J([o({type:String,reflect:!0})],X.prototype,"role",2),J([o({type:Boolean,reflect:!0,converter:$l})],X.prototype,"useWrapper",2),X=J([j("pkt-input-wrapper")],X);var _l=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,kt=(s,t,e,i)=>{for(var a=i>1?void 0:i?wl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_l(t,e,a),a};let mt=class extends Y{constructor(){super(...arguments),this.id=ye(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=""),this.options.length>0&&this.filterOptions(),this.setAttribute("tabindex","-1"),this.addEventListener("focus",this.focusFirstOrSelectedOption)}updated(t){(t.has("options")||t.has("searchValue"))&&this.filterOptions(),super.updated(t)}attributeChangedCallback(t,e,i){(t==="options"||t==="searchValue"||t==="search-value")&&this.filterOptions(),super.attributeChangedCallback(t,e,i)}render(){return u`
514
+ </fieldset>`:u`<div class="pkt-inputwrapper__fieldset">${p()}</div>`;return u`<div class=${M(t)}>${f()}</div> `}toggleDropdown(t){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:t.detail.isOpen}}))}handleLabelClick(){this.dispatchEvent(new CustomEvent("labelClick",{bubbles:!0,composed:!0,detail:"label clicked"}))}};J([o({type:String})],X.prototype,"forId",2),J([o({type:String})],X.prototype,"label",2),J([o({type:String})],X.prototype,"helptext",2),J([o({type:String})],X.prototype,"helptextDropdown",2),J([o({type:String})],X.prototype,"helptextDropdownButton",2),J([o({type:Boolean})],X.prototype,"counter",2),J([o({type:Number})],X.prototype,"counterCurrent",2),J([o({type:Number})],X.prototype,"counterMaxLength",2),J([o({type:String})],X.prototype,"counterError",2),J([o({type:String,reflect:!1})],X.prototype,"counterPosition",2),J([o({type:Boolean})],X.prototype,"optionalTag",2),J([o({type:String})],X.prototype,"optionalText",2),J([o({type:Boolean})],X.prototype,"requiredTag",2),J([o({type:String})],X.prototype,"requiredText",2),J([o({type:String})],X.prototype,"tagText",2),J([o({type:Boolean})],X.prototype,"hasError",2),J([o({type:String})],X.prototype,"errorMessage",2),J([o({type:Boolean})],X.prototype,"disabled",2),J([o({type:Boolean})],X.prototype,"inline",2),J([o({type:String})],X.prototype,"ariaDescribedby",2),J([o({type:Boolean})],X.prototype,"hasFieldset",2),J([o({type:String,reflect:!0})],X.prototype,"role",2),J([o({type:Boolean,reflect:!0,converter:$l})],X.prototype,"useWrapper",2),X=J([j("pkt-input-wrapper")],X);var _l=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,kt=(s,t,e,i)=>{for(var a=i>1?void 0:i?wl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_l(t,e,a),a};let mt=class extends Y{constructor(){super(...arguments),this.id=ke(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=""),this.options.length>0&&this.filterOptions(),this.setAttribute("tabindex","-1"),this.addEventListener("focus",this.focusFirstOrSelectedOption)}updated(t){(t.has("options")||t.has("searchValue"))&&this.filterOptions(),super.updated(t)}attributeChangedCallback(t,e,i){(t==="options"||t==="searchValue"||t==="search-value")&&this.filterOptions(),super.attributeChangedCallback(t,e,i)}render(){return u`
513
515
  <div
514
516
  class=${M({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
515
517
  role="listbox"
@@ -771,7 +773,7 @@
771
773
  ${this.labelPosition==="right"?r():$}
772
774
  </div>
773
775
  </div>
774
- `}handleClick(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),!1}handleChange(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),!1;this.toggleChecked(t)}toggleChecked(t){if(this.disabled){t.preventDefault(),t.stopImmediatePropagation();return}const e=t.target;if(e&&e.disabled){t.preventDefault(),t.stopImmediatePropagation();return}t.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this.checked=this.inputRef.value.matches(":checked"),this.valueChecked(this.checked))}};$t([o({type:String,reflect:!0})],vt.prototype,"value",2),$t([o({type:String})],vt.prototype,"checkHelptext",2),$t([o({type:Boolean})],vt.prototype,"defaultChecked",2),$t([o({type:Boolean})],vt.prototype,"hasTile",2),$t([o({type:Boolean})],vt.prototype,"isSwitch",2),$t([o({type:String})],vt.prototype,"labelPosition",2),$t([o({type:Boolean})],vt.prototype,"hideLabel",2),$t([o({type:Boolean,reflect:!0})],vt.prototype,"checked",2),$t([o({type:Boolean,reflect:!0})],vt.prototype,"indeterminate",2),$t([o({type:String,reflect:!0})],vt.prototype,"type",2),$t([o({type:String})],vt.prototype,"tagText",2),$t([o({type:Boolean})],vt.prototype,"optionalTag",2),$t([o({type:String})],vt.prototype,"optionalText",2),$t([o({type:Boolean})],vt.prototype,"requiredTag",2),$t([o({type:String})],vt.prototype,"requiredText",2),vt=$t([j("pkt-checkbox")],vt);var Dl=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Es=(s,t,e,i)=>{for(var a=i>1?void 0:i?Il(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Dl(t,e,a),a};let es=class extends Y{constructor(){super(...arguments),this.dates=[],this.dateformat="dd.MM.yyyy",this.className="pkt-datepicker__tags",this.idBase=ye()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},u`
776
+ `}handleClick(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),!1}handleChange(t){if(this.disabled)return t.preventDefault(),t.stopImmediatePropagation(),!1;this.toggleChecked(t)}toggleChecked(t){if(this.disabled){t.preventDefault(),t.stopImmediatePropagation();return}const e=t.target;if(e&&e.disabled){t.preventDefault(),t.stopImmediatePropagation();return}t.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this.checked=this.inputRef.value.matches(":checked"),this.valueChecked(this.checked))}};$t([o({type:String,reflect:!0})],vt.prototype,"value",2),$t([o({type:String})],vt.prototype,"checkHelptext",2),$t([o({type:Boolean})],vt.prototype,"defaultChecked",2),$t([o({type:Boolean})],vt.prototype,"hasTile",2),$t([o({type:Boolean})],vt.prototype,"isSwitch",2),$t([o({type:String})],vt.prototype,"labelPosition",2),$t([o({type:Boolean})],vt.prototype,"hideLabel",2),$t([o({type:Boolean,reflect:!0})],vt.prototype,"checked",2),$t([o({type:Boolean,reflect:!0})],vt.prototype,"indeterminate",2),$t([o({type:String,reflect:!0})],vt.prototype,"type",2),$t([o({type:String})],vt.prototype,"tagText",2),$t([o({type:Boolean})],vt.prototype,"optionalTag",2),$t([o({type:String})],vt.prototype,"optionalText",2),$t([o({type:Boolean})],vt.prototype,"requiredTag",2),$t([o({type:String})],vt.prototype,"requiredText",2),vt=$t([j("pkt-checkbox")],vt);var Dl=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Es=(s,t,e,i)=>{for(var a=i>1?void 0:i?Il(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Dl(t,e,a),a};let ss=class extends Y{constructor(){super(...arguments),this.dates=[],this.dateformat="dd.MM.yyyy",this.className="pkt-datepicker__tags",this.idBase=ke()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},u`
775
777
  <div class=${M(this.classes)} aria-live="polite">
776
778
  ${Array.isArray(this.dates)&&this.dates[0]?Ei(Ua((this.dates??[]).filter(Boolean)),t=>t,t=>{var e;return u` <pkt-tag
777
779
  id=${this.idBase+t+"-tag"}
@@ -782,7 +784,7 @@
782
784
  <time datetime=${t}>${ja(t,this.dateformat)}</time>
783
785
  </pkt-tag>`}):$}
784
786
  </div>
785
- `}};Es([o({type:Array})],es.prototype,"dates",2),Es([o({type:String})],es.prototype,"dateformat",2),Es([o({type:String,attribute:"class"})],es.prototype,"className",2),Es([o({type:String,attribute:"id-base"})],es.prototype,"idBase",2),es=Es([j("pkt-date-tags")],es);const Ll={dateformat:{default:"dd.MM.yyyy"},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},Ms={props:Ll},De=()=>{const s=navigator.userAgent;return!!(/iP(hone|od|ad)/.test(s)||/Macintosh/.test(s)&&"ontouchend"in document)},ni={normalizeNameForMultiple(s,t,e){return s?(t||e)&&!s.endsWith("[]")?s+"[]":s:null},validateRangeOrder(s){return!s||s.length!==2?!0:Zo(s[0],s[1])},sortDates(s){return Ua(s)},filterSelectableDates(s,t,e,i,a){return Yo(s,t,e,i,a)}},Bl={getInputType(){return De()?"text":"date"}},Ps={submitForm(s){var t;const e=(t=s.internals)==null?void 0:t.form;e&&e.requestSubmit()},submitFormOrFallback(s,t){const e=s==null?void 0:s.form;e?e.requestSubmit():t()},validateDateInput(s,t,e,i,a){var n,r,h,d;const p=s.value;p&&(e&&e>p?t.setValidity({rangeUnderflow:!0},((r=(n=a==null?void 0:a.forms)==null?void 0:n.messages)==null?void 0:r.rangeUnderflow)||"Value is below minimum",s):i&&i<p&&t.setValidity({rangeOverflow:!0},((d=(h=a==null?void 0:a.forms)==null?void 0:h.messages)==null?void 0:d.rangeOverflow)||"Value is above maximum",s))}},ri={addToSelected(s,t,e,i){const a=s.target;if(!a.value)return;const n=e?re(e):null,r=i?re(i):null,h=re(a.value.split(",")[0]);h&&!isNaN(h.getTime())&&(!n||h>=n)&&(!r||h<=r)&&t.value&&t.value.handleDateSelect(h),a.value=""},handleCalendarPosition(s,t,e=!1){var i;if(!s.value||!t.value)return;const a=((i=t.value.parentElement)==null?void 0:i.getBoundingClientRect())||t.value.getBoundingClientRect(),n=e?a.height+30:a.height,r=s.value.getBoundingClientRect().height;let h=e?"calc(100% - 30px)":"100%";a&&a.top+r>window.innerHeight&&a.top-r>0&&(h=`calc(100% - ${n}px - ${r}px)`),s.value.style.top=h}},Os={getInputClasses(s,t,e,i,a,n){return{"pkt-input":!0,"pkt-datepicker__input":!0,"pkt-input--fullwidth":s,"pkt-datepicker--hasrangelabels":t,"pkt-datepicker--multiple":e,"pkt-datepicker--range":i,"ios-readonly-hack":a===!1&&n==="text"}},getButtonClasses(){return{"pkt-input-icon":!0,"pkt-btn":!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":!0,"pkt-datepicker__calendar-button":!0}},getRangeLabelClasses(s){return{"pkt-input-prefix":s,"pkt-hide":!s}}},Pi={processDateSelection(s,t,e){return!t&&!e?s[0]||"":Array.isArray(s)?s.join(","):s},updateInputValues(s,t,e,i,a,n){s.value&&(i&&t!=null&&t.value?(s.value.value=e[0]??"",t.value.value=e[1]??"",n(s.value),n(t.value)):a||(s.value.value=e.length?e[0]:"",n(s.value)))},processRangeBlur(s,t,e,i,a){var n;const r=s.target;if(r.value){a(r);const h=ve(r.value);h&&t[0]!==r.value&&t[1]&&(i(),(n=e==null?void 0:e.value)==null||n.handleDateSelect(h))}else t[0]&&i()}},Ie={handleInputKeydown(s,t,e,i,a,n){const{key:r}=s;r===","&&(s.preventDefault(),n?n(s):a&&a()),(r==="Space"||r===" ")&&(s.preventDefault(),t(s)),r==="Enter"&&(s.preventDefault(),e?e():i?i():a&&a())},handleButtonKeydown(s,t){const{key:e}=s;(e==="Enter"||e===" "||e==="Space")&&(s.preventDefault(),t(s))}};var Fl=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,Pt=(s,t,e,i)=>{for(var a=i>1?void 0:i?Vl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Fl(t,e,a),a};let St=class extends Y{constructor(){super(...arguments),this.open=!1,this.multiple=!1,this.range=!1,this.weeknumbers=!1,this.withcontrols=!1,this.maxMultiple=null,this.selected=[],this.earliest=null,this.latest=null,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.popupRef=A(),this.calendarRef=A(),this.handleDocumentClick=t=>{if(!this.open)return;const e=t.composedPath(),i=this.parentElement,a=this.popupRef.value;!e.includes(this)&&!e.includes(a)&&!(i&&e.includes(i))&&(this.hide(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))},this.handleDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.hide(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}}firstUpdated(){this.calRef=this.calendarRef,document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeydown)}show(){var t;this.open=!0,(t=this.calendarRef.value)==null||t.focus()}hide(){this.open=!1}toggle(){this.open?this.hide():this.show()}contains(t){var e;return!!t&&!!((e=this.popupRef.value)!=null&&e.contains(t))}focusOnCurrentDate(){const t=this.calendarRef.value;t&&typeof t.focusOnCurrentDate=="function"&&t.focusOnCurrentDate()}addToSelected(t,e,i){if(typeof ri.addToSelected=="function")return ri.addToSelected(t,this.calendarRef,e,i)}handleDateSelect(t){const e=this.calendarRef.value;if(e&&typeof e.handleDateSelect=="function")return e.handleDateSelect(t)}render(){const t={"pkt-calendar-popup":!0,show:this.open,hide:!this.open};return u`
787
+ `}};Es([o({type:Array})],ss.prototype,"dates",2),Es([o({type:String})],ss.prototype,"dateformat",2),Es([o({type:String,attribute:"class"})],ss.prototype,"className",2),Es([o({type:String,attribute:"id-base"})],ss.prototype,"idBase",2),ss=Es([j("pkt-date-tags")],ss);const Ll={dateformat:{default:"dd.MM.yyyy"},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},Ms={props:Ll},De=()=>{const s=navigator.userAgent;return!!(/iP(hone|od|ad)/.test(s)||/Macintosh/.test(s)&&"ontouchend"in document)},ni={normalizeNameForMultiple(s,t,e){return s?(t||e)&&!s.endsWith("[]")?s+"[]":s:null},validateRangeOrder(s){return!s||s.length!==2?!0:Zo(s[0],s[1])},sortDates(s){return Ua(s)},filterSelectableDates(s,t,e,i,a){return Yo(s,t,e,i,a)}},Bl={getInputType(){return De()?"text":"date"}},Ps={submitForm(s){var t;const e=(t=s.internals)==null?void 0:t.form;e&&e.requestSubmit()},submitFormOrFallback(s,t){const e=s==null?void 0:s.form;e?e.requestSubmit():t()},validateDateInput(s,t,e,i,a){var n,r,h,d;const p=s.value;p&&(e&&e>p?t.setValidity({rangeUnderflow:!0},((r=(n=a==null?void 0:a.forms)==null?void 0:n.messages)==null?void 0:r.rangeUnderflow)||"Value is below minimum",s):i&&i<p&&t.setValidity({rangeOverflow:!0},((d=(h=a==null?void 0:a.forms)==null?void 0:h.messages)==null?void 0:d.rangeOverflow)||"Value is above maximum",s))}},ri={addToSelected(s,t,e,i){const a=s.target;if(!a.value)return;const n=e?re(e):null,r=i?re(i):null,h=re(a.value.split(",")[0]);h&&!isNaN(h.getTime())&&(!n||h>=n)&&(!r||h<=r)&&t.value&&t.value.handleDateSelect(h),a.value=""},handleCalendarPosition(s,t,e=!1){var i;if(!s.value||!t.value)return;const a=((i=t.value.parentElement)==null?void 0:i.getBoundingClientRect())||t.value.getBoundingClientRect(),n=e?a.height+30:a.height,r=s.value.getBoundingClientRect().height;let h=e?"calc(100% - 30px)":"100%";a&&a.top+r>window.innerHeight&&a.top-r>0&&(h=`calc(100% - ${n}px - ${r}px)`),s.value.style.top=h}},Os={getInputClasses(s,t,e,i,a,n){return{"pkt-input":!0,"pkt-datepicker__input":!0,"pkt-input--fullwidth":s,"pkt-datepicker--hasrangelabels":t,"pkt-datepicker--multiple":e,"pkt-datepicker--range":i,"ios-readonly-hack":a===!1&&n==="text"}},getButtonClasses(){return{"pkt-input-icon":!0,"pkt-btn":!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":!0,"pkt-datepicker__calendar-button":!0}},getRangeLabelClasses(s){return{"pkt-input-prefix":s,"pkt-hide":!s}}},Pi={processDateSelection(s,t,e){return!t&&!e?s[0]||"":Array.isArray(s)?s.join(","):s},updateInputValues(s,t,e,i,a,n){s.value&&(i&&t!=null&&t.value?(s.value.value=e[0]??"",t.value.value=e[1]??"",n(s.value),n(t.value)):a||(s.value.value=e.length?e[0]:"",n(s.value)))},processRangeBlur(s,t,e,i,a){var n;const r=s.target;if(r.value){a(r);const h=ve(r.value);h&&t[0]!==r.value&&t[1]&&(i(),(n=e==null?void 0:e.value)==null||n.handleDateSelect(h))}else t[0]&&i()}},Ie={handleInputKeydown(s,t,e,i,a,n){const{key:r}=s;r===","&&(s.preventDefault(),n?n(s):a&&a()),(r==="Space"||r===" ")&&(s.preventDefault(),t(s)),r==="Enter"&&(s.preventDefault(),e?e():i?i():a&&a())},handleButtonKeydown(s,t){const{key:e}=s;(e==="Enter"||e===" "||e==="Space")&&(s.preventDefault(),t(s))}};var Fl=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,Pt=(s,t,e,i)=>{for(var a=i>1?void 0:i?Vl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Fl(t,e,a),a};let St=class extends Y{constructor(){super(...arguments),this.open=!1,this.multiple=!1,this.range=!1,this.weeknumbers=!1,this.withcontrols=!1,this.maxMultiple=null,this.selected=[],this.earliest=null,this.latest=null,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.popupRef=A(),this.calendarRef=A(),this.handleDocumentClick=t=>{if(!this.open)return;const e=t.composedPath(),i=this.parentElement,a=this.popupRef.value;!e.includes(this)&&!e.includes(a)&&!(i&&e.includes(i))&&(this.hide(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))},this.handleDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.hide(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}}firstUpdated(){this.calRef=this.calendarRef,document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeydown)}show(){var t;this.open=!0,(t=this.calendarRef.value)==null||t.focus()}hide(){this.open=!1}toggle(){this.open?this.hide():this.show()}contains(t){var e;return!!t&&!!((e=this.popupRef.value)!=null&&e.contains(t))}focusOnCurrentDate(){const t=this.calendarRef.value;t&&typeof t.focusOnCurrentDate=="function"&&t.focusOnCurrentDate()}addToSelected(t,e,i){if(typeof ri.addToSelected=="function")return ri.addToSelected(t,this.calendarRef,e,i)}handleDateSelect(t){const e=this.calendarRef.value;if(e&&typeof e.handleDateSelect=="function")return e.handleDateSelect(t)}render(){const t={"pkt-calendar-popup":!0,show:this.open,hide:!this.open};return u`
786
788
  <div
787
789
  class="${M(t)}"
788
790
  ${E(this.popupRef)}
@@ -931,7 +933,7 @@
931
933
  <span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
932
934
  </button>
933
935
  </div>
934
- `}};It([o({type:Array})],Tt.prototype,"value",2),It([o({type:String})],Tt.prototype,"inputType",2),It([o({type:String})],Tt.prototype,"id",2),It([o({type:String})],Tt.prototype,"min",2),It([o({type:String})],Tt.prototype,"max",2),It([o({type:String})],Tt.prototype,"placeholder",2),It([o({type:Boolean})],Tt.prototype,"readonly",2),It([o({type:Boolean})],Tt.prototype,"disabled",2),It([o({type:Number})],Tt.prototype,"maxlength",2),It([o({type:Object})],Tt.prototype,"inputClasses",2),It([o({type:Object})],Tt.prototype,"internals",2),It([o({type:Object})],Tt.prototype,"strings",2),Tt=It([j("pkt-datepicker-multiple")],Tt);var Rl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,dt=(s,t,e,i)=>{for(var a=i>1?void 0:i?Kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Rl(t,e,a),a};let st=class extends D{constructor(){super(),this._valueProperty="",this.datepickerPopupRef=A(),this._value=[],this.label="Datovelger",this.dateformat=Ms.props.dateformat.default,this.multiple=Ms.props.multiple.default,this.maxlength=null,this.range=Ms.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=Ms.props.weeknumbers.default,this.withcontrols=Ms.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.calRef=A(),this.popupRef=A(),this.helptextSlot=A(),this.singleInputRef=A(),this.rangeInputRef=A(),this.multipleInputRef=A(),this.addToSelected=t=>{const e=this.datepickerPopupRef.value;return e&&typeof e.addToSelected=="function"?e.addToSelected(t,this.min,this.max):ri.addToSelected(t,this.calRef,this.min,this.max)},this.slotController=new at(this,this.helptextSlot)}get value(){return this._valueProperty}set value(t){const e=this._valueProperty;this._valueProperty=Array.isArray(t)?t.join(","):t||"",this.valueChanged(this._valueProperty,e),this.requestUpdate("value",e)}get inputType(){return Bl.getInputType()}connectedCallback(){super.connectedCallback(),this.timezone&&this.timezone!==window.pktTz&&(window.pktTz=this.timezone),this.name=ni.normalizeNameForMultiple(this.name,this.multiple,this.range)||this.name}disconnectedCallback(){super.disconnectedCallback()}onInput(){this.dispatchEvent(new Event("input",{bubbles:!0}))}valueChanged(t,e){if(t===e)return;const i=Ns(t),a=this.multiple&&i.length>1?ni.filterSelectableDates(i,this.min,this.max,this.excludedates,this.excludeweekdays):i;if(this.range&&!ni.validateRangeOrder(a)){this._value=[],this._valueProperty="",super.valueChanged("",e);return}this._value=a;const n=Xo(a);this._valueProperty!==n&&(this._valueProperty=n),super.valueChanged(n,e)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&this.valueChanged(i,e),t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=Ns(i||"")),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=Ns(i||"")),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){const e=Array.isArray(this.value)?this.value.join(","):this.value,i=t.get("value"),a=Array.isArray(i)?i.join(","):i;this.valueChanged(e,a)}(t.has("multiple")||t.has("range"))&&(this.name=ni.normalizeNameForMultiple(this.name,this.multiple,this.range)||this.name),t.has("multiple")&&(this.multiple&&!Array.isArray(this._value)?this._value=Ns(this.value):!this.multiple&&Array.isArray(this._value)&&(this._value=this._value.filter(Boolean)),!this.multiple&&!this.range&&Array.isArray(this._value)&&(this._value=[this._value[0]??""])),super.updated(t)}get inputRef(){return{value:this.currentInputElement}}get inputRefTo(){return{value:this.currentInputElementTo}}get currentInputElement(){var t,e,i;return this.multiple?(t=this.multipleInputRef.value)==null?void 0:t.inputElement:this.range?(e=this.rangeInputRef.value)==null?void 0:e.inputElement:(i=this.singleInputRef.value)==null?void 0:i.inputElement}get currentInputElementTo(){var t;if(this.range)return(t=this.rangeInputRef.value)==null?void 0:t.inputElementTo}get currentButtonElement(){var t,e,i;return this.multiple?(t=this.multipleInputRef.value)==null?void 0:t.buttonElement:this.range?(e=this.rangeInputRef.value)==null?void 0:e.buttonElement:(i=this.singleInputRef.value)==null?void 0:i.buttonElement}get btnRef(){return{value:this.currentButtonElement}}renderInput(){return u`
936
+ `}};It([o({type:Array})],Tt.prototype,"value",2),It([o({type:String})],Tt.prototype,"inputType",2),It([o({type:String})],Tt.prototype,"id",2),It([o({type:String})],Tt.prototype,"min",2),It([o({type:String})],Tt.prototype,"max",2),It([o({type:String})],Tt.prototype,"placeholder",2),It([o({type:Boolean})],Tt.prototype,"readonly",2),It([o({type:Boolean})],Tt.prototype,"disabled",2),It([o({type:Number})],Tt.prototype,"maxlength",2),It([o({type:Object})],Tt.prototype,"inputClasses",2),It([o({type:Object})],Tt.prototype,"internals",2),It([o({type:Object})],Tt.prototype,"strings",2),Tt=It([j("pkt-datepicker-multiple")],Tt);var Rl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,dt=(s,t,e,i)=>{for(var a=i>1?void 0:i?Kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Rl(t,e,a),a};let st=class extends D{constructor(){super(),this._valueProperty="",this.datepickerPopupRef=A(),this._value=[],this.label="Datovelger",this.dateformat=Ms.props.dateformat.default,this.multiple=Ms.props.multiple.default,this.maxlength=null,this.range=Ms.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=Ms.props.weeknumbers.default,this.withcontrols=Ms.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.calRef=A(),this.popupRef=A(),this.helptextSlot=A(),this.singleInputRef=A(),this.rangeInputRef=A(),this.multipleInputRef=A(),this.addToSelected=t=>{const e=this.datepickerPopupRef.value;return e&&typeof e.addToSelected=="function"?e.addToSelected(t,this.min,this.max):ri.addToSelected(t,this.calRef,this.min,this.max)},this.slotController=new at(this,this.helptextSlot)}get value(){return this._valueProperty}set value(t){const e=this._valueProperty;this._valueProperty=Array.isArray(t)?t.join(","):t||"",this.valueChanged(this._valueProperty,e),this.requestUpdate("value",e)}get inputType(){return Bl.getInputType()}connectedCallback(){super.connectedCallback(),this.timezone&&this.timezone!==window.pktTz&&(window.pktTz=this.timezone),this.name=ni.normalizeNameForMultiple(this.name,this.multiple,this.range)||this.name}disconnectedCallback(){super.disconnectedCallback()}onInput(){this.dispatchEvent(new Event("input",{bubbles:!0}))}valueChanged(t,e){if(t===e)return;const i=As(t),a=this.multiple&&i.length>1?ni.filterSelectableDates(i,this.min,this.max,this.excludedates,this.excludeweekdays):i;if(this.range&&!ni.validateRangeOrder(a)){this._value=[],this._valueProperty="",super.valueChanged("",e);return}this._value=a;const n=Xo(a);this._valueProperty!==n&&(this._valueProperty=n),super.valueChanged(n,e)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&this.valueChanged(i,e),t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=As(i||"")),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=As(i||"")),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){const e=Array.isArray(this.value)?this.value.join(","):this.value,i=t.get("value"),a=Array.isArray(i)?i.join(","):i;this.valueChanged(e,a)}(t.has("multiple")||t.has("range"))&&(this.name=ni.normalizeNameForMultiple(this.name,this.multiple,this.range)||this.name),t.has("multiple")&&(this.multiple&&!Array.isArray(this._value)?this._value=As(this.value):!this.multiple&&Array.isArray(this._value)&&(this._value=this._value.filter(Boolean)),!this.multiple&&!this.range&&Array.isArray(this._value)&&(this._value=[this._value[0]??""])),super.updated(t)}get inputRef(){return{value:this.currentInputElement}}get inputRefTo(){return{value:this.currentInputElementTo}}get currentInputElement(){var t,e,i;return this.multiple?(t=this.multipleInputRef.value)==null?void 0:t.inputElement:this.range?(e=this.rangeInputRef.value)==null?void 0:e.inputElement:(i=this.singleInputRef.value)==null?void 0:i.inputElement}get currentInputElementTo(){var t;if(this.range)return(t=this.rangeInputRef.value)==null?void 0:t.inputElementTo}get currentButtonElement(){var t,e,i;return this.multiple?(t=this.multipleInputRef.value)==null?void 0:t.buttonElement:this.range?(e=this.rangeInputRef.value)==null?void 0:e.buttonElement:(i=this.singleInputRef.value)==null?void 0:i.buttonElement}get btnRef(){return{value:this.currentButtonElement}}renderInput(){return u`
935
937
  <pkt-datepicker-single
936
938
  .value=${this._value[0]??""}
937
939
  .inputType=${this.inputType}
@@ -1059,13 +1061,13 @@
1059
1061
  </div>
1060
1062
  </pkt-input-wrapper>
1061
1063
  ${this.renderCalendar()}
1062
- `}handleCalendarPosition(){const t=this.multiple&&!!this.maxlength;ri.handleCalendarPosition(this.popupRef,this.inputRef,t)}async showCalendar(){var t;const e=this.datepickerPopupRef.value;if(this.calendarOpen=!0,e&&typeof e.show=="function"){e.show(),De()&&e.focusOnCurrentDate();return}await cl(20),this.handleCalendarPosition(),De()&&((t=this.calRef.value)==null||t.focusOnCurrentDate())}hideCalendar(){const t=this.datepickerPopupRef.value;if(this.calendarOpen=!1,t&&typeof t.hide=="function")return t.hide()}async toggleCalendar(t){t.preventDefault();const e=this.datepickerPopupRef.value;if(e&&typeof e.toggle=="function"){const i=!!e.open;e.toggle(),this.calendarOpen=!i;return}this.calendarOpen?this.hideCalendar():this.showCalendar()}clearInputValue(){this._value=[],this.value="",this.internals.setFormValue(this.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this._value,bubbles:!0,composed:!0}))}};dt([o({type:String,reflect:!0})],st.prototype,"value",1),dt([o({type:Array})],st.prototype,"_value",2),dt([o({type:String,reflect:!0})],st.prototype,"label",2),dt([o({type:String})],st.prototype,"dateformat",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"multiple",2),dt([o({type:Number,reflect:!0})],st.prototype,"maxlength",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"range",2),dt([o({type:Boolean})],st.prototype,"showRangeLabels",2),dt([o({type:String,reflect:!0})],st.prototype,"min",2),dt([o({type:String,reflect:!0})],st.prototype,"max",2),dt([o({type:Boolean})],st.prototype,"weeknumbers",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"withcontrols",2),dt([o({converter:Qe.csvToArray})],st.prototype,"excludedates",2),dt([o({converter:Qe.csvToArray})],st.prototype,"excludeweekdays",2),dt([o({type:String})],st.prototype,"currentmonth",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"calendarOpen",2),dt([o({type:String})],st.prototype,"timezone",2),dt([V()],st.prototype,"inputClasses",2),st=dt([j("pkt-datepicker")],st);const Gl={href:{default:"#"},target:{default:"_self"}},Ga={props:Gl};var Yl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,ss=(s,t,e,i)=>{for(var a=i>1?void 0:i?Zl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Yl(t,e,a),a};let Le=class extends Y{constructor(){super(),this.defaultSlot=A(),this.href=Ga.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=Ga.props.target.default,this.slotController=new at(this,this.defaultSlot)}render(){const t={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return u`<a
1064
+ `}handleCalendarPosition(){const t=this.multiple&&!!this.maxlength;ri.handleCalendarPosition(this.popupRef,this.inputRef,t)}async showCalendar(){var t;const e=this.datepickerPopupRef.value;if(this.calendarOpen=!0,e&&typeof e.show=="function"){e.show(),De()&&e.focusOnCurrentDate();return}await cl(20),this.handleCalendarPosition(),De()&&((t=this.calRef.value)==null||t.focusOnCurrentDate())}hideCalendar(){const t=this.datepickerPopupRef.value;if(this.calendarOpen=!1,t&&typeof t.hide=="function")return t.hide()}async toggleCalendar(t){t.preventDefault();const e=this.datepickerPopupRef.value;if(e&&typeof e.toggle=="function"){const i=!!e.open;e.toggle(),this.calendarOpen=!i;return}this.calendarOpen?this.hideCalendar():this.showCalendar()}clearInputValue(){this._value=[],this.value="",this.internals.setFormValue(this.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this._value,bubbles:!0,composed:!0}))}};dt([o({type:String,reflect:!0})],st.prototype,"value",1),dt([o({type:Array})],st.prototype,"_value",2),dt([o({type:String,reflect:!0})],st.prototype,"label",2),dt([o({type:String})],st.prototype,"dateformat",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"multiple",2),dt([o({type:Number,reflect:!0})],st.prototype,"maxlength",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"range",2),dt([o({type:Boolean})],st.prototype,"showRangeLabels",2),dt([o({type:String,reflect:!0})],st.prototype,"min",2),dt([o({type:String,reflect:!0})],st.prototype,"max",2),dt([o({type:Boolean})],st.prototype,"weeknumbers",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"withcontrols",2),dt([o({converter:Qe.csvToArray})],st.prototype,"excludedates",2),dt([o({converter:Qe.csvToArray})],st.prototype,"excludeweekdays",2),dt([o({type:String})],st.prototype,"currentmonth",2),dt([o({type:Boolean,reflect:!0})],st.prototype,"calendarOpen",2),dt([o({type:String})],st.prototype,"timezone",2),dt([V()],st.prototype,"inputClasses",2),st=dt([j("pkt-datepicker")],st);const Gl={href:{default:"#"},target:{default:"_self"}},Ga={props:Gl};var Yl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,is=(s,t,e,i)=>{for(var a=i>1?void 0:i?Zl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Yl(t,e,a),a};let Le=class extends Y{constructor(){super(),this.defaultSlot=A(),this.href=Ga.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=Ga.props.target.default,this.slotController=new at(this,this.defaultSlot)}render(){const t={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return u`<a
1063
1065
  class=${M(t)}
1064
1066
  href=${this.href}
1065
1067
  .target=${this.target}
1066
1068
  .rel=${this.external?"noopener noreferrer":$}
1067
1069
  >${this.iconName?u`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span ${E(this.defaultSlot)}>Link</span></a
1068
- >`}};ss([o({type:String,reflect:!0})],Le.prototype,"href",2),ss([o({type:String,reflect:!0})],Le.prototype,"iconName",2),ss([o({type:String,reflect:!0})],Le.prototype,"iconPosition",2),ss([o({type:Boolean,reflect:!0})],Le.prototype,"external",2),ss([o({type:String,reflect:!0})],Le.prototype,"target",2),Le=ss([j("pkt-link")],Le);var Xl=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,Be=(s,t,e,i)=>{for(var a=i>1?void 0:i?Jl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Xl(t,e,a),a};let ke=class extends Y{constructor(){super(),this.defaultSlot=A(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new at(this,this.defaultSlot)}render(){const t=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),e=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return u`
1070
+ >`}};is([o({type:String,reflect:!0})],Le.prototype,"href",2),is([o({type:String,reflect:!0})],Le.prototype,"iconName",2),is([o({type:String,reflect:!0})],Le.prototype,"iconPosition",2),is([o({type:Boolean,reflect:!0})],Le.prototype,"external",2),is([o({type:String,reflect:!0})],Le.prototype,"target",2),Le=is([j("pkt-link")],Le);var Xl=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,Be=(s,t,e,i)=>{for(var a=i>1?void 0:i?Jl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Xl(t,e,a),a};let $e=class extends Y{constructor(){super(),this.defaultSlot=A(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new at(this,this.defaultSlot)}render(){const t=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),e=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return u`
1069
1071
  <a
1070
1072
  href=${this.href}
1071
1073
  class=${t}
@@ -1077,7 +1079,7 @@
1077
1079
 
1078
1080
  <div class="pkt-linkcard__text" ${E(this.defaultSlot)}></div>
1079
1081
  </a>
1080
- `}};Be([o({type:String,reflect:!0})],ke.prototype,"title",2),Be([o({type:String,reflect:!0})],ke.prototype,"href",2),Be([o({type:String,reflect:!0})],ke.prototype,"iconName",2),Be([o({type:Boolean,reflect:!0})],ke.prototype,"external",2),Be([o({type:Boolean,reflect:!0})],ke.prototype,"openInNewTab",2),Be([o({type:String,reflect:!0})],ke.prototype,"skin",2),ke=Be([j("pkt-linkcard")],ke);var Ql=Object.defineProperty,th=Object.getOwnPropertyDescriptor,le=(s,t,e,i)=>{for(var a=i>1?void 0:i?th(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Ql(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.20/animations/";let Yt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=M({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),e=M({"pkt-contents":!0,"pkt-hide":this.isLoading});return u`<div
1082
+ `}};Be([o({type:String,reflect:!0})],$e.prototype,"title",2),Be([o({type:String,reflect:!0})],$e.prototype,"href",2),Be([o({type:String,reflect:!0})],$e.prototype,"iconName",2),Be([o({type:Boolean,reflect:!0})],$e.prototype,"external",2),Be([o({type:Boolean,reflect:!0})],$e.prototype,"openInNewTab",2),Be([o({type:String,reflect:!0})],$e.prototype,"skin",2),$e=Be([j("pkt-linkcard")],$e);var Ql=Object.defineProperty,th=Object.getOwnPropertyDescriptor,le=(s,t,e,i)=>{for(var a=i>1?void 0:i?th(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Ql(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.22/animations/";let Yt=class extends Y{constructor(){super(),this.defaultSlot=A(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=M({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),e=M({"pkt-contents":!0,"pkt-hide":this.isLoading});return u`<div
1081
1083
  role="status"
1082
1084
  aria-live="polite"
1083
1085
  aria-busy=${this.isLoading?"true":"false"}
@@ -1092,7 +1094,7 @@
1092
1094
  ${this.message&&u`<p>${this.message}</p>`}
1093
1095
  </div>`:$}
1094
1096
  <div class=${e} ${E(this.defaultSlot)}></div>
1095
- </div>`}getVariant(t){switch(t){case"blue":return"spinner-blue";case"rainbow":return"spinner";default:return"loader"}}setupLoader(){this.delay>0&&(this._shouldDisplayLoader=!1,setTimeout(()=>{this._shouldDisplayLoader=!0,this.requestUpdate()},this.delay))}};le([o({type:Number})],Yt.prototype,"delay",2),le([o({type:Boolean})],Yt.prototype,"inline",2),le([o({type:Boolean})],Yt.prototype,"isLoading",2),le([o({type:String})],Yt.prototype,"message",2),le([o({type:String})],Yt.prototype,"size",2),le([o({type:String})],Yt.prototype,"variant",2),le([o({type:String})],Yt.prototype,"loadingAnimationPath",2),le([V()],Yt.prototype,"_shouldDisplayLoader",2),Yt=le([j("pkt-loader")],Yt);const eh={skin:{default:"beige"},compact:{default:!1},closable:{default:!1}},Oi={props:eh};var sh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,is=(s,t,e,i)=>{for(var a=i>1?void 0:i?ih(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&sh(t,e,a),a};let Fe=class extends Y{constructor(){super(),this.defaultSlot=A(),this.closable=Oi.props.closable.default,this.compact=Oi.props.compact.default,this.title="",this.skin=Oi.props.skin.default,this._isClosed=!1,this.close=s=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:s},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:s},bubbles:!0}))},this.slotController=new at(this,this.defaultSlot),this._isClosed=!1}updated(s){super.updated(s),s.has("_isClosed")&&$a(this,"pkt-hide",this._isClosed)}render(){const s={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return u`<div class=${M(s)}>
1097
+ </div>`}getVariant(t){switch(t){case"blue":return"spinner-blue";case"rainbow":return"spinner";default:return"loader"}}setupLoader(){this.delay>0&&(this._shouldDisplayLoader=!1,setTimeout(()=>{this._shouldDisplayLoader=!0,this.requestUpdate()},this.delay))}};le([o({type:Number})],Yt.prototype,"delay",2),le([o({type:Boolean})],Yt.prototype,"inline",2),le([o({type:Boolean})],Yt.prototype,"isLoading",2),le([o({type:String})],Yt.prototype,"message",2),le([o({type:String})],Yt.prototype,"size",2),le([o({type:String})],Yt.prototype,"variant",2),le([o({type:String})],Yt.prototype,"loadingAnimationPath",2),le([V()],Yt.prototype,"_shouldDisplayLoader",2),Yt=le([j("pkt-loader")],Yt);const eh={skin:{default:"beige"},compact:{default:!1},closable:{default:!1}},Oi={props:eh};var sh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,as=(s,t,e,i)=>{for(var a=i>1?void 0:i?ih(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&sh(t,e,a),a};let Fe=class extends Y{constructor(){super(),this.defaultSlot=A(),this.closable=Oi.props.closable.default,this.compact=Oi.props.compact.default,this.title="",this.skin=Oi.props.skin.default,this._isClosed=!1,this.close=s=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:s},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:s},bubbles:!0}))},this.slotController=new at(this,this.defaultSlot),this._isClosed=!1}updated(s){super.updated(s),s.has("_isClosed")&&$a(this,"pkt-hide",this._isClosed)}render(){const s={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return u`<div class=${M(s)}>
1096
1098
  ${this.closable?u`<div class="pkt-messagebox__close">
1097
1099
  <button
1098
1100
  @click=${this.close}
@@ -1104,7 +1106,7 @@
1104
1106
  </div>`:$}
1105
1107
  ${this.title?u`<div class="pkt-messagebox__title">${this.title}</div>`:$}
1106
1108
  <div class="pkt-messagebox__text" ${E(this.defaultSlot)}></div>
1107
- </div>`}};is([o({type:Boolean,reflect:!0})],Fe.prototype,"closable",2),is([o({type:Boolean,reflect:!0})],Fe.prototype,"compact",2),is([o({type:String,reflect:!0})],Fe.prototype,"title",2),is([o({type:String,reflect:!0})],Fe.prototype,"skin",2),is([V()],Fe.prototype,"_isClosed",2),Fe=is([j("pkt-messagebox")],Fe);const ah={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},Di={props:ah};var nh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Zt=(s,t,e,i)=>{for(var a=i>1?void 0:i?rh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&nh(t,e,a),a};let Lt=class extends Y{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=Di.props.hideCloseButton.default,this.closeOnBackdropClick=Di.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=Di.props.size.default,this.variant="dialog",this.drawerPosition="right",this.transparentBackdrop=!1,this.defaultSlot=A(),this.dialogRef=A(),this._isOpen=!1,this.close=(t,e=!1)=>{var i;if(!this._isOpen)return;this._isOpen=!1,document.body.classList.remove("pkt-modal--open");const a=document.activeElement;a&&!this.isElementInViewport(a)&&a.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),e||(i=this.dialogRef.value)==null||i.close(),this.requestUpdate()},this.showModal=(t=null)=>{var e;this._isOpen=!0,(e=this.dialogRef.value)==null||e.showModal();const i=document.querySelector(".pkt-modal");requestAnimationFrame(()=>{var a;this.dialogRef.value&&((a=this.dialogRef.value)==null||a.focus())}),i&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:t},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new at(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleBackdropClick)}async firstUpdated(t){super.firstUpdated(t),this.dialogRef.value&&!window.HTMLDialogElement&&!this.dialogRef.value.showModal&&("document"in window&&"createElement"in document&&(await Promise.resolve().then(()=>gd).then(e=>e.default)).registerDialog(this.dialogRef.value),this.dialogRef.value.addEventListener("close",()=>{this.close(new Event("close"),!0)}))}handleKeyDown(t){t.key==="Escape"&&this.close(t)}handleBackdropClick(t){var e;this.closeOnBackdropClick&&t.target===((e=this.dialogRef)==null?void 0:e.value)&&this.close(t)}isElementInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const t={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,"pkt-modal--noShadow":this.closeButtonSkin==="yellow-filled","pkt-modal--transparentBackdrop":this.transparentBackdrop??!1,[`pkt-modal--${this.size}`]:this.size!==void 0,[`pkt-modal__${this.variant}`]:this.variant!==void 0,[`pkt-modal__drawer--${this.drawerPosition}`]:this.variant==="drawer"},e={"pkt-modal__headingText":!0,"pkt-txt-24":!0},i={"pkt-modal__content":!0,"pkt-txt-18-light":!0},a=this.closeButtonSkin==="blue",n={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0};return u`
1109
+ </div>`}};as([o({type:Boolean,reflect:!0})],Fe.prototype,"closable",2),as([o({type:Boolean,reflect:!0})],Fe.prototype,"compact",2),as([o({type:String,reflect:!0})],Fe.prototype,"title",2),as([o({type:String,reflect:!0})],Fe.prototype,"skin",2),as([V()],Fe.prototype,"_isClosed",2),Fe=as([j("pkt-messagebox")],Fe);const ah={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},Di={props:ah};var nh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Zt=(s,t,e,i)=>{for(var a=i>1?void 0:i?rh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&nh(t,e,a),a};let Lt=class extends Y{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=Di.props.hideCloseButton.default,this.closeOnBackdropClick=Di.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=Di.props.size.default,this.variant="dialog",this.drawerPosition="right",this.transparentBackdrop=!1,this.defaultSlot=A(),this.dialogRef=A(),this._isOpen=!1,this.close=(t,e=!1)=>{var i;if(!this._isOpen)return;this._isOpen=!1,document.body.classList.remove("pkt-modal--open");const a=document.activeElement;a&&!this.isElementInViewport(a)&&a.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),e||(i=this.dialogRef.value)==null||i.close(),this.requestUpdate()},this.showModal=(t=null)=>{var e;this._isOpen=!0,(e=this.dialogRef.value)==null||e.showModal();const i=document.querySelector(".pkt-modal");requestAnimationFrame(()=>{var a;this.dialogRef.value&&((a=this.dialogRef.value)==null||a.focus())}),i&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:t},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new at(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleBackdropClick)}async firstUpdated(t){super.firstUpdated(t),this.dialogRef.value&&!window.HTMLDialogElement&&!this.dialogRef.value.showModal&&("document"in window&&"createElement"in document&&(await Promise.resolve().then(()=>gd).then(e=>e.default)).registerDialog(this.dialogRef.value),this.dialogRef.value.addEventListener("close",()=>{this.close(new Event("close"),!0)}))}handleKeyDown(t){t.key==="Escape"&&this.close(t)}handleBackdropClick(t){var e;this.closeOnBackdropClick&&t.target===((e=this.dialogRef)==null?void 0:e.value)&&this.close(t)}isElementInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const t={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,"pkt-modal--noShadow":this.closeButtonSkin==="yellow-filled","pkt-modal--transparentBackdrop":this.transparentBackdrop??!1,[`pkt-modal--${this.size}`]:this.size!==void 0,[`pkt-modal__${this.variant}`]:this.variant!==void 0,[`pkt-modal__drawer--${this.drawerPosition}`]:this.variant==="drawer"},e={"pkt-modal__headingText":!0,"pkt-txt-24":!0},i={"pkt-modal__content":!0,"pkt-txt-18-light":!0},a=this.closeButtonSkin==="blue",n={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0};return u`
1108
1110
  <dialog
1109
1111
  class=${M(t)}
1110
1112
  ${E(this.dialogRef)}
@@ -1144,7 +1146,7 @@
1144
1146
  * @license
1145
1147
  * Copyright 2018 Google LLC
1146
1148
  * SPDX-License-Identifier: BSD-3-Clause
1147
- */const Ya="important",oh=" !"+Ya,lh=Se(class extends Ge{constructor(s){var t;if(super(s),s.type!==Rt.ATTRIBUTE||s.name!=="style"||((t=s.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce(((t,e)=>{const i=s[e];return i==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(s,[t]){const{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?e.removeProperty(i):e[i]=null);for(const i in t){const a=t[i];if(a!=null){this.ft.add(i);const n=typeof a=="string"&&a.endsWith(oh);i.includes("-")||n?e.setProperty(i,n?a.slice(0,-11):a,n?Ya:""):e[i]=a}}return xt}});var hh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,ct=(s,t,e,i)=>{for(var a=i>1?void 0:i?dh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&hh(t,e,a),a};let it=class extends Y{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=ye(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=A(),this.progressBarRef=A()}firstUpdated(s){super.firstUpdated(s),this.setComputedValues(),this.syncAttributes()}updated(s){super.updated(s),s.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),s.has("id")&&this.id&&(this.progressBarId=this.id),(s.has("statusType")||s.has("id")||s.has("ariaLabelledby"))&&(this.progressbarId=this.id||ye(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(s.has("ariaValueText")||s.has("valueCurrent")||s.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const s=this.statusType!=="none",t=this.valueMax-this.valueMin,e=this.valueCurrent/t*100,i=this.statusType==="fraction"?Math.round(e):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),a=`${this.valueCurrent} av ${t}`,n=M({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),r=M({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),h=M({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),d=M({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return u` <div
1149
+ */const Ya="important",oh=" !"+Ya,lh=Ce(class extends Ge{constructor(s){var t;if(super(s),s.type!==Rt.ATTRIBUTE||s.name!=="style"||((t=s.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce(((t,e)=>{const i=s[e];return i==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(s,[t]){const{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?e.removeProperty(i):e[i]=null);for(const i in t){const a=t[i];if(a!=null){this.ft.add(i);const n=typeof a=="string"&&a.endsWith(oh);i.includes("-")||n?e.setProperty(i,n?a.slice(0,-11):a,n?Ya:""):e[i]=a}}return xt}});var hh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,ct=(s,t,e,i)=>{for(var a=i>1?void 0:i?dh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&hh(t,e,a),a};let it=class extends Y{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=ke(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=A(),this.progressBarRef=A()}firstUpdated(s){super.firstUpdated(s),this.setComputedValues(),this.syncAttributes()}updated(s){super.updated(s),s.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),s.has("id")&&this.id&&(this.progressBarId=this.id),(s.has("statusType")||s.has("id")||s.has("ariaLabelledby"))&&(this.progressbarId=this.id||ke(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(s.has("ariaValueText")||s.has("valueCurrent")||s.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const s=this.statusType!=="none",t=this.valueMax-this.valueMin,e=this.valueCurrent/t*100,i=this.statusType==="fraction"?Math.round(e):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),a=`${this.valueCurrent} av ${t}`,n=M({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),r=M({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),h=M({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),d=M({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return u` <div
1148
1150
  class="pkt-progressbar__container"
1149
1151
  .ref=${this.progressBarRef}
1150
1152
  style=${lh({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
@@ -1160,7 +1162,7 @@
1160
1162
  ${this.statusType==="percentage"?`${i}%`:a}
1161
1163
  </span>
1162
1164
  </div>`:$}
1163
- </div>`}setComputedValues(){this.progressbarId=this.id||ye(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(s,t){t==null||t===""?this.removeAttribute(s):this.setAttribute(s,String(t))}};ct([o({type:String})],it.prototype,"ariaLabel",2),ct([o({type:String,reflect:!0})],it.prototype,"ariaLabelledby",2),ct([o({type:String,reflect:!0})],it.prototype,"ariaValueText",2),ct([o({type:String})],it.prototype,"ariaLive",2),ct([o({type:String,reflect:!0})],it.prototype,"id",2),ct([o({type:String})],it.prototype,"role",2),ct([o({type:String})],it.prototype,"skin",2),ct([o({type:String})],it.prototype,"statusPlacement",2),ct([o({type:String})],it.prototype,"statusType",2),ct([o({type:String,reflect:!0})],it.prototype,"title",2),ct([o({type:String})],it.prototype,"titlePosition",2),ct([o({type:Number,reflect:!0})],it.prototype,"valueCurrent",2),ct([o({type:Number})],it.prototype,"valueMax",2),ct([o({type:Number})],it.prototype,"valueMin",2),ct([V()],it.prototype,"labelWidth",2),ct([V()],it.prototype,"progressbarId",2),ct([V()],it.prototype,"computedAriaLabelledby",2),ct([V()],it.prototype,"computedAriaValueText",2),it=ct([j("pkt-progressbar")],it);var ch=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Bt=(s,t,e,i)=>{for(var a=i>1?void 0:i?ph(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&ch(t,e,a),a};let Nt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(s,t,e){s==="defaultChecked"&&(this._checked=this.defaultChecked),s==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(s,t,e)}render(){const s=M({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),t=M({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),e=M({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),i="pkt-tag pkt-tag--small pkt-tag--thin-text",a=()=>u`
1165
+ </div>`}setComputedValues(){this.progressbarId=this.id||ke(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(s,t){t==null||t===""?this.removeAttribute(s):this.setAttribute(s,String(t))}};ct([o({type:String})],it.prototype,"ariaLabel",2),ct([o({type:String,reflect:!0})],it.prototype,"ariaLabelledby",2),ct([o({type:String,reflect:!0})],it.prototype,"ariaValueText",2),ct([o({type:String})],it.prototype,"ariaLive",2),ct([o({type:String,reflect:!0})],it.prototype,"id",2),ct([o({type:String})],it.prototype,"role",2),ct([o({type:String})],it.prototype,"skin",2),ct([o({type:String})],it.prototype,"statusPlacement",2),ct([o({type:String})],it.prototype,"statusType",2),ct([o({type:String,reflect:!0})],it.prototype,"title",2),ct([o({type:String})],it.prototype,"titlePosition",2),ct([o({type:Number,reflect:!0})],it.prototype,"valueCurrent",2),ct([o({type:Number})],it.prototype,"valueMax",2),ct([o({type:Number})],it.prototype,"valueMin",2),ct([V()],it.prototype,"labelWidth",2),ct([V()],it.prototype,"progressbarId",2),ct([V()],it.prototype,"computedAriaLabelledby",2),ct([V()],it.prototype,"computedAriaValueText",2),it=ct([j("pkt-progressbar")],it);var ch=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Bt=(s,t,e,i)=>{for(var a=i>1?void 0:i?ph(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&ch(t,e,a),a};let Nt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(s,t,e){s==="defaultChecked"&&(this._checked=this.defaultChecked),s==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(s,t,e)}render(){const s=M({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),t=M({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),e=M({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),i="pkt-tag pkt-tag--small pkt-tag--thin-text",a=()=>u`
1164
1166
  ${this.tagText?u`<span class=${i+" pkt-tag--gray"}>${this.tagText}</span>`:$}
1165
1167
  ${this.optionalTag?u`<span class=${i+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
1166
1168
  ${this.requiredTag?u`<span class=${i+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
@@ -1218,11 +1220,11 @@
1218
1220
  * @license
1219
1221
  * Copyright 2022 Google LLC
1220
1222
  * SPDX-License-Identifier: BSD-3-Clause
1221
- */function mh({context:s,subscribe:t}){return(e,i)=>{typeof i=="object"?i.addInitializer((function(){new Xa(this,{context:s,callback:a=>{e.set.call(this,a)},subscribe:t})})):e.constructor.addInitializer((a=>{new Xa(a,{context:s,callback:n=>{a[i]=n},subscribe:t})}))}}const Qa=Symbol("pkt-tabs-context");var vh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,as=(s,t,e,i)=>{for(var a=i>1?void 0:i?bh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&vh(t,e,a),a};let Ve=class extends Y{constructor(){super(),this.arrowNav=!0,this.disableArrowNav=!1,this.tabRefs=[],this.tabCount=0,this.defaultSlot=A(),this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)},this.slotController=new at(this,this.defaultSlot)}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(t){(t.has("arrowNav")||t.has("disableArrowNav"))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}registerTab(t,e){this.tabRefs[e]=t,this.tabCount=Math.max(this.tabCount,e+1)}handleClick(t){this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:t},bubbles:!0,composed:!0}))}handleKeyUp(t,e){var i,a;this.useArrowNav&&(t.code==="ArrowLeft"&&e!==0&&((i=this.tabRefs[e-1])==null||i.focus()),t.code==="ArrowRight"&&e<this.tabCount-1&&((a=this.tabRefs[e+1])==null||a.focus()),(t.code==="ArrowDown"||t.code==="Space")&&this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:e},bubbles:!0,composed:!0})))}render(){const t=this.useArrowNav?"tablist":"navigation";return u`
1223
+ */function mh({context:s,subscribe:t}){return(e,i)=>{typeof i=="object"?i.addInitializer((function(){new Xa(this,{context:s,callback:a=>{e.set.call(this,a)},subscribe:t})})):e.constructor.addInitializer((a=>{new Xa(a,{context:s,callback:n=>{a[i]=n},subscribe:t})}))}}const Qa=Symbol("pkt-tabs-context");var vh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,ns=(s,t,e,i)=>{for(var a=i>1?void 0:i?bh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&vh(t,e,a),a};let Ve=class extends Y{constructor(){super(),this.arrowNav=!0,this.disableArrowNav=!1,this.tabRefs=[],this.tabCount=0,this.defaultSlot=A(),this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)},this.slotController=new at(this,this.defaultSlot)}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(t){(t.has("arrowNav")||t.has("disableArrowNav"))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}registerTab(t,e){this.tabRefs[e]=t,this.tabCount=Math.max(this.tabCount,e+1)}handleClick(t){this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:t},bubbles:!0,composed:!0}))}handleKeyUp(t,e){var i,a;this.useArrowNav&&(t.code==="ArrowLeft"&&e!==0&&((i=this.tabRefs[e-1])==null||i.focus()),t.code==="ArrowRight"&&e<this.tabCount-1&&((a=this.tabRefs[e+1])==null||a.focus()),(t.code==="ArrowDown"||t.code==="Space")&&this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:e},bubbles:!0,composed:!0})))}render(){const t=this.useArrowNav?"tablist":"navigation";return u`
1222
1224
  <div class="pkt-tabs">
1223
1225
  <div class="pkt-tabs__list" role=${t} ${E(this.defaultSlot)}></div>
1224
1226
  </div>
1225
- `}};as([o({type:Boolean,reflect:!0,attribute:"arrow-nav"})],Ve.prototype,"arrowNav",2),as([o({type:Boolean,reflect:!0,attribute:"disable-arrow-nav"})],Ve.prototype,"disableArrowNav",2),as([V()],Ve.prototype,"tabRefs",2),as([V()],Ve.prototype,"tabCount",2),as([gh({context:Qa}),V()],Ve.prototype,"context",2),Ve=as([j("pkt-tabs")],Ve);var yh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,he=(s,t,e,i)=>{for(var a=i>1?void 0:i?kh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&yh(t,e,a),a};let se=class extends Y{constructor(){super(),this.active=!1,this.href="",this.icon="",this.controls="",this.tag="",this.tagSkin="blue",this.index=0,this.elementRef=A(),this.defaultSlot=A(),this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index)})}handleClick(){this.context&&this.context.handleClick(this.index)}handleKeyUp(t){this.context&&this.context.handleKeyUp(t,this.index)}render(){var t;const e=((t=this.context)==null?void 0:t.useArrowNav)??!0,i=this.active?"active":"",a=e?"tab":void 0,n=e?this.active:void 0,r=this.active||!e?void 0:-1,h=u`
1227
+ `}};ns([o({type:Boolean,reflect:!0,attribute:"arrow-nav"})],Ve.prototype,"arrowNav",2),ns([o({type:Boolean,reflect:!0,attribute:"disable-arrow-nav"})],Ve.prototype,"disableArrowNav",2),ns([V()],Ve.prototype,"tabRefs",2),ns([V()],Ve.prototype,"tabCount",2),ns([gh({context:Qa}),V()],Ve.prototype,"context",2),Ve=ns([j("pkt-tabs")],Ve);var yh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,he=(s,t,e,i)=>{for(var a=i>1?void 0:i?kh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&yh(t,e,a),a};let se=class extends Y{constructor(){super(),this.active=!1,this.href="",this.icon="",this.controls="",this.tag="",this.tagSkin="blue",this.index=0,this.elementRef=A(),this.defaultSlot=A(),this.slotController=new at(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index)})}handleClick(){this.context&&this.context.handleClick(this.index)}handleKeyUp(t){this.context&&this.context.handleKeyUp(t,this.index)}render(){var t;const e=((t=this.context)==null?void 0:t.useArrowNav)??!0,i=this.active?"active":"",a=e?"tab":void 0,n=e?this.active:void 0,r=this.active||!e?void 0:-1,h=u`
1226
1228
  ${this.icon?u`<pkt-icon name=${this.icon} class="pkt-icon--small"></pkt-icon>`:""}
1227
1229
  <span ${E(this.defaultSlot)}></span>
1228
1230
  ${this.tag?u`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>`:""}
@@ -1258,7 +1260,7 @@
1258
1260
  * @license
1259
1261
  * Copyright 2020 Google LLC
1260
1262
  * SPDX-License-Identifier: BSD-3-Clause
1261
- */const $h=Se(class extends Ge{constructor(s){if(super(s),s.type!==Rt.PROPERTY&&s.type!==Rt.ATTRIBUTE&&s.type!==Rt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!va(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===xt||t===$)return t;const e=s.element,i=s.name;if(s.type===Rt.PROPERTY){if(t===e[i])return xt}else if(s.type===Rt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return xt}else if(s.type===Rt.ATTRIBUTE&&e.getAttribute(i)===t+"")return xt;return ya(s),t}});var _h=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,Ds=(s,t,e,i)=>{for(var a=i>1?void 0:i?wh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_h(t,e,a),a};let ns=class extends D{constructor(){super(),this.inputRef=A(),this.helptextSlot=A(),this.value="",this.autocomplete="off",this.rows=null,this.counterCurrent=0,this.slotController=new at(this,this.helptextSlot)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&(this.counterCurrent=i?i.length:0,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}updated(t){var e;super.updated(t),t.has("value")&&(this.counterCurrent=((e=this.value)==null?void 0:e.length)||0,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const t=M({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),e=this.ariaLabelledby||`${this.id}-input-label`;return u`<pkt-input-wrapper
1263
+ */const $h=Ce(class extends Ge{constructor(s){if(super(s),s.type!==Rt.PROPERTY&&s.type!==Rt.ATTRIBUTE&&s.type!==Rt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!va(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===xt||t===$)return t;const e=s.element,i=s.name;if(s.type===Rt.PROPERTY){if(t===e[i])return xt}else if(s.type===Rt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return xt}else if(s.type===Rt.ATTRIBUTE&&e.getAttribute(i)===t+"")return xt;return ya(s),t}});var _h=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,Ds=(s,t,e,i)=>{for(var a=i>1?void 0:i?wh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_h(t,e,a),a};let rs=class extends D{constructor(){super(),this.inputRef=A(),this.helptextSlot=A(),this.value="",this.autocomplete="off",this.rows=null,this.counterCurrent=0,this.slotController=new at(this,this.helptextSlot)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&(this.counterCurrent=i?i.length:0,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}updated(t){var e;super.updated(t),t.has("value")&&(this.counterCurrent=((e=this.value)==null?void 0:e.length)||0,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const t=M({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),e=this.ariaLabelledby||`${this.id}-input-label`;return u`<pkt-input-wrapper
1262
1264
  label=${this.label}
1263
1265
  ?counter=${this.counter}
1264
1266
  ?disabled=${this.disabled}
@@ -1303,7 +1305,7 @@
1303
1305
  @focus=${i=>{this.onFocus(),i.stopImmediatePropagation()}}
1304
1306
  @blur=${i=>{this.value=i.target.value,this.onBlur(),i.stopImmediatePropagation()}}
1305
1307
  ></textarea>
1306
- </pkt-input-wrapper>`}};Ds([o({type:String,reflect:!0})],ns.prototype,"value",2),Ds([o({type:String})],ns.prototype,"autocomplete",2),Ds([o({type:Number})],ns.prototype,"rows",2),Ds([V()],ns.prototype,"counterCurrent",2),ns=Ds([j("pkt-textarea")],ns);var xh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,ie=(s,t,e,i)=>{for(var a=i>1?void 0:i?Sh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&xh(t,e,a),a};let Xt=class extends D{constructor(){super(),this.inputRef=A(),this.helptextSlot=A(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new at(this,this.helptextSlot)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&(this.counterCurrent=i?i.length:0,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}updated(t){var e;super.updated(t),t.has("value")&&(this.counterCurrent=((e=this.value)==null?void 0:e.length)||0,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const t=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,e=M({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),i=this.ariaLabelledby||`${this.id}-input-label`;return u`
1308
+ </pkt-input-wrapper>`}};Ds([o({type:String,reflect:!0})],rs.prototype,"value",2),Ds([o({type:String})],rs.prototype,"autocomplete",2),Ds([o({type:Number})],rs.prototype,"rows",2),Ds([V()],rs.prototype,"counterCurrent",2),rs=Ds([j("pkt-textarea")],rs);var xh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,ie=(s,t,e,i)=>{for(var a=i>1?void 0:i?Sh(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&xh(t,e,a),a};let Xt=class extends D{constructor(){super(),this.inputRef=A(),this.helptextSlot=A(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new at(this,this.helptextSlot)}attributeChangedCallback(t,e,i){t==="value"&&this.value!==e&&(this.counterCurrent=i?i.length:0,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}updated(t){var e;super.updated(t),t.has("value")&&(this.counterCurrent=((e=this.value)==null?void 0:e.length)||0,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const t=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,e=M({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),i=this.ariaLabelledby||`${this.id}-input-label`;return u`
1307
1309
  <pkt-input-wrapper
1308
1310
  label="${this.label}"
1309
1311
  ?counter=${this.counter}
@@ -1420,7 +1422,7 @@
1420
1422
  </select>
1421
1423
  <div class="pkt-contents" ${E(this.helptextSlot)} name="helptext" slot="helptext"></div>
1422
1424
  </pkt-input-wrapper>
1423
- `}returnNumberOrNull(t){return t==null||isNaN(t)?null:t}};oi([o({type:Array,attribute:"options"})],Is.prototype,"_optionsProp",2),oi([o({type:String})],Is.prototype,"value",2),oi([V()],Is.prototype,"_options",2),Is=oi([j("pkt-select")],Is);var Nh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Ls=(s,t,e,i)=>{for(var a=i>1?void 0:i?Ah(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Nh(t,e,a),a};let rs=class extends Y{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=A(),this.namedSlot=A(),this.slotController=new at(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(s=>{this._list.push(s.toUpperCase())}),super.connectedCallback()}render(){const s={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return u`
1425
+ `}returnNumberOrNull(t){return t==null||isNaN(t)?null:t}};oi([o({type:Array,attribute:"options"})],Is.prototype,"_optionsProp",2),oi([o({type:String})],Is.prototype,"value",2),oi([V()],Is.prototype,"_options",2),Is=oi([j("pkt-select")],Is);var Nh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Ls=(s,t,e,i)=>{for(var a=i>1?void 0:i?Ah(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Nh(t,e,a),a};let os=class extends Y{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=A(),this.namedSlot=A(),this.slotController=new at(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(s=>{this._list.push(s.toUpperCase())}),super.connectedCallback()}render(){const s={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return u`
1424
1426
  <div class="${M(s)}">
1425
1427
  <h1 class="pkt-txt-28">${this.string}</h1>
1426
1428
 
@@ -1448,8 +1450,8 @@
1448
1450
  <ul>
1449
1451
  ${s.map(t=>u`<li>${t}</li>`)}
1450
1452
  </ul>
1451
- `}doStuff(s){return s.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Ls([o({type:String})],rs.prototype,"string",2),Ls([o({converter:qa})],rs.prototype,"strings",2),Ls([o({type:Boolean})],rs.prototype,"darkmode",2),Ls([o({type:Array})],rs.prototype,"_list",2),rs=Ls([j("pkt-component")],rs);const B=Wt({tagName:"pkt-icon",elementClass:Te,react:x,displayName:"PktIcon",events:{}}),tn=x.forwardRef(({defaultOpen:s=!1,id:t,title:e,skin:i,compact:a=!1,isOpen:n,children:r,name:h,className:d,onClick:p,onToggle:f},g)=>{const[k,b]=x.useState(s),{name:y}=Pn(),w=h||y,C=n!==void 0?n:k;x.useEffect(()=>{n===void 0&&b(s)},[s,n]);const P=N=>{const Z=N.currentTarget.open;n===void 0&&b(Z),f==null||f(N)},T=N=>{setTimeout(()=>{p==null||p(N)},0)},I=["pkt-accordion-item",a&&"pkt-accordion-item--compact",i&&`pkt-accordion-item--${i}`,d].filter(Boolean).join(" ");return l.jsxs("details",{ref:g,className:I,id:t,open:C,onClick:T,name:w,onToggle:P,children:[l.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[e,l.jsx(B,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),l.jsx("div",{className:"pkt-accordion-item__content",id:`pkt-accordion-item__content-${t}`,role:"region",children:l.jsx("div",{className:"pkt-accordion-item__content-inner",children:r})})]})});tn.displayName="PktAccordionItem";function Eh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ii={exports:{}};/*!
1453
+ `}doStuff(s){return s.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Ls([o({type:String})],os.prototype,"string",2),Ls([o({converter:qa})],os.prototype,"strings",2),Ls([o({type:Boolean})],os.prototype,"darkmode",2),Ls([o({type:Array})],os.prototype,"_list",2),os=Ls([j("pkt-component")],os);const B=Wt({tagName:"pkt-icon",elementClass:Ne,react:x,displayName:"PktIcon",events:{}}),tn=x.forwardRef(({defaultOpen:s=!1,id:t,title:e,skin:i,compact:a=!1,isOpen:n,children:r,name:h,className:d,onClick:p,onToggle:f},g)=>{const[k,b]=x.useState(s),{name:y}=Pn(),w=h||y,C=n!==void 0?n:k;x.useEffect(()=>{n===void 0&&b(s)},[s,n]);const P=N=>{const Z=N.currentTarget.open;n===void 0&&b(Z),f==null||f(N)},T=N=>{setTimeout(()=>{p==null||p(N)},0)},I=["pkt-accordion-item",a&&"pkt-accordion-item--compact",i&&`pkt-accordion-item--${i}`,d].filter(Boolean).join(" ");return l.jsxs("details",{ref:g,className:I,id:t,open:C,onClick:T,name:w,onToggle:P,children:[l.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[e,l.jsx(B,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),l.jsx("div",{className:"pkt-accordion-item__content",id:`pkt-accordion-item__content-${t}`,role:"region",children:l.jsx("div",{className:"pkt-accordion-item__content-inner",children:r})})]})});tn.displayName="PktAccordionItem";function Eh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ii={exports:{}};/*!
1452
1454
  Copyright (c) 2018 Jed Watson.
1453
1455
  Licensed under the MIT License (MIT), see
1454
1456
  http://jedwatson.github.io/classnames
1455
- */var en;function Mh(){return en||(en=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var n="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(n=a(n,i(h)))}return n}function i(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var h in n)t.call(n,h)&&n[h]&&(r=a(r,h));return r}function a(n,r){return r?n?n+" "+r:n+r:n}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(Ii)),Ii.exports}var Ph=Mh();const pt=Eh(Ph),Li=({children:s,closeAlert:t,compact:e,title:i,date:a,ariaLive:n,"aria-live":r="polite",role:h="status",skin:d="info",className:p,...f})=>{const[g,k]=x.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":g},y={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},w=x.useCallback(()=>{k(!0),f.onClose&&f.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[f.onClose,k]),C=n||r;return l.jsx("div",{...f,"aria-live":C,role:h,className:pt(b,p),children:l.jsxs("div",{className:pt(y),children:[l.jsx(B,{className:"pkt-alert__icon","aria-hidden":"true",name:d==="info"?"alert-information":`alert-${d}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(je,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:w,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),a&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",a]})]})})};Li.displayName="PktAlert";const sn=Wt({tagName:"pkt-backlink",elementClass:Xe,react:x,displayName:"PktBackLink"});sn.displayName="PktBackLink";const Oh=x.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},a)=>{const n=s,r=n[n.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:a,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:n.map((d,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===n.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?l.jsxs(Wi.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(B,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):l.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(B,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(Wi.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(B,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(B,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.20/animations/";const je=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",iconPath:a,secondIconPath:n,size:r="medium",fullWidth:h=!1,fullWidthOnMobile:d=!1,skin:p="primary",type:f="button",variant:g="label-only",state:k,color:b,isLoading:y=void 0,disabled:w=void 0,loadingAnimationPath:C=window.pktAnimationPath,...P},T)=>{const I=[t,"pkt-btn",r&&`pkt-btn--${r}`,h&&"pkt-btn--full",d&&"pkt-btn--full-small",p&&`pkt-btn--${p}`,g&&`pkt-btn--${g}`,b&&`pkt-btn--${b}`,k&&`pkt-btn--${k}`,y&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...P,"aria-busy":y||void 0,"aria-disabled":w||void 0,disabled:w,className:I,type:f,ref:T,children:[y&&l.jsx(B,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:C}),g!=="label-only"&&l.jsx(B,{className:"pkt-btn__icon",name:e,...a&&{path:a}}),l.jsx("span",{className:"pkt-btn__text",children:s}),g==="icons-right-and-left"&&l.jsx(B,{className:"pkt-btn__icon",name:i,...n&&{path:n}})]})});je.displayName="PktButton";const Dh=Wt({tagName:"pkt-card",elementClass:ht,react:x,displayName:"PktCard",events:{}}),an=x.forwardRef(({children:s,...t},e)=>l.jsx(Dh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));an.displayName="PktCard";const nn=x.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:a,hasError:n=!1,className:r,isSwitch:h=!1,hideLabel:d=!1,labelPosition:p="right",defaultChecked:f,checked:g,indeterminate:k,optionalTag:b,optionalText:y="Valgfritt",requiredTag:w,requiredText:C="Må fylles ut",tagText:P,...T},I)=>{const N=x.useRef(null);x.useEffect(()=>{N.current&&k!==void 0&&(N.current.indeterminate=k)},[k]),x.useEffect(()=>{typeof I=="function"?I(N.current):I&&(I.current=N.current)},[I]);const W=[r,"pkt-input-check"].filter(Boolean).join(" "),Z=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,d?"pkt-sr-only":""].filter(Boolean).join(" "),wt=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),bt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Q=()=>l.jsxs(l.Fragment,{children:[P&&l.jsx("span",{className:bt+" pkt-tag--gray",children:P}),b&&l.jsx("span",{className:bt+" pkt-tag--blue-light",children:y}),w&&l.jsx("span",{className:bt+" pkt-tag--beige",children:C})]});return l.jsx("div",{className:W,children:l.jsxs("div",{className:wt,children:[p==="left"&&l.jsxs("label",{className:Z,htmlFor:s,children:[i," ",Q(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:N,className:`pkt-input-check__input-checkbox ${n?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...g!==void 0?{checked:g}:{defaultChecked:f},...T}),p==="right"&&l.jsxs("label",{className:Z,htmlFor:s,children:[i," ",Q(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});nn.displayName="PktCheckbox";const Ih=Wt({tagName:"pkt-combobox",elementClass:tt,react:x,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),rn=x.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Ih,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));rn.displayName="PktCombobox";const li=Wt({tagName:"pkt-consent",elementClass:Ut,react:x,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});li.displayName="PktConsent";const Lh=Wt({tagName:"pkt-datepicker",elementClass:st,react:x,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),on=x.forwardRef(({helptext:s,...t},e)=>l.jsx(Lh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));on.displayName="PktDatepicker";const Bh=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:a=!1,personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:d=null,googleAnalyticsId:p=null,devMode:f=!1,cookieDomain:g=null,cookieSecure:k=null,cookieExpiryDays:b=null,onToggleConsent:y=w=>{console.log(w.detail)}})=>{var C,P;const w=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:w,"data-mode":"dark",children:l.jsxs("div",{className:"pkt-footer__container",children:[l.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(C=s.links)==null?void 0:C.map((T,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${T.external?"pkt-link--external":""}`,href:T.href,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),T.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(P=t.links)==null?void 0:P.map((T,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${T.external?"pkt-link--external":""}`,href:T.href,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),T.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),l.jsxs("ul",{className:"pkt-footer__list",children:[l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:n,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:r,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(li,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:p,devMode:f,cookieDomain:g,cookieSecure:k,cookieExpiryDays:b,onToggleConsent:y})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(T=>T.language).map((T,I)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:T.href,"aria-label":`til ${T.language} versjon av nettsiden`,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:T.language})},`sociallinks-language-${I}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(T=>T.iconName).map((T,I)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:T.href,"aria-label":`til ${T.iconName}`,className:"pkt-footer__social-icon-link",target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(B,{className:"pkt-footer__social-icon",name:T.iconName})})},`sociallinks-${I}`))})]})]})})},Fh=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:a=!1,hotjarId:n=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:d=null,cookieSecure:p=null,cookieExpiryDays:f=null,onToggleConsent:g=b=>{console.log(b.detail)},className:k})=>{const b=[k,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((y,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${y.external?" pkt-link--external":""}`,href:y.href,target:y.openInNewTab||t?"_blank":"_self",rel:y.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),y.text]})},w)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),a&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(li,{triggerType:"footerlink",hotjarId:n,googleAnalyticsId:r,devMode:h,cookieDomain:d,cookieSecure:p,cookieExpiryDays:f,onToggleConsent:g})})]})})})},Vh=x.forwardRef(({className:s,logoLink:t="https://www.oslo.kommune.no/",serviceName:e,fixed:i=!0,scrollToHide:a=!0,user:n,userMenu:r,representing:h,userOptions:d,userMenuFooter:p,canChangeRepresentation:f=!0,showMenuButton:g=!1,showLogOutButton:k=!1,openMenu:b,logOut:y,changeRepresentation:w,children:C,...P},T)=>{const I=x.useMemo(()=>typeof(n==null?void 0:n.lastLoggedIn)=="string"?n.lastLoggedIn:n!=null&&n.lastLoggedIn?new Date(n.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[n]),[N,W]=x.useState(!1),[Z,wt]=x.useState(0),[bt,Q]=x.useState(!1),rt=x.useRef(null);x.useEffect(()=>(document&&(document.addEventListener("mouseup",Vt),window.addEventListener("scroll",ot)),()=>{document&&(document.removeEventListener("mouseup",Vt),window.removeEventListener("scroll",ot))}));const Ft=()=>{Q(!bt)},Vt=F=>{rt.current&&!rt.current.contains(F.target)&&Q(!1)},ot=()=>{if(a){const F=window.pageYOffset||document.documentElement.scrollTop;if(F<0||Math.abs(F-Z)<60)return;W(F>Z),wt(F)}};return l.jsxs("header",{...P,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:pt(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":N}),ref:T,children:[l.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?l.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:l.jsx(B,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.20/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(B,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.20/logos/"})}),l.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:e})]}),l.jsx("nav",{className:"pkt-header__actions",children:l.jsxs("ul",{className:"pkt-header__actions-row",children:[g&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(n||h)&&l.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${bt&&!N?"pkt-header--open-dropdown":""}`,ref:rt,children:[l.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":bt,onClick:Ft,children:[l.jsx(B,{name:"user",className:"pkt-btn__icon"}),l.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(h==null?void 0:h.name)||(n==null?void 0:n.name)}),l.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(h==null?void 0:h.shortname)||(n==null?void 0:n.shortname)}),l.jsx(B,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(B,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),l.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[n&&l.jsxs("li",{children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:n.name}),n.lastLoggedIn&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:I})]})]}),r&&l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:r.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userMenu-${At}`))})}),(h||f)&&l.jsxs("li",{children:[h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:h.name}),h.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",h.orgNumber]})]}),l.jsx("ul",{className:"pkt-list mt-size-16",children:f&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:w,children:[l.jsx(B,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!k)&&l.jsxs(l.Fragment,{children:[d==null?void 0:d.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userOptions-${At}`)),!k&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[l.jsx(B,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&l.jsx("li",{className:"footer",children:l.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsx("a",{href:F.target,className:"pkt-link",children:F.title}):l.jsx("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:F.title})},`userMenuFooter-${At}`))})})]})]}),C&&l.jsx("li",{children:C}),k&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),jh=Wt({tagName:"pkt-heading",elementClass:Pe,react:x,displayName:"PktHeading"}),ln=x.forwardRef(({children:s,...t},e)=>l.jsx(jh,{"data-testid":"pkt-heading",...t,ref:e,children:s}));ln.displayName="PktHeading";const Hh=Wt({tagName:"pkt-helptext",elementClass:oe,react:x,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),hn=x.forwardRef(({children:s,...t},e)=>l.jsx(Hh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));hn.displayName="PktHelptext";const dn=x.forwardRef(({label:s,id:t,children:e,...i},a)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:a}),e]}));dn.displayName="PktInput";const Bs=x.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:a,counter:n,counterCurrent:r=0,counterMaxLength:h,optionalTag:d=!1,optionalText:p="Valgfritt",requiredTag:f=!1,requiredText:g="Må fylles ut",tagText:k=null,hasError:b=!1,errorMessage:y,disabled:w=!1,inline:C=!1,ariaDescribedby:P,useWrapper:T=!0,children:I,className:N="",hasFieldset:W=!1,role:Z="group",counterPosition:wt="bottom"},bt)=>{const[Q,rt]=x.useState(!1),Ft=P||(e?`${s}-helptext`:void 0),Vt=!!n,ot=Vt&&wt==="top",F=Vt&&wt==="bottom",At=()=>rt(ut=>!ut),ae=["pkt-inputwrapper",N,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",C?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),de=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ne=()=>Vt?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,He=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:de+" pkt-tag--gray",children:k}),d&&l.jsx("span",{className:de+" pkt-tag--blue-light",children:p}),f&&l.jsx("span",{className:de+" pkt-tag--beige",children:g})]}),hs=()=>{const ut=l.jsxs(l.Fragment,{children:[t," ",He()]});return T?W?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ut}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Ft,id:`${s}-label`,children:ut}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":Ft,id:`${s}-label`,children:t})},ce=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&T&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(je,{skin:"tertiary",size:"small",variant:"icon-right",iconName:Q?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:At,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:a??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${Q?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),zt=l.jsxs(l.Fragment,{children:[hs(),ce(),ot&&l.jsx(ne,{}),I,F&&l.jsx(ne,{}),b&&y&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(Li,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:y})})]});return l.jsx("div",{className:ae,ref:bt,role:Z,children:W?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Ft,children:zt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:zt})})});Bs.displayName="PktInputWrapper";const cn=({href:s,iconName:t,className:e,iconPosition:i,external:a,target:n,children:r,...h})=>{const d={"pkt-link":!0,"pkt-link--icon-left":!!t&&i==="left"||!!(t&&!i),"pkt-link--icon-right":!!t&&i==="right","pkt-link--external":a};return l.jsxs("a",{...h,className:pt(d,e),href:s,target:n,rel:a?"noopener noreferrer":void 0,children:[t&&l.jsx(B,{name:t,className:"pkt-link__icon"}),r]})};cn.displayName="PktLink";const pn=({children:s,skin:t,title:e,href:i,iconName:a,openInNewTab:n,external:r,className:h,...d})=>{const p=["pkt-linkcard",t&&`pkt-linkcard--${t}`].filter(Boolean).join(" "),f=["pkt-linkcard__title",r&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return l.jsxs("a",{...d,href:i,className:pt(p,h),target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[a&&l.jsx(B,{className:"pkt-link__icon",name:a}),e&&l.jsx("div",{className:pt(f),children:e}),l.jsx("div",{className:"pkt-linkcard__text",children:s})]})};pn.displayName="PktLinkCard";const Uh=Wt({tagName:"pkt-loader",elementClass:Yt,react:x,displayName:"PktLoader",events:{}}),un=x.forwardRef(({children:s,...t},e)=>l.jsx(Uh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));un.displayName="PktLoader";const fn=({children:s,className:t,skin:e,title:i,compact:a,closable:n,onClose:r,...h})=>{const[d,p]=x.useState(!1),f={"pkt-messagebox":!0,"pkt-messagebox--compact":a,[`pkt-messagebox--${e}`]:e,"pkt-messagebox--closable":n,"pkt-hide":d},g=x.createRef(),k=x.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:pt(f,t),ref:g,children:[n&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:k,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(B,{name:"close",className:"pkt-link__icon"})})}),i&&l.jsx("div",{className:"pkt-messagebox__title",children:i}),l.jsx("div",{className:"pkt-messagebox__text",children:s})]})};fn.displayName="PktMessagebox";const qh=Wt({tagName:"pkt-modal",elementClass:Lt,react:x,displayName:"PktModal",events:{}}),gn=x.forwardRef(({children:s,...t},e)=>l.jsx(qh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));gn.displayName="PktModal";const zh=Wt({tagName:"pkt-progressbar",elementClass:it,react:x,displayName:"PktProgressbar",events:{}}),mn=x.forwardRef(({children:s,...t},e)=>l.jsx(zh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));mn.displayName="PktProgressbar";const vn=x.forwardRef(({id:s,name:t,label:e,className:i,hasTile:a=!1,disabled:n=!1,checkHelptext:r,hasError:h=!1,defaultChecked:d,checked:p,optionalTag:f,optionalText:g,requiredTag:k,requiredText:b,tagText:y,...w},C)=>{const P=[i,"pkt-input-check"].filter(Boolean).join(" "),T=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),I=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),N=["pkt-input-check__input-label",n?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),W=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Z=()=>l.jsxs(l.Fragment,{children:[y&&l.jsx("span",{className:W+" pkt-tag--gray",children:y}),f&&l.jsx("span",{className:W+" pkt-tag--blue-light",children:g}),k&&l.jsx("span",{className:W+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:P,children:l.jsxs("div",{className:T,children:[l.jsx("input",{ref:C,id:s,type:"radio",name:t,disabled:n,className:I,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:N,htmlFor:s,children:[e," ",Z(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});vn.displayName="PktRadioButton";const Wh=x.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:a,name:n,placeholder:r="Søk…",suggestions:h,value:d="",action:p,method:f,onChange:g,onSearch:k,onSuggestionClick:b,...y},w)=>{const C=(N,W)=>{N?N():b&&b(W)},P=N=>{d=N.target.value},T=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let I;return p?I=N=>l.jsx("form",{role:"search",className:T,action:p,method:f,children:N}):I=N=>l.jsx("div",{role:"search",className:T,children:N}),I(l.jsxs(l.Fragment,{children:[a&&l.jsx("label",{htmlFor:a?i:void 0,className:a?"pkt-inputwrapper__label":"",children:a}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:n||i,id:i,placeholder:r,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:w,"aria-controls":`${i}-suggestions`,onChange:g||P,onKeyUp:k&&(N=>{N.key==="Enter"&&(N.preventDefault(),k(d))}),...y}),l.jsx(je,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:k&&(N=>{N.preventDefault(),k(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((N,W)=>l.jsx("li",{children:x.createElement(N.href?"a":N.onClick?"button":"div",{href:N.href,className:`pkt-searchinput__suggestion ${N.onClick?"pkt-link-button":""} ${N.href||N.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:N.onClick?"button":void 0,onClick:()=>C(N.onClick,W),onKeyUp:Z=>Z.key==="Enter"&&C(N.onClick,W)},l.jsxs(l.Fragment,{children:[N.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:N.title}),N.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:N.text})]}))},`search-suggestion-${W}`))})]}))}),Rh=x.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:a=!1,errorMessage:n,hasError:r,helptext:h,helptextDropdown:d,helptextDropdownButton:p,id:f,inline:g=!1,fullwidth:k=!1,label:b,name:y,optionalTag:w=!1,optionalText:C,requiredTag:P=!1,requiredText:T,tagText:I,...N},W)=>{const Z=[i,"pkt-select"].join(" ");return l.jsx(Bs,{className:Z,forId:`${f}-input`,label:b,helptext:h,helptextDropdown:d,helptextDropdownButton:p,optionalTag:w,optionalText:C,requiredTag:P,requiredText:T,tagText:I,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:W,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${f}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${f}-input`,name:y||f,...N,children:e})})}),Kh=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),Gh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Yh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Zh=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:pt("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:pt("pkt-step__indicator"),children:e==="current"?Gh:e==="completed"?Yh:Kh}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Xh=x.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:a=!0,orientation:n="vertical",...r},h)=>{const d=pt(t,"pkt-stepper",n==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=x.Children.map(e,(f,g)=>x.isValidElement(f)?x.cloneElement(f,{className:pt(f.props.className,{"pkt-step--hideStep":i&&g!==s,"pkt-step--hideContent":a&&g!==s})}):f);return l.jsx("ol",{"data-testid":"pkt-stepper",className:d,ref:h,...r,children:p})}),Jh=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:a,...n})=>l.jsx("table",{"data-testid":"pkt-table",className:pt(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...n,children:a}),Qh=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:pt(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),td=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:pt(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),ed=({className:s,children:t,...e})=>l.jsx("thead",{className:pt(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),sd=({className:s,children:t,...e})=>l.jsx("th",{className:pt(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),id=({className:s,children:t,...e})=>l.jsx("tr",{className:pt(s,"pkt-table__row",{}),role:"row",...e,children:t}),Bi=x.forwardRef(({children:s,skin:t,textStyle:e,size:i,closeTag:a,className:n,iconName:r,ariaLabel:h,onClose:d,type:p,"aria-description":f,...g},k)=>{const[b,y]=x.useState(!1),w=x.useCallback(()=>{y(!0),d&&d()},[y]),C=x.useRef(null),[P,T]=x.useState("");x.useEffect(()=>{var Z,wt;T(((wt=(Z=C.current)==null?void 0:Z.textContent)==null?void 0:wt.trim())??"")},[s]);const I=x.useMemo(()=>{if(a&&!h)return P&&`Klikk for å fjerne ${P}`||f},[a,h,P,f]),N={"pkt-tag":!0,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,[`pkt-tag--${e}`]:!!e},W={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${e}`]:!!e,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,"pkt-btn--icons-right-and-left":a&&!!r,"pkt-hide":b};return a?l.jsxs("button",{...g,className:pt(W,n),type:p,onClick:w,"aria-label":h,"aria-description":I,ref:k,children:[r&&l.jsx(B,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:C,children:s}),l.jsx(B,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...g,className:pt(N,n),ref:k,children:[r&&l.jsx(B,{className:"pkt-tag__icon",name:r,"aria-hidden":"true"}),l.jsx("span",{ref:C,children:s})]})});Bi.displayName="PktTag";const Fi=x.forwardRef(({children:s,active:t,href:e,onClick:i,icon:a,controls:n,tag:r,tagSkin:h,index:d=0},p)=>{const{arrowNav:f,registerTabRef:g,handleKeyPress:k,selectTab:b}=ad(),w={"aria-selected":f?!!t:void 0,"aria-controls":n,role:f?"tab":void 0,onKeyUp:P=>k(d,P),onClick:P=>{b(d),i==null||i(P)},tabIndex:t||!f?void 0:-1,ref:P=>{g(d,P),typeof p=="function"?p(P):p&&(p.current=P)}},C=l.jsxs(l.Fragment,{children:[a&&l.jsx(B,{name:a,className:"pkt-icon--small"}),s,r&&l.jsx(Bi,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...w,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:C}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:C})});Fi.displayName="PktTabItem";const bn=x.createContext(null),ad=()=>{const s=x.useContext(bn);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},nd=x.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:a},n)=>{const r=x.useRef([]),h=s&&!t,p=a&&x.Children.count(a)>0?x.Children.count(a):(e==null?void 0:e.length)||0;x.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const f=y=>{const w=e==null?void 0:e[y];w!=null&&w.action&&w.action(y),i&&i(y)},g=(y,w)=>{var C,P;h&&(w.code==="ArrowLeft"&&y!==0&&((C=r.current[y-1])==null||C.focus()),w.code==="ArrowRight"&&y<p-1&&((P=r.current[y+1])==null||P.focus()),(w.code==="ArrowDown"||w.code==="Space")&&f(y))},k=(y,w)=>{r.current[y]=w},b=e==null?void 0:e.map((y,w)=>{var C,P;return l.jsx(Fi,{active:y.active,href:y.href,onClick:()=>f(w),icon:y.icon,controls:y.controls,tag:(C=y.tag)==null?void 0:C.text,tagSkin:(P=y.tag)==null?void 0:P.skin,index:w,children:y.text},w)});return l.jsx(bn.Provider,{value:{arrowNav:h,registerTabRef:k,handleKeyPress:g,selectTab:f},children:l.jsx("div",{className:"pkt-tabs",ref:n,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:a||b})})})}),rd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:a,className:n,disabled:r,errorMessage:h,hasError:d,helptext:p,helptextDropdown:f,helptextDropdownButton:g,inline:k,fullwidth:b=!1,label:y,name:w,optionalTag:C=!1,optionalText:P,requiredTag:T=!1,requiredText:I,tagText:N=null,placeholder:W,rows:Z,useWrapper:wt=!0,onChange:bt,value:Q,autoComplete:rt="off",minLength:Ft,maxLength:Vt,readOnly:ot=!1,skipForwardTestid:F=!1,...At},ae)=>{const de=[n,"pkt-textinput","pkt-textarea"].join(" "),ne=`${s}-input`,He=`${ne}-label`,hs=e||He,[ce,zt]=x.useState(0),ut=Ue=>{var qe,pe;if(i&&zt(((pe=(qe=Ue.currentTarget)==null?void 0:qe.value)==null?void 0:pe.length)||0),bt)return bt(Ue)};return x.useEffect(()=>{Q!==void 0&&zt((Q==null?void 0:Q.length)||0)},[Q]),l.jsx(Bs,{ariaDescribedby:t,className:de,disabled:r,errorMessage:h,forId:ne,hasError:d,helptext:p,helptextDropdown:f,helptextDropdownButton:g,inline:k,label:y,optionalTag:C,optionalText:P,requiredTag:T,requiredText:I,tagText:N,useWrapper:wt,counter:i,counterCurrent:ce,counterMaxLength:a,children:l.jsx("textarea",{ref:ae,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${a&&ce>a?"pkt-input--counter-error":""}`,name:`${w||s}`,id:ne,placeholder:W,disabled:r,rows:Z,"aria-labelledby":hs,"aria-invalid":d,"aria-errormessage":`${s}-error`,...At,onChange:ut,value:Q,autoComplete:rt,minLength:Ft,maxLength:Vt,"data-skip-forward-testid":F?"true":void 0})})}),od=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:a,counterMaxLength:n,className:r,disabled:h=!1,errorMessage:d,hasError:p=!1,helptext:f,helptextDropdown:g,helptextDropdownButton:k,iconNameRight:b,inline:y=!1,fullwidth:w=!1,label:C,name:P,optionalTag:T=!1,optionalText:I,requiredTag:N=!1,requiredText:W,tagText:Z=null,placeholder:wt,prefix:bt,suffix:Q,type:rt="text",useWrapper:Ft=!0,omitSearchIcon:Vt=!1,value:ot,minLength:F,maxLength:At,min:ae,max:de,step:ne,size:He,readonly:hs,required:ce,dataTestid:zt,onChange:ut,skipForwardTestid:Ue=!1,...qe},pe)=>{const ji=[r,"pkt-textinput"].join(" "),hi=rt==="search"&&!b&&!Vt,Hi=rt==="date"&&ot?ot.slice(0,10):ot,[di,ds]=x.useState((ot==null?void 0:ot.length)||0),cs=`${s}`,Vs=`${cs}-label`,ci=e||Vs,Ui=$e=>{var pi,ui;a&&ds(((ui=(pi=$e.currentTarget)==null?void 0:pi.value)==null?void 0:ui.length)||0),ut&&ut($e)};return x.useEffect(()=>{ot!==void 0&&ds((ot==null?void 0:ot.length)||0)},[ot]),l.jsx(Bs,{ariaDescribedby:t,className:ji,disabled:h,errorMessage:d,forId:cs,hasError:p,helptext:f,helptextDropdown:g,helptextDropdownButton:k,inline:y,label:C,optionalTag:T,optionalText:I,requiredTag:N,requiredText:W,tagText:Z,useWrapper:Ft,counter:a,counterCurrent:di,counterMaxLength:n,children:l.jsxs("div",{className:"pkt-input__container","data-testid":zt,"data-skip-forward-testid":Ue?"true":void 0,children:[bt&&l.jsx("div",{className:"pkt-input-prefix",children:bt}),l.jsx("input",{...qe,ref:pe,className:`pkt-input ${w?"pkt-input--fullwidth":""} ${n&&di>n?"pkt-input--counter-error":""}`,type:rt,name:`${P||s}`,value:Hi,id:cs,placeholder:wt,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":ci,min:ae,max:de,onChange:Ui,step:ne,minLength:F,maxLength:At,size:He,required:ce}),Q&&l.jsxs("p",{className:"pkt-input-suffix",children:[Q,b&&l.jsx(B,{className:"pkt-input-suffix-icon",name:b}),hi&&l.jsx(B,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!Q&&b&&l.jsx(B,{className:"pkt-input-icon",name:b}),!Q&&hi&&l.jsx(B,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});var os=window.CustomEvent;(!os||typeof os=="object")&&(os=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},os.prototype=window.Event.prototype);function yn(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function ld(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,a){return!(t[i]===void 0||t[i]===a)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function Fs(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function kn(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function hd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function Vi(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function $n(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var a=s.querySelectorAll("*"),n=0;n<a.length&&!(a[n].tagName&&a[n].shadowRoot&&(i=$n(a[n].shadowRoot),i));n++);return i}function _n(s){return s.isConnected||document.body.contains(s)}function wn(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=z.formSubmitter;if(!e){var i=s.target,a="getRootNode"in i&&i.getRootNode()||document;e=a.activeElement}return!e||e.form!==t?null:e}function dd(s){if(!s.defaultPrevented){var t=s.target,e=z.imagemapUseValue,i=wn(s);e===null&&i&&(e=i.value);var a=Fs(t);if(a){var n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&(s.preventDefault(),e!=null?a.close(e):a.close())}}}function xn(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",dd,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),a,n=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(a),a=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,n)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}xn.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&_n(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),z.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=$n(this.dialog_)),kn(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!_n(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!z.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");ld(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,z.needsCentering(this.dialog_)?(z.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new os("close",{bubbles:!1,cancelable:!1});yn(this.dialog_,t)}};var z={};if(z.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},z.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var a=0;a<i.length;++a){var n=i[a],r=null;try{r=document.querySelectorAll(n.selectorText)}catch{}if(!(!r||!hd(r,s))){var h=n.style.getPropertyValue("top"),d=n.style.getPropertyValue("bottom");if(h&&h!=="auto"||d&&d!=="auto")return!0}}}return!1},z.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!z.isInlinePositionSetByStylesheet(s)},z.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new xn(s)},z.registerDialog=function(s){s.showModal||z.forceRegisterDialog(s)},z.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var a=0,n;n=i.removedNodes[a];++a){if(n instanceof Element)n.localName==="dialog"&&e.push(n);else continue;e=e.concat(n.querySelectorAll("dialog"))}}),e.length&&s(e)}))},z.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},z.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},z.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var a=i.dialog.parentNode||document.body;a.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},z.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=Fs(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},z.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),kn(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,a=i.compareDocumentPosition(t);return a&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},z.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new os("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&yn(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},z.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},z.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},z.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},z.dm=new z.DialogManager,z.formSubmitter=null,z.imagemapUseValue=null,window.HTMLDialogElement===void 0){var Sn=document.createElement("form");if(Sn.setAttribute("method","dialog"),Sn.method!=="dialog"){var ls=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(ls){var cd=ls.get;ls.get=function(){return Vi(this)?"dialog":cd.call(this)};var pd=ls.set;ls.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):pd.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",ls)}}document.addEventListener("click",function(s){if(z.formSubmitter=null,z.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!Vi(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;z.imagemapUseValue=s.offsetX+","+s.offsetY}var a=Fs(t);a&&(z.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=Fs(t);if(!e){var i=wn(s),a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&s.preventDefault()}});var ud=HTMLFormElement.prototype.submit,fd=function(){if(!Vi(this))return ud.call(this);var s=Fs(this);s&&s.close()};HTMLFormElement.prototype.submit=fd}const gd=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));O.PktAccordion=Ki,O.PktAccordionItem=tn,O.PktAlert=Li,O.PktBackLink=sn,O.PktBreadcrumbs=Oh,O.PktButton=je,O.PktCard=an,O.PktCheckbox=nn,O.PktCombobox=rn,O.PktConsent=li,O.PktDatepicker=on,O.PktFooter=Bh,O.PktFooterSimple=Fh,O.PktHeader=Vh,O.PktHeading=ln,O.PktHelptext=hn,O.PktIcon=B,O.PktInput=dn,O.PktInputWrapper=Bs,O.PktLink=cn,O.PktLinkCard=pn,O.PktLoader=un,O.PktMessagebox=fn,O.PktModal=gn,O.PktProgressbar=mn,O.PktRadioButton=vn,O.PktSearchInput=Wh,O.PktSelect=Rh,O.PktStep=Zh,O.PktStepper=Xh,O.PktTabItem=Fi,O.PktTable=Jh,O.PktTableBody=Qh,O.PktTableDataCell=td,O.PktTableHeader=ed,O.PktTableHeaderCell=sd,O.PktTableRow=id,O.PktTabs=nd,O.PktTag=Bi,O.PktTextarea=rd,O.PktTextinput=od,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
1457
+ */var en;function Mh(){return en||(en=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var n="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(n=a(n,i(h)))}return n}function i(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var h in n)t.call(n,h)&&n[h]&&(r=a(r,h));return r}function a(n,r){return r?n?n+" "+r:n+r:n}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(Ii)),Ii.exports}var Ph=Mh();const pt=Eh(Ph),Li=({children:s,closeAlert:t,compact:e,title:i,date:a,ariaLive:n,"aria-live":r="polite",role:h="status",skin:d="info",className:p,...f})=>{const[g,k]=x.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":g},y={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},w=x.useCallback(()=>{k(!0),f.onClose&&f.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[f.onClose,k]),C=n||r;return l.jsx("div",{...f,"aria-live":C,role:h,className:pt(b,p),children:l.jsxs("div",{className:pt(y),children:[l.jsx(B,{className:"pkt-alert__icon","aria-hidden":"true",name:d==="info"?"alert-information":`alert-${d}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(je,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:w,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),a&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",a]})]})})};Li.displayName="PktAlert";const sn=Wt({tagName:"pkt-backlink",elementClass:Xe,react:x,displayName:"PktBackLink"});sn.displayName="PktBackLink";const Oh=x.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},a)=>{const n=s,r=n[n.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:a,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:n.map((d,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===n.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?l.jsxs(Wi.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(B,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):l.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(B,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(Wi.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(B,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(B,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.22/animations/";const je=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",iconPath:a,secondIconPath:n,size:r="medium",fullWidth:h=!1,fullWidthOnMobile:d=!1,skin:p="primary",type:f="button",variant:g="label-only",state:k,color:b,isLoading:y=void 0,disabled:w=void 0,loadingAnimationPath:C=window.pktAnimationPath,...P},T)=>{const I=[t,"pkt-btn",r&&`pkt-btn--${r}`,h&&"pkt-btn--full",d&&"pkt-btn--full-small",p&&`pkt-btn--${p}`,g&&`pkt-btn--${g}`,b&&`pkt-btn--${b}`,k&&`pkt-btn--${k}`,y&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...P,"aria-busy":y||void 0,"aria-disabled":w||void 0,disabled:w,className:I,type:f,ref:T,children:[y&&l.jsx(B,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:C}),g!=="label-only"&&l.jsx(B,{className:"pkt-btn__icon",name:e,...a&&{path:a}}),l.jsx("span",{className:"pkt-btn__text",children:s}),g==="icons-right-and-left"&&l.jsx(B,{className:"pkt-btn__icon",name:i,...n&&{path:n}})]})});je.displayName="PktButton";const Dh=Wt({tagName:"pkt-card",elementClass:ht,react:x,displayName:"PktCard",events:{}}),an=x.forwardRef(({children:s,...t},e)=>l.jsx(Dh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));an.displayName="PktCard";const nn=x.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:a,hasError:n=!1,className:r,isSwitch:h=!1,hideLabel:d=!1,labelPosition:p="right",defaultChecked:f,checked:g,indeterminate:k,optionalTag:b,optionalText:y="Valgfritt",requiredTag:w,requiredText:C="Må fylles ut",tagText:P,...T},I)=>{const N=x.useRef(null);x.useEffect(()=>{N.current&&k!==void 0&&(N.current.indeterminate=k)},[k]),x.useEffect(()=>{typeof I=="function"?I(N.current):I&&(I.current=N.current)},[I]);const W=[r,"pkt-input-check"].filter(Boolean).join(" "),Z=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,d?"pkt-sr-only":""].filter(Boolean).join(" "),wt=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),bt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Q=()=>l.jsxs(l.Fragment,{children:[P&&l.jsx("span",{className:bt+" pkt-tag--gray",children:P}),b&&l.jsx("span",{className:bt+" pkt-tag--blue-light",children:y}),w&&l.jsx("span",{className:bt+" pkt-tag--beige",children:C})]});return l.jsx("div",{className:W,children:l.jsxs("div",{className:wt,children:[p==="left"&&l.jsxs("label",{className:Z,htmlFor:s,children:[i," ",Q(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:N,className:`pkt-input-check__input-checkbox ${n?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...g!==void 0?{checked:g}:{defaultChecked:f},...T}),p==="right"&&l.jsxs("label",{className:Z,htmlFor:s,children:[i," ",Q(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});nn.displayName="PktCheckbox";const Ih=Wt({tagName:"pkt-combobox",elementClass:tt,react:x,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),rn=x.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Ih,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));rn.displayName="PktCombobox";const li=Wt({tagName:"pkt-consent",elementClass:Ut,react:x,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});li.displayName="PktConsent";const Lh=Wt({tagName:"pkt-datepicker",elementClass:st,react:x,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),on=x.forwardRef(({helptext:s,...t},e)=>l.jsx(Lh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));on.displayName="PktDatepicker";const Bh=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:a=!1,personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:d=null,googleAnalyticsId:p=null,devMode:f=!1,cookieDomain:g=null,cookieSecure:k=null,cookieExpiryDays:b=null,onToggleConsent:y=w=>{console.log(w.detail)}})=>{var C,P;const w=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:w,"data-mode":"dark",children:l.jsxs("div",{className:"pkt-footer__container",children:[l.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(C=s.links)==null?void 0:C.map((T,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${T.external?"pkt-link--external":""}`,href:T.href,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),T.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(P=t.links)==null?void 0:P.map((T,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${T.external?"pkt-link--external":""}`,href:T.href,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),T.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),l.jsxs("ul",{className:"pkt-footer__list",children:[l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:n,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:r,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(li,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:p,devMode:f,cookieDomain:g,cookieSecure:k,cookieExpiryDays:b,onToggleConsent:y})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(T=>T.language).map((T,I)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:T.href,"aria-label":`til ${T.language} versjon av nettsiden`,target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:T.language})},`sociallinks-language-${I}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(T=>T.iconName).map((T,I)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:T.href,"aria-label":`til ${T.iconName}`,className:"pkt-footer__social-icon-link",target:T.openInNewTab||a?"_blank":"_self",rel:T.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(B,{className:"pkt-footer__social-icon",name:T.iconName})})},`sociallinks-${I}`))})]})]})})},Fh=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:a=!1,hotjarId:n=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:d=null,cookieSecure:p=null,cookieExpiryDays:f=null,onToggleConsent:g=b=>{console.log(b.detail)},className:k})=>{const b=[k,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((y,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${y.external?" pkt-link--external":""}`,href:y.href,target:y.openInNewTab||t?"_blank":"_self",rel:y.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),y.text]})},w)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(B,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),a&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(li,{triggerType:"footerlink",hotjarId:n,googleAnalyticsId:r,devMode:h,cookieDomain:d,cookieSecure:p,cookieExpiryDays:f,onToggleConsent:g})})]})})})},Vh=x.forwardRef(({className:s,logoLink:t="https://www.oslo.kommune.no/",serviceName:e,fixed:i=!0,scrollToHide:a=!0,user:n,userMenu:r,representing:h,userOptions:d,userMenuFooter:p,canChangeRepresentation:f=!0,showMenuButton:g=!1,showLogOutButton:k=!1,openMenu:b,logOut:y,changeRepresentation:w,children:C,...P},T)=>{const I=x.useMemo(()=>typeof(n==null?void 0:n.lastLoggedIn)=="string"?n.lastLoggedIn:n!=null&&n.lastLoggedIn?new Date(n.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[n]),[N,W]=x.useState(!1),[Z,wt]=x.useState(0),[bt,Q]=x.useState(!1),rt=x.useRef(null);x.useEffect(()=>(document&&(document.addEventListener("mouseup",Vt),window.addEventListener("scroll",ot)),()=>{document&&(document.removeEventListener("mouseup",Vt),window.removeEventListener("scroll",ot))}));const Ft=()=>{Q(!bt)},Vt=F=>{rt.current&&!rt.current.contains(F.target)&&Q(!1)},ot=()=>{if(a){const F=window.pageYOffset||document.documentElement.scrollTop;if(F<0||Math.abs(F-Z)<60)return;W(F>Z),wt(F)}};return l.jsxs("header",{...P,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:pt(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":N}),ref:T,children:[l.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?l.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:l.jsx(B,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.22/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(B,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.22/logos/"})}),l.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:e})]}),l.jsx("nav",{className:"pkt-header__actions",children:l.jsxs("ul",{className:"pkt-header__actions-row",children:[g&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(n||h)&&l.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${bt&&!N?"pkt-header--open-dropdown":""}`,ref:rt,children:[l.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":bt,onClick:Ft,children:[l.jsx(B,{name:"user",className:"pkt-btn__icon"}),l.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(h==null?void 0:h.name)||(n==null?void 0:n.name)}),l.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(h==null?void 0:h.shortname)||(n==null?void 0:n.shortname)}),l.jsx(B,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(B,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),l.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[n&&l.jsxs("li",{children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:n.name}),n.lastLoggedIn&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:I})]})]}),r&&l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:r.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userMenu-${At}`))})}),(h||f)&&l.jsxs("li",{children:[h&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:h.name}),h.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",h.orgNumber]})]}),l.jsx("ul",{className:"pkt-list mt-size-16",children:f&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:w,children:[l.jsx(B,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!k)&&l.jsxs(l.Fragment,{children:[d==null?void 0:d.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:[F.iconName&&l.jsx(B,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userOptions-${At}`)),!k&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[l.jsx(B,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&l.jsx("li",{className:"footer",children:l.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((F,At)=>l.jsx("li",{children:typeof F.target=="string"?l.jsx("a",{href:F.target,className:"pkt-link",children:F.title}):l.jsx("button",{className:"pkt-link-button pkt-link",onClick:F.target,children:F.title})},`userMenuFooter-${At}`))})})]})]}),C&&l.jsx("li",{children:C}),k&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),jh=Wt({tagName:"pkt-heading",elementClass:ye,react:x,displayName:"PktHeading"}),ln=x.forwardRef(({children:s,...t},e)=>l.jsx(jh,{"data-testid":"pkt-heading",...t,ref:e,children:s}));ln.displayName="PktHeading";const Hh=Wt({tagName:"pkt-helptext",elementClass:oe,react:x,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),hn=x.forwardRef(({children:s,...t},e)=>l.jsx(Hh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));hn.displayName="PktHelptext";const dn=x.forwardRef(({label:s,id:t,children:e,...i},a)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:a}),e]}));dn.displayName="PktInput";const Bs=x.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:a,counter:n,counterCurrent:r=0,counterMaxLength:h,optionalTag:d=!1,optionalText:p="Valgfritt",requiredTag:f=!1,requiredText:g="Må fylles ut",tagText:k=null,hasError:b=!1,errorMessage:y,disabled:w=!1,inline:C=!1,ariaDescribedby:P,useWrapper:T=!0,children:I,className:N="",hasFieldset:W=!1,role:Z="group",counterPosition:wt="bottom"},bt)=>{const[Q,rt]=x.useState(!1),Ft=P||(e?`${s}-helptext`:void 0),Vt=!!n,ot=Vt&&wt==="top",F=Vt&&wt==="bottom",At=()=>rt(ut=>!ut),ae=["pkt-inputwrapper",N,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",C?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),de=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ne=()=>Vt?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,He=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:de+" pkt-tag--gray",children:k}),d&&l.jsx("span",{className:de+" pkt-tag--blue-light",children:p}),f&&l.jsx("span",{className:de+" pkt-tag--beige",children:g})]}),ds=()=>{const ut=l.jsxs(l.Fragment,{children:[t," ",He()]});return T?W?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ut}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Ft,id:`${s}-label`,children:ut}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":Ft,id:`${s}-label`,children:t})},ce=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&T&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(je,{skin:"tertiary",size:"small",variant:"icon-right",iconName:Q?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:At,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:a??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${Q?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),zt=l.jsxs(l.Fragment,{children:[ds(),ce(),ot&&l.jsx(ne,{}),I,F&&l.jsx(ne,{}),b&&y&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(Li,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:y})})]});return l.jsx("div",{className:ae,ref:bt,role:Z,children:W?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Ft,children:zt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:zt})})});Bs.displayName="PktInputWrapper";const cn=({href:s,iconName:t,className:e,iconPosition:i,external:a,target:n,children:r,...h})=>{const d={"pkt-link":!0,"pkt-link--icon-left":!!t&&i==="left"||!!(t&&!i),"pkt-link--icon-right":!!t&&i==="right","pkt-link--external":a};return l.jsxs("a",{...h,className:pt(d,e),href:s,target:n,rel:a?"noopener noreferrer":void 0,children:[t&&l.jsx(B,{name:t,className:"pkt-link__icon"}),r]})};cn.displayName="PktLink";const pn=({children:s,skin:t,title:e,href:i,iconName:a,openInNewTab:n,external:r,className:h,...d})=>{const p=["pkt-linkcard",t&&`pkt-linkcard--${t}`].filter(Boolean).join(" "),f=["pkt-linkcard__title",r&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return l.jsxs("a",{...d,href:i,className:pt(p,h),target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[a&&l.jsx(B,{className:"pkt-link__icon",name:a}),e&&l.jsx("div",{className:pt(f),children:e}),l.jsx("div",{className:"pkt-linkcard__text",children:s})]})};pn.displayName="PktLinkCard";const Uh=Wt({tagName:"pkt-loader",elementClass:Yt,react:x,displayName:"PktLoader",events:{}}),un=x.forwardRef(({children:s,...t},e)=>l.jsx(Uh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));un.displayName="PktLoader";const fn=({children:s,className:t,skin:e,title:i,compact:a,closable:n,onClose:r,...h})=>{const[d,p]=x.useState(!1),f={"pkt-messagebox":!0,"pkt-messagebox--compact":a,[`pkt-messagebox--${e}`]:e,"pkt-messagebox--closable":n,"pkt-hide":d},g=x.createRef(),k=x.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:pt(f,t),ref:g,children:[n&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:k,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(B,{name:"close",className:"pkt-link__icon"})})}),i&&l.jsx("div",{className:"pkt-messagebox__title",children:i}),l.jsx("div",{className:"pkt-messagebox__text",children:s})]})};fn.displayName="PktMessagebox";const qh=Wt({tagName:"pkt-modal",elementClass:Lt,react:x,displayName:"PktModal",events:{}}),gn=x.forwardRef(({children:s,...t},e)=>l.jsx(qh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));gn.displayName="PktModal";const zh=Wt({tagName:"pkt-progressbar",elementClass:it,react:x,displayName:"PktProgressbar",events:{}}),mn=x.forwardRef(({children:s,...t},e)=>l.jsx(zh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));mn.displayName="PktProgressbar";const vn=x.forwardRef(({id:s,name:t,label:e,className:i,hasTile:a=!1,disabled:n=!1,checkHelptext:r,hasError:h=!1,defaultChecked:d,checked:p,optionalTag:f,optionalText:g,requiredTag:k,requiredText:b,tagText:y,...w},C)=>{const P=[i,"pkt-input-check"].filter(Boolean).join(" "),T=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),I=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),N=["pkt-input-check__input-label",n?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),W=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Z=()=>l.jsxs(l.Fragment,{children:[y&&l.jsx("span",{className:W+" pkt-tag--gray",children:y}),f&&l.jsx("span",{className:W+" pkt-tag--blue-light",children:g}),k&&l.jsx("span",{className:W+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:P,children:l.jsxs("div",{className:T,children:[l.jsx("input",{ref:C,id:s,type:"radio",name:t,disabled:n,className:I,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:N,htmlFor:s,children:[e," ",Z(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});vn.displayName="PktRadioButton";const Wh=x.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:a,name:n,placeholder:r="Søk…",suggestions:h,value:d="",action:p,method:f,onChange:g,onSearch:k,onSuggestionClick:b,...y},w)=>{const C=(N,W)=>{N?N():b&&b(W)},P=N=>{d=N.target.value},T=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let I;return p?I=N=>l.jsx("form",{role:"search",className:T,action:p,method:f,children:N}):I=N=>l.jsx("div",{role:"search",className:T,children:N}),I(l.jsxs(l.Fragment,{children:[a&&l.jsx("label",{htmlFor:a?i:void 0,className:a?"pkt-inputwrapper__label":"",children:a}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:n||i,id:i,placeholder:r,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:w,"aria-controls":`${i}-suggestions`,onChange:g||P,onKeyUp:k&&(N=>{N.key==="Enter"&&(N.preventDefault(),k(d))}),...y}),l.jsx(je,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:k&&(N=>{N.preventDefault(),k(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((N,W)=>l.jsx("li",{children:x.createElement(N.href?"a":N.onClick?"button":"div",{href:N.href,className:`pkt-searchinput__suggestion ${N.onClick?"pkt-link-button":""} ${N.href||N.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:N.onClick?"button":void 0,onClick:()=>C(N.onClick,W),onKeyUp:Z=>Z.key==="Enter"&&C(N.onClick,W)},l.jsxs(l.Fragment,{children:[N.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:N.title}),N.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:N.text})]}))},`search-suggestion-${W}`))})]}))}),Rh=x.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:a=!1,errorMessage:n,hasError:r,helptext:h,helptextDropdown:d,helptextDropdownButton:p,id:f,inline:g=!1,fullwidth:k=!1,label:b,name:y,optionalTag:w=!1,optionalText:C,requiredTag:P=!1,requiredText:T,tagText:I,...N},W)=>{const Z=[i,"pkt-select"].join(" ");return l.jsx(Bs,{className:Z,forId:`${f}-input`,label:b,helptext:h,helptextDropdown:d,helptextDropdownButton:p,optionalTag:w,optionalText:C,requiredTag:P,requiredText:T,tagText:I,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:W,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${f}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${f}-input`,name:y||f,...N,children:e})})}),Kh=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),Gh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Yh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Zh=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:pt("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:pt("pkt-step__indicator"),children:e==="current"?Gh:e==="completed"?Yh:Kh}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Xh=x.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:a=!0,orientation:n="vertical",...r},h)=>{const d=pt(t,"pkt-stepper",n==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=x.Children.map(e,(f,g)=>x.isValidElement(f)?x.cloneElement(f,{className:pt(f.props.className,{"pkt-step--hideStep":i&&g!==s,"pkt-step--hideContent":a&&g!==s})}):f);return l.jsx("ol",{"data-testid":"pkt-stepper",className:d,ref:h,...r,children:p})}),Jh=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:a,...n})=>l.jsx("table",{"data-testid":"pkt-table",className:pt(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...n,children:a}),Qh=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:pt(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),td=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:pt(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),ed=({className:s,children:t,...e})=>l.jsx("thead",{className:pt(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),sd=({className:s,children:t,...e})=>l.jsx("th",{className:pt(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),id=({className:s,children:t,...e})=>l.jsx("tr",{className:pt(s,"pkt-table__row",{}),role:"row",...e,children:t}),Bi=x.forwardRef(({children:s,skin:t,textStyle:e,size:i,closeTag:a,className:n,iconName:r,ariaLabel:h,onClose:d,type:p,"aria-description":f,...g},k)=>{const[b,y]=x.useState(!1),w=x.useCallback(()=>{y(!0),d&&d()},[y]),C=x.useRef(null),[P,T]=x.useState("");x.useEffect(()=>{var Z,wt;T(((wt=(Z=C.current)==null?void 0:Z.textContent)==null?void 0:wt.trim())??"")},[s]);const I=x.useMemo(()=>{if(a&&!h)return P&&`Klikk for å fjerne ${P}`||f},[a,h,P,f]),N={"pkt-tag":!0,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,[`pkt-tag--${e}`]:!!e},W={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${e}`]:!!e,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,"pkt-btn--icons-right-and-left":a&&!!r,"pkt-hide":b};return a?l.jsxs("button",{...g,className:pt(W,n),type:p,onClick:w,"aria-label":h,"aria-description":I,ref:k,children:[r&&l.jsx(B,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:C,children:s}),l.jsx(B,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...g,className:pt(N,n),ref:k,children:[r&&l.jsx(B,{className:"pkt-tag__icon",name:r,"aria-hidden":"true"}),l.jsx("span",{ref:C,children:s})]})});Bi.displayName="PktTag";const Fi=x.forwardRef(({children:s,active:t,href:e,onClick:i,icon:a,controls:n,tag:r,tagSkin:h,index:d=0},p)=>{const{arrowNav:f,registerTabRef:g,handleKeyPress:k,selectTab:b}=ad(),w={"aria-selected":f?!!t:void 0,"aria-controls":n,role:f?"tab":void 0,onKeyUp:P=>k(d,P),onClick:P=>{b(d),i==null||i(P)},tabIndex:t||!f?void 0:-1,ref:P=>{g(d,P),typeof p=="function"?p(P):p&&(p.current=P)}},C=l.jsxs(l.Fragment,{children:[a&&l.jsx(B,{name:a,className:"pkt-icon--small"}),s,r&&l.jsx(Bi,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...w,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:C}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:C})});Fi.displayName="PktTabItem";const bn=x.createContext(null),ad=()=>{const s=x.useContext(bn);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},nd=x.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:a},n)=>{const r=x.useRef([]),h=s&&!t,p=a&&x.Children.count(a)>0?x.Children.count(a):(e==null?void 0:e.length)||0;x.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const f=y=>{const w=e==null?void 0:e[y];w!=null&&w.action&&w.action(y),i&&i(y)},g=(y,w)=>{var C,P;h&&(w.code==="ArrowLeft"&&y!==0&&((C=r.current[y-1])==null||C.focus()),w.code==="ArrowRight"&&y<p-1&&((P=r.current[y+1])==null||P.focus()),(w.code==="ArrowDown"||w.code==="Space")&&f(y))},k=(y,w)=>{r.current[y]=w},b=e==null?void 0:e.map((y,w)=>{var C,P;return l.jsx(Fi,{active:y.active,href:y.href,onClick:()=>f(w),icon:y.icon,controls:y.controls,tag:(C=y.tag)==null?void 0:C.text,tagSkin:(P=y.tag)==null?void 0:P.skin,index:w,children:y.text},w)});return l.jsx(bn.Provider,{value:{arrowNav:h,registerTabRef:k,handleKeyPress:g,selectTab:f},children:l.jsx("div",{className:"pkt-tabs",ref:n,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:a||b})})})}),rd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:a,className:n,disabled:r,errorMessage:h,hasError:d,helptext:p,helptextDropdown:f,helptextDropdownButton:g,inline:k,fullwidth:b=!1,label:y,name:w,optionalTag:C=!1,optionalText:P,requiredTag:T=!1,requiredText:I,tagText:N=null,placeholder:W,rows:Z,useWrapper:wt=!0,onChange:bt,value:Q,autoComplete:rt="off",minLength:Ft,maxLength:Vt,readOnly:ot=!1,skipForwardTestid:F=!1,...At},ae)=>{const de=[n,"pkt-textinput","pkt-textarea"].join(" "),ne=`${s}-input`,He=`${ne}-label`,ds=e||He,[ce,zt]=x.useState(0),ut=Ue=>{var qe,pe;if(i&&zt(((pe=(qe=Ue.currentTarget)==null?void 0:qe.value)==null?void 0:pe.length)||0),bt)return bt(Ue)};return x.useEffect(()=>{Q!==void 0&&zt((Q==null?void 0:Q.length)||0)},[Q]),l.jsx(Bs,{ariaDescribedby:t,className:de,disabled:r,errorMessage:h,forId:ne,hasError:d,helptext:p,helptextDropdown:f,helptextDropdownButton:g,inline:k,label:y,optionalTag:C,optionalText:P,requiredTag:T,requiredText:I,tagText:N,useWrapper:wt,counter:i,counterCurrent:ce,counterMaxLength:a,children:l.jsx("textarea",{ref:ae,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${a&&ce>a?"pkt-input--counter-error":""}`,name:`${w||s}`,id:ne,placeholder:W,disabled:r,rows:Z,"aria-labelledby":ds,"aria-invalid":d,"aria-errormessage":`${s}-error`,...At,onChange:ut,value:Q,autoComplete:rt,minLength:Ft,maxLength:Vt,"data-skip-forward-testid":F?"true":void 0})})}),od=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:a,counterMaxLength:n,className:r,disabled:h=!1,errorMessage:d,hasError:p=!1,helptext:f,helptextDropdown:g,helptextDropdownButton:k,iconNameRight:b,inline:y=!1,fullwidth:w=!1,label:C,name:P,optionalTag:T=!1,optionalText:I,requiredTag:N=!1,requiredText:W,tagText:Z=null,placeholder:wt,prefix:bt,suffix:Q,type:rt="text",useWrapper:Ft=!0,omitSearchIcon:Vt=!1,value:ot,minLength:F,maxLength:At,min:ae,max:de,step:ne,size:He,readonly:ds,required:ce,dataTestid:zt,onChange:ut,skipForwardTestid:Ue=!1,...qe},pe)=>{const ji=[r,"pkt-textinput"].join(" "),hi=rt==="search"&&!b&&!Vt,Hi=rt==="date"&&ot?ot.slice(0,10):ot,[di,cs]=x.useState((ot==null?void 0:ot.length)||0),ps=`${s}`,Vs=`${ps}-label`,ci=e||Vs,Ui=_e=>{var pi,ui;a&&cs(((ui=(pi=_e.currentTarget)==null?void 0:pi.value)==null?void 0:ui.length)||0),ut&&ut(_e)};return x.useEffect(()=>{ot!==void 0&&cs((ot==null?void 0:ot.length)||0)},[ot]),l.jsx(Bs,{ariaDescribedby:t,className:ji,disabled:h,errorMessage:d,forId:ps,hasError:p,helptext:f,helptextDropdown:g,helptextDropdownButton:k,inline:y,label:C,optionalTag:T,optionalText:I,requiredTag:N,requiredText:W,tagText:Z,useWrapper:Ft,counter:a,counterCurrent:di,counterMaxLength:n,children:l.jsxs("div",{className:"pkt-input__container","data-testid":zt,"data-skip-forward-testid":Ue?"true":void 0,children:[bt&&l.jsx("div",{className:"pkt-input-prefix",children:bt}),l.jsx("input",{...qe,ref:pe,className:`pkt-input ${w?"pkt-input--fullwidth":""} ${n&&di>n?"pkt-input--counter-error":""}`,type:rt,name:`${P||s}`,value:Hi,id:ps,placeholder:wt,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":ci,min:ae,max:de,onChange:Ui,step:ne,minLength:F,maxLength:At,size:He,required:ce}),Q&&l.jsxs("p",{className:"pkt-input-suffix",children:[Q,b&&l.jsx(B,{className:"pkt-input-suffix-icon",name:b}),hi&&l.jsx(B,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!Q&&b&&l.jsx(B,{className:"pkt-input-icon",name:b}),!Q&&hi&&l.jsx(B,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});var ls=window.CustomEvent;(!ls||typeof ls=="object")&&(ls=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},ls.prototype=window.Event.prototype);function yn(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function ld(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,a){return!(t[i]===void 0||t[i]===a)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function Fs(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function kn(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function hd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function Vi(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function $n(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var a=s.querySelectorAll("*"),n=0;n<a.length&&!(a[n].tagName&&a[n].shadowRoot&&(i=$n(a[n].shadowRoot),i));n++);return i}function _n(s){return s.isConnected||document.body.contains(s)}function wn(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=z.formSubmitter;if(!e){var i=s.target,a="getRootNode"in i&&i.getRootNode()||document;e=a.activeElement}return!e||e.form!==t?null:e}function dd(s){if(!s.defaultPrevented){var t=s.target,e=z.imagemapUseValue,i=wn(s);e===null&&i&&(e=i.value);var a=Fs(t);if(a){var n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&(s.preventDefault(),e!=null?a.close(e):a.close())}}}function xn(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",dd,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),a,n=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(a),a=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,n)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}xn.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&_n(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),z.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=$n(this.dialog_)),kn(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!_n(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!z.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");ld(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,z.needsCentering(this.dialog_)?(z.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new ls("close",{bubbles:!1,cancelable:!1});yn(this.dialog_,t)}};var z={};if(z.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},z.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var a=0;a<i.length;++a){var n=i[a],r=null;try{r=document.querySelectorAll(n.selectorText)}catch{}if(!(!r||!hd(r,s))){var h=n.style.getPropertyValue("top"),d=n.style.getPropertyValue("bottom");if(h&&h!=="auto"||d&&d!=="auto")return!0}}}return!1},z.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!z.isInlinePositionSetByStylesheet(s)},z.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new xn(s)},z.registerDialog=function(s){s.showModal||z.forceRegisterDialog(s)},z.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var a=0,n;n=i.removedNodes[a];++a){if(n instanceof Element)n.localName==="dialog"&&e.push(n);else continue;e=e.concat(n.querySelectorAll("dialog"))}}),e.length&&s(e)}))},z.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},z.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},z.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var a=i.dialog.parentNode||document.body;a.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},z.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=Fs(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},z.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),kn(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,a=i.compareDocumentPosition(t);return a&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},z.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new ls("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&yn(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},z.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},z.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},z.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},z.dm=new z.DialogManager,z.formSubmitter=null,z.imagemapUseValue=null,window.HTMLDialogElement===void 0){var Sn=document.createElement("form");if(Sn.setAttribute("method","dialog"),Sn.method!=="dialog"){var hs=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(hs){var cd=hs.get;hs.get=function(){return Vi(this)?"dialog":cd.call(this)};var pd=hs.set;hs.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):pd.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",hs)}}document.addEventListener("click",function(s){if(z.formSubmitter=null,z.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!Vi(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;z.imagemapUseValue=s.offsetX+","+s.offsetY}var a=Fs(t);a&&(z.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=Fs(t);if(!e){var i=wn(s),a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&s.preventDefault()}});var ud=HTMLFormElement.prototype.submit,fd=function(){if(!Vi(this))return ud.call(this);var s=Fs(this);s&&s.close()};HTMLFormElement.prototype.submit=fd}const gd=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));O.PktAccordion=Ki,O.PktAccordionItem=tn,O.PktAlert=Li,O.PktBackLink=sn,O.PktBreadcrumbs=Oh,O.PktButton=je,O.PktCard=an,O.PktCheckbox=nn,O.PktCombobox=rn,O.PktConsent=li,O.PktDatepicker=on,O.PktFooter=Bh,O.PktFooterSimple=Fh,O.PktHeader=Vh,O.PktHeading=ln,O.PktHelptext=hn,O.PktIcon=B,O.PktInput=dn,O.PktInputWrapper=Bs,O.PktLink=cn,O.PktLinkCard=pn,O.PktLoader=un,O.PktMessagebox=fn,O.PktModal=gn,O.PktProgressbar=mn,O.PktRadioButton=vn,O.PktSearchInput=Wh,O.PktSelect=Rh,O.PktStep=Zh,O.PktStepper=Xh,O.PktTabItem=Fi,O.PktTable=Jh,O.PktTableBody=Qh,O.PktTableDataCell=td,O.PktTableHeader=ed,O.PktTableHeaderCell=sd,O.PktTableRow=id,O.PktTabs=nd,O.PktTag=Bi,O.PktTextarea=rd,O.PktTextinput=od,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));