@everymatrix/gamification-dropdown 1.56.3 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cjs/{gamification-dropdown-b61f6455.js → gamification-dropdown-bacd4b01.js} +1 -1
  2. package/dist/cjs/gamification-dropdown.cjs.js +2 -2
  3. package/dist/cjs/gamification-dropdown_4.cjs.entry.js +7 -6
  4. package/dist/cjs/{index-9f57df89.js → index-43105bc3.js} +8 -1
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/locale.utils-dc4c7c34.js +224 -0
  8. package/dist/cjs/{player-elevate-card-items-a64a5a53.js → player-elevate-card-items-432f3d1b.js} +6 -167
  9. package/dist/cjs/player-elevate-card.cjs.entry.js +4 -3
  10. package/dist/cjs/player-elevate-pointcard.cjs.entry.js +5 -4
  11. package/dist/cjs/player-rakeback-card.cjs.entry.js +162 -0
  12. package/dist/collection/collection-manifest.json +2 -1
  13. package/dist/collection/components/gamification-dropdown/gamification-dropdown.stories.js +46 -0
  14. package/dist/esm/{gamification-dropdown-9a68cf16.js → gamification-dropdown-8eb8a896.js} +1 -1
  15. package/dist/esm/gamification-dropdown.js +3 -3
  16. package/dist/esm/gamification-dropdown_4.entry.js +4 -3
  17. package/dist/esm/{index-da41a34a.js → index-71b1bdfa.js} +8 -1
  18. package/dist/esm/index.js +2 -2
  19. package/dist/esm/loader.js +3 -3
  20. package/dist/esm/locale.utils-71f870a8.js +220 -0
  21. package/dist/esm/{player-elevate-card-items-6cc8ac45.js → player-elevate-card-items-66be34fb.js} +3 -161
  22. package/dist/esm/player-elevate-card.entry.js +3 -2
  23. package/dist/esm/player-elevate-pointcard.entry.js +3 -2
  24. package/dist/esm/player-rakeback-card.entry.js +158 -0
  25. package/dist/gamification-dropdown/gamification-dropdown.esm.js +1 -1
  26. package/dist/gamification-dropdown/index.esm.js +1 -1
  27. package/dist/gamification-dropdown/p-3070ff30.entry.js +1 -0
  28. package/dist/gamification-dropdown/p-39a3034e.entry.js +1 -0
  29. package/dist/gamification-dropdown/{p-fcccda48.js → p-8c3440cc.js} +1 -1
  30. package/dist/gamification-dropdown/p-a48fd792.entry.js +1 -0
  31. package/dist/gamification-dropdown/p-c3e53f66.js +1 -0
  32. package/dist/gamification-dropdown/p-cec5fb75.entry.js +1 -0
  33. package/dist/gamification-dropdown/{p-e2b2faba.js → p-f8b970c5.js} +1 -1
  34. package/dist/gamification-dropdown/p-fecbcc98.js +1 -0
  35. package/dist/storybook/main.js +47 -0
  36. package/dist/storybook/preview.js +9 -0
  37. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  38. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/storybook/main.d.ts +3 -0
  39. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/storybook/preview.d.ts +70 -0
  40. package/dist/types/components/gamification-dropdown/gamification-dropdown.stories.d.ts +5 -0
  41. package/package.json +1 -1
  42. package/dist/gamification-dropdown/p-9a95eec2.entry.js +0 -1
  43. package/dist/gamification-dropdown/p-a653bfbd.entry.js +0 -1
  44. package/dist/gamification-dropdown/p-c36d41e2.js +0 -1
  45. package/dist/gamification-dropdown/p-d55c742c.entry.js +0 -1
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-da41a34a.js';
2
- export { s as setNonce } from './index-da41a34a.js';
1
+ import { b as bootstrapLazy } from './index-71b1bdfa.js';
2
+ export { s as setNonce } from './index-71b1bdfa.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([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]]], options);
8
+ return bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -0,0 +1,220 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const SUPPORTED_LANGUAGES = ['en', 'zh-hk', 'it', 'fr', 'tr', 'hr'];
3
+ const TRANSLATIONS = {
4
+ en: {
5
+ redeem: 'Redeem',
6
+ claim: 'Claim',
7
+ expireOn: 'Expire on ',
8
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
9
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
10
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
11
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
12
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
13
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
14
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
15
+ spendablePoints: 'Spendable Points:',
16
+ details: 'Details',
17
+ earningRules: 'Earning Rules',
18
+ xp: 'XP',
19
+ sp: 'Coins',
20
+ termAndConditions: 'Term & Conditions',
21
+ rakebackTitle: 'Available Rakeback',
22
+ loading: 'Loading',
23
+ minutesCanClaim: 'Next Claim is available in ${minutes} minutes'
24
+ },
25
+ 'zh-hk': {
26
+ redeem: '兑奖',
27
+ claim: '返佣',
28
+ expireOn: 'Expire on ',
29
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
30
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
31
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
32
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
33
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
34
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
35
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
36
+ spendablePoints: 'Spendable Points:',
37
+ details: '明细',
38
+ earningRules: 'Earning Rules',
39
+ xp: 'XP',
40
+ sp: 'Coins',
41
+ termAndConditions: 'Term & Conditions',
42
+ rakebackTitle: '可用的返利',
43
+ loading: '加載中',
44
+ minutesCanClaim: '下次可領取時間為${minutes}分鐘後'
45
+ },
46
+ de: {
47
+ redeem: 'Redeem',
48
+ claim: 'Anspruch',
49
+ expireOn: 'Expire on ',
50
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
51
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
52
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
53
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
54
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
55
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
56
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
57
+ spendablePoints: 'Spendable Points:',
58
+ details: 'Details',
59
+ earningRules: 'Earning Rules',
60
+ xp: 'XP',
61
+ sp: 'Coins',
62
+ termAndConditions: 'Term & Conditions',
63
+ rakebackTitle: 'Verfügbarer Rakeback',
64
+ loading: 'Laden',
65
+ minutesCanClaim: 'Nächster Anspruch ist in ${minutes} Minuten verfügbar'
66
+ },
67
+ it: {
68
+ redeem: 'Redeem',
69
+ claim: 'Richiesta',
70
+ expireOn: 'Expire on ',
71
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
72
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
73
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
74
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
75
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
76
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
77
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
78
+ spendablePoints: 'Spendable Points:',
79
+ details: 'Details',
80
+ earningRules: 'Earning Rules',
81
+ xp: 'XP',
82
+ sp: 'Coins',
83
+ termAndConditions: 'Term & Conditions',
84
+ rakebackTitle: 'Rakeback Disponibile',
85
+ loading: 'Caricamento',
86
+ minutesCanClaim: 'La prossima richiesta sarà disponibile tra ${minutes} minuti'
87
+ },
88
+ fr: {
89
+ redeem: 'Redeem',
90
+ claim: 'Réclamer',
91
+ expireOn: 'Expire on ',
92
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
93
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
94
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
95
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
96
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
97
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
98
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
99
+ spendablePoints: 'Spendable Points:',
100
+ details: 'Details',
101
+ earningRules: 'Earning Rules',
102
+ xp: 'XP',
103
+ sp: 'Coins',
104
+ termAndConditions: 'Term & Conditions',
105
+ rakebackTitle: 'Rakeback Disponible',
106
+ loading: 'Chargement',
107
+ minutesCanClaim: 'La prochaine réclamation sera disponible dans ${minutes} minutes'
108
+ },
109
+ es: {
110
+ redeem: 'Redeem',
111
+ claim: 'Reclamar',
112
+ rakebackTitle: 'Rakeback Disponible',
113
+ loading: 'Cargando',
114
+ minutesCanClaim: 'La próxima reclamación estará disponible en ${minutes} minutos'
115
+ },
116
+ tr: {
117
+ redeem: 'Redeem',
118
+ claim: 'Talep',
119
+ expireOn: 'Expire on ',
120
+ pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
121
+ pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
122
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
123
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
124
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
125
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
126
+ tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
127
+ spendablePoints: 'Spendable Points:',
128
+ details: 'Details',
129
+ earningRules: 'Earning Rules',
130
+ xp: 'XP',
131
+ sp: 'Coins',
132
+ termAndConditions: 'Term & Conditions',
133
+ rakebackTitle: 'Mevcut Rakeback',
134
+ loading: 'Yükleniyor',
135
+ minutesCanClaim: 'Sonraki talep ${minutes} dakika içinde kullanılabilir'
136
+ },
137
+ ru: {
138
+ redeem: 'Redeem',
139
+ claim: 'Требовать',
140
+ rakebackTitle: 'Доступный Рейкбек',
141
+ loading: 'Загрузка',
142
+ minutesCanClaim: 'Следующее требование будет доступно через ${minutes} минут'
143
+ },
144
+ ro: {
145
+ redeem: 'Redeem',
146
+ claim: 'Revendicare',
147
+ rakebackTitle: 'Rakeback Disponibil',
148
+ loading: 'Se încarcă',
149
+ minutesCanClaim: 'Următoarea revendicare va fi disponibilă în ${minutes} minute'
150
+ },
151
+ hr: {
152
+ redeem: 'Otkupiti',
153
+ claim: 'Zahtjev',
154
+ expireOn: 'Istječe',
155
+ pointsToBeExpired: '${expirationPoints} bodova ističe za ${expireDay} dana',
156
+ pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
157
+ pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
158
+ pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
159
+ pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
160
+ tipsForNextLevel: 'Trebate ${pointsToReach} da dosegnete razinu ${levelName}',
161
+ spendablePoints: 'Bodovi za potrošit:',
162
+ details: 'Detalji',
163
+ xp: 'XP',
164
+ rakebackTitle: 'Dostupan Rakeback',
165
+ loading: 'Učitavanje',
166
+ minutesCanClaim: 'Sljedeći zahtjev bit će dostupan za ${minutes} minuta'
167
+ },
168
+ hu: {
169
+ redeem: 'Redeem',
170
+ claim: 'Igény',
171
+ rakebackTitle: 'Elérhető Rakeback',
172
+ loading: 'Betöltés',
173
+ minutesCanClaim: 'A következő igény ${minutes} perc múlva lesz elérhető'
174
+ },
175
+ pl: {
176
+ redeem: 'Redeem',
177
+ claim: 'Roszczenie',
178
+ rakebackTitle: 'Dostępny Rakeback',
179
+ loading: 'Ładowanie',
180
+ minutesCanClaim: 'Następne roszczenie będzie dostępne za ${minutes} minut'
181
+ },
182
+ pt: {
183
+ redeem: 'Redeem',
184
+ claim: 'Reivindicar',
185
+ rakebackTitle: 'Rakeback Disponível',
186
+ loading: 'Carregando',
187
+ minutesCanClaim: 'Próxima reivindicação disponível em ${minutes} minutos'
188
+ },
189
+ sl: {
190
+ redeem: 'Redeem',
191
+ claim: 'Zahtevek',
192
+ rakebackTitle: 'Razpoložljiv Rakeback',
193
+ loading: 'Nalaganje',
194
+ minutesCanClaim: 'Naslednji zahtevek bo na voljo čez ${minutes} minut'
195
+ },
196
+ sr: {
197
+ redeem: 'Redeem',
198
+ claim: 'Zahtev',
199
+ rakebackTitle: 'Dostupan Rakeback',
200
+ loading: 'Učitavanje',
201
+ minutesCanClaim: 'Sledeći zahtev biće dostupan za ${minutes} minuta'
202
+ }
203
+ };
204
+ const translate = (key, customLang) => {
205
+ const lang = customLang;
206
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
207
+ };
208
+ const translateWithParams = (key, params) => {
209
+ const lang = params['lang'];
210
+ let templateString = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
211
+ if (!params) {
212
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
213
+ }
214
+ Object.keys(params).forEach((paramName) => {
215
+ templateString = templateString.replace(new RegExp('\\$\{' + paramName + '\}', 'gm'), params[paramName]);
216
+ });
217
+ return templateString;
218
+ };
219
+
220
+ export { TRANSLATIONS as T, translate as a, translateWithParams as t };
@@ -1,4 +1,5 @@
1
- import { h, a as getAssetPath } from './index-da41a34a.js';
1
+ import { h, a as getAssetPath } from './index-71b1bdfa.js';
2
+ import { a as translate } from './locale.utils-71f870a8.js';
2
3
 
