@everymatrix/casino-engagement-suite-tournament 1.44.0 → 1.45.5

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 (71) hide show
  1. package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
  2. package/dist/casino-engagement-suite-tournament/index.esm.js +1 -0
  3. package/dist/casino-engagement-suite-tournament/p-0f4e94ab.entry.js +1 -0
  4. package/dist/casino-engagement-suite-tournament/p-1bf11325.js +2 -0
  5. package/dist/casino-engagement-suite-tournament/p-5df3ac81.js +1 -0
  6. package/dist/casino-engagement-suite-tournament/p-e1255160.js +1 -0
  7. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  8. package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +119 -807
  9. package/dist/cjs/casino-engagement-suite-tournament-1b738bb2.js +560 -0
  10. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +16 -10
  11. package/dist/cjs/index-16d5d7c3.js +1642 -0
  12. package/dist/cjs/index.cjs.js +8 -0
  13. package/dist/cjs/loader.cjs.js +6 -12
  14. package/dist/collection/collection-manifest.json +3 -3
  15. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +17 -17
  16. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +492 -582
  17. package/dist/collection/components/casino-engagement-suite-tournament/index.js +1 -0
  18. package/dist/collection/index.js +1 -1
  19. package/dist/collection/shared/GradientRoundedButton.js +6 -7
  20. package/dist/collection/shared/renderBar.js +11 -11
  21. package/dist/collection/utils/api.apdater.js +30 -30
  22. package/dist/collection/utils/translations.js +19 -19
  23. package/dist/collection/utils/types.js +9 -9
  24. package/dist/collection/utils/util.date.js +26 -26
  25. package/dist/collection/utils/utils.js +16 -16
  26. package/dist/esm/app-globals-0f993ce5.js +3 -0
  27. package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +119 -807
  28. package/dist/esm/casino-engagement-suite-tournament-d8471680.js +558 -0
  29. package/dist/esm/casino-engagement-suite-tournament.js +13 -10
  30. package/dist/esm/index-3962add4.js +1612 -0
  31. package/dist/esm/index.js +2 -1
  32. package/dist/esm/loader.js +6 -12
  33. package/dist/stencil.config.dev.js +14 -0
  34. package/dist/stencil.config.js +14 -19
  35. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
  36. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
  37. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +120 -123
  38. package/dist/types/components/casino-engagement-suite-tournament/index.d.ts +1 -0
  39. package/dist/types/components.d.ts +17 -1
  40. package/dist/types/index.d.ts +1 -1
  41. package/dist/types/shared/GradientRoundedButton.d.ts +3 -3
  42. package/dist/types/stencil-public-runtime.d.ts +142 -33
  43. package/dist/types/utils/api.apdater.d.ts +2 -30
  44. package/dist/types/utils/translations.d.ts +35 -35
  45. package/dist/types/utils/types.d.ts +77 -77
  46. package/loader/cdn.js +1 -3
  47. package/loader/index.cjs.js +1 -3
  48. package/loader/index.d.ts +13 -1
  49. package/loader/index.es2017.js +1 -3
  50. package/loader/index.js +1 -3
  51. package/loader/package.json +1 -0
  52. package/package.json +8 -8
  53. package/dist/casino-engagement-suite-tournament/p-023f3dc7.entry.js +0 -1
  54. package/dist/casino-engagement-suite-tournament/p-86ce7485.js +0 -1
  55. package/dist/cjs/index-e778ddd2.js +0 -1733
  56. package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
  57. package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
  58. package/dist/components/casino-engagement-suite-tournament.d.ts +0 -11
  59. package/dist/components/casino-engagement-suite-tournament.js +0 -716
  60. package/dist/components/general-styling-wrapper.js +0 -6
  61. package/dist/components/general-styling-wrapper2.js +0 -103
  62. package/dist/components/index.d.ts +0 -26
  63. package/dist/components/index.js +0 -1
  64. package/dist/esm/index-4e611d33.js +0 -1704
  65. package/dist/esm/polyfills/core-js.js +0 -11
  66. package/dist/esm/polyfills/css-shim.js +0 -1
  67. package/dist/esm/polyfills/dom.js +0 -79
  68. package/dist/esm/polyfills/es5-html-element.js +0 -1
  69. package/dist/esm/polyfills/index.js +0 -34
  70. package/dist/esm/polyfills/system.js +0 -6
  71. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-tournament/.stencil/packages/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
@@ -1,95 +1,95 @@
1
1
  export declare enum LeaderboardPage {
2
- Confirm = "Confirm",
3
- List = "List",
4
- Item = "Item"
2
+ Confirm = "Confirm",
3
+ List = "List",
4
+ Item = "Item"
5
5
  }
6
6
  export declare enum TournamentState {
7
- Running = "Running",
8
- Unstarted = "Unstarted",
9
- Closed = "Closed",
10
- Closing = "Closing"
7
+ Running = "Running",
8
+ Unstarted = "Unstarted",
9
+ Closed = "Closed",
10
+ Closing = "Closing"
11
11
  }
12
12
  export interface TournamentApi {
13
- href: string;
14
- id: string;
15
- nameOrTitle: string;
16
- description: string;
17
- termsUrl: string;
18
- thumbnail: string;
19
- thumbnails: [];
20
- startTime: string;
21
- endTime: string;
22
- closeTime: string;
23
- exhibitionStartTime: string;
24
- exhibitionEndTime: string;
25
- state: TournamentState;
26
- tags: string;
27
- minBetCount: number;
28
- dataSource: string;
29
- scoreCriteria: string;
30
- wallets: {
31
- code: string;
32
- };
33
- prizes: {
34
- rank: number;
35
- count: number;
36
- name: string;
37
- }[];
38
- games?: any[];
39
- playerEnrolled?: boolean;
13
+ href: string;
14
+ id: string;
15
+ nameOrTitle: string;
16
+ description: string;
17
+ termsUrl: string;
18
+ thumbnail: string;
19
+ thumbnails: [];
20
+ startTime: string;
21
+ endTime: string;
22
+ closeTime: string;
23
+ exhibitionStartTime: string;
24
+ exhibitionEndTime: string;
25
+ state: TournamentState;
26
+ tags: string;
27
+ minBetCount: number;
28
+ dataSource: string;
29
+ scoreCriteria: string;
30
+ wallets: {
31
+ code: string;
32
+ };
33
+ prizes: {
34
+ rank: number;
35
+ count: number;
36
+ name: string;
37
+ }[];
38
+ games?: any[];
39
+ playerEnrolled?: boolean;
40
40
  }
