@everymatrix/casino-tournament-buttons 1.53.0 → 1.53.10
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-buttons/casino-tournament-buttons.esm.js +1 -1
- package/dist/casino-tournament-buttons/p-060556ca.js +2 -0
- package/dist/casino-tournament-buttons/{p-44aaf0e6.entry.js → p-8f0e91ed.entry.js} +1 -1
- package/dist/cjs/casino-tournament-buttons.cjs.entry.js +13 -12
- package/dist/cjs/casino-tournament-buttons.cjs.js +2 -2
- package/dist/cjs/{index-fc7d1b30.js → index-682a5e5e.js} +161 -66
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-tournament-buttons/casino-tournament-buttons.js +42 -11
- package/dist/esm/casino-tournament-buttons.entry.js +13 -12
- package/dist/esm/casino-tournament-buttons.js +3 -3
- package/dist/esm/{index-08749ca7.js → index-7811024c.js} +161 -66
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-buttons/.stencil/packages/stencil/casino-tournament-buttons/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-tournament-buttons/.stencil/packages/stencil/casino-tournament-buttons/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-tournament-buttons/p-443ab0a0.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-buttons/.stencil/packages/stencil/casino-tournament-buttons/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-tournament-buttons/.stencil/packages/stencil/casino-tournament-buttons/stencil.config.dev.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as e}from"./p-
|
|
1
|
+
import{p as n,b as e}from"./p-060556ca.js";export{s as setNonce}from"./p-060556ca.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["p-8f0e91ed",[[1,"casino-tournament-buttons",{language:[1],tournamentId:[1,"tournament-id"],session:[1],loginEvent:[1,"login-event"],loginUrl:[1,"login-url"],registerEvent:[1,"register-event"],registerUrl:[1,"register-url"],endpoint:[1],currency:[1],bonusCode:[1,"bonus-code"],enrolled:[4],showReadMore:[4,"show-read-more"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationData:[520,"translation-data"],limitStylingAppends:[32],joinButtonLoading:[32],errorJoin:[32],errorJoinConcurrently:[32]}]]]],n))));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>{t.set(n.t=e,n)},l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],b=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.o?w($):f.raf($))},v=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{v(m),v(y),(p=m.length>0)&&f.raf($)},w=e=>h().then(e),S=b(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],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 o=null,l=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!g(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?A(null,o):o),i=s)};if(c(n),t){t.key&&(l=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,r.length>0&&(u.h=r),u.p=l,u},A=(e,t)=>({o:0,m:e,i:t,v:null,h:null,u:null,p:null}),R={},D=(e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e,H=e=>n(e).$hostElement$,N=(e,t,n)=>{const o=H(e);return{emit:e=>T(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},T=(e,t,n)=>{const o=f.ce(t,n);return e.dispatchEvent(o),o},L=new WeakMap,U=e=>"sc-"+e.$,W=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=V(n);let s=V(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const l=g(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},F=/\s/,V=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(F):[]),q="Capture",G=RegExp(q+"$"),_=(e,t,n)=>{const o=11===t.v.nodeType&&t.v.host?t.v.host:t.v,l=e&&e.u||{},s=t.u||{};for(const e of z(Object.keys(l)))e in s||W(o,e,l[e],void 0,n,t.o);for(const e of z(Object.keys(s)))W(o,e,l[e],s[e],n,t.o)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const o=t.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else if(l=o.v=a.createElement(o.m),_(null,o,B),o.h)for(i=0;i<o.h.length;++i)s=I(e,o,i),s&&l.appendChild(s);return l["s-hn"]=C,l},J=(e,t,n,o,l,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=I(null,n,l),i&&(o[l].v=i,Y(r,i,t)))},K=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.v;e&&e.remove()}}},Q=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),X=(e,t,n=!1)=>{const o=t.v=e.v,l=e.h,s=t.h,i=t.i;null===i?(_(e,t,B),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=o.length-1,m=o[0],y=o[p];for(;r<=f&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--f];else if(null==m)m=o[++c];else if(null==y)y=o[--p];else if(Q(h,m,l))X(h,m,l),h=t[++r],m=o[++c];else if(Q(d,y,l))X(d,y,l),d=t[--f],y=o[--p];else if(Q(h,y,l))X(h,y,l),Y(e,h.v,d.v.nextSibling),h=t[++r],y=o[--p];else if(Q(d,m,l))X(d,m,l),Y(e,d.v,h.v),d=t[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=I(t&&t[c],n,u):(X(i,m,l),t[u]=void 0,s=i.v),m=o[++c]):(s=I(t&&t[c],n,c),m=o[++c]),s&&Y(h.v.parentNode,s,h.v)}r>f?J(e,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&K(t,r,f)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),J(o,null,t,s,0,s.length-1)):!n&&null!==l&&K(l,0,l.length-1)):e.i!==i&&(o.data=i)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.S=()=>{t["s-p"].splice(n-1,1),o()})))}},ee=(e,t)=>{if(e.o|=16,!(4&e.o))return Z(e,e.j),S((()=>te(e,t)));e.o|=512},te=(e,t)=>{const n=e.$hostElement$,o=e.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 t&&(l=ce(o,"componentWillLoad",void 0,n)),ne(l,(()=>le(e,o,t)))},ne=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=U(t),l=r.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,i=L.get(e=e.head||e);if(i||L.set(e,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.o))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,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);se(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},se=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.O,s=e.C||A(null,null),i=(e=>e&&e.m===R)(t)?t:P(null,null,t);if(C=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([e,t])=>i.u[t]=o[e]))),n&&i.u)for(const e of Object.keys(i.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=o[e]);i.m=null,i.o|=4,e.C=i,i.v=s.v=o.shadowRoot||o,X(s,i,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.j;ce(e.t,"componentDidRender",void 0,t),64&e.o||(e.o|=64,ue(t),e.P(t),n||re()),e.S&&(e.S(),e.S=void 0),512&e.o&&w((()=>ee(e,!1))),e.o&=-517},re=()=>{ue(a.documentElement),w((()=>T(u,"appload",{detail:{namespace:"casino-tournament-buttons"}})))},ce=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,o)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,o,l)=>{const s=n(e);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(t),r=s.o,c=s.t;o=D(o,l.R[t][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.A.set(t,o),c&&2==(18&r)&&ee(s,!1))},fe=(e,t,o)=>{var l,s;const i=e.prototype;if(t.R){const r=Object.entries(null!=(l=t.R)?l:{});if(r.map((([e,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.R[e][0]|=2048),r&&(t.R[e][0]|=4096),(1&o||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.R[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const o=n(this),l=o?o.t:i;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&l?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,D(s,l)),void ae(this,e,s=32&l?this[e]:i.$hostElement$[e],t)}{if(!(1&o&&4096&t.R[e][0]))return ae(this,e,s,t),void(1&o&&!i.t&&i.D.then((()=>{4096&t.R[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=D(s,l),ae(this,e,i.t[e],t)};i.t?n():i.D.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var r;const c=o.get(e);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=t.H)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.H)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.M)||l.push([e,s])),s}))]))}}return e},he=(e,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,b=y.querySelector("meta[charset]"),v=a.createElement("style"),$=[];let w,S=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((o=>{const l={o:o[0],$:o[1],R:o[2],N:o[3]};4&l.o&&(g=!0),l.R=o[2],l.M=[];const c=l.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,O:n,A:new Map};o.D=new Promise((e=>o.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,l),1&l.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?$.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.O,l=()=>{};if(1&t.o)(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.j=n);break}}o.R&&Object.entries(o.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){t.o|=32;{const l=((e,t)=>{const n=e.$.replace(/-/g,"_"),o=e.T;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((e=>(i.set(o,e),e[n])),(e=>{s(e,t.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(l&&"then"in l){const e=()=>{};o=await l,e()}else o=l;if(!o)throw Error(`Constructor for "${n.$}#${t.L}" was not found`);o.isProxied||(fe(o,n,2),o.isProxied=!0);const r=()=>{};t.o|=8;try{new o(t)}catch(t){s(t,e)}t.o&=-9,r()}if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=U(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.j,c=()=>ee(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async e=>{if(!(1&f.o)){const t=n(e);(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}))}L.has(e)&&L.delete(e),e.shadowRoot&&L.has(e.shadowRoot)&&L.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this);(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).D}};l.T=e[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,fe(u,l,1)))}))})),h.length>0&&(g&&(v.textContent+=c),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(l=f.k)?l:j(a);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,b?b.nextSibling:y.firstChild)}S=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(re,30)))},de=e=>f.k=e;export{he as b,N as c,H as g,P as h,h as p,o as r,de as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,g as r}from"./p-443ab0a0.js";const a={en:{joined:"Joined",join:"Join",enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet count",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"Ongoing",finished:"Finished",startingAt:"Starting at:",startedAt:"Started at:",startingAtWithTime:"Starts ",startedAtWithTime:"Started ",mostRounds:"Most Rounds",betCount:"Number of Bets",maxWinStakeRatio:"Max Win per Stake",winStakeRatio:"Total Win per Stake",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Log in",register:"Register",details:"Details",joinerror:"An error occurred while registering in the tournament, please try again."},"zh-hk":{enrolled:"已註冊",scoreCriteria:"評分標準",minbet:"最小投注數:",seegames:"你可以看比賽",here:"這裡",scheduled:"預定的",ongoing:"進行中",finished:"完成的",startingAt:"開始於",startedAt:"大多數回合",mostRounds:"投注數",betCount:"投注计数",maxWinStakeRatio:"最大勝率",winStakeRatio:"勝率",January:"一月",February:"二月",March:"行进",April:"四月",May:"可能",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",login:"登錄",register:"登記",details:"細節",join:"加入",joinerror:"加入錦標賽時出錯,請重試"},fr:{enrolled:"Inscrits",scoreCriteria:"Critères de notation",minbet:"nombre de paris minimum",seegames:"Vous pouvez voir les jeux",here:"ici",scheduled:"Programmé",ongoing:"En cours",finished:"Fini",startingAt:"À partir de:",startedAt:"Commencé à:",mostRounds:"Le plus grand nombre de tours",betCount:"Nombre de paris",maxWinStakeRatio:"Indice maximum du gain d'une mise",winStakeRatio:"Indice du gain d'une mise",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Connexion",register:"Enregistre",details:"Détails",join:"Rejoignez",joinerror:"Une erreur s'est produite lors de l'inscription au tournoi - "},ro:{enrolled:"Înscris",scoreCriteria:"Criterii de punctaj",minbet:"număr minim de pariuri",seegames:"Vezi jocurile",here:"aici",scheduled:"Programat",ongoing:"În desfășurare",finished:"Finalizat",startingAt:"Începând de la",startedAt:"A inceput la:",startingAtWithTime:"Începând de",startedAtWithTime:"A inceput:",mostRounds:"Cele mai multe runde",betCount:"Număr de pariuri",maxWinStakeRatio:"Pondere maximă a mizei din câștig",winStakeRatio:"Câștig Total per Miză",January:"Ianuarie",February:"Februarie",March:"Martie",April:"Aprilie",May:"Mai",June:"Iunie",July:"Iulie",August:"August",September:"Septembrie",October:"Octombrie",November:"Noiembrie",December:"Decembrie",login:"Autentificare",register:"Înregistrare",details:"Detalii",join:"Participă",joinerror:"A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou."},tr:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"Başlangıç saati:",startedAt:"Başlangıç saati:",mostRounds:"ÇoğuRounds",betCount:"Oynanan Tur Sayısı",maxWinStakeRatio:"Maksimum Kazanç / Bahis Oranı",winStakeRatio:"Kazanç / Bahis Oranı",January:"Ocak",February:"Şubat",March:"Mart",April:"Nisan",May:"Mayıs",June:"Haziran",July:"Temmuz",August:"Ağustos",September:"Eylül",October:"Ekim",November:"Kasım",December:"Aralık",login:"Giriş",register:"Kayıt Ol",details:"Detaylar",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "},el:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων",seegames:"Μπορείς να δεις τα παιχνίδια",here:"εδώ",all:"Όλα",scheduled:"Προγραμματισμένα",ongoing:"Τρέχοντα",finished:"Ολοκληρωμένα",startingAt:"Αρχίζει στις:",startedAt:"Άρχισε στις:",startingAtWithTime:"Αρχίζει στις ",startedAtWithTime:"Άρχισε στις ",mostRounds:"Οι περισσότεροι γύροι",betCount:"Οι περισσότεροι γύροι",maxWinStakeRatio:"Μεγαλύτερο Κέρδος άνα Ποντάρισμα",winStakeRatio:"Συνολική Αναλογία Κερδών άνα Ποντάρισμα",January:"Ιανουαρίου",February:"Φεβρουαρίου",March:"Μαρτίου",April:"Απριλίου",May:"Μαΐου",June:"Ιουνίου",July:"Ιουλίου",August:"Αυγούστου",September:"Σεπτεμβρίου",October:"Οκτωβρίου",November:"Νοεμβρίου",December:"Δεκεμβρίου",login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά."},es:{enrolled:"Inscrito",scoreCriteria:"Criterios de puntuación",minbet:"la apuesta mínima cuenta",seegames:"Puedes ver los juegos",here:"aquí",scheduled:"Programado",ongoing:"En marcha",finished:"Terminado",startingAt:"Desde",startedAt:"Empezó el:",mostRounds:"LaMayoríaDeLasRondas",betCount:"Recuento De Apuestas",maxWinStakeRatio:"Ratio De Ganancia Máxima",winStakeRatio:"Ratio De Ganancia",January:"de enero",February:"de febrero",March:"de marzo",April:"de abril",May:"de mayo",June:"de junio",July:"de julio",August:"de agosto",September:"de septiembre",October:"de octubre",November:"de noviembre",December:"de diciembre",login:"Iniciar sesión",register:"Regístrate",details:"Detalles",join:"Unirse",joinerror:"Ha ocurrido un error mientras se registra en el Torneo"},pt:{enrolled:"Inscrito",scoreCriteria:"Critérios de pontuação",minbet:"Contagens de aposta mínima",seegames:"Você pode ver os jogos",here:"Aqui",scheduled:"Agendado",ongoing:"Em progresso",finished:"Finalizado",startingAt:"Começando às:",startedAt:"Começou às:",mostRounds:"Mais rodadas",betCount:"Contagem de Apostas",maxWinStakeRatio:"Rácio máximo de vitórias",winStakeRatio:"Rácio de Vitórias",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Entrar",register:"Registro",details:"Detalhes",join:"Junte-se",joinerror:"Ocorreu um erro ao entrar no torneio -"},hu:{enrolled:"Feliratkozott",scoreCriteria:"Pontozási kritériumok",minbet:"Minimális tét",seegames:"Játékok megnézése",here:"itt",scheduled:"Ütemezés",ongoing:"Folyamatban lévő",finished:"Befejezett",startingAt:"Kezdődik",startedAt:"Started at:",mostRounds:"Legtöbb kör",betCount:"Számított tét",maxWinStakeRatio:"Maximális nyeremény tétenként",winStakeRatio:"Összes nyeremény tétenként",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Bejelentkezés",register:"Regisztráció",details:"Adatok",join:"Csatlakozás",joinerror:"Hiba történt a versenyre való regisztráció során, kérjük próbálja újra."},hr:{joined:"Pridružen",enrolled:"Upisan",scoreCriteria:"Kriteriji bodovanja",minbet:"minimalni broj beta",seegames:"Možete vidjeti igre",here:"Ovdje",scheduled:"Zakazano",ongoing:"U tijeku",finished:"Gotovo",startingAt:"S početkom u",startedAt:"Započelo u",startingAtWithTime:"Počinje ",startedAtWithTime:"Započelo ",mostRounds:"Najviše rundi",betCount:"Broj betova",maxWinStakeRatio:"Maksimalni dobitak po ulogu",winStakeRatio:"Ukupni dobitak po ulogu",January:"Siječanj",February:"Veljača",March:"Ožujak",April:"Travanj",May:"Svibanj",June:"Lipanj",July:"Srpanj",August:"Kolovoz",September:"Rujan",October:"Listopad",November:"Studeni",December:"Prosinac",login:"Prijaviti se",register:"Registracija",details:"Detalji",join:"join",joinerror:"Došlo je do pogreške prilikom registracije na turnir, pokušajte ponovno.",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"}},o=(e,t)=>{var i,r;return(null===(i=a[t])||void 0===i?void 0:i[e])||(null===(r=a.en)||void 0===r?void 0:r[e])},n=class{constructor(i){e(this,i),this.userEnrolled=t(this,"TournamentUserEnrolled",7),this.language=void 0,this.tournamentId=void 0,this.session=void 0,this.loginEvent=void 0,this.loginUrl=void 0,this.registerEvent=void 0,this.registerUrl=void 0,this.endpoint=void 0,this.currency=void 0,this.bonusCode=void 0,this.enrolled=!1,this.showReadMore=!1,this.clientStyling="",this.clientStylingUrl="",this.translationData=void 0,this.limitStylingAppends=!1,this.joinButtonLoading=!1,this.errorJoin=!1,this.errorJoinConcurrently=!1}componentWillLoad(){var e;this.translationData&&(e=JSON.parse(this.translationData),Object.keys(e).forEach((t=>{for(let i in e[t])a[t][i]=e[t][i]})))}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 t=new CSSStyleSheet;t.replace(e),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}))}loginAction(){this.loginEvent&&(window.postMessage({type:this.loginEvent,transition:"Login"},window.location.href),"function"==typeof gtag&>ag("event","OpenLoginModal",{context:"TournamentsThumbnailController"})),this.loginUrl&&(location.href=this.loginUrl)}registerAction(){this.registerEvent&&(window.postMessage({type:this.registerEvent,transition:"Register"},window.location.href),"function"==typeof gtag&>ag("event","OpenRegisterModal",{context:"TournamentsThumbnailController"})),this.registerUrl&&(location.href=this.registerUrl)}async joinAction(e,t){var i;this.errorJoin=!1,this.errorJoinConcurrently=!1,window.postMessage({type:"TournamentJoinRequest",tournamentId:e},window.location.href),this.joinButtonLoading=!0;let r=new URL(`${this.endpoint}/v1/bonus/claim`),a=new Headers,o={};r.searchParams.append("language",this.language),r.searchParams.append("platform",(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})()),a.append("Content-Type","application/json"),a.append("X-SessionID",this.session),t&&(o={language:this.language,bonusCode:t,currency:this.currency,type:"tournament"});let n={method:"PUT",headers:a,body:JSON.stringify(o)};const s=()=>{this.joinButtonLoading=!1,this.enrolled=!0,window.postMessage({type:"TournamentUserEnrolled",userenrolled:this.enrolled,tournamentId:e},window.location.href),this.userEnrolled.emit({userenrolled:this.enrolled,tournamentId:e})},d=()=>{this.joinButtonLoading=!1,this.errorJoin=!0},u=await(async()=>{let e;try{e=await fetch(`${this.endpoint}/v1/bonus/claim?${r.searchParams.toString()}`,n),e=await e.json()}catch(e){d()}return e})();if(u)if(1==u.success)s();else if(u.errorMessage.match("VersionMismatchException")){let e;e=await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`,{headers:{"X-SessionID":this.session}}),e=await e.json(),(null===(i=null==e?void 0:e.item)||void 0===i?void 0:i.playerEnrolled)?s():(d(),this.errorJoinConcurrently=!0,this.errorJoin=!1)}else d()}detailAction(e){window.postMessage({type:"TournamentDetailsClicked",tournamentId:e,showLeaderboard:!0},window.location.href)}moreAction(e){window.postMessage({type:"TournamentReadMoreClicked",tournamentId:e},window.location.href)}render(){return i("div",{key:"d67f8cedc9bd513a74b4d9dc798c4c456d7b1d9f",class:"TournamentButtons"},!this.session&&i("div",{key:"7e79834abdd20bf694b096fad0734cc74ccb1f8e",class:"ButtonGroup"},i("button",{key:"273e73693f197ff25d116c3c2e7098d3e80138c7",class:"LoginButton Button",part:"LoginButton",onClick:()=>this.loginAction()},o("login",this.language)),i("button",{key:"72835739c177ce6e872a06183074d2266b3c3d5d",class:"RegisterButton Button",part:"RegisterButton",onClick:()=>this.registerAction()},o("register",this.language))),this.session&&i("div",{key:"746e7fb88ddd2bef5f59212d9f513b62943f80ae"},!this.enrolled&&i("div",{key:"7a33b63adc8255c267afdba2ffe700a0d2033e57",class:"ButtonGroup"},i("button",{key:"95f71a6f41cd65e4dd9dfca0896899f7b8c32dd5",class:"Button",onClick:()=>this.joinAction(this.tournamentId,this.bonusCode)},o("join",this.language)),this.showReadMore&&i("button",{key:"ac961bcbd5dc2a4f1e9267148ecc49a55b75515e",class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},o("readmore",this.language))),this.enrolled&&i("div",{key:"f6a9170663e0aae26da9500fc5efc888bb2dc2ab",class:"ButtonGroup"},i("button",{key:"a94489a7bf6b178199f2d78dfdc41cca77859c96",class:"Button",onClick:()=>this.detailAction(this.tournamentId)},o("details",this.language)),this.showReadMore&&i("button",{key:"f23cefc77e04215e5beb6a39c2643348dce5e576",class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},o("readmore",this.language)))),(this.errorJoin||this.errorJoinConcurrently)&&i("span",{key:"7accf63f478e52efc879da3775b07286fbc9801b",class:"ErrorText",part:"ErrorText"},o("joinerror",this.language)))}get host(){return r(this)}};n.style=':host{display:block}.ButtonGroup{display:flex;gap:4px}.Button{padding:6px 8px;border-radius:2px;border:1px solid #fff;color:#fff;background:none;position:relative;cursor:pointer}.Button.NoBorder{border:0;padding:7px 8px}.Button::after{content:"";display:block;position:absolute;border-radius:2px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all 0.5s;box-shadow:0 0 10px 10px white}.Button:active::after{box-shadow:0 0 0 0 white;position:absolute;border-radius:2px;left:0;top:0;opacity:1;transition:0s}.Button:active{top:1px}';export{n as casino_tournament_buttons}
|
|
1
|
+
import{r as e,c as t,h as i,g as r}from"./p-060556ca.js";const a={en:{joined:"Joined",join:"Join",enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet count",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"Ongoing",finished:"Finished",startingAt:"Starting at:",startedAt:"Started at:",startingAtWithTime:"Starts ",startedAtWithTime:"Started ",mostRounds:"Most Rounds",betCount:"Number of Bets",maxWinStakeRatio:"Max Win per Stake",winStakeRatio:"Total Win per Stake",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Log in",register:"Register",details:"Details",joinerror:"An error occurred while registering in the tournament, please try again."},"zh-hk":{enrolled:"已註冊",scoreCriteria:"評分標準",minbet:"最小投注數:",seegames:"你可以看比賽",here:"這裡",scheduled:"預定的",ongoing:"進行中",finished:"完成的",startingAt:"開始於",startedAt:"大多數回合",mostRounds:"投注數",betCount:"投注计数",maxWinStakeRatio:"最大勝率",winStakeRatio:"勝率",January:"一月",February:"二月",March:"行进",April:"四月",May:"可能",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",login:"登錄",register:"登記",details:"細節",join:"加入",joinerror:"加入錦標賽時出錯,請重試"},fr:{enrolled:"Inscrits",scoreCriteria:"Critères de notation",minbet:"nombre de paris minimum",seegames:"Vous pouvez voir les jeux",here:"ici",scheduled:"Programmé",ongoing:"En cours",finished:"Fini",startingAt:"À partir de:",startedAt:"Commencé à:",mostRounds:"Le plus grand nombre de tours",betCount:"Nombre de paris",maxWinStakeRatio:"Indice maximum du gain d'une mise",winStakeRatio:"Indice du gain d'une mise",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Connexion",register:"Enregistre",details:"Détails",join:"Rejoignez",joinerror:"Une erreur s'est produite lors de l'inscription au tournoi - "},ro:{enrolled:"Înscris",scoreCriteria:"Criterii de punctaj",minbet:"număr minim de pariuri",seegames:"Vezi jocurile",here:"aici",scheduled:"Programat",ongoing:"În desfășurare",finished:"Finalizat",startingAt:"Începând de la",startedAt:"A inceput la:",startingAtWithTime:"Începând de",startedAtWithTime:"A inceput:",mostRounds:"Cele mai multe runde",betCount:"Număr de pariuri",maxWinStakeRatio:"Pondere maximă a mizei din câștig",winStakeRatio:"Câștig Total per Miză",January:"Ianuarie",February:"Februarie",March:"Martie",April:"Aprilie",May:"Mai",June:"Iunie",July:"Iulie",August:"August",September:"Septembrie",October:"Octombrie",November:"Noiembrie",December:"Decembrie",login:"Autentificare",register:"Înregistrare",details:"Detalii",join:"Participă",joinerror:"A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou."},tr:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"Başlangıç saati:",startedAt:"Başlangıç saati:",mostRounds:"ÇoğuRounds",betCount:"Oynanan Tur Sayısı",maxWinStakeRatio:"Maksimum Kazanç / Bahis Oranı",winStakeRatio:"Kazanç / Bahis Oranı",January:"Ocak",February:"Şubat",March:"Mart",April:"Nisan",May:"Mayıs",June:"Haziran",July:"Temmuz",August:"Ağustos",September:"Eylül",October:"Ekim",November:"Kasım",December:"Aralık",login:"Giriş",register:"Kayıt Ol",details:"Detaylar",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "},el:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων",seegames:"Μπορείς να δεις τα παιχνίδια",here:"εδώ",all:"Όλα",scheduled:"Προγραμματισμένα",ongoing:"Τρέχοντα",finished:"Ολοκληρωμένα",startingAt:"Αρχίζει στις:",startedAt:"Άρχισε στις:",startingAtWithTime:"Αρχίζει στις ",startedAtWithTime:"Άρχισε στις ",mostRounds:"Οι περισσότεροι γύροι",betCount:"Οι περισσότεροι γύροι",maxWinStakeRatio:"Μεγαλύτερο Κέρδος άνα Ποντάρισμα",winStakeRatio:"Συνολική Αναλογία Κερδών άνα Ποντάρισμα",January:"Ιανουαρίου",February:"Φεβρουαρίου",March:"Μαρτίου",April:"Απριλίου",May:"Μαΐου",June:"Ιουνίου",July:"Ιουλίου",August:"Αυγούστου",September:"Σεπτεμβρίου",October:"Οκτωβρίου",November:"Νοεμβρίου",December:"Δεκεμβρίου",login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά."},es:{enrolled:"Inscrito",scoreCriteria:"Criterios de puntuación",minbet:"la apuesta mínima cuenta",seegames:"Puedes ver los juegos",here:"aquí",scheduled:"Programado",ongoing:"En marcha",finished:"Terminado",startingAt:"Desde",startedAt:"Empezó el:",mostRounds:"LaMayoríaDeLasRondas",betCount:"Recuento De Apuestas",maxWinStakeRatio:"Ratio De Ganancia Máxima",winStakeRatio:"Ratio De Ganancia",January:"de enero",February:"de febrero",March:"de marzo",April:"de abril",May:"de mayo",June:"de junio",July:"de julio",August:"de agosto",September:"de septiembre",October:"de octubre",November:"de noviembre",December:"de diciembre",login:"Iniciar sesión",register:"Regístrate",details:"Detalles",join:"Unirse",joinerror:"Ha ocurrido un error mientras se registra en el Torneo"},pt:{enrolled:"Inscrito",scoreCriteria:"Critérios de pontuação",minbet:"Contagens de aposta mínima",seegames:"Você pode ver os jogos",here:"Aqui",scheduled:"Agendado",ongoing:"Em progresso",finished:"Finalizado",startingAt:"Começando às:",startedAt:"Começou às:",mostRounds:"Mais rodadas",betCount:"Contagem de Apostas",maxWinStakeRatio:"Rácio máximo de vitórias",winStakeRatio:"Rácio de Vitórias",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Entrar",register:"Registro",details:"Detalhes",join:"Junte-se",joinerror:"Ocorreu um erro ao entrar no torneio -"},hu:{enrolled:"Feliratkozott",scoreCriteria:"Pontozási kritériumok",minbet:"Minimális tét",seegames:"Játékok megnézése",here:"itt",scheduled:"Ütemezés",ongoing:"Folyamatban lévő",finished:"Befejezett",startingAt:"Kezdődik",startedAt:"Started at:",mostRounds:"Legtöbb kör",betCount:"Számított tét",maxWinStakeRatio:"Maximális nyeremény tétenként",winStakeRatio:"Összes nyeremény tétenként",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",login:"Bejelentkezés",register:"Regisztráció",details:"Adatok",join:"Csatlakozás",joinerror:"Hiba történt a versenyre való regisztráció során, kérjük próbálja újra."},hr:{joined:"Pridružen",enrolled:"Upisan",scoreCriteria:"Kriteriji bodovanja",minbet:"minimalni broj beta",seegames:"Možete vidjeti igre",here:"Ovdje",scheduled:"Zakazano",ongoing:"U tijeku",finished:"Gotovo",startingAt:"S početkom u",startedAt:"Započelo u",startingAtWithTime:"Počinje ",startedAtWithTime:"Započelo ",mostRounds:"Najviše rundi",betCount:"Broj betova",maxWinStakeRatio:"Maksimalni dobitak po ulogu",winStakeRatio:"Ukupni dobitak po ulogu",January:"Siječanj",February:"Veljača",March:"Ožujak",April:"Travanj",May:"Svibanj",June:"Lipanj",July:"Srpanj",August:"Kolovoz",September:"Rujan",October:"Listopad",November:"Studeni",December:"Prosinac",login:"Prijaviti se",register:"Registracija",details:"Detalji",join:"join",joinerror:"Došlo je do pogreške prilikom registracije na turnir, pokušajte ponovno.",left:"lijevo",minutes:"minute",hours:"sati",days:"dani"}},n=(e,t)=>{var i,r;return(null===(i=a[t])||void 0===i?void 0:i[e])||(null===(r=a.en)||void 0===r?void 0:r[e])},o=class{constructor(i){e(this,i),this.userEnrolled=t(this,"TournamentUserEnrolled",7),this.enrolled=!1,this.showReadMore=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.joinButtonLoading=!1,this.errorJoin=!1,this.errorJoinConcurrently=!1}componentWillLoad(){var e;this.translationData&&(e=JSON.parse(this.translationData),Object.keys(e).forEach((t=>{for(let i in e[t])a[t][i]=e[t][i]})))}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 t=new CSSStyleSheet;t.replace(e),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}))}loginAction(){this.loginEvent&&(window.postMessage({type:this.loginEvent,transition:"Login"},window.location.href),"function"==typeof gtag&>ag("event","OpenLoginModal",{context:"TournamentsThumbnailController"})),this.loginUrl&&(location.href=this.loginUrl)}registerAction(){this.registerEvent&&(window.postMessage({type:this.registerEvent,transition:"Register"},window.location.href),"function"==typeof gtag&>ag("event","OpenRegisterModal",{context:"TournamentsThumbnailController"})),this.registerUrl&&(location.href=this.registerUrl)}async joinAction(e,t){var i;this.errorJoin=!1,this.errorJoinConcurrently=!1,window.postMessage({type:"TournamentJoinRequest",tournamentId:e},window.location.href),this.joinButtonLoading=!0;let r=new URL(`${this.endpoint}/v1/bonus/claim`),a=new Headers,n={};r.searchParams.append("language",this.language),r.searchParams.append("platform",(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})()),a.append("Content-Type","application/json"),a.append("X-SessionID",this.session),t&&(n={language:this.language,bonusCode:t,currency:this.currency,type:"tournament"});let o={method:"PUT",headers:a,body:JSON.stringify(n)};const s=()=>{this.joinButtonLoading=!1,this.enrolled=!0,window.postMessage({type:"TournamentUserEnrolled",userenrolled:this.enrolled,tournamentId:e},window.location.href),this.userEnrolled.emit({userenrolled:this.enrolled,tournamentId:e})},u=()=>{this.joinButtonLoading=!1,this.errorJoin=!0},d=await(async()=>{let e;try{e=await fetch(`${this.endpoint}/v1/bonus/claim?${r.searchParams.toString()}`,o),e=await e.json()}catch(e){u()}return e})();if(d)if(1==d.success)s();else if(d.errorMessage.match("VersionMismatchException")){let e;e=await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`,{headers:{"X-SessionID":this.session}}),e=await e.json(),(null===(i=null==e?void 0:e.item)||void 0===i?void 0:i.playerEnrolled)?s():(u(),this.errorJoinConcurrently=!0,this.errorJoin=!1)}else u()}detailAction(e){window.postMessage({type:"TournamentDetailsClicked",tournamentId:e,showLeaderboard:!0},window.location.href)}moreAction(e){window.postMessage({type:"TournamentReadMoreClicked",tournamentId:e},window.location.href)}render(){return i("div",{key:"d67f8cedc9bd513a74b4d9dc798c4c456d7b1d9f",class:"TournamentButtons"},!this.session&&i("div",{key:"7e79834abdd20bf694b096fad0734cc74ccb1f8e",class:"ButtonGroup"},i("button",{key:"273e73693f197ff25d116c3c2e7098d3e80138c7",class:"LoginButton Button",part:"LoginButton",onClick:()=>this.loginAction()},n("login",this.language)),i("button",{key:"72835739c177ce6e872a06183074d2266b3c3d5d",class:"RegisterButton Button",part:"RegisterButton",onClick:()=>this.registerAction()},n("register",this.language))),this.session&&i("div",{key:"746e7fb88ddd2bef5f59212d9f513b62943f80ae"},!this.enrolled&&i("div",{key:"7a33b63adc8255c267afdba2ffe700a0d2033e57",class:"ButtonGroup"},i("button",{key:"95f71a6f41cd65e4dd9dfca0896899f7b8c32dd5",class:"Button",onClick:()=>this.joinAction(this.tournamentId,this.bonusCode)},n("join",this.language)),this.showReadMore&&i("button",{key:"ac961bcbd5dc2a4f1e9267148ecc49a55b75515e",class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},n("readmore",this.language))),this.enrolled&&i("div",{key:"f6a9170663e0aae26da9500fc5efc888bb2dc2ab",class:"ButtonGroup"},i("button",{key:"a94489a7bf6b178199f2d78dfdc41cca77859c96",class:"Button",onClick:()=>this.detailAction(this.tournamentId)},n("details",this.language)),this.showReadMore&&i("button",{key:"f23cefc77e04215e5beb6a39c2643348dce5e576",class:"Button NoBorder",onClick:()=>this.moreAction(this.tournamentId)},n("readmore",this.language)))),(this.errorJoin||this.errorJoinConcurrently)&&i("span",{key:"7accf63f478e52efc879da3775b07286fbc9801b",class:"ErrorText",part:"ErrorText"},n("joinerror",this.language)))}get host(){return r(this)}};o.style=':host{display:block}.ButtonGroup{display:flex;gap:4px}.Button{padding:6px 8px;border-radius:2px;border:1px solid #fff;color:#fff;background:none;position:relative;cursor:pointer}.Button.NoBorder{border:0;padding:7px 8px}.Button::after{content:"";display:block;position:absolute;border-radius:2px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all 0.5s;box-shadow:0 0 10px 10px white}.Button:active::after{box-shadow:0 0 0 0 white;position:absolute;border-radius:2px;left:0;top:0;opacity:1;transition:0s}.Button:active{top:1px}';export{o as casino_tournament_buttons}
|
|
@@ -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-682a5e5e.js');
|
|
6
6
|
|
|
7
7
|
const getDevice = () => {
|
|
8
8
|
let userAgent = window.navigator.userAgent;
|
|
@@ -386,21 +386,22 @@ const CasinoTournamentButtons = class {
|
|
|
386
386
|
constructor(hostRef) {
|
|
387
387
|
index.registerInstance(this, hostRef);
|
|
388
388
|
this.userEnrolled = index.createEvent(this, "TournamentUserEnrolled", 7);
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
this.loginEvent = undefined;
|
|
393
|
-
this.loginUrl = undefined;
|
|
394
|
-
this.registerEvent = undefined;
|
|
395
|
-
this.registerUrl = undefined;
|
|
396
|
-
this.endpoint = undefined;
|
|
397
|
-
this.currency = undefined;
|
|
398
|
-
this.bonusCode = undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Player enrolled
|
|
391
|
+
*/
|
|
399
392
|
this.enrolled = false;
|
|
393
|
+
/**
|
|
394
|
+
* Show read more button
|
|
395
|
+
*/
|
|
400
396
|
this.showReadMore = false;
|
|
397
|
+
/**
|
|
398
|
+
* Client custom styling via inline styles
|
|
399
|
+
*/
|
|
401
400
|
this.clientStyling = '';
|
|
401
|
+
/**
|
|
402
|
+
* Client custom styling via url
|
|
403
|
+
*/
|
|
402
404
|
this.clientStylingUrl = '';
|
|
403
|
-
this.translationData = undefined;
|
|
404
405
|
this.limitStylingAppends = false;
|
|
405
406
|
this.joinButtonLoading = false;
|
|
406
407
|
this.errorJoin = 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-682a5e5e.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-buttons.cjs.js', document.baseURI).href));
|
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-tournament-buttons';
|
|
24
|
-
const BUILD = /* casino-tournament-buttons */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, 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: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
24
|
+
const BUILD = /* casino-tournament-buttons */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, 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: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, 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/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,12 +161,6 @@ var flush = () => {
|
|
|
150
161
|
};
|
|
151
162
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
163
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
|
|
157
|
-
// src/utils/helpers.ts
|
|
158
|
-
var isDef = (v) => v != null;
|
|
159
164
|
var isComplexType = (o) => {
|
|
160
165
|
o = typeof o;
|
|
161
166
|
return o === "object" || o === "function";
|
|
@@ -356,7 +361,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
361
|
}
|
|
357
362
|
if (!appliedStyles.has(scopeId2)) {
|
|
358
363
|
{
|
|
359
|
-
styleElm = doc.createElement("style");
|
|
364
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
360
365
|
styleElm.innerHTML = style;
|
|
361
366
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
362
367
|
if (nonce != null) {
|
|
@@ -366,7 +371,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
366
371
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
367
372
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
368
373
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
369
|
-
styleContainerNode.insertBefore(
|
|
374
|
+
styleContainerNode.insertBefore(
|
|
375
|
+
styleElm,
|
|
376
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
377
|
+
);
|
|
370
378
|
} else if ("host" in styleContainerNode) {
|
|
371
379
|
if (supportsConstructableStylesheets) {
|
|
372
380
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -416,16 +424,18 @@ var attachStyles = (hostRef) => {
|
|
|
416
424
|
endAttachStyles();
|
|
417
425
|
};
|
|
418
426
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
419
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
427
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
420
428
|
if (oldValue !== newValue) {
|
|
421
429
|
let isProp = isMemberInElement(elm, memberName);
|
|
422
430
|
let ln = memberName.toLowerCase();
|
|
423
431
|
if (memberName === "class") {
|
|
424
432
|
const classList = elm.classList;
|
|
425
433
|
const oldClasses = parseClassList(oldValue);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
434
|
+
let newClasses = parseClassList(newValue);
|
|
435
|
+
{
|
|
436
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
437
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
438
|
+
}
|
|
429
439
|
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
430
440
|
if (memberName[2] === "-") {
|
|
431
441
|
memberName = memberName.slice(3);
|
|
@@ -459,7 +469,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
459
469
|
elm.setAttribute(memberName, n);
|
|
460
470
|
}
|
|
461
471
|
}
|
|
462
|
-
} else {
|
|
472
|
+
} else if (elm[memberName] !== newValue) {
|
|
463
473
|
elm[memberName] = newValue;
|
|
464
474
|
}
|
|
465
475
|
} catch (e) {
|
|
@@ -481,24 +491,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
481
491
|
}
|
|
482
492
|
};
|
|
483
493
|
var parseClassListRegex = /\s/;
|
|
484
|
-
var parseClassList = (value) =>
|
|
494
|
+
var parseClassList = (value) => {
|
|
495
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
496
|
+
value = value.baseVal;
|
|
497
|
+
}
|
|
498
|
+
if (!value || typeof value !== "string") {
|
|
499
|
+
return [];
|
|
500
|
+
}
|
|
501
|
+
return value.split(parseClassListRegex);
|
|
502
|
+
};
|
|
485
503
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
486
504
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
487
505
|
|
|
488
506
|
// src/runtime/vdom/update-element.ts
|
|
489
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
507
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
490
508
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
491
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
492
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
509
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
510
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
493
511
|
{
|
|
494
512
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
495
513
|
if (!(memberName in newVnodeAttrs)) {
|
|
496
|
-
setAccessor(
|
|
514
|
+
setAccessor(
|
|
515
|
+
elm,
|
|
516
|
+
memberName,
|
|
517
|
+
oldVnodeAttrs[memberName],
|
|
518
|
+
void 0,
|
|
519
|
+
isSvgMode2,
|
|
520
|
+
newVnode.$flags$);
|
|
497
521
|
}
|
|
498
522
|
}
|
|
499
523
|
}
|
|
500
524
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
501
|
-
setAccessor(
|
|
525
|
+
setAccessor(
|
|
526
|
+
elm,
|
|
527
|
+
memberName,
|
|
528
|
+
oldVnodeAttrs[memberName],
|
|
529
|
+
newVnodeAttrs[memberName],
|
|
530
|
+
isSvgMode2,
|
|
531
|
+
newVnode.$flags$);
|
|
502
532
|
}
|
|
503
533
|
};
|
|
504
534
|
function sortedAttrNames(attrNames) {
|
|
@@ -510,13 +540,10 @@ function sortedAttrNames(attrNames) {
|
|
|
510
540
|
attrNames
|
|
511
541
|
);
|
|
512
542
|
}
|
|
513
|
-
|
|
514
|
-
// src/runtime/vdom/vdom-render.ts
|
|
515
|
-
var scopeId;
|
|
516
543
|
var hostTagName;
|
|
517
544
|
var useNativeShadowDom = false;
|
|
518
545
|
var isSvgMode = false;
|
|
519
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
546
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
520
547
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
521
548
|
let i2 = 0;
|
|
522
549
|
let elm;
|
|
@@ -530,11 +557,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
530
557
|
{
|
|
531
558
|
updateElement(null, newVNode2, isSvgMode);
|
|
532
559
|
}
|
|
533
|
-
const rootNode = elm.getRootNode();
|
|
534
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
535
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
536
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
537
|
-
}
|
|
538
560
|
if (newVNode2.$children$) {
|
|
539
561
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
540
562
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -663,6 +685,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
663
685
|
if (!isInitialRender) {
|
|
664
686
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
665
687
|
}
|
|
688
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
689
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
690
|
+
}
|
|
666
691
|
return true;
|
|
667
692
|
}
|
|
668
693
|
return false;
|
|
@@ -696,8 +721,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
696
721
|
}
|
|
697
722
|
};
|
|
698
723
|
var insertBefore = (parent, newNode, reference) => {
|
|
699
|
-
|
|
700
|
-
|
|
724
|
+
{
|
|
725
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
726
|
+
}
|
|
701
727
|
};
|
|
702
728
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
703
729
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -722,9 +748,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
722
748
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
723
749
|
hostRef.$vnode$ = rootVnode;
|
|
724
750
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
725
|
-
{
|
|
726
|
-
scopeId = hostElm["s-sc"];
|
|
727
|
-
}
|
|
728
751
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
729
752
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
730
753
|
};
|
|
@@ -732,7 +755,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
732
755
|
// src/runtime/update-component.ts
|
|
733
756
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
734
757
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
735
|
-
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
|
+
);
|
|
736
766
|
}
|
|
737
767
|
};
|
|
738
768
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -759,7 +789,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
759
789
|
let maybePromise;
|
|
760
790
|
if (isInitialLoad) {
|
|
761
791
|
{
|
|
762
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
792
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
763
793
|
}
|
|
764
794
|
}
|
|
765
795
|
endSchedule();
|
|
@@ -828,7 +858,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
828
858
|
const instance = hostRef.$lazyInstance$ ;
|
|
829
859
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
830
860
|
{
|
|
831
|
-
safeCall(instance, "componentDidRender");
|
|
861
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
832
862
|
}
|
|
833
863
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
834
864
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -862,12 +892,12 @@ var appDidLoad = (who) => {
|
|
|
862
892
|
}
|
|
863
893
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
864
894
|
};
|
|
865
|
-
var safeCall = (instance, method, arg) => {
|
|
895
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
866
896
|
if (instance && instance[method]) {
|
|
867
897
|
try {
|
|
868
898
|
return instance[method](arg);
|
|
869
899
|
} catch (e) {
|
|
870
|
-
consoleError(e);
|
|
900
|
+
consoleError(e, elm);
|
|
871
901
|
}
|
|
872
902
|
}
|
|
873
903
|
return void 0;
|
|
@@ -910,15 +940,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
910
940
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
911
941
|
members.map(([memberName, [memberFlags]]) => {
|
|
912
942
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
943
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
944
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
945
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
946
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
947
|
+
Object.defineProperty(prototype, memberName, {
|
|
948
|
+
get() {
|
|
949
|
+
{
|
|
950
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
951
|
+
return getValue(this, memberName);
|
|
952
|
+
}
|
|
953
|
+
const ref = getHostRef(this);
|
|
954
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
955
|
+
if (!instance) return;
|
|
956
|
+
return instance[memberName];
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
configurable: true,
|
|
960
|
+
enumerable: true
|
|
961
|
+
});
|
|
962
|
+
}
|
|
913
963
|
Object.defineProperty(prototype, memberName, {
|
|
914
|
-
get() {
|
|
915
|
-
return getValue(this, memberName);
|
|
916
|
-
},
|
|
917
964
|
set(newValue) {
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
965
|
+
const ref = getHostRef(this);
|
|
966
|
+
if (origSetter) {
|
|
967
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
968
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
969
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
970
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
971
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
972
|
+
}
|
|
973
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
974
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
975
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
{
|
|
979
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
980
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
981
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
982
|
+
ref.$onReadyPromise$.then(() => {
|
|
983
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
984
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
const setterSetVal = () => {
|
|
991
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
992
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
993
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
994
|
+
}
|
|
995
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
996
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
997
|
+
};
|
|
998
|
+
if (ref.$lazyInstance$) {
|
|
999
|
+
setterSetVal();
|
|
1000
|
+
} else {
|
|
1001
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
922
1005
|
});
|
|
923
1006
|
}
|
|
924
1007
|
});
|
|
@@ -928,7 +1011,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
928
1011
|
plt.jmp(() => {
|
|
929
1012
|
var _a2;
|
|
930
1013
|
const propName = attrNameToPropName.get(attrName);
|
|
931
|
-
if (this.hasOwnProperty(propName)) {
|
|
1014
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
932
1015
|
newValue = this[propName];
|
|
933
1016
|
delete this[propName];
|
|
934
1017
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -948,7 +1031,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
948
1031
|
}
|
|
949
1032
|
return;
|
|
950
1033
|
}
|
|
951
|
-
|
|
1034
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1035
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1036
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1037
|
+
this[propName] = newValue;
|
|
1038
|
+
}
|
|
952
1039
|
});
|
|
953
1040
|
};
|
|
954
1041
|
Cstr.observedAttributes = Array.from(
|
|
@@ -975,9 +1062,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
975
1062
|
let Cstr;
|
|
976
1063
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
977
1064
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1065
|
+
{
|
|
1066
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
981
1067
|
if (CstrImport && "then" in CstrImport) {
|
|
982
1068
|
const endLoad = uniqueTime();
|
|
983
1069
|
Cstr = await CstrImport;
|
|
@@ -999,16 +1085,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
999
1085
|
try {
|
|
1000
1086
|
new Cstr(hostRef);
|
|
1001
1087
|
} catch (e) {
|
|
1002
|
-
consoleError(e);
|
|
1088
|
+
consoleError(e, elm);
|
|
1003
1089
|
}
|
|
1004
1090
|
{
|
|
1005
1091
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1006
1092
|
}
|
|
1007
1093
|
endNewInstance();
|
|
1008
|
-
} else {
|
|
1009
|
-
Cstr = elm.constructor;
|
|
1010
|
-
const cmpTag = elm.localName;
|
|
1011
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1012
1094
|
}
|
|
1013
1095
|
if (Cstr && Cstr.style) {
|
|
1014
1096
|
let style;
|
|
@@ -1031,7 +1113,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1031
1113
|
schedule();
|
|
1032
1114
|
}
|
|
1033
1115
|
};
|
|
1034
|
-
var fireConnectedCallback = (instance) => {
|
|
1116
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1035
1117
|
};
|
|
1036
1118
|
|
|
1037
1119
|
// src/runtime/connected-callback.ts
|
|
@@ -1071,7 +1153,7 @@ var connectedCallback = (elm) => {
|
|
|
1071
1153
|
endConnected();
|
|
1072
1154
|
}
|
|
1073
1155
|
};
|
|
1074
|
-
var disconnectInstance = (instance) => {
|
|
1156
|
+
var disconnectInstance = (instance, elm) => {
|
|
1075
1157
|
};
|
|
1076
1158
|
var disconnectedCallback = async (elm) => {
|
|
1077
1159
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1080,6 +1162,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1080
1162
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1081
1163
|
}
|
|
1082
1164
|
}
|
|
1165
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1166
|
+
rootAppliedStyles.delete(elm);
|
|
1167
|
+
}
|
|
1168
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1169
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1170
|
+
}
|
|
1083
1171
|
};
|
|
1084
1172
|
|
|
1085
1173
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1156,6 +1244,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1156
1244
|
}
|
|
1157
1245
|
disconnectedCallback() {
|
|
1158
1246
|
plt.jmp(() => disconnectedCallback(this));
|
|
1247
|
+
plt.raf(() => {
|
|
1248
|
+
var _a3;
|
|
1249
|
+
const hostRef = getHostRef(this);
|
|
1250
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1251
|
+
delete hostRef.$vnode$.$elm$;
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1159
1254
|
}
|
|
1160
1255
|
componentOnReady() {
|
|
1161
1256
|
return getHostRef(this).$onReadyPromise$;
|