@everymatrix/casino-tournament-prizes 1.53.0 → 1.53.11
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-28038ff3.js +2 -0
- package/dist/casino-tournament-prizes/p-3d4c0403.entry.js +1 -0
- package/dist/cjs/casino-tournament-prizes.cjs.entry.js +1 -6
- package/dist/cjs/casino-tournament-prizes.cjs.js +2 -2
- package/dist/cjs/{index-af94fbb3.js → index-89c9c795.js} +167 -70
- 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 +18 -5
- package/dist/esm/casino-tournament-prizes.entry.js +1 -6
- package/dist/esm/casino-tournament-prizes.js +3 -3
- package/dist/esm/{index-db720582.js → index-9d1a8d42.js} +167 -70
- package/dist/esm/loader.js +2 -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 +2 -0
- 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 +2 -0
- package/package.json +1 -1
- package/dist/casino-tournament-prizes/p-05dcfba0.js +0 -2
- package/dist/casino-tournament-prizes/p-107abf52.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-prizes/.stencil/packages/stencil/casino-tournament-prizes/stencil.config.d.ts +0 -2
- 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 +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-28038ff3.js";export{s as setNonce}from"./p-28038ff3.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-3d4c0403",[[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 t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={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)},f=t=>Promise.resolve(t),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,p=[],m=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&a.o?b(w):a.raf(w))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},w=()=>{v(p),v(m),(d=p.length>0)&&a.raf(w)},b=t=>f().then(t),$=y(m,!0),g=t=>"object"==(t=typeof t)||"function"===t;function S(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:()=>O,map:()=>k,ok:()=>j,unwrap:()=>C,unwrapErr:()=>M});var j=t=>({isOk:!0,isErr:!1,value:t}),O=t=>({isOk:!1,isErr:!0,value:t});function k(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return O(t.value);throw"should never get here"}var E,C=t=>{if(t.isOk)return t.value;throw t.value},M=t=>{if(t.isErr)return t.value;throw t.value},x=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!g(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?P(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=P(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},P=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),A={},D=(t,e)=>null==t||g(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,H=t=>n(t).$hostElement$,N=new WeakMap,R=t=>"sc-"+t.$,T=(t,e,n,o,l,s)=>{if(n!==o){let i=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);else{const r=g(o);if((i||r&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||l)&&!r&&t.setAttribute(e,o=!0===o?"":o)}}},L=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(L):[]),W=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of F(Object.keys(l)))t in s||T(o,t,l[t],void 0,n,e.o);for(const t of F(Object.keys(s)))T(o,t,l[t],s[t],n,e.o)};function F(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,q=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=u.createTextNode(o.i);else{if(V||(V="svg"===o.m),l=o.v=u.createElementNS(V?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),V&&"foreignObject"===o.m&&(V=!1),W(null,o,V),o.h)for(i=0;i<o.h.length;++i)s=q(t,o,i),s&&l.appendChild(s);"svg"===o.m?V=!1:"foreignObject"===l.tagName&&(V=!0)}return l["s-hn"]=E,l},z=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===E&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=q(null,n,l),i&&(o[l].v=i,I(r,i,e)))},G=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;t&&t.remove()}}},_=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),B=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(W(t,e,V="svg"===i||"foreignObject"!==i&&V),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=o.length-1,m=o[0],y=o[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=o[++c];else if(null==y)y=o[--p];else if(_(h,m,l))B(h,m,l),h=e[++r],m=o[++c];else if(_(d,y,l))B(d,y,l),d=e[--f],y=o[--p];else if(_(h,y,l))B(h,y,l),I(t,h.v,d.v.nextSibling),h=e[++r],y=o[--p];else if(_(d,m,l))B(d,m,l),I(t,d.v,h.v),d=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=q(e&&e[c],n,u):(B(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=q(e&&e[c],n,c),m=o[++c]),s&&I(h.v.parentNode,s,h.v)}r>f?z(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&G(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),z(o,null,e,s,0,s.length-1)):!n&&null!==l&&G(l,0,l.length-1),V&&"svg"===i&&(V=!1)):t.i!==r&&(o.data=r)},I=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),J=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},K=(t,e)=>{if(t.o|=16,!(4&t.o))return J(t,t.j),$((()=>Q(t,e)));t.o|=512},Q=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw 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 l;return e&&(t.o|=256,t.O&&(t.O.map((([t,e])=>ot(o,t,e,n))),t.O=void 0),l=ot(o,"componentWillLoad",void 0,n)),X(l,(()=>Z(t,o,e)))},X=(t,e)=>Y(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Y=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Z=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.k,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=R(e),l=i.get(o);if(t=11===t.nodeType?t:u,l)if("string"==typeof l){let s,i=N.get(t=t.head||t);if(i||N.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||u.createElement("style"),s.innerHTML=l;const i=null!=(n=a.C)?n:S(u);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(h){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=r),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);tt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>et(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},tt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.k,s=t.M||P(null,null),i=(t=>t&&t.m===A)(e)?e:x(null,null,e);if(E=o.tagName,n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.M=i,i.v=s.v=o.shadowRoot||o,B(s,i,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},et=t=>{const e=t.$hostElement$,n=t.j;ot(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,lt(e),t.P(e),n||nt()),t.S&&(t.S(),t.S=void 0),512&t.o&&b((()=>K(t,!1))),t.o&=-517},nt=()=>{lt(u.documentElement),b((()=>(t=>{const e=a.ce("appload",{detail:{namespace:"casino-tournament-prizes"}});return t.dispatchEvent(e),e})(c)))},ot=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},lt=t=>t.classList.add("hydrated"),st=(t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.$}" 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=s.A.get(e),r=s.o,c=s.t;o=D(o,l.D[e][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.A.set(e,o),c&&2==(18&r)&&K(s,!1))},it=(t,e,o)=>{var l,s;const i=t.prototype;if(e.D){const r=Object.entries(null!=(l=e.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.D[t][0]|=2048),r&&(e.D[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.D[t][0]))return((t,e)=>n(this).A.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,D(s,l)),void st(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.D[t][0]))return st(this,t,s,e),void(1&o&&!i.t&&i.H.then((()=>{4096&e.D[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=D(s,l),st(this,t,i.t[t],e)};i.t?n():i.H.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){a.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},rt=(t,o={})=>{var f;const d=[],p=o.exclude||[],m=c.customElements,y=u.head,v=y.querySelector("meta[charset]"),w=u.createElement("style"),b=[];let $,g=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let j=!1;if(t.map((t=>{t[1].map((o=>{const r={o:o[0],$:o[1],D:o[2],R:o[3]};4&r.o&&(j=!0),r.D=o[2],r.R=o[3];const c=r.$,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,k:n,A:new Map};o.H=new Promise((t=>o.P=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,r),1&r.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${r.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ct(this,t,r.R)),$&&(clearTimeout($),$=null),g?b.push(this):a.jmp((()=>(t=>{if(!(1&a.o)){const e=n(t),o=e.k,r=()=>{};if(1&e.o)ct(t,e,o.R),(null==e?void 0:e.t)||(null==e?void 0:e.H)&&e.H.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(e,e.j=n);break}}o.D&&Object.entries(o.D).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)){e.o|=32;{const i=((t,e)=>{const n=t.$.replace(/-/g,"_"),o=t.T;if(!o)return;const i=s.get(o);return i?i[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};o=await i,t()}else o=i;if(!o)throw Error(`Constructor for "${n.$}#${e.L}" was not found`);o.isProxied||(it(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){l(e,t)}e.o&=-9,r()}if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=R(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const r=e.j,c=()=>K(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,o)}r()}})(this)))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.o)){const e=n(t);e.U&&(e.U.map((t=>t())),e.U=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.H)&&e.H.then((()=>{}))}N.has(t)&&N.delete(t),t.shadowRoot&&N.has(t.shadowRoot)&&N.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this);(null==(t=null==e?void 0:e.M)?void 0:t.v)instanceof Node&&!e.M.v.isConnected&&delete e.M.v}))}componentOnReady(){return n(this).H}};r.T=t[0],p.includes(c)||m.get(c)||(d.push(c),m.define(c,it(u,r,1)))}))})),d.length>0&&(j&&(w.textContent+=r),w.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(f=a.C)?f:S(u);null!=t&&w.setAttribute("nonce",t),y.insertBefore(w,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):a.jmp((()=>$=setTimeout(nt,30)))},ct=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=at(t,n),i=ut(e,l),r=ft(n);a.ael(s,o,i,r),(e.U=e.U||[]).push((()=>a.rel(s,o,i,r)))}))},ut=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.O=t.O||[]).push([e,n])}catch(e){l(e,t.$hostElement$)}},at=(t,e)=>8&e?c:t,ft=t=>({passive:!!(1&t),capture:!!(2&t)}),ht=t=>a.C=t;export{rt as b,H as g,x as h,f as p,o as r,ht as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,g as s}from"./p-28038ff3.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.useGroup=!1,this.useEvent=!1,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-89c9c795.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const TRANSLATIONS = {
|
|
@@ -69,13 +69,8 @@ const CasinoTournamentPrizesStyle0 = casinoTournamentPrizesCss;
|
|
|
69
69
|
const CasinoTournamentPrizes = class {
|
|
70
70
|
constructor(hostRef) {
|
|
71
71
|
index.registerInstance(this, hostRef);
|
|
72
|
-
this.language = undefined;
|
|
73
72
|
this.useGroup = false;
|
|
74
73
|
this.useEvent = false;
|
|
75
|
-
this.endpoint = undefined;
|
|
76
|
-
this.session = undefined;
|
|
77
|
-
this.rawPrizes = undefined;
|
|
78
|
-
this.tournamentId = undefined;
|
|
79
74
|
this.clientStyling = '';
|
|
80
75
|
this.clientStylingUrl = '';
|
|
81
76
|
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-89c9c795.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.25.1 | 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,19 +21,27 @@ 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, 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 };
|
|
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, modernPropertyDecls: 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.25.1 | 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
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
92
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
93
|
/* webpackMode: "lazy" */
|
|
85
94
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
95
|
+
)); }).then(
|
|
96
|
+
(importedModule) => {
|
|
97
|
+
{
|
|
98
|
+
cmpModules.set(bundleId, importedModule);
|
|
99
|
+
}
|
|
100
|
+
return importedModule[exportName];
|
|
101
|
+
},
|
|
102
|
+
(e) => {
|
|
103
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
104
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
105
|
+
);
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
// src/client/client-style.ts
|
|
95
109
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -166,14 +181,6 @@ var flush = () => {
|
|
|
166
181
|
};
|
|
167
182
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
168
183
|
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;
|
|
177
184
|
var isComplexType = (o) => {
|
|
178
185
|
o = typeof o;
|
|
179
186
|
return o === "object" || o === "function";
|
|
@@ -359,7 +366,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
359
366
|
}
|
|
360
367
|
if (!appliedStyles.has(scopeId2)) {
|
|
361
368
|
{
|
|
362
|
-
styleElm = doc.createElement("style");
|
|
369
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
363
370
|
styleElm.innerHTML = style;
|
|
364
371
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
365
372
|
if (nonce != null) {
|
|
@@ -369,7 +376,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
369
376
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
370
377
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
371
378
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
372
|
-
styleContainerNode.insertBefore(
|
|
379
|
+
styleContainerNode.insertBefore(
|
|
380
|
+
styleElm,
|
|
381
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
382
|
+
);
|
|
373
383
|
} else if ("host" in styleContainerNode) {
|
|
374
384
|
if (supportsConstructableStylesheets) {
|
|
375
385
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -419,16 +429,18 @@ var attachStyles = (hostRef) => {
|
|
|
419
429
|
endAttachStyles();
|
|
420
430
|
};
|
|
421
431
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
422
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
432
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
423
433
|
if (oldValue !== newValue) {
|
|
424
434
|
let isProp = isMemberInElement(elm, memberName);
|
|
425
435
|
memberName.toLowerCase();
|
|
426
436
|
if (memberName === "class") {
|
|
427
437
|
const classList = elm.classList;
|
|
428
438
|
const oldClasses = parseClassList(oldValue);
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
439
|
+
let newClasses = parseClassList(newValue);
|
|
440
|
+
{
|
|
441
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
442
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
443
|
+
}
|
|
432
444
|
} else if (memberName === "key") ; else {
|
|
433
445
|
const isComplex = isComplexType(newValue);
|
|
434
446
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -444,7 +456,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
444
456
|
elm.setAttribute(memberName, n);
|
|
445
457
|
}
|
|
446
458
|
}
|
|
447
|
-
} else {
|
|
459
|
+
} else if (elm[memberName] !== newValue) {
|
|
448
460
|
elm[memberName] = newValue;
|
|
449
461
|
}
|
|
450
462
|
} catch (e) {
|
|
@@ -466,22 +478,42 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
466
478
|
}
|
|
467
479
|
};
|
|
468
480
|
var parseClassListRegex = /\s/;
|
|
469
|
-
var parseClassList = (value) =>
|
|
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
|
+
};
|
|
470
490
|
|
|
471
491
|
// src/runtime/vdom/update-element.ts
|
|
472
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
492
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
473
493
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
474
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
475
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
494
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
495
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
476
496
|
{
|
|
477
497
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
478
498
|
if (!(memberName in newVnodeAttrs)) {
|
|
479
|
-
setAccessor(
|
|
499
|
+
setAccessor(
|
|
500
|
+
elm,
|
|
501
|
+
memberName,
|
|
502
|
+
oldVnodeAttrs[memberName],
|
|
503
|
+
void 0,
|
|
504
|
+
isSvgMode2,
|
|
505
|
+
newVnode.$flags$);
|
|
480
506
|
}
|
|
481
507
|
}
|
|
482
508
|
}
|
|
483
509
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
484
|
-
setAccessor(
|
|
510
|
+
setAccessor(
|
|
511
|
+
elm,
|
|
512
|
+
memberName,
|
|
513
|
+
oldVnodeAttrs[memberName],
|
|
514
|
+
newVnodeAttrs[memberName],
|
|
515
|
+
isSvgMode2,
|
|
516
|
+
newVnode.$flags$);
|
|
485
517
|
}
|
|
486
518
|
};
|
|
487
519
|
function sortedAttrNames(attrNames) {
|
|
@@ -493,13 +525,10 @@ function sortedAttrNames(attrNames) {
|
|
|
493
525
|
attrNames
|
|
494
526
|
);
|
|
495
527
|
}
|
|
496
|
-
|
|
497
|
-
// src/runtime/vdom/vdom-render.ts
|
|
498
|
-
var scopeId;
|
|
499
528
|
var hostTagName;
|
|
500
529
|
var useNativeShadowDom = false;
|
|
501
530
|
var isSvgMode = false;
|
|
502
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
531
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
503
532
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
504
533
|
let i2 = 0;
|
|
505
534
|
let elm;
|
|
@@ -520,11 +549,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
520
549
|
{
|
|
521
550
|
updateElement(null, newVNode2, isSvgMode);
|
|
522
551
|
}
|
|
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
|
-
}
|
|
528
552
|
if (newVNode2.$children$) {
|
|
529
553
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
530
554
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -660,6 +684,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
660
684
|
if (!isInitialRender) {
|
|
661
685
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
662
686
|
}
|
|
687
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
688
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
689
|
+
}
|
|
663
690
|
return true;
|
|
664
691
|
}
|
|
665
692
|
return false;
|
|
@@ -700,8 +727,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
700
727
|
}
|
|
701
728
|
};
|
|
702
729
|
var insertBefore = (parent, newNode, reference) => {
|
|
703
|
-
|
|
704
|
-
|
|
730
|
+
{
|
|
731
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
732
|
+
}
|
|
705
733
|
};
|
|
706
734
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
707
735
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -720,9 +748,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
720
748
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
721
749
|
hostRef.$vnode$ = rootVnode;
|
|
722
750
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
723
|
-
{
|
|
724
|
-
scopeId = hostElm["s-sc"];
|
|
725
|
-
}
|
|
726
751
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
727
752
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
728
753
|
};
|
|
@@ -730,7 +755,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
730
755
|
// src/runtime/update-component.ts
|
|
731
756
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
732
757
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
733
|
-
ancestorComponent["s-p"].push(
|
|
758
|
+
const index = ancestorComponent["s-p"].push(
|
|
759
|
+
new Promise(
|
|
760
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
761
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
762
|
+
r();
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
);
|
|
734
766
|
}
|
|
735
767
|
};
|
|
736
768
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -759,12 +791,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
759
791
|
{
|
|
760
792
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
761
793
|
if (hostRef.$queuedListeners$) {
|
|
762
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
794
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
763
795
|
hostRef.$queuedListeners$ = void 0;
|
|
764
796
|
}
|
|
765
797
|
}
|
|
766
798
|
{
|
|
767
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
799
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
768
800
|
}
|
|
769
801
|
}
|
|
770
802
|
endSchedule();
|
|
@@ -833,7 +865,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
833
865
|
const instance = hostRef.$lazyInstance$ ;
|
|
834
866
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
835
867
|
{
|
|
836
|
-
safeCall(instance, "componentDidRender");
|
|
868
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
837
869
|
}
|
|
838
870
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
839
871
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -867,12 +899,12 @@ var appDidLoad = (who) => {
|
|
|
867
899
|
}
|
|
868
900
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
869
901
|
};
|
|
870
|
-
var safeCall = (instance, method, arg) => {
|
|
902
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
871
903
|
if (instance && instance[method]) {
|
|
872
904
|
try {
|
|
873
905
|
return instance[method](arg);
|
|
874
906
|
} catch (e) {
|
|
875
|
-
consoleError(e);
|
|
907
|
+
consoleError(e, elm);
|
|
876
908
|
}
|
|
877
909
|
}
|
|
878
910
|
return void 0;
|
|
@@ -915,15 +947,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
915
947
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
916
948
|
members.map(([memberName, [memberFlags]]) => {
|
|
917
949
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
950
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
951
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
952
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
953
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
954
|
+
Object.defineProperty(prototype, memberName, {
|
|
955
|
+
get() {
|
|
956
|
+
{
|
|
957
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
958
|
+
return getValue(this, memberName);
|
|
959
|
+
}
|
|
960
|
+
const ref = getHostRef(this);
|
|
961
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
962
|
+
if (!instance) return;
|
|
963
|
+
return instance[memberName];
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
configurable: true,
|
|
967
|
+
enumerable: true
|
|
968
|
+
});
|
|
969
|
+
}
|
|
918
970
|
Object.defineProperty(prototype, memberName, {
|
|
919
|
-
get() {
|
|
920
|
-
return getValue(this, memberName);
|
|
921
|
-
},
|
|
922
971
|
set(newValue) {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
972
|
+
const ref = getHostRef(this);
|
|
973
|
+
if (origSetter) {
|
|
974
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
975
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
976
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
977
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
978
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
979
|
+
}
|
|
980
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
981
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
982
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
{
|
|
986
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
987
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
988
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
989
|
+
ref.$onReadyPromise$.then(() => {
|
|
990
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
991
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
const setterSetVal = () => {
|
|
998
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
999
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1000
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1001
|
+
}
|
|
1002
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1003
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1004
|
+
};
|
|
1005
|
+
if (ref.$lazyInstance$) {
|
|
1006
|
+
setterSetVal();
|
|
1007
|
+
} else {
|
|
1008
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
927
1012
|
});
|
|
928
1013
|
}
|
|
929
1014
|
});
|
|
@@ -933,7 +1018,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
933
1018
|
plt.jmp(() => {
|
|
934
1019
|
var _a2;
|
|
935
1020
|
const propName = attrNameToPropName.get(attrName);
|
|
936
|
-
if (this.hasOwnProperty(propName)) {
|
|
1021
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
937
1022
|
newValue = this[propName];
|
|
938
1023
|
delete this[propName];
|
|
939
1024
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -953,7 +1038,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
953
1038
|
}
|
|
954
1039
|
return;
|
|
955
1040
|
}
|
|
956
|
-
|
|
1041
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1042
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1043
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1044
|
+
this[propName] = newValue;
|
|
1045
|
+
}
|
|
957
1046
|
});
|
|
958
1047
|
};
|
|
959
1048
|
Cstr.observedAttributes = Array.from(
|
|
@@ -976,9 +1065,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
976
1065
|
let Cstr;
|
|
977
1066
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
978
1067
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1068
|
+
{
|
|
1069
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
982
1070
|
if (CstrImport && "then" in CstrImport) {
|
|
983
1071
|
const endLoad = uniqueTime();
|
|
984
1072
|
Cstr = await CstrImport;
|
|
@@ -1000,16 +1088,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1000
1088
|
try {
|
|
1001
1089
|
new Cstr(hostRef);
|
|
1002
1090
|
} catch (e) {
|
|
1003
|
-
consoleError(e);
|
|
1091
|
+
consoleError(e, elm);
|
|
1004
1092
|
}
|
|
1005
1093
|
{
|
|
1006
1094
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1007
1095
|
}
|
|
1008
1096
|
endNewInstance();
|
|
1009
|
-
} else {
|
|
1010
|
-
Cstr = elm.constructor;
|
|
1011
|
-
const cmpTag = elm.localName;
|
|
1012
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1013
1097
|
}
|
|
1014
1098
|
if (Cstr && Cstr.style) {
|
|
1015
1099
|
let style;
|
|
@@ -1032,7 +1116,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1032
1116
|
schedule();
|
|
1033
1117
|
}
|
|
1034
1118
|
};
|
|
1035
|
-
var fireConnectedCallback = (instance) => {
|
|
1119
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1036
1120
|
};
|
|
1037
1121
|
|
|
1038
1122
|
// src/runtime/connected-callback.ts
|
|
@@ -1073,7 +1157,7 @@ var connectedCallback = (elm) => {
|
|
|
1073
1157
|
endConnected();
|
|
1074
1158
|
}
|
|
1075
1159
|
};
|
|
1076
|
-
var disconnectInstance = (instance) => {
|
|
1160
|
+
var disconnectInstance = (instance, elm) => {
|
|
1077
1161
|
};
|
|
1078
1162
|
var disconnectedCallback = async (elm) => {
|
|
1079
1163
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1088,6 +1172,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1088
1172
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1089
1173
|
}
|
|
1090
1174
|
}
|
|
1175
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1176
|
+
rootAppliedStyles.delete(elm);
|
|
1177
|
+
}
|
|
1178
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1179
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1180
|
+
}
|
|
1091
1181
|
};
|
|
1092
1182
|
|
|
1093
1183
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1165,6 +1255,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1165
1255
|
}
|
|
1166
1256
|
disconnectedCallback() {
|
|
1167
1257
|
plt.jmp(() => disconnectedCallback(this));
|
|
1258
|
+
plt.raf(() => {
|
|
1259
|
+
var _a3;
|
|
1260
|
+
const hostRef = getHostRef(this);
|
|
1261
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1262
|
+
delete hostRef.$vnode$.$elm$;
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1168
1265
|
}
|
|
1169
1266
|
componentOnReady() {
|
|
1170
1267
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1228,7 +1325,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1228
1325
|
}
|
|
1229
1326
|
}
|
|
1230
1327
|
} catch (e) {
|
|
1231
|
-
consoleError(e);
|
|
1328
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1232
1329
|
}
|
|
1233
1330
|
};
|
|
1234
1331
|
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-89c9c795.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|