41
41
  export interface LeaderboardApi {
42
- rank: number;
43
- rankWithoutUnqualified: number;
44
- prizeName: string;
45
- domainID: number;
46
- userID: string;
47
- shortName: string;
48
- betCount: number;
49
- score: number;
50
- unqualified: boolean;
42
+ rank: number;
43
+ rankWithoutUnqualified: number;
44
+ prizeName: string;
45
+ domainID: number;
46
+ userID: string;
47
+ shortName: string;
48
+ betCount: number;
49
+ score: number;
50
+ unqualified: boolean;
51
51
  }
52
52
  export interface Leaderboard extends LeaderboardApi {
53
- isMe?: boolean;
53
+ isMe?: boolean;
54
54
  }
55
- declare type ChangeKeysType<T, K extends {
56
- key: keyof T;
57
- newType: any;
55
+ type ChangeKeysType<T, K extends {
56
+ key: keyof T;
57
+ newType: any;
58
58
  }[]> = {
59
- [P in keyof T]: P extends K[number]['key'] ? Extract<K[number], {
60
- key: P;
61
- }>['newType'] : T[P];
59
+ [P in keyof T]: P extends K[number]['key'] ? Extract<K[number], {
60
+ key: P;
61
+ }>['newType'] : T[P];
62
62
  };
63
- declare type Changes = [
64
- {
65
- key: 'startTime';
66
- newType: Date;
67
- },
68
- {
69
- key: 'endTime';
70
- newType: Date;
71
- },
72
- {
73
- key: 'closeTime';
74
- newType: Date;
75
- },
76
- {
77
- key: 'exhibitionStartTime';
78
- newType: Date;
79
- },
80
- {
81
- key: 'exhibitionEndTime';
82
- newType: Date;
83
- }
63
+ type Changes = [
64
+ {
65
+ key: 'startTime';
66
+ newType: Date;
67
+ },
68
+ {
69
+ key: 'endTime';
70
+ newType: Date;
71
+ },
72
+ {
73
+ key: 'closeTime';
74
+ newType: Date;
75
+ },
76
+ {
77
+ key: 'exhibitionStartTime';
78
+ newType: Date;
79
+ },
80
+ {
81
+ key: 'exhibitionEndTime';
82
+ newType: Date;
83
+ }
84
84
  ];
85
- export declare type Tournament = ChangeKeysType<TournamentApi, Changes>;
85
+ export type Tournament = ChangeKeysType<TournamentApi, Changes>;
86
86
  export declare enum DialogType {
87
- Unjoin = "Unjoin",
88
- Tip = "Tip"
87
+ Unjoin = "Unjoin",
88
+ Tip = "Tip"
89
89
  }
90
90
  export interface Dialog {
91
- isOpen: boolean;
92
- type: DialogType;
93
- data: any;
91
+ isOpen: boolean;
92
+ type: DialogType;
93
+ data: any;
94
94
  }
95
95
  export {};
package/loader/cdn.js CHANGED
@@ -1,3 +1 @@
1
-
2
- module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
@@ -1,3 +1 @@
1
-
2
- module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
1
+ module.exports = require('../dist/cjs/loader.cjs.js');
package/loader/index.d.ts CHANGED
@@ -8,5 +8,17 @@ export interface CustomElementsDefineOptions {
8
8
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
9
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
10
  }
11
- export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
12
15
  export declare function applyPolyfills(): Promise<void>;
16
+
17
+ /**
18
+ * Used to specify a nonce value that corresponds with an application's CSP.
19
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
20
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
21
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
22
+ * will result in the same behavior.
23
+ */
24
+ export declare function setNonce(nonce: string): void;
@@ -1,3 +1 @@
1
-
2
- export * from '../dist/esm/polyfills/index.js';
3
- export * from '../dist/esm/loader.js';
1
+ export * from '../dist/esm/loader.js';
package/loader/index.js CHANGED
@@ -1,4 +1,2 @@
1
-
2
1
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
- export * from '../dist/esm/polyfills/index.js';
4
- export * from '../dist/esm/loader.js';
2
+ export * from '../dist/esm/loader.js';
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "casino-engagement-suite-tournament-loader",
3
+ "private": true,
3
4
  "typings": "./index.d.ts",
4
5
  "module": "./index.js",
5
6
  "main": "./index.cjs.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-tournament",
3
- "version": "1.44.0",
3
+ "version": "1.45.5",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -9,17 +9,17 @@
9
9
  "collection": "./dist/collection/collection-manifest.json",
10
10
  "collection:main": "./dist/collection/index.js",
11
11
  "unpkg": "./dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/esm/casino-engagement-suite-tournament.js",
15
+ "require": "./dist/cjs/casino-engagement-suite-tournament.cjs"
16
+ },
17
+ "./dist/cjs/casino-engagement-suite-tournament.cjs.js": "./dist/cjs/casino-engagement-suite-tournament.cjs.js"
18
+ },
12
19
  "files": [
13
20
  "dist/",
14
21
  "loader/"
15
22
  ],
