@everymatrix/casino-tournaments-ingame-table 0.4.4 → 0.4.6

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.
Files changed (22) hide show
  1. package/dist/casino-tournaments-ingame-table/{casino-tournaments-ingame-table-27a040da.js → casino-tournaments-ingame-table-fc7d6964.js} +2 -2
  2. package/dist/casino-tournaments-ingame-table/casino-tournaments-ingame-table.entry.js +1 -1
  3. package/dist/casino-tournaments-ingame-table/casino-tournaments-ingame-table.esm.js +1 -1
  4. package/dist/casino-tournaments-ingame-table/index-1c9a8460.js +2 -0
  5. package/dist/casino-tournaments-ingame-table/index.esm.js +1 -1
  6. package/dist/cjs/{casino-tournaments-ingame-table-8e663fa2.js → casino-tournaments-ingame-table-13ec7f67.js} +10 -3
  7. package/dist/cjs/casino-tournaments-ingame-table.cjs.entry.js +2 -2
  8. package/dist/cjs/casino-tournaments-ingame-table.cjs.js +2 -2
  9. package/dist/cjs/{index-666544d1.js → index-1fe935ba.js} +69 -2
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/components/casino-tournaments-ingame-table/casino-tournaments-ingame-table.css +1 -0
  13. package/dist/collection/components/casino-tournaments-ingame-table/casino-tournaments-ingame-table.js +17 -1
  14. package/dist/esm/{casino-tournaments-ingame-table-27a040da.js → casino-tournaments-ingame-table-fc7d6964.js} +10 -3
  15. package/dist/esm/casino-tournaments-ingame-table.entry.js +2 -2
  16. package/dist/esm/casino-tournaments-ingame-table.js +3 -3
  17. package/dist/esm/{index-448538d5.js → index-1c9a8460.js} +69 -2
  18. package/dist/esm/index.js +2 -2
  19. package/dist/esm/loader.js +3 -3
  20. package/dist/types/components/casino-tournaments-ingame-table/casino-tournaments-ingame-table.d.ts +1 -0
  21. package/package.json +1 -1
  22. package/dist/casino-tournaments-ingame-table/index-448538d5.js +0 -2
@@ -1,7 +1,7 @@
1
- import{r as t,c as i,h as e}from"./index-448538d5.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function r(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i,e,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return e=function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i),e;window[n]||(window[n]={}),e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const s=t.getRootNode(),r=window[n];let o=r[i]&&r[i].sheet;o?r[i].refCount=r[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(e),r[i]={sheet:o,refCount:1});const a=s.adoptedStyleSheets||[];a.includes(o)||(s.adoptedStyleSheets=[...a,o])}))}(t,i);const r=e.unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[n][i]){const t=window[n][i];t.refCount>1?t.refCount=t.refCount-1:delete window[n][i]}r()},e}const a={en:{you:"You",loading:"Loading, please wait ...",leaderboard:"Leaderboard",nowinners:"No winners for the time being. Be one of them!",noLeaderboard:"No Leaderboard yet",positionsWillShow:"Player positions will appear here once scores are recorded."}},h=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{a[i]||(a[i]={});for(let e in t[i])a[i][e]=t[i][e]})),i(!0)}))})),l=(t,i,e)=>{let n=a[void 0!==i&&i in a?i:"en"][t];if(void 0!==e)for(const[t,i]of Object.entries(e.values)){const e=new RegExp(`{${t}}`,"g");n=n.replace(e,i)}return n},d=()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"};var c,u,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},v={exports:{}};
1
+ import{r as t,c as i,h as e}from"./index-1c9a8460.js";const n="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function r(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i,e,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return e=function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i),e;window[n]||(window[n]={}),e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const s=t.getRootNode(),r=window[n];let o=r[i]&&r[i].sheet;o?r[i].refCount=r[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(e),r[i]={sheet:o,refCount:1});const a=s.adoptedStyleSheets||[];a.includes(o)||(s.adoptedStyleSheets=[...a,o])}))}(t,i);const r=e.unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[n][i]){const t=window[n][i];t.refCount>1?t.refCount=t.refCount-1:delete window[n][i]}r()},e}const a={en:{you:"You",loading:"Loading, please wait ...",leaderboard:"Leaderboard",nowinners:"No winners for the time being. Be one of them!",noLeaderboard:"No Leaderboard yet",positionsWillShow:"Player positions will appear here once scores are recorded."}},h=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{a[i]||(a[i]={});for(let e in t[i])a[i][e]=t[i][e]})),i(!0)}))})),l=(t,i,e)=>{let n=a[void 0!==i&&i in a?i:"en"][t];if(void 0!==e)for(const[t,i]of Object.entries(e.values)){const e=new RegExp(`{${t}}`,"g");n=n.replace(e,i)}return n},d=()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"};var c,u,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},v={exports:{}};
2
2
  /** @license
3
3
  * eventsource.js
4
4
  * Available under MIT License (MIT)
5
5
  * https://github.com/Yaffle/EventSource/
6
6
  */
