@oslokommune/punkt-react 13.19.0 → 13.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@
33
33
  return [];
34
34
  };
35
35
  }
36
- (function(P,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-router-dom"],l):(P=typeof globalThis<"u"?globalThis:P||self,l(P["punkt-react"]={},P.ReactJsxRuntime,P.React,P.ReactRouterDOM))})(this,(function(P,l,x,Wi){"use strict";const Ri=x.createContext({}),Pn=()=>x.useContext(Ri),Ki=x.forwardRef(({compact:s=!1,skin:t="borderless",ariaLabelledBy:e,children:i,name:a,className:n},r)=>{const h=["pkt-accordion",s&&"pkt-accordion--compact",t&&`pkt-accordion--${t}`,n].filter(Boolean).join(" ");return l.jsx(Ri.Provider,{value:{name:a},children:l.jsx("div",{ref:r,className:h,"data-testid":"pkt-accordion","aria-labelledby":e||void 0,children:i})})});Ki.displayName="PktAccordion";/**
36
+ (function(O,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-router-dom"],l):(O=typeof globalThis<"u"?globalThis:O||self,l(O["punkt-react"]={},O.ReactJsxRuntime,O.React,O.ReactRouterDOM))})(this,(function(O,l,x,Wi){"use strict";const Ri=x.createContext({}),Pn=()=>x.useContext(Ri),Ki=x.forwardRef(({compact:s=!1,skin:t="borderless",ariaLabelledBy:e,children:i,name:a,className:n},r)=>{const h=["pkt-accordion",s&&"pkt-accordion--compact",t&&`pkt-accordion--${t}`,n].filter(Boolean).join(" ");return l.jsx(Ri.Provider,{value:{name:a},children:l.jsx("div",{ref:r,className:h,"data-testid":"pkt-accordion","aria-labelledby":e||void 0,children:i})})});Ki.displayName="PktAccordion";/**
37
37
  * @license
38
38
  * Copyright 2018 Google LLC
39
39
  * SPDX-License-Identifier: BSD-3-Clause
@@ -43,7 +43,7 @@
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
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
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),wt=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,y=0;for(;y<d.length&&(r.lastIndex=y,f=r.exec(d),f!==null);)y=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 y=f[r++],b=a.getAttribute(g).split(ue),k=/([.?@])?(.*)/.exec(y);d.push({type:1,index:n,name:k[2],strings:b,ctor:k[1]==="."?Vn:k[1]==="?"?jn:k[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),y=g.length-1;if(y>0){a.textContent=zs?zs.emptyScript:"";for(let b=0;b<y;b++)a.append(g[b],ps()),xe.nextNode(),d.push({type:2,index:++n});a.append(g[y],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===wt)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!==wt&&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!==wt,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===wt&&(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)??$)===wt)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};/**
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,y=0;for(;y<d.length&&(r.lastIndex=y,f=r.exec(d),f!==null);)y=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 y=f[r++],b=a.getAttribute(g).split(ue),k=/([.?@])?(.*)/.exec(y);d.push({type:1,index:n,name:k[2],strings:b,ctor:k[1]==="."?Vn:k[1]==="?"?jn:k[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),y=g.length-1;if(y>0){a.textContent=zs?zs.emptyScript:"";for(let b=0;b<y;b++)a.append(g[b],ps()),xe.nextNode(),d.push({type:2,index:++n});a.append(g[y],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};/**
47
47
  * @license
48
48
  * Copyright 2017 Google LLC
49
49
  * SPDX-License-Identifier: BSD-3-Clause
@@ -63,7 +63,7 @@
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 wt}};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 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}};/**
67
67
  * @license
68
68
  * Copyright 2017 Google LLC
69
69
  * SPDX-License-Identifier: BSD-3-Clause
@@ -71,7 +71,7 @@
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 wt}});/**
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}});/**
75
75
  * @license
76
76
  * Copyright 2017 Google LLC
77
77
  * SPDX-License-Identifier: BSD-3-Clause
@@ -91,7 +91,7 @@
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===wt)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=Se(Xs);/**
95
95
  * @license
96
96
  * Copyright 2017 Google LLC
97
97
  * SPDX-License-Identifier: BSD-3-Clause
@@ -194,7 +194,7 @@
194
194
  ></pkt-icon
195
195
  ><span class="pkt-back-link__text">${this.text}</span></a
196
196
  >
197
- </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 At(s,t){return Qt(t||s,s)}function Si(s,t,e){const i=At(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=At(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=At(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=At(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=At(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(+At(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=At(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}},ko={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"})},yo={code:"en-US",formatDistance:Ur,formatLong:Rr,formatRelative:Gr,localize:so,match:ko,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $o(s,t){const e=At(s,void 0);return Ir(e,jr(e))+1}function _o(s,t){const e=At(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=At(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),y=Qt((t==null?void 0:t.in)||s,0);y.setFullYear(h,0,p),y.setHours(0,0,0,0);const b=_s(y,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=At(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??yo,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=At(s,void 0);if(!Fr(g))throw new RangeError("Invalid time value");let y=t.match(Do).map(k=>{const w=k[0];if(w==="p"||w==="P"){const S=So[w];return S(k,d.formatLong)}return k}).join("").match(Oo).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const w=k[0];if(w==="'")return{isToken:!1,value:Vo(k)};if(Ma[w])return{isToken:!0,value:k};if(w.match(Bo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:k}});d.localize.preprocessor&&(y=d.localize.preprocessor(g,y));const b={firstWeekContainsDate:p,weekStartsOn:f,locale:d};return y.map(k=>{if(!k.isToken)return k.value;const w=k.value;(Eo(w)||Ao(w))&&Mo(w,t,String(s));const S=Ma[w[0]];return S(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=At(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 y=Ee(s.timeZone,s),b=y>0?Math.floor(y):Math.ceil(y),k=-new Date(+s).getTimezoneOffset()-b,w=b!==e,S=k-d;if(w&&S){Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+S);const O=Ee(s.timeZone,s),N=O>0?Math.floor(O):Math.ceil(O),B=b-N;B&&(s.internal.setUTCMinutes(s.internal.getUTCMinutes()+B),Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+B))}}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`
197
+ </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}},ko={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"})},yo={code:"en-US",formatDistance:Ur,formatLong:Rr,formatRelative:Gr,localize:so,match:ko,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),y=Qt((t==null?void 0:t.in)||s,0);y.setFullYear(h,0,p),y.setHours(0,0,0,0);const b=_s(y,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??yo,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 y=t.match(Do).map(k=>{const w=k[0];if(w==="p"||w==="P"){const S=So[w];return S(k,d.formatLong)}return k}).join("").match(Oo).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const w=k[0];if(w==="'")return{isToken:!1,value:Vo(k)};if(Ma[w])return{isToken:!0,value:k};if(w.match(Bo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:k}});d.localize.preprocessor&&(y=d.localize.preprocessor(g,y));const b={firstWeekContainsDate:p,weekStartsOn:f,locale:d};return y.map(k=>{if(!k.isToken)return k.value;const w=k.value;(Eo(w)||Ao(w))&&Mo(w,t,String(s));const S=Ma[w[0]];return S(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 y=Ee(s.timeZone,s),b=y>0?Math.floor(y):Math.ceil(y),k=-new Date(+s).getTimezoneOffset()-b,w=b!==e,S=k-d;if(w&&S){Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+S);const P=Ee(s.timeZone,s),N=P>0?Math.floor(P):Math.ceil(P),B=b-N;B&&(s.internal.setUTCMinutes(s.internal.getUTCMinutes()+B),Date.prototype.setUTCMinutes.call(s,Date.prototype.getUTCMinutes.call(s)+B))}}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`
198
198
  <div
199
199
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":""}"
200
200
  @focusout=${this.closeEvent}
@@ -316,13 +316,21 @@
316
316
  aria-label=${C(this.ariaLabel||void 0)}
317
317
  aria-description=${C(this._ariaDescription||void 0)}
318
318
  >
319
- ${this.iconName&&u`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
319
+ ${this.iconName&&u`<pkt-icon
320
+ class="pkt-tag__icon"
321
+ name=${this.iconName}
322
+ aria-hidden="true"
323
+ ></pkt-icon>`}
320
324
  <span ${E(this.defaultSlot)}></span>
321
325
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
322
326
  </button>
323
327
  `:u`
324
328
  <span class=${M(t)}>
325
- ${this.iconName&&u`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
329
+ ${this.iconName&&u`<pkt-icon
330
+ class="pkt-tag__icon"
331
+ name=${this.iconName}
332
+ aria-hidden="true"
333
+ ></pkt-icon>`}
326
334
  <span ${E(this.defaultSlot)}></span>
327
335
  </span>
328
336
  `}};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,ft=(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 lt=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`
@@ -415,7 +423,7 @@
415
423
  * @license
416
424
  * Copyright 2017 Google LLC
417
425
  * SPDX-License-Identifier: BSD-3-Clause
418
- */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,y=a.length-1,b=0,k=n.length-1;for(;g<=y&&b<=k;)if(a[g]===null)g++;else if(a[y]===null)y--;else if(h[g]===r[b])d[b]=Ce(a[g],n[b]),g++,b++;else if(h[y]===r[k])d[k]=Ce(a[y],n[k]),y--,k--;else if(h[g]===r[k])d[k]=Ce(a[g],n[k]),bs(s,d[k+1],a[g]),g++,k--;else if(h[y]===r[b])d[b]=Ce(a[y],n[b]),bs(s,a[g],a[y]),y--,b++;else if(p===void 0&&(p=za(r,b,k),f=za(h,g,y)),p.has(h[g]))if(p.has(h[y])){const w=f.get(r[b]),S=w!==void 0?a[w]:null;if(S===null){const O=bs(s,a[g]);Ce(O,n[b]),d[b]=O}else d[b]=Ce(S,n[b]),bs(s,a[g],S),a[w]=null;b++}else yi(a[y]),y--;else yi(a[g]),g++;for(;b<=k;){const w=bs(s,d[k+1]);Ce(w,n[b]),d[b++]=w}for(;g<=y;){const w=a[g++];w!==null&&yi(w)}return this.ut=r,ka(s,d),wt}}),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}},Et={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,y=new WeakMap,b=new WeakMap,k=new WeakMap,w=new WeakMap,S={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"},O=(m,c)=>{for(let v in S){c[v]=null;let _=null;const I=S[v];Object.defineProperty(c,v,{get(){return _},set(U){_=U,m.isConnected?rt(m,I,U):f.set(m,c)}})}};function N(m){const c=a.get(m),{form:v}=c;ce(m,v,c),Nt(m,c.labels)}const B=(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 I=!c||m.disabled;for(;_;)_.formDisabledCallback&&I&&Bt(_,m.disabled),_=v.nextNode()},T={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?Bt(v,v.hasAttribute("disabled")):v.localName==="fieldset"&&B(v)),c.attributeName==="name"&&v.constructor.formAssociated){const _=a.get(v),I=p.get(v);_.setFormValue(I)}}}):{};function Z(m){m.forEach(c=>{const{addedNodes:v,removedNodes:_}=c,I=Array.from(v),U=Array.from(_);I.forEach(q=>{var Vt;if(a.has(q)&&q.constructor.formAssociated&&N(q),f.has(q)){const bt=f.get(q);Object.keys(S).filter(jt=>bt[jt]!==null).forEach(jt=>{rt(q,S[jt],bt[jt])}),f.delete(q)}if(w.has(q)){const bt=w.get(q);rt(q,"internals-valid",bt.validity.valid.toString()),rt(q,"internals-invalid",(!bt.validity.valid).toString()),rt(q,"aria-invalid",(!bt.validity.valid).toString()),w.delete(q)}if(q.localName==="form"){const bt=d.get(q),jt=document.createTreeWalker(q,NodeFilter.SHOW_ELEMENT,{acceptNode(zi){return a.has(zi)&&zi.constructor.formAssociated&&!(bt&&bt.has(zi))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let js=jt.nextNode();for(;js;)N(js),js=jt.nextNode()}q.localName==="fieldset"&&((Vt=W.observe)===null||Vt===void 0||Vt.call(W,q,T),B(q,!0))}),U.forEach(q=>{const Vt=a.get(q);Vt&&i.get(Vt)&&Ft(Vt),h.has(q)&&h.get(q).disconnect()})})}function qt(m){m.forEach(c=>{const{removedNodes:v}=c;v.forEach(_=>{const I=b.get(c.target);a.has(_)&&qe(_),I.disconnect()})})}const vt=m=>{var c,v;const _=new MutationObserver(qt);!((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)},Bt=(m,c)=>{m.toggleAttribute("internals-disabled",c),c?rt(m,"aria-disabled","true"):m.removeAttribute("aria-disabled"),m.formDisabledCallback&&m.formDisabledCallback.apply(m,[c])},Ft=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,T)},Nt=(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),I=[...c,..._].includes(!1);m.toggleAttribute("internals-invalid",I),m.toggleAttribute("internals-valid",!I)},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(I=>a.get(I).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 I=new Set;I.add(m),d.set(c,I),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},pt=(m,c,v=DOMException)=>{if(!m.constructor.formAssociated)throw new v(c)},Ue=(m,c,v)=>{const _=d.get(m);return _&&_.size&&_.forEach(I=>{a.get(I)[v]()||(c=!1)}),c},qe=m=>{if(m.constructor.formAssociated){const c=a.get(m),{labels:v,form:_}=c;Nt(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),I=`state${c}`;return _.isConnected?cs(_,I):setTimeout(()=>{cs(_,I)}),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,_,I){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:I}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...U){const q=I.call(this,...U),Vt=Array.from(d.get(this)||[]);if(Vt.length===0)return q;const bt=Array.from(q).concat(Vt).sort((jt,js)=>jt.compareDocumentPosition?jt.compareDocumentPosition(js)&2?1:-1:0);return new pi(bt)}})}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),O(c,this),F(c,this),Object.seal(this),v instanceof DocumentFragment&&vt(v)}checkValidity(){const c=t.get(this);if(pt(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);pt(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);pt(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(pt(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(),_=y.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(pt(v,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Ft(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(([_,I])=>{if(typeof I=="string"){const U=ot(v,this);U.name=_,U.value=I}});p.set(v,c)}setValidity(c,v,_){const I=t.get(this);if(pt(I,"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.");y.set(this,_);const U=e.get(this),q={};for(const jt in c)q[jt]=c[jt];Object.keys(q).length===0&&hi(U);const Vt=Object.assign(Object.assign({},U),q);delete Vt.valid;const{valid:bt}=Hi(U,Vt,this.form);if(!bt&&!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,bt?"":v),I.isConnected?(I.toggleAttribute("internals-invalid",!bt),I.toggleAttribute("internals-valid",bt),rt(I,"aria-invalid",`${!bt}`)):w.set(I,this)}get shadowRoot(){const c=t.get(this);return g.get(c)||null}get validationMessage(){const c=t.get(this);return pt(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 pt(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 pt(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,_,I){if(_.formAssociated){const U=_.prototype.connectedCallback;_.prototype.connectedCallback=function(){k.has(this)||(k.set(this,!0),this.hasAttribute("disabled")&&Bt(this,!0)),U!=null&&U.apply(this),qe(this)}}c.call(this,v,_,I)}}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 I=v.apply(this,_);if(g.set(this,I),pe()){const U=new MutationObserver(Z);window.ShadyDOM?U.observe(this,Q):U.observe(I,Q),h.set(this,U)}return I};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=Et.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,y;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):(y=t.validity)!=null&&y.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=Et.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">
426
+ */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,y=a.length-1,b=0,k=n.length-1;for(;g<=y&&b<=k;)if(a[g]===null)g++;else if(a[y]===null)y--;else if(h[g]===r[b])d[b]=Ce(a[g],n[b]),g++,b++;else if(h[y]===r[k])d[k]=Ce(a[y],n[k]),y--,k--;else if(h[g]===r[k])d[k]=Ce(a[g],n[k]),bs(s,d[k+1],a[g]),g++,k--;else if(h[y]===r[b])d[b]=Ce(a[y],n[b]),bs(s,a[g],a[y]),y--,b++;else if(p===void 0&&(p=za(r,b,k),f=za(h,g,y)),p.has(h[g]))if(p.has(h[y])){const w=f.get(r[b]),S=w!==void 0?a[w]:null;if(S===null){const P=bs(s,a[g]);Ce(P,n[b]),d[b]=P}else d[b]=Ce(S,n[b]),bs(s,a[g],S),a[w]=null;b++}else yi(a[y]),y--;else yi(a[g]),g++;for(;b<=k;){const w=bs(s,d[k+1]);Ce(w,n[b]),d[b++]=w}for(;g<=y;){const w=a[g++];w!==null&&yi(w)}return this.ut=r,ka(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,y=new WeakMap,b=new WeakMap,k=new WeakMap,w=new WeakMap,S={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 S){c[v]=null;let _=null;const I=S[v];Object.defineProperty(c,v,{get(){return _},set(U){_=U,m.isConnected?rt(m,I,U):f.set(m,c)}})}};function N(m){const c=a.get(m),{form:v}=c;ce(m,v,c),At(m,c.labels)}const B=(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 I=!c||m.disabled;for(;_;)_.formDisabledCallback&&I&&Ft(_,m.disabled),_=v.nextNode()},T={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"&&B(v)),c.attributeName==="name"&&v.constructor.formAssociated){const _=a.get(v),I=p.get(v);_.setFormValue(I)}}}):{};function Z(m){m.forEach(c=>{const{addedNodes:v,removedNodes:_}=c,I=Array.from(v),U=Array.from(_);I.forEach(q=>{var jt;if(a.has(q)&&q.constructor.formAssociated&&N(q),f.has(q)){const bt=f.get(q);Object.keys(S).filter(Ht=>bt[Ht]!==null).forEach(Ht=>{rt(q,S[Ht],bt[Ht])}),f.delete(q)}if(w.has(q)){const bt=w.get(q);rt(q,"internals-valid",bt.validity.valid.toString()),rt(q,"internals-invalid",(!bt.validity.valid).toString()),rt(q,"aria-invalid",(!bt.validity.valid).toString()),w.delete(q)}if(q.localName==="form"){const bt=d.get(q),Ht=document.createTreeWalker(q,NodeFilter.SHOW_ELEMENT,{acceptNode(zi){return a.has(zi)&&zi.constructor.formAssociated&&!(bt&&bt.has(zi))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let js=Ht.nextNode();for(;js;)N(js),js=Ht.nextNode()}q.localName==="fieldset"&&((jt=W.observe)===null||jt===void 0||jt.call(W,q,T),B(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 I=b.get(c.target);a.has(_)&&qe(_),I.disconnect()})})}const vt=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,T)},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),I=[...c,..._].includes(!1);m.toggleAttribute("internals-invalid",I),m.toggleAttribute("internals-valid",!I)},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(I=>a.get(I).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 I=new Set;I.add(m),d.set(c,I),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},pt=(m,c,v=DOMException)=>{if(!m.constructor.formAssociated)throw new v(c)},Ue=(m,c,v)=>{const _=d.get(m);return _&&_.size&&_.forEach(I=>{a.get(I)[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),I=`state${c}`;return _.isConnected?cs(_,I):setTimeout(()=>{cs(_,I)}),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,_,I){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:I}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...U){const q=I.call(this,...U),jt=Array.from(d.get(this)||[]);if(jt.length===0)return q;const bt=Array.from(q).concat(jt).sort((Ht,js)=>Ht.compareDocumentPosition?Ht.compareDocumentPosition(js)&2?1:-1:0);return new pi(bt)}})}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&&vt(v)}checkValidity(){const c=t.get(this);if(pt(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);pt(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);pt(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(pt(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(),_=y.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(pt(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(([_,I])=>{if(typeof I=="string"){const U=ot(v,this);U.name=_,U.value=I}});p.set(v,c)}setValidity(c,v,_){const I=t.get(this);if(pt(I,"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.");y.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:bt}=Hi(U,jt,this.form);if(!bt&&!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,bt?"":v),I.isConnected?(I.toggleAttribute("internals-invalid",!bt),I.toggleAttribute("internals-valid",bt),rt(I,"aria-invalid",`${!bt}`)):w.set(I,this)}get shadowRoot(){const c=t.get(this);return g.get(c)||null}get validationMessage(){const c=t.get(this);return pt(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 pt(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 pt(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,_,I){if(_.formAssociated){const U=_.prototype.connectedCallback;_.prototype.connectedCallback=function(){k.has(this)||(k.set(this,!0),this.hasAttribute("disabled")&&Ft(this,!0)),U!=null&&U.apply(this),qe(this)}}c.call(this,v,_,I)}}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 I=v.apply(this,_);if(g.set(this,I),pe()){const U=new MutationObserver(Z);window.ShadyDOM?U.observe(this,Q):U.observe(I,Q),h.set(this,U)}return I};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,y;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):(y=t.validity)!=null&&y.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">
419
427
  <button
420
428
  class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
421
429
  type="button"
@@ -438,7 +446,7 @@
438
446
  ${this.helptext&&Js(this.helptext)}
439
447
  </div>
440
448
  ${i()}
441
- </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 kl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,J=(s,t,e,i)=>{for(var a=i>1?void 0:i?yl(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&&kl(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=Et.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=Et.props.optionalTag.default,this.optionalText=Et.props.optionalText.default,this.requiredTag=Et.props.requiredTag.default,this.requiredText=Et.props.requiredText.default,this.tagText=null,this.hasError=Et.props.hasError.default,this.errorMessage="",this.disabled=Et.props.disabled.default,this.inline=Et.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=Et.props.hasFieldset.default,this.role="group",this.useWrapper=Et.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`
449
+ </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 kl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,J=(s,t,e,i)=>{for(var a=i>1?void 0:i?yl(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&&kl(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`
442
450
  ${this.tagText?u`<span class=${e+" pkt-tag--gray"}>${this.tagText}</span>`:$}
443
451
  ${this.optionalTag?u`<span class=${e+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
444
452
  ${this.requiredTag?u`<span class=${e+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
@@ -468,7 +476,7 @@
468
476
  .forId=${this.forId}
469
477
  .helptext=${this.helptext}
470
478
  .helptextDropdown=${this.helptextDropdown}
471
- .helptextDropdownButton=${this.helptextDropdownButton||Et.props.helptextDropdownButton.default}
479
+ .helptextDropdownButton=${this.helptextDropdownButton||Mt.props.helptextDropdownButton.default}
472
480
  @toggleHelpText=${g=>{this.toggleDropdown(g)}}
473
481
  ${E(this.helptextSlot)}
474
482
  name="helptext"
@@ -493,7 +501,7 @@
493
501
  ${d()}
494
502
  `,f=()=>this.hasFieldset?u`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
495
503
  ${p()}
496
- </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(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),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,yt=(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 gt=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`
504
+ </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,yt=(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 gt=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`
497
505
  <div
498
506
  class=${M({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
499
507
  role="listbox"
@@ -715,7 +723,7 @@
715
723
  >${t.value}</span
716
724
  >`;case"label":default:return u`<span class="pkt-combobox__value" data-focusfix=${this.id}
717
725
  >${t.label||t.value}</span
718
- >`}}handleInput(t){if(t.stopPropagation(),t.stopImmediatePropagation(),this.disabled)return;this.touched=!0;const e=t.target;if(this._search=e.value,this.checkForMatches(),this.typeahead)if(this._search){if(this._options=this.options.filter(i=>{var a;return(a=i.fulltext)==null?void 0:a.toLowerCase().includes(this._search.toLowerCase())}),t.inputType!=="deleteContentBackward"){const i=this._options.filter(a=>{var n;return!a.selected&&((n=a.label)==null?void 0:n.toLowerCase().startsWith(this._search.toLowerCase()))});if(i.length>0&&this.inputRef.value&&this.inputRef.value.type!=="hidden"){const a=i[0];a!=null&&a.label&&(e.value=a.label,window.setTimeout(()=>e.setSelectionRange(this._search.length,e.value.length),0),e.selectionDirection="backward")}}}else this._options=[...this.options]}handleFocus(){if(!this.disabled){if(!this.multiple&&this._value[0]&&this.inputRef.value&&this.inputRef.value.type!=="hidden"){const t=this.findValueInOptions(this._value[0]);this._editingSingleValue=!0,this.inputRef.value.value=this.displayValueAs==="label"&&t!=null&&t.label?t.label:this._value[0]}this._inputFocus=!0,this._search="",this._options=[...this.options],this._isOptionsOpen=!0,this.onFocus(),this.requestUpdate()}}handleFocusOut(t){var e,i,a,n,r;if(!this.disabled&&((i=(e=t.relatedTarget)==null?void 0:e.closest("pkt-combobox"))==null?void 0:i.id)!==this.id&&((n=(a=t.relatedTarget)==null?void 0:a.closest("pkt-combobox"))==null?void 0:n.id)!==this.id&&((r=t.target)==null?void 0:r.getAttribute("data-focusfix"))!==this.id&&t.relatedTarget!==this.focusRef.value&&t.relatedTarget!==this.inputRef.value&&t.relatedTarget!==this.arrowRef.value&&this._isOptionsOpen){if(this._inputFocus=!1,this._addValueText=null,this._userInfoMessage="",this._search="",this.inputRef.value&&this.inputRef.value.type!=="hidden"&&this.inputRef.value.value!==""){const h=this.inputRef.value.value,d=this.findValueInOptions(h);!this._value.includes(h)&&!d?this.allowUserInput?this.addNewUserValue(h):this.multiple||this.removeValue(this._value[0]):d&&!this._value.includes(d.value)&&this.setSelected(d.value),this.inputRef.value.value=""}this._isOptionsOpen=!1,this.onBlur()}}handleBlur(){this._inputFocus=!1,this._editingSingleValue=!1,this.onBlur()}handleInputClick(t){var e,i;this.disabled||(t.currentTarget&&t.currentTarget!==this.arrowRef.value&&((e=this.inputRef.value)==null?void 0:e.type)!=="hidden"?((i=this.inputRef.value)==null||i.focus(),this.requestUpdate()):this.handleArrowClick(t))}handlePlaceholderClick(t){this.disabled||(t.stopPropagation(),this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.focus(),this._inputFocus=!0,this.requestUpdate()))}handleArrowClick(t){var e,i;this.disabled||t instanceof KeyboardEvent&&t.key&&t.key!=="Enter"&&t.key!==" "&&t.key!=="ArrowDown"||(t.stopImmediatePropagation(),t.preventDefault(),this._isOptionsOpen=!this._isOptionsOpen,this._isOptionsOpen?(e=this.listboxRef.value)==null||e.focusFirstOrSelectedOption():(i=this.arrowRef.value)==null||i.focus())}handleOptionToggled(t){this.toggleValue(t.detail)}handleSearch(t){t.stopPropagation(),this._search=t.detail.toLowerCase()}handleInputKeydown(t){var e,i,a;switch(t.key){case",":this.multiple&&(t.preventDefault(),this.addValue());break;case"Enter":t.preventDefault(),this.addValue();break;case"Backspace":!this._search&&((e=this.inputRef.value)==null?void 0:e.type)==="hidden"&&this.removeLastValue(t);break;case"Tab":case"ArrowDown":t.shiftKey||((i=this.listboxRef.value)==null||i.focusFirstOrSelectedOption(),t.preventDefault());break;case"Escape":this._isOptionsOpen=!1,(a=this.arrowRef.value)==null||a.focus(),t.preventDefault();break}}handleTagRemove(t){this.removeSelected(t)}blurInput(){this.inputRef.value&&this.inputRef.value.matches(":focus")&&this.inputRef.value.blur()}checkForMatches(){var t;const e=((t=this.inputRef.value)==null?void 0:t.value)||this._search||"",i=e.trim().toLowerCase()||"";if(!i){!this.multiple&&this._value[0]&&this.removeValue(this._value[0]),this.resetComboboxInput(!1);return}const a=this._value.find(h=>h.toLowerCase()===i),n=this._options.filter(h=>{var d;return((d=h.label)==null?void 0:d.toLowerCase().includes(i))??!1}),r=n.find(h=>{var d;return((d=h.label)==null?void 0:d.toLowerCase())===i||h.value.toLowerCase()===i});switch(!0){case((n.length===0||!r)&&this.allowUserInput):this._addValueText=e,this._userInfoMessage="";break;case(n.length===0&&!this._options.length&&!this.allowUserInput):this._addValueText=null,this._userInfoMessage="Ingen match i søket";break;case!!a:this._addValueText=null,this._userInfoMessage="Verdien er allerede valgt";break;case n.length>1:this._addValueText=null,this._userInfoMessage="";break;default:this._addValueText=null,this._userInfoMessage=""}}findValueInOptions(t){return this.options.find(e=>e.value===t||e.label===t)||null}findIndexInOptions(t){return this._options.findIndex(e=>e.value===t||e.label===t)}isMaxItemsReached(){const t=this.maxlength!==null&&this._value.length>=this.maxlength;return t?this._maxIsReached=!0:this._maxIsReached=!1,t}toggleValue(t){var e,i;if(this.disabled)return;this.touched=!0,this._userInfoMessage="",this._addValueText=null;const a=((e=this.findValueInOptions(t))==null?void 0:e.value)||null,n=this._value.includes(t||a||""),r=!!a,h=((i=this._options.find(S=>S.value===t))==null?void 0:i.disabled)||!1,d=!(t!=null&&t.trim()),p=!this.multiple,f=this.multiple,g=this.isMaxItemsReached();let y=!1,b=!0,k="",w="";h||(!r&&this.allowUserInput&&!d?(this.addNewUserValue(t),k="Ny verdi lagt til",y=!f):!r&&!this.allowUserInput?(p&&this._value[0]&&this.removeValue(this._value[0]),b=!1,y=!0,k="Ingen treff i søket"):n?(this.removeValue(a),y=!0):d&&p?(this.removeAllSelected(),y=!0):p?(this._value[0]&&this.removeSelected(this._value[0]),this.setSelected(a),y=!1,this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.value="",this.inputRef.value.blur())):f&&!g?(this.setSelected(a),y=!0):f&&g?(this._userInfoMessage="Maks antall valg nådd",b=!1,w=t):(p&&this.removeAllSelected(),this._userInfoMessage="Ingen gyldig verdi valgt",b=!1,y=!0,w=t),this._isOptionsOpen=y,y||window.setTimeout(()=>{var S;(S=this.focusRef.value)==null||S.focus()},0),this._userInfoMessage=k,this._search=w||"",this.resetComboboxInput(b),f&&this.isMaxItemsReached())}setSelected(t){if(!this._value.includes(t)){if(this.multiple&&this.isMaxItemsReached()){this._userInfoMessage="Maks antall valg nådd";return}!this.multiple&&this.removeAllSelected(),this._value=t?[...this._value,t]:this._value,this._options=this._options.map(e=>(e.value===t&&(e.selected=!0),e)),this.resetComboboxInput(!0)}}removeSelected(t){if(!t)return;this._value=this._value.filter(i=>i!==t);const e=this.findValueInOptions(t);e?(e.selected=!1,e.userAdded?(this._options=[...this._options.filter(i=>i.value!==t)],this.options=[...this.options.filter(i=>i.value!==t)]):this._options=[...this._options,e]):!t&&!this.multiple&&(this._options=this._options.map(i=>(i.selected=!1,i)))}addAllOptions(){if(this.multiple){if(this.maxlength&&this._options.length>this.maxlength){this._userInfoMessage="For mange valgt";return}this._value=this._options.map(t=>t.value),this._options=this._options.map(t=>(t.selected=!0,t)),this.requestUpdate()}}removeAllSelected(){this._value=[],this._options=this._options.map(t=>(t.selected=!1,t)),this._options=this._options.filter(t=>!t.userAdded),this.requestUpdate()}addValue(){var t;const e=((t=this.inputRef.value)==null?void 0:t.value.trim())||"";this._search=e,this.toggleValue(e)}removeValue(t){this._value=this.multiple?this._value.filter(e=>e!==t):[],this.removeSelected(t)}addNewUserValue(t){if(!t||t.trim()==="")return;if(!this.multiple)this._value[0]&&this.removeSelected(this._value[0]),this._value=[t],this._isOptionsOpen=!1,this.blurInput();else if(!this.findValueInOptions(t)){if(this.isMaxItemsReached())return;this._value=[...this._value,t]}const e={value:t,label:t,userAdded:!0};this.options=[e,...this.options],this._options=[e,...this._options],this.setSelected(t),this.requestUpdate()}resetComboboxInput(t=!0){if(this._addValueText=null,this.inputRef.value&&this.inputRef.value.type!=="hidden"&&t)if(this._search="",this.multiple)this.inputRef.value.value="";else{const e=this.findValueInOptions(this._value[0]);window.setTimeout(()=>{!this.inputRef.value||this.inputRef.value.type==="hidden"||(this.inputRef.value.value=this.displayValueAs==="label"&&e!=null&&e.label?e.label:this._value[0]||"")},0),this._userInfoMessage=""}this._options=[...this.options]}removeLastValue(t){if(this._value.length===0)return;t.preventDefault();const e=this._value[this._value.length-1];e&&this.removeSelected(e),this.isMaxItemsReached()}};et([o({type:String,reflect:!0})],tt.prototype,"value",2),et([o({type:Array})],tt.prototype,"options",2),et([o({type:Array})],tt.prototype,"defaultOptions",2),et([o({type:Boolean})],tt.prototype,"allowUserInput",2),et([o({type:Boolean})],tt.prototype,"typeahead",2),et([o({type:Boolean})],tt.prototype,"includeSearch",2),et([o({type:String})],tt.prototype,"searchPlaceholder",2),et([o({type:Boolean})],tt.prototype,"multiple",2),et([o({type:Number})],tt.prototype,"maxlength",2),et([o({type:String})],tt.prototype,"displayValueAs",2),et([o({type:String})],tt.prototype,"tagPlacement",2),et([V()],tt.prototype,"_options",2),et([V()],tt.prototype,"_isOptionsOpen",2),et([V()],tt.prototype,"_value",2),et([V()],tt.prototype,"_userInfoMessage",2),et([V()],tt.prototype,"_addValueText",2),et([V()],tt.prototype,"_maxIsReached",2),et([V()],tt.prototype,"_search",2),et([V()],tt.prototype,"_inputFocus",2),et([V()],tt.prototype,"_editingSingleValue",2),tt=et([j("pkt-combobox")],tt);const Nl={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var Al=Object.defineProperty,El=Object.getOwnPropertyDescriptor,ee=(s,t,e,i)=>{for(var a=i>1?void 0:i?El(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 Mi=null;function Ml(){return Mi||(Mi=new Promise((s,t)=>{if(document.querySelector("#oslo-consent-script")){s();return}const e=document.createElement("script");e.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",e.id="oslo-consent-script",e.onload=()=>s(),e.onerror=t,document.head.appendChild(e);const i=document.createElement("link");i.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",i.type="text/css",i.rel="stylesheet",i.id="oslo-consent-styles",document.head.appendChild(i)}),Mi)}let Ht=class extends Y{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||Nl.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var t;super.disconnectedCallback(),this._cookieEventHandler&&((t=window.__cookieEvents)==null||t.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(t){let e;try{e=JSON.parse(t)}catch{e=t}return e}emitCookieConsents(t){const e=this.returnJsonOrObject(t.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:e,bubbles:!0,cancelable:!1}))}async firstUpdated(t){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await Ml(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(t=>{if(t){const e={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(e),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(t){var e;t.preventDefault(),(e=window.cookieBanner)!=null&&e.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?u`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?u`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
726
+ >`}}handleInput(t){if(t.stopPropagation(),t.stopImmediatePropagation(),this.disabled)return;this.touched=!0;const e=t.target;if(this._search=e.value,this.checkForMatches(),this.typeahead)if(this._search){if(this._options=this.options.filter(i=>{var a;return(a=i.fulltext)==null?void 0:a.toLowerCase().includes(this._search.toLowerCase())}),t.inputType!=="deleteContentBackward"){const i=this._options.filter(a=>{var n;return!a.selected&&((n=a.label)==null?void 0:n.toLowerCase().startsWith(this._search.toLowerCase()))});if(i.length>0&&this.inputRef.value&&this.inputRef.value.type!=="hidden"){const a=i[0];a!=null&&a.label&&(e.value=a.label,window.setTimeout(()=>e.setSelectionRange(this._search.length,e.value.length),0),e.selectionDirection="backward")}}}else this._options=[...this.options]}handleFocus(){if(!this.disabled){if(!this.multiple&&this._value[0]&&this.inputRef.value&&this.inputRef.value.type!=="hidden"){const t=this.findValueInOptions(this._value[0]);this._editingSingleValue=!0,this.inputRef.value.value=this.displayValueAs==="label"&&t!=null&&t.label?t.label:this._value[0]}this._inputFocus=!0,this._search="",this._options=[...this.options],this._isOptionsOpen=!0,this.onFocus(),this.requestUpdate()}}handleFocusOut(t){var e,i,a,n,r;if(!this.disabled&&((i=(e=t.relatedTarget)==null?void 0:e.closest("pkt-combobox"))==null?void 0:i.id)!==this.id&&((n=(a=t.relatedTarget)==null?void 0:a.closest("pkt-combobox"))==null?void 0:n.id)!==this.id&&((r=t.target)==null?void 0:r.getAttribute("data-focusfix"))!==this.id&&t.relatedTarget!==this.focusRef.value&&t.relatedTarget!==this.inputRef.value&&t.relatedTarget!==this.arrowRef.value&&this._isOptionsOpen){if(this._inputFocus=!1,this._addValueText=null,this._userInfoMessage="",this._search="",this.inputRef.value&&this.inputRef.value.type!=="hidden"&&this.inputRef.value.value!==""){const h=this.inputRef.value.value,d=this.findValueInOptions(h);!this._value.includes(h)&&!d?this.allowUserInput?this.addNewUserValue(h):this.multiple||this.removeValue(this._value[0]):d&&!this._value.includes(d.value)&&this.setSelected(d.value),this.inputRef.value.value=""}this._isOptionsOpen=!1,this.onBlur()}}handleBlur(){this._inputFocus=!1,this._editingSingleValue=!1,this.onBlur()}handleInputClick(t){var e,i;if(this.disabled){t.preventDefault(),t.stopImmediatePropagation();return}t.currentTarget&&t.currentTarget!==this.arrowRef.value&&((e=this.inputRef.value)==null?void 0:e.type)!=="hidden"?((i=this.inputRef.value)==null||i.focus(),this.requestUpdate()):this.handleArrowClick(t)}handlePlaceholderClick(t){this.disabled||(t.stopPropagation(),this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.focus(),this._inputFocus=!0,this.requestUpdate()))}handleArrowClick(t){var e,i;this.disabled||t instanceof KeyboardEvent&&t.key&&t.key!=="Enter"&&t.key!==" "&&t.key!=="ArrowDown"||(t.stopImmediatePropagation(),t.preventDefault(),this._isOptionsOpen=!this._isOptionsOpen,this._isOptionsOpen?(e=this.listboxRef.value)==null||e.focusFirstOrSelectedOption():(i=this.arrowRef.value)==null||i.focus())}handleOptionToggled(t){this.toggleValue(t.detail)}handleSearch(t){t.stopPropagation(),this._search=t.detail.toLowerCase()}handleInputKeydown(t){var e,i,a;switch(t.key){case",":this.multiple&&(t.preventDefault(),this.addValue());break;case"Enter":t.preventDefault(),this.addValue();break;case"Backspace":!this._search&&((e=this.inputRef.value)==null?void 0:e.type)==="hidden"&&this.removeLastValue(t);break;case"Tab":case"ArrowDown":t.shiftKey||((i=this.listboxRef.value)==null||i.focusFirstOrSelectedOption(),t.preventDefault());break;case"Escape":this._isOptionsOpen=!1,(a=this.arrowRef.value)==null||a.focus(),t.preventDefault();break}}handleTagRemove(t){this.removeSelected(t)}blurInput(){this.inputRef.value&&this.inputRef.value.matches(":focus")&&this.inputRef.value.blur()}checkForMatches(){var t;const e=((t=this.inputRef.value)==null?void 0:t.value)||this._search||"",i=e.trim().toLowerCase()||"";if(!i){!this.multiple&&this._value[0]&&this.removeValue(this._value[0]),this.resetComboboxInput(!1);return}const a=this._value.find(h=>h.toLowerCase()===i),n=this._options.filter(h=>{var d;return((d=h.label)==null?void 0:d.toLowerCase().includes(i))??!1}),r=n.find(h=>{var d;return((d=h.label)==null?void 0:d.toLowerCase())===i||h.value.toLowerCase()===i});switch(!0){case((n.length===0||!r)&&this.allowUserInput):this._addValueText=e,this._userInfoMessage="";break;case(n.length===0&&!this._options.length&&!this.allowUserInput):this._addValueText=null,this._userInfoMessage="Ingen match i søket";break;case!!a:this._addValueText=null,this._userInfoMessage="Verdien er allerede valgt";break;case n.length>1:this._addValueText=null,this._userInfoMessage="";break;default:this._addValueText=null,this._userInfoMessage=""}}findValueInOptions(t){return this.options.find(e=>e.value===t||e.label===t)||null}findIndexInOptions(t){return this._options.findIndex(e=>e.value===t||e.label===t)}isMaxItemsReached(){const t=this.maxlength!==null&&this._value.length>=this.maxlength;return t?this._maxIsReached=!0:this._maxIsReached=!1,t}toggleValue(t){var e,i;if(this.disabled)return;this.touched=!0,this._userInfoMessage="",this._addValueText=null;const a=((e=this.findValueInOptions(t))==null?void 0:e.value)||null,n=this._value.includes(t||a||""),r=!!a,h=((i=this._options.find(S=>S.value===t))==null?void 0:i.disabled)||!1,d=!(t!=null&&t.trim()),p=!this.multiple,f=this.multiple,g=this.isMaxItemsReached();let y=!1,b=!0,k="",w="";h||(!r&&this.allowUserInput&&!d?(this.addNewUserValue(t),k="Ny verdi lagt til",y=!f):!r&&!this.allowUserInput?(p&&this._value[0]&&this.removeValue(this._value[0]),b=!1,y=!0,k="Ingen treff i søket"):n?(this.removeValue(a),y=!0):d&&p?(this.removeAllSelected(),y=!0):p?(this._value[0]&&this.removeSelected(this._value[0]),this.setSelected(a),y=!1,this.inputRef.value&&this.inputRef.value.type!=="hidden"&&(this.inputRef.value.value="",this.inputRef.value.blur())):f&&!g?(this.setSelected(a),y=!0):f&&g?(this._userInfoMessage="Maks antall valg nådd",b=!1,w=t):(p&&this.removeAllSelected(),this._userInfoMessage="Ingen gyldig verdi valgt",b=!1,y=!0,w=t),this._isOptionsOpen=y,y||window.setTimeout(()=>{var S;(S=this.focusRef.value)==null||S.focus()},0),this._userInfoMessage=k,this._search=w||"",this.resetComboboxInput(b),f&&this.isMaxItemsReached())}setSelected(t){if(!this._value.includes(t)){if(this.multiple&&this.isMaxItemsReached()){this._userInfoMessage="Maks antall valg nådd";return}!this.multiple&&this.removeAllSelected(),this._value=t?[...this._value,t]:this._value,this._options=this._options.map(e=>(e.value===t&&(e.selected=!0),e)),this.resetComboboxInput(!0)}}removeSelected(t){if(!t)return;this._value=this._value.filter(i=>i!==t);const e=this.findValueInOptions(t);e?(e.selected=!1,e.userAdded?(this._options=[...this._options.filter(i=>i.value!==t)],this.options=[...this.options.filter(i=>i.value!==t)]):this._options=[...this._options,e]):!t&&!this.multiple&&(this._options=this._options.map(i=>(i.selected=!1,i)))}addAllOptions(){if(this.multiple){if(this.maxlength&&this._options.length>this.maxlength){this._userInfoMessage="For mange valgt";return}this._value=this._options.map(t=>t.value),this._options=this._options.map(t=>(t.selected=!0,t)),this.requestUpdate()}}removeAllSelected(){this._value=[],this._options=this._options.map(t=>(t.selected=!1,t)),this._options=this._options.filter(t=>!t.userAdded),this.requestUpdate()}addValue(){var t;const e=((t=this.inputRef.value)==null?void 0:t.value.trim())||"";this._search=e,this.toggleValue(e)}removeValue(t){this._value=this.multiple?this._value.filter(e=>e!==t):[],this.removeSelected(t)}addNewUserValue(t){if(!t||t.trim()==="")return;if(!this.multiple)this._value[0]&&this.removeSelected(this._value[0]),this._value=[t],this._isOptionsOpen=!1,this.blurInput();else if(!this.findValueInOptions(t)){if(this.isMaxItemsReached())return;this._value=[...this._value,t]}const e={value:t,label:t,userAdded:!0};this.options=[e,...this.options],this._options=[e,...this._options],this.setSelected(t),this.requestUpdate()}resetComboboxInput(t=!0){if(this._addValueText=null,this.inputRef.value&&this.inputRef.value.type!=="hidden"&&t)if(this._search="",this.multiple)this.inputRef.value.value="";else{const e=this.findValueInOptions(this._value[0]);window.setTimeout(()=>{!this.inputRef.value||this.inputRef.value.type==="hidden"||(this.inputRef.value.value=this.displayValueAs==="label"&&e!=null&&e.label?e.label:this._value[0]||"")},0),this._userInfoMessage=""}this._options=[...this.options]}removeLastValue(t){if(this._value.length===0)return;t.preventDefault();const e=this._value[this._value.length-1];e&&this.removeSelected(e),this.isMaxItemsReached()}};et([o({type:String,reflect:!0})],tt.prototype,"value",2),et([o({type:Array})],tt.prototype,"options",2),et([o({type:Array})],tt.prototype,"defaultOptions",2),et([o({type:Boolean})],tt.prototype,"allowUserInput",2),et([o({type:Boolean})],tt.prototype,"typeahead",2),et([o({type:Boolean})],tt.prototype,"includeSearch",2),et([o({type:String})],tt.prototype,"searchPlaceholder",2),et([o({type:Boolean})],tt.prototype,"multiple",2),et([o({type:Number})],tt.prototype,"maxlength",2),et([o({type:String})],tt.prototype,"displayValueAs",2),et([o({type:String})],tt.prototype,"tagPlacement",2),et([V()],tt.prototype,"_options",2),et([V()],tt.prototype,"_isOptionsOpen",2),et([V()],tt.prototype,"_value",2),et([V()],tt.prototype,"_userInfoMessage",2),et([V()],tt.prototype,"_addValueText",2),et([V()],tt.prototype,"_maxIsReached",2),et([V()],tt.prototype,"_search",2),et([V()],tt.prototype,"_inputFocus",2),et([V()],tt.prototype,"_editingSingleValue",2),tt=et([j("pkt-combobox")],tt);const Nl={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var Al=Object.defineProperty,El=Object.getOwnPropertyDescriptor,ee=(s,t,e,i)=>{for(var a=i>1?void 0:i?El(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 Mi=null;function Ml(){return Mi||(Mi=new Promise((s,t)=>{if(document.querySelector("#oslo-consent-script")){s();return}const e=document.createElement("script");e.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",e.id="oslo-consent-script",e.onload=()=>s(),e.onerror=t,document.head.appendChild(e);const i=document.createElement("link");i.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",i.type="text/css",i.rel="stylesheet",i.id="oslo-consent-styles",document.head.appendChild(i)}),Mi)}let Ut=class extends Y{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||Nl.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var t;super.disconnectedCallback(),this._cookieEventHandler&&((t=window.__cookieEvents)==null||t.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(t){let e;try{e=JSON.parse(t)}catch{e=t}return e}emitCookieConsents(t){const e=this.returnJsonOrObject(t.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:e,bubbles:!0,cancelable:!1}))}async firstUpdated(t){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await Ml(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(t=>{if(t){const e={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(e),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(t){var e;t.preventDefault(),(e=window.cookieBanner)!=null&&e.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?u`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?u`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
719
727
  <pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
720
728
  ${this.triggerText}
721
729
  </a>`:this.triggerType==="icon"?u`<pkt-button
@@ -725,7 +733,7 @@
725
733
  @click=${this.openModal}
726
734
  >
727
735
  >${this.triggerText}</pkt-button
728
- >`:u`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`}};ee([o({type:Boolean})],Ht.prototype,"devMode",2),ee([o({type:String})],Ht.prototype,"hotjarId",2),ee([o({type:String})],Ht.prototype,"googleAnalyticsId",2),ee([o({type:String})],Ht.prototype,"cookieDomain",2),ee([o({type:String})],Ht.prototype,"cookieSecure",2),ee([o({type:String})],Ht.prototype,"cookieExpiryDays",2),ee([o({type:String})],Ht.prototype,"triggerType",2),ee([o({type:String})],Ht.prototype,"triggerText",2),ee([o({type:String})],Ht.prototype,"i18nLanguage",2),Ht=ee([j("pkt-consent")],Ht);var Pl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,$t=(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&&Pl(t,e,a),a};let mt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.indeterminate=!1,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,e,i){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),t==="indeterminate"&&(this.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0,this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate)),super.attributeChangedCallback(t,e,i)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.firstUpdated(t)}updated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),t.has("checked")&&this.inputRef.value&&(this.inputRef.value.checked=this.checked===""||this.checked==="true"||this.checked===!0),t.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.updated(t)}render(){const t=M({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),e=M({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),i=M({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),a="pkt-tag pkt-tag--small pkt-tag--thin-text",n=()=>u`
736
+ >`:u`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`}};ee([o({type:Boolean})],Ut.prototype,"devMode",2),ee([o({type:String})],Ut.prototype,"hotjarId",2),ee([o({type:String})],Ut.prototype,"googleAnalyticsId",2),ee([o({type:String})],Ut.prototype,"cookieDomain",2),ee([o({type:String})],Ut.prototype,"cookieSecure",2),ee([o({type:String})],Ut.prototype,"cookieExpiryDays",2),ee([o({type:String})],Ut.prototype,"triggerType",2),ee([o({type:String})],Ut.prototype,"triggerText",2),ee([o({type:String})],Ut.prototype,"i18nLanguage",2),Ut=ee([j("pkt-consent")],Ut);var Pl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,$t=(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&&Pl(t,e,a),a};let mt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.indeterminate=!1,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,e,i){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),t==="indeterminate"&&(this.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0,this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate)),super.attributeChangedCallback(t,e,i)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.firstUpdated(t)}updated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),t.has("checked")&&this.inputRef.value&&(this.inputRef.value.checked=this.checked===""||this.checked==="true"||this.checked===!0),t.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.updated(t)}render(){const t=M({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),e=M({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),i=M({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),a="pkt-tag pkt-tag--small pkt-tag--thin-text",n=()=>u`
729
737
  ${this.tagText?u`<span class=${a+" pkt-tag--gray"}>${this.tagText}</span>`:$}
730
738
  ${this.optionalTag?u`<span class=${a+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
731
739
  ${this.requiredTag?u`<span class=${a+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
@@ -766,7 +774,7 @@
766
774
  <time datetime=${t}>${ja(t,this.dateformat)}</time>
767
775
  </pkt-tag>`}):$}
768
776
  </div>
769
- `}};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,Mt=(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 xt=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`
777
+ `}};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`
770
778
  <div
771
779
  class="${M(t)}"
772
780
  ${E(this.popupRef)}
@@ -791,7 +799,7 @@
791
799
  @close=${()=>{this.hide(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}
792
800
  ></pkt-calendar>
793
801
  </div>
794
- `}};Mt([o({type:Boolean,reflect:!0})],xt.prototype,"open",2),Mt([o({type:Boolean})],xt.prototype,"multiple",2),Mt([o({type:Boolean})],xt.prototype,"range",2),Mt([o({type:Boolean})],xt.prototype,"weeknumbers",2),Mt([o({type:Boolean})],xt.prototype,"withcontrols",2),Mt([o({type:Number})],xt.prototype,"maxMultiple",2),Mt([o({type:Array})],xt.prototype,"selected",2),Mt([o({type:String})],xt.prototype,"earliest",2),Mt([o({type:String})],xt.prototype,"latest",2),Mt([o({type:Array})],xt.prototype,"excludedates",2),Mt([o({type:Array})],xt.prototype,"excludeweekdays",2),Mt([o({type:String})],xt.prototype,"currentmonth",2),xt=Mt([j("pkt-datepicker-popup")],xt);var jl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,Ut=(s,t,e,i)=>{for(var a=i>1?void 0:i?Hl(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&&jl(t,e,a),a};let Pt=class extends Y{constructor(){super(...arguments),this.value="",this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.inputClasses={},this.strings={calendar:{buttonAltText:"Åpne kalender"}},this.inputRef=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchManageValidity(t){this.dispatchEvent(new CustomEvent("manage-validity",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return u`
802
+ `}};Pt([o({type:Boolean,reflect:!0})],St.prototype,"open",2),Pt([o({type:Boolean})],St.prototype,"multiple",2),Pt([o({type:Boolean})],St.prototype,"range",2),Pt([o({type:Boolean})],St.prototype,"weeknumbers",2),Pt([o({type:Boolean})],St.prototype,"withcontrols",2),Pt([o({type:Number})],St.prototype,"maxMultiple",2),Pt([o({type:Array})],St.prototype,"selected",2),Pt([o({type:String})],St.prototype,"earliest",2),Pt([o({type:String})],St.prototype,"latest",2),Pt([o({type:Array})],St.prototype,"excludedates",2),Pt([o({type:Array})],St.prototype,"excludeweekdays",2),Pt([o({type:String})],St.prototype,"currentmonth",2),St=Pt([j("pkt-datepicker-popup")],St);var jl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,qt=(s,t,e,i)=>{for(var a=i>1?void 0:i?Hl(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&&jl(t,e,a),a};let Ot=class extends Y{constructor(){super(...arguments),this.value="",this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.inputClasses={},this.strings={calendar:{buttonAltText:"Åpne kalender"}},this.inputRef=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchManageValidity(t){this.dispatchEvent(new CustomEvent("manage-validity",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return u`
795
803
  <div class="pkt-input__container">
796
804
  <input
797
805
  class="${M(this.inputClasses)}"
@@ -825,7 +833,7 @@
825
833
  <span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
826
834
  </button>
827
835
  </div>
828
- `}};Ut([o({type:String})],Pt.prototype,"value",2),Ut([o({type:String})],Pt.prototype,"inputType",2),Ut([o({type:String})],Pt.prototype,"id",2),Ut([o({type:String})],Pt.prototype,"min",2),Ut([o({type:String})],Pt.prototype,"max",2),Ut([o({type:String})],Pt.prototype,"placeholder",2),Ut([o({type:Boolean})],Pt.prototype,"readonly",2),Ut([o({type:Boolean})],Pt.prototype,"disabled",2),Ut([o({type:Object})],Pt.prototype,"inputClasses",2),Ut([o({type:Object})],Pt.prototype,"internals",2),Ut([o({type:Object})],Pt.prototype,"strings",2),Pt=Ut([j("pkt-datepicker-single")],Pt);var Ul=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,Ot=(s,t,e,i)=>{for(var a=i>1?void 0:i?ql(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&&Ul(t,e,a),a};let St=class extends Y{constructor(){super(...arguments),this.value=[],this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.showRangeLabels=!1,this.inputClasses={},this.strings={generic:{from:"Fra",to:"Til"}},this.inputRef=A(),this.inputRefTo=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get inputElementTo(){return this.inputRefTo.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchManageValidity(t){this.dispatchEvent(new CustomEvent("manage-validity",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){const t=Os.getRangeLabelClasses(this.showRangeLabels);return u`
836
+ `}};qt([o({type:String})],Ot.prototype,"value",2),qt([o({type:String})],Ot.prototype,"inputType",2),qt([o({type:String})],Ot.prototype,"id",2),qt([o({type:String})],Ot.prototype,"min",2),qt([o({type:String})],Ot.prototype,"max",2),qt([o({type:String})],Ot.prototype,"placeholder",2),qt([o({type:Boolean})],Ot.prototype,"readonly",2),qt([o({type:Boolean})],Ot.prototype,"disabled",2),qt([o({type:Object})],Ot.prototype,"inputClasses",2),qt([o({type:Object})],Ot.prototype,"internals",2),qt([o({type:Object})],Ot.prototype,"strings",2),Ot=qt([j("pkt-datepicker-single")],Ot);var Ul=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,Dt=(s,t,e,i)=>{for(var a=i>1?void 0:i?ql(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&&Ul(t,e,a),a};let Ct=class extends Y{constructor(){super(...arguments),this.value=[],this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.showRangeLabels=!1,this.inputClasses={},this.strings={generic:{from:"Fra",to:"Til"}},this.inputRef=A(),this.inputRefTo=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get inputElementTo(){return this.inputRefTo.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchManageValidity(t){this.dispatchEvent(new CustomEvent("manage-validity",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){const t=Os.getRangeLabelClasses(this.showRangeLabels);return u`
829
837
  <div class="pkt-input__container">
830
838
  ${this.showRangeLabels?u` <div class="pkt-input-prefix">${this.strings.generic.from}</div> `:$}
831
839
  <input
@@ -883,7 +891,7 @@
883
891
  <span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
884
892
  </button>
885
893
  </div>
886
- `}};Ot([o({type:Array})],St.prototype,"value",2),Ot([o({type:String})],St.prototype,"inputType",2),Ot([o({type:String})],St.prototype,"id",2),Ot([o({type:String})],St.prototype,"min",2),Ot([o({type:String})],St.prototype,"max",2),Ot([o({type:String})],St.prototype,"placeholder",2),Ot([o({type:Boolean})],St.prototype,"readonly",2),Ot([o({type:Boolean})],St.prototype,"disabled",2),Ot([o({type:Boolean})],St.prototype,"showRangeLabels",2),Ot([o({type:Object})],St.prototype,"inputClasses",2),Ot([o({type:Object})],St.prototype,"internals",2),Ot([o({type:Object})],St.prototype,"strings",2),St=Ot([j("pkt-datepicker-range")],St);var zl=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,Dt=(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&&zl(t,e,a),a};let Ct=class extends Y{constructor(){super(...arguments),this.value=[],this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.inputClasses={},this.strings={calendar:{buttonAltText:"Åpne kalender"}},this.inputRef=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}get isInputDisabled(){return this.disabled||this.maxlength!==void 0&&this.maxlength!==null&&this.value.length>=this.maxlength}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchAddToSelected(t){this.dispatchEvent(new CustomEvent("add-to-selected",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return u`
894
+ `}};Dt([o({type:Array})],Ct.prototype,"value",2),Dt([o({type:String})],Ct.prototype,"inputType",2),Dt([o({type:String})],Ct.prototype,"id",2),Dt([o({type:String})],Ct.prototype,"min",2),Dt([o({type:String})],Ct.prototype,"max",2),Dt([o({type:String})],Ct.prototype,"placeholder",2),Dt([o({type:Boolean})],Ct.prototype,"readonly",2),Dt([o({type:Boolean})],Ct.prototype,"disabled",2),Dt([o({type:Boolean})],Ct.prototype,"showRangeLabels",2),Dt([o({type:Object})],Ct.prototype,"inputClasses",2),Dt([o({type:Object})],Ct.prototype,"internals",2),Dt([o({type:Object})],Ct.prototype,"strings",2),Ct=Dt([j("pkt-datepicker-range")],Ct);var zl=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,It=(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&&zl(t,e,a),a};let Tt=class extends Y{constructor(){super(...arguments),this.value=[],this.inputType="date",this.id="",this.readonly=!1,this.disabled=!1,this.inputClasses={},this.strings={calendar:{buttonAltText:"Åpne kalender"}},this.inputRef=A(),this.btnRef=A()}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType==="text"}get isInputDisabled(){return this.disabled||this.maxlength!==void 0&&this.maxlength!==null&&this.value.length>=this.maxlength}dispatchToggleCalendar(t){this.readonly||this.dispatchEvent(new CustomEvent("toggle-calendar",{detail:t,bubbles:!0,composed:!0}))}dispatchInput(t){this.dispatchEvent(new CustomEvent("input-change",{detail:t,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0}))}dispatchBlur(t){this.dispatchEvent(new CustomEvent("input-blur",{detail:t,bubbles:!0,composed:!0}))}dispatchChange(t){this.dispatchEvent(new CustomEvent("input-changed",{detail:t,bubbles:!0,composed:!0}))}dispatchAddToSelected(t){this.dispatchEvent(new CustomEvent("add-to-selected",{detail:t,bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return u`
887
895
  <div class="pkt-input__container">
888
896
  <input
889
897
  class=${M(this.inputClasses)}
@@ -915,7 +923,7 @@
915
923
  <span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
916
924
  </button>
917
925
  </div>
918
- `}};Dt([o({type:Array})],Ct.prototype,"value",2),Dt([o({type:String})],Ct.prototype,"inputType",2),Dt([o({type:String})],Ct.prototype,"id",2),Dt([o({type:String})],Ct.prototype,"min",2),Dt([o({type:String})],Ct.prototype,"max",2),Dt([o({type:String})],Ct.prototype,"placeholder",2),Dt([o({type:Boolean})],Ct.prototype,"readonly",2),Dt([o({type:Boolean})],Ct.prototype,"disabled",2),Dt([o({type:Number})],Ct.prototype,"maxlength",2),Dt([o({type:Object})],Ct.prototype,"inputClasses",2),Dt([o({type:Object})],Ct.prototype,"internals",2),Dt([o({type:Object})],Ct.prototype,"strings",2),Ct=Dt([j("pkt-datepicker-multiple")],Ct);var Rl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,ht=(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`
926
+ `}};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,ht=(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`
919
927
  <pkt-datepicker-single
920
928
  .value=${this._value[0]??""}
921
929
  .inputType=${this.inputType}
@@ -1088,7 +1096,7 @@
1088
1096
  </div>`:$}
1089
1097
  ${this.title?u`<div class="pkt-messagebox__title">${this.title}</div>`:$}
1090
1098
  <div class="pkt-messagebox__text" ${E(this.defaultSlot)}></div>
1091
- </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 It=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`
1099
+ </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`
1092
1100
  <dialog
1093
1101
  class=${M(t)}
1094
1102
  ${E(this.dialogRef)}
@@ -1124,11 +1132,11 @@
1124
1132
  </div>
1125
1133
  </div>
1126
1134
  </dialog>
1127
- `}};Zt([o({type:String})],It.prototype,"headingText",2),Zt([o({type:Boolean})],It.prototype,"removePadding",2),Zt([o({type:Boolean})],It.prototype,"hideCloseButton",2),Zt([o({type:Boolean})],It.prototype,"closeOnBackdropClick",2),Zt([o({type:String})],It.prototype,"closeButtonSkin",2),Zt([o({type:String})],It.prototype,"size",2),Zt([o({type:String})],It.prototype,"variant",2),Zt([o({type:String})],It.prototype,"drawerPosition",2),Zt([o({type:Boolean})],It.prototype,"transparentBackdrop",2),Zt([V()],It.prototype,"_isOpen",2),It=Zt([j("pkt-modal")],It);/**
1135
+ `}};Zt([o({type:String})],Lt.prototype,"headingText",2),Zt([o({type:Boolean})],Lt.prototype,"removePadding",2),Zt([o({type:Boolean})],Lt.prototype,"hideCloseButton",2),Zt([o({type:Boolean})],Lt.prototype,"closeOnBackdropClick",2),Zt([o({type:String})],Lt.prototype,"closeButtonSkin",2),Zt([o({type:String})],Lt.prototype,"size",2),Zt([o({type:String})],Lt.prototype,"variant",2),Zt([o({type:String})],Lt.prototype,"drawerPosition",2),Zt([o({type:Boolean})],Lt.prototype,"transparentBackdrop",2),Zt([V()],Lt.prototype,"_isOpen",2),Lt=Zt([j("pkt-modal")],Lt);/**
1128
1136
  * @license
1129
1137
  * Copyright 2018 Google LLC
1130
1138
  * SPDX-License-Identifier: BSD-3-Clause
1131
- */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 wt}});var hh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,dt=(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
1139
+ */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,dt=(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
1132
1140
  class="pkt-progressbar__container"
1133
1141
  .ref=${this.progressBarRef}
1134
1142
  style=${lh({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
@@ -1144,7 +1152,7 @@
1144
1152
  ${this.statusType==="percentage"?`${i}%`:a}
1145
1153
  </span>
1146
1154
  </div>`:$}
1147
- </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))}};dt([o({type:String})],it.prototype,"ariaLabel",2),dt([o({type:String,reflect:!0})],it.prototype,"ariaLabelledby",2),dt([o({type:String,reflect:!0})],it.prototype,"ariaValueText",2),dt([o({type:String})],it.prototype,"ariaLive",2),dt([o({type:String,reflect:!0})],it.prototype,"id",2),dt([o({type:String})],it.prototype,"role",2),dt([o({type:String})],it.prototype,"skin",2),dt([o({type:String})],it.prototype,"statusPlacement",2),dt([o({type:String})],it.prototype,"statusType",2),dt([o({type:String,reflect:!0})],it.prototype,"title",2),dt([o({type:String})],it.prototype,"titlePosition",2),dt([o({type:Number,reflect:!0})],it.prototype,"valueCurrent",2),dt([o({type:Number})],it.prototype,"valueMax",2),dt([o({type:Number})],it.prototype,"valueMin",2),dt([V()],it.prototype,"labelWidth",2),dt([V()],it.prototype,"progressbarId",2),dt([V()],it.prototype,"computedAriaLabelledby",2),dt([V()],it.prototype,"computedAriaValueText",2),it=dt([j("pkt-progressbar")],it);var ch=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Lt=(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 Tt=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`
1155
+ </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))}};dt([o({type:String})],it.prototype,"ariaLabel",2),dt([o({type:String,reflect:!0})],it.prototype,"ariaLabelledby",2),dt([o({type:String,reflect:!0})],it.prototype,"ariaValueText",2),dt([o({type:String})],it.prototype,"ariaLive",2),dt([o({type:String,reflect:!0})],it.prototype,"id",2),dt([o({type:String})],it.prototype,"role",2),dt([o({type:String})],it.prototype,"skin",2),dt([o({type:String})],it.prototype,"statusPlacement",2),dt([o({type:String})],it.prototype,"statusType",2),dt([o({type:String,reflect:!0})],it.prototype,"title",2),dt([o({type:String})],it.prototype,"titlePosition",2),dt([o({type:Number,reflect:!0})],it.prototype,"valueCurrent",2),dt([o({type:Number})],it.prototype,"valueMax",2),dt([o({type:Number})],it.prototype,"valueMin",2),dt([V()],it.prototype,"labelWidth",2),dt([V()],it.prototype,"progressbarId",2),dt([V()],it.prototype,"computedAriaLabelledby",2),dt([V()],it.prototype,"computedAriaValueText",2),it=dt([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`
1148
1156
  ${this.tagText?u`<span class=${i+" pkt-tag--gray"}>${this.tagText}</span>`:$}
1149
1157
  ${this.optionalTag?u`<span class=${i+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
1150
1158
  ${this.requiredTag?u`<span class=${i+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
@@ -1174,7 +1182,7 @@
1174
1182
  ${n()}
1175
1183
  </div>
1176
1184
  </div>
1177
- `}toggleChecked(s=null){s&&s.preventDefault(),s&&s.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(":checked"),this.valueChecked(this._checked))}};Lt([o({type:String,reflect:!0})],Tt.prototype,"value",2),Lt([o({type:String})],Tt.prototype,"checkHelptext",2),Lt([o({type:Boolean})],Tt.prototype,"defaultChecked",2),Lt([o({type:Boolean})],Tt.prototype,"hasTile",2),Lt([o({type:Boolean,reflect:!0})],Tt.prototype,"checked",2),Lt([o({type:String,reflect:!0})],Tt.prototype,"type",2),Lt([o({type:String})],Tt.prototype,"tagText",2),Lt([o({type:Boolean})],Tt.prototype,"optionalTag",2),Lt([o({type:String})],Tt.prototype,"optionalText",2),Lt([o({type:Boolean})],Tt.prototype,"requiredTag",2),Lt([o({type:String})],Tt.prototype,"requiredText",2),Lt([V()],Tt.prototype,"_checked",2),Tt=Lt([j("pkt-radiobutton")],Tt);/**
1185
+ `}toggleChecked(s=null){s&&s.preventDefault(),s&&s.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(":checked"),this.valueChecked(this._checked))}};Bt([o({type:String,reflect:!0})],Nt.prototype,"value",2),Bt([o({type:String})],Nt.prototype,"checkHelptext",2),Bt([o({type:Boolean})],Nt.prototype,"defaultChecked",2),Bt([o({type:Boolean})],Nt.prototype,"hasTile",2),Bt([o({type:Boolean,reflect:!0})],Nt.prototype,"checked",2),Bt([o({type:String,reflect:!0})],Nt.prototype,"type",2),Bt([o({type:String})],Nt.prototype,"tagText",2),Bt([o({type:Boolean})],Nt.prototype,"optionalTag",2),Bt([o({type:String})],Nt.prototype,"optionalText",2),Bt([o({type:Boolean})],Nt.prototype,"requiredTag",2),Bt([o({type:String})],Nt.prototype,"requiredText",2),Bt([V()],Nt.prototype,"_checked",2),Nt=Bt([j("pkt-radiobutton")],Nt);/**
1178
1186
  * @license
1179
1187
  * Copyright 2021 Google LLC
1180
1188
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1242,7 +1250,7 @@
1242
1250
  * @license
1243
1251
  * Copyright 2020 Google LLC
1244
1252
  * SPDX-License-Identifier: BSD-3-Clause
1245
- */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===wt||t===$)return t;const e=s.element,i=s.name;if(s.type===Rt.PROPERTY){if(t===e[i])return wt}else if(s.type===Rt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return wt}else if(s.type===Rt.ATTRIBUTE&&e.getAttribute(i)===t+"")return wt;return ka(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
1253
+ */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 ka(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
1246
1254
  label=${this.label}
1247
1255
  ?counter=${this.counter}
1248
1256
  ?disabled=${this.disabled}
@@ -1432,8 +1440,8 @@
1432
1440
  <ul>
1433
1441
  ${s.map(t=>u`<li>${t}</li>`)}
1434
1442
  </ul>
1435
- `}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 L=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[y,b]=x.useState(s),{name:k}=Pn(),w=h||k,S=n!==void 0?n:y;x.useEffect(()=>{n===void 0&&b(s)},[s,n]);const O=T=>{const Z=T.currentTarget.open;n===void 0&&b(Z),f==null||f(T)},N=T=>{setTimeout(()=>{p==null||p(T)},0)},B=["pkt-accordion-item",a&&"pkt-accordion-item--compact",i&&`pkt-accordion-item--${i}`,d].filter(Boolean).join(" ");return l.jsxs("details",{ref:g,className:B,id:t,open:S,onClick:N,name:w,onToggle:O,children:[l.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[e,l.jsx(L,{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:{}};/*!
1443
+ `}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 L=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[y,b]=x.useState(s),{name:k}=Pn(),w=h||k,S=n!==void 0?n:y;x.useEffect(()=>{n===void 0&&b(s)},[s,n]);const P=T=>{const Z=T.currentTarget.open;n===void 0&&b(Z),f==null||f(T)},N=T=>{setTimeout(()=>{p==null||p(T)},0)},B=["pkt-accordion-item",a&&"pkt-accordion-item--compact",i&&`pkt-accordion-item--${i}`,d].filter(Boolean).join(" ");return l.jsxs("details",{ref:g,className:B,id:t,open:S,onClick:N,name:w,onToggle:P,children:[l.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[e,l.jsx(L,{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:{}};/*!
1436
1444
  Copyright (c) 2018 Jed Watson.
1437
1445
  Licensed under the MIT License (MIT), see
1438
1446
  http://jedwatson.github.io/classnames
1439
- */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 ct=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,y]=x.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":g},k={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},w=x.useCallback(()=>{y(!0),f.onClose&&f.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[f.onClose,y]),S=n||r;return l.jsx("div",{...f,"aria-live":S,role:h,className:ct(b,p),children:l.jsxs("div",{className:ct(k),children:[l.jsx(L,{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(L,{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(L,{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(L,{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(L,{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.19/animations/";const je=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",size:a="medium",fullWidth:n=!1,fullWidthOnMobile:r=!1,skin:h="primary",type:d="button",variant:p="label-only",state:f,color:g,isLoading:y=void 0,disabled:b=void 0,loadingAnimationPath:k=window.pktAnimationPath,...w},S)=>{const O=[t,"pkt-btn",a&&`pkt-btn--${a}`,n&&"pkt-btn--full",r&&"pkt-btn--full-small",h&&`pkt-btn--${h}`,p&&`pkt-btn--${p}`,g&&`pkt-btn--${g}`,f&&`pkt-btn--${f}`,y&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...w,"aria-busy":y||void 0,"aria-disabled":b||void 0,disabled:b,className:O,type:d,ref:S,children:[y&&l.jsx(L,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:k}),p!=="label-only"&&l.jsx(L,{className:"pkt-btn__icon",name:e}),l.jsx("span",{className:"pkt-btn__text",children:s}),p==="icons-right-and-left"&&l.jsx(L,{className:"pkt-btn__icon",name:i})]})});je.displayName="PktButton";const Dh=Wt({tagName:"pkt-card",elementClass:lt,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:y,optionalTag:b,optionalText:k="Valgfritt",requiredTag:w,requiredText:S="Må fylles ut",tagText:O,...N},B)=>{const T=x.useRef(null);x.useEffect(()=>{T.current&&y!==void 0&&(T.current.indeterminate=y)},[y]),x.useEffect(()=>{typeof B=="function"?B(T.current):B&&(B.current=T.current)},[B]);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(" "),qt=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),vt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Q=()=>l.jsxs(l.Fragment,{children:[O&&l.jsx("span",{className:vt+" pkt-tag--gray",children:O}),b&&l.jsx("span",{className:vt+" pkt-tag--blue-light",children:k}),w&&l.jsx("span",{className:vt+" pkt-tag--beige",children:S})]});return l.jsx("div",{className:W,children:l.jsxs("div",{className:qt,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:T,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},...N}),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:Ht,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:y=null,cookieExpiryDays:b=null,onToggleConsent:k=w=>{console.log(w.detail)}})=>{var S,O;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}),(S=s.links)==null?void 0:S.map((N,B)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${B}`))]})]}),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}),(O=t.links)==null?void 0:O.map((N,B)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${B}`))]})]}),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(L,{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(L,{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:y,cookieExpiryDays:b,onToggleConsent:k})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(N=>N.language).map((N,B)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:N.href,"aria-label":`til ${N.language} versjon av nettsiden`,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:N.language})},`sociallinks-language-${B}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(N=>N.iconName).map((N,B)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:N.href,"aria-label":`til ${N.iconName}`,className:"pkt-footer__social-icon-link",target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(L,{className:"pkt-footer__social-icon",name:N.iconName})})},`sociallinks-${B}`))})]})]})})},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:y})=>{const b=[y,"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((k,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${k.external?" pkt-link--external":""}`,href:k.href,target:k.openInNewTab||t?"_blank":"_self",rel:k.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),k.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(L,{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(L,{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:y=!1,openMenu:b,logOut:k,changeRepresentation:w,children:S,...O},N)=>{const B=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]),[T,W]=x.useState(!1),[Z,qt]=x.useState(0),[vt,Q]=x.useState(!1),rt=x.useRef(null);x.useEffect(()=>(document&&(document.addEventListener("mouseup",Ft),window.addEventListener("scroll",ot)),()=>{document&&(document.removeEventListener("mouseup",Ft),window.removeEventListener("scroll",ot))}));const Bt=()=>{Q(!vt)},Ft=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),qt(F)}};return l.jsxs("header",{...O,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ct(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":T}),ref:N,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(L,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.19/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(L,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.19/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 ${vt&&!T?"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":vt,onClick:Bt,children:[l.jsx(L,{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(L,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(L,{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:B})]})]}),r&&l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:r.map((F,Nt)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(L,{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(L,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userMenu-${Nt}`))})}),(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(L,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!y)&&l.jsxs(l.Fragment,{children:[d==null?void 0:d.map((F,Nt)=>l.jsx("li",{children:typeof F.target=="string"?l.jsxs("a",{href:F.target,className:"pkt-link",children:[F.iconName&&l.jsx(L,{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(L,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userOptions-${Nt}`)),!y&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:k,children:[l.jsx(L,{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,Nt)=>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-${Nt}`))})})]})]}),S&&l.jsx("li",{children:S}),y&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:k,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:y=null,hasError:b=!1,errorMessage:k,disabled:w=!1,inline:S=!1,ariaDescribedby:O,useWrapper:N=!0,children:B,className:T="",hasFieldset:W=!1,role:Z="group",counterPosition:qt="bottom"},vt)=>{const[Q,rt]=x.useState(!1),Bt=O||(e?`${s}-helptext`:void 0),Ft=!!n,ot=Ft&&qt==="top",F=Ft&&qt==="bottom",Nt=()=>rt(pt=>!pt),ae=["pkt-inputwrapper",T,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",S?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),de=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ne=()=>Ft?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,He=()=>l.jsxs(l.Fragment,{children:[y&&l.jsx("span",{className:de+" pkt-tag--gray",children:y}),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 pt=l.jsxs(l.Fragment,{children:[t," ",He()]});return N?W?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:pt}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Bt,id:`${s}-label`,children:pt}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":Bt,id:`${s}-label`,children:t})},ce=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&N&&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:Nt,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,{}),B,F&&l.jsx(ne,{}),b&&k&&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:k})})]});return l.jsx("div",{className:ae,ref:vt,role:Z,children:W?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Bt,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:ct(d,e),href:s,target:n,rel:a?"noopener noreferrer":void 0,children:[t&&l.jsx(L,{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:ct(p,h),target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[a&&l.jsx(L,{className:"pkt-link__icon",name:a}),e&&l.jsx("div",{className:ct(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(),y=x.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:ct(f,t),ref:g,children:[n&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:y,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(L,{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:It,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:y,requiredText:b,tagText:k,...w},S)=>{const O=[i,"pkt-input-check"].filter(Boolean).join(" "),N=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),B=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),T=["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:[k&&l.jsx("span",{className:W+" pkt-tag--gray",children:k}),f&&l.jsx("span",{className:W+" pkt-tag--blue-light",children:g}),y&&l.jsx("span",{className:W+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:O,children:l.jsxs("div",{className:N,children:[l.jsx("input",{ref:S,id:s,type:"radio",name:t,disabled:n,className:B,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:T,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:y,onSuggestionClick:b,...k},w)=>{const S=(T,W)=>{T?T():b&&b(W)},O=T=>{d=T.target.value},N=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let B;return p?B=T=>l.jsx("form",{role:"search",className:N,action:p,method:f,children:T}):B=T=>l.jsx("div",{role:"search",className:N,children:T}),B(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||O,onKeyUp:y&&(T=>{T.key==="Enter"&&(T.preventDefault(),y(d))}),...k}),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:y&&(T=>{T.preventDefault(),y(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((T,W)=>l.jsx("li",{children:x.createElement(T.href?"a":T.onClick?"button":"div",{href:T.href,className:`pkt-searchinput__suggestion ${T.onClick?"pkt-link-button":""} ${T.href||T.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:T.onClick?"button":void 0,onClick:()=>S(T.onClick,W),onKeyUp:Z=>Z.key==="Enter"&&S(T.onClick,W)},l.jsxs(l.Fragment,{children:[T.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:T.title}),T.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:T.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:y=!1,label:b,name:k,optionalTag:w=!1,optionalText:S,requiredTag:O=!1,requiredText:N,tagText:B,...T},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:S,requiredTag:O,requiredText:N,tagText:B,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:W,className:`pkt-input ${y?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${f}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${f}-input`,name:k||f,...T,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:ct("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:ct("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=ct(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:ct(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:ct(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:ct(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),td=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:ct(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:ct(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),sd=({className:s,children:t,...e})=>l.jsx("th",{className:ct(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),id=({className:s,children:t,...e})=>l.jsx("tr",{className:ct(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},y)=>{const[b,k]=x.useState(!1),w=x.useCallback(()=>{k(!0),d&&d()},[k]),S=x.useRef(null),O=x.useMemo(()=>{var T,W;if(a&&!h){const Z=(W=(T=S.current)==null?void 0:T.textContent)==null?void 0:W.trim();return Z&&`Klikk for å fjerne ${Z}`||f}},[a,h]),N={"pkt-tag":!0,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,[`pkt-tag--${e}`]:!!e},B={"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:ct(B,n),type:p,onClick:w,"aria-label":h,"aria-description":O,ref:y,children:[r&&l.jsx(L,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:S,children:s}),l.jsx(L,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...g,className:ct(N,n),ref:y,children:[r&&l.jsx(L,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:S,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:y,selectTab:b}=ad(),w={"aria-selected":f?!!t:void 0,"aria-controls":n,role:f?"tab":void 0,onKeyUp:O=>y(d,O),onClick:O=>{b(d),i==null||i(O)},tabIndex:t||!f?void 0:-1,ref:O=>{g(d,O),typeof p=="function"?p(O):p&&(p.current=O)}},S=l.jsxs(l.Fragment,{children:[a&&l.jsx(L,{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:S}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:S})});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=k=>{const w=e==null?void 0:e[k];w!=null&&w.action&&w.action(k),i&&i(k)},g=(k,w)=>{var S,O;h&&(w.code==="ArrowLeft"&&k!==0&&((S=r.current[k-1])==null||S.focus()),w.code==="ArrowRight"&&k<p-1&&((O=r.current[k+1])==null||O.focus()),(w.code==="ArrowDown"||w.code==="Space")&&f(k))},y=(k,w)=>{r.current[k]=w},b=e==null?void 0:e.map((k,w)=>{var S,O;return l.jsx(Fi,{active:k.active,href:k.href,onClick:()=>f(w),icon:k.icon,controls:k.controls,tag:(S=k.tag)==null?void 0:S.text,tagSkin:(O=k.tag)==null?void 0:O.skin,index:w,children:k.text},w)});return l.jsx(bn.Provider,{value:{arrowNav:h,registerTabRef:y,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:y,fullwidth:b=!1,label:k,name:w,optionalTag:S=!1,optionalText:O,requiredTag:N=!1,requiredText:B,tagText:T=null,placeholder:W,rows:Z,useWrapper:qt=!0,onChange:vt,value:Q,autoComplete:rt="off",minLength:Bt,maxLength:Ft,readOnly:ot=!1,skipForwardTestid:F=!1,...Nt},ae)=>{const de=[n,"pkt-textinput","pkt-textarea"].join(" "),ne=`${s}-input`,He=`${ne}-label`,hs=e||He,[ce,zt]=x.useState(0),pt=Ue=>{var qe,pe;if(i&&zt(((pe=(qe=Ue.currentTarget)==null?void 0:qe.value)==null?void 0:pe.length)||0),vt)return vt(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:y,label:k,optionalTag:S,optionalText:O,requiredTag:N,requiredText:B,tagText:T,useWrapper:qt,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`,...Nt,onChange:pt,value:Q,autoComplete:rt,minLength:Bt,maxLength:Ft,"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:y,iconNameRight:b,inline:k=!1,fullwidth:w=!1,label:S,name:O,optionalTag:N=!1,optionalText:B,requiredTag:T=!1,requiredText:W,tagText:Z=null,placeholder:qt,prefix:vt,suffix:Q,type:rt="text",useWrapper:Bt=!0,omitSearchIcon:Ft=!1,value:ot,minLength:F,maxLength:Nt,min:ae,max:de,step:ne,size:He,readonly:hs,required:ce,dataTestid:zt,onChange:pt,skipForwardTestid:Ue=!1,...qe},pe)=>{const ji=[r,"pkt-textinput"].join(" "),hi=rt==="search"&&!b&&!Ft,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),pt&&pt($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:y,inline:k,label:S,optionalTag:N,optionalText:B,requiredTag:T,requiredText:W,tagText:Z,useWrapper:Bt,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:[vt&&l.jsx("div",{className:"pkt-input-prefix",children:vt}),l.jsx("input",{...qe,ref:pe,className:`pkt-input ${w?"pkt-input--fullwidth":""} ${n&&di>n?"pkt-input--counter-error":""}`,type:rt,name:`${O||s}`,value:Hi,id:cs,placeholder:qt,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:Nt,size:He,required:ce}),Q&&l.jsxs("p",{className:"pkt-input-suffix",children:[Q,b&&l.jsx(L,{className:"pkt-input-suffix-icon",name:b}),hi&&l.jsx(L,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!Q&&b&&l.jsx(L,{className:"pkt-input-icon",name:b}),!Q&&hi&&l.jsx(L,{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 kn(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 yn(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_)),yn(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});kn(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(),yn(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&&kn(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"}));P.PktAccordion=Ki,P.PktAccordionItem=tn,P.PktAlert=Li,P.PktBackLink=sn,P.PktBreadcrumbs=Oh,P.PktButton=je,P.PktCard=an,P.PktCheckbox=nn,P.PktCombobox=rn,P.PktConsent=li,P.PktDatepicker=on,P.PktFooter=Bh,P.PktFooterSimple=Fh,P.PktHeader=Vh,P.PktHeading=ln,P.PktHelptext=hn,P.PktIcon=L,P.PktInput=dn,P.PktInputWrapper=Bs,P.PktLink=cn,P.PktLinkCard=pn,P.PktLoader=un,P.PktMessagebox=fn,P.PktModal=gn,P.PktProgressbar=mn,P.PktRadioButton=vn,P.PktSearchInput=Wh,P.PktSelect=Rh,P.PktStep=Zh,P.PktStepper=Xh,P.PktTabItem=Fi,P.PktTable=Jh,P.PktTableBody=Qh,P.PktTableDataCell=td,P.PktTableHeader=ed,P.PktTableHeaderCell=sd,P.PktTableRow=id,P.PktTabs=nd,P.PktTag=Bi,P.PktTextarea=rd,P.PktTextinput=od,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
1447
+ */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 ct=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,y]=x.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":g},k={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},w=x.useCallback(()=>{y(!0),f.onClose&&f.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[f.onClose,y]),S=n||r;return l.jsx("div",{...f,"aria-live":S,role:h,className:ct(b,p),children:l.jsxs("div",{className:ct(k),children:[l.jsx(L,{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(L,{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(L,{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(L,{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(L,{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.19/animations/";const je=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",size:a="medium",fullWidth:n=!1,fullWidthOnMobile:r=!1,skin:h="primary",type:d="button",variant:p="label-only",state:f,color:g,isLoading:y=void 0,disabled:b=void 0,loadingAnimationPath:k=window.pktAnimationPath,...w},S)=>{const P=[t,"pkt-btn",a&&`pkt-btn--${a}`,n&&"pkt-btn--full",r&&"pkt-btn--full-small",h&&`pkt-btn--${h}`,p&&`pkt-btn--${p}`,g&&`pkt-btn--${g}`,f&&`pkt-btn--${f}`,y&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...w,"aria-busy":y||void 0,"aria-disabled":b||void 0,disabled:b,className:P,type:d,ref:S,children:[y&&l.jsx(L,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:k}),p!=="label-only"&&l.jsx(L,{className:"pkt-btn__icon",name:e}),l.jsx("span",{className:"pkt-btn__text",children:s}),p==="icons-right-and-left"&&l.jsx(L,{className:"pkt-btn__icon",name:i})]})});je.displayName="PktButton";const Dh=Wt({tagName:"pkt-card",elementClass:lt,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:y,optionalTag:b,optionalText:k="Valgfritt",requiredTag:w,requiredText:S="Må fylles ut",tagText:P,...N},B)=>{const T=x.useRef(null);x.useEffect(()=>{T.current&&y!==void 0&&(T.current.indeterminate=y)},[y]),x.useEffect(()=>{typeof B=="function"?B(T.current):B&&(B.current=T.current)},[B]);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(" "),vt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Q=()=>l.jsxs(l.Fragment,{children:[P&&l.jsx("span",{className:vt+" pkt-tag--gray",children:P}),b&&l.jsx("span",{className:vt+" pkt-tag--blue-light",children:k}),w&&l.jsx("span",{className:vt+" pkt-tag--beige",children:S})]});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:T,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},...N}),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:y=null,cookieExpiryDays:b=null,onToggleConsent:k=w=>{console.log(w.detail)}})=>{var S,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}),(S=s.links)==null?void 0:S.map((N,B)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${B}`))]})]}),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((N,B)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${B}`))]})]}),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(L,{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(L,{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:y,cookieExpiryDays:b,onToggleConsent:k})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(N=>N.language).map((N,B)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:N.href,"aria-label":`til ${N.language} versjon av nettsiden`,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:N.language})},`sociallinks-language-${B}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(N=>N.iconName).map((N,B)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:N.href,"aria-label":`til ${N.iconName}`,className:"pkt-footer__social-icon-link",target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(L,{className:"pkt-footer__social-icon",name:N.iconName})})},`sociallinks-${B}`))})]})]})})},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:y})=>{const b=[y,"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((k,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${k.external?" pkt-link--external":""}`,href:k.href,target:k.openInNewTab||t?"_blank":"_self",rel:k.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(L,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),k.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(L,{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(L,{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:y=!1,openMenu:b,logOut:k,changeRepresentation:w,children:S,...P},N)=>{const B=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]),[T,W]=x.useState(!1),[Z,wt]=x.useState(0),[vt,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(!vt)},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:ct(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":T}),ref:N,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(L,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.19/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(L,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.19/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 ${vt&&!T?"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":vt,onClick:Ft,children:[l.jsx(L,{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(L,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(L,{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:B})]})]}),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(L,{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(L,{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(L,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!y)&&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(L,{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(L,{name:F.iconName,className:"pkt-link__icon"}),F.title]})},`userOptions-${At}`)),!y&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:k,children:[l.jsx(L,{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}`))})})]})]}),S&&l.jsx("li",{children:S}),y&&l.jsx("li",{children:l.jsx(je,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:k,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:y=null,hasError:b=!1,errorMessage:k,disabled:w=!1,inline:S=!1,ariaDescribedby:P,useWrapper:N=!0,children:B,className:T="",hasFieldset:W=!1,role:Z="group",counterPosition:wt="bottom"},vt)=>{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(pt=>!pt),ae=["pkt-inputwrapper",T,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",S?"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:[y&&l.jsx("span",{className:de+" pkt-tag--gray",children:y}),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 pt=l.jsxs(l.Fragment,{children:[t," ",He()]});return N?W?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:pt}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Ft,id:`${s}-label`,children:pt}):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&&N&&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,{}),B,F&&l.jsx(ne,{}),b&&k&&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:k})})]});return l.jsx("div",{className:ae,ref:vt,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:ct(d,e),href:s,target:n,rel:a?"noopener noreferrer":void 0,children:[t&&l.jsx(L,{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:ct(p,h),target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[a&&l.jsx(L,{className:"pkt-link__icon",name:a}),e&&l.jsx("div",{className:ct(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(),y=x.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:ct(f,t),ref:g,children:[n&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:y,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(L,{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:y,requiredText:b,tagText:k,...w},S)=>{const P=[i,"pkt-input-check"].filter(Boolean).join(" "),N=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),B=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),T=["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:[k&&l.jsx("span",{className:W+" pkt-tag--gray",children:k}),f&&l.jsx("span",{className:W+" pkt-tag--blue-light",children:g}),y&&l.jsx("span",{className:W+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:P,children:l.jsxs("div",{className:N,children:[l.jsx("input",{ref:S,id:s,type:"radio",name:t,disabled:n,className:B,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:T,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:y,onSuggestionClick:b,...k},w)=>{const S=(T,W)=>{T?T():b&&b(W)},P=T=>{d=T.target.value},N=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let B;return p?B=T=>l.jsx("form",{role:"search",className:N,action:p,method:f,children:T}):B=T=>l.jsx("div",{role:"search",className:N,children:T}),B(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:y&&(T=>{T.key==="Enter"&&(T.preventDefault(),y(d))}),...k}),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:y&&(T=>{T.preventDefault(),y(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((T,W)=>l.jsx("li",{children:x.createElement(T.href?"a":T.onClick?"button":"div",{href:T.href,className:`pkt-searchinput__suggestion ${T.onClick?"pkt-link-button":""} ${T.href||T.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:T.onClick?"button":void 0,onClick:()=>S(T.onClick,W),onKeyUp:Z=>Z.key==="Enter"&&S(T.onClick,W)},l.jsxs(l.Fragment,{children:[T.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:T.title}),T.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:T.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:y=!1,label:b,name:k,optionalTag:w=!1,optionalText:S,requiredTag:P=!1,requiredText:N,tagText:B,...T},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:S,requiredTag:P,requiredText:N,tagText:B,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:W,className:`pkt-input ${y?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${f}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${f}-input`,name:k||f,...T,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:ct("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:ct("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=ct(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:ct(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:ct(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:ct(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),td=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:ct(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:ct(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),sd=({className:s,children:t,...e})=>l.jsx("th",{className:ct(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),id=({className:s,children:t,...e})=>l.jsx("tr",{className:ct(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},y)=>{const[b,k]=x.useState(!1),w=x.useCallback(()=>{k(!0),d&&d()},[k]),S=x.useRef(null),[P,N]=x.useState("");x.useEffect(()=>{var Z,wt;N(((wt=(Z=S.current)==null?void 0:Z.textContent)==null?void 0:wt.trim())??"")},[s]);const B=x.useMemo(()=>{if(a&&!h)return P&&`Klikk for å fjerne ${P}`||f},[a,h,P,f]),T={"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:ct(W,n),type:p,onClick:w,"aria-label":h,"aria-description":B,ref:y,children:[r&&l.jsx(L,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:S,children:s}),l.jsx(L,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...g,className:ct(T,n),ref:y,children:[r&&l.jsx(L,{className:"pkt-tag__icon",name:r,"aria-hidden":"true"}),l.jsx("span",{ref:S,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:y,selectTab:b}=ad(),w={"aria-selected":f?!!t:void 0,"aria-controls":n,role:f?"tab":void 0,onKeyUp:P=>y(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)}},S=l.jsxs(l.Fragment,{children:[a&&l.jsx(L,{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:S}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:S})});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=k=>{const w=e==null?void 0:e[k];w!=null&&w.action&&w.action(k),i&&i(k)},g=(k,w)=>{var S,P;h&&(w.code==="ArrowLeft"&&k!==0&&((S=r.current[k-1])==null||S.focus()),w.code==="ArrowRight"&&k<p-1&&((P=r.current[k+1])==null||P.focus()),(w.code==="ArrowDown"||w.code==="Space")&&f(k))},y=(k,w)=>{r.current[k]=w},b=e==null?void 0:e.map((k,w)=>{var S,P;return l.jsx(Fi,{active:k.active,href:k.href,onClick:()=>f(w),icon:k.icon,controls:k.controls,tag:(S=k.tag)==null?void 0:S.text,tagSkin:(P=k.tag)==null?void 0:P.skin,index:w,children:k.text},w)});return l.jsx(bn.Provider,{value:{arrowNav:h,registerTabRef:y,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:y,fullwidth:b=!1,label:k,name:w,optionalTag:S=!1,optionalText:P,requiredTag:N=!1,requiredText:B,tagText:T=null,placeholder:W,rows:Z,useWrapper:wt=!0,onChange:vt,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),pt=Ue=>{var qe,pe;if(i&&zt(((pe=(qe=Ue.currentTarget)==null?void 0:qe.value)==null?void 0:pe.length)||0),vt)return vt(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:y,label:k,optionalTag:S,optionalText:P,requiredTag:N,requiredText:B,tagText:T,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:pt,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:y,iconNameRight:b,inline:k=!1,fullwidth:w=!1,label:S,name:P,optionalTag:N=!1,optionalText:B,requiredTag:T=!1,requiredText:W,tagText:Z=null,placeholder:wt,prefix:vt,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:pt,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),pt&&pt($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:y,inline:k,label:S,optionalTag:N,optionalText:B,requiredTag:T,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:[vt&&l.jsx("div",{className:"pkt-input-prefix",children:vt}),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(L,{className:"pkt-input-suffix-icon",name:b}),hi&&l.jsx(L,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!Q&&b&&l.jsx(L,{className:"pkt-input-icon",name:b}),!Q&&hi&&l.jsx(L,{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 kn(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 yn(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_)),yn(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});kn(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(),yn(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&&kn(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=L,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"})}));