16
- "scripts": {
17
- "dev": "nx run casino-engagement-suite-tournament:serve",
18
- "build": "nx run casino-engagement-suite-tournament:build"
19
- },
20
- "dependencies": {
21
- "@everymatrix/general-animation-loading": "^1.31.2"
22
- },
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  }
@@ -1 +0,0 @@
1
- import{r as n,h as e,g as t,c as i,H as r,F as s}from"./p-86ce7485.js";const o=class{constructor(e){n(this,e),this.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.host.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{e.innerHTML=n,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((n=>{console.log("Error ",n)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent||this.indeterminate}}getProgressBarLineTemplate(){return e("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return e("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},e("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},e("slot",{name:"Title"},e("div",null)),e("slot",{name:"Percent"},e("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),e("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return t(this)}};function a(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(n);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(t[i[r]]=n[i[r]])}return t}var l,d;o.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}","function"==typeof SuppressedError&&SuppressedError,function(n){n.Info="Info",n.Leaderboard="Leaderboard",n.Games="Games"}(l||(l={})),function(n){n.Starts="Starts",n.Ends="Ends"}(d||(d={}));const c=(n,e)=>(Object.keys(e).map((t=>{n=n.replace(`{${t}}`,e[t])})),n),p=Object.assign(Object.assign(Object.assign({Join:"Join",Unjoin:"Unjoin"},l),d),{TC:"Terms & Conditions",ScoreCriteria:"Score Criteria",MinimumBetCriteria:"Minimum bet criteria",Place:"place",Prizes:"Rewards",LeaderboardDetails:"Leaderboard Details",UnjoinDialog:{Title:"Quit Leaderboard?",Description:"Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?",ButtonYes:"Yes, I want to quit leaderboard",ButtonNo:"No, Stay on the leaderboard"},JoinDialog:{Tile:"Congratulations!",Description:"You have unlocked <span>{tournamentName}</span>! <br />Would you like to join?",ButtonYes:"Join",ButtonNo:"Not interested"},NoLeaderboards:"No Leaderboards yet",NoLeaderboardsTip:"Try winning tickets to Leaderboards as rewards or launching other booster games",Leaderboards:"Leaderboards",TipPrize:"You took <span>{place}</span> place and win <span>{prize}</span>",Tip:"Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward."}),h=(...n)=>{let e=[];return n.map((n=>{switch(typeof n){case"string":e.push(n);break;case"object":Object.keys(n).map((t=>{n[t]&&e.push(t)}))}})),e.join(" ")};var u,g,m;!function(n){n.Confirm="Confirm",n.List="List",n.Item="Item"}(u||(u={})),function(n){n.Running="Running",n.Unstarted="Unstarted",n.Closed="Closed",n.Closing="Closing"}(g||(g={})),function(n){n.Unjoin="Unjoin",n.Tip="Tip"}(m||(m={}));const f=n=>{var{statedClasses:t,innerHTML:i}=n,r=a(n,["statedClasses","innerHTML"]);const{isHollow:s,isPending:o}=t;return e("button",Object.assign({},Object.assign({class:h("GradientRoundedButton","GradientRounded",{Hollow:s||!1,Pending:o||!1})},r)),e("span",null,i))},b=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),x=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg"}),v=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),y=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),w=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg"}),C=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg"}),P=e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg"}),k=n=>{const{left:t,middle:i,right:r}=n,s={left:t,middle:i,right:r};return e("div",{class:"WrapperBar"},Object.keys(s).map((n=>{return e("div",{class:"WrapperBar"+(t=n,t.split("").map(((n,e)=>0===e?n.toUpperCase():n)).join(""))},s[n]||"");var t})))};function T(n){return n.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(" at",",")}function L(n,e){return(100*((new Date).getTime()-n.getTime())/(e.getTime()-n.getTime())).toFixed(0)}const j=n=>{const e=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],t={};return Object.keys(n).map((i=>{const r=n[i];switch(i){case"games":t[i]=r.items;break;default:t[i]=e.includes(i)?new Date(r):r}})),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(n){n.exports=function(){function n(){}function e(n){return n()}function t(){return Object.create(null)}function i(n){n.forEach(e)}function r(n){return"function"==typeof n}function s(n,e){return n!=n?e==e:n!==e||n&&"object"==typeof n||"function"==typeof n}function o(n,e,t){n.insertBefore(e,t||null)}function a(n){n.parentNode&&n.parentNode.removeChild(n)}function l(n){const e={};for(const t of n)e[t.name]=t.value;return e}let d;function c(n){d=n}const p=[],h=[];let u=[];const g=[],m=Promise.resolve();let f=!1;function b(n){u.push(n)}const x=new Set;let v=0;function y(){if(0!==v)return;const n=d;do{try{for(;v<p.length;){const n=p[v];v++,c(n),w(n.$$)}}catch(n){throw p.length=0,v=0,n}for(c(null),p.length=0,v=0;h.length;)h.pop()();for(let n=0;n<u.length;n+=1){const e=u[n];x.has(e)||(x.add(e),e())}u.length=0}while(p.length);for(;g.length;)g.pop()();f=!1,x.clear(),c(n)}function w(n){if(null!==n.fragment){n.update(),i(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(b)}}const C=new Set;function P(n,e){-1===n.$$.dirty[0]&&(p.push(n),f||(f=!0,m.then(y)),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function k(s,o,l,p,h,u,g,m=[-1]){const f=d;c(s);const x=s.$$={fragment:null,ctx:[],props:u,update:n,not_equal:h,bound:t(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(f?f.$$.context:[])),callbacks:t(),dirty:m,skip_bound:!1,root:o.target||f.$$.root};g&&g(x.root);let v=!1;if(x.ctx=l?l(s,o.props||{},((n,e,...t)=>{const i=t.length?t[0]:e;return x.ctx&&h(x.ctx[n],x.ctx[n]=i)&&(!x.skip_bound&&x.bound[n]&&x.bound[n](i),v&&P(s,n)),e})):[],x.update(),v=!0,i(x.before_update),x.fragment=!!p&&p(x.ctx),o.target){if(o.hydrate){const n=function(n){return Array.from(n.childNodes)}(o.target);x.fragment&&x.fragment.l(n),n.forEach(a)}else x.fragment&&x.fragment.c();o.intro&&(w=s.$$.fragment)&&w.i&&(C.delete(w),w.i(undefined)),function(n,t,s,o){const{fragment:a,after_update:l}=n.$$;a&&a.m(t,s),o||b((()=>{const t=n.$$.on_mount.map(e).filter(r);n.$$.on_destroy?n.$$.on_destroy.push(...t):i(t),n.$$.on_mount=[]})),l.forEach(b)}(s,o.target,o.anchor,o.customElement),y()}var w;c(f)}let T;function L(e){let t;return{c(){t=document.createElement("div"),t.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=n},m(n,i){o(n,t,i),e[3](t)},p:n,i:n,o:n,d(n){n&&a(t),e[3](null)}}}function j(n,e,t){let i,{clientstyling:r=""}=e,{clientstylingurl:s=""}=e;return n.$$set=n=>{"clientstyling"in n&&t(1,r=n.clientstyling),"clientstylingurl"in n&&t(2,s=n.clientstylingurl)},n.$$.update=()=>{3&n.$$.dirty&&r&&i&&(()=>{let n=document.createElement("style");n.innerHTML=r,i.appendChild(n)})(),5&n.$$.dirty&&s&&i&&(()=>{let n=new URL(s),e=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{e.innerHTML=n,setTimeout((()=>{i.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[i,r,s,function(n){h[n?"unshift":"push"]((()=>{i=n,t(0,i)}))}]}"function"==typeof HTMLElement&&(T=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(e).filter(r);for(const n in this.$$.slotted)this.appendChild(this.$$.slotted[n])}attributeChangedCallback(n,e,t){this[n]=t}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){(function(n,e){const t=n.$$;null!==t.fragment&&(function(n){const e=[],t=[];u.forEach((i=>-1===n.indexOf(i)?e.push(i):t.push(i))),t.forEach((n=>n())),u=e}(t.after_update),i(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])})(this,1),this.$destroy=n}$on(e,t){if(!r(t))return n;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const n=i.indexOf(t);-1!==n&&i.splice(n,1)}}$set(n){this.$$set&&0!==Object.keys(n).length&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});class F extends T{constructor(n){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),k(this,{target:this.shadowRoot,props:l(this.attributes),customElement:!0},j,L,s,{clientstyling:1,clientstylingurl:2},null),n&&(n.target&&o(n.target,this,n.anchor),n.props&&(this.$set(n.props),y()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(n){this.$$set({clientstyling:n}),y()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(n){this.$$set({clientstylingurl:n}),y()}}return!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",F),F}()}({path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}});const F=class{constructor(e){n(this,e),this.close=i(this,"close",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.tab=l.Info,this.locale=p,this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isActionJoinPending=!1,this.isDialogOpen=!1,this.isShowInfo=!1,this.page=u.List,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0},this.time=0,this.onClickConfirmJoin=()=>{this.actionJoin(this.tournamentItem),this.nextPage=u.List},this.onClickConfirmUnjoin=()=>{this.close.emit()},this.onClickDialogUnjoin=()=>{this.actionJoin(this.dialog.data),this.closeDialog()},this.onClickDialogJoin=()=>{this.closeDialog()},this.onClickBarInLayout=()=>{this.close.emit()},this.onClickBarInLayoutDialog=()=>{this.closeDialog()},this.onClickShowInfo=()=>{this.isShowInfo=!this.isShowInfo},this.onClickBarTip=()=>{this.openDialog(m.Tip)},this.onClickBarBack=()=>{this.setPage(u.List)}}setTimeInterval(){this.timeHolder=setInterval((()=>{this.tournamentList||this.tournamentItem?this.time+=1:this.time=0}),1e3)}updateTournamentListByItem(n){this.tournamentList=this.tournamentList.map((e=>e.id===n.id?j(n):e))}handleEvent(n){const e=n.data,{type:t}=e,i=a(e,["type"]);switch(t){case"ShowLeaderboardRewardModal":{const{tournament:n}=i;this.setPage(u.Confirm,{tournament:j(n)}),postMessage({type:"BarLeaderboardsClick"});break}case"UpdateTournamentsItemRes":{const n=j(i.data.item);this.tournamentItem=n,this.updateTournamentListByItem(n);break}case"UpdateLeaderboardsRes":this.leaderboards=(n=>{let{item:e,items:t}=n;return e?t.map((n=>e&&e.userID===n.userID?Object.assign(Object.assign({},n),{isMe:!0}):n)):t})(i.data);break;case"JoinTournamentRes":case"UnjoinTournamentRes":const{success:n}=i;if(n)switch(this.tournamentItem=Object.assign(Object.assign({},this.tournamentItem),{playerEnrolled:!this.tournamentItem.playerEnrolled}),this.page){case u.Item:break;case u.List:this.updateTournamentListByItem(this.tournamentItem)}this.nextPage&&(this.setPage(this.nextPage),this.nextPage=void 0),this.isActionJoinPending=!1}}get messageSender(){return{JoinTournamentReq:n=>{var e;return window.postMessage({type:"JoinTournamentReq",bonusCode:null===(e=n.wallets[0])||void 0===e?void 0:e.code})},UnjoinTournamentReq:n=>window.postMessage({type:"UnjoinTournamentReq",id:n.id}),UpdateTournamentsItemReq:n=>window.postMessage({type:"UpdateTournamentsItemReq",id:n.id}),UpdateLeaderboardsReq:n=>window.postMessage({type:"UpdateLeaderboardsReq",id:n.id})}}connectedCallback(){this.setTimeInterval()}disconnectedCallback(){clearInterval(this.timeHolder)}actionJoin(n){if(!this.isActionJoinPending){this.isActionJoinPending=!0;try{n.playerEnrolled?this.messageSender.UnjoinTournamentReq(n):this.messageSender.JoinTournamentReq(n)}catch(n){return void console.log("error",n)}}}isTournamentClosed(n){return[g.Closed,g.Closing].includes(n.state)}setPage(n,e){switch(n){case u.Confirm:case u.Item:this.tournamentItem=e.tournament,this.tournamentItem||this.messageSender.UpdateTournamentsItemReq(e.tournament),this.isTournamentClosed(this.tournamentItem)&&this.messageSender.UpdateLeaderboardsReq(this.tournamentItem)}this.tab=l.Info,this.page=n}renderPage(){switch(this.page){case u.Confirm:return this.renderPageConfirm();case u.Item:return this.renderPageLeaderboardItem();case u.List:return this.renderPageLeaderboardList()}}render(){return e(r,null,e("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:p,translationUrl:this.translationUrl}),this.renderPage())}onClickListItemChangePage(n){this.setPage(u.Item,{tournament:n})}onClickItemJoin(n,e){e.stopPropagation(),n.playerEnrolled?this.openDialog(m.Unjoin,n):(this.actionJoin(n),this.tournamentItem=n)}onClickTab(n){switch(this.tab=n,n){case l.Leaderboard:this.leaderboards=void 0,this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);break;case l.Games:this.messageSender.UpdateTournamentsItemReq(this.tournamentItem)}}renderPageLeaderboardList(){var n;if(!this.tournamentList)return this.tournamentList=null===(n=this.leaderboardsInit)||void 0===n?void 0:n.map((n=>j(n))),e("general-animation-loading",null);const{locale:t}=this;return this.tournamentList.length?this.renderLeaderboardContainer(e(s,null,e("div",{class:"Leaderboards Row"},this.tournamentList.map((n=>e("div",{class:h("LeaderboardsItem",n.playerEnrolled?" GradientRounded Hollow":""),onClick:this.onClickListItemChangePage.bind(this,n)},e("div",{class:"LeaderboardsItemContainer"},this.renderTitleContainer(n),this.renderTimeBar(n)))))))):e("div",{class:"NoLeaderboards Row"},e("div",null,t.NoLeaderboards),e("div",null,t.NoLeaderboardsTip))}renderPageConfirm(){if(!this.tournamentItem)return e("general-animation-loading",null);const n=this.tournamentItem.nameOrTitle,{locale:t}=this;return e("div",{class:"PageConfirmContainer"},e("div",{class:"GradientRounded Hollow PageConfirm"},e("div",null,P),e("div",{class:"Title"},t.JoinDialog.Tile),e("div",{class:"Description",innerHTML:c(t.JoinDialog.Description,{tournamentName:n})}),e("div",{class:"PageConfirmButtonsGroup"},e(f,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickConfirmJoin,innerHTML:t.JoinDialog.ButtonYes})),e(f,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending,isHollow:!0},onClick:this.onClickConfirmUnjoin,innerHTML:t.JoinDialog.ButtonNo})))))}renderPageLeaderboardItem(){return this.tournamentItem?this.renderLeaderboardContainer(e(s,null,this.renderTitleContainer(this.tournamentItem),this.renderTabs(),this.renderTabbedContent())):e("general-animation-loading",null)}renderDialogContent(){switch(this.dialog.type){case m.Unjoin:return this.renderDialogContentUnjoin();case m.Tip:return e("div",{class:"Tip"},this.locale.Tip)}}renderDialogContentUnjoin(){const{locale:n}=this;return e("div",{class:"DialogContentUnjoin"},e("div",{class:"DialogContentUnjoinTitle"},n.UnjoinDialog.Title),e("div",{class:"DialogContentUnjoinDescription",innerHTML:n.UnjoinDialog.Description}),e(f,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickDialogUnjoin,innerHTML:n.UnjoinDialog.ButtonYes})),e(f,Object.assign({},{statedClasses:{isHollow:!0,isPending:this.isActionJoinPending},onClick:this.onClickDialogJoin,innerHTML:n.UnjoinDialog.ButtonNo})))}renderTitleContainer(n){const{locale:t}=this;return e("div",{class:"TitleContainer"},e("div",{class:"Title"},n.nameOrTitle),n.state!==g.Closed&&e("div",null,e(f,Object.assign({},{statedClasses:{isHollow:n.playerEnrolled,isPending:this.isActionJoinPending},onClick:this.onClickItemJoin.bind(this,n),innerHTML:n.playerEnrolled?t.Unjoin:t.Join}))))}renderTabbedContent(){switch(this.tab){case l.Info:return this.renderInfo();case l.Leaderboard:return this.renderLeaderboard();case l.Games:return this.renderGames()}}renderGames(){var n;return e("div",{class:"Games"},null===(n=this.tournamentItem.games)||void 0===n?void 0:n.map((n=>e("div",null,e("img",{src:n.defaultThumbnail,alt:""})))))}renderLeaderboard(){return this.leaderboards?this.leaderboards.length?e("table",{class:"Leaderboards"},this.leaderboards.map((n=>e("tr",{class:h({isMe:n.isMe})},e("td",{class:"LeaderboardRank"},e("span",null,n.rank)),e("td",{class:"LeaderboardName"},n.shortName),e("td",{class:"LeaderboardScore"},n.score),e("td",{class:"LeaderboardPrize"},n.prizeName))))):"":e("general-animation-loading",null)}renderTabs(){const{locale:n,tab:t}=this;return e("div",{class:"TabsContainer"},e("div",{class:"Tabs"},Object.keys(l).map((i=>e("div",Object.assign({},{class:h({active:t===i}),onClick:this.onClickTab.bind(this,i)}),n[i])))))}renderTimeBar(n){return e("section",{class:"TimeContainer"},e("div",{class:"Time"},n.playerEnrolled?e(s,null,e("div",null,function(n,e){const t=Math.abs(e.getTime()-n.getTime()),i=Math.floor(t/864e5),r=Math.floor(t%864e5/36e5),s=Math.floor(t%36e5/6e4);return`${String(i).padStart(2,"0")}d:${String(r).padStart(2,"0")}h:${String(s).padStart(2,"0")}m`}(function(n,e){const t=new Date(n);return t.setSeconds(t.getSeconds()+e),t}(n.startTime,this.time),n.endTime)),e("div",null,e(f,{statedClasses:{isHollow:!0,isPendding:!1},innerHTML:`${L(n.startTime,n.endTime)}%`}))):e(s,null,e("div",null,T(n.startTime)),e("div",null,T(n.endTime)))),e("casino-engagement-suite-progress-bar",{value:Number(L(n.startTime,n.endTime)),"hide-percent":!0}))}renderInfo(){var n,t;const{locale:i,tournamentItem:r,isShowInfo:s}=this;return e("div",{class:"InfoContainer"},this.renderTimeBar(r),e("section",{class:"ShowInfo",onClick:this.onClickShowInfo},e("p",null,e("span",null,s?y:v),e("span",null,i.LeaderboardDetails))),s&&e("section",{class:"Info"},e("div",null,r.description),e("div",{class:"Criterias"},e("div",null,i.ScoreCriteria,": ",e("span",null,r.scoreCriteria)),e("div",null,i.MinimumBetCriteria,": ",e("span",null,r.minBetCount))),e("div",{class:"TC"},e("a",{href:r.termsUrl,target:"_blank"},i.TC))),this.isTournamentClosed(this.tournamentItem)&&(null===(n=this.leaderboards)||void 0===n?void 0:n.find((n=>n.isMe)))&&e("section",{class:"ResultPrize",innerHTML:c(i.TipPrize,this.getResultPrize(null===(t=this.leaderboards)||void 0===t?void 0:t.find((n=>n.isMe))))}),e("section",{class:"Prizes"},e("div",{class:"PrizesHeader"},C,e("span",{class:"PrizesText"},i.Prizes)),r.prizes.map(((n,t)=>e("div",{class:"Prize"},t+1," ",i.Place,": ",e("span",{class:"PrizeText"},n.name))))))}getResultPrize(n){return{prize:n.prizeName,place:n.rank}}renderCloseBarInLayout(){const{left:n,middle:t}=this.getWrapperBarData();return e(k,Object.assign({},{left:n,middle:t,right:e("span",Object.assign({},{onClick:this.onClickBarInLayout}),b)}))}renderCloseBarInLayoutDialog(){return e(k,Object.assign({},{right:e("span",Object.assign({},{onClick:this.onClickBarInLayoutDialog}),b)}))}renderLeaderboardContainer(n){const{dialog:{isOpen:t}}=this;return e("div",{class:"Wrapper"},e("div",{class:h("WrapperContent",{faded:t})},this.renderCloseBarInLayout(),e("div",{class:"Root"},e("div",{class:"Main"},n))),e("div",{class:"WrapperUtil"},e("dialog",{open:t},e("div",null,this.renderCloseBarInLayoutDialog(),t&&this.renderDialogContent()))))}getWrapperBarData(){const{page:n,locale:t}=this;switch(n){case u.List:return{left:e("span",{onClick:this.onClickBarTip},x),middle:t.Leaderboards};case u.Item:return{left:e("span",{onClick:this.onClickBarBack},w),middle:""}}}openDialog(n,e){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,type:n,data:e})}closeDialog(){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1})}};F.style='.GradientRounded {\n display: block;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);\n color: rgba(30, 22, 56, 1);\n \n position: relative;\n border-radius: 16px;\n\n &.Hollow {\n background: rgba(30, 22, 56, 1);\n color: #FFFFFF;\n &::before {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 15px;\n border: 1px solid transparent;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;\n -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: destination-out;\n mask-composite: exclude;\n }\n\n }\n}\n\n.GradientRoundedButton {\n border: none;\n padding: 7px;\n \n height: 32px;\n width: 100%;\n \n font-size: 14px;\n font-weight: 700;\n line-height: 17.07px;\n text-align: center;\n \n transition: .5s opacity;\n\n cursor: pointer;\n &.Pending {\n cursor: not-allowed;\n opacity: .3;\n }\n\n &.Hollow {\n \n span {\n background: -webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n }\n}\n.Wrapper {\n height: 100%;\n position: relative;\n color: var(--emw--color-typography, #FFFFFF);\n display: flex;\n background-color: var(--emw--color-background, #1d1537);\n flex-direction: column;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.WrapperContent {\n padding-bottom: 20px;\n transition: 0.5s filter;\n}\n.WrapperContent.faded {\n filter: brightness(53.3333333333%);\n}\n\n.WrapperBar {\n display: flex;\n width: 100%;\n padding: 12px 8px 8px;\n}\n\n.WrapperBarLeft, .WrapperBarRight {\n cursor: pointer;\n}\n\n.WrapperBarMiddle {\n flex-grow: 1;\n text-align: center;\n font-size: 16px;\n line-height: 16px;\n font-weight: 500;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n\n:host {\n display: block;\n font-size: 12px;\n font-family: Inter;\n}\n\n.Row {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.LeaderboardsItem {\n margin: 10px 0;\n border: 1px solid #403956;\n border-radius: 16px;\n}\n.LeaderboardsItem.Hollow {\n border-color: transparent;\n}\n\n.LeaderboardsItemContainer {\n padding-top: 16px;\n}\n\n.Info {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.TimeContainer {\n margin: 24px 0;\n padding: 0 20px;\n}\n.TimeContainer .Time {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n align-items: center;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n.TimeContainer .Time button {\n font-size: 12px;\n height: 20px;\n padding: 0;\n}\n.TimeContainer .Time button::before {\n inset: inherit;\n border: 0;\n}\n\n.ShowInfo {\n margin: 24px 0;\n padding: 0 20px;\n cursor: pointer;\n color: #666178;\n}\n.ShowInfo p {\n display: flex;\n gap: 4px;\n}\n\n.TitleContainer {\n display: flex;\n justify-content: space-between;\n margin: 24px 0;\n padding: 0 20px;\n margin-top: 0;\n gap: 10px;\n font-family: Montserrat;\n}\n.TitleContainer .GradientRoundedButton {\n width: 120px;\n}\n\n.TabsContainer {\n margin: 24px 0;\n padding: 0 20px;\n margin: 0 20px;\n padding: 0;\n border-bottom: 1px solid #575757;\n}\n\n.Tabs {\n display: flex;\n justify-content: space-between;\n justify-content: start;\n font-size: 12px;\n margin-bottom: -1px;\n}\n.Tabs > div {\n padding: 10px;\n color: #666178;\n cursor: pointer;\n}\n.Tabs > div.active {\n color: var(--emw--color-typography, #FFF);\n border-bottom: 2px solid var(--emw--color-typography, #FFF);\n}\n\n.Title {\n font-size: 16px;\n font-weight: 700;\n line-height: 19.5px;\n text-align: left;\n word-break: break-word;\n}\n\n.TC {\n margin-top: 12px;\n}\n.TC a {\n color: #59d1ff;\n}\n\n.Criterias {\n margin: 12px 0;\n}\n.Criterias span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.ResultPrize {\n margin: 24px 0;\n padding: 0 20px;\n}\n.ResultPrize span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.Prizes {\n margin: 24px 0;\n padding: 0 20px;\n}\n.Prizes .PrizesText {\n margin-left: 3px;\n font-weight: 600;\n}\n.Prizes .PrizesHeader {\n align-items: center;\n display: flex;\n}\n.Prizes .PrizesHeader img {\n width: 12px;\n}\n.Prizes .Prize {\n margin: 8px 0;\n}\n.Prizes .Prize .PrizeText {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.Leaderboards {\n width: 100%;\n text-align: center;\n border-collapse: collapse;\n}\n.Leaderboards td {\n opacity: 0.6;\n padding: 20px 5px;\n}\n.Leaderboards td:first-child {\n padding-left: 20px;\n}\n.Leaderboards td:last-child {\n padding-right: 20px;\n}\n.Leaderboards .LeaderboardName {\n color: var(--emw--color-typography, #FFF);\n opacity: 1;\n}\n.Leaderboards tr.isMe {\n background: rgba(0, 0, 0, 0.2);\n}\n.Leaderboards tr.isMe .LeaderboardRank span {\n padding: 0px 3px;\n opacity: 1;\n border: 1px solid var(--emw--color-primary, #ffd62f);\n border-radius: 11px;\n}\n.Leaderboards tr.isMe td {\n color: var(--emw--color-primary, #ffd62f);\n}\n\n.Games {\n margin: 24px 0;\n padding: 0 20px;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n gap: 4px 7.25px;\n}\n.Games img {\n width: 60px;\n}\n\ndialog {\n position: absolute;\n top: 30px;\n width: 100%;\n height: 100%;\n background: transparent;\n border: 0;\n padding: 0;\n color: var(--emw--color-typography, #FFFFFF);\n}\ndialog > div {\n margin: 32px;\n border-radius: 8px;\n background: var(--emw--color-background, #1d1537);\n border: 1px solid #403956;\n align-items: center;\n}\n\n.DialogContentUnjoin {\n padding: 32px;\n padding-top: 10px;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.DialogContentUnjoinTitle {\n font-family: Montserrat;\n font-size: 20px;\n font-weight: 600;\n line-height: 24.38px;\n text-align: center;\n}\n\n.DialogContentUnjoinDescription {\n color: var(--emw--color-secondary, #bbb9c3);\n margin-bottom: 30px;\n}\n\n.Tip {\n padding: 32px;\n padding-top: 10px;\n color: var(--emw--color-secondary, #bbb9c3);\n font-size: 14px;\n}\n\n.PageConfirmContainer {\n text-align: center;\n width: 80%;\n margin: 0 auto;\n}\n\n.PageConfirm {\n padding: 40px 32px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.PageConfirm .Title {\n font-size: 20px;\n text-align: center;\n}\n.PageConfirm .Description {\n color: var(--emw--color-secondary, #bbb9c3);\n font-weight: 400;\n}\n.PageConfirm .Description span {\n color: var(--emw--color-typography, #FFF);\n font-weight: 600;\n}\n\n.PageConfirmButtonsGroup {\n width: 150px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}';const B=class{constructor(e){n(this,e),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.el.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{e.innerHTML=n,setTimeout((()=>{this.el.prepend(e)}),1)})).catch((n=>{console.log("error ",n)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const n=[];if(this.translationUrl){const i=(e=this.translationUrl,t=this.targetTranslations,new Promise((n=>{fetch(e).then((n=>n.json())).then((e=>{Object.keys(e).forEach((n=>{t[n]=t[n]?t[n]:{};for(let i in e[n])t[n][i]=e[n][i]})),n(!0)}))})));n.push(i)}var e,t;return await Promise.all(n)}render(){return e("div",{class:"StyleShell"},e("slot",{name:"mainContent"}))}get el(){return t(this)}};B.style=":host{display:block}";export{o as casino_engagement_suite_progress_bar,F as casino_engagement_suite_tournament,B as general_styling_wrapper}
@@ -1 +0,0 @@
1
- let e,t,l,n=!1,o=!1,s=!1,i=!1;const r="undefined"!=typeof window?window:{},c=r.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=(e,t,l)=>{l&&l.map((([l,n,o])=>{const s=y(e,l),i=d(t,o),r=h(l);f.ael(s,n,i,r),(t.o=t.o||[]).push((()=>f.rel(s,n,i,r)))}))},d=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){$e(e)}},y=(e,t)=>8&t?r:e,h=e=>0!=(2&e),m="http://www.w3.org/1999/xlink",p=new WeakMap,b=e=>"sc-"+e.$,w={},k=e=>"object"==(e=typeof e)||"function"===e,v=(e,t,...l)=>{let n=null,o=null,s=null,i=!1,r=!1,c=[];const f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!k(n))&&(n+=""),i&&r?c[c.length-1].h+=n:c.push(i?g(null,n):n),r=i)};if(f(l),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,j);const a=g(e,null);return a.m=t,c.length>0&&(a.p=c),a.k=o,a.v=s,a},g=(e,t)=>({t:0,g:e,h:t,S:null,p:null,m:null,k:null,v:null}),S={},j={forEach:(e,t)=>e.map(C).forEach(t),map:(e,t)=>e.map(C).map(t).map(M)},C=e=>({vattrs:e.m,vchildren:e.p,vkey:e.k,vname:e.v,vtag:e.g,vtext:e.h}),M=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),v(e.vtag,t,...e.vchildren||[])}const t=g(e.vtag,e.vtext);return t.m=e.vattrs,t.p=e.vchildren,t.k=e.vkey,t.v=e.vname,t},O=(e,t,l,n,o,s)=>{if(l!==n){let i=ue(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=R(l),s=R(n);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(i||"o"!==t[0]||"n"!==t[1]){const r=k(n);if((i||r&&null!==n)&&!o)try{if(e.tagName.includes("-"))e[t]=n;else{let o=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==o||(e[t]=o)}}catch(e){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,f=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(m,t):e.removeAttribute(t)):(!i||4&s||o)&&!r&&(n=!0===n?"":n,f?e.setAttributeNS(m,t,n):e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):ue(r,c)?c.slice(2):c[2]+t.slice(3),l&&f.rel(e,t,l,!1),n&&f.ael(e,t,n,!1)}},x=/\s/,R=e=>e?e.split(x):[],T=(e,t,l,n)=>{const o=11===t.S.nodeType&&t.S.host?t.S.host:t.S,s=e&&e.m||w,i=t.m||w;for(n in s)n in i||O(o,n,s[n],void 0,l,t.t);for(n in i)O(o,n,s[n],i[n],l,t.t)},E=(o,i,r,f)=>{let a,u,$,d=i.p[r],y=0;if(n||(s=!0,"slot"===d.g&&(e&&f.classList.add(e+"-s"),d.t|=d.p?2:1)),null!==d.h)a=d.S=c.createTextNode(d.h);else if(1&d.t)a=d.S=c.createTextNode("");else if(a=d.S=c.createElement(2&d.t?"slot-fb":d.g),T(null,d,!1),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),d.p)for(y=0;y<d.p.length;++y)u=E(o,d,y,a),u&&a.appendChild(u);return a["s-hn"]=l,3&d.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=d.v||"",$=o&&o.p&&o.p[r],$&&$.g===d.g&&o.S&&N(o.S,!1)),a},N=(e,t)=>{f.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==l&&o["s-ol"]&&(A(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&N(o,t)}f.t&=-2},P=(e,t,n,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===l&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=E(null,n,s,e),r&&(o[s].S=r,c.insertBefore(r,W(t))))},F=(e,t,l,n,s)=>{for(;t<=l;++t)(n=e[t])&&(s=n.S,_(n),o=!0,s["s-ol"]?s["s-ol"].remove():N(s,!0),s.remove())},L=(e,t)=>e.g===t.g&&("slot"===e.g?e.v===t.v:e.k===t.k),W=e=>e&&e["s-ol"]||e,A=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,H=(e,t)=>{const l=t.S=e.S,n=e.p,o=t.p,s=t.h;let i;null===s?("slot"===t.g||T(e,t,!1),null!==n&&null!==o?((e,t,l,n)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,y=n[0],h=n[d];for(;i<=a&&r<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==y)y=n[++r];else if(null==h)h=n[--d];else if(L(u,y))H(u,y),u=t[++i],y=n[++r];else if(L($,h))H($,h),$=t[--a],h=n[--d];else if(L(u,h))"slot"!==u.g&&"slot"!==h.g||N(u.S.parentNode,!1),H(u,h),e.insertBefore(u.S,$.S.nextSibling),u=t[++i],h=n[--d];else if(L($,y))"slot"!==u.g&&"slot"!==h.g||N($.S.parentNode,!1),H($,y),e.insertBefore($.S,u.S),$=t[--a],y=n[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].k&&t[f].k===y.k){c=f;break}c>=0?(s=t[c],s.g!==y.g?o=E(t&&t[r],l,c,e):(H(s,y),t[c]=void 0,o=s.S),y=n[++r]):(o=E(t&&t[r],l,r,e),y=n[++r]),o&&A(u.S).insertBefore(o,W(u.S))}i>a?P(e,null==n[d+1]?null:n[d+1].S,l,n,r,d):r>d&&F(t,i,a)})(l,n,t,o):null!==o?(null!==e.h&&(l.textContent=""),P(l,null,t,o,0,o.length-1)):null!==n&&F(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=s:e.h!==s&&(l.data=s)},U=e=>{let t,l,n,o,s,i,r=e.childNodes;for(l=0,n=r.length;l<n;l++)if(t=r[l],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<n;o++)if(i=r[o].nodeType,r[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===i&&s===r[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==r[o].textContent.trim()){t.hidden=!0;break}U(t)}},q=[],D=e=>{let t,l,n,s,i,r,c=0,f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,s=t["s-sn"],r=n.length-1;r>=0;r--)l=n[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(V(l,s)?(i=q.find((e=>e.j===l)),o=!0,l["s-sn"]=l["s-sn"]||s,i?i.C=t:q.push({C:t,j:l}),l["s-sr"]&&q.map((e=>{V(e.j,l["s-sn"])&&(i=q.find((e=>e.j===l)),i&&!e.C&&(e.C=i.C))}))):q.some((e=>e.j===l))||q.push({j:l}));1===t.nodeType&&D(t)}},V=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,_=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(_)},z=e=>ce(e).M,B=(e,t,l)=>{const n=z(e);return{emit:e=>G(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},G=(e,t,l)=>{const n=f.ce(t,l);return e.dispatchEvent(n),n},I=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},J=(e,t)=>{if(e.t|=16,!(4&e.t))return I(e,e.R),ge((()=>K(e,t)));e.t|=512},K=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>ee(l,e,t))),e.u=null),n=ee(l,"componentWillLoad")),te(n,(()=>Q(e,l,t)))},Q=async(e,t,l)=>{const n=e.M,o=n["s-rc"];l&&(e=>{const t=e.T,l=e.M,n=t.t,o=((e,t)=>{let l=b(t),n=he.get(l);if(e=11===e.nodeType?e:c,n)if("string"==typeof n){let t,o=p.get(e=e.head||e);o||p.set(e,o=new Set),o.has(l)||(t=c.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),o&&o.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=o,l.classList.add(o+"-h"))})(e);X(e,t),o&&(o.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>Y(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},X=(i,r)=>{try{r=r.render(),i.t&=-17,i.t|=2,((i,r)=>{const a=i.M,u=i.T,$=i.N||g(null,null),d=(e=>e&&e.g===S)(r)?r:v(null,null,r);if(l=a.tagName,u.P&&(d.m=d.m||{},u.P.map((([e,t])=>d.m[t]=a[e]))),d.g=null,d.t|=4,i.N=d,d.S=$.S=a.shadowRoot||a,e=a["s-sc"],t=a["s-cr"],n=0!=(1&u.t),o=!1,H($,d),f.t|=1,s){let e,t,l,n,o,s;D(d.S);let i=0;for(;i<q.length;i++)e=q[i],t=e.j,t["s-ol"]||(l=c.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<q.length;i++)if(e=q[i],t=e.j,e.C){for(n=e.C.parentNode,o=e.C.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===t["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&U(d.S),f.t&=-2,q.length=0})(i,r)}catch(e){$e(e,i.M)}return null},Y=e=>{const t=e.M,l=e.R;ee(e.i,"componentDidRender"),64&e.t||(e.t|=64,le(t),e.F(t),l||Z()),e.O&&(e.O(),e.O=void 0),512&e.t&&ve((()=>J(e,!1))),e.t&=-517},Z=()=>{le(c.documentElement),ve((()=>G(r,"appload",{detail:{namespace:"casino-engagement-suite-tournament"}})))},ee=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){$e(e)}},te=(e,t)=>e&&e.then?e.then(t):t(),le=e=>e.classList.add("hydrated"),ne=(e,t,l)=>{if(t.L){const n=Object.entries(t.L),o=e.prototype;if(n.map((([e,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(o,e,{get(){return((e,t)=>ce(this).W.get(t))(0,e)},set(l){((e,t,l,n)=>{const o=ce(e),s=o.W.get(t),i=o.t,r=o.i;l=((e,t)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.L[t][0]),8&i&&void 0!==s||l===s||Number.isNaN(s)&&Number.isNaN(l)||(o.W.set(t,l),r&&2==(18&i)&&J(o,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;o.attributeChangedCallback=function(e,t,n){f.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const o=n[1]||e;return l.set(o,e),512&n[0]&&t.P.push([e,o]),o}))}}return e},oe=e=>{ee(e,"connectedCallback")},se=(e,t={})=>{const l=[],n=t.exclude||[],o=r.customElements,s=c.head,i=s.querySelector("meta[charset]"),a=c.createElement("style"),d=[];let y,h=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",c.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],L:t[2],A:t[3]};s.L=t[2],s.A=t[3],s.P=[];const i=s.$,r=class extends HTMLElement{constructor(e){super(e),ae(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=ce(e),l=t.T,n=()=>{};if(1&t.t)$(e,t,l.A),oe(t.i);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=c.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){I(t,t.R=l);break}}l.L&&Object.entries(l.L).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=ye(l)).then){const e=()=>{};o=await o,e()}o.isProxied||(ne(o,l,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){$e(e)}t.t&=-9,e(),oe(t.i)}if(o.style){let e=o.style;const t=b(l);if(!he.has(t)){const n=()=>{};((e,t,l)=>{let n=he.get(e);u&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,he.set(e,n)})(t,e,!!(1&l.t)),n()}}}const s=t.R,i=()=>J(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,l)}n()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{if(0==(1&f.t)){const e=ce(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),ee(t,"disconnectedCallback")}})()))}componentOnReady(){return ce(this).H}};s.U=e[0],n.includes(i)||o.get(i)||(l.push(i),o.define(i,ne(r,s,1)))}))})),a.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.setAttribute("data-styles",""),s.insertBefore(a,i?i.nextSibling:s.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):f.jmp((()=>y=setTimeout(Z,30)))},ie=(e,t)=>t,re=new WeakMap,ce=e=>re.get(e),fe=(e,t)=>re.set(t.i=e,t),ae=(e,t)=>{const l={t:0,M:e,T:t,W:new Map};return l.H=new Promise((e=>l.F=e)),e["s-p"]=[],e["s-rc"]=[],$(e,l,t.A),re.set(e,l)},ue=(e,t)=>t in e,$e=(e,t)=>(0,console.error)(e,t),de=new Map,ye=e=>{const t=e.$.replace(/-/g,"_"),l=e.U,n=de.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(de.set(l,e),e[t])),$e)},he=new Map,me=[],pe=[],be=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&f.t?ve(ke):f.raf(ke))},we=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){$e(e)}e.length=0},ke=()=>{we(me),we(pe),(i=me.length>0)&&f.raf(ke)},ve=e=>a().then(e),ge=be(pe,!0);export{ie as F,S as H,se as b,B as c,z as g,v as h,a as p,fe as r}