7
- c=v,u=v.exports,function(t){var i=t.setTimeout,e=t.clearTimeout,n=t.XMLHttpRequest,s=t.XDomainRequest,r=t.ActiveXObject,o=t.EventSource,a=t.document,h=t.Promise,l=t.fetch,d=t.Response,f=t.TextDecoder,v=t.TextEncoder,p=t.AbortController;if("undefined"==typeof window||void 0===a||"readyState"in a||null!=a.body||(a.readyState="loading",window.addEventListener("load",(function(){a.readyState="complete"}),!1)),null==n&&null!=r&&(n=function(){return new r("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function i(){}return i.prototype=t,new i}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==p){var g=l;l=function(t,i){var e=i.signal;return g(t,{headers:i.headers,credentials:i.credentials,cache:i.cache}).then((function(t){var i=t.body.getReader();return e._reader=i,e._aborted&&e._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return i}}}}))},p=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function w(){this.bitsNeeded=0,this.codePoint=0}w.prototype.decode=function(t){function i(t,i,e){if(1===e)return t>=128>>i&&t<<i<=2047;if(2===e)return t>=2048>>i&&t<<i<=55295||t>=57344>>i&&t<<i<=65535;if(3===e)return t>=65536>>i&&t<<i<=1114111;throw new Error}function e(t,i){if(6===t)return i>>6>15?3:i>31?2:1;if(12===t)return i>15?3:2;if(18===t)return 3;throw new Error}for(var n=65533,s="",r=this.bitsNeeded,o=this.codePoint,a=0;a<t.length;a+=1){var h=t[a];0!==r&&(h<128||h>191||!i(o<<6|63&h,r-6,e(r,o)))&&(r=0,o=n,s+=String.fromCharCode(o)),0===r?(h>=0&&h<=127?(r=0,o=h):h>=192&&h<=223?(r=6,o=31&h):h>=224&&h<=239?(r=12,o=15&h):h>=240&&h<=247?(r=18,o=7&h):(r=0,o=n),0===r||i(o,r,e(r,o))||(r=0,o=n)):(r-=6,o=o<<6|63&h),0===r&&(o<=65535?s+=String.fromCharCode(o):(s+=String.fromCharCode(55296+(o-65535-1>>10)),s+=String.fromCharCode(56320+(o-65535-1&1023))))}return this.bitsNeeded=r,this.codePoint=o,s},null!=f&&null!=v&&function(){try{return"test"===(new f).decode((new v).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(f=w);var b=function(){};function m(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=b}function y(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function L(t){for(var i=Object.create(null),e=t.split("\r\n"),n=0;n<e.length;n+=1){var s=e[n].split(": "),r=s.shift(),o=s.join(": ");i[y(r)]=o}this._map=i}function S(){}function k(t){this._headers=t}function x(){}function T(){this._listeners=Object.create(null)}function R(t){i((function(){throw t}),0)}function C(t){this.type=t,this.target=void 0}function W(t,i){C.call(this,t),this.data=i.data,this.lastEventId=i.lastEventId}function P(t,i){C.call(this,t),this.status=i.status,this.statusText=i.statusText,this.headers=i.headers}function A(t,i){C.call(this,t),this.error=i.error}m.prototype.open=function(t,s){this._abort(!0);var r=this,o=this._xhr,a=1,h=0;this._abort=function(t){0!==r._sendTimeout&&(e(r._sendTimeout),r._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,o.onload=b,o.onerror=b,o.onabort=b,o.onprogress=b,o.onreadystatechange=b,o.abort(),0!==h&&(e(h),h=0),t||(r.readyState=4,r.onabort(null),r.onreadystatechange())),a=0};var l=function(){if(1===a){var t=0,i="",e=void 0;if("contentType"in o)t=200,i="OK",e=o.contentType;else try{t=o.status,i=o.statusText,e=o.getResponseHeader("Content-Type")}catch(n){t=0,i="",e=void 0}0!==t&&(a=2,r.readyState=2,r.status=t,r.statusText=i,r._contentType=e,r.onreadystatechange())}},d=function(){if(l(),2===a||3===a){a=3;var t="";try{t=o.responseText}catch(t){}r.readyState=3,r.responseText=t,r.onprogress()}},c=function(t,i){if(null!=i&&null!=i.preventDefault||(i={preventDefault:b}),d(),1===a||2===a||3===a){if(a=4,0!==h&&(e(h),h=0),r.readyState=4,"load"===t)r.onload(i);else if("error"===t)r.onerror(i);else{if("abort"!==t)throw new TypeError;r.onabort(i)}r.onreadystatechange()}},u=function(){h=i((function(){u()}),500),3===o.readyState&&d()};"onload"in o&&(o.onload=function(t){c("load",t)}),"onerror"in o&&(o.onerror=function(t){c("error",t)}),"onabort"in o&&(o.onabort=function(t){c("abort",t)}),"onprogress"in o&&(o.onprogress=d),"onreadystatechange"in o&&(o.onreadystatechange=function(t){!function(t){null!=o&&(4===o.readyState?"onload"in o&&"onerror"in o&&"onabort"in o||c(""===o.responseText?"error":"load",t):3===o.readyState?"onprogress"in o||d():2===o.readyState&&l())}(t)}),!("contentType"in o)&&"ontimeout"in n.prototype||(s+=(-1===s.indexOf("?")?"?":"&")+"padding=true"),o.open(t,s,!0),"readyState"in o&&(h=i((function(){u()}),0))},m.prototype.abort=function(){this._abort(!1)},m.prototype.getResponseHeader=function(){return this._contentType},m.prototype.setRequestHeader=function(t,i){var e=this._xhr;"setRequestHeader"in e&&e.setRequestHeader(t,i)},m.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},m.prototype.send=function(){if("ontimeout"in n.prototype&&("sendAsBinary"in n.prototype||"mozAnon"in n.prototype)||null==a||null==a.readyState||"complete"===a.readyState){var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(t){throw t}}else{var e=this;e._sendTimeout=i((function(){e._sendTimeout=0,e.send()}),4)}},L.prototype.get=function(t){return this._map[y(t)]},null!=n&&null==n.HEADERS_RECEIVED&&(n.HEADERS_RECEIVED=2),S.prototype.open=function(t,i,e,s,r,o,a){t.open("GET",r);var h=0;for(var l in t.onprogress=function(){var i=t.responseText.slice(h);h+=i.length,e(i)},t.onerror=function(t){t.preventDefault(),s(new Error("NetworkError"))},t.onload=function(){s(null)},t.onabort=function(){s(null)},t.onreadystatechange=function(){if(t.readyState===n.HEADERS_RECEIVED){var e=t.status,s=t.statusText,r=t.getResponseHeader("Content-Type"),o=t.getAllResponseHeaders();i(e,s,r,new L(o))}},t.withCredentials=o,a)Object.prototype.hasOwnProperty.call(a,l)&&t.setRequestHeader(l,a[l]);return t.send(),t},k.prototype.get=function(t){return this._headers.get(t)},x.prototype.open=function(t,i,e,n,s,r,o){var a=null,d=new p,c=d.signal,u=new f;return l(s,{headers:o,credentials:r?"include":"same-origin",signal:c,cache:"no-store"}).then((function(t){return a=t.body.getReader(),i(t.status,t.statusText,t.headers.get("Content-Type"),new k(t.headers)),new h((function(t,i){var n=function(){a.read().then((function(i){if(i.done)t(void 0);else{var s=u.decode(i.value,{stream:!0});e(s),n()}})).catch((function(t){i(t)}))};n()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){n(t)})),{abort:function(){null!=a&&a.cancel(),d.abort()}}},T.prototype.dispatchEvent=function(t){t.target=this;var i=this._listeners[t.type];if(null!=i)for(var e=i.length,n=0;n<e;n+=1){var s=i[n];try{"function"==typeof s.handleEvent?s.handleEvent(t):s.call(this,t)}catch(t){R(t)}}},T.prototype.addEventListener=function(t,i){t=String(t);var e=this._listeners,n=e[t];null==n&&(e[t]=n=[]);for(var s=!1,r=0;r<n.length;r+=1)n[r]===i&&(s=!0);s||n.push(i)},T.prototype.removeEventListener=function(t,i){t=String(t);var e=this._listeners,n=e[t];if(null!=n){for(var s=[],r=0;r<n.length;r+=1)n[r]!==i&&s.push(n[r]);0===s.length?delete e[t]:e[t]=s}},W.prototype=Object.create(C.prototype),P.prototype=Object.create(C.prototype),A.prototype=Object.create(C.prototype);var E=/^text\/event\-stream(;.*)?$/i,O=function(t,i){var e=null==t?i:parseInt(t,10);return e!=e&&(e=i),I(e)},I=function(t){return Math.min(Math.max(t,1e3),18e6)},N=function(t,i,e){try{"function"==typeof i&&i.call(t,e)}catch(t){R(t)}};function $(t,r){T.call(this),r=r||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,r,o){r=String(r);var a=Boolean(o.withCredentials),h=o.lastEventIdQueryParameterName||"lastEventId",l=I(1e3),d=O(o.heartbeatTimeout,45e3),c="",u=l,f=!1,v=0,p=o.headers||{},g=o.Transport,w=D&&null==g?void 0:new m(null!=g?new g:null!=n&&"withCredentials"in n.prototype||null==s?new n:new s),b=null!=g&&"string"!=typeof g?new g:null==w?new x:new S,y=void 0,L=0,k=-1,T="",R="",C="",$="",M=0,U=0,j=0,_=function(i,e,n,s){if(0===k)if(200===i&&null!=n&&E.test(n)){k=1,f=Date.now(),u=l,t.readyState=1;var r=new P("open",{status:i,statusText:e,headers:s});t.dispatchEvent(r),N(t,t.onopen,r)}else{var o="";200!==i?(e&&(e=e.replace(/\s+/g," ")),o="EventSource's response has a status "+i+" "+e+" that is not 200. Aborting the connection."):o="EventSource's response has a Content-Type specifying an unsupported type: "+(null==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",F(),r=new P("error",{status:i,statusText:e,headers:s}),t.dispatchEvent(r),N(t,t.onerror,r),console.error(o)}},B=function(n){if(1===k){for(var s=-1,r=0;r<n.length;r+=1)(h=n.charCodeAt(r))!=="\n".charCodeAt(0)&&h!=="\r".charCodeAt(0)||(s=r);var o=(-1!==s?$:"")+n.slice(0,s+1);$=(-1===s?$:"")+n.slice(s+1),""!==n&&(f=Date.now(),v+=n.length);for(var a=0;a<o.length;a+=1){var h=o.charCodeAt(a);if(-1===M&&h==="\n".charCodeAt(0))M=0;else if(-1===M&&(M=0),h==="\r".charCodeAt(0)||h==="\n".charCodeAt(0)){if(0!==M){1===M&&(j=a+1);var p=o.slice(U,j-1),g=o.slice(j+(j<a&&o.charCodeAt(j)===" ".charCodeAt(0)?1:0),a);"data"===p?(T+="\n",T+=g):"id"===p?R=g:"event"===p?C=g:"retry"===p?(l=O(g,l),u=l):"heartbeatTimeout"===p&&(d=O(g,d),0!==L&&(e(L),L=i((function(){H()}),d)))}if(0===M){if(""!==T){c=R,""===C&&(C="message");var w=new W(C,{data:T.slice(1),lastEventId:R});if(t.dispatchEvent(w),"open"===C?N(t,t.onopen,w):"message"===C?N(t,t.onmessage,w):"error"===C&&N(t,t.onerror,w),2===k)return}T="",C=""}M=h==="\r".charCodeAt(0)?-1:0}else 0===M&&(U=a,M=1),1===M?h===":".charCodeAt(0)&&(j=a+1,M=2):2===M&&(M=3)}}},z=function(n){if(1===k||0===k){k=-1,0!==L&&(e(L),L=0),L=i((function(){H()}),u),u=I(Math.min(16*l,2*u)),t.readyState=0;var s=new A("error",{error:n});t.dispatchEvent(s),N(t,t.onerror,s),null!=n&&console.error(n)}},F=function(){k=2,null!=y&&(y.abort(),y=void 0),0!==L&&(e(L),L=0),t.readyState=2},H=function(){if(L=0,-1===k){f=!1,v=0,L=i((function(){H()}),d),k=0,T="",C="",R=c,$="",U=0,j=0,M=0;var e=r;if("data:"!==r.slice(0,5)&&"blob:"!==r.slice(0,5)&&""!==c){var n=r.indexOf("?");e=-1===n?r:r.slice(0,n+1)+r.slice(n+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,i){return i===h?"":t})),e+=(-1===r.indexOf("?")?"?":"&")+h+"="+encodeURIComponent(c)}var s=t.withCredentials,o={Accept:"text/event-stream"},a=t.headers;if(null!=a)for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l]);try{y=b.open(w,_,B,z,e,s,o)}catch(t){throw F(),t}}else if(f||null==y){var u=Math.max((f||Date.now())+d-Date.now(),1);f=!1,L=i((function(){H()}),u)}else z(new Error("No activity within "+d+" milliseconds. "+(0===k?"No response received.":v+" chars received.")+" Reconnecting.")),null!=y&&(y.abort(),y=void 0)};t.url=r,t.readyState=0,t.withCredentials=a,t.headers=p,t._close=F,H()}(this,t,r)}var D=null!=l&&null!=d&&"body"in d.prototype;($.prototype=Object.create(T.prototype)).CONNECTING=0,$.prototype.OPEN=1,$.prototype.CLOSED=2,$.prototype.close=function(){this._close()},$.CONNECTING=0,$.OPEN=1,$.CLOSED=2,$.prototype.withCredentials=void 0;var M,U=o;null==n||null!=o&&"withCredentials"in o.prototype||(U=$),M=function(t){t.EventSourcePolyfill=$,t.NativeEventSource=o,t.EventSource=U}(u),void 0!==M&&(c.exports=M)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:f:globalThis);const p=class{constructor(e){t(this,e),this.leaderboardLoaded=i(this,"leaderboardLoaded",7),this.isCurrentOnTop=!1,this.isCurrentPlayerRanked=!1,this.timeOrder1=500,this.timeOrder2=1e3,this.isMobile=!1,this.abortController=null,this.autoLocateCurrent=!1,this.keepOnBottom=!0,this.shouldUpdateObserver=!1,this.onLeaderboardScroll=t=>{t.stopPropagation(),(this.isLoadingPrevious||this.isLoadingMore||this.isPageRendering)&&t.preventDefault()},this.updateMessageHandler=t=>{if(!t.data)return;const i=JSON.parse(t.data);if("LeaderBoardUpdate"===i.messageType){const{item:t,items:e,total:n}=i;(t||this.currentUserData)&&(this.currentUserData=t||this.currentUserData,this.currentUserData.formattedScore=this.formatScore(this.currentUserData.score)),this.leaderboardLoaded.emit({item:this.currentUserData?this.currentUserData:null,isRanked:!!t,totalRank:n}),e.forEach((t=>{const i=this.leaderboard.findIndex((i=>i.rank===t.rank));i>=0&&(this.leaderboard[i]=t),t.formattedScore=this.formatScore(t.score),i<0?this.leaderboard.push(t):this.leaderboard[i]=t})),this.leaderboard=[...this.leaderboard],this.shouldUpdateObserver=!0}},this.goToCurrentPlayerPage=()=>{this.leaderboard.findIndex((t=>t.id===this.currentUserData.id))>=0?this.scrollCurrentPlayerToMiddle():(this.offset=this.currentUserData.rank-this.limit/2||0,this.leaderboard=[],this.isLeaderboardLoading=!0,this.loadLeaderboardById().catch(console.error),this.isCurrentPlayerInview=!0)},this.handleTableListScroll=()=>{this.isCurrentPlayerInview=this.isElementInViewport()},this.isPageRendering=!1,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.tournamentId=void 0,this.endpoint=void 0,this.session=void 0,this.language="en",this.limit=40,this.theme="Dark",this.state=void 0,this.offset=0,this.currentUserData=void 0,this.leaderboard=[],this.isLeaderboardLoading=!0,this.isLoadingMore=!1,this.isCurrentPlayerInview=!0,this.isLoadingPrevious=!1,this.scorefractiondigit=2}mergeSortedArrays(t,i,e){if(!(null==t?void 0:t.length))return i;if(!(null==i?void 0:i.length))return t;const n=new Map;t.forEach(((t,i)=>{n.set(t[e],i)}));let s=[...t];const r=[];return i.forEach((t=>{const i=t[e];n.has(i)?s[n.get(i)]=t:r.push(t)})),r.length?(s=[],s=r[r.length-1][e]<t[0][e]?[...r,...t]:[...t,...r],s):t}formatScore(t){const i=Number(this.scorefractiondigit)||2;return t.toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i})}async loadLeaderboardById(){if(this.abortController&&this.abortController.abort(),this.isLoadingMore)return;this.abortController=new AbortController,this.isLoadingMore=!0;let t=new URL(`${this.endpoint}/v1/tournaments/${this.tournamentId}/leaderboard?language=${this.language}`);t.searchParams.set("filter","includeUnqualifiedPlayer=true"),t.searchParams.set("pagination",`offset=${this.offset},limit=${this.limit}`),t.searchParams.set("platform",d());let i={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};await fetch(t,i).then((t=>t.json())).then((i=>{var e;const{item:n,items:s,total:r}=i;if(this.isCurrentPlayerRanked=!!n,this.isCurrentPlayerRanked){if(this.currentUserData=n,this.currentUserData.formattedScore=this.formatScore(this.currentUserData.score),this.isLeaderboardLoading){if(this.offset>0)this.scrollCurrentPlayerToMiddle();else if(0===this.offset&&this.autoLocateCurrent&&this.currentUserData.rank>this.limit)return this.offset=this.currentUserData.rank-this.limit/2||0,this.leaderboardLoaded.emit({item:this.currentUserData,leaderboardOffset:this.offset,isRanked:!0,totalRank:r}),void this.loadLeaderboardById().catch(console.error)}else this.isLoadingPrevious&&this.resetScrollTop();this.shouldUpdateObserver=!0}this.total=r,this.leaderboardLoaded.emit({item:this.currentUserData,leaderboardOffset:this.offset,isRanked:this.isCurrentPlayerRanked,totalRank:r}),this.leaderboard=this.mergeSortedArrays(this.leaderboard,s,"rank"),null===(e=this.leaderboard)||void 0===e||e.forEach((t=>t.formattedScore=this.formatScore(t.score))),this.startScrollObersever(),this.reStartUpSSEUpdater(t),this.isLeaderboardLoading=!1}),(t=>{this.isLeaderboardLoading=!1,"AbortError"===t.name?console.log("Request aborted because a new one started or component unmounted."):console.error("Network error",t)})).finally((()=>{this.isLoadingMore=!1}))}startScrollObersever(){this.topLastTimer&&clearTimeout(this.topLastTimer),this.topLastTimer=setTimeout((()=>{this.total<=this.limit||(1!==this.leaderboard[0].rank&&this.startTopRankObserver(),this.leaderboard[this.leaderboard.length-1].rank<this.total&&this.startLastRankObserver())}),this.timeOrder2)}scrollCurrentPlayerToMiddle(){setTimeout((()=>{if(!this.tableListEle||!this.tableListEle.querySelectorAll(".Active").length)return;const t=this.tableListEle.querySelectorAll(".Active")[0],i=this.stylingContainer.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight;let n=Math.min((e-i.top)/2-t.clientHeight,4*t.clientHeight);n=Math.max(n,t.clientHeight),this.tableListEle.scrollTo({top:t.offsetTop-n,behavior:"smooth"})}),this.timeOrder1)}onStateChanged(){switch(this.state){case"Closed":case"Closing":this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler),this.leaderboardUpdater=null)}}reStartUpSSEUpdater(t){var i;if(this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler)),"Running"!==this.state)return;t.searchParams.set("pagination",`offset=${this.leaderboard.length?this.leaderboard[0].rank-1:0},limit=${(null===(i=this.leaderboard)||void 0===i?void 0:i.length)>this.limit?this.leaderboard.length:this.limit}`);let e=new URL(`${this.endpoint}/v1/tournaments/${this.tournamentId}/leaderboard/updates?${t.searchParams.toString()}`);this.leaderboardUpdater=new v.exports.EventSourcePolyfill(e,{headers:{accept:"text/event-stream","X-SessionId":this.session}}),this.leaderboardUpdater.addEventListener("message",this.updateMessageHandler)}startActivePlayerObserver(){this.activePlayerObserver&&this.activePlayerEle&&this.activePlayerObserver.unobserve(this.activePlayerEle),this.activePlayerObserver=new IntersectionObserver((t=>{t.forEach((t=>{if(this.isCurrentPlayerInview=t.isIntersecting,!t.isIntersecting){const t=this.activePlayerEle.getBoundingClientRect();this.keepOnBottom||(this.isCurrentOnTop=t.top<this.stylingContainer.offsetTop)}}))})),this.activePlayerEle=this.tableListEle.querySelectorAll(".Active")[0],this.activePlayerObserver.observe(this.activePlayerEle)}startTopRankObserver(){this.topRankToObserved&&(this.topMoreObserver.unobserve(this.topRankToObserved),this.topRankToObserved=null),this.topMoreObserver||(this.topMoreObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.loadPreMore(),this.topMoreObserver.unobserve(t.target))}))}))),setTimeout((()=>{var t;this.topRankToObserved=null===(t=this.tableListEle)||void 0===t?void 0:t.querySelector("#Rank_1"),this.topRankToObserved&&this.topMoreObserver.observe(this.topRankToObserved)}),this.timeOrder2)}startLastRankObserver(){var t;this.lastRankToObserved&&(this.loadMoreObserver.unobserve(this.lastRankToObserved),this.lastRankToObserved=null),this.loadMoreObserver||(this.loadMoreObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.loadMore(),this.loadMoreObserver.unobserve(t.target))}))}))),this.lastRankToObserved=null===(t=this.tableListEle)||void 0===t?void 0:t.querySelector("#Rank_"+(this.leaderboard.length-1)),this.lastRankToObserved&&this.loadMoreObserver.observe(this.lastRankToObserved)}resetScrollTop(){this.isLoadingPrevious=!1,setTimeout((()=>{const t=this.tableListEle;t.scrollTop=this.previousScrollTop+(t.scrollHeight-this.previousScrollHeight)}),100)}loadPreMore(){var t;if((null===(t=this.leaderboard)||void 0===t?void 0:t.length)&&1===this.leaderboard[0].rank||this.isLoadingPrevious)return;this.offset=this.leaderboard[0].rank-1-this.limit||0;const i=this.tableListEle;this.previousScrollHeight=i.scrollHeight,this.previousScrollTop=i.scrollTop,this.isLoadingPrevious=!0,this.preTopRank=this.leaderboard[0].rank,this.loadLeaderboardById().catch(console.error)}loadMore(){var t;(null===(t=this.leaderboard)||void 0===t?void 0:t.length)>=this.total||(this.offset+=this.limit,this.offset=this.offset>this.total?this.total:this.offset,this.loadLeaderboardById().catch(console.error))}isElementInViewport(){const t=this.tableListEle.querySelector(".Active");if(!t)return!1;const i=t.getBoundingClientRect();return this.isCurrentOnTop=i.top<this.stylingContainer.offsetTop,i.top>=0&&i.top>this.stylingContainer.offsetTop&&i.bottom<=this.stylingContainer.offsetTop+this.stylingContainer.offsetHeight&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onTournamentIdChanged(){this.disconnectedCallback(),this.endpoint&&this.session&&!(this.session.length<10)&&this.tournamentId&&(this.isLeaderboardLoading=!0,this.resetLeaderboardStatus(),this.loadLeaderboardById().catch(console.error))}resetLeaderboardStatus(){this.offset=0,this.leaderboard=[]}async componentWillLoad(){switch(this.state){case"Running":this.loadLeaderboardById().catch(console.error);break;case"Unstarted":this.isLeaderboardLoading=!1,this.resetLeaderboardStatus()}this.translationUrl.length>2&&await h(this.translationUrl)}render(){var t;return e("div",{key:"15498957cba65f21cbae5c9fddd4a35283f9848c",class:`LeaderboardWrapper ${this.theme} ${this.isMobile?"Mobile":""}`,ref:t=>this.stylingContainer=t},this.isLeaderboardLoading?e("div",{class:"Loading"}," ",l("loading",this.language)," "):[e("div",null,!this.isCurrentPlayerInview&&this.isCurrentOnTop&&this.currentUserData&&e("div",{class:"PlayerRank Active"},e("div",{class:"Rank"},0===this.currentUserData.rank?"--":this.currentUserData.rank),e("div",{class:"Name"},l("you",this.language)),e("div",{class:"Score"},this.currentUserData.formattedScore),e("div",{class:"Prize"},this.currentUserData.prizeName))),this.isLoadingPrevious&&e("div",null,"Loading"),e("div",{class:"Leaderboard",onScroll:this.onLeaderboardScroll,onTouchMove:this.onLeaderboardScroll,ref:t=>this.tableListEle=t},(null===(t=this.leaderboard)||void 0===t?void 0:t.length)?this.leaderboard.map(((t,i)=>{var n,s;return e("div",{id:`Rank_${i}`,class:`PlayerRank ${this.isLoadingPrevious&&t.rank<this.preTopRank?"Hidden":""} ${(null===(n=this.currentUserData)||void 0===n?void 0:n.id)===t.id?"Active":""}`},e("div",{class:"Rank"},0===t.rank?"":t.rank),e("div",{class:"Name"},(null===(s=this.currentUserData)||void 0===s?void 0:s.id)===t.id?l("you",this.language):t.shortName),e("div",{class:"Score"},t.formattedScore),e("div",{class:"Prize"},t.prizeName))})):e("div",{class:"NoWinners"},e("div",{class:"Title"}," ",l("noLeaderboard",this.language)," "),e("div",{class:"Info"}," ",l("positionsWillShow",this.language)," "))),this.isLoadingMore&&!this.isLoadingPrevious&&e("div",null,"Loading"),!this.isCurrentPlayerInview&&e("div",{class:this.isCurrentOnTop?"":"Bottom"},!this.isCurrentOnTop&&this.currentUserData&&e("div",{class:"PlayerRank Active",onClick:this.goToCurrentPlayerPage},e("div",{class:"Rank"},0===this.currentUserData.rank?"--":this.currentUserData.rank),e("div",{class:"Name"},l("you",this.language)),e("div",{class:"Score"},this.currentUserData.formattedScore),e("div",{class:"Prize"},this.currentUserData.prizeName)))])}handleClientStylingChange(t,i){t!=i&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillRender(){this.isPageRendering=!0}componentDidRender(){this.isPageRendering=!1,this.shouldUpdateObserver&&(this.shouldUpdateObserver=!1,this.tableListEle&&this.tableListEle.querySelector(".Active")?this.startActivePlayerObserver():this.isCurrentPlayerInview=!1)}handleNewTranslations(){h(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)),this.isMobile="PC"!==d(),this.stylingContainer.addEventListener("touchmove",(t=>{t.stopPropagation(),t.preventDefault()}),{passive:!1})}disconnectedCallback(){this.abortController&&this.abortController.abort("Disconnected callback"),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler)),this.loadMoreObserver&&this.loadMoreObserver.disconnect(),this.topMoreObserver&&this.topMoreObserver.disconnect(),this.activePlayerObserver&&this.activePlayerObserver.disconnect(),this.tableListEle&&this.tableListEle.removeEventListener("scroll",this.handleTableListScroll)}static get watchers(){return{state:["onStateChanged"],tournamentId:["onTournamentIdChanged"],endpoint:["onTournamentIdChanged"],session:["onTournamentIdChanged"],language:["onTournamentIdChanged"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};p.style=":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";export{p as C}
7
+ c=v,u=v.exports,function(t){var i=t.setTimeout,e=t.clearTimeout,n=t.XMLHttpRequest,s=t.XDomainRequest,r=t.ActiveXObject,o=t.EventSource,a=t.document,h=t.Promise,l=t.fetch,d=t.Response,f=t.TextDecoder,v=t.TextEncoder,p=t.AbortController;if("undefined"==typeof window||void 0===a||"readyState"in a||null!=a.body||(a.readyState="loading",window.addEventListener("load",(function(){a.readyState="complete"}),!1)),null==n&&null!=r&&(n=function(){return new r("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function i(){}return i.prototype=t,new i}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==p){var g=l;l=function(t,i){var e=i.signal;return g(t,{headers:i.headers,credentials:i.credentials,cache:i.cache}).then((function(t){var i=t.body.getReader();return e._reader=i,e._aborted&&e._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return i}}}}))},p=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function b(){this.bitsNeeded=0,this.codePoint=0}b.prototype.decode=function(t){function i(t,i,e){if(1===e)return t>=128>>i&&t<<i<=2047;if(2===e)return t>=2048>>i&&t<<i<=55295||t>=57344>>i&&t<<i<=65535;if(3===e)return t>=65536>>i&&t<<i<=1114111;throw new Error}function e(t,i){if(6===t)return i>>6>15?3:i>31?2:1;if(12===t)return i>15?3:2;if(18===t)return 3;throw new Error}for(var n=65533,s="",r=this.bitsNeeded,o=this.codePoint,a=0;a<t.length;a+=1){var h=t[a];0!==r&&(h<128||h>191||!i(o<<6|63&h,r-6,e(r,o)))&&(r=0,o=n,s+=String.fromCharCode(o)),0===r?(h>=0&&h<=127?(r=0,o=h):h>=192&&h<=223?(r=6,o=31&h):h>=224&&h<=239?(r=12,o=15&h):h>=240&&h<=247?(r=18,o=7&h):(r=0,o=n),0===r||i(o,r,e(r,o))||(r=0,o=n)):(r-=6,o=o<<6|63&h),0===r&&(o<=65535?s+=String.fromCharCode(o):(s+=String.fromCharCode(55296+(o-65535-1>>10)),s+=String.fromCharCode(56320+(o-65535-1&1023))))}return this.bitsNeeded=r,this.codePoint=o,s},null!=f&&null!=v&&function(){try{return"test"===(new f).decode((new v).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(f=b);var w=function(){};function m(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=w}function y(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function L(t){for(var i=Object.create(null),e=t.split("\r\n"),n=0;n<e.length;n+=1){var s=e[n].split(": "),r=s.shift(),o=s.join(": ");i[y(r)]=o}this._map=i}function S(){}function x(t){this._headers=t}function k(){}function T(){this._listeners=Object.create(null)}function R(t){i((function(){throw t}),0)}function C(t){this.type=t,this.target=void 0}function W(t,i){C.call(this,t),this.data=i.data,this.lastEventId=i.lastEventId}function P(t,i){C.call(this,t),this.status=i.status,this.statusText=i.statusText,this.headers=i.headers}function A(t,i){C.call(this,t),this.error=i.error}m.prototype.open=function(t,s){this._abort(!0);var r=this,o=this._xhr,a=1,h=0;this._abort=function(t){0!==r._sendTimeout&&(e(r._sendTimeout),r._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,o.onload=w,o.onerror=w,o.onabort=w,o.onprogress=w,o.onreadystatechange=w,o.abort(),0!==h&&(e(h),h=0),t||(r.readyState=4,r.onabort(null),r.onreadystatechange())),a=0};var l=function(){if(1===a){var t=0,i="",e=void 0;if("contentType"in o)t=200,i="OK",e=o.contentType;else try{t=o.status,i=o.statusText,e=o.getResponseHeader("Content-Type")}catch(n){t=0,i="",e=void 0}0!==t&&(a=2,r.readyState=2,r.status=t,r.statusText=i,r._contentType=e,r.onreadystatechange())}},d=function(){if(l(),2===a||3===a){a=3;var t="";try{t=o.responseText}catch(t){}r.readyState=3,r.responseText=t,r.onprogress()}},c=function(t,i){if(null!=i&&null!=i.preventDefault||(i={preventDefault:w}),d(),1===a||2===a||3===a){if(a=4,0!==h&&(e(h),h=0),r.readyState=4,"load"===t)r.onload(i);else if("error"===t)r.onerror(i);else{if("abort"!==t)throw new TypeError;r.onabort(i)}r.onreadystatechange()}},u=function(){h=i((function(){u()}),500),3===o.readyState&&d()};"onload"in o&&(o.onload=function(t){c("load",t)}),"onerror"in o&&(o.onerror=function(t){c("error",t)}),"onabort"in o&&(o.onabort=function(t){c("abort",t)}),"onprogress"in o&&(o.onprogress=d),"onreadystatechange"in o&&(o.onreadystatechange=function(t){!function(t){null!=o&&(4===o.readyState?"onload"in o&&"onerror"in o&&"onabort"in o||c(""===o.responseText?"error":"load",t):3===o.readyState?"onprogress"in o||d():2===o.readyState&&l())}(t)}),!("contentType"in o)&&"ontimeout"in n.prototype||(s+=(-1===s.indexOf("?")?"?":"&")+"padding=true"),o.open(t,s,!0),"readyState"in o&&(h=i((function(){u()}),0))},m.prototype.abort=function(){this._abort(!1)},m.prototype.getResponseHeader=function(){return this._contentType},m.prototype.setRequestHeader=function(t,i){var e=this._xhr;"setRequestHeader"in e&&e.setRequestHeader(t,i)},m.prototype.getAllResponseHeaders=function(){return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},m.prototype.send=function(){if("ontimeout"in n.prototype&&("sendAsBinary"in n.prototype||"mozAnon"in n.prototype)||null==a||null==a.readyState||"complete"===a.readyState){var t=this._xhr;"withCredentials"in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(t){throw t}}else{var e=this;e._sendTimeout=i((function(){e._sendTimeout=0,e.send()}),4)}},L.prototype.get=function(t){return this._map[y(t)]},null!=n&&null==n.HEADERS_RECEIVED&&(n.HEADERS_RECEIVED=2),S.prototype.open=function(t,i,e,s,r,o,a){t.open("GET",r);var h=0;for(var l in t.onprogress=function(){var i=t.responseText.slice(h);h+=i.length,e(i)},t.onerror=function(t){t.preventDefault(),s(new Error("NetworkError"))},t.onload=function(){s(null)},t.onabort=function(){s(null)},t.onreadystatechange=function(){if(t.readyState===n.HEADERS_RECEIVED){var e=t.status,s=t.statusText,r=t.getResponseHeader("Content-Type"),o=t.getAllResponseHeaders();i(e,s,r,new L(o))}},t.withCredentials=o,a)Object.prototype.hasOwnProperty.call(a,l)&&t.setRequestHeader(l,a[l]);return t.send(),t},x.prototype.get=function(t){return this._headers.get(t)},k.prototype.open=function(t,i,e,n,s,r,o){var a=null,d=new p,c=d.signal,u=new f;return l(s,{headers:o,credentials:r?"include":"same-origin",signal:c,cache:"no-store"}).then((function(t){return a=t.body.getReader(),i(t.status,t.statusText,t.headers.get("Content-Type"),new x(t.headers)),new h((function(t,i){var n=function(){a.read().then((function(i){if(i.done)t(void 0);else{var s=u.decode(i.value,{stream:!0});e(s),n()}})).catch((function(t){i(t)}))};n()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){n(t)})),{abort:function(){null!=a&&a.cancel(),d.abort()}}},T.prototype.dispatchEvent=function(t){t.target=this;var i=this._listeners[t.type];if(null!=i)for(var e=i.length,n=0;n<e;n+=1){var s=i[n];try{"function"==typeof s.handleEvent?s.handleEvent(t):s.call(this,t)}catch(t){R(t)}}},T.prototype.addEventListener=function(t,i){t=String(t);var e=this._listeners,n=e[t];null==n&&(e[t]=n=[]);for(var s=!1,r=0;r<n.length;r+=1)n[r]===i&&(s=!0);s||n.push(i)},T.prototype.removeEventListener=function(t,i){t=String(t);var e=this._listeners,n=e[t];if(null!=n){for(var s=[],r=0;r<n.length;r+=1)n[r]!==i&&s.push(n[r]);0===s.length?delete e[t]:e[t]=s}},W.prototype=Object.create(C.prototype),P.prototype=Object.create(C.prototype),A.prototype=Object.create(C.prototype);var E=/^text\/event\-stream(;.*)?$/i,O=function(t,i){var e=null==t?i:parseInt(t,10);return e!=e&&(e=i),I(e)},I=function(t){return Math.min(Math.max(t,1e3),18e6)},N=function(t,i,e){try{"function"==typeof i&&i.call(t,e)}catch(t){R(t)}};function $(t,r){T.call(this),r=r||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,r,o){r=String(r);var a=Boolean(o.withCredentials),h=o.lastEventIdQueryParameterName||"lastEventId",l=I(1e3),d=O(o.heartbeatTimeout,45e3),c="",u=l,f=!1,v=0,p=o.headers||{},g=o.Transport,b=D&&null==g?void 0:new m(null!=g?new g:null!=n&&"withCredentials"in n.prototype||null==s?new n:new s),w=null!=g&&"string"!=typeof g?new g:null==b?new k:new S,y=void 0,L=0,x=-1,T="",R="",C="",$="",M=0,U=0,j=0,_=function(i,e,n,s){if(0===x)if(200===i&&null!=n&&E.test(n)){x=1,f=Date.now(),u=l,t.readyState=1;var r=new P("open",{status:i,statusText:e,headers:s});t.dispatchEvent(r),N(t,t.onopen,r)}else{var o="";200!==i?(e&&(e=e.replace(/\s+/g," ")),o="EventSource's response has a status "+i+" "+e+" that is not 200. Aborting the connection."):o="EventSource's response has a Content-Type specifying an unsupported type: "+(null==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",F(),r=new P("error",{status:i,statusText:e,headers:s}),t.dispatchEvent(r),N(t,t.onerror,r),console.error(o)}},B=function(n){if(1===x){for(var s=-1,r=0;r<n.length;r+=1)(h=n.charCodeAt(r))!=="\n".charCodeAt(0)&&h!=="\r".charCodeAt(0)||(s=r);var o=(-1!==s?$:"")+n.slice(0,s+1);$=(-1===s?$:"")+n.slice(s+1),""!==n&&(f=Date.now(),v+=n.length);for(var a=0;a<o.length;a+=1){var h=o.charCodeAt(a);if(-1===M&&h==="\n".charCodeAt(0))M=0;else if(-1===M&&(M=0),h==="\r".charCodeAt(0)||h==="\n".charCodeAt(0)){if(0!==M){1===M&&(j=a+1);var p=o.slice(U,j-1),g=o.slice(j+(j<a&&o.charCodeAt(j)===" ".charCodeAt(0)?1:0),a);"data"===p?(T+="\n",T+=g):"id"===p?R=g:"event"===p?C=g:"retry"===p?(l=O(g,l),u=l):"heartbeatTimeout"===p&&(d=O(g,d),0!==L&&(e(L),L=i((function(){H()}),d)))}if(0===M){if(""!==T){c=R,""===C&&(C="message");var b=new W(C,{data:T.slice(1),lastEventId:R});if(t.dispatchEvent(b),"open"===C?N(t,t.onopen,b):"message"===C?N(t,t.onmessage,b):"error"===C&&N(t,t.onerror,b),2===x)return}T="",C=""}M=h==="\r".charCodeAt(0)?-1:0}else 0===M&&(U=a,M=1),1===M?h===":".charCodeAt(0)&&(j=a+1,M=2):2===M&&(M=3)}}},z=function(n){if(1===x||0===x){x=-1,0!==L&&(e(L),L=0),L=i((function(){H()}),u),u=I(Math.min(16*l,2*u)),t.readyState=0;var s=new A("error",{error:n});t.dispatchEvent(s),N(t,t.onerror,s),null!=n&&console.error(n)}},F=function(){x=2,null!=y&&(y.abort(),y=void 0),0!==L&&(e(L),L=0),t.readyState=2},H=function(){if(L=0,-1===x){f=!1,v=0,L=i((function(){H()}),d),x=0,T="",C="",R=c,$="",U=0,j=0,M=0;var e=r;if("data:"!==r.slice(0,5)&&"blob:"!==r.slice(0,5)&&""!==c){var n=r.indexOf("?");e=-1===n?r:r.slice(0,n+1)+r.slice(n+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,i){return i===h?"":t})),e+=(-1===r.indexOf("?")?"?":"&")+h+"="+encodeURIComponent(c)}var s=t.withCredentials,o={Accept:"text/event-stream"},a=t.headers;if(null!=a)for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l]);try{y=w.open(b,_,B,z,e,s,o)}catch(t){throw F(),t}}else if(f||null==y){var u=Math.max((f||Date.now())+d-Date.now(),1);f=!1,L=i((function(){H()}),u)}else z(new Error("No activity within "+d+" milliseconds. "+(0===x?"No response received.":v+" chars received.")+" Reconnecting.")),null!=y&&(y.abort(),y=void 0)};t.url=r,t.readyState=0,t.withCredentials=a,t.headers=p,t._close=F,H()}(this,t,r)}var D=null!=l&&null!=d&&"body"in d.prototype;($.prototype=Object.create(T.prototype)).CONNECTING=0,$.prototype.OPEN=1,$.prototype.CLOSED=2,$.prototype.close=function(){this._close()},$.CONNECTING=0,$.OPEN=1,$.CLOSED=2,$.prototype.withCredentials=void 0;var M,U=o;null==n||null!=o&&"withCredentials"in o.prototype||(U=$),M=function(t){t.EventSourcePolyfill=$,t.NativeEventSource=o,t.EventSource=U}(u),void 0!==M&&(c.exports=M)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:f:globalThis);const p=class{constructor(e){t(this,e),this.leaderboardLoaded=i(this,"leaderboardLoaded",7),this.isCurrentOnTop=!1,this.isCurrentPlayerRanked=!1,this.timeOrder1=500,this.timeOrder2=1e3,this.isMobile=!1,this.abortController=null,this.autoLocateCurrent=!1,this.keepOnBottom=!0,this.shouldUpdateObserver=!1,this.onLeaderboardScroll=t=>{t.stopPropagation(),(this.isLoadingPrevious||this.isLoadingMore||this.isPageRendering)&&t.preventDefault()},this.updateMessageHandler=t=>{if(!t.data)return;const i=JSON.parse(t.data);if("LeaderBoardUpdate"===i.messageType){const{item:t,items:e,total:n}=i;(t||this.currentUserData)&&(this.currentUserData=t||this.currentUserData,this.currentUserData.formattedScore=this.formatScore(this.currentUserData.score)),this.leaderboardLoaded.emit({item:this.currentUserData?this.currentUserData:null,isRanked:!!t,totalRank:n}),e.forEach((t=>{const i=this.leaderboard.findIndex((i=>i.rank===t.rank));i>=0&&(this.leaderboard[i]=t),t.formattedScore=this.formatScore(t.score),i<0?this.leaderboard.push(t):this.leaderboard[i]=t})),this.leaderboard=[...this.leaderboard],this.shouldUpdateObserver=!0}},this.goToCurrentPlayerPage=()=>{this.leaderboard.findIndex((t=>t.id===this.currentUserData.id))>=0?this.scrollCurrentPlayerToMiddle():(this.offset=this.currentUserData.rank-this.limit/2||0,this.leaderboard=[],this.isLeaderboardLoading=!0,this.loadLeaderboardById().catch(console.error),this.isCurrentPlayerInview=!0)},this.handleTableListScroll=()=>{this.isCurrentPlayerInview=this.isElementInViewport()},this.isPageRendering=!1,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.tournamentId=void 0,this.endpoint=void 0,this.session=void 0,this.language="en",this.limit=40,this.theme="Dark",this.state=void 0,this.offset=0,this.currentUserData=void 0,this.leaderboard=[],this.isLeaderboardLoading=!0,this.isLoadingMore=!1,this.isCurrentPlayerInview=!0,this.isLoadingPrevious=!1,this.scorefractiondigit=2}mergeSortedArrays(t,i,e){if(!(null==t?void 0:t.length))return i;if(!(null==i?void 0:i.length))return t;const n=new Map;t.forEach(((t,i)=>{n.set(t[e],i)}));let s=[...t];const r=[];return i.forEach((t=>{const i=t[e];n.has(i)?s[n.get(i)]=t:r.push(t)})),r.length?(s=[],s=r[r.length-1][e]<t[0][e]?[...r,...t]:[...t,...r],s):t}formatScore(t){const i=Number(this.scorefractiondigit)||2;return t.toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i})}async loadLeaderboardById(){if(this.abortController&&this.abortController.abort(),this.isLoadingMore)return;this.abortController=new AbortController,this.isLoadingMore=!0;let t=new URL(`${this.endpoint}/v1/tournaments/${this.tournamentId}/leaderboard?language=${this.language}`);t.searchParams.set("filter","includeUnqualifiedPlayer=true"),t.searchParams.set("pagination",`offset=${this.offset},limit=${this.limit}`),t.searchParams.set("platform",d());let i={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};await fetch(t,i).then((t=>t.json())).then((i=>{var e;const{item:n,items:s,total:r}=i;if(this.isCurrentPlayerRanked=!!n,this.isCurrentPlayerRanked){if(this.currentUserData=n,this.currentUserData.formattedScore=this.formatScore(this.currentUserData.score),this.isLeaderboardLoading){if(this.offset>0)this.scrollCurrentPlayerToMiddle();else if(0===this.offset&&this.autoLocateCurrent&&this.currentUserData.rank>this.limit)return this.offset=this.currentUserData.rank-this.limit/2||0,this.leaderboardLoaded.emit({item:this.currentUserData,leaderboardOffset:this.offset,isRanked:!0,totalRank:r}),void this.loadLeaderboardById().catch(console.error)}else this.isLoadingPrevious&&this.resetScrollTop();this.shouldUpdateObserver=!0}this.total=r,this.leaderboardLoaded.emit({item:this.currentUserData,leaderboardOffset:this.offset,isRanked:this.isCurrentPlayerRanked,totalRank:r}),this.leaderboard=this.mergeSortedArrays(this.leaderboard,s,"rank"),null===(e=this.leaderboard)||void 0===e||e.forEach((t=>t.formattedScore=this.formatScore(t.score))),this.startScrollObersever(),this.reStartUpSSEUpdater(t),this.isLeaderboardLoading=!1}),(t=>{this.isLeaderboardLoading=!1,"AbortError"===t.name?console.log("Request aborted because a new one started or component unmounted."):console.error("Network error",t)})).finally((()=>{this.isLoadingMore=!1}))}startScrollObersever(){this.topLastTimer&&clearTimeout(this.topLastTimer),this.topLastTimer=setTimeout((()=>{this.total<=this.limit||(1!==this.leaderboard[0].rank&&this.startTopRankObserver(),this.leaderboard[this.leaderboard.length-1].rank<this.total&&this.startLastRankObserver())}),this.timeOrder2)}scrollCurrentPlayerToMiddle(){setTimeout((()=>{if(!this.tableListEle||!this.tableListEle.querySelectorAll(".Active").length)return;const t=this.tableListEle.querySelectorAll(".Active")[0],i=this.stylingContainer.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight;let n=Math.min((e-i.top)/2-t.clientHeight,4*t.clientHeight);n=Math.max(n,t.clientHeight),this.tableListEle.scrollTo({top:t.offsetTop-n,behavior:"smooth"})}),this.timeOrder1)}onStateChanged(){switch(this.state){case"Closed":case"Closing":this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler),this.leaderboardUpdater=null)}}reStartUpSSEUpdater(t){var i;if(this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler)),"Running"!==this.state)return;t.searchParams.set("pagination",`offset=${this.leaderboard.length?this.leaderboard[0].rank-1:0},limit=${(null===(i=this.leaderboard)||void 0===i?void 0:i.length)>this.limit?this.leaderboard.length:this.limit}`);let e=new URL(`${this.endpoint}/v1/tournaments/${this.tournamentId}/leaderboard/updates?${t.searchParams.toString()}`);this.leaderboardUpdater=new v.exports.EventSourcePolyfill(e,{headers:{accept:"text/event-stream","X-SessionId":this.session}}),this.leaderboardUpdater.addEventListener("message",this.updateMessageHandler)}tourPageTabSwitchedHandler(t){var i;"leaderboard"===(null===(i=t.detail)||void 0===i?void 0:i.tabName)&&(this.isCurrentPlayerInview=this.isElementInViewport(),this.startActivePlayerObserver())}startActivePlayerObserver(){this.activePlayerObserver&&this.activePlayerEle&&this.activePlayerObserver.unobserve(this.activePlayerEle),this.activePlayerObserver=new IntersectionObserver((t=>{t.forEach((t=>{if(this.isCurrentPlayerInview=t.isIntersecting,!t.isIntersecting){const t=this.activePlayerEle.getBoundingClientRect();this.keepOnBottom||(this.isCurrentOnTop=t.top<this.stylingContainer.offsetTop)}}))})),this.activePlayerEle=this.tableListEle.querySelectorAll(".Active")[0],this.activePlayerObserver.observe(this.activePlayerEle)}startTopRankObserver(){this.topRankToObserved&&(this.topMoreObserver.unobserve(this.topRankToObserved),this.topRankToObserved=null),this.topMoreObserver||(this.topMoreObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.loadPreMore(),this.topMoreObserver.unobserve(t.target))}))}))),setTimeout((()=>{var t;this.topRankToObserved=null===(t=this.tableListEle)||void 0===t?void 0:t.querySelector("#Rank_1"),this.topRankToObserved&&this.topMoreObserver.observe(this.topRankToObserved)}),this.timeOrder2)}startLastRankObserver(){var t;this.lastRankToObserved&&(this.loadMoreObserver.unobserve(this.lastRankToObserved),this.lastRankToObserved=null),this.loadMoreObserver||(this.loadMoreObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.loadMore(),this.loadMoreObserver.unobserve(t.target))}))}))),this.lastRankToObserved=null===(t=this.tableListEle)||void 0===t?void 0:t.querySelector("#Rank_"+(this.leaderboard.length-1)),this.lastRankToObserved&&this.loadMoreObserver.observe(this.lastRankToObserved)}resetScrollTop(){this.isLoadingPrevious=!1,setTimeout((()=>{const t=this.tableListEle;t.scrollTop=this.previousScrollTop+(t.scrollHeight-this.previousScrollHeight)}),100)}loadPreMore(){var t;if((null===(t=this.leaderboard)||void 0===t?void 0:t.length)&&1===this.leaderboard[0].rank||this.isLoadingPrevious)return;this.offset=this.leaderboard[0].rank-1-this.limit||0;const i=this.tableListEle;this.previousScrollHeight=i.scrollHeight,this.previousScrollTop=i.scrollTop,this.isLoadingPrevious=!0,this.preTopRank=this.leaderboard[0].rank,this.loadLeaderboardById().catch(console.error)}loadMore(){var t;(null===(t=this.leaderboard)||void 0===t?void 0:t.length)>=this.total||(this.offset+=this.limit,this.offset=this.offset>this.total?this.total:this.offset,this.loadLeaderboardById().catch(console.error))}isElementInViewport(){const t=this.tableListEle.querySelector(".Active");if(!t)return!1;const i=t.getBoundingClientRect();return this.isCurrentOnTop=i.top<this.stylingContainer.offsetTop,i.top>=0&&i.top>this.stylingContainer.offsetTop&&i.bottom<=this.stylingContainer.offsetTop+this.stylingContainer.offsetHeight&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onTournamentIdChanged(){this.disconnectedCallback(),this.endpoint&&this.session&&!(this.session.length<10)&&this.tournamentId&&(this.isLeaderboardLoading=!0,this.resetLeaderboardStatus(),this.loadLeaderboardById().catch(console.error))}resetLeaderboardStatus(){this.offset=0,this.leaderboard=[]}async componentWillLoad(){switch(this.state){case"Running":this.loadLeaderboardById().catch(console.error);break;case"Unstarted":this.isLeaderboardLoading=!1,this.resetLeaderboardStatus()}this.translationUrl.length>2&&await h(this.translationUrl)}render(){var t;return e("div",{key:"a913a015895fba3d5f124a44af66059627e61bed",class:`LeaderboardWrapper ${this.theme} ${this.isMobile?"Mobile":""}`,ref:t=>this.stylingContainer=t},this.isLeaderboardLoading?e("div",{class:"Loading"}," ",l("loading",this.language)," "):[e("div",null,!this.isCurrentPlayerInview&&this.isCurrentOnTop&&this.currentUserData&&e("div",{class:"PlayerRank Active"},e("div",{class:"Rank"},0===this.currentUserData.rank?"--":this.currentUserData.rank),e("div",{class:"Name"},l("you",this.language)),e("div",{class:"Score"},this.currentUserData.formattedScore),e("div",{class:"Prize"},this.currentUserData.prizeName))),this.isLoadingPrevious&&e("div",null,"Loading"),e("div",{class:"Leaderboard",onScroll:this.onLeaderboardScroll,onTouchMove:this.onLeaderboardScroll,ref:t=>this.tableListEle=t},(null===(t=this.leaderboard)||void 0===t?void 0:t.length)?this.leaderboard.map(((t,i)=>{var n,s;return e("div",{id:`Rank_${i}`,class:`PlayerRank ${this.isLoadingPrevious&&t.rank<this.preTopRank?"Hidden":""} ${(null===(n=this.currentUserData)||void 0===n?void 0:n.id)===t.id?"Active":""}`},e("div",{class:"Rank"},0===t.rank?"":t.rank),e("div",{class:"Name"},(null===(s=this.currentUserData)||void 0===s?void 0:s.id)===t.id?l("you",this.language):t.shortName),e("div",{class:"Score"},t.formattedScore),e("div",{class:"Prize"},t.prizeName))})):e("div",{class:"NoWinners"},e("div",{class:"Title"}," ",l("noLeaderboard",this.language)," "),e("div",{class:"Info"}," ",l("positionsWillShow",this.language)," "))),this.isLoadingMore&&!this.isLoadingPrevious&&e("div",null,"Loading"),!this.isCurrentPlayerInview&&e("div",{class:this.isCurrentOnTop?"":"Bottom"},!this.isCurrentOnTop&&this.currentUserData&&e("div",{class:"PlayerRank Active",onClick:this.goToCurrentPlayerPage},e("div",{class:"Rank"},0===this.currentUserData.rank?"--":this.currentUserData.rank),e("div",{class:"Name"},l("you",this.language)),e("div",{class:"Score"},this.currentUserData.formattedScore),e("div",{class:"Prize"},this.currentUserData.prizeName)))])}handleClientStylingChange(t,i){t!=i&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillRender(){this.isPageRendering=!0}componentDidRender(){this.isPageRendering=!1,this.shouldUpdateObserver&&(this.shouldUpdateObserver=!1,this.tableListEle&&this.tableListEle.querySelector(".Active")?this.startActivePlayerObserver():this.isCurrentPlayerInview=!1)}handleNewTranslations(){h(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)),this.isMobile="PC"!==d(),this.stylingContainer.addEventListener("touchmove",(t=>{t.stopPropagation(),t.preventDefault()}),{passive:!1})}disconnectedCallback(){this.abortController&&this.abortController.abort("Disconnected callback"),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.leaderboardUpdater&&(this.leaderboardUpdater.close(),this.leaderboardUpdater.removeEventListener("message",this.updateMessageHandler)),this.loadMoreObserver&&this.loadMoreObserver.disconnect(),this.topMoreObserver&&this.topMoreObserver.disconnect(),this.activePlayerObserver&&this.activePlayerObserver.disconnect(),this.tableListEle&&this.tableListEle.removeEventListener("scroll",this.handleTableListScroll)}static get watchers(){return{state:["onStateChanged"],tournamentId:["onTournamentIdChanged"],endpoint:["onTournamentIdChanged"],session:["onTournamentIdChanged"],language:["onTournamentIdChanged"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};p.style=":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;z-index:5;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";export{p as C}
@@ -1 +1 @@
1
- export{C as casino_tournaments_ingame_table}from"./casino-tournaments-ingame-table-27a040da.js";import"./index-448538d5.js";
1
+ export{C as casino_tournaments_ingame_table}from"./casino-tournaments-ingame-table-fc7d6964.js";import"./index-1c9a8460.js";
@@ -1 +1 @@
1
- import{p as n,b as e}from"./index-448538d5.js";export{s as setNonce}from"./index-448538d5.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],tournamentId:[513,"tournament-id"],endpoint:[513],session:[513],language:[513],limit:[514],theme:[513],state:[513],offset:[32],currentUserData:[32],leaderboard:[32],isLeaderboardLoading:[32],isLoadingMore:[32],isCurrentPlayerInview:[32],isLoadingPrevious:[32],scorefractiondigit:[32]},null,{state:["onStateChanged"],tournamentId:["onTournamentIdChanged"],endpoint:["onTournamentIdChanged"],session:["onTournamentIdChanged"],language:["onTournamentIdChanged"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}]]]],n))));
1
+ import{p as n,b as e}from"./index-1c9a8460.js";export{s as setNonce}from"./index-1c9a8460.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),n(a)})().then((async n=>(await a(),e([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],tournamentId:[513,"tournament-id"],endpoint:[513],session:[513],language:[513],limit:[514],theme:[513],state:[513],offset:[32],currentUserData:[32],leaderboard:[32],isLeaderboardLoading:[32],isLoadingMore:[32],isCurrentPlayerInview:[32],isLoadingPrevious:[32],scorefractiondigit:[32]},[[4,"tourPageTabSwitched","tourPageTabSwitchedHandler"]],{state:["onStateChanged"],tournamentId:["onTournamentIdChanged"],endpoint:["onTournamentIdChanged"],session:["onTournamentIdChanged"],language:["onTournamentIdChanged"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}]]]],n))));
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="undefined"!=typeof window?window:{},u=a.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w(v):f.raf(v))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{b(m),b(y),(p=m.length>0)&&f.raf(v)},w=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(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 E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},L=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=T(e,null);return a.u=t,i.length>0&&(a.h=i),a.p=o,a},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),W={},A=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>D(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},D=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},F=new WeakMap,N=e=>"sc-"+e.v,U=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(a,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of z(Object.keys(o)))e in s||U(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))U(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=u.createTextNode(l.i);else if(o=l.$=u.createElement(l.m),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].$=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),X=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(_(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,a=0,u=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(Q(h,m,o))X(h,m,o),h=t[++i],m=l[++c];else if(Q(d,y,o))X(d,y,o),d=t[--f],y=l[--p];else if(Q(h,y,o))X(h,y,o),Z(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(Q(d,m,o))X(d,m,o),Z(e,d.$,h.$),d=t[--f],m=l[++c];else{for(a=-1,u=i;u<=f;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){a=u;break}a>=0?(r=t[a],r.m!==m.m?s=I(t&&t[c],n,a):(X(r,m,o),t[a]=void 0,s=r.$),m=l[++c]):(s=I(t&&t[c],n,c),m=l[++c]),s&&Z(h.$.parentNode,s,h.$)}i>f?J(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):null!==o&&K(o,0,o.length-1)):e.i!==r&&(l.data=r)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.j),g((()=>ne(e,t)));e.l|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(e.l|=256,e.k&&(e.k.map((([e,t])=>ae(n,e,t))),e.k=void 0),l=ae(n,"componentWillLoad")),l=le(l,(()=>ae(n,"componentWillRender"))),le(l,(()=>se(e,n,t)))},le=(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,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const t=null!=(n=f.C)?n:k(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||T(null,null),r=(e=>e&&e.m===W)(t)?t:L(null,null,t);if(x=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.j;ae(n,"componentDidRender"),64&e.l||(e.l|=64,ue(t),ae(n,"componentDidLoad"),e.R(t),l||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>te(e,!1))),e.l&=-517},ce=()=>{ue(u.documentElement),w((()=>D(a,"appload",{detail:{namespace:"casino-tournaments-ingame-table"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.T||e.watchers){e.watchers&&!t.T&&(t.T=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).W.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" 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=r.$hostElement$,c=r.W.get(t),a=r.l,u=r.t;if(l=((e,t)=>null==e||j(e)?e:2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&a)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.W.set(t,l),u)){if(o.T&&128&a){const e=o.T[t];e&&e.map((e=>{try{u[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&a)&&te(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.T)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},he=e=>{ae(e,"disconnectedCallback")},de=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=a.customElements,y=u.head,$=y.querySelector("meta[charset]"),b=u.createElement("style"),v=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.A=l[3],c.P=[],c.T=null!=(o=l[4])?o:{};const a=c.v,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,W:new Map};l.D=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,pe(this,e,c.A)),w&&(clearTimeout(w),w=null),g?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)pe(e,t,l.A),(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.F){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.F;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.N}" was not found`);l.isProxied||(n.T=l.watchers,fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.U&&(e.U.map((e=>e())),e.U=void 0),(null==e?void 0:e.t)?he(e.t):(null==e?void 0:e.D)&&e.D.then((()=>he(e.t)))}})()))}componentOnReady(){return n(this).D}};c.F=e[0],p.includes(a)||m.get(a)||(h.push(a),m.define(a,fe(u,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(u);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ce,30)))},pe=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=ye(e,n),r=me(t,o),i=$e(n);f.ael(s,l,r,i),(t.U=t.U||[]).push((()=>f.rel(s,l,r,i)))}))},me=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},ye=(e,t)=>4&t?u:e,$e=e=>({passive:!!(1&e),capture:!!(2&e)}),be=e=>f.C=e;export{de as b,A as c,L as h,h as p,l as r,be as s}
@@ -1 +1 @@
1
- export{C as CasinoTournamentsIngameTable}from"./casino-tournaments-ingame-table-27a040da.js";import"./index-448538d5.js";
1
+ export{C as CasinoTournamentsIngameTable}from"./casino-tournaments-ingame-table-fc7d6964.js";import"./index-1c9a8460.js";
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-666544d1.js');
3
+ const index = require('./index-1fe935ba.js');
4
4
 
5
5
  const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
6
6
 
@@ -1222,7 +1222,7 @@ var eventsource = {exports: {}};
1222
1222
  }(typeof globalThis === 'undefined' ? (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal) : globalThis));
1223
1223
  }(eventsource, eventsource.exports));
1224
1224
 
1225
- const casinoTournamentsIngameTableCss = ":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";
1225
+ const casinoTournamentsIngameTableCss = ":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;z-index:5;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";
1226
1226
  const CasinoTournamentsIngameTableStyle0 = casinoTournamentsIngameTableCss;
1227
1227
 
1228
1228
  const CasinoTournamentsIngameTable = class {
@@ -1494,6 +1494,13 @@ const CasinoTournamentsIngameTable = class {
1494
1494
  this.leaderboardUpdater = new eventsource.exports.EventSourcePolyfill(endpointUrl, options);
1495
1495
  this.leaderboardUpdater.addEventListener('message', this.updateMessageHandler);
1496
1496
  }
1497
+ tourPageTabSwitchedHandler(event) {
1498
+ var _a;
1499
+ if (((_a = event.detail) === null || _a === void 0 ? void 0 : _a.tabName) === 'leaderboard') {
1500
+ this.isCurrentPlayerInview = this.isElementInViewport();
1501
+ this.startActivePlayerObserver();
1502
+ }
1503
+ }
1497
1504
  startActivePlayerObserver() {
1498
1505
  if (this.activePlayerObserver && this.activePlayerEle) {
1499
1506
  this.activePlayerObserver.unobserve(this.activePlayerEle);
@@ -1623,7 +1630,7 @@ const CasinoTournamentsIngameTable = class {
1623
1630
  }
1624
1631
  render() {
1625
1632
  var _a;
1626
- return index.h("div", { key: '15498957cba65f21cbae5c9fddd4a35283f9848c', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? index.h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
1633
+ return index.h("div", { key: 'a913a015895fba3d5f124a44af66059627e61bed', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? index.h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
1627
1634
  [
1628
1635
  index.h("div", null, (!this.isCurrentPlayerInview && this.isCurrentOnTop) && this.currentUserData &&
1629
1636
  index.h("div", { class: `PlayerRank Active` }, index.h("div", { class: 'Rank' }, this.currentUserData.rank === 0 ? '--' : this.currentUserData.rank), index.h("div", { class: 'Name' }, translate('you', this.language)), index.h("div", { class: 'Score' }, this.currentUserData.formattedScore), index.h("div", { class: 'Prize' }, this.currentUserData.prizeName))),
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoTournamentsIngameTable = require('./casino-tournaments-ingame-table-8e663fa2.js');
6
- require('./index-666544d1.js');
5
+ const casinoTournamentsIngameTable = require('./casino-tournaments-ingame-table-13ec7f67.js');
6
+ require('./index-1fe935ba.js');
7
7
 
8
8
 
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-666544d1.js');
5
+ const index = require('./index-1fe935ba.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["casino-tournaments-ingame-table.cjs",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},null,{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
22
+ return index.bootstrapLazy([["casino-tournaments-ingame-table.cjs",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},[[4,"tourPageTabSwitched","tourPageTabSwitchedHandler"]],{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'casino-tournaments-ingame-table';
24
- const BUILD = /* casino-tournaments-ingame-table */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: false, propMutable: false, propNumber: true, 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: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* casino-tournaments-ingame-table */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, 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: false, propMutable: false, propNumber: true, 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: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -106,6 +106,22 @@ var plt = {
106
106
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
107
107
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
108
108
  };
109
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
110
+ let supportsListenerOptions2 = false;
111
+ try {
112
+ doc.addEventListener(
113
+ "e",
114
+ null,
115
+ Object.defineProperty({}, "passive", {
116
+ get() {
117
+ supportsListenerOptions2 = true;
118
+ }
119
+ })
120
+ );
121
+ } catch (e) {
122
+ }
123
+ return supportsListenerOptions2;
124
+ })();
109
125
  var promiseResolve = (v) => Promise.resolve(v);
110
126
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
111
127
  try {
@@ -736,6 +752,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
736
752
  }
737
753
  let maybePromise;
738
754
  if (isInitialLoad) {
755
+ {
756
+ hostRef.$flags$ |= 256 /* isListenReady */;
757
+ if (hostRef.$queuedListeners$) {
758
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
759
+ hostRef.$queuedListeners$ = void 0;
760
+ }
761
+ }
739
762
  {
740
763
  maybePromise = safeCall(instance, "componentWillLoad");
741
764
  }
@@ -1069,6 +1092,7 @@ var connectedCallback = (elm) => {
1069
1092
  initializeComponent(elm, hostRef, cmpMeta);
1070
1093
  }
1071
1094
  } else {
1095
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1072
1096
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1073
1097
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1074
1098
  }
@@ -1084,6 +1108,12 @@ var disconnectInstance = (instance) => {
1084
1108
  var disconnectedCallback = async (elm) => {
1085
1109
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1086
1110
  const hostRef = getHostRef(elm);
1111
+ {
1112
+ if (hostRef.$rmListeners$) {
1113
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1114
+ hostRef.$rmListeners$ = void 0;
1115
+ }
1116
+ }
1087
1117
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1088
1118
  disconnectInstance(hostRef.$lazyInstance$);
1089
1119
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1123,6 +1153,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1123
1153
  {
1124
1154
  cmpMeta.$members$ = compactMeta[2];
1125
1155
  }
1156
+ {
1157
+ cmpMeta.$listeners$ = compactMeta[3];
1158
+ }
1126
1159
  {
1127
1160
  cmpMeta.$attrsToReflect$ = [];
1128
1161
  }
@@ -1154,9 +1187,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1154
1187
  }
1155
1188
  }
1156
1189
  connectedCallback() {
1157
- getHostRef(this);
1190
+ const hostRef = getHostRef(this);
1158
1191
  if (!this.hasRegisteredEventListeners) {
1159
1192
  this.hasRegisteredEventListeners = true;
1193
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1160
1194
  }
1161
1195
  if (appLoadFallback) {
1162
1196
  clearTimeout(appLoadFallback);
@@ -1211,6 +1245,39 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1211
1245
  }
1212
1246
  endBootstrap();
1213
1247
  };
1248
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1249
+ if (listeners) {
1250
+ listeners.map(([flags, name, method]) => {
1251
+ const target = getHostListenerTarget(elm, flags) ;
1252
+ const handler = hostListenerProxy(hostRef, method);
1253
+ const opts = hostListenerOpts(flags);
1254
+ plt.ael(target, name, handler, opts);
1255
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1256
+ });
1257
+ }
1258
+ };
1259
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1260
+ var _a;
1261
+ try {
1262
+ {
1263
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1264
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1265
+ } else {
1266
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1267
+ }
1268
+ }
1269
+ } catch (e) {
1270
+ consoleError(e);
1271
+ }
1272
+ };
1273
+ var getHostListenerTarget = (elm, flags) => {
1274
+ if (flags & 4 /* TargetDocument */) return doc;
1275
+ return elm;
1276
+ };
1277
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1278
+ passive: (flags & 1 /* Passive */) !== 0,
1279
+ capture: (flags & 2 /* Capture */) !== 0
1280
+ } : (flags & 2 /* Capture */) !== 0;
1214
1281
 
1215
1282
  // src/runtime/nonce.ts
1216
1283
  var setNonce = (nonce) => plt.$nonce$ = nonce;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoTournamentsIngameTable = require('./casino-tournaments-ingame-table-8e663fa2.js');
6
- require('./index-666544d1.js');
5
+ const casinoTournamentsIngameTable = require('./casino-tournaments-ingame-table-13ec7f67.js');
6
+ require('./index-1fe935ba.js');
7
7
 
8
8
 
9
9
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-666544d1.js');
5
+ const index = require('./index-1fe935ba.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["casino-tournaments-ingame-table.cjs",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},null,{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
11
+ return index.bootstrapLazy([["casino-tournaments-ingame-table.cjs",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},[[4,"tourPageTabSwitched","tourPageTabSwitchedHandler"]],{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -30,6 +30,7 @@
30
30
  }
31
31
  .LeaderboardWrapper .Bottom {
32
32
  position: absolute;
33
+ z-index: 5;
33
34
  bottom: 0;
34
35
  background: linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);
35
36
  border-top: 1px solid;
@@ -272,6 +272,13 @@ export class CasinoTournamentsIngameTable {
272
272
  this.leaderboardUpdater = new EventSourcePolyfill(endpointUrl, options);
273
273
  this.leaderboardUpdater.addEventListener('message', this.updateMessageHandler);
274
274
  }
275
+ tourPageTabSwitchedHandler(event) {
276
+ var _a;
277
+ if (((_a = event.detail) === null || _a === void 0 ? void 0 : _a.tabName) === 'leaderboard') {
278
+ this.isCurrentPlayerInview = this.isElementInViewport();
279
+ this.startActivePlayerObserver();
280
+ }
281
+ }
275
282
  startActivePlayerObserver() {
276
283
  if (this.activePlayerObserver && this.activePlayerEle) {
277
284
  this.activePlayerObserver.unobserve(this.activePlayerEle);
@@ -402,7 +409,7 @@ export class CasinoTournamentsIngameTable {
402
409
  }
403
410
  render() {
404
411
  var _a;
405
- return h("div", { key: '15498957cba65f21cbae5c9fddd4a35283f9848c', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
412
+ return h("div", { key: 'a913a015895fba3d5f124a44af66059627e61bed', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
406
413
  [
407
414
  h("div", null, (!this.isCurrentPlayerInview && this.isCurrentOnTop) && this.currentUserData &&
408
415
  h("div", { class: `PlayerRank Active` }, h("div", { class: 'Rank' }, this.currentUserData.rank === 0 ? '--' : this.currentUserData.rank), h("div", { class: 'Name' }, translate('you', this.language)), h("div", { class: 'Score' }, this.currentUserData.formattedScore), h("div", { class: 'Prize' }, this.currentUserData.prizeName))),
@@ -757,4 +764,13 @@ export class CasinoTournamentsIngameTable {
757
764
  "methodName": "handleNewTranslations"
758
765
  }];
759
766
  }
767
+ static get listeners() {
768
+ return [{
769
+ "name": "tourPageTabSwitched",
770
+ "method": "tourPageTabSwitchedHandler",
771
+ "target": "document",
772
+ "capture": false,
773
+ "passive": false
774
+ }];
775
+ }
760
776
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-448538d5.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-1c9a8460.js';
2
2
 
3
3
  const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
4
4
 
@@ -1220,7 +1220,7 @@ var eventsource = {exports: {}};
1220
1220
  }(typeof globalThis === 'undefined' ? (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal) : globalThis));
1221
1221
  }(eventsource, eventsource.exports));
1222
1222
 
1223
- const casinoTournamentsIngameTableCss = ":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";
1223
+ const casinoTournamentsIngameTableCss = ":host{display:block;height:100%}.Dark{color:var(--emw--ingame-color-text, #f5f8f6)}.Light{color:var(--emw--ingame-color-black, #0A0A17)}.Mobile.LeaderboardWrapper .Bottom .PlayerRank.Active{padding:2px 8px}.LeaderboardWrapper{height:100%;position:relative;overflow:hidden}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard,.LeaderboardWrapper .Bottom{width:calc(100% - 30px);padding:0 15px;scrollbar-width:thin}.LeaderboardWrapper .Loading,.LeaderboardWrapper .Leaderboard{padding-bottom:0}.LeaderboardWrapper .Bottom{position:absolute;z-index:5;bottom:0;background:linear-gradient(90deg, var(--emw--ingame-color-gray-purple50, rgba(35, 41, 119, 0.4980392157)) 0%, var(--emw--ingame-color-dark-purple50, rgba(59, 28, 117, 0.4980392157)) 100%);border-top:1px solid;border-image-source:linear-gradient(94.32deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%);border-image-slice:1;backdrop-filter:blur(20px);opacity:0.91}.LeaderboardWrapper .Bottom .PlayerRank.Active{border-width:0;cursor:pointer;padding-right:18px;background:transparent}.LeaderboardWrapper .PlayerRank{overflow-anchor:auto;font-weight:bold;align-items:center;height:26px;gap:16px;padding:2px 8px;display:flex}.LeaderboardWrapper .PlayerRank.Hidden{display:none !important}.LeaderboardWrapper .PlayerRank.Active{background-clip:padding-box, border-box;background-origin:padding-box, border-box;border:1px solid transparent;border-radius:10px;background-image:linear-gradient(91deg, var(--emw--ingame-color-pth-primary4, #11153E) 4.41%, var(--emw--ingame-color-pth-primary4, #11153E) 113.86%), linear-gradient(91deg, var(--emw--ingame-color-pth-primary1, #9500FF) 4.41%, var(--emw--ingame-color-pth-primary2, #232EC4) 113.86%)}.LeaderboardWrapper .PlayerRank div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.LeaderboardWrapper .PlayerRank .Rank{flex:1}.LeaderboardWrapper .PlayerRank .Name{flex:2;text-align:left}.LeaderboardWrapper .PlayerRank .Score{flex:1;font-weight:normal;text-align:right;overflow:visible;min-width:50px}.LeaderboardWrapper .PlayerRank .Prize{flex:4;overflow:hidden}.LeaderboardWrapper .Leaderboard{height:calc(100% - 2px) !important;overflow-y:auto;overflow-anchor:auto;touch-action:pan-y}.LeaderboardWrapper .Leaderboard .NoWinners{margin:30px auto;display:flex;flex-direction:column;gap:15px}.LeaderboardWrapper .Leaderboard .NoWinners .Title{font-weight:bold;font-size:medium}.LeaderboardWrapper .Leaderboard .NoWinners .Title,.LeaderboardWrapper .Leaderboard .NoWinners .Info{display:flex;align-items:center;flex-direction:column}";
1224
1224
  const CasinoTournamentsIngameTableStyle0 = casinoTournamentsIngameTableCss;
1225
1225
 
1226
1226
  const CasinoTournamentsIngameTable = class {
@@ -1492,6 +1492,13 @@ const CasinoTournamentsIngameTable = class {
1492
1492
  this.leaderboardUpdater = new eventsource.exports.EventSourcePolyfill(endpointUrl, options);
1493
1493
  this.leaderboardUpdater.addEventListener('message', this.updateMessageHandler);
1494
1494
  }
1495
+ tourPageTabSwitchedHandler(event) {
1496
+ var _a;
1497
+ if (((_a = event.detail) === null || _a === void 0 ? void 0 : _a.tabName) === 'leaderboard') {
1498
+ this.isCurrentPlayerInview = this.isElementInViewport();
1499
+ this.startActivePlayerObserver();
1500
+ }
1501
+ }
1495
1502
  startActivePlayerObserver() {
1496
1503
  if (this.activePlayerObserver && this.activePlayerEle) {
1497
1504
  this.activePlayerObserver.unobserve(this.activePlayerEle);
@@ -1621,7 +1628,7 @@ const CasinoTournamentsIngameTable = class {
1621
1628
  }
1622
1629
  render() {
1623
1630
  var _a;
1624
- return h("div", { key: '15498957cba65f21cbae5c9fddd4a35283f9848c', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
1631
+ return h("div", { key: 'a913a015895fba3d5f124a44af66059627e61bed', class: `LeaderboardWrapper ${this.theme} ${this.isMobile ? 'Mobile' : ''}`, ref: (el) => (this.stylingContainer = el) }, this.isLeaderboardLoading ? h("div", { class: 'Loading' }, " ", translate('loading', this.language), " ") :
1625
1632
  [
1626
1633
  h("div", null, (!this.isCurrentPlayerInview && this.isCurrentOnTop) && this.currentUserData &&
1627
1634
  h("div", { class: `PlayerRank Active` }, h("div", { class: 'Rank' }, this.currentUserData.rank === 0 ? '--' : this.currentUserData.rank), h("div", { class: 'Name' }, translate('you', this.language)), h("div", { class: 'Score' }, this.currentUserData.formattedScore), h("div", { class: 'Prize' }, this.currentUserData.prizeName))),
@@ -1,2 +1,2 @@
1
- export { C as casino_tournaments_ingame_table } from './casino-tournaments-ingame-table-27a040da.js';
2
- import './index-448538d5.js';
1
+ export { C as casino_tournaments_ingame_table } from './casino-tournaments-ingame-table-fc7d6964.js';
2
+ import './index-1c9a8460.js';
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-448538d5.js';
2
- export { s as setNonce } from './index-448538d5.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-1c9a8460.js';
2
+ export { s as setNonce } from './index-1c9a8460.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},null,{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
19
+ return bootstrapLazy([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},[[4,"tourPageTabSwitched","tourPageTabSwitchedHandler"]],{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'casino-tournaments-ingame-table';
2
- const BUILD = /* casino-tournaments-ingame-table */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: false, propMutable: false, propNumber: true, 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: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* casino-tournaments-ingame-table */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, 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: false, propMutable: false, propNumber: true, 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: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -84,6 +84,22 @@ var plt = {
84
84
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
85
85
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
86
86
  };
87
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
88
+ let supportsListenerOptions2 = false;
89
+ try {
90
+ doc.addEventListener(
91
+ "e",
92
+ null,
93
+ Object.defineProperty({}, "passive", {
94
+ get() {
95
+ supportsListenerOptions2 = true;
96
+ }
97
+ })
98
+ );
99
+ } catch (e) {
100
+ }
101
+ return supportsListenerOptions2;
102
+ })();
87
103
  var promiseResolve = (v) => Promise.resolve(v);
88
104
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
89
105
  try {
@@ -714,6 +730,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
714
730
  }
715
731
  let maybePromise;
716
732
  if (isInitialLoad) {
733
+ {
734
+ hostRef.$flags$ |= 256 /* isListenReady */;
735
+ if (hostRef.$queuedListeners$) {
736
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
737
+ hostRef.$queuedListeners$ = void 0;
738
+ }
739
+ }
717
740
  {
718
741
  maybePromise = safeCall(instance, "componentWillLoad");
719
742
  }
@@ -1047,6 +1070,7 @@ var connectedCallback = (elm) => {
1047
1070
  initializeComponent(elm, hostRef, cmpMeta);
1048
1071
  }
1049
1072
  } else {
1073
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1050
1074
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1051
1075
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1052
1076
  }
@@ -1062,6 +1086,12 @@ var disconnectInstance = (instance) => {
1062
1086
  var disconnectedCallback = async (elm) => {
1063
1087
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1064
1088
  const hostRef = getHostRef(elm);
1089
+ {
1090
+ if (hostRef.$rmListeners$) {
1091
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1092
+ hostRef.$rmListeners$ = void 0;
1093
+ }
1094
+ }
1065
1095
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1066
1096
  disconnectInstance(hostRef.$lazyInstance$);
1067
1097
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1101,6 +1131,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1101
1131
  {
1102
1132
  cmpMeta.$members$ = compactMeta[2];
1103
1133
  }
1134
+ {
1135
+ cmpMeta.$listeners$ = compactMeta[3];
1136
+ }
1104
1137
  {
1105
1138
  cmpMeta.$attrsToReflect$ = [];
1106
1139
  }
@@ -1132,9 +1165,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1132
1165
  }
1133
1166
  }
1134
1167
  connectedCallback() {
1135
- getHostRef(this);
1168
+ const hostRef = getHostRef(this);
1136
1169
  if (!this.hasRegisteredEventListeners) {
1137
1170
  this.hasRegisteredEventListeners = true;
1171
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1138
1172
  }
1139
1173
  if (appLoadFallback) {
1140
1174
  clearTimeout(appLoadFallback);
@@ -1189,6 +1223,39 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1189
1223
  }
1190
1224
  endBootstrap();
1191
1225
  };
1226
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1227
+ if (listeners) {
1228
+ listeners.map(([flags, name, method]) => {
1229
+ const target = getHostListenerTarget(elm, flags) ;
1230
+ const handler = hostListenerProxy(hostRef, method);
1231
+ const opts = hostListenerOpts(flags);
1232
+ plt.ael(target, name, handler, opts);
1233
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1234
+ });
1235
+ }
1236
+ };
1237
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1238
+ var _a;
1239
+ try {
1240
+ {
1241
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1242
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1243
+ } else {
1244
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1245
+ }
1246
+ }
1247
+ } catch (e) {
1248
+ consoleError(e);
1249
+ }
1250
+ };
1251
+ var getHostListenerTarget = (elm, flags) => {
1252
+ if (flags & 4 /* TargetDocument */) return doc;
1253
+ return elm;
1254
+ };
1255
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1256
+ passive: (flags & 1 /* Passive */) !== 0,
1257
+ capture: (flags & 2 /* Capture */) !== 0
1258
+ } : (flags & 2 /* Capture */) !== 0;
1192
1259
 
1193
1260
  // src/runtime/nonce.ts
1194
1261
  var setNonce = (nonce) => plt.$nonce$ = nonce;
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoTournamentsIngameTable } from './casino-tournaments-ingame-table-27a040da.js';
2
- import './index-448538d5.js';
1
+ export { C as CasinoTournamentsIngameTable } from './casino-tournaments-ingame-table-fc7d6964.js';
2
+ import './index-1c9a8460.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-448538d5.js';
2
- export { s as setNonce } from './index-448538d5.js';
1
+ import { b as bootstrapLazy } from './index-1c9a8460.js';
2
+ export { s as setNonce } from './index-1c9a8460.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},null,{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
8
+ return bootstrapLazy([["casino-tournaments-ingame-table",[[1,"casino-tournaments-ingame-table",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tournamentId":[513,"tournament-id"],"endpoint":[513],"session":[513],"language":[513],"limit":[514],"theme":[513],"state":[513],"offset":[32],"currentUserData":[32],"leaderboard":[32],"isLeaderboardLoading":[32],"isLoadingMore":[32],"isCurrentPlayerInview":[32],"isLoadingPrevious":[32],"scorefractiondigit":[32]},[[4,"tourPageTabSwitched","tourPageTabSwitchedHandler"]],{"state":["onStateChanged"],"tournamentId":["onTournamentIdChanged"],"endpoint":["onTournamentIdChanged"],"session":["onTournamentIdChanged"],"language":["onTournamentIdChanged"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -71,6 +71,7 @@ export declare class CasinoTournamentsIngameTable {
71
71
  onStateChanged(): void;
72
72
  reStartUpSSEUpdater(url: URL): void;
73
73
  updateMessageHandler: (message: any) => void;
74
+ tourPageTabSwitchedHandler(event: CustomEvent): void;
74
75
  startActivePlayerObserver(): void;
75
76
  startTopRankObserver(): void;
76
77
  startLastRankObserver(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-tournaments-ingame-table",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,p=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(p),b(y),(m=p.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(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 E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},L=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},T=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),W={},A=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>D(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},D=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},F=new WeakMap,N=e=>"sc-"+e.v,U=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of z(Object.keys(o)))e in s||U(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))U(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].$=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),X=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(_(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(Q(h,p,o))X(h,p,o),h=t[++i],p=l[++c];else if(Q(d,y,o))X(d,y,o),d=t[--f],y=l[--m];else if(Q(h,y,o))X(h,y,o),Z(e,h.$,d.$.nextSibling),h=t[++i],y=l[--m];else if(Q(d,p,o))X(d,p,o),Z(e,d.$,h.$),d=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=I(t&&t[c],n,u):(X(r,p,o),t[u]=void 0,s=r.$),p=l[++c]):(s=I(t&&t[c],n,c),p=l[++c]),s&&Z(h.$.parentNode,s,h.$)}i>f?J(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):null!==o&&K(o,0,o.length-1)):e.i!==r&&(l.data=r)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.j),g((()=>ne(e,t)));e.l|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ue(n,"componentWillLoad")),l=le(l,(()=>ue(n,"componentWillRender"))),le(l,(()=>se(e,n,t)))},le=(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,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.p===W)(t)?t:L(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.p=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.j;ue(n,"componentDidRender"),64&e.l||(e.l|=64,ae(t),ue(n,"componentDidLoad"),e.P(t),l||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(a.documentElement),v((()=>D(u,"appload",{detail:{namespace:"casino-tournaments-ingame-table"}})))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const i=e.prototype;if(t.R||t.L||e.watchers){e.watchers&&!t.L&&(t.L=e.watchers);const c=Object.entries(null!=(o=t.R)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" 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=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:2&t?parseFloat(e):1&t?e+"":e)(l,o.R[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.L&&128&u){const e=o.L[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&te(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.L)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.L)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},he=e=>{ue(e,"disconnectedCallback")},de=(e,l={})=>{var o;const h=[],m=l.exclude||[],p=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],R:l[2],W:l[3]};4&c.l&&(S=!0),c.R=l[2],c.M=[],c.L=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.A=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! 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),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.A)&&t.A.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}l.R&&Object.entries(l.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 l;if(!(32&t.l)){if(t.l|=32,n.D){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.D;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.F}" was not found`);l.isProxied||(n.L=l.watchers,fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?he(e.t):(null==e?void 0:e.A)&&e.A.then((()=>he(e.t)))}})()))}componentOnReady(){return n(this).A}};c.D=e[0],m.includes(u)||p.get(u)||(h.push(u),p.define(u,fe(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ce,30)))},me=e=>f.O=e;export{de as b,A as c,L as h,h as p,l as r,me as s}