3
4
  function _typeof(o) {
4
5
  "@babel/helpers - typeof";
@@ -2196,165 +2197,6 @@ function cleanEscapedString(input) {
2196
2197
  return matched[1].replace(doubleQuoteRegExp, "'");
2197
2198
  }
2198
2199
 
2199
- const DEFAULT_LANGUAGE = 'en';
2200
- const SUPPORTED_LANGUAGES = ['en', 'zh-hk', 'it', 'fr', 'tr', 'hr'];
2201
- const TRANSLATIONS = {
2202
- en: {
2203
- redeem: 'Redeem',
2204
- expireOn: 'Expire on ',
2205
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2206
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2207
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2208
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2209
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2210
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2211
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2212
- spendablePoints: 'Spendable Points:',
2213
- details: 'Details',
2214
- earningRules: 'Earning Rules',
2215
- xp: 'XP',
2216
- sp: 'Coins',
2217
- termAndConditions: 'Term & Conditions',
2218
- },
2219
- 'zh-hk': {
2220
- redeem: '兑奖',
2221
- expireOn: 'Expire on ',
2222
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2223
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2224
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2225
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2226
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2227
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2228
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2229
- spendablePoints: 'Spendable Points:',
2230
- details: '明细',
2231
- earningRules: 'Earning Rules',
2232
- xp: 'XP',
2233
- sp: 'Coins',
2234
- termAndConditions: 'Term & Conditions',
2235
- },
2236
- de: {
2237
- redeem: 'Redeem',
2238
- expireOn: 'Expire on ',
2239
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2240
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2241
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2242
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2243
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2244
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2245
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2246
- spendablePoints: 'Spendable Points:',
2247
- details: 'Details',
2248
- earningRules: 'Earning Rules',
2249
- xp: 'XP',
2250
- sp: 'Coins',
2251
- termAndConditions: 'Term & Conditions',
2252
- },
2253
- it: {
2254
- redeem: 'Redeem',
2255
- expireOn: 'Expire on ',
2256
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2257
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2258
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2259
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2260
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2261
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2262
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2263
- spendablePoints: 'Spendable Points:',
2264
- details: 'Details',
2265
- earningRules: 'Earning Rules',
2266
- xp: 'XP',
2267
- sp: 'Coins',
2268
- termAndConditions: 'Term & Conditions',
2269
- },
2270
- fr: {
2271
- redeem: 'Redeem',
2272
- expireOn: 'Expire on ',
2273
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2274
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2275
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2276
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2277
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2278
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2279
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2280
- spendablePoints: 'Spendable Points:',
2281
- details: 'Details',
2282
- earningRules: 'Earning Rules',
2283
- xp: 'XP',
2284
- sp: 'Coins',
2285
- termAndConditions: 'Term & Conditions',
2286
- },
2287
- es: {
2288
- redeem: 'Redeem'
2289
- },
2290
- tr: {
2291
- redeem: 'Redeem',
2292
- expireOn: 'Expire on ',
2293
- pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
2294
- pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
2295
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2296
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2297
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2298
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2299
- tipsForNextLevel: 'Next level is ${levelName}. ${pointsToReach} XP to level up',
2300
- spendablePoints: 'Spendable Points:',
2301
- details: 'Details',
2302
- earningRules: 'Earning Rules',
2303
- xp: 'XP',
2304
- sp: 'Coins',
2305
- termAndConditions: 'Term & Conditions',
2306
- },
2307
- ru: {
2308
- redeem: 'Redeem'
2309
- },
2310
- ro: {
2311
- redeem: 'Redeem'
2312
- },
2313
- hr: {
2314
- redeem: 'Otkupiti',
2315
- expireOn: 'Istječe',
2316
- pointsToBeExpired: '${expirationPoints} bodova ističe za ${expireDay} dana',
2317
- pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
2318
- pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
2319
- pointsToBeExpiredMinutes: '${expirationPoints} points to expire in ${expireDay} minutes',
2320
- pointsToBeExpiredMinute: '${expirationPoints} points to expire in ${expireDay} minute',
2321
- tipsForNextLevel: 'Trebate ${pointsToReach} da dosegnete razinu ${levelName}',
2322
- spendablePoints: 'Bodovi za potrošit:',
2323
- details: 'Detalji',
2324
- xp: 'XP',
2325
- },
2326
- hu: {
2327
- redeem: 'Redeem'
2328
- },
2329
- pl: {
2330
- redeem: 'Redeem'
2331
- },
2332
- pt: {
2333
- redeem: 'Redeem'
2334
- },
2335
- sl: {
2336
- redeem: 'Redeem'
2337
- },
2338
- sr: {
2339
- redeem: 'Redeem'
2340
- }
2341
- };
2342
- const translate = (key, customLang) => {
2343
- const lang = customLang;
2344
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
2345
- };
2346
- const translateWithParams = (key, params) => {
2347
- const lang = params['lang'];
2348
- let templateString = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
2349
- if (!params) {
2350
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
2351
- }
2352
- Object.keys(params).forEach((paramName) => {
2353
- templateString = templateString.replace(new RegExp('\\$\{' + paramName + '\}', 'gm'), params[paramName]);
2354
- });
2355
- return templateString;
2356
- };
2357
-
2358
2200
  const levelPercentSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIyOCIgc3R5bGU9Im9wYWNpdHk6IDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB5PSIxMiIgeD0iMiIgd2lkdGg9IjEwMCUiIGlkPSJ0b3RhbF9sZXZlbCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KICAgIDxyZWN0IHk9IjEyIiAgeD0iMiIgaWQ9ImN1cnJlbnRfbGV2ZWwiIHdpZHRoPSI2NCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIvPgogICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcl9jdXJyZW50X2xldmVsKSI+CiAgICAgICAgPGNpcmNsZSBpZD0iY2lyY2xlX2N1cnJlbnRfbGV2ZWwiIGN4PSI3NC41IiBjeT0iMTQuNSIgcj0iNi41IiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcl9oZWFydF9iYWxsKSI+CiAgICAgICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcl9iYWxsKSI+CiAgICAgICAgICAgIDxjaXJjbGUgY3g9IjE2OSIgY3k9IjE0IiByPSIxMCIgaWQ9ImxvY2siIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl9iYWxsKSIvPgogICAgICAgIDwvZz4KICAgICAgICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyX2hlYXJ0KSI+CiAgICAgICAgICA8c3ZnIH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IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0Ml80MjMxIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=';
@@ -2376,4 +2218,4 @@ const PlayerAvatar = (props) => {
2376
2218
  return h("div", { class: "PlayerAvatar", style: { 'position': `${props.onlyBadge ? '' : 'relative'}` } }, !props.onlyBadge && h("img", { class: "Avatar", src: avatarSrc }), badge);
2377
2219
  };
2378
2220
 
2379
- export { PlayerAvatar as P, TRANSLATIONS as T, translateWithParams as a, PlayerElevateLoyaltyLevel as b, PlayerPoints as c, PlayerLoyaltyProcess as d, PlayerNameDiv as e, PlayerElevateCardRedeem as f, getTimezoneOffsetInMilliseconds as g, translate as h, requiredArgs as r, toDate as t };
2221
+ export { PlayerAvatar as P, PlayerElevateLoyaltyLevel as a, PlayerPoints as b, PlayerLoyaltyProcess as c, PlayerNameDiv as d, PlayerElevateCardRedeem as e, getTimezoneOffsetInMilliseconds as g, requiredArgs as r, toDate as t };
@@ -1,5 +1,6 @@
1
- import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-da41a34a.js';
2
- import { T as TRANSLATIONS, P as PlayerAvatar, c as PlayerPoints, e as PlayerNameDiv, b as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, f as PlayerElevateCardRedeem } from './player-elevate-card-items-6cc8ac45.js';
1
+ import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-71b1bdfa.js';
2
+ import { P as PlayerAvatar, b as PlayerPoints, d as PlayerNameDiv, a as PlayerElevateLoyaltyLevel, c as PlayerLoyaltyProcess, e as PlayerElevateCardRedeem } from './player-elevate-card-items-66be34fb.js';
3
+ import { T as TRANSLATIONS } from './locale.utils-71f870a8.js';
3
4
 
4
5
  const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emw--color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
5
6
  const PlayerElevateCardStyle0 = playerElevateCardCss;
@@ -1,5 +1,6 @@
1
- import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-da41a34a.js';
2
- import { T as TRANSLATIONS, P as PlayerAvatar, h as translate, c as PlayerPoints } from './player-elevate-card-items-6cc8ac45.js';
1
+ import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-71b1bdfa.js';
2
+ import { T as TRANSLATIONS, a as translate } from './locale.utils-71f870a8.js';
3
+ import { P as PlayerAvatar, b as PlayerPoints } from './player-elevate-card-items-66be34fb.js';
3
4
 
4
5
  const playerElevatePointcardCss = ":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";
5
6
  const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
@@ -0,0 +1,158 @@
1
+ import { r as registerInstance, h } from './index-71b1bdfa.js';
2
+ import { a as translate, t as translateWithParams, T as TRANSLATIONS } from './locale.utils-71f870a8.js';
3
+
4
+ const playerRakebackCardCss = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";
5
+ const PlayerRakebackCardStyle0 = playerRakebackCardCss;
6
+
7
+ const PlayerRakebackCard = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ /**
11
+ * Truncate number to specified decimal places (without rounding)
12
+ * @param num Number to be processed
13
+ * @param digits Number of decimal places to keep
14
+ */
15
+ this.truncateNumber = (num, digits = 2) => {
16
+ const str = num.toString();
17
+ const [integer, decimal = ''] = str.split('.');
18
+ return digits > 0 ? `${integer}.${decimal ? decimal.slice(0, digits) : '00'}` : `${integer}`;
19
+ };
20
+ this.sendRakebackClaimedEvent = () => {
21
+ if (!this.endpoint || !this.session || !this.rakebackInfo.claimable || this.isLoading) {
22
+ return;
23
+ }
24
+ window.postMessage({ type: 'RakebackClaimTrigger', points: this.rakebackInfo.points }, window.location.href);
25
+ };
26
+ this.endpoint = undefined;
27
+ this.theme = 'Dark';
28
+ this.session = undefined;
29
+ this.language = 'en';
30
+ this.clientStyling = '';
31
+ this.clientStylingUrl = '';
32
+ this.translationUrl = '';
33
+ this.show = true;
34
+ this.rakebackInfo = {
35
+ hasRakebackWallet: false,
36
+ points: 0.0,
37
+ currency: 'TRY',
38
+ claimable: false,
39
+ minutesCanClaim: 0,
40
+ showCanClaim: false
41
+ };
42
+ this.isLoading = false;
43
+ this.coolingOffPeriod = false;
44
+ this.showTheWidget = false;
45
+ }
46
+ async onSessionOrEndpointChange() {
47
+ await this.loadRakebackInfo();
48
+ }
49
+ async onShowOrHasRakebackWalletChange() {
50
+ this.showTheWidget = this.show && this.rakebackInfo.hasRakebackWallet;
51
+ }
52
+ handleMessage(event) {
53
+ const { type } = event === null || event === void 0 ? void 0 : event.data;
54
+ if (type === 'RakebackClaimConfirmed') {
55
+ this.claimRakeback();
56
+ }
57
+ }
58
+ async loadRakebackInfo() {
59
+ if (!this.endpoint || !this.session) {
60
+ return;
61
+ }
62
+ this.isLoading = true;
63
+ try {
64
+ const url = new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`);
65
+ const response = await fetch(url.href, {
66
+ method: 'GET',
67
+ headers: {
68
+ 'X-Sessionid': this.session,
69
+ 'Content-Type': 'application/json'
70
+ }
71
+ });
72
+ if (!response.ok) {
73
+ throw new Error(`HTTP error! status: ${response.status}`);
74
+ }
75
+ const data = await response.json();
76
+ if (!data.success) {
77
+ throw new Error(data.errorMessage || 'Failed to load rakeback info');
78
+ }
79
+ const { rakebackWallet } = data === null || data === void 0 ? void 0 : data.data;
80
+ if (!rakebackWallet) {
81
+ window.postMessage({ type: 'RakebackWalletMissing' }, window.location.href);
82
+ return;
83
+ }
84
+ const { total, claimable, currency, minutesCanClaim } = rakebackWallet || {};
85
+ this.rakebackInfo = {
86
+ hasRakebackWallet: true,
87
+ points: (total === null || total === void 0 ? void 0 : total.points) ? this.truncateNumber(total.points, 2) : `0.00`,
88
+ currency: currency || '',
89
+ claimable: claimable || false,
90
+ showCanClaim: Boolean(minutesCanClaim && minutesCanClaim > 0),
91
+ minutesCanClaim: minutesCanClaim
92
+ ? minutesCanClaim <= 1 && minutesCanClaim > 0
93
+ ? 1
94
+ : this.truncateNumber(minutesCanClaim, 0)
95
+ : 0
96
+ };
97
+ }
98
+ catch (err) {
99
+ console.error('Error loading rakeback info:', err);
100
+ window.postMessage({ type: 'RakebackClaimError', message: err.message }, window.location.href);
101
+ }
102
+ finally {
103
+ this.isLoading = false;
104
+ }
105
+ }
106
+ async claimRakeback() {
107
+ this.isLoading = true;
108
+ try {
109
+ const url = new URL(`${this.endpoint}/v1/elevate/rakeback/claim`);
110
+ const response = await fetch(url.href, {
111
+ method: 'PUT',
112
+ headers: {
113
+ 'X-Sessionid': this.session,
114
+ 'Content-Type': 'application/json'
115
+ },
116
+ body: JSON.stringify({})
117
+ });
118
+ if (!response.ok) {
119
+ throw new Error(`HTTP error! status: ${response.status}`);
120
+ }
121
+ const data = await response.json();
122
+ if (!data.success) {
123
+ throw new Error(data.errorMessage || 'Failed to claim rakeback');
124
+ }
125
+ // Refresh rakeback information
126
+ await this.loadRakebackInfo();
127
+ // Send event notification for successful redemption
128
+ window.postMessage({ type: 'RakebackClaimed', points: this.rakebackInfo.points }, window.location.href);
129
+ }
130
+ catch (err) {
131
+ console.error('Error claiming rakeback:', err);
132
+ window.postMessage({ type: 'RakebackClaimError', message: err.message }, window.location.href);
133
+ }
134
+ finally {
135
+ this.isLoading = false;
136
+ }
137
+ }
138
+ async componentWillLoad() {
139
+ await this.loadRakebackInfo();
140
+ await this.onShowOrHasRakebackWalletChange();
141
+ }
142
+ render() {
143
+ return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
144
+ lang: this.language,
145
+ minutes: this.rakebackInfo.minutesCanClaim
146
+ })))))) : null;
147
+ }
148
+ static get watchers() { return {
149
+ "session": ["onSessionOrEndpointChange"],
150
+ "endpoint": ["onSessionOrEndpointChange"],
151
+ "language": ["onSessionOrEndpointChange"],
152
+ "show": ["onShowOrHasRakebackWalletChange"],
153
+ "rakebackInfo": ["onShowOrHasRakebackWalletChange"]
154
+ }; }
155
+ };
156
+ PlayerRakebackCard.style = PlayerRakebackCardStyle0;
157
+
158
+ export { PlayerRakebackCard as player_rakeback_card };