@everymatrix/casino-tournament-prizes 1.54.12 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-tournament-prizes/casino-tournament-prizes.esm.js +1 -1
- package/dist/casino-tournament-prizes/p-05dcfba0.js +2 -0
- package/dist/casino-tournament-prizes/p-107abf52.entry.js +1 -0
- package/dist/cjs/casino-tournament-prizes.cjs.entry.js +6 -1
- package/dist/cjs/casino-tournament-prizes.cjs.js +2 -2
- package/dist/cjs/{index-0c084c74.js → index-af94fbb3.js} +70 -173
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.js +5 -18
- package/dist/esm/casino-tournament-prizes.entry.js +6 -1
- package/dist/esm/casino-tournament-prizes.js +3 -3
- package/dist/esm/{index-30effb08.js → index-db720582.js} +70 -173
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/packages/stencil/casino-tournament-prizes/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/packages/stencil/casino-tournament-prizes/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-tournament-prizes/p-dea4ad64.entry.js +0 -1
- package/dist/casino-tournament-prizes/p-e83ebab2.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/packages/stencil/casino-tournament-prizes/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/packages/stencil/casino-tournament-prizes/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-05dcfba0.js";export{s as setNonce}from"./p-05dcfba0.js";import{g as t}from"./p-e1255160.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((async e=>(await t(),n([["p-107abf52",[[1,"casino-tournament-prizes",{language:[1],useGroup:[4,"use-group"],useEvent:[4,"use-event"],endpoint:[1],session:[1],rawPrizes:[1,"raw-prizes"],tournamentId:[1,"tournament-id"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],limitStylingAppends:[32],prizes:[32],prizeGroups:[32],initialLoad:[32]},[[10,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]],e))));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>(0,console.error)(e,t),s=new Map,r=new Map,i="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,d=[],m=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.l?$(v):a.raf(v))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){o(e)}e.length=0},v=()=>{w(d),w(m),(p=d.length>0)&&a.raf(v)},$=e=>f().then(e),b=y(m,!0),g={},S=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return k(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!S(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),D={},H=e=>n(e).$hostElement$,R=new WeakMap,T=e=>"sc-"+e.$,L=(e,t,n,l,o,s)=>{if(n!==l){let r=((e,t)=>t in e)(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,o=U(n),s=U(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else{const i=S(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},N=/\s/,U=e=>e?e.split(N):[],W=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||g,s=t.u||g;for(const e of F(Object.keys(o)))e in s||L(l,e,o[e],void 0,n,t.l);for(const e of F(Object.keys(s)))L(l,e,o[e],s[e],n,t.l)};function F(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var q=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=u.createTextNode(l.i);else{if(q||(q="svg"===l.m),o=l.v=u.createElementNS(q?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),q&&"foreignObject"===l.m&&(q=!1),W(null,l,q),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);"svg"===l.m?q=!1:"foreignObject"===o.tagName&&(q=!0)}return o["s-hn"]=C,o},G=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===C&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].v=r,I(i,r,t)))},V=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;e&&e.remove()}}},_=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),B=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(W(e,t,q="svg"===r||"foreignObject"!==r&&q),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],d=l.length-1,m=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--d];else if(_(h,m,o))B(h,m,o),h=t[++i],m=l[++c];else if(_(p,y,o))B(p,y,o),p=t[--f],y=l[--d];else if(_(h,y,o))B(h,y,o),I(e,h.v,p.v.nextSibling),h=t[++i],y=l[--d];else if(_(p,m,o))B(p,m,o),I(e,p.v,h.v),p=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=z(t&&t[c],n,u):(B(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=z(t&&t[c],n,c),m=l[++c]),s&&I(h.v.parentNode,s,h.v)}i>f?G(e,null==l[d+1]?null:l[d+1].v,n,l,c,d):c>d&&V(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),G(l,null,t,s,0,s.length-1)):!n&&null!==o&&V(o,0,o.length-1),q&&"svg"===r&&(q=!1)):e.i!==i&&(l.data=i)},I=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),J=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},K=(e,t)=>{if(e.l|=16,!(4&e.l))return J(e,e.j),b((()=>Q(e,t)));e.l|=512},Q=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$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 l;return t&&(e.l|=256,e.O&&(e.O.map((([e,t])=>le(n,e,t))),e.O=void 0),l=le(n,"componentWillLoad")),X(l,(()=>Z(e,n,t)))},X=(e,t)=>Y(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),Y=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,Z=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=T(t),o=r.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,r=R.get(e=e.head||e);if(r||R.set(e,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const l=null!=(n=a.C)?n:j(u);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(h){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=i),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ee(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>te(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ee=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.M||A(null,null),r=(e=>e&&e.m===D)(t)?t:P(null,null,t);if(C=l.tagName,n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.v=s.v=l.shadowRoot||l,B(s,r,n)})(e,t,l)}catch(t){o(t,e.$hostElement$)}return null},te=e=>{const t=e.$hostElement$,n=e.j;le(e.t,"componentDidRender"),64&e.l||(e.l|=64,oe(t),e.P(t),n||ne()),e.S&&(e.S(),e.S=void 0),512&e.l&&$((()=>K(e,!1))),e.l&=-517},ne=()=>{oe(u.documentElement),$((()=>(e=>{const t=a.ce("appload",{detail:{namespace:"casino-tournament-prizes"}});return e.dispatchEvent(t),t})(c)))},le=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){o(e)}},oe=e=>e.classList.add("hydrated"),se=(e,t,l)=>{var o,s;const r=e.prototype;if(t.A){const i=Object.entries(null!=(o=t.A)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).D.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${o.$}" 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 r=s.D.get(t),i=s.l,c=s.t;l=((e,t)=>null==e||S(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.A[t][0]),8&i&&void 0!==r||l===r||Number.isNaN(r)&&Number.isNaN(l)||(s.D.set(t,l),c&&2==(18&i)&&K(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.H)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.H)?s:{}),...i.filter((([e,t])=>15&t[0])).map((([e,t])=>{const n=t[1]||e;return l.set(n,e),n}))]))}}return e},re=(e,l={})=>{var f;const p=[],d=l.exclude||[],m=c.customElements,y=u.head,w=y.querySelector("meta[charset]"),v=u.createElement("style"),$=[];let b,g=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{const i={l:l[0],$:l[1],A:l[2],R:l[3]};4&i.l&&(S=!0),i.A=l[2],i.R=l[3];const c=i.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,D:new Map};l.T=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,i),1&i.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ie(this,e,i.R)),b&&(clearTimeout(b),b=null),g?$.push(this):a.jmp((()=>(e=>{if(!(1&a.l)){const t=n(e),l=t.k,i=()=>{};if(1&t.l)ie(e,t,l.R),(null==t?void 0:t.t)||(null==t?void 0:t.T)&&t.T.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(t,t.j=n);break}}l.A&&Object.entries(l.A).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.L){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.L;if(!n)return;const l=s.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),o)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.N}" was not found`);l.isProxied||(se(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(e){o(e)}t.l&=-9,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=T(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);h&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const i=t.j,c=()=>K(t,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(e,t,l)}i()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.l)){const e=n(this);e.U&&(e.U.map((e=>e())),e.U=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}))}})()))}componentOnReady(){return n(this).T}};i.L=e[0],d.includes(c)||m.get(c)||(p.push(c),m.define(c,se(u,i,1)))}))})),p.length>0&&(S&&(v.textContent+=i),v.textContent+=p.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(f=a.C)?f:j(u);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,w?w.nextSibling:y.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):a.jmp((()=>b=setTimeout(ne,30)))},ie=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=ue(e,n),r=ce(t,o),i=ae(n);a.ael(s,l,r,i),(t.U=t.U||[]).push((()=>a.rel(s,l,r,i)))}))},ce=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.O=e.O||[]).push([t,n])}catch(e){o(e)}},ue=(e,t)=>8&t?c:e,ae=e=>({passive:!!(1&e),capture:!!(2&e)}),fe=e=>a.C=e;export{re as b,H as g,P as h,f as p,l as r,fe as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,g as s}from"./p-05dcfba0.js";const t={en:{prizes:"Prizes",noprizes:"No available prizes",place:"place"},"zh-hk":{prizes:"獎品",noprizes:"沒有可用的獎品",place:"place"},fr:{prizes:"Prix",noprizes:"Aucun prix disponible",place:"place"},ro:{prizes:"Premii",noprizes:"Nu sunt disponibile premii",place:"poziție"},tr:{prizes:"Ödüller",noprizes:"Geçerli ödül yok",place:"Sıra"},el:{prizes:"Έπαθλα",noprizes:"Μη διαθέσιμα έπαθλα",place:"θέση"},es:{prizes:"Premios",noprizes:"No hay premios disponibles",place:"posición"},hu:{prizes:"Nyeremények",noprizes:"Nincs elérhető nyeremény",place:"helyezés"},pt:{prizes:"Prêmios",noprizes:"Não há prêmios disponíveis",place:"place"},hr:{prizes:"Nagrade",noprizes:"Nema dostupnih nagrada",place:"mjesto"}},a=(e,i)=>{var s,a;return(null===(s=t[i])||void 0===s?void 0:s[e])||(null===(a=t.en)||void 0===a?void 0:a[e])},r=class{constructor(i){e(this,i),this.language=void 0,this.useGroup=!1,this.useEvent=!1,this.endpoint=void 0,this.session=void 0,this.rawPrizes=void 0,this.tournamentId=void 0,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.prizes=[],this.prizeGroups=[],this.initialLoad=!1}infoCompletedHandler(e){e.detail&&(this.prizes=e.detail.prizes,this.formatGroup(),this.initialLoad=!0)}formatGroup(){this.prizes.forEach((e=>{let i=[];if(e.count>0)for(let s=0;s<e.count;s++)i.push({name:e.name,rank:e.rank+s});this.prizeGroups.push(i)}))}getTournamentInfo(){let e=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),i=new Headers;e.searchParams.append("expand","games"),e.searchParams.append("language",this.language),e.searchParams.append("fields","playerEnrolled,games(id,name,thumbnail)"),this.session&&i.append("X-SessionId",this.session),fetch(e.href,{method:"GET",headers:i}).then((e=>e.json())).then((e=>{this.prizes=e.item.prizes,this.useGroup&&this.formatGroup(),this.initialLoad=!0}))}componentWillLoad(){!this.useEvent&&this.rawPrizes&&(this.prizes=JSON.parse(this.rawPrizes),this.useGroup&&this.formatGroup(),this.initialLoad=!0),!this.useEvent&&this.endpoint&&this.tournamentId&&this.getTournamentInfo()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const e=new CSSStyleSheet;e.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,e]}setClientStylingURL(){let e=new URL(this.clientStylingUrl);fetch(e.href).then((e=>e.text())).then((e=>{const i=new CSSStyleSheet;i.replace(e),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{key:"6f6d6a40e0374ad146b0eda343d963679fbd11f0",class:"TournamentPrizes "+(this.useGroup?"":"PrizeView")},this.initialLoad&&!this.useGroup&&i("div",{key:"28edb876913c67479b4fb5c885244cea36a073ea",class:"PrizeTitle"},i("svg",{key:"6cd86bf5db8eacee01a9577458c136cbe78684bc",class:"PrizeIcon",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"27.454",viewBox:"0 0 30 27.454"},i("path",{key:"744e27a1ee73240f5876abd14b2e912b8dbc979e",d:"M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z",transform:"translate(-5.999 -9.76)"})),i("div",{key:"ddd4dd055f8441b1b0355e95e88b43049a108b2c",class:"Title"},a("prizes",this.language))),this.initialLoad&&this.useGroup&&i("div",{key:"83b846fe441de36598d01742fd6730de4c5920bf",class:"GroupPrizeTitle"},i("svg",{key:"e6b379df8cc991173b588e8dd9408b0c6716de7a",class:"PrizeIcon",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"16",viewBox:"0 0 19 16",fill:"none"},i("g",{key:"0332923cca76d7ccbe779cb367abb4e8952842b5","clip-path":"url(#clip0_2459_42455)"},i("path",{key:"607a3379976189ca332117ec968c34046b3dcb46",d:"M14.7476 2.84132V0.664551H4.03327V2.84132H0.818359V5.01946C0.818359 6.8229 2.2568 8.28496 4.0326 8.28496C4.36862 8.28496 4.69326 8.23192 4.99647 8.13399C5.76958 9.25604 6.94898 10.07 8.31782 10.3516V13.7266H7.24685C6.06276 13.7266 5.1029 14.701 5.1029 15.9026H13.6753C13.6753 14.7004 12.7168 13.7266 11.5327 13.7266H10.4611V10.3516C11.8293 10.07 13.0087 9.25672 13.7818 8.13399C14.0863 8.23124 14.4116 8.28496 14.7463 8.28496C16.5214 8.28496 17.9612 6.8229 17.9612 5.01946V2.84132H14.7476ZM4.03327 6.99222C2.9623 6.99222 2.0908 6.10751 2.0908 5.01946V3.93005H4.03327V5.01946C4.03327 5.70221 4.15844 6.3564 4.38401 6.9589C4.27089 6.9793 4.15175 6.99086 4.03327 6.99086V6.99222ZM11.0207 5.88989L12.0414 9.06223L9.38945 7.09355L6.7368 9.06223L7.75757 5.88989L5.09688 3.93481L8.3814 3.94229L9.38945 0.767235L10.3968 3.94229L13.6814 3.93481L11.0207 5.88989ZM16.6901 5.01946C16.6901 6.10683 15.8193 6.99222 14.7483 6.99222C14.6285 6.99222 14.512 6.9793 14.3982 6.95958C14.6245 6.3564 14.7483 5.70357 14.7483 5.02014V3.93073H16.6901V5.02014V5.01946Z",fill:"white"})),i("defs",{key:"66f11be400aac05c7f334a48b82cfb1aabdead8c"},i("clipPath",{key:"65e879523cff89288af691d5f705ef55996f3107",id:"clip0_2459_42455"},i("rect",{key:"382441f3ade90fa866096c5f25dfc3cb49d82132",width:"18.2857",height:"16",fill:"white",transform:"translate(0.5)"})))),i("div",{key:"8610b8361faa0d2316415e39a21162dfcdcaeccf",class:"Title"},a("prizes",this.language))),i("div",{key:"76d9452769046d3c9cd4d0dd7a65396c5083ebc6",class:"PrizeGroups"},1==this.useGroup&&this.prizeGroups&&this.prizeGroups.map(((e,s)=>i("div",{class:`PrizeGroup Group${s+1}`},e&&e.map(((e,s)=>i("div",{class:"PrizeRow"},i("div",{class:`PrizeItem Rank${s+1}`},i("span",{class:"PrizeRank"},e.rank," ",a("place",this.language)," "),i("span",{class:"PrizeName"},e.name)))))))),0==this.useGroup&&this.prizes&&this.prizes.map(((e,s)=>i("div",{class:`Prize Prize${s}`},i("p",{class:"PrizeText"},i("span",{class:"PrizeRank"},e.count>1?`${e.rank}~${e.rank+e.count-1}`:e.rank)," ",a("place",this.language),": ",e.name)))),!this.prizes&&i("p",{key:"2df9ce5a0f56928a550f0ebf3de962835df0d6f2"},a("noprizes",this.language))))}get host(){return s(this)}};r.style=":host{display:block}.PrizeGroups{color:var(--emw--color-white, #FFFFFF);display:flex;gap:20px;font-size:14px}.PrizeGroup{flex:1;background:var(--emw--tournament-color-bg, #153a5c)}.PrizeTitle{text-align:center;width:100%}.GroupPrizeTitle{width:100%;display:flex;padding:8px 6px;gap:8px;justify-content:center}.PrizeView{display:flex;gap:10px;font-size:12px}.PrizeView .PrizeTitle{display:inline-block;width:auto}.PrizeView .PrizeGroups{display:inline-flex}.Title{text-align:center;color:var(--emw--color-white, #FFFFFF)}.PrizeIcon path{fill:var(--emw--color-white, #FFFFFF)}.PrizeRow{padding:8px;border-bottom:1px solid rgba(206, 210, 214, 0.15)}.PrizeItem{display:flex;justify-content:space-between;padding:6px;font-size:12px;border-radius:2px}.Group1 .Rank1{background:#7e6c22}.Group1 .Rank2{background:#666}.Group1 .Rank3{background:#6a5446}.Prizes{padding-left:20px;flex-wrap:wrap;display:flex;gap:20px;width:100%;min-height:50px;padding-top:8px}.Prize{flex-grow:1;color:var(--emw--color-gray-300, #58586B)}.Prize.Prize0 span{color:#FECF00}.Prize.Prize1 span{color:#D9B206}.Prize.Prize2 span{color:#9B8007}.Prize p{color:var(--emw--color-white, #FFFFFF)}";export{r as casino_tournament_prizes}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-af94fbb3.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const TRANSLATIONS = {
|
|
@@ -69,8 +69,13 @@ const CasinoTournamentPrizesStyle0 = casinoTournamentPrizesCss;
|
|
|
69
69
|
const CasinoTournamentPrizes = class {
|
|
70
70
|
constructor(hostRef) {
|
|
71
71
|
index.registerInstance(this, hostRef);
|
|
72
|
+
this.language = undefined;
|
|
72
73
|
this.useGroup = false;
|
|
73
74
|
this.useEvent = false;
|
|
75
|
+
this.endpoint = undefined;
|
|
76
|
+
this.session = undefined;
|
|
77
|
+
this.rawPrizes = undefined;
|
|
78
|
+
this.tournamentId = undefined;
|
|
74
79
|
this.clientStyling = '';
|
|
75
80
|
this.clientStylingUrl = '';
|
|
76
81
|
this.limitStylingAppends = false;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-af94fbb3.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-tournament-prizes.cjs.js', document.baseURI).href));
|
|
@@ -21,27 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-tournament-prizes';
|
|
24
|
-
const BUILD = /* casino-tournament-prizes */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, 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: false, mode: false,
|
|
24
|
+
const BUILD = /* casino-tournament-prizes */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, 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: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/utils/constants.ts
|
|
36
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
-
|
|
39
|
-
// src/client/client-host-ref.ts
|
|
40
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
41
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
42
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
43
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
45
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
46
38
|
const hostRef = {
|
|
47
39
|
$flags$: 0,
|
|
@@ -54,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
54
46
|
hostElement["s-p"] = [];
|
|
55
47
|
hostElement["s-rc"] = [];
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
59
50
|
};
|
|
60
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
61
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -92,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
92
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
93
84
|
/* webpackMode: "lazy" */
|
|
94
85
|
`./${bundleId}.entry.js${""}`
|
|
95
|
-
)); }).then(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cmpModules.set(bundleId, importedModule);
|
|
99
|
-
}
|
|
100
|
-
return importedModule[exportName];
|
|
101
|
-
},
|
|
102
|
-
(e) => {
|
|
103
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
104
89
|
}
|
|
105
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
106
92
|
};
|
|
107
93
|
|
|
108
94
|
// src/client/client-style.ts
|
|
109
95
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
111
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -181,6 +166,14 @@ var flush = () => {
|
|
|
181
166
|
};
|
|
182
167
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
183
168
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
169
|
+
|
|
170
|
+
// src/utils/constants.ts
|
|
171
|
+
var EMPTY_OBJ = {};
|
|
172
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
173
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
174
|
+
|
|
175
|
+
// src/utils/helpers.ts
|
|
176
|
+
var isDef = (v) => v != null;
|
|
184
177
|
var isComplexType = (o) => {
|
|
185
178
|
o = typeof o;
|
|
186
179
|
return o === "object" || o === "function";
|
|
@@ -366,7 +359,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
366
359
|
}
|
|
367
360
|
if (!appliedStyles.has(scopeId2)) {
|
|
368
361
|
{
|
|
369
|
-
styleElm =
|
|
362
|
+
styleElm = doc.createElement("style");
|
|
370
363
|
styleElm.innerHTML = style;
|
|
371
364
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
372
365
|
if (nonce != null) {
|
|
@@ -376,10 +369,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
376
369
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
377
370
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
378
371
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
379
|
-
styleContainerNode.insertBefore(
|
|
380
|
-
styleElm,
|
|
381
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
382
|
-
);
|
|
372
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
383
373
|
} else if ("host" in styleContainerNode) {
|
|
384
374
|
if (supportsConstructableStylesheets) {
|
|
385
375
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -397,7 +387,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
397
387
|
styleContainerNode.append(styleElm);
|
|
398
388
|
}
|
|
399
389
|
}
|
|
400
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
390
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
401
391
|
styleContainerNode.insertBefore(styleElm, null);
|
|
402
392
|
}
|
|
403
393
|
}
|
|
@@ -422,25 +412,23 @@ var attachStyles = (hostRef) => {
|
|
|
422
412
|
const scopeId2 = addStyle(
|
|
423
413
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
424
414
|
cmpMeta);
|
|
425
|
-
if (
|
|
415
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
426
416
|
elm["s-sc"] = scopeId2;
|
|
427
417
|
elm.classList.add(scopeId2 + "-h");
|
|
428
418
|
}
|
|
429
419
|
endAttachStyles();
|
|
430
420
|
};
|
|
431
421
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
432
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
422
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
433
423
|
if (oldValue !== newValue) {
|
|
434
424
|
let isProp = isMemberInElement(elm, memberName);
|
|
435
425
|
memberName.toLowerCase();
|
|
436
426
|
if (memberName === "class") {
|
|
437
427
|
const classList = elm.classList;
|
|
438
428
|
const oldClasses = parseClassList(oldValue);
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
443
|
-
}
|
|
429
|
+
const newClasses = parseClassList(newValue);
|
|
430
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
431
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
444
432
|
} else if (memberName === "key") ; else {
|
|
445
433
|
const isComplex = isComplexType(newValue);
|
|
446
434
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -456,7 +444,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
456
444
|
elm.setAttribute(memberName, n);
|
|
457
445
|
}
|
|
458
446
|
}
|
|
459
|
-
} else
|
|
447
|
+
} else {
|
|
460
448
|
elm[memberName] = newValue;
|
|
461
449
|
}
|
|
462
450
|
} catch (e) {
|
|
@@ -478,42 +466,22 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
478
466
|
}
|
|
479
467
|
};
|
|
480
468
|
var parseClassListRegex = /\s/;
|
|
481
|
-
var parseClassList = (value) =>
|
|
482
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
483
|
-
value = value.baseVal;
|
|
484
|
-
}
|
|
485
|
-
if (!value || typeof value !== "string") {
|
|
486
|
-
return [];
|
|
487
|
-
}
|
|
488
|
-
return value.split(parseClassListRegex);
|
|
489
|
-
};
|
|
469
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
490
470
|
|
|
491
471
|
// src/runtime/vdom/update-element.ts
|
|
492
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
472
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
493
473
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
494
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
495
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
474
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
475
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
496
476
|
{
|
|
497
477
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
498
478
|
if (!(memberName in newVnodeAttrs)) {
|
|
499
|
-
setAccessor(
|
|
500
|
-
elm,
|
|
501
|
-
memberName,
|
|
502
|
-
oldVnodeAttrs[memberName],
|
|
503
|
-
void 0,
|
|
504
|
-
isSvgMode2,
|
|
505
|
-
newVnode.$flags$);
|
|
479
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
506
480
|
}
|
|
507
481
|
}
|
|
508
482
|
}
|
|
509
483
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
510
|
-
setAccessor(
|
|
511
|
-
elm,
|
|
512
|
-
memberName,
|
|
513
|
-
oldVnodeAttrs[memberName],
|
|
514
|
-
newVnodeAttrs[memberName],
|
|
515
|
-
isSvgMode2,
|
|
516
|
-
newVnode.$flags$);
|
|
484
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
517
485
|
}
|
|
518
486
|
};
|
|
519
487
|
function sortedAttrNames(attrNames) {
|
|
@@ -525,10 +493,13 @@ function sortedAttrNames(attrNames) {
|
|
|
525
493
|
attrNames
|
|
526
494
|
);
|
|
527
495
|
}
|
|
496
|
+
|
|
497
|
+
// src/runtime/vdom/vdom-render.ts
|
|
498
|
+
var scopeId;
|
|
528
499
|
var hostTagName;
|
|
529
500
|
var useNativeShadowDom = false;
|
|
530
501
|
var isSvgMode = false;
|
|
531
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
502
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
532
503
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
533
504
|
let i2 = 0;
|
|
534
505
|
let elm;
|
|
@@ -549,6 +520,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
549
520
|
{
|
|
550
521
|
updateElement(null, newVNode2, isSvgMode);
|
|
551
522
|
}
|
|
523
|
+
const rootNode = elm.getRootNode();
|
|
524
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
525
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
526
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
527
|
+
}
|
|
552
528
|
if (newVNode2.$children$) {
|
|
553
529
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
554
530
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -684,9 +660,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
684
660
|
if (!isInitialRender) {
|
|
685
661
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
686
662
|
}
|
|
687
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
688
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
689
|
-
}
|
|
690
663
|
return true;
|
|
691
664
|
}
|
|
692
665
|
return false;
|
|
@@ -727,9 +700,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
727
700
|
}
|
|
728
701
|
};
|
|
729
702
|
var insertBefore = (parent, newNode, reference) => {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
}
|
|
703
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
704
|
+
return inserted;
|
|
733
705
|
};
|
|
734
706
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
735
707
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -748,21 +720,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
748
720
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
749
721
|
hostRef.$vnode$ = rootVnode;
|
|
750
722
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
751
|
-
|
|
723
|
+
{
|
|
724
|
+
scopeId = hostElm["s-sc"];
|
|
725
|
+
}
|
|
726
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
752
727
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
753
728
|
};
|
|
754
729
|
|
|
755
730
|
// src/runtime/update-component.ts
|
|
756
731
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
757
732
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
758
|
-
|
|
759
|
-
new Promise(
|
|
760
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
761
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
762
|
-
r();
|
|
763
|
-
}
|
|
764
|
-
)
|
|
765
|
-
);
|
|
733
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
766
734
|
}
|
|
767
735
|
};
|
|
768
736
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -791,12 +759,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
791
759
|
{
|
|
792
760
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
793
761
|
if (hostRef.$queuedListeners$) {
|
|
794
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
762
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
795
763
|
hostRef.$queuedListeners$ = void 0;
|
|
796
764
|
}
|
|
797
765
|
}
|
|
798
766
|
{
|
|
799
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
767
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
800
768
|
}
|
|
801
769
|
}
|
|
802
770
|
endSchedule();
|
|
@@ -865,7 +833,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
865
833
|
const instance = hostRef.$lazyInstance$ ;
|
|
866
834
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
867
835
|
{
|
|
868
|
-
safeCall(instance, "componentDidRender"
|
|
836
|
+
safeCall(instance, "componentDidRender");
|
|
869
837
|
}
|
|
870
838
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
871
839
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -894,14 +862,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
894
862
|
}
|
|
895
863
|
};
|
|
896
864
|
var appDidLoad = (who) => {
|
|
865
|
+
{
|
|
866
|
+
addHydratedFlag(doc.documentElement);
|
|
867
|
+
}
|
|
897
868
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
898
869
|
};
|
|
899
|
-
var safeCall = (instance, method, arg
|
|
870
|
+
var safeCall = (instance, method, arg) => {
|
|
900
871
|
if (instance && instance[method]) {
|
|
901
872
|
try {
|
|
902
873
|
return instance[method](arg);
|
|
903
874
|
} catch (e) {
|
|
904
|
-
consoleError(e
|
|
875
|
+
consoleError(e);
|
|
905
876
|
}
|
|
906
877
|
}
|
|
907
878
|
return void 0;
|
|
@@ -944,68 +915,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
944
915
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
945
916
|
members.map(([memberName, [memberFlags]]) => {
|
|
946
917
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
947
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
948
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
949
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
950
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
951
|
-
Object.defineProperty(prototype, memberName, {
|
|
952
|
-
get() {
|
|
953
|
-
{
|
|
954
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
955
|
-
return getValue(this, memberName);
|
|
956
|
-
}
|
|
957
|
-
const ref = getHostRef(this);
|
|
958
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
959
|
-
if (!instance) return;
|
|
960
|
-
return instance[memberName];
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
configurable: true,
|
|
964
|
-
enumerable: true
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
918
|
Object.defineProperty(prototype, memberName, {
|
|
919
|
+
get() {
|
|
920
|
+
return getValue(this, memberName);
|
|
921
|
+
},
|
|
968
922
|
set(newValue) {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
974
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
975
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
976
|
-
}
|
|
977
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
978
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
979
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
{
|
|
983
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
984
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
985
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
986
|
-
ref.$onReadyPromise$.then(() => {
|
|
987
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
988
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
const setterSetVal = () => {
|
|
995
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
996
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
997
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
998
|
-
}
|
|
999
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1000
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1001
|
-
};
|
|
1002
|
-
if (ref.$lazyInstance$) {
|
|
1003
|
-
setterSetVal();
|
|
1004
|
-
} else {
|
|
1005
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
923
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
924
|
+
},
|
|
925
|
+
configurable: true,
|
|
926
|
+
enumerable: true
|
|
1009
927
|
});
|
|
1010
928
|
}
|
|
1011
929
|
});
|
|
@@ -1015,7 +933,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1015
933
|
plt.jmp(() => {
|
|
1016
934
|
var _a2;
|
|
1017
935
|
const propName = attrNameToPropName.get(attrName);
|
|
1018
|
-
if (this.hasOwnProperty(propName)
|
|
936
|
+
if (this.hasOwnProperty(propName)) {
|
|
1019
937
|
newValue = this[propName];
|
|
1020
938
|
delete this[propName];
|
|
1021
939
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1035,11 +953,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1035
953
|
}
|
|
1036
954
|
return;
|
|
1037
955
|
}
|
|
1038
|
-
|
|
1039
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1040
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1041
|
-
this[propName] = newValue;
|
|
1042
|
-
}
|
|
956
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1043
957
|
});
|
|
1044
958
|
};
|
|
1045
959
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1064,7 +978,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1064
978
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1065
979
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1066
980
|
if (bundleId) {
|
|
1067
|
-
const CstrImport = loadModule(cmpMeta
|
|
981
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1068
982
|
if (CstrImport && "then" in CstrImport) {
|
|
1069
983
|
const endLoad = uniqueTime();
|
|
1070
984
|
Cstr = await CstrImport;
|
|
@@ -1086,7 +1000,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1086
1000
|
try {
|
|
1087
1001
|
new Cstr(hostRef);
|
|
1088
1002
|
} catch (e) {
|
|
1089
|
-
consoleError(e
|
|
1003
|
+
consoleError(e);
|
|
1090
1004
|
}
|
|
1091
1005
|
{
|
|
1092
1006
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1118,7 +1032,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1118
1032
|
schedule();
|
|
1119
1033
|
}
|
|
1120
1034
|
};
|
|
1121
|
-
var fireConnectedCallback = (instance
|
|
1035
|
+
var fireConnectedCallback = (instance) => {
|
|
1122
1036
|
};
|
|
1123
1037
|
|
|
1124
1038
|
// src/runtime/connected-callback.ts
|
|
@@ -1159,7 +1073,7 @@ var connectedCallback = (elm) => {
|
|
|
1159
1073
|
endConnected();
|
|
1160
1074
|
}
|
|
1161
1075
|
};
|
|
1162
|
-
var disconnectInstance = (instance
|
|
1076
|
+
var disconnectInstance = (instance) => {
|
|
1163
1077
|
};
|
|
1164
1078
|
var disconnectedCallback = async (elm) => {
|
|
1165
1079
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1174,12 +1088,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1174
1088
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1175
1089
|
}
|
|
1176
1090
|
}
|
|
1177
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1178
|
-
rootAppliedStyles.delete(elm);
|
|
1179
|
-
}
|
|
1180
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1181
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1182
|
-
}
|
|
1183
1091
|
};
|
|
1184
1092
|
|
|
1185
1093
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1257,17 +1165,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1257
1165
|
}
|
|
1258
1166
|
disconnectedCallback() {
|
|
1259
1167
|
plt.jmp(() => disconnectedCallback(this));
|
|
1260
|
-
plt.raf(() => {
|
|
1261
|
-
var _a3;
|
|
1262
|
-
const hostRef = getHostRef(this);
|
|
1263
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1264
|
-
if (i2 > -1) {
|
|
1265
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1266
|
-
}
|
|
1267
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1268
|
-
delete hostRef.$vnode$.$elm$;
|
|
1269
|
-
}
|
|
1270
|
-
});
|
|
1271
1168
|
}
|
|
1272
1169
|
componentOnReady() {
|
|
1273
1170
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1331,7 +1228,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1331
1228
|
}
|
|
1332
1229
|
}
|
|
1333
1230
|
} catch (e) {
|
|
1334
|
-
consoleError(e
|
|
1231
|
+
consoleError(e);
|
|
1335
1232
|
}
|
|
1336
1233
|
};
|
|
1337
1234
|
var getHostListenerTarget = (elm, flags) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-af94fbb3.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|