UNPKG

@derockdev/discord-components-core

Version:

Web components to easily build and display fake Discord messages on your webpages.

5 lines 17.1 kB
const t="derockdev-discord-components-core";let e;let n;let s=false;let l=false;let o=false;let i=false;let f=false;const c=(t,e="")=>{{return()=>{}}};const r=(t,e)=>{{return()=>{}}};const u="r";const a="o";const d="s";const $="t";const h="s-id";const p="sty-id";const y="c-id";const m="{visibility:hidden}.hydrated{visibility:inherit}";const w="http://www.w3.org/1999/xlink";const b={};const g="http://www.w3.org/2000/svg";const v="http://www.w3.org/1999/xhtml";const k=t=>{t=typeof t;return t==="object"||t==="function"};function S(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const j=(t,e,...n)=>{let s=null;let l=null;let o=null;let i=false;let f=false;const c=[];const r=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){r(s)}else if(s!=null&&typeof s!=="boolean"){if(i=typeof t!=="function"&&!k(s)){s=String(s)}if(i&&f){c[c.length-1].t+=s}else{c.push(i?x(null,s):s)}f=i}}};r(n);if(e){if(e.key){l=e.key}if(e.name){o=e.name}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,c,M)}const u=x(t,null);u.l=e;if(c.length>0){u.o=c}{u.i=l}{u.u=o}return u};const x=(t,e)=>{const n={$:0,h:t,t:e,p:null,o:null};{n.l=null}{n.i=null}{n.u=null}return n};const C={};const O=t=>t&&t.h===C;const M={forEach:(t,e)=>t.map(R).forEach(e),map:(t,e)=>t.map(R).map(e).map(I)};const R=t=>({vattrs:t.l,vchildren:t.o,vkey:t.i,vname:t.u,vtag:t.h,vtext:t.t});const I=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return j(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);e.l=t.vattrs;e.o=t.vchildren;e.i=t.vkey;e.u=t.vname;return e};const P=(t,e,n,s)=>{const l=c("hydrateClient",e);const o=t.shadowRoot;const i=[];const f=[];const r=null;const u=s.m=x(e,null);if(!qt.g){E(Ht.body,qt.g=new Map)}t[h]=n;t.removeAttribute(h);T(u,i,f,r,t,t,n);i.map((t=>{const n=t.v+"."+t.k;const s=qt.g.get(n);const l=t.p;if(s&&Vt&&s["s-en"]===""){s.parentNode.insertBefore(l,s.nextSibling)}if(!o){l["s-hn"]=e;if(s){l["s-ol"]=s;l["s-ol"]["s-nr"]=l}}qt.g.delete(n)}));l()};const T=(t,e,n,s,l,o,i)=>{let f;let c;let r;let a;if(o.nodeType===1){f=o.getAttribute(y);if(f){c=f.split(".");if(c[0]===i||c[0]==="0"){r={$:0,v:c[0],k:c[1],S:c[2],j:c[3],h:o.tagName.toLowerCase(),p:o,l:null,o:null,i:null,u:null,t:null};e.push(r);o.removeAttribute(y);if(!t.o){t.o=[]}t.o[r.j]=r;t=r;if(s&&r.S==="0"){s[r.j]=r.p}}}for(a=o.childNodes.length-1;a>=0;a--){T(t,e,n,s,l,o.childNodes[a],i)}if(o.shadowRoot){for(a=o.shadowRoot.childNodes.length-1;a>=0;a--){T(t,e,n,s,l,o.shadowRoot.childNodes[a],i)}}}else if(o.nodeType===8){c=o.nodeValue.split(".");if(c[1]===i||c[1]==="0"){f=c[0];r={$:0,v:c[1],k:c[2],S:c[3],j:c[4],p:o,l:null,o:null,i:null,u:null,h:null,t:null};if(f===$){r.p=o.nextSibling;if(r.p&&r.p.nodeType===3){r.t=r.p.textContent;e.push(r);o.remove();if(!t.o){t.o=[]}t.o[r.j]=r;if(s&&r.S==="0"){s[r.j]=r.p}}}else if(r.v===i){if(f===d){r.h="slot";if(c[5]){o["s-sn"]=r.u=c[5]}else{o["s-sn"]=""}o["s-sr"]=true;n.push(r);if(!t.o){t.o=[]}t.o[r.j]=r}else if(f===u){{l["s-cr"]=o;o["s-cn"]=true}}}}}else if(t&&t.h==="style"){const e=x(null,o.textContent);e.p=o;e.j="0";t.o=[e]}};const E=(t,e)=>{if(t.nodeType===1){let n=0;for(;n<t.childNodes.length;n++){E(t.childNodes[n],e)}if(t.shadowRoot){for(n=0;n<t.shadowRoot.childNodes.length;n++){E(t.shadowRoot.childNodes[n],e)}}}else if(t.nodeType===8){const n=t.nodeValue.split(".");if(n[0]===a){e.set(n[1]+"."+n[2],t);t.nodeValue="";t["s-en"]=n[3]}}};const N=(t,e)=>{if(t!=null&&!k(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const U=t=>Tt(t).C;const L=(t,e,n)=>{const s=qt.ce(e,n);t.dispatchEvent(s);return s};const W=new WeakMap;const A=(t,e,n)=>{let s=Dt.get(t);if(zt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}Dt.set(t,s)};const D=(t,e,n,s)=>{var l;let o=H(e);const i=Dt.get(o);t=t.nodeType===11?t:Ht;if(i){if(typeof i==="string"){t=t.head||t;let e=W.get(t);let n;if(!e){W.set(t,e=new Set)}if(!e.has(o)){if(t.host&&(n=t.querySelector(`[${p}="${o}"]`))){n.innerHTML=i}else{{n=Ht.createElement("style");n.innerHTML=i}const e=(l=qt.O)!==null&&l!==void 0?l:S(Ht);if(e!=null){n.setAttribute("nonce",e)}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(o)}}}else if(!t.adoptedStyleSheets.includes(i)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,i]}}return o};const F=t=>{const e=t.M;const n=t.C;const s=c("attachStyles",e.R);D(n.getRootNode(),e);s()};const H=(t,e)=>"sc-"+t.R;const q=(t,e,n,s,l,o)=>{if(n!==s){let i=Ut(t,e);let f=e.toLowerCase();if(e==="class"){const e=t.classList;const l=_(n);const o=_(s);e.remove(...l.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!l.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!i&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(Ut(Ft,f)){e=f.slice(2)}else{e=f[2]+e.slice(3)}if(n){qt.rel(t,e,n,false)}if(s){qt.ael(t,e,s,false)}}else{const c=k(s);if((i||c&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(e==="list"){i=false}else if(n==null||t[e]!=l){t[e]=l}}else{t[e]=s}}catch(t){}}let r=false;{if(f!==(f=f.replace(/^xlink\:?/,""))){e=f;r=true}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){if(r){t.removeAttributeNS(w,e)}else{t.removeAttribute(e)}}}else if((!i||o&4||l)&&!c){s=s===true?"":s;if(r){t.setAttributeNS(w,e,s)}else{t.setAttribute(e,s)}}}}};const V=/\s/;const _=t=>!t?[]:t.split(V);const z=(t,e,n,s)=>{const l=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.l||b;const i=e.l||b;{for(s in o){if(!(s in i)){q(l,s,o[s],undefined,n,e.$)}}}for(s in i){q(l,s,o[s],i[s],n,e.$)}};const B=(t,l,f,c)=>{const r=l.o[f];let u=0;let a;let d;let $;if(!s){o=true;if(r.h==="slot"){r.$|=r.o?2:1}}if(r.t!==null){a=r.p=Ht.createTextNode(r.t)}else if(r.$&1){a=r.p=Ht.createTextNode("")}else{if(!i){i=r.h==="svg"}a=r.p=Ht.createElementNS(i?g:v,r.$&2?"slot-fb":r.h);if(i&&r.h==="foreignObject"){i=false}{z(null,r,i)}if(r.o){for(u=0;u<r.o.length;++u){d=B(t,r,u);if(d){a.appendChild(d)}}}{if(r.h==="svg"){i=false}else if(a.tagName==="foreignObject"){i=true}}}{a["s-hn"]=n;if(r.$&(2|1)){a["s-sr"]=true;a["s-cr"]=e;a["s-sn"]=r.u||"";$=t&&t.o&&t.o[f];if($&&$.h===r.h&&t.p){G(t.p,false)}}}return a};const G=(t,e)=>{qt.$|=1;const s=t.childNodes;for(let t=s.length-1;t>=0;t--){const l=s[t];if(l["s-hn"]!==n&&l["s-ol"]){Z(l).insertBefore(l,Y(l));l["s-ol"].remove();l["s-ol"]=undefined;o=true}if(e){G(l,e)}}qt.$&=~1};const J=(t,e,n,s,l,o)=>{let i=t["s-cr"]&&t["s-cr"].parentNode||t;let f;for(;l<=o;++l){if(s[l]){f=B(null,n,l);if(f){s[l].p=f;i.insertBefore(f,Y(e))}}}};const K=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;ot(e);if(t){{l=true;if(t["s-ol"]){t["s-ol"].remove()}else{G(t,true)}}t.remove()}}}};const Q=(t,e,n,s)=>{let l=0;let o=0;let i=0;let f=0;let c=e.length-1;let r=e[0];let u=e[c];let a=s.length-1;let d=s[0];let $=s[a];let h;let p;while(l<=c&&o<=a){if(r==null){r=e[++l]}else if(u==null){u=e[--c]}else if(d==null){d=s[++o]}else if($==null){$=s[--a]}else if(X(r,d)){tt(r,d);r=e[++l];d=s[++o]}else if(X(u,$)){tt(u,$);u=e[--c];$=s[--a]}else if(X(r,$)){if(r.h==="slot"||$.h==="slot"){G(r.p.parentNode,false)}tt(r,$);t.insertBefore(r.p,u.p.nextSibling);r=e[++l];$=s[--a]}else if(X(u,d)){if(r.h==="slot"||$.h==="slot"){G(u.p.parentNode,false)}tt(u,d);t.insertBefore(u.p,r.p);u=e[--c];d=s[++o]}else{i=-1;{for(f=l;f<=c;++f){if(e[f]&&e[f].i!==null&&e[f].i===d.i){i=f;break}}}if(i>=0){p=e[i];if(p.h!==d.h){h=B(e&&e[o],n,i)}else{tt(p,d);e[i]=undefined;h=p.p}d=s[++o]}else{h=B(e&&e[o],n,o);d=s[++o]}if(h){{Z(r.p).insertBefore(h,Y(r.p))}}}}if(l>c){J(t,s[a+1]==null?null:s[a+1].p,n,s,o,a)}else if(o>a){K(e,l,c)}};const X=(t,e)=>{if(t.h===e.h){if(t.h==="slot"){return t.u===e.u}{return t.i===e.i}}return false};const Y=t=>t&&t["s-ol"]||t;const Z=t=>(t["s-ol"]?t["s-ol"]:t).parentNode;const tt=(t,e)=>{const n=e.p=t.p;const s=t.o;const l=e.o;const o=e.h;const f=e.t;let c;if(f===null){{i=o==="svg"?true:o==="foreignObject"?false:i}{if(o==="slot");else{z(t,e,i)}}if(s!==null&&l!==null){Q(n,s,e,l)}else if(l!==null){if(t.t!==null){n.textContent=""}J(n,null,e,l,0,l.length-1)}else if(s!==null){K(s,0,s.length-1)}if(i&&o==="svg"){i=false}}else if(c=n["s-cr"]){c.parentNode.textContent=f}else if(t.t!==f){n.data=f}};const et=t=>{const e=t.childNodes;let n;let s;let l;let o;let i;let f;for(s=0,l=e.length;s<l;s++){n=e[s];if(n.nodeType===1){if(n["s-sr"]){i=n["s-sn"];n.hidden=false;for(o=0;o<l;o++){f=e[o].nodeType;if(e[o]["s-hn"]!==n["s-hn"]||i!==""){if(f===1&&i===e[o].getAttribute("slot")){n.hidden=true;break}}else{if(f===1||f===3&&e[o].textContent.trim()!==""){n.hidden=true;break}}}}et(n)}}};const nt=[];const st=t=>{let e;let n;let s;let o;let i;let f;let c=0;const r=t.childNodes;const u=r.length;for(;c<u;c++){e=r[c];if(e["s-sr"]&&(n=e["s-cr"])&&n.parentNode){s=n.parentNode.childNodes;o=e["s-sn"];for(f=s.length-1;f>=0;f--){n=s[f];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==e["s-hn"]){if(lt(n,o)){i=nt.find((t=>t.I===n));l=true;n["s-sn"]=n["s-sn"]||o;if(i){i.P=e}else{nt.push({P:e,I:n})}if(n["s-sr"]){nt.map((t=>{if(lt(t.I,n["s-sn"])){i=nt.find((t=>t.I===n));if(i&&!t.P){t.P=i.P}}}))}}else if(!nt.some((t=>t.I===n))){nt.push({I:n})}}}}if(e.nodeType===1){st(e)}}};const lt=(t,e)=>{if(t.nodeType===1){if(t.getAttribute("slot")===null&&e===""){return true}if(t.getAttribute("slot")===e){return true}return false}if(t["s-sn"]===e){return true}return e===""};const ot=t=>{{t.l&&t.l.ref&&t.l.ref(null);t.o&&t.o.map(ot)}};const it=(t,i)=>{const f=t.C;const c=t.M;const r=t.m||x(null,null);const u=O(i)?i:j(null,null,i);n=f.tagName;if(c.T){u.l=u.l||{};c.T.map((([t,e])=>u.l[e]=f[t]))}u.h=null;u.$|=4;t.m=u;u.p=r.p=f;{e=f["s-cr"];s=(c.$&1)!==0;l=false}tt(r,u);{qt.$|=1;if(o){st(u.p);let t;let e;let n;let s;let l;let o;let i=0;for(;i<nt.length;i++){t=nt[i];e=t.I;if(!e["s-ol"]){n=Ht.createTextNode("");n["s-nr"]=e;e.parentNode.insertBefore(e["s-ol"]=n,e)}}for(i=0;i<nt.length;i++){t=nt[i];e=t.I;if(t.P){s=t.P.parentNode;l=t.P.nextSibling;n=e["s-ol"];while(n=n.previousSibling){o=n["s-nr"];if(o&&o["s-sn"]===e["s-sn"]&&s===o.parentNode){o=o.nextSibling;if(!o||!o["s-nr"]){l=o;break}}}if(!l&&s!==e.parentNode||e.nextSibling!==l){if(e!==l){if(!e["s-hn"]&&e["s-ol"]){e["s-hn"]=e["s-ol"].parentNode.nodeName}s.insertBefore(e,l)}}}else{if(e.nodeType===1){e.hidden=true}}}}if(l){et(u.p)}qt.$&=~1;nt.length=0}};const ft=(t,e)=>{if(e&&!t.N&&e["s-p"]){e["s-p"].push(new Promise((e=>t.N=e)))}};const ct=(t,e)=>{{t.$|=16}if(t.$&4){t.$|=512;return}ft(t,t.U);const n=()=>rt(t,e);return Yt(n)};const rt=(t,e)=>{const n=c("scheduleUpdate",t.M.R);const s=t.L;let l;if(e){{t.$|=256;if(t.W){t.W.map((([t,e])=>yt(s,t,e)));t.W=undefined}}}{l=ut(l,(()=>yt(s,"componentWillRender")))}n();return ut(l,(()=>dt(t,s,e)))};const ut=(t,e)=>at(t)?t.then(e):e();const at=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const dt=async(t,e,n)=>{var s;const l=t.C;const o=c("update",t.M.R);const i=l["s-rc"];if(n){F(t)}const f=c("render",t.M.R);{$t(t,e)}if(i){i.map((t=>t()));l["s-rc"]=undefined}f();o();{const e=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>ht(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.$|=4;e.length=0}}};const $t=(t,e,n)=>{try{e=e.render();{t.$&=~16}{t.$|=2}{{{it(t,e)}}}}catch(e){Lt(e,t.C)}return null};const ht=t=>{const e=t.M.R;const n=t.C;const s=c("postUpdate",e);const l=t.L;const o=t.U;{yt(l,"componentDidRender")}if(!(t.$&64)){t.$|=64;{mt(n)}{yt(l,"componentDidLoad")}s();{t.A(n);if(!o){pt()}}}else{s()}{if(t.N){t.N();t.N=undefined}if(t.$&512){Xt((()=>ct(t,false)))}t.$&=~(4|512)}};const pt=e=>{{mt(Ht.documentElement)}Xt((()=>L(Ft,"appload",{detail:{namespace:t}})))};const yt=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){Lt(t)}}return undefined};const mt=t=>t.classList.add("hydrated");const wt=(t,e)=>Tt(t).D.get(e);const bt=(t,e,n,s)=>{const l=Tt(t);const o=l.C;const i=l.D.get(e);const f=l.$;const c=l.L;n=N(n,s.F[e][0]);const r=Number.isNaN(i)&&Number.isNaN(n);const u=n!==i&&!r;if((!(f&8)||i===undefined)&&u){l.D.set(e,n);if(c){if(s.H&&f&128){const t=s.H[e];if(t){t.map((t=>{try{c[t](n,i,e)}catch(t){Lt(t,o)}}))}}if((f&(2|16))===2){ct(l,false)}}}};const gt=(t,e,n)=>{if(e.F){if(t.watchers){e.H=t.watchers}const s=Object.entries(e.F);const l=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,t,{get(){return wt(this,t)},set(n){bt(this,t,n,e)},configurable:true,enumerable:true})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(t,e,s){qt.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(l.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}this[e]=s===null&&typeof this[e]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,s])=>{const l=s[1]||t;n.set(l,t);if(s[0]&512){e.T.push([t,l])}return l}))}}return t};const vt=async(t,e,n,s,l)=>{if((e.$&32)===0){e.$|=32;{l=At(n);if(l.then){const t=r();l=await l;t()}if(!l.isProxied){{n.H=l.watchers}gt(l,n,2);l.isProxied=true}const t=c("createInstance",n.R);{e.$|=8}try{new l(e)}catch(t){Lt(t)}{e.$&=~8}{e.$|=128}t();kt(e.L)}if(l.style){let t=l.style;const e=H(n);if(!Dt.has(e)){const s=c("registerStyles",n.R);A(e,t,!!(n.$&1));s()}}}const o=e.U;const i=()=>ct(e,true);if(o&&o["s-rc"]){o["s-rc"].push(i)}else{i()}};const kt=t=>{{yt(t,"connectedCallback")}};const St=t=>{if((qt.$&1)===0){const e=Tt(t);const n=e.M;const s=c("connectedCallback",n.R);if(!(e.$&1)){e.$|=1;let s;{s=t.getAttribute(h);if(s){P(t,n.R,s,e)}}if(!s){if(n.$&(4|8)){jt(t)}}{let n=t;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){ft(e,e.U=n);break}}}if(n.F){Object.entries(n.F).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{vt(t,e,n)}}else{Ot(t,e,n.q);kt(e.L)}s()}};const jt=t=>{const e=t["s-cr"]=Ht.createComment("");e["s-cn"]=true;t.insertBefore(e,t.firstChild)};const xt=t=>{if((qt.$&1)===0){const e=Tt(t);const n=e.L;{if(e.V){e.V.map((t=>t()));e.V=undefined}}{yt(n,"disconnectedCallback")}}};const Ct=(t,e={})=>{var n;const s=c();const l=[];const o=e.exclude||[];const i=Ft.customElements;const f=Ht.head;const r=f.querySelector("meta[charset]");const u=Ht.createElement("style");const a=[];let d;let $=true;Object.assign(qt,e);qt._=new URL(e.resourcesUrl||"./",Ht.baseURI).href;{qt.$|=2}t.map((t=>{t[1].map((e=>{const n={$:e[0],R:e[1],F:e[2],q:e[3]};{n.F=e[2]}{n.q=e[3]}{n.T=[]}{n.H={}}const s=n.R;const f=class extends HTMLElement{constructor(t){super(t);t=this;Nt(t,n)}connectedCallback(){if(d){clearTimeout(d);d=null}if($){a.push(this)}else{qt.jmp((()=>St(this)))}}disconnectedCallback(){qt.jmp((()=>xt(this)))}componentOnReady(){return Tt(this).B}};n.G=t[0];if(!o.includes(s)&&!i.get(s)){l.push(s);i.define(s,gt(f,n,1))}}))}));{u.innerHTML=l+m;u.setAttribute("data-styles","");const t=(n=qt.O)!==null&&n!==void 0?n:S(Ht);if(t!=null){u.setAttribute("nonce",t)}f.insertBefore(u,r?r.nextSibling:f.firstChild)}$=false;if(a.length){a.map((t=>t.connectedCallback()))}else{{qt.jmp((()=>d=setTimeout(pt,30)))}}s()};const Ot=(t,e,n,s)=>{if(n){n.map((([n,s,l])=>{const o=t;const i=Mt(e,l);const f=Rt(n);qt.ael(o,s,i,f);(e.V=e.V||[]).push((()=>qt.rel(o,s,i,f)))}))}};const Mt=(t,e)=>n=>{try{{if(t.$&256){t.L[e](n)}else{(t.W=t.W||[]).push([e,n])}}}catch(t){Lt(t)}};const Rt=t=>(t&2)!==0;const It=t=>qt.O=t;const Pt=new WeakMap;const Tt=t=>Pt.get(t);const Et=(t,e)=>Pt.set(e.L=t,e);const Nt=(t,e)=>{const n={$:0,C:t,M:e,D:new Map};{n.B=new Promise((t=>n.A=t));t["s-p"]=[];t["s-rc"]=[]}Ot(t,n,e.q);return Pt.set(t,n)};const Ut=(t,e)=>e in t;const Lt=(t,e)=>(0,console.error)(t,e);const Wt=new Map;const At=(t,e,n)=>{const s=t.R.replace(/-/g,"_");const l=t.G;const o=Wt.get(l);if(o){return o[s]} /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import( /* @vite-ignore */ `./${l}.entry.js${""}`).then((t=>{{Wt.set(l,t)}return t[s]}),Lt)};const Dt=new Map;const Ft=typeof window!=="undefined"?window:{};const Ht=Ft.document||{head:{}};const qt={$:0,_:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Vt=true;const _t=t=>Promise.resolve(t);const zt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Bt=[];const Gt=[];const Jt=(t,e)=>n=>{t.push(n);if(!f){f=true;if(e&&qt.$&4){Xt(Qt)}else{qt.raf(Qt)}}};const Kt=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){Lt(t)}}t.length=0};const Qt=()=>{Kt(Bt);{Kt(Gt);if(f=Bt.length>0){qt.raf(Qt)}}};const Xt=t=>_t().then(t);const Yt=Jt(Gt,true);export{C as H,Ct as b,U as g,j as h,_t as p,Et as r,It as s}; //# sourceMappingURL=p-558dbf94.js.map