UNPKG

@postnord/web-components

Version:
6 lines 32 kB
/*! * Built with Stencil * By PostNord. */ var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",l="value",o="serialized:";function s(t,n,e){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,n);if(l&&(!e||l.get))return l;t=Object.getPrototypeOf(t)}}var i=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=s(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(e)?t[e]=n.o.get(e):void 0!==l&&(t[e]=l)}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.l.u&&i(t,n))},u=(t,n)=>n in t,f=(t,n)=>(0,console.error)(t,n),a=new Map,d=new Map,h="s-id",p="sty-id",v="c-id",$="slot-fb{display:contents}slot-fb[hidden]{display:none}",m="http://www.w3.org/1999/xlink",b="undefined"!=typeof window?window:{},y=b.HTMLElement||class{},g={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},w=t=>Promise.resolve(t),j=(()=>{try{return!!b.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),O=!!j&&(()=>!!b.document&&Object.getOwnPropertyDescriptor(b.document.adoptedStyleSheets,"length").writable)(),S=!1,N=[],k=[],x=(t,n)=>e=>{t.push(e),S||(S=!0,n&&4&g.u?M(E):g.raf(E))},C=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){f(t)}t.length=0},E=()=>{C(N),C(k),(S=N.length>0)&&g.raf(E)},M=t=>w().then(t),T=x(k,!0),L=t=>{const n=W(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&A(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!R(t,P(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&W(t,"childNodes").length&&L(t)}},I=t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n};function A(t,n,e){let l,o=0,s=[];for(;o<t.length;o++){if(l=t[o],l["s-sr"]&&(!n||l["s-hn"]===n)&&(void 0===e||P(l)===e)&&(s.push(l),void 0!==e))return s;s=[...s,...A(l.childNodes,n,e)]}return s}var R=(t,n,e=!0)=>{const l=[];(e&&t["s-sr"]||!t["s-sr"])&&l.push(t);let o=t;for(;o=o.nextSibling;)P(o)!==n||!e&&o["s-sr"]||l.push(o);return l},F=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,D=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=W(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=W(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]},P=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function _(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:I(o.childNodes)).forEach((t=>{l===P(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}var V=t=>{if(t.__cloneNode)return;const n=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const e=n.call(this,!1);if(t){let t,n,l=0;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],s=this.__childNodes||this.childNodes;for(;l<s.length;l++)t=s[l]["s-nr"],n=o.every((t=>!s[l][t])),t&&e.appendChild(t.cloneNode(!0)),n&&e.appendChild(s[l].cloneNode(!0))}return e}},H=t=>{class n extends Array{item(t){return this[t]}}B("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),B("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),B("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),B("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new n;return t.push(...I(this.__childNodes)),t}})},U=["children","nextElementSibling","previousElementSibling"],z=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function B(t,n){if(!globalThis.Node||!globalThis.Element)return;let e;U.includes(t)?e=Object.getOwnPropertyDescriptor(Element.prototype,t):z.includes(t)&&(e=Object.getOwnPropertyDescriptor(Node.prototype,t)),e||(e=Object.getOwnPropertyDescriptor(n,t)),e&&Object.defineProperty(n,"__"+t,e)}function W(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function q(t){var n,e,l;return null!=(l=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?l:void 0}var Y=new WeakMap,G=t=>"sc-"+t.p,J=t=>"object"==(t=typeof t)||"function"===t,Z=(t,n,...e)=>{"string"==typeof t&&(t=$n(t));let l=null,o=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof t&&!J(l))&&(l+=""),i&&r?c[c.length-1].v+=l:c.push(i?K(null,l):l),r=i)};if(u(e),n){n.key&&(o=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,X);const f=K(t,null);return f.$=n,c.length>0&&(f.m=c),f.j=o,f.O=s,f},K=(t,n)=>({u:0,S:t,v:null!=n?n:null,N:null,m:null,$:null,j:null,O:null}),Q={},X={forEach:(t,n)=>t.map(tt).forEach(n),map:(t,n)=>t.map(tt).map(n).map(nt)},tt=t=>({vattrs:t.$,vchildren:t.m,vkey:t.j,vname:t.O,vtag:t.S,vtext:t.v}),nt=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),Z(t.vtag,n,...t.vchildren||[])}const n=K(t.vtag,t.vtext);return n.$=t.vattrs,n.m=t.vchildren,n.j=t.vkey,n.O=t.vname,n},et=(t,n,e,l,o,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(v),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=ot({u:0,k:u[0],C:u[1],M:u[2],T:u[3],S:s.tagName.toLowerCase(),N:s,$:{class:s.className||""}}),n.push(f),s.removeAttribute(v),t.m||(t.m=[]);const l=f.N.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.S&&st(l,u[2],f,s,t,n,e,0,r),f.N["s-sn"]=l,f.N.removeAttribute("s-sn")),void 0!==f.T&&(t.m[f.T]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)et(t,n,e,l,o,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)et(t,n,e,l,o,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=ot({k:u[1],C:u[2],M:u[3],T:u[4]||"0",N:s,$:null,m:null,j:null,O:null,S:null,v:null}),"t"===c?(f.N=ut(s,3),f.N&&3===f.N.nodeType&&(f.v=f.N.textContent,n.push(f),s.remove(),i===f.k&&(t.m||(t.m=[]),t.m[f.T]=f))):"c"===c?(f.N=ut(s,8),f.N&&8===f.N.nodeType&&(n.push(f),s.remove())):f.k===i&&("s"===c?st(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,r):"r"===c&&(o["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.S){const n=K(null,s.textContent);n.N=s,n.T="0",t.m=[n]}return t},lt=(t,n)=>{if(1===t.nodeType){const e=t[h]||t.getAttribute(h);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)lt(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)lt(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},ot=t=>({u:0,k:null,C:null,M:null,T:"0",N:null,$:null,m:null,j:null,O:null,S:null,v:null,...t});function st(t,n,e,l,o,s,i,r,c){l["s-sr"]=!0,e.O=t||null,e.S="slot";const u=(null==o?void 0:o.N)?o.N["s-id"]||o.N.getAttribute("s-id"):"";{const s=e.N,i=u&&u!==e.k&&o.N.shadowRoot;ct(c,n,t,l,i?u:e.k),_(l),i&&o.N.insertBefore(s,o.N.children[0])}s.push(e),i.push(e),o.m||(o.m=[]),o.m[e.T]=e}var it,rt,ct=(t,n,e,l,o)=>{var s,i;let r=l.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:l,node:r,hostId:o})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},ut=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},ft=class o{static fromLocalValue(t){const n=t[e],s=l in t?t[l]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>o.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const l="object"==typeof n&&null!==n?o.fromLocalValue(n):n,s=o.fromLocalValue(e);t.set(l,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=o.fromLocalValue(n);return e;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const t of s)r.add(o.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>o.fromLocalValue(t)))}static isLocalValueObject(o){if("object"!=typeof o||null===o)return!1;if(!o.hasOwnProperty(e))return!1;const s=o[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||o.hasOwnProperty(l))}},at=(t,n)=>"string"==typeof t&&t.startsWith(o)?t=function(t){return"string"==typeof t&&t.startsWith(o)?ft.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||J(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,dt=t=>{var n;return null==(n=r(t))?void 0:n.$hostElement$},ht=(t,n,e)=>{const l=dt(t);return{emit:t=>pt(l,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},pt=(t,n,e)=>{const l=g.ce(n,e);return t.dispatchEvent(l),l},vt=(t,n,e,l,o,s,i)=>{if(e===l)return;let c=u(t,n),f=n.toLowerCase();if("class"===n){const n=t.classList,o=mt(e);let s=mt(l);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),o.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===n){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&_t(l,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let o;{const n=r(t);if(n&&n.l&&n.l.t){const t=n.l.t[e];t&&t[1]&&(o=t[1])}}return o||(o=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===l?"":l))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=l}catch(t){}return}{const i=J(l);if((c||i&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[n]!==l&&(t[n]=l);else{const o=null==l?"":l;"list"===n?c=!1:null!=e&&t[n]===o||("function"==typeof t.__lookupSetter__(n)?t[n]=o:t.setAttribute(n,o))}}catch(t){}let r=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(n=f,r=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(n)||(r?t.removeAttributeNS(m,n):t.removeAttribute(n)):(!c||4&s||o)&&!i&&1===t.nodeType&&(l=!0===l?"":l,r?t.setAttributeNS(m,n,l):t.setAttribute(n,l))}}else if(n="-"===n[2]?n.slice(3):u(b,f)?f.slice(2):f[2]+n.slice(3),e||l){const o=n.endsWith(bt);n=n.replace(yt,""),e&&g.rel(t,n,e,o),l&&g.ael(t,n,l,o)}},$t=/\s/,mt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split($t):[]),bt="Capture",yt=RegExp(bt+"$"),gt=(t,n,e,l)=>{const o=11===n.N.nodeType&&n.N.host?n.N.host:n.N,s=t&&t.$||{},i=n.$||{};for(const t of wt(Object.keys(s)))t in i||vt(o,t,s[t],void 0,e,n.u,l);for(const t of wt(Object.keys(i)))vt(o,t,s[t],i[t],e,n.u,l)};function wt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var jt=!1,Ot=!1,St=!1,Nt=!1,kt=[],xt=[],Ct=(t,n,e)=>{var l;const o=n.m[e];let s,i,r,c=0;if(jt||(St=!0,"slot"===o.S&&(o.u|=o.m?2:1)),null!=o.v)s=o.N=b.document.createTextNode(o.v);else if(1&o.u)s=o.N=b.document.createTextNode(""),gt(null,o,Nt);else{if(Nt||(Nt="svg"===o.S),!b.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=o.N=b.document.createElementNS(Nt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!jt&&2&o.u?"slot-fb":o.S),Nt&&"foreignObject"===o.S&&(Nt=!1),gt(null,o,Nt),o.m){const n="template"===o.S?s.content:s;for(c=0;c<o.m.length;++c)i=Ct(t,o,c),i&&n.appendChild(i)}"svg"===o.S?Nt=!1:"foreignObject"===s.tagName&&(Nt=!0)}return s["s-hn"]=rt,3&o.u&&(s["s-sr"]=!0,s["s-cr"]=it,s["s-sn"]=o.O||"",s["s-rf"]=null==(l=o.$)?void 0:l.ref,_(s),r=t&&t.m&&t.m[e],r&&r.S===o.S&&t.N&&Et(t.N)),s},Et=t=>{g.u|=1;const n=t.closest(rt.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of e?l.reverse():l)null!=t["s-sh"]&&(Vt(n,t,null!=e?e:null),t["s-sh"]=void 0,St=!0)}g.u&=-2},Mt=(t,n)=>{g.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===rt&&e.push(n)}for(let t=e.length-1;t>=0;t--){const l=e[t];l["s-hn"]!==rt&&l["s-ol"]&&(Vt(At(l).parentNode,l,At(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,St=!0),n&&Mt(l,n)}g.u&=-2},Tt=(t,n,e,l,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.S&&(r=r.content);o<=s;++o)l[o]&&(i=Ct(null,e,o),i&&(l[o].N=i,Vt(r,i,At(n))))},Lt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.N;Pt(n),t&&(Ot=!0,t["s-ol"]?t["s-ol"].remove():Mt(t,!0),t.remove())}}},It=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),At=t=>t&&t["s-ol"]||t,Rt=(t,n,e=!1)=>{const l=n.N=t.N,o=t.m,s=n.m,i=n.S,r=n.v;let c;null==r?(Nt="svg"===i||"foreignObject"!==i&&Nt,"slot"!==i||jt||t.O!==n.O&&(n.N["s-sn"]=n.O||"",Et(n.N.parentElement)),gt(t,n,Nt,e),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],h=n[a],p=l.length-1,v=l[0],$=l[p];const m="template"===e.S?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=n[++r];else if(null==h)h=n[--a];else if(null==v)v=l[++c];else if(null==$)$=l[--p];else if(It(d,v,o))Rt(d,v,o),d=n[++r],v=l[++c];else if(It(h,$,o))Rt(h,$,o),h=n[--a],$=l[--p];else if(It(d,$,o))"slot"!==d.S&&"slot"!==$.S||Mt(d.N.parentNode,!1),Rt(d,$,o),Vt(m,d.N,h.N.nextSibling),d=n[++r],$=l[--p];else if(It(h,v,o))"slot"!==d.S&&"slot"!==$.S||Mt(h.N.parentNode,!1),Rt(h,v,o),Vt(m,h.N,d.N),h=n[--a],v=l[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===v.j){u=f;break}u>=0?(i=n[u],i.S!==v.S?s=Ct(n&&n[c],e,u):(Rt(i,v,o),n[u]=void 0,s=i.N),v=l[++c]):(s=Ct(n&&n[c],e,c),v=l[++c]),s&&Vt(At(d.N).parentNode,s,At(d.N))}r>a?Tt(t,null==l[p+1]?null:l[p+1].N,e,l,c,p):c>p&&Lt(n,r,a)})(l,o,n,s,e):null!==s?(null!==t.v&&(l.textContent=""),Tt(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.m=o):Lt(o,0,o.length-1),Nt&&"svg"===i&&(Nt=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:t.v!==r&&(l.data=r)},Ft=[],Dt=t=>{let n,e,l;const o=t.__childNodes||t.childNodes;for(const t of o){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const o=t["s-sn"];for(l=e.length-1;l>=0;l--)if(n=e[l],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(F(n,o)){let e=Ft.find((t=>t.L===n));Ot=!0,n["s-sn"]=n["s-sn"]||o,e?(e.L["s-sh"]=t["s-hn"],e.I=t):(n["s-sh"]=t["s-hn"],Ft.push({I:t,L:n})),n["s-sr"]&&Ft.map((t=>{F(t.L,n["s-sn"])&&(e=Ft.find((t=>t.L===n)),e&&!t.I&&(t.I=e.I))}))}else Ft.some((t=>t.L===n))||Ft.push({L:n})}1===t.nodeType&&Dt(t)}},Pt=t=>{t.$&&t.$.ref&&kt.push((()=>t.$.ref(null))),t.m&&t.m.map(Pt)},_t=(t,n)=>{xt.push((()=>t(n)))},Vt=(t,n,e,l)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:o}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const l=t["s-sn"]=P(t)||"";return{slotNode:A(W(n,"childNodes"),n.tagName,l)[0],slotName:l}}(n);return o&&!l&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(o),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},Ht=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.A=()=>{n["s-p"].splice(e-1,1),l()})))}},Ut=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ht(t,t.R);const e=()=>zt(t,n);if(!n)return T(e);queueMicrotask((()=>{e()}))},zt=(t,n)=>{const e=t.$hostElement$,l=t.i;if(!l)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return n?(t.F&&(t.F=!1,Kt(l,"connectedCallback",void 0,e)),t.u|=256,t.D&&(t.D.map((([t,n])=>Kt(l,t,n,e))),t.D=void 0),t.P.length&&t.P.forEach((t=>t(e))),o=Kt(l,"componentWillLoad",void 0,e)):o=Kt(l,"componentWillUpdate",void 0,e),o=Bt(o,(()=>Kt(l,"componentWillRender",void 0,e))),Bt(o,(()=>qt(t,l,n)))},Bt=(t,n)=>Wt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Wt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,qt=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l;((t,n)=>{var e,l,o;const s=G(n),i=d.get(s);if(!b.document)return s;if(t=11===t.nodeType?t:b.document,i)if("string"==typeof i){let o,r=Y.get(t=t.head||t);r||Y.set(t,r=new Set);const c=t.querySelector(`[${p}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){o=b.document.createElement("style"),o.textContent=i;const c=null!=(e=g._)?e:q(b.document);if(null!=c&&o.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(j){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),O?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(o)}else t.append(o);1&n.u&&t.insertBefore(o,null),4&n.u&&(o.textContent+=$),r&&r.add(s)}}else{let n=Y.get(t);if(n||Y.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(i.constructor===e.CSSStyleSheet)l=i;else{l=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)l.insertRule(i.cssRules[t].cssText,t)}if(O?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s),"host"in t){const n=t.querySelector(`[${p}="${s}"]`);n&&T((()=>n.remove()))}}}})(t.$hostElement$.getRootNode(),n)})(t);Yt(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>Gt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Yt=(t,n,e,l)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var l,o,s,i,r;const c=t.$hostElement$,u=t.l,f=t.V||K(null,null),a=(t=>t&&t.S===Q)(n)?n:Z(null,null,n);if(rt=c.tagName,u.H&&(a.$=a.$||{},u.H.forEach((([t,n])=>{a.$[n]=c[t]}))),e&&a.$)for(const t of Object.keys(a.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.$[t]=c[t]);if(a.S=null,a.u|=4,t.V=a,a.N=f.N=c,jt=!1,it=c["s-cr"],Ot=!1,Rt(f,a,e),g.u|=1,St){Dt(a.N);for(const t of Ft){const n=t.L;if(!n["s-ol"]&&b.document){const t=b.document.createTextNode("");t["s-nr"]=n,Vt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Ft){const n=t.L,r=t.I;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(l=n.hidden)&&l),r){const t=r.parentNode;let l=r.nextSibling;if(l&&1===l.nodeType){let e=null==(o=n["s-ol"])?void 0:o.previousSibling;for(;e;){let o=null!=(s=e["s-nr"])?s:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){l=o;break}}e=e.previousSibling}}if((!l&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==l)&&n!==l){if(Vt(t,n,l,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=b.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(Ot&&L(a.N),g.u&=-2,Ft.length=0,!jt&&!(1&u.u)&&c["s-cr"]){const t=a.N.__childNodes||a.N.childNodes;for(const n of t)if(n["s-hn"]!==rt&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=b.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}it=void 0,kt.forEach((t=>t())),kt.length=0,xt.forEach((t=>t())),xt.length=0})(t,n,l)}catch(n){f(n,t.$hostElement$)}return null},Gt=t=>{const n=t.$hostElement$,e=t.i,l=t.R;Kt(e,"componentDidRender",void 0,n),64&t.u?Kt(e,"componentDidUpdate",void 0,n):(t.u|=64,Qt(n),Kt(e,"componentDidLoad",void 0,n),t.U(n),l||Zt()),t.B(n),t.A&&(t.A(),t.A=void 0),512&t.u&&M((()=>Ut(t,!1))),t.u&=-517},Jt=t=>{var n;{const e=r(t),l=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return l&&2==(18&e.u)&&Ut(e,!1),l}},Zt=()=>{var t;M((()=>pt(b,"appload",{detail:{namespace:"postnord-web-components"}}))),(null==(t=g.W)?void 0:t.size)&&g.W.clear()},Kt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){f(t,l)}},Qt=t=>t.classList.add("hydrated"),Xt=(t,n,e,l)=>{const o=r(t);if(!o)return;if(!o)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=o.$hostElement$,i=o.o.get(n),c=o.u,u=o.i;if(e=at(e,l.t[n][0]),!(8&c&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e))){if(o.o.set(n,e),l.q){const t=l.q[n];t&&t.map((t=>{try{const[[l,s]]=Object.entries(t);(128&c||1&s)&&(u?u[l](e,i,n):o.P.push((()=>{o.i[l](e,i,n)})))}catch(t){f(t,s)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,i,n)&&!(16&c))return;16&c||Ut(o,!1)}}},tn=(t,n,e)=>{var l,o;const i=t.prototype;{t.watchers&&!n.q&&(n.q=t.watchers),t.deserializers&&!n.Y&&(n.Y=t.deserializers),t.serializers&&!n.G&&(n.G=t.serializers);const c=Object.entries(null!=(l=n.t)?l:{});if(c.map((([t,[l]])=>{if(31&l||2&e&&32&l){const{get:o,set:c}=s(i,t)||{};o&&(n.t[t][0]|=2048),c&&(n.t[t][0]|=4096),(1&e||!o)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>r(this).o.get(n))(0,t);const e=r(this),l=e?e.i:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(o){const s=r(this);if(s){if(c)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(o=s.o.get(t)),c.call(this,at(o,l)),void Xt(this,t,o=32&l?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Xt(this,t,o,n),void(1&e&&!s.i&&s.P.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.o.get(t)&&(s.i[t]=o)})));const i=()=>{const e=s.i[t];!s.o.get(t)&&e&&s.o.set(t,e),s.i[t]=at(o,l),Xt(this,t,s.i[t],n)};s.i?i():s.P.push((()=>{i()}))}}}})}else 1&e&&64&l&&Object.defineProperty(i,t,{value(...n){var e;const l=r(this);return null==(e=null==l?void 0:l.J)?void 0:e.then((()=>{var e;return null==(e=l.i)?void 0:e[t](...n)}))}})})),1&e){const e=new Map;i.attributeChangedCallback=function(t,l,o){g.jmp((()=>{var s;const u=e.get(t),f=r(this);if(this.hasOwnProperty(u)&&(o=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==o)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&o!==l){const i=f.i,r=null==(s=n.q)?void 0:s[t];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=i[s]&&(128&e||1&r)&&i[s].call(i,o,l,t)}))}return}const a=c.find((([t])=>t===u));a&&4&a[1][0]&&(o=null!==o&&"false"!==o);const d=Object.getOwnPropertyDescriptor(i,u);o==this[u]||d.get&&!d.set||(this[u]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.q)?o:{}),...c.filter((([t,n])=>31&n[0])).map((([t,l])=>{var o;const s=l[1]||t;return e.set(s,t),512&l[0]&&(null==(o=n.H)||o.push([t,s])),s}))]))}}return t},nn=(t,n)=>{Kt(t,"connectedCallback",void 0,n)},en=t=>{if(!(1&g.u)){const n=r(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.u)cn(t,n,e.Z),(null==n?void 0:n.i)?nn(n.i,t):(null==n?void 0:n.K)&&n.K.then((()=>nn(n.i,t)));else{let l;n.u|=1,l=t.getAttribute(h),l&&((t,n,e,l)=>{var o,s,i,c;const u=t.shadowRoot,f=[],a=[],d=K(n,null);d.N=t,!b.document||g.W&&g.W.size||lt(b.document.body,g.W=new Map),t[h]=e,t.removeAttribute(h),l.V=et(d,f,[],null,t,t,e,a);let p=0;const v=f.length;let $;for(;p<v;p++){$=f[p];const e=$.k+"."+$.C,l=g.W.get(e),s=$.N;if(u){if((null==(o=$.S)?void 0:(""+o).includes("-"))&&"slot-fb"!==$.S&&!$.N.shadowRoot){const t=r($.N);if(t){const n=G(t.l),e=b.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=$n(n).toUpperCase(),"slot"===$.S&&(s["s-cr"]=t["s-cr"]);"slot"===$.S&&($.O=$.N["s-sn"]||$.N.name||null,$.m?($.u|=2,$.N.childNodes.length||$.m.forEach((t=>{$.N.appendChild(t.N)}))):$.u|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt($.C))),l&&!l["s-id"]&&g.W.delete(e)}const m=[],y=a.length;let w,j,O,S,N=0,k=0;for(;N<y;N++)if(w=a[N],w&&w.length)for(O=w.length,j=0;j<O;j++){if(S=w[j],m[S.hostId]||(m[S.hostId]=g.W.get(S.hostId)),!m[S.hostId])continue;const t=m[S.hostId];t.shadowRoot&&S.node.parentElement!==t&&t.insertBefore(S.node,null==(i=null==(s=w[j-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(S.slot["s-cr"]||(S.slot["s-cr"]=t["s-cr"],S.slot["s-cr"]=!S.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),D(S.node,S.slot,0,S.node["s-oo"]||k),(null==(c=S.node.parentElement)?void 0:c.shadowRoot)&&S.node.getAttribute&&S.node.getAttribute("slot")&&S.node.removeAttribute("slot")),k=(S.node["s-oo"]||k)+1}l.$hostElement$=t})(t,e.p,l,n),l||12&e.u&&ln(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ht(n,n.R=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;try{if(!(32&n.u)){if(n.u|=32,e.X){const o=((t,n)=>{const e=t.p.replace(/-/g,"_"),l=t.X;if(!l)return;const o=a.get(l);return o?o[e]:import(`./${l}.entry.js`).then((t=>(a.set(l,t),t[e])),(t=>{f(t,n.$hostElement$)})) /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${e.p}#${n.tt}" was not found`);l.isProxied||(e.q=l.watchers,e.G=l.serializers,e.Y=l.deserializers,tn(l,e,2),l.isProxied=!0);const s=()=>{};n.u|=8;try{new l(n)}catch(n){f(n,t)}n.u&=-9,n.u|=128,s(),4&e.u?n.F=!0:nn(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const n=G(e);if(!d.has(n)){const l=()=>{};((t,n,e)=>{let l=d.get(t);j&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,d.set(t,l)})(n,t,!!(1&e.u)),l()}}}const o=n.R,s=()=>Ut(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(e){f(e,t),n.A&&(n.A(),n.A=void 0),n.U&&n.U(t)}})(t,n,e)}l()}},ln=t=>{if(!b.document)return;const n=t["s-cr"]=b.document.createComment("");n["s-cn"]=!0,Vt(t,n,t.firstChild)},on=(t,n)=>{Kt(t,"disconnectedCallback",void 0,n||t)},sn=(t,n={})=>{var e;if(!b.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],o=n.exclude||[],s=b.customElements,i=b.document.head,c=i.querySelector("meta[charset]"),u=b.document.createElement("style"),f=[];let a,d=!0;Object.assign(g,n),g.h=new URL(n.resourcesUrl||"./",b.document.baseURI).href,g.u|=2;let h=!1;if(t.map((t=>{t[1].map((e=>{var i,c,u;const p={u:e[0],p:e[1],t:e[2],Z:e[3]};4&p.u&&(h=!0),p.t=e[2],p.Z=e[3],p.H=[],p.q=null!=(i=e[4])?i:{},p.G=null!=(c=e[5])?c:{},p.Y=null!=(u=e[6])?u:{};const v=n.transformTagName?n.transformTagName(p.p):$n(p.p),$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,l:n,o:new Map,nt:new Map};e.J=new Promise((t=>e.B=t)),e.K=new Promise((t=>e.U=t)),t["s-p"]=[],t["s-rc"]=[],e.P=[];const l=e;t.__stencil__getHostRef=()=>l})(t=this,p)}connectedCallback(){const t=r(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,cn(this,t,p.Z)),a&&(clearTimeout(a),a=null),d?f.push(this):g.jmp((()=>en(this))))}disconnectedCallback(){g.jmp((()=>(async t=>{if(!(1&g.u)){const n=r(t);(null==n?void 0:n.et)&&(n.et.map((t=>t())),n.et=void 0),(null==n?void 0:n.i)?on(n.i,t):(null==n?void 0:n.K)&&n.K.then((()=>on(n.i,t)))}Y.has(t)&&Y.delete(t),t.shadowRoot&&Y.has(t.shadowRoot)&&Y.delete(t.shadowRoot)})(this))),g.raf((()=>{var t;const n=r(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.V)?void 0:t.N)instanceof Node&&!n.V.N.isConnected&&delete n.V.N}))}componentOnReady(){var t;return null==(t=r(this))?void 0:t.K}};!(1&p.u)&&256&p.u?(H($.prototype),V($.prototype)):V($.prototype),p.X=t[0],o.includes(v)||s.get(v)||(l.push(v),s.define(v,tn($,p,1)))}))})),l.length>0&&(h&&(u.textContent+=$),u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=g._)?e:q(b.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,c?c.nextSibling:i.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):g.jmp((()=>a=setTimeout(Zt,30)))},rn=(t,n)=>n,cn=(t,n,e)=>{e&&b.document&&e.map((([e,l,o])=>{const s=fn(b.document,t,e),i=un(n,o),r=an(e);g.ael(s,l,i,r),(n.et=n.et||[]).push((()=>g.rel(s,l,i,r)))}))},un=(t,n)=>e=>{var l;try{256&t.u?null==(l=t.i)||l[n](e):(t.D=t.D||[]).push([n,e])}catch(n){f(n,t.$hostElement$)}},fn=(t,n,e)=>8&e?b:n,an=t=>({passive:!!(1&t),capture:!!(2&t)}),dn=class{};function hn(...t){return t.reduceRight(((t,n)=>n(t)),dn)}var pn=t=>g._=t,vn=void 0;function $n(t){return vn?vn(t):t}function mn(t){vn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),vn=t}export{rn as F,y as H,hn as M,Q as a,sn as b,ht as c,mn as d,Jt as f,dt as g,Z as h,w as p,c as r,pn as s,$n as t}