UNPKG

@postnord/web-components

Version:

PostNord Web Components

7 lines 29.6 kB
/*! * Built with Stencil * By PostNord. */ const e="postnord-web-components";const t={allRenderFn:true,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:true,cmpDidLoad:true,cmpDidRender:true,cmpDidUnload:false,cmpDidUpdate:true,cmpShouldUpdate:false,cmpWillLoad:true,cmpWillRender:true,cmpWillUpdate:false,connectedCallback:true,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:true,element:false,event:true,experimentalScopedSlotChanges:false,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:false,hostListenerTargetDocument:false,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:true,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,hydratedSelectorName:"hydrated",initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,modernPropertyDecls:true,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:true,scoped:false,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:false,shadowDom:false,slot:true,slotChildNodesFix:true,slotRelocation:true,state:true,style:true,svg:true,taskQueue:true,transformTagName:true,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};var n=Object.defineProperty;var r=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var l="http://www.w3.org/2000/svg";var s="http://www.w3.org/1999/xhtml";var i=(e,t)=>{var n;const r=t.t;const l=Object.entries((n=r.l)!=null?n:{});l.map((([n,[r]])=>{if(r&31||r&32){const r=e[n];const l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),n);Object.defineProperty(e,n,{get(){return l.get.call(this)},set(e){l.set.call(this,e)},configurable:true,enumerable:true});e[n]=t.i.has(n)?t.i.get(n):r}}))};var o=new WeakMap;var f=e=>o.get(e);var a=(e,t)=>{o.set(t.o=e,t);{i(e,t)}};var c=(e,t)=>{const n={u:0,$hostElement$:e,t,i:new Map};{n.v=new Promise((e=>n.h=e))}{n.p=new Promise((e=>n.m=e));e["s-p"]=[];e["s-rc"]=[]}const r=o.set(e,n);return r};var u=(e,t)=>t in e;var v=(e,t)=>(0,console.error)(e,t);var d=new Map;var h=(e,t,n)=>{const r=e.$.replace(/-/g,"_");const l=e.S;if(!l){return void 0}const s=d.get(l);if(s){return s[r]} /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((e=>{{d.set(l,e)}return e[r]}),(e=>{v(e,t.$hostElement$)}))};var p=new Map;var m="r";var $="o";var y="s";var b="t";var g="c";var w="s-id";var S="sty-id";var O="c-id";var j="{visibility:hidden}.hydrated{visibility:inherit}";var C="slot-fb{display:contents}slot-fb[hidden]{display:none}";var k="http://www.w3.org/1999/xlink";var x=typeof window!=="undefined"?window:{};var T=x.document||{head:{}};var D=x.HTMLElement||class{};var E={u:0,O:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)};var L=t.shadowDom;var R=(()=>{let e=false;try{T.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=true}}))}catch(e){}return e})();var N=e=>Promise.resolve(e);var F=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var A=false;var M=[];var P=[];var I=(e,t)=>n=>{e.push(n);if(!A){A=true;if(t&&E.u&4){B(W)}else{E.raf(W)}}};var U=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){v(e)}}e.length=0};var W=()=>{U(M);{U(P);if(A=M.length>0){E.raf(W)}}};var B=e=>N().then(e);var H=I(P,true);var _=e=>{e=typeof e;return e==="object"||e==="function"};function z(e){var t,n,r;return(r=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?r:void 0}var Q={};r(Q,{err:()=>q,map:()=>G,ok:()=>V,unwrap:()=>K,unwrapErr:()=>X});var V=e=>({isOk:true,isErr:false,value:e});var q=e=>({isOk:false,isErr:true,value:e});function G(e,t){if(e.isOk){const n=t(e.value);if(n instanceof Promise){return n.then((e=>V(e)))}else{return V(n)}}if(e.isErr){const t=e.value;return q(t)}throw"should never get here"}var K=e=>{if(e.isOk){return e.value}else{throw e.value}};var X=e=>{if(e.isErr){return e.value}else{throw e.value}};var J=e=>{const t=e.__childNodes||e.childNodes;if(e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"){Z(t,e.tagName).forEach((e=>{var t;if(e.nodeType===1&&e.tagName==="SLOT-FB"){if((t=ee(e,e["s-sn"],false))==null?void 0:t.length){e.hidden=true}else{e.hidden=false}}}))}for(const e of t){if(e.nodeType===1&&(e.__childNodes||e.childNodes).length){J(e)}}};var Y=e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n]["s-nr"]||void 0;if(r&&r.isConnected){t.push(r)}}return t};function Z(e,t,n){let r=0;let l=[];let s;for(;r<e.length;r++){s=e[r];if(s["s-sr"]&&s["s-hn"]===t&&(n===void 0||s["s-sn"]===n)){l.push(s);if(typeof n!=="undefined")return l}l=[...l,...Z(s.childNodes,t,n)]}return l}var ee=(e,t,n=true)=>{const r=[];if(n&&e["s-sr"]||!e["s-sr"])r.push(e);while((e=e.nextSibling)&&e["s-sn"]===t){r.push(e)}return r};var te=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var ne=(e,t,n,r)=>{let l;if(e["s-ol"]&&e["s-ol"].isConnected){l=e["s-ol"]}else{l=document.createTextNode("");l["s-nr"]=e}if(!t["s-cr"]||!t["s-cr"].parentNode)return;const s=t["s-cr"].parentNode;const i=n?s.__prepend||s.prepend:s.__appendChild||s.appendChild;if(typeof r!=="undefined"){{l["s-oo"]=r;const e=s.__childNodes||s.childNodes;const t=[l];e.forEach((e=>{if(e["s-nr"])t.push(e)}));t.sort(((e,t)=>{if(!e["s-oo"]||e["s-oo"]<t["s-oo"])return-1;else if(!t["s-oo"]||t["s-oo"]<e["s-oo"])return 1;return 0}));t.forEach((e=>i.call(s,e)))}}else{i.call(s,l)}e["s-ol"]=l;e["s-sh"]=t["s-hn"]};var re=e=>{const t=e.cloneNode;e.cloneNode=function(e){const n=this;const r=t.call(n,false);if(e){let e=0;let t,n;const l=["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"];const s=this.__childNodes||this.childNodes;for(;e<s.length;e++){t=s[e]["s-nr"];n=l.every((t=>!s[e][t]));if(t){{r.appendChild(t.cloneNode(true))}}if(n){r.appendChild(s[e].cloneNode(true))}}}return r}};var le=e=>{class t extends Array{item(e){return this[e]}}oe("children",e);Object.defineProperty(e,"children",{get(){return this.childNodes.filter((e=>e.nodeType===1))}});Object.defineProperty(e,"childElementCount",{get(){return this.children.length}});oe("firstChild",e);Object.defineProperty(e,"firstChild",{get(){return this.childNodes[0]}});oe("lastChild",e);Object.defineProperty(e,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}});oe("childNodes",e);Object.defineProperty(e,"childNodes",{get(){const e=new t;e.push(...Y(this.__childNodes));return e}})};var se=["children","nextElementSibling","previousElementSibling"];var ie=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function oe(e,t){let n;if(se.includes(e)){n=Object.getOwnPropertyDescriptor(Element.prototype,e)}else if(ie.includes(e)){n=Object.getOwnPropertyDescriptor(Node.prototype,e)}if(!n){n=Object.getOwnPropertyDescriptor(t,e)}if(n)Object.defineProperty(t,"__"+e,n)}var fe=(e,t="")=>{{return()=>{}}};var ae=(e,t)=>{{return()=>{}}};var ce=(e,t,...n)=>{let r=null;let l=null;let s=null;let i=false;let o=false;const f=[];const a=t=>{for(let n=0;n<t.length;n++){r=t[n];if(Array.isArray(r)){a(r)}else if(r!=null&&typeof r!=="boolean"){if(i=typeof e!=="function"&&!_(r)){r=String(r)}if(i&&o){f[f.length-1].j+=r}else{f.push(i?ue(null,r):r)}o=i}}};a(n);if(t){if(t.key){l=t.key}if(t.name){s=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,f,he)}const c=ue(e,null);c.C=t;if(f.length>0){c.k=f}{c.T=l}{c.D=s}return c};var ue=(e,t)=>{const n={u:0,L:e,j:t,R:null,k:null};{n.C=null}{n.T=null}{n.D=null}return n};var ve={};var de=e=>e&&e.L===ve;var he={forEach:(e,t)=>e.map(pe).forEach(t),map:(e,t)=>e.map(pe).map(t).map(me)};var pe=e=>({vattrs:e.C,vchildren:e.k,vkey:e.T,vname:e.D,vtag:e.L,vtext:e.j});var me=e=>{if(typeof e.vtag==="function"){const t={...e.vattrs};if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return ce(e.vtag,t,...e.vchildren||[])}const t=ue(e.vtag,e.vtext);t.C=e.vattrs;t.k=e.vchildren;t.T=e.vkey;t.D=e.vname;return t};var $e=(e,t,n,r)=>{const l=fe("hydrateClient",t);const s=e.shadowRoot;const i=[];const o=[];const f=[];const a=null;const c=ue(t,null);c.R=e;if(!E.N){be(T.body,E.N=new Map)}e[w]=n;e.removeAttribute(w);r.F=ye(c,i,o,a,e,e,n,f);let u=0;const v=i.length;let d;for(u;u<v;u++){d=i[u];const n=d.A+"."+d.M;const r=E.N.get(n);const l=d.R;if(!s){l["s-hn"]=t.toUpperCase();if(d.L==="slot"){l["s-cr"]=e["s-cr"]}}if(d.L==="slot"){if(d.k){d.u|=2;if(!d.R.childNodes.length){d.k.forEach((e=>{d.R.appendChild(e.R)}))}}else{d.u|=1}}if(r&&r.isConnected){if(s&&r["s-en"]===""){r.parentNode.insertBefore(l,r.nextSibling)}r.parentNode.removeChild(r);if(!s){l["s-oo"]=parseInt(d.M)}}E.N.delete(n)}const h=[];const p=f.length;let m=0;let $;let y;let b;let g;for(m;m<p;m++){$=f[m];if(!$||!$.length)continue;b=$.length;y=0;for(y;y<b;y++){g=$[y];if(!h[g.hostId]){h[g.hostId]=E.N.get(g.hostId)}if(!h[g.hostId])continue;const e=h[g.hostId];if(!e.shadowRoot||!s){g.slot["s-cr"]=e["s-cr"];if(!g.slot["s-cr"]&&e.shadowRoot){g.slot["s-cr"]=e}else{g.slot["s-cr"]=(e.__childNodes||e.childNodes)[0]}ne(g.node,g.slot,false,g.node["s-oo"])}if(e.shadowRoot&&g.node.parentElement!==e){e.appendChild(g.node)}}}r.$hostElement$=e;l()};var ye=(e,t,n,r,l,s,i,o=[])=>{let f;let a;let c;let u;if(s.nodeType===1){f=s.getAttribute(O);if(f){a=f.split(".");if(a[0]===i||a[0]==="0"){c=ge({u:0,A:a[0],M:a[1],P:a[2],I:a[3],L:s.tagName.toLowerCase(),R:s,C:{class:s.className||""}});t.push(c);s.removeAttribute(O);if(!e.k){e.k=[]}const l=c.R.getAttribute("s-sn");if(typeof l==="string"){if(c.L==="slot-fb"){we(l,a[2],c,s,e,t,n,r,o)}c.R["s-sn"]=l;c.R.removeAttribute("s-sn")}if(c.I!==void 0){e.k[c.I]=c}e=c;if(r&&c.P==="0"){r[c.I]=c.R}}}if(s.shadowRoot){for(u=s.shadowRoot.childNodes.length-1;u>=0;u--){ye(e,t,n,r,l,s.shadowRoot.childNodes[u],i,o)}}const v=s.__childNodes||s.childNodes;for(u=v.length-1;u>=0;u--){ye(e,t,n,r,l,v[u],i,o)}}else if(s.nodeType===8){a=s.nodeValue.split(".");if(a[1]===i||a[1]==="0"){f=a[0];c=ge({A:a[1],M:a[2],P:a[3],I:a[4]||"0",R:s,C:null,k:null,T:null,D:null,L:null,j:null});if(f===b){c.R=s.nextSibling;if(c.R&&c.R.nodeType===3){c.j=c.R.textContent;t.push(c);s.remove();if(i===c.A){if(!e.k){e.k=[]}e.k[c.I]=c}if(r&&c.P==="0"){r[c.I]=c.R}}}else if(f===g){c.R=s.nextSibling;if(c.R&&c.R.nodeType===8){t.push(c);s.remove()}}else if(c.A===i){if(f===y){const l=s["s-sn"]=a[5]||"";we(l,a[2],c,s,e,t,n,r,o)}else if(f===m){{l["s-cr"]=s;s["s-cn"]=true}}}}}else if(e&&e.L==="style"){const t=ue(null,s.textContent);t.R=s;t.I="0";e.k=[t]}return e};var be=(e,t)=>{if(e.nodeType===1){const n=e[w]||e.getAttribute(w);if(n){t.set(n,e)}let r=0;if(e.shadowRoot){for(;r<e.shadowRoot.childNodes.length;r++){be(e.shadowRoot.childNodes[r],t)}}const l=e.__childNodes||e.childNodes;for(r=0;r<l.length;r++){be(l[r],t)}}else if(e.nodeType===8){const n=e.nodeValue.split(".");if(n[0]===$){t.set(n[1]+"."+n[2],e);e.nodeValue="";e["s-en"]=n[3]}}};var ge=e=>{const t={u:0,A:null,M:null,P:null,I:"0",R:null,C:null,k:null,T:null,D:null,L:null,j:null};return{...t,...e}};function we(e,t,n,r,l,s,i,o,f){r["s-sr"]=true;n.D=e||null;n.L="slot";const a=(l==null?void 0:l.R)?l.R["s-id"]||l.R.getAttribute("s-id"):"";{const i=n.R;const o=a&&a!==n.A&&l.R.shadowRoot;Se(f,t,e,r,o?a:n.A);if(o){l.R.insertBefore(i,l.R.children[0])}s.push(n)}i.push(n);if(!l.k){l.k=[]}l.k[n.I]=n}var Se=(e,t,n,r,l)=>{let s=r.nextSibling;e[t]=e[t]||[];while(s&&((s["getAttribute"]&&s.getAttribute("slot")||s["s-sn"])===n||n===""&&!s["s-sn"]&&(s.nodeType===8&&s.nodeValue.indexOf(".")!==1||s.nodeType===3))){s["s-sn"]=n;e[t].push({slot:r,node:s,hostId:l});s=s.nextSibling}};var Oe=(e,t)=>{if(e!=null&&!_(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var je=e=>f(e).$hostElement$;var Ce=(e,t,n)=>{const r=je(e);return{emit:e=>ke(r,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}};var ke=(e,t,n)=>{const r=E.ce(t,n);e.dispatchEvent(r);return r};var xe=new WeakMap;var Te=(e,t,n)=>{let r=p.get(e);if(F&&n){r=r||new CSSStyleSheet;if(typeof r==="string"){r=t}else{r.replaceSync(t)}}else{r=t}p.set(e,r)};var De=(e,t,n)=>{var r;const l=Le(t);const s=p.get(l);e=e.nodeType===11?e:T;if(s){if(typeof s==="string"){e=e.head||e;let n=xe.get(e);let i;if(!n){xe.set(e,n=new Set)}if(!n.has(l)){if(e.host&&(i=e.querySelector(`[${S}="${l}"]`))){i.innerHTML=s}else{i=document.querySelector(`[${S}="${l}"]`)||T.createElement("style");i.innerHTML=s;const n=(r=E.U)!=null?r:z(T);if(n!=null){i.setAttribute("nonce",n)}if(!(t.u&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(F){const t=new CSSStyleSheet;t.replaceSync(s);e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");if(t){t.innerHTML=s+t.innerHTML}else{e.prepend(i)}}}else{e.append(i)}}if(t.u&1&&e.nodeName!=="HEAD"){e.insertBefore(i,null)}}if(t.u&4){i.innerHTML+=C}if(n){n.add(l)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]}}return l};var Ee=e=>{const t=e.t;const n=e.$hostElement$;const r=fe("attachStyles",t.$);De(n.getRootNode(),t);r()};var Le=(e,t)=>"sc-"+e.$;var Re=(e,t,n,r,l,s,i)=>{if(n!==r){let o=u(e,t);let f=t.toLowerCase();if(t==="class"){const t=e.classList;const l=Fe(n);let s=Fe(r);if(e["s-si"]&&i){s.push(e["s-si"]);l.forEach((t=>{if(t.startsWith(e["s-si"]))s.push(t)}));s=[...new Set(s)];t.add(...s)}else{t.remove(...l.filter((e=>e&&!s.includes(e))));t.add(...s.filter((e=>e&&!l.includes(e))))}}else if(t==="style"){{for(const t in n){if(!r||r[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in r){if(!n||r[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,r[t])}else{e.style[t]=r[t]}}}}else if(t==="key");else if(t==="ref"){if(r){r(e)}}else if(!o&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(u(x,f)){t=f.slice(2)}else{t=f[2]+t.slice(3)}if(n||r){const l=t.endsWith(Ae);t=t.replace(Me,"");if(n){E.rel(e,t,n,l)}if(r){E.ael(e,t,r,l)}}}else{const i=_(r);if((o||i&&r!==null)&&!l){try{if(!e.tagName.includes("-")){const l=r==null?"":r;if(t==="list"){o=false}else if(n==null||e[t]!=l){if(typeof e.__lookupSetter__(t)==="function"){e[t]=l}else{e.setAttribute(t,l)}}}else if(e[t]!==r){e[t]=r}}catch(e){}}let a=false;{if(f!==(f=f.replace(/^xlink\:?/,""))){t=f;a=true}}if(r==null||r===false){if(r!==false||e.getAttribute(t)===""){if(a){e.removeAttributeNS(k,t)}else{e.removeAttribute(t)}}}else if((!o||s&4||l)&&!i){r=r===true?"":r;if(a){e.setAttributeNS(k,t,r)}else{e.setAttribute(t,r)}}}}};var Ne=/\s/;var Fe=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(Ne)};var Ae="Capture";var Me=new RegExp(Ae+"$");var Pe=(e,t,n,r)=>{const l=t.R.nodeType===11&&t.R.host?t.R.host:t.R;const s=e&&e.C||{};const i=t.C||{};{for(const e of Ie(Object.keys(s))){if(!(e in i)){Re(l,e,s[e],void 0,n,t.u,r)}}}for(const e of Ie(Object.keys(i))){Re(l,e,s[e],i[e],n,t.u,r)}};function Ie(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var Ue;var We;var Be=false;var He=false;var _e=false;var ze=false;var Qe=(e,n,r)=>{var i;const o=n.k[r];let f=0;let a;let c;let u;if(!Be){_e=true;if(o.L==="slot"){o.u|=o.k?2:1}}if(o.j!==null){a=o.R=T.createTextNode(o.j)}else if(o.u&1){a=o.R=T.createTextNode("")}else{if(!ze){ze=o.L==="svg"}a=o.R=T.createElementNS(ze?l:s,!Be&&t.slotRelocation&&o.u&2?"slot-fb":o.L);if(ze&&o.L==="foreignObject"){ze=false}{Pe(null,o,ze)}if(o.k){for(f=0;f<o.k.length;++f){c=Qe(e,o,f);if(c){a.appendChild(c)}}}{if(o.L==="svg"){ze=false}else if(a.tagName==="foreignObject"){ze=true}}}a["s-hn"]=We;{if(o.u&(2|1)){a["s-sr"]=true;a["s-cr"]=Ue;a["s-sn"]=o.D||"";a["s-rf"]=(i=o.C)==null?void 0:i.ref;u=e&&e.k&&e.k[r];if(u&&u.L===o.L&&e.R){{Ve(e.R,false)}}}}return a};var Ve=(e,n)=>{E.u|=1;const r=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]&&t.experimentalSlotFixes){let t=e;while(t=t.nextSibling){if(t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===We){r.push(t)}}}for(let e=r.length-1;e>=0;e--){const t=r[e];if(t["s-hn"]!==We&&t["s-ol"]){nt(Je(t).parentNode,t,Je(t));t["s-ol"].remove();t["s-ol"]=void 0;t["s-sh"]=void 0;_e=true}if(n){Ve(t,n)}}E.u&=~1};var qe=(e,t,n,r,l,s)=>{let i=e["s-cr"]&&e["s-cr"].parentNode||e;let o;for(;l<=s;++l){if(r[l]){o=Qe(null,n,l);if(o){r[l].R=o;nt(i,o,Je(t))}}}};var Ge=(e,t,n)=>{for(let r=t;r<=n;++r){const t=e[r];if(t){const e=t.R;tt(t);if(e){{He=true;if(e["s-ol"]){e["s-ol"].remove()}else{Ve(e,true)}}e.remove()}}}};var Ke=(e,t,n,r,l=false)=>{let s=0;let i=0;let o=0;let f=0;let a=t.length-1;let c=t[0];let u=t[a];let v=r.length-1;let d=r[0];let h=r[v];let p;let m;while(s<=a&&i<=v){if(c==null){c=t[++s]}else if(u==null){u=t[--a]}else if(d==null){d=r[++i]}else if(h==null){h=r[--v]}else if(Xe(c,d,l)){Ye(c,d,l);c=t[++s];d=r[++i]}else if(Xe(u,h,l)){Ye(u,h,l);u=t[--a];h=r[--v]}else if(Xe(c,h,l)){if(c.L==="slot"||h.L==="slot"){Ve(c.R.parentNode,false)}Ye(c,h,l);nt(e,c.R,u.R.nextSibling);c=t[++s];h=r[--v]}else if(Xe(u,d,l)){if(c.L==="slot"||h.L==="slot"){Ve(u.R.parentNode,false)}Ye(u,d,l);nt(e,u.R,c.R);u=t[--a];d=r[++i]}else{o=-1;{for(f=s;f<=a;++f){if(t[f]&&t[f].T!==null&&t[f].T===d.T){o=f;break}}}if(o>=0){m=t[o];if(m.L!==d.L){p=Qe(t&&t[i],n,o)}else{Ye(m,d,l);t[o]=void 0;p=m.R}d=r[++i]}else{p=Qe(t&&t[i],n,i);d=r[++i]}if(p){{nt(Je(c.R).parentNode,p,Je(c.R))}}}}if(s>a){qe(e,r[v+1]==null?null:r[v+1].R,n,r,i,v)}else if(i>v){Ge(t,s,a)}};var Xe=(e,t,n=false)=>{if(e.L===t.L){if(e.L==="slot"){return e.D===t.D}if(!n){return e.T===t.T}if(n&&!e.T&&t.T){e.T=t.T}return true}return false};var Je=e=>e&&e["s-ol"]||e;var Ye=(e,n,r=false)=>{const l=n.R=e.R;const s=e.k;const i=n.k;const o=n.L;const f=n.j;let a;if(f===null){{ze=o==="svg"?true:o==="foreignObject"?false:ze}{if(o==="slot"&&!Be);else{Pe(e,n,ze,r)}}if(s!==null&&i!==null){Ke(l,s,n,i,r)}else if(i!==null){if(e.j!==null){l.textContent=""}qe(l,null,n,i,0,i.length-1)}else if(!r&&t.updatable&&s!==null){Ge(s,0,s.length-1)}if(ze&&o==="svg"){ze=false}}else if(a=l["s-cr"]){a.parentNode.textContent=f}else if(e.j!==f){l.data=f}};var Ze=[];var et=e=>{let n;let r;let l;const s=e.__childNodes||e.childNodes;for(const e of s){if(e["s-sr"]&&(n=e["s-cr"])&&n.parentNode){r=n.parentNode.__childNodes||n.parentNode.childNodes;const s=e["s-sn"];for(l=r.length-1;l>=0;l--){n=r[l];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==e["s-hn"]&&!t.experimentalSlotFixes){if(te(n,s)){let t=Ze.find((e=>e.W===n));He=true;n["s-sn"]=n["s-sn"]||s;if(t){t.W["s-sh"]=e["s-hn"];t.B=e}else{n["s-sh"]=e["s-hn"];Ze.push({B:e,W:n})}if(n["s-sr"]){Ze.map((e=>{if(te(e.W,n["s-sn"])){t=Ze.find((e=>e.W===n));if(t&&!e.B){e.B=t.B}}}))}}else if(!Ze.some((e=>e.W===n))){Ze.push({W:n})}}}}if(e.nodeType===1){et(e)}}};var tt=e=>{{e.C&&e.C.ref&&e.C.ref(null);e.k&&e.k.map(tt)}};var nt=(e,t,n)=>{{return e==null?void 0:e.insertBefore(t,n)}};var rt=(e,t,n=false)=>{var r,l,s,i;const o=e.$hostElement$;const f=e.t;const a=e.F||ue(null,null);const c=de(t)?t:ce(null,null,t);We=o.tagName;if(f.H){c.C=c.C||{};f.H.map((([e,t])=>c.C[t]=o[e]))}if(n&&c.C){for(const e of Object.keys(c.C)){if(o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){c.C[e]=o[e]}}}c.L=null;c.u|=4;e.F=c;c.R=a.R=o;Be=L;{Ue=o["s-cr"];He=false}Ye(a,c,n);{E.u|=1;if(_e){et(c.R);for(const e of Ze){const t=e.W;if(!t["s-ol"]){const e=T.createTextNode("");e["s-nr"]=t;nt(t.parentNode,t["s-ol"]=e,t)}}for(const e of Ze){const t=e.W;const o=e.B;if(o){const e=o.parentNode;let n=o.nextSibling;{let s=(r=t["s-ol"])==null?void 0:r.previousSibling;while(s){let r=(l=s["s-nr"])!=null?l:null;if(r&&r["s-sn"]===t["s-sn"]&&e===(r.__parentNode||r.parentNode)){r=r.nextSibling;while(r===t||(r==null?void 0:r["s-sr"])){r=r==null?void 0:r.nextSibling}if(!r||!r["s-nr"]){n=r;break}}s=s.previousSibling}}const i=t.__parentNode||t.parentNode;const f=t.__nextSibling||t.nextSibling;if(!n&&e!==i||f!==n){if(t!==n){if(!t["s-hn"]&&t["s-ol"]){t["s-hn"]=t["s-ol"].parentNode.nodeName}nt(e,t,n);if(t.nodeType===1&&t.tagName!=="SLOT-FB"){t.hidden=(s=t["s-ih"])!=null?s:false}}}t&&typeof o["s-rf"]==="function"&&o["s-rf"](t)}else{if(t.nodeType===1){if(n){t["s-ih"]=(i=t.hidden)!=null?i:false}t.hidden=true}}}}if(He){J(c.R)}E.u&=~1;Ze.length=0}Ue=void 0};var lt=(e,t)=>{if(t&&!e._&&t["s-p"]){const n=t["s-p"].push(new Promise((r=>e._=()=>{t["s-p"].splice(n-1,1);r()})))}};var st=(e,t)=>{{e.u|=16}if(e.u&4){e.u|=512;return}lt(e,e.V);const n=()=>it(e,t);return H(n)};var it=(e,t)=>{const n=e.$hostElement$;const r=fe("scheduleUpdate",e.t.$);const l=e.o;if(!l){throw new Error(`Can't render component <${n.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 s;if(t){{e.u|=256;if(e.q){e.q.map((([e,t])=>ht(l,e,t,n)));e.q=void 0}}{s=ht(l,"componentWillLoad",void 0,n)}}{s=ot(s,(()=>ht(l,"componentWillRender",void 0,n)))}r();return ot(s,(()=>at(e,l,t)))};var ot=(e,t)=>ft(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var ft=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var at=async(e,t,n)=>{var r;const l=e.$hostElement$;const s=fe("update",e.t.$);const i=l["s-rc"];if(n){Ee(e)}const o=fe("render",e.t.$);{ct(e,t,l,n)}if(i){i.map((e=>e()));l["s-rc"]=void 0}o();s();{const t=(r=l["s-p"])!=null?r:[];const n=()=>ut(e);if(t.length===0){n()}else{Promise.all(t).then(n);e.u|=4;t.length=0}}};var ct=(e,t,n,r)=>{try{t=t.render();{e.u&=~16}{e.u|=2}{{{rt(e,t,r)}}}}catch(t){v(t,e.$hostElement$)}return null};var ut=e=>{const t=e.t.$;const n=e.$hostElement$;const r=fe("postUpdate",t);const l=e.o;const s=e.V;{ht(l,"componentDidRender",void 0,n)}if(!(e.u&64)){e.u|=64;{pt(n)}{ht(l,"componentDidLoad",void 0,n)}r();{e.m(n);if(!s){dt()}}}else{{ht(l,"componentDidUpdate",void 0,n)}r()}{e.h(n)}{if(e._){e._();e._=void 0}if(e.u&512){B((()=>st(e,false)))}e.u&=~(4|512)}};var vt=e=>{{const t=f(e);const n=t.$hostElement$.isConnected;if(n&&(t.u&(2|16))===2){st(t,false)}return n}};var dt=t=>{{pt(T.documentElement)}B((()=>ke(x,"appload",{detail:{namespace:e}})))};var ht=(e,t,n,r)=>{if(e&&e[t]){try{return e[t](n)}catch(e){v(e,r)}}return void 0};var pt=e=>{var n;return e.classList.add((n=t.hydratedSelectorName)!=null?n:"hydrated")};var mt=(e,t)=>f(e).i.get(t);var $t=(e,t,n,r)=>{const l=f(e);if(!l){throw new Error(`Couldn't find host element for "${r.$}" 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/ionic-team/stencil/issues/5457).`)}const s=l.$hostElement$;const i=l.i.get(t);const o=l.u;const a=l.o;n=Oe(n,r.l[t][0]);const c=Number.isNaN(i)&&Number.isNaN(n);const u=n!==i&&!c;if((!(o&8)||i===void 0)&&u){l.i.set(t,n);if(a){if(r.G&&o&128){const e=r.G[t];if(e){e.map((e=>{try{a[e](n,i,t)}catch(e){v(e,s)}}))}}if((o&(2|16))===2){st(l,false)}}}};var yt=(e,n,r)=>{var l,s;const i=e.prototype;if(n.l||(n.G||e.watchers)){if(e.watchers&&!n.G){n.G=e.watchers}const o=Object.entries((l=n.l)!=null?l:{});o.map((([e,[t]])=>{if(t&31||r&2&&t&32){const{get:l,set:s}=Object.getOwnPropertyDescriptor(i,e)||{};if(l)n.l[e][0]|=2048;if(s)n.l[e][0]|=4096;if(r&1||!l){Object.defineProperty(i,e,{get(){{if((n.l[e][0]&2048)===0){return mt(this,e)}const t=f(this);const r=t?t.o:i;if(!r)return;return r[e]}},configurable:true,enumerable:true})}Object.defineProperty(i,e,{set(l){const i=f(this);if(s){const r=t&32?this[e]:i.$hostElement$[e];if(typeof r==="undefined"&&i.i.get(e)){l=i.i.get(e)}else if(!i.i.get(e)&&r){i.i.set(e,r)}s.apply(this,[Oe(l,t)]);l=t&32?this[e]:i.$hostElement$[e];$t(this,e,l,n);return}{if((r&1)===0||(n.l[e][0]&4096)===0){$t(this,e,l,n);if(r&1&&!i.o){i.p.then((()=>{if(n.l[e][0]&4096&&i.o[e]!==i.i.get(e)){i.o[e]=l}}))}return}const s=()=>{const r=i.o[e];if(!i.i.get(e)&&r){i.i.set(e,r)}i.o[e]=Oe(l,t);$t(this,e,i.o[e],n)};if(i.o){s()}else{i.p.then((()=>s()))}}}})}else if(r&1&&t&64){Object.defineProperty(i,e,{value(...t){var n;const r=f(this);return(n=r==null?void 0:r.v)==null?void 0:n.then((()=>{var n;return(n=r.o)==null?void 0:n[e](...t)}))}})}}));if(r&1){const r=new Map;i.attributeChangedCallback=function(e,l,s){E.jmp((()=>{var o;const a=r.get(e);if(this.hasOwnProperty(a)&&t.lazyLoad){s=this[a];delete this[a]}else if(i.hasOwnProperty(a)&&typeof this[a]==="number"&&this[a]==s){return}else if(a==null){const t=f(this);const r=t==null?void 0:t.u;if(r&&!(r&8)&&r&128&&s!==l){const r=t.o;const i=(o=n.G)==null?void 0:o[e];i==null?void 0:i.forEach((t=>{if(r[t]!=null){r[t].call(r,s,l,e)}}))}return}const c=Object.getOwnPropertyDescriptor(i,a);s=s===null&&typeof this[a]==="boolean"?false:s;if(s!==this[a]&&(!c.get||!!c.set)){this[a]=s}}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=n.G)!=null?s:{}),...o.filter((([e,t])=>t[0]&15)).map((([e,t])=>{var l;const s=t[1]||e;r.set(s,e);if(t[0]&512){(l=n.H)==null?void 0:l.push([e,s])}return s}))]))}}return e};var bt=async(e,t,n,r)=>{let l;if((t.u&32)===0){t.u|=32;{const r=h(n,t);if(r&&"then"in r){const e=ae();l=await r;e()}else{l=r}if(!l){throw new Error(`Constructor for "${n.$}#${t.K}" was not found`)}if(!l.isProxied){{n.G=l.watchers}yt(l,n,2);l.isProxied=true}const s=fe("createInstance",n.$);{t.u|=8}try{new l(t)}catch(t){v(t,e)}{t.u&=~8}{t.u|=128}s();gt(t.o,e)}if(l&&l.style){let e;if(typeof l.style==="string"){e=l.style}const t=Le(n);if(!p.has(t)){const r=fe("registerStyles",n.$);Te(t,e,!!(n.u&1));r()}}}const s=t.V;const i=()=>st(t,true);if(s&&s["s-rc"]){s["s-rc"].push(i)}else{i()}};var gt=(e,t)=>{{ht(e,"connectedCallback",void 0,t)}};var wt=e=>{if((E.u&1)===0){const t=f(e);const n=t.t;const r=fe("connectedCallback",n.$);if(!(t.u&1)){t.u|=1;let r;{r=e.getAttribute(w);if(r){$e(e,n.$,r,t)}}if(!r){if(n.u&(4|8)){St(e)}}{let n=e;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){lt(t,t.V=n);break}}}if(n.l){Object.entries(n.l).map((([t,[n]])=>{if(n&31&&e.hasOwnProperty(t)){const n=e[t];delete e[t];e[t]=n}}))}{bt(e,t,n)}}else{kt(e,t,n.X);if(t==null?void 0:t.o){gt(t.o,e)}else if(t==null?void 0:t.p){t.p.then((()=>gt(t.o,e)))}}r()}};var St=e=>{const t=e["s-cr"]=T.createComment("");t["s-cn"]=true;nt(e,t,e.firstChild)};var Ot=(e,t)=>{{ht(e,"disconnectedCallback",void 0,t||e)}};var jt=async e=>{if((E.u&1)===0){const t=f(e);{if(t.J){t.J.map((e=>e()));t.J=void 0}}if(t==null?void 0:t.o){Ot(t.o,e)}else if(t==null?void 0:t.p){t.p.then((()=>Ot(t.o,e)))}}if(xe.has(e)){xe.delete(e)}if(e.shadowRoot&&xe.has(e.shadowRoot)){xe.delete(e.shadowRoot)}};var Ct=(e,t={})=>{var n;const r=fe();const l=[];const s=t.exclude||[];const i=x.customElements;const o=T.head;const a=o.querySelector("meta[charset]");const u=T.createElement("style");const v=[];let d;let h=true;Object.assign(E,t);E.O=new URL(t.resourcesUrl||"./",T.baseURI).href;{E.u|=2}let p=false;e.map((e=>{e[1].map((n=>{var r;const o={u:n[0],$:n[1],l:n[2],X:n[3]};if(o.u&4){p=true}{o.l=n[2]}{o.X=n[3]}{o.H=[]}{o.G=(r=n[4])!=null?r:{}}const a=t.transformTagName?t.transformTagName(o.$):o.$;const u=class extends HTMLElement{constructor(e){super(e);this.hasRegisteredEventListeners=false;e=this;c(e,o)}connectedCallback(){const e=f(this);if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true;kt(this,e,o.X)}if(d){clearTimeout(d);d=null}if(h){v.push(this)}else{E.jmp((()=>wt(this)))}}disconnectedCallback(){E.jmp((()=>jt(this)));E.raf((()=>{var e;const t=f(this);if(((e=t==null?void 0:t.F)==null?void 0:e.R)instanceof Node&&!t.F.R.isConnected){delete t.F.R}}))}componentOnReady(){return f(this).p}};{{le(u.prototype)}{re(u.prototype)}}o.S=e[0];if(!s.includes(a)&&!i.get(a)){l.push(a);i.define(a,yt(u,o,1))}}))}));if(l.length>0){if(p){u.textContent+=C}{u.textContent+=l.sort()+j}if(u.innerHTML.length){u.setAttribute("data-styles","");const e=(n=E.U)!=null?n:z(T);if(e!=null){u.setAttribute("nonce",e)}o.insertBefore(u,a?a.nextSibling:o.firstChild)}}h=false;if(v.length){v.map((e=>e.connectedCallback()))}else{{E.jmp((()=>d=setTimeout(dt,30)))}}r()};var kt=(e,t,n,r)=>{if(n){n.map((([n,r,l])=>{const s=Tt(e,n);const i=xt(t,l);const o=Dt(n);E.ael(s,r,i,o);(t.J=t.J||[]).push((()=>E.rel(s,r,i,o)))}))}};var xt=(e,t)=>n=>{var r;try{{if(e.u&256){(r=e.o)==null?void 0:r[t](n)}else{(e.q=e.q||[]).push([t,n])}}}catch(t){v(t,e.$hostElement$)}};var Tt=(e,t)=>{if(t&8)return x;return e};var Dt=e=>R?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;var Et=e=>E.U=e;export{D as H,ve as a,Ct as b,Ce as c,vt as f,je as g,ce as h,N as p,a as r,Et as s}; //# sourceMappingURL=p-c2c6299e.js.map