UNPKG

@ionic/core

Version:
5 lines • 24.1 kB
/*! * (C) Ionic http://ionicframework.com - MIT License */ var t=Object.defineProperty,e={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1},n=new WeakMap,o=t=>n.get(t),s=(t,e)=>n.set(e.t=t,e),l=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),i=new Map,c=new Map,f=[],u="s-id",a="c-id",d="slot-fb{display:contents}slot-fb[hidden]{display:none}",h="http://www.w3.org/1999/xlink",$="undefined"!=typeof window?window:{},p=$.document||{head:{}},m=$.HTMLElement||class{},v={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},y=!0,b=t=>Promise.resolve(t),w=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),g=!1,j=[],k=[],O=(t,e)=>n=>{t.push(n),g||(g=!0,e&&4&v.o?C(x):v.raf(x))},S=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},x=()=>{S(j),S(k),(g=j.length>0)&&v.raf(x)},C=t=>b().then(t),E=O(j,!1),M=O(k,!0),A=t=>{const e=new URL(t,v.l);return e.origin!==$.location.origin?e.href:e.pathname},R={},P=t=>"object"==(t=typeof t)||"function"===t;function N(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>D,map:()=>I,ok:()=>T,unwrap:()=>W,unwrapErr:()=>_});var T=t=>({isOk:!0,isErr:!1,value:t}),D=t=>({isOk:!1,isErr:!0,value:t});function I(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>T(t))):T(n)}if(t.isErr)return D(t.value);throw"should never get here"}var L,U,F,W=t=>{if(t.isOk)return t.value;throw t.value},_=t=>{if(t.isErr)return t.value;throw t.value},B=(t,e,...n)=>{let o=null,s=null,l=null,r=!1,i=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof t&&!P(o))&&(o+=""),r&&i?c[c.length-1].i+=o:c.push(r?H(null,o):o),i=r)};if(f(n),e){e.key&&(s=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,G);const u=H(t,null);return u.u=e,c.length>0&&(u.h=c),u.$=s,u.p=l,u},H=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,$:null,p:null}),q={},G={forEach:(t,e)=>t.map(V).forEach(e),map:(t,e)=>t.map(V).map(e).map(z)},V=t=>({vattrs:t.u,vchildren:t.h,vkey:t.$,vname:t.p,vtag:t.m,vtext:t.i}),z=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),B(t.vtag,e,...t.vchildren||[])}const e=H(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.$=t.vkey,e.p=t.vname,e},J=(t,e,n,o,s,l,r)=>{let i,c,f,u;if(1===l.nodeType){if(i=l.getAttribute(a),i&&(c=i.split("."),c[0]!==r&&"0"!==c[0]||(f={o:0,j:c[0],k:c[1],O:c[2],S:c[3],m:l.tagName.toLowerCase(),v:l,u:null,h:null,$:null,p:null,i:null},e.push(f),l.removeAttribute(a),t.h||(t.h=[]),t.h[f.S]=f,t=f,o&&"0"===f.O&&(o[f.S]=f.v))),l.shadowRoot)for(u=l.shadowRoot.childNodes.length-1;u>=0;u--)J(t,e,n,o,s,l.shadowRoot.childNodes[u],r);for(u=l.childNodes.length-1;u>=0;u--)J(t,e,n,o,s,l.childNodes[u],r)}else if(8===l.nodeType)c=l.nodeValue.split("."),c[1]!==r&&"0"!==c[1]||(i=c[0],f={o:0,j:c[1],k:c[2],O:c[3],S:c[4],v:l,u:null,h:null,$:null,p:null,m:null,i:null},"t"===i?(f.v=l.nextSibling,f.v&&3===f.v.nodeType&&(f.i=f.v.textContent,e.push(f),l.remove(),t.h||(t.h=[]),t.h[f.S]=f,o&&"0"===f.O&&(o[f.S]=f.v))):f.j===r&&("s"===i?(f.m="slot",l["s-sn"]=c[5]?f.p=c[5]:"",l["s-sr"]=!0,o&&(f.v=p.createElement(f.m),f.p&&f.v.setAttribute("name",f.p),l.parentNode.insertBefore(f.v,l),l.remove(),"0"===f.O&&(o[f.S]=f.v)),n.push(f),t.h||(t.h=[]),t.h[f.S]=f):"r"===i&&(o?l.remove():(s["s-cr"]=l,l["s-cn"]=!0))));else if(t&&"style"===t.m){const e=H(null,l.textContent);e.v=l,e.S="0",t.h=[e]}},K=(t,e)=>{if(1===t.nodeType){let n=0;if(t.shadowRoot)for(;n<t.shadowRoot.childNodes.length;n++)K(t.shadowRoot.childNodes[n],e);for(n=0;n<t.childNodes.length;n++)K(t.childNodes[n],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Q=t=>f.push(t),X=t=>o(t).C,Y=t=>o(t).$hostElement$,Z=(t,e,n)=>{const o=Y(t);return{emit:t=>tt(o,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},tt=(t,e,n)=>{const o=v.ce(e,n);return t.dispatchEvent(o),o},et=new WeakMap,nt=(t,e,n)=>{var o;const s=ot(e,n),l=c.get(s);if(t=11===t.nodeType?t:p,l)if("string"==typeof l){let n,r=et.get(t=t.head||t);if(r||et.set(t,r=new Set),!r.has(s)){if(t.host&&(n=t.querySelector(`[sty-id="${s}"]`)))n.innerHTML=l;else{n=p.createElement("style"),n.innerHTML=l;const s=null!=(o=v.M)?o:N(p);null!=s&&n.setAttribute("nonce",s),(!(1&e.o)||1&e.o&&"HEAD"!==t.nodeName)&&t.insertBefore(n,t.querySelector("link"))}4&e.o&&(n.innerHTML+=d),r&&r.add(s)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return s},ot=(t,e)=>"sc-"+(e&&32&t.o?t.A+"-"+e:t.A),st=(t,e,n,o,s,r)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,s=rt(n),l=rt(o);e.remove(...s.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=P(o);if((i||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]=o;else{const s=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(h,e):t.removeAttribute(e)):(!i||4&r||s)&&!l&&(o=!0===o?"":o,f?t.setAttributeNS(h,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l($,c)?c.slice(2):c[2]+e.slice(3),n||o){const s=e.endsWith(it);e=e.replace(ct,""),n&&v.rel(t,e,n,s),o&&v.ael(t,e,o,s)}}},lt=/\s/,rt=t=>t?t.split(lt):[],it="Capture",ct=RegExp(it+"$"),ft=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,s=t&&t.u||R,l=e.u||R;for(const t of ut(Object.keys(s)))t in l||st(o,t,s[t],void 0,n,e.o);for(const t of ut(Object.keys(l)))st(o,t,s[t],l[t],n,e.o)};function ut(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var at=!1,dt=!1,ht=!1,$t=!1,pt=(t,e,n,o)=>{var s;const l=e.h[n];let r,i,c,f=0;if(at||(ht=!0,"slot"===l.m&&(L&&o.classList.add(L+"-s"),l.o|=l.h?2:1)),null!==l.i)r=l.v=p.createTextNode(l.i);else if(1&l.o)r=l.v=p.createTextNode("");else{if($t||($t="svg"===l.m),r=l.v=p.createElementNS($t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!at&&2&l.o?"slot-fb":l.m),$t&&"foreignObject"===l.m&&($t=!1),ft(null,l,$t),!!r.getRootNode().querySelector("body")&&null!=L&&r["s-si"]!==L&&r.classList.add(r["s-si"]=L),Rt(r,o),l.h)for(f=0;f<l.h.length;++f)i=pt(t,l,f,r),i&&r.appendChild(i);"svg"===l.m?$t=!1:"foreignObject"===r.tagName&&($t=!0)}return r["s-hn"]=F,3&l.o&&(r["s-sr"]=!0,r["s-cr"]=U,r["s-sn"]=l.p||"",r["s-rf"]=null==(s=l.u)?void 0:s.ref,c=t&&t.h&&t.h[n],c&&c.m===l.m&&t.v&&mt(t.v)),r},mt=t=>{v.o|=1;const e=t.closest(F.toLowerCase());if(null!=e){const n=Array.from(e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(Mt(e,t,null!=n?n:null),t["s-sh"]=void 0,ht=!0)}v.o&=-2},vt=(t,e)=>{v.o|=1;const n=Array.from(t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===F&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==F&&o["s-ol"]&&(Mt(jt(o),o,gt(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ht=!0),e&&vt(o,e)}v.o&=-2},yt=(t,e,n,o,s,l)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===F&&(i=i.shadowRoot);s<=l;++s)o[s]&&(r=pt(null,n,s,t),r&&(o[s].v=r,Mt(i,r,gt(e))))},bt=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;Et(e),t&&(dt=!0,t["s-ol"]?t["s-ol"].remove():vt(t,!0),t.remove())}}},wt=(t,e,n=!1)=>!(t.m!==e.m||("slot"===t.m?"k"in t&&n&&8!==t.v.nodeType||t.p!==e.p:!n&&t.$!==e.$)),gt=t=>t&&t["s-ol"]||t,jt=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,kt=(t,e,n=!1)=>{const o=e.v=t.v,s=t.h,l=e.h,r=e.m,i=e.i;let c;null===i?($t="svg"===r||"foreignObject"!==r&&$t,"slot"!==r||at?ft(t,e,$t):t.p!==e.p&&(e.v["s-sn"]=e.p||"",mt(e.v.parentElement)),null!==s&&null!==l?((t,e,n,o,s=!1)=>{let l,r,i=0,c=0,f=0,u=0,a=e.length-1,d=e[0],h=e[a],$=o.length-1,p=o[0],m=o[$];for(;i<=a&&c<=$;)if(null==d)d=e[++i];else if(null==h)h=e[--a];else if(null==p)p=o[++c];else if(null==m)m=o[--$];else if(wt(d,p,s))kt(d,p,s),d=e[++i],p=o[++c];else if(wt(h,m,s))kt(h,m,s),h=e[--a],m=o[--$];else if(wt(d,m,s))"slot"!==d.m&&"slot"!==m.m||vt(d.v.parentNode,!1),kt(d,m,s),Mt(t,d.v,h.v.nextSibling),d=e[++i],m=o[--$];else if(wt(h,p,s))"slot"!==d.m&&"slot"!==m.m||vt(h.v.parentNode,!1),kt(h,p,s),Mt(t,h.v,d.v),h=e[--a],p=o[++c];else{for(f=-1,u=i;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===p.$){f=u;break}f>=0?(r=e[f],r.m!==p.m?l=pt(e&&e[c],n,f,t):(kt(r,p,s),e[f]=void 0,l=r.v),p=o[++c]):(l=pt(e&&e[c],n,c,t),p=o[++c]),l&&Mt(jt(d.v),l,gt(d.v))}i>a?yt(t,null==o[$+1]?null:o[$+1].v,n,o,c,$):c>$&&bt(e,i,a)})(o,s,e,l,n):null!==l?(null!==t.i&&(o.textContent=""),yt(o,null,e,l,0,l.length-1)):!n&&null!==s&&bt(s,0,s.length-1),$t&&"svg"===r&&($t=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:t.i!==i&&(o.data=i)},Ot=t=>{const e=t.childNodes;for(const t of e)if(1===t.nodeType){if(t["s-sr"]){const n=t["s-sn"];t.hidden=!1;for(const o of e)if(o!==t)if(o["s-hn"]!==t["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){t.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){t.hidden=!0;break}}Ot(t)}},St=[],xt=t=>{let e,n,o;for(const s of t.childNodes){if(s["s-sr"]&&(e=s["s-cr"])&&e.parentNode){n=e.parentNode.childNodes;const t=s["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===s["s-hn"]||e["s-sh"]&&e["s-sh"]===s["s-hn"]))if(Ct(e,t)){let n=St.find((t=>t.R===e));dt=!0,e["s-sn"]=e["s-sn"]||t,n?(n.R["s-sh"]=s["s-hn"],n.P=s):(e["s-sh"]=s["s-hn"],St.push({P:s,R:e})),e["s-sr"]&&St.map((t=>{Ct(t.R,e["s-sn"])&&(n=St.find((t=>t.R===e)),n&&!t.P&&(t.P=n.P))}))}else St.some((t=>t.R===e))||St.push({R:e})}1===s.nodeType&&xt(s)}},Ct=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,Et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Et)},Mt=(t,e,n)=>{const o=null==t?void 0:t.insertBefore(e,n);return Rt(e,t),o},At=t=>{const e=[];return t&&e.push(...t["s-scs"]||[],t["s-si"],t["s-sc"],...At(t.parentElement)),e},Rt=(t,e,n=!1)=>{var o;if(t&&e&&1===t.nodeType){const s=new Set(At(e).filter(Boolean));if(s.size&&(null==(o=t.classList)||o.add(...t["s-scs"]=[...s]),t["s-ol"]||n))for(const e of Array.from(t.childNodes))Rt(e,t,!0)}},Pt=(t,e)=>{e&&!t.N&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.N=e)))},Nt=(t,e)=>{if(t.o|=16,!(4&t.o))return Pt(t,t.T),M((()=>Tt(t,e)));t.o|=512},Tt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.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 e&&(t.o|=256,t.D&&(t.D.map((([t,e])=>Bt(n,t,e))),t.D=void 0),o=Bt(n,"componentWillLoad")),o=Dt(o,(()=>Bt(n,"componentWillRender"))),Dt(o,(()=>Lt(t,n,e)))},Dt=(t,e)=>It(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),It=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Lt=async(t,e,n)=>{var o;const s=t.$hostElement$,l=s["s-rc"];n&&(t=>{const e=t.I,n=t.$hostElement$,o=e.o,s=nt(n.shadowRoot?n.shadowRoot:n.getRootNode(),e,t.C);10&o&&2&o&&(n["s-sc"]=s,n.classList.add(s+"-h"),2&o&&n.classList.add(s+"-s"))})(t);Ut(t,e,s,n),l&&(l.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(o=s["s-p"])?o:[],n=()=>Ft(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},Ut=(t,e,n,o)=>{try{e=e.render&&e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{var o,s,l,r,i;const c=t.$hostElement$,f=t.I,u=t.L||H(null,null),a=(t=>t&&t.m===q)(e)?e:B(null,null,e);if(F=c.tagName,f.U&&(a.u=a.u||{},f.U.map((([t,e])=>a.u[e]=c[t]))),n&&a.u)for(const t of Object.keys(a.u))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.u[t]=c[t]);if(a.m=null,a.o|=4,t.L=a,a.v=u.v=c.shadowRoot||c,L=c["s-sc"],at=!!(1&f.o),U=c["s-cr"],dt=!1,kt(u,a,n),v.o|=1,ht){xt(a.v);for(const t of St){const e=t.R;if(!e["s-ol"]){const t=p.createTextNode("");t["s-nr"]=e,Mt(e.parentNode,e["s-ol"]=t,e)}}for(const t of St){const e=t.R,i=t.P;if(i){const t=i.parentNode;let n=i.nextSibling;if(n&&1===n.nodeType){let l=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;l;){let o=null!=(s=l["s-nr"])?s:null;if(o&&o["s-sn"]===e["s-sn"]&&t===o.parentNode){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}l=l.previousSibling}}(!n&&t!==e.parentNode||e.nextSibling!==n)&&e!==n&&(Mt(t,e,n),1===e.nodeType&&(e.hidden=null!=(l=e["s-ih"])&&l)),e&&"function"==typeof i["s-rf"]&&i["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(r=e.hidden)&&r),e.hidden=!0)}}if(dt&&Ot(a.v),v.o&=-2,St.length=0,2&f.o)for(const t of a.v.childNodes)t["s-hn"]===F||t["s-sh"]||(n&&null==t["s-ih"]&&(t["s-ih"]=null!=(i=t.hidden)&&i),t.hidden=!0);U=void 0})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},Ft=t=>{const e=t.$hostElement$,n=t.t,o=t.T;Bt(n,"componentDidRender"),64&t.o?Bt(n,"componentDidUpdate"):(t.o|=64,Ht(e),Bt(n,"componentDidLoad"),t.F(e),o||_t()),t.W(e),t.N&&(t.N(),t.N=void 0),512&t.o&&C((()=>Nt(t,!1))),t.o&=-517},Wt=t=>{{const e=o(t),n=e.$hostElement$.isConnected;return n&&2==(18&e.o)&&Nt(e,!1),n}},_t=()=>{Ht(p.documentElement),C((()=>tt($,"appload",{detail:{namespace:"ionic"}})))},Bt=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},Ht=t=>t.classList.add("hydrated"),qt=(t,e,n)=>{var s,l;const i=t.prototype;if(e._||e.B||t.watchers){t.watchers&&!e.B&&(e.B=t.watchers);const c=Object.entries(null!=(s=e._)?s:{});if(c.map((([t,[s]])=>{31&s||2&n&&32&s?Object.defineProperty(i,t,{get(){return((t,e)=>o(this).H.get(e))(0,t)},set(n){((t,e,n,s)=>{const l=o(t);if(!l)throw Error(`Couldn't find host element for "${s.A}" 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 i=l.$hostElement$,c=l.H.get(e),f=l.o,u=l.t;if(n=((t,e)=>null==t||P(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,s._[e][0]),(!(8&f)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(l.H.set(e,n),u)){if(s.B&&128&f){const t=s.B[e];t&&t.map((t=>{try{u[t](n,c,e)}catch(t){r(t,i)}}))}2==(18&f)&&Nt(l,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0}):1&n&&64&s&&Object.defineProperty(i,t,{value(...e){var n;const s=o(this);return null==(n=null==s?void 0:s.q)?void 0:n.then((()=>{var n;return null==(n=s.t)?void 0:n[t](...e)}))}})})),1&n){const n=new Map;i.attributeChangedCallback=function(t,s,l){v.jmp((()=>{var r;const c=n.get(t);if(this.hasOwnProperty(c))l=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==l)return;if(null==c){const n=o(this),i=null==n?void 0:n.o;if(i&&!(8&i)&&128&i&&l!==s){const o=n.t,i=null==(r=e.B)?void 0:r[t];null==i||i.forEach((e=>{null!=o[e]&&o[e].call(o,l,s,t)}))}return}}this[c]=(null!==l||"boolean"!=typeof this[c])&&l}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=e.B)?l:{}),...c.filter((([t,e])=>15&e[0])).map((([t,o])=>{var s;const l=o[1]||t;return n.set(l,t),512&o[0]&&(null==(s=e.U)||s.push([t,l])),l}))]))}}return t},Gt=t=>{Bt(t,"connectedCallback")},Vt=t=>{if(!(1&v.o)){const e=o(t),n=e.I,s=()=>{};if(1&e.o)ue(t,e,n.G),(null==e?void 0:e.t)?Gt(e.t):(null==e?void 0:e.V)&&e.V.then((()=>Gt(e.t)));else{let o;if(e.o|=1,o=t.getAttribute(u),o){if(1&n.o){const e=nt(t.shadowRoot,n,t.getAttribute("s-mode"));t.classList.remove(e+"-h",e+"-s")}((t,e,n,o)=>{const s=t.shadowRoot,l=[],r=s?[]:null,i=o.L=H(e,null);v.J||K(p.body,v.J=new Map),t[u]=n,t.removeAttribute(u),J(i,l,[],r,t,t,n),l.map((t=>{const n=t.j+"."+t.k,o=v.J.get(n),l=t.v;o&&""===o["s-en"]&&o.parentNode.insertBefore(l,o.nextSibling),s||(l["s-hn"]=e,o&&(l["s-ol"]=o,l["s-ol"]["s-nr"]=l)),v.J.delete(n)})),s&&r.map((t=>{t&&s.appendChild(t)}))})(t,n.A,o,e)}o||12&n.o&&zt(t);{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Pt(e,e.T=n);break}}n._&&Object.entries(n._).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.K){const t=(t=>{const e=t.A.replace(/-/g,"_"),n=t.K;if(!n)return;const o=i.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(i.set(n,t),t[e])),r) /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.A}#${e.C}" was not found`);o.isProxied||(n.B=o.watchers,qt(o,n,2),o.isProxied=!0);const s=()=>{};e.o|=8;try{new o(e)}catch(t){r(t)}e.o&=-9,e.o|=128,s(),Gt(e.t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let s;"string"==typeof o.style?s=o.style:"string"!=typeof o.style&&(e.C=(t=>f.map((e=>e(t))).find((t=>!!t)))(t),e.C&&(s=o.style[e.C]));const l=ot(n,e.C);if(!c.has(l)){const t=()=>{};((t,e,n)=>{let o=c.get(t);w&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(l,s,!!(1&n.o)),t()}}}const s=e.T,l=()=>Nt(e,!0);s&&s["s-rc"]?s["s-rc"].push(l):l()})(t,e,n)}s()}},zt=t=>{const e=t["s-cr"]=p.createComment("");e["s-cn"]=!0,Mt(t,e,t.firstChild)},Jt=t=>{Bt(t,"disconnectedCallback")},Kt=t=>{const e=t.cloneNode;t.cloneNode=function(t){const n=this,o=n.shadowRoot&&y,s=e.call(n,!!o&&t);if(!o&&t){let t,e,o=0;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"];for(;o<n.childNodes.length;o++)t=n.childNodes[o]["s-nr"],e=l.every((t=>!n.childNodes[o][t])),t&&(s.__appendChild?s.__appendChild(t.cloneNode(!0)):s.appendChild(t.cloneNode(!0))),e&&s.appendChild(n.childNodes[o].cloneNode(!0))}return s}},Qt=t=>{t.__appendChild=t.appendChild,t.appendChild=function(t){const e=t["s-sn"]=re(t),n=ie(this.childNodes,e,this.tagName);if(n){const o=ce(n,e),s=o[o.length-1],l=Mt(s.parentNode,t,s.nextSibling);return Ot(this),l}return this.__appendChild(t)}},Xt=t=>{t.__removeChild=t.removeChild,t.removeChild=function(t){if(t&&void 0!==t["s-sn"]){const e=ie(this.childNodes,t["s-sn"],this.tagName);if(e){const n=ce(e,t["s-sn"]).find((e=>e===t));if(n)return n.remove(),void Ot(this)}}return this.__removeChild(t)}},Yt=t=>{const e=t.prepend;t.prepend=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t));const n=t["s-sn"]=re(t),o=ie(this.childNodes,n,this.tagName);if(o){const e=document.createTextNode("");e["s-nr"]=t,o["s-cr"].parentNode.__appendChild(e),t["s-ol"]=e;const s=ce(o,n)[0];return Mt(s.parentNode,t,s.nextSibling)}return 1===t.nodeType&&t.getAttribute("slot")&&(t.hidden=!0),e.call(this,t)}))}},Zt=t=>{t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))}},te=t=>{const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},ee=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},ne=t=>{const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},oe=t=>{const e=Object.getOwnPropertyDescriptor(Node.prototype,"textContent");Object.defineProperty(t,"__textContent",e),Object.defineProperty(t,"textContent",{get(){return" "+le(this.childNodes).map((t=>{var e,n;const o=[];let s=t.nextSibling;for(;s&&s["s-sn"]===t["s-sn"];)3!==s.nodeType&&1!==s.nodeType||o.push(null!=(n=null==(e=s.textContent)?void 0:e.trim())?n:""),s=s.nextSibling;return o.filter((t=>""!==t)).join(" ")})).filter((t=>""!==t)).join(" ")+" "},set(t){le(this.childNodes).forEach((e=>{let n=e.nextSibling;for(;n&&n["s-sn"]===e["s-sn"];){const t=n;n=n.nextSibling,t.remove()}if(""===e["s-sn"]){const n=this.ownerDocument.createTextNode(t);n["s-sn"]="",Mt(e.parentElement,n,e.nextSibling)}else e.remove()}))}})},se=(t,e)=>{class n extends Array{item(t){return this[t]}}if(8&e.o){const e=t.__lookupGetter__("childNodes");Object.defineProperty(t,"children",{get(){return this.childNodes.map((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get:()=>t.children.length}),Object.defineProperty(t,"childNodes",{get(){const t=e.call(this);if(!(1&v.o)&&2&o(this).o){const e=new n;for(let n=0;n<t.length;n++){const o=t[n]["s-nr"];o&&e.push(o)}return e}return n.from(t)}})}},le=t=>{const e=[];for(const n of Array.from(t))n["s-sr"]&&e.push(n),e.push(...le(n.childNodes));return e},re=t=>t["s-sn"]||1===t.nodeType&&t.getAttribute("slot")||"",ie=(t,e,n)=>{let o,s=0;for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&o["s-sn"]===e&&o["s-hn"]===n)return o;if(o=ie(o.childNodes,e,n),o)return o}return null},ce=(t,e)=>{const n=[t];for(;(t=t.nextSibling)&&t["s-sn"]===e;)n.push(t);return n},fe=(t,e={})=>{var s;const l=[],r=e.exclude||[],i=$.customElements,c=p.head,f=c.querySelector("meta[charset]"),u=p.createElement("style"),a=[];let h,m=!0;Object.assign(v,e),v.l=new URL(e.resourcesUrl||"./",p.baseURI).href,v.o|=2;let y=!1;if(t.map((t=>{t[1].map((e=>{var s;const c={o:e[0],A:e[1],_:e[2],G:e[3]};4&c.o&&(y=!0),c._=e[2],c.G=e[3],c.U=[],c.B=null!=(s=e[4])?s:{};const f=c.A,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const o={o:0,$hostElement$:t,I:e,H:new Map};o.q=new Promise((t=>o.W=t)),o.V=new Promise((t=>o.F=t)),t["s-p"]=[],t["s-rc"]=[],n.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.A}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open",delegatesFocus:!!(16&c.o)})}connectedCallback(){const t=o(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ue(this,t,c.G)),h&&(clearTimeout(h),h=null),m?a.push(this):v.jmp((()=>Vt(this)))}disconnectedCallback(){v.jmp((()=>(async()=>{if(!(1&v.o)){const t=o(this);t.X&&(t.X.map((t=>t())),t.X=void 0),(null==t?void 0:t.t)?Jt(t.t):(null==t?void 0:t.V)&&t.V.then((()=>Jt(t.t)))}})()))}componentOnReady(){return o(this).V}};2&c.o&&((t,e)=>{Kt(t),Qt(t),Zt(t),Yt(t),ne(t),te(t),ee(t),oe(t),se(t,e),Xt(t)})(u.prototype,c),c.K=t[0],r.includes(f)||i.get(f)||(l.push(f),i.define(f,qt(u,c,1)))}))})),l.length>0&&(y&&(u.textContent+=d),u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(s=v.M)?s:N(p);null!=t&&u.setAttribute("nonce",t),c.insertBefore(u,f?f.nextSibling:c.firstChild)}m=!1,a.length?a.map((t=>t.connectedCallback())):v.jmp((()=>h=setTimeout(_t,30)))},ue=(t,e,n)=>{n&&n.map((([n,o,s])=>{const l=de(t,n),r=ae(e,s),i=he(n);v.ael(l,o,r,i),(e.X=e.X||[]).push((()=>v.rel(l,o,r,i)))}))},ae=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.D=t.D||[]).push([e,n])}catch(t){r(t)}},de=(t,e)=>4&e?p:8&e?$:16&e?p.body:t,he=t=>({passive:!!(1&t),capture:!!(2&t)}),$e=t=>v.M=t;export{e as B,m as H,Q as a,fe as b,Z as c,E as d,q as e,Y as f,X as g,B as h,Wt as i,A as j,b as p,s as r,$e as s,M as w}