@everymatrix/player-account-controller 1.68.0 → 1.69.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 (63) hide show
  1. package/components/{PlayerAccountController-BGIYoCkD.js → PlayerAccountController-Bj-XgQJE.js} +9 -9
  2. package/components/{PlayerAccountController-BckipwcO.js → PlayerAccountController-CvlVSeuD.js} +9 -9
  3. package/components/{PlayerAccountController-DCe0-Np2.cjs → PlayerAccountController-DOYR_ETm.cjs} +1 -1
  4. package/components/{PlayerAccountGamingLimits-BF1Dd_Yw.js → PlayerAccountGamingLimits-B0QALjVi.js} +1 -1
  5. package/components/{PlayerAccountGamingLimits-DZBzKFyv.cjs → PlayerAccountGamingLimits-BIXEO8qU.cjs} +1 -1
  6. package/components/{PlayerAccountGamingLimits-BKHRQo_P.js → PlayerAccountGamingLimits-C11On8aq.js} +1 -1
  7. package/components/PlayerAccountGamingLimitsGroupEdit-C40tSY9Z.js +4792 -0
  8. package/components/PlayerAccountGamingLimitsGroupEdit-CoayAtf0.js +4792 -0
  9. package/components/PlayerAccountGamingLimitsGroupEdit-Crtmu06d.cjs +2 -0
  10. package/components/{PlayerAccountGamingLimitsInfoCard-DWbZBNtU.cjs → PlayerAccountGamingLimitsInfoCard-COS0sgRr.cjs} +1 -1
  11. package/components/{PlayerAccountGamingLimitsInfoCard-BlMfsPqJ.js → PlayerAccountGamingLimitsInfoCard-D5Vpi7Gd.js} +2 -2
  12. package/components/{PlayerAccountGamingLimitsInfoCard-BqsEfU1b.js → PlayerAccountGamingLimitsInfoCard-blI001Nx.js} +2 -2
  13. package/components/PlayerAccountGeneralConfirmationModal-DHEkFez0.cjs +1 -0
  14. package/components/{PlayerAccountGeneralConfirmationModal-lHX_vmhB.js → PlayerAccountGeneralConfirmationModal-DbBEBukz.js} +114 -119
  15. package/components/{PlayerAccountGeneralConfirmationModal-DQ7Oklqf.js → PlayerAccountGeneralConfirmationModal-DzZ3ym_J.js} +114 -119
  16. package/components/{PlayerAccountProductRestriction-BDO7zmmM.js → PlayerAccountProductRestriction-BXXflOCi.js} +268 -283
  17. package/components/{PlayerAccountProductRestriction-D-EBC7dz.js → PlayerAccountProductRestriction-f6Ihr4uI.js} +268 -283
  18. package/components/{PlayerAccountProductRestriction-BK1qKxhK.cjs → PlayerAccountProductRestriction-uj_BwdJ0.cjs} +37 -37
  19. package/components/{PlayerAccountSelfExclusion-DNhGD82-.js → PlayerAccountSelfExclusion-B3xDcZXs.js} +2 -2
  20. package/components/{PlayerAccountSelfExclusion-CBfJvzsw.cjs → PlayerAccountSelfExclusion-NoFOWnwy.cjs} +1 -1
  21. package/components/{PlayerAccountSelfExclusion-B1UJulje.js → PlayerAccountSelfExclusion-tzK5a7dq.js} +2 -2
  22. package/components/{PlayerAccountTimeout-C7TRf46n.js → PlayerAccountTimeout-DFM9IiTT.js} +2 -2
  23. package/components/{PlayerAccountTimeout-Cs6kPeQE.cjs → PlayerAccountTimeout-HZrAxL_1.cjs} +1 -1
  24. package/components/{PlayerAccountTimeout-CajByu4y.js → PlayerAccountTimeout-b0Nl9gfs.js} +2 -2
  25. package/components/{PlayerAccountTransactionsHistory-BaakM7i6.js → PlayerAccountTransactionsHistory-B_kH0Hjt.js} +2 -2
  26. package/components/{PlayerAccountTransactionsHistory-DlxuOGYF.js → PlayerAccountTransactionsHistory-DoyCBIgA.js} +2 -2
  27. package/components/{PlayerAccountTransactionsHistory-CXUQytDG.cjs → PlayerAccountTransactionsHistory-PIw_RR0i.cjs} +1 -1
  28. package/components/{PlayerActiveBonuses-DRc-ZvO7.js → PlayerActiveBonuses-CSDz-kWg.js} +489 -459
  29. package/components/{PlayerActiveBonuses-BbX2ugwN.js → PlayerActiveBonuses-CrOQdlJB.js} +492 -462
  30. package/components/PlayerActiveBonuses-wlP0A00N.cjs +1 -0
  31. package/components/PlayerBonusCard-BBQEU4zs.cjs +1 -0
  32. package/components/{PlayerBonusCard-CXbETnCF.js → PlayerBonusCard-Ca4GQeMu.js} +207 -191
  33. package/components/{PlayerBonusCard-6xOKi384.js → PlayerBonusCard-qHJ-z21x.js} +207 -191
  34. package/components/PlayerBonusHistory-2blkOHr3.js +1051 -0
  35. package/components/PlayerBonusHistory-ChzkBbAH.js +1040 -0
  36. package/components/PlayerBonusHistory-D2uJLN_3.cjs +1 -0
  37. package/components/PlayerGamingHistory-8wco0drZ.js +1016 -0
  38. package/components/{PlayerGamingHistory-BmwyIBJN.js → PlayerGamingHistory-CRFPc2yB.js} +472 -456
  39. package/components/PlayerGamingHistory-D5C8zTFo.cjs +1 -0
  40. package/es2015/player-account-controller.cjs +1 -1
  41. package/es2015/player-account-controller.js +1 -1
  42. package/esnext/player-account-controller.js +1 -1
  43. package/package.json +1 -1
  44. package/stencil/{index-7c5e707a-C9R6jYpt.js → index-7c5e707a-2AC9SnQ7.js} +1 -1
  45. package/stencil/{index-7c5e707a-DvxqcEpc.js → index-7c5e707a-BM4sfR0h.js} +1 -1
  46. package/stencil/{index-7c5e707a-ESX_oqGB.cjs → index-7c5e707a-Cw-c3Bke.cjs} +1 -1
  47. package/stencil/user-transaction-history-7_yFZr3w.js +1645 -0
  48. package/stencil/user-transaction-history-DZZT2rYX.cjs +1 -0
  49. package/stencil/user-transaction-history-Dpd_aKdj.js +1621 -0
  50. package/components/PlayerAccountGamingLimitsGroupEdit-B7O4IGQB.js +0 -2891
  51. package/components/PlayerAccountGamingLimitsGroupEdit-BvnqlbPp.cjs +0 -1
  52. package/components/PlayerAccountGamingLimitsGroupEdit-DlaRG8Hg.js +0 -2891
  53. package/components/PlayerAccountGeneralConfirmationModal-BiNxgQbD.cjs +0 -1
  54. package/components/PlayerActiveBonuses-Bc5S3wl_.cjs +0 -1
  55. package/components/PlayerBonusCard-BNNcjGWn.cjs +0 -1
  56. package/components/PlayerBonusHistory-DrdkliDU.cjs +0 -1
  57. package/components/PlayerBonusHistory-MuL66Q-z.js +0 -985
  58. package/components/PlayerBonusHistory-bApDQYer.js +0 -986
  59. package/components/PlayerGamingHistory-AV5mZQlk.js +0 -975
  60. package/components/PlayerGamingHistory-BDzbgOBi.cjs +0 -1
  61. package/stencil/user-transaction-history-BAK7MHHa.js +0 -374
  62. package/stencil/user-transaction-history-DhQ6RqNc.js +0 -350
  63. package/stencil/user-transaction-history-DiRXpfbN.cjs +0 -1
@@ -1,350 +0,0 @@
1
- import { b, p as f, r as y, g as d, h as e, H as v, a as x } from "./index-7c5e707a-C9R6jYpt.js";
2
- import { d as w } from "./app-globals-0f993ce5-DzSE6TtH.js";
3
- var S = () => {
4
- const t = import.meta.url, a = {};
5
- return t !== "" && (a.resourcesUrl = new URL(".", t).href), f(a);
6
- };
7
- S().then(async (t) => (await w(), b([["user-transaction-history", [[1, "user-transaction-history", { endpoint: [513], session: [513], language: [513], userId: [513, "user-id"], translationUrl: [513, "translation-url"], mobile: [516], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], mbSource: [513, "mb-source"], page: [32], pageSize: [32], showMobileFilter: [32], to: [32], from: [32], type: [32], transactions: [32], showLoader: [32] }, [[9, "resize", "getComponentHeight"]], { page: ["watchMultiple"], type: ["watchMultiple"], session: ["watchMultiple"], userId: ["watchMultiple"], pageSize: ["watchMultiple"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingUrlChange"], showMobileFilter: ["getComponentHeight"] }]]]], t)));
8
- const C = {
9
- en: {
10
- deposit: "Deposit",
11
- withdrawals: "Withdrawals",
12
- show: "Show",
13
- from: "From",
14
- to: "To",
15
- filter: "Filter",
16
- transactionId: "Transaction ID",
17
- date: "Date",
18
- amount: "Amount",
19
- productType: "Product Type",
20
- status: "Status",
21
- noData: "There are no account activities"
22
- },
23
- hr: {
24
- deposit: "Uplate",
25
- withdrawals: "Isplate",
26
- show: "Prikaži",
27
- from: "Od",
28
- to: "Do",
29
- filter: "Filter",
30
- transactionId: "ID transakcije",
31
- date: "Datum",
32
- amount: "Iznos",
33
- productType: "Vrsta proizvoda",
34
- status: "Status",
35
- noData: "Nema aktivnosti na računu"
36
- }
37
- };
38
- class o {
39
- constructor() {
40
- }
41
- static async loadCustomTranslations(a) {
42
- try {
43
- const i = await fetch(a, {
44
- headers: {
45
- "Content-Type": "application/json"
46
- }
47
- });
48
- if (!i.ok) {
49
- const r = await i.text();
50
- throw new Error(r);
51
- }
52
- const n = await i.json();
53
- o.updateTranslations(n);
54
- } catch (i) {
55
- console.error(`Failed to load translations ${a}. ${i.message}`);
56
- }
57
- }
58
- static translate(a, i) {
59
- var n, r;
60
- const s = o.getAvaliableLanguages(i);
61
- return ((r = (n = o.customTranslation) === null || n === void 0 ? void 0 : n[s.customLanguage]) === null || r === void 0 ? void 0 : r[a]) || o.defaultTranslation[s.predefinedLanguage][a];
62
- }
63
- static getAvaliableLanguages(a) {
64
- var i;
65
- const n = !((i = o.customLanguages) === null || i === void 0) && i.includes(a) ? a : o.defaultLanguage;
66
- return { predefinedLanguage: o.supportedLanguages.includes(a) ? a : o.defaultLanguage, customLanguage: n };
67
- }
68
- static updateTranslations(a) {
69
- o.customLanguages = Array.from(/* @__PURE__ */ new Set([...o.supportedLanguages, ...Object.keys(a).map((i) => i.toLowerCase())])), o.customTranslation = a;
70
- }
71
- }
72
- o.defaultLanguage = "en";
73
- o.supportedLanguages = ["en"];
74
- o.defaultTranslation = C;
75
- const k = () => e(
76
- "div",
77
- { class: "loader" },
78
- e("div", null),
79
- e("div", null),
80
- e("div", null),
81
- e("div", null),
82
- e("div", null),
83
- e("div", null),
84
- e("div", null),
85
- e("div", null),
86
- e("div", null),
87
- e("div", null),
88
- e("div", null),
89
- e("div", null)
90
- );
91
- class p {
92
- constructor() {
93
- }
94
- static dateToFormatedString(a) {
95
- const i = a.toLocaleDateString("en-gb"), n = a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 });
96
- return `${i}, ${n}`;
97
- }
98
- }
99
- class u {
100
- constructor() {
101
- }
102
- static format(a, i) {
103
- let n = `${i} ${a}`;
104
- try {
105
- n = new Intl.NumberFormat("en-US", {
106
- style: "currency",
107
- currency: a
108
- }).format(i);
109
- } catch {
110
- }
111
- return n;
112
- }
113
- }
114
- const T = (t) => e(
115
- "div",
116
- { class: "data-transaction" },
117
- e("p", null, t.productType),
118
- e(
119
- "p",
120
- { class: "text-style text-style-status" },
121
- e("span", { class: t.status.toLowerCase() }, t.status)
122
- ),
123
- e(
124
- "p",
125
- { class: "date" },
126
- t.transId,
127
- " | ",
128
- p.dateToFormatedString(new Date(t.created))
129
- ),
130
- e(
131
- "p",
132
- { class: "text-style" },
133
- u.format(t.currency, t.realAmount),
134
- " "
135
- )
136
- ), B = (t) => e(
137
- "div",
138
- { class: "page-size" },
139
- e("span", null, o.translate("show", t.language)),
140
- t.pageSizes.map((a) => e("button", { class: t.currentPageSize === a ? "active" : "", onClick: () => t.changePageSize(a) }, a))
141
- ), L = ({ from: t, to: a, applyFilters: i, language: n }) => {
142
- let r, s;
143
- const g = () => {
144
- t = r.value;
145
- }, m = () => {
146
- a = s.value;
147
- };
148
- return e(
149
- "div",
150
- { class: "period" },
151
- e(
152
- "div",
153
- { class: "period-content" },
154
- e(
155
- "div",
156
- { class: "date-input" },
157
- e("vaadin-date-picker", { value: t, ref: (l) => r = l, label: o.translate("from", n), onChange: g })
158
- ),
159
- e(
160
- "span",
161
- null,
162
- e(
163
- "svg",
164
- { width: "24px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
165
- e("path", { d: "m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z", "fill-rule": "nonzero", fill: "#5d687b" })
166
- )
167
- ),
168
- e(
169
- "div",
170
- { class: "date-input" },
171
- e("vaadin-date-picker", { value: a, ref: (l) => s = l, label: o.translate("to", n), onChange: m })
172
- ),
173
- e("button", { class: "filter-btn", onClick: () => i(t, a) }, o.translate("filter", n))
174
- )
175
- );
176
- }, D = ({ source: t, language: a }) => {
177
- const i = [
178
- { name: o.translate("transactionId", a) },
179
- {
180
- name: o.translate("date", a)
181
- },
182
- {
183
- name: o.translate("amount", a)
184
- },
185
- { name: o.translate("productType", a) },
186
- {
187
- name: o.translate("status", a)
188
- }
189
- ];
190
- return e(
191
- "table",
192
- null,
193
- e(
194
- "thead",
195
- null,
196
- e("tr", null, i.map((n) => e("th", null, n.name)))
197
- ),
198
- e("tbody", null, t.map((n) => e(
199
- "tr",
200
- null,
201
- e("td", null, n.transId),
202
- e("td", null, p.dateToFormatedString(new Date(n.created))),
203
- e(
204
- "td",
205
- null,
206
- u.format(n.currency, n.realAmount),
207
- " "
208
- ),
209
- e("td", null, n.productType),
210
- e(
211
- "td",
212
- null,
213
- e("span", { class: n.status.toLowerCase() }, n.status)
214
- )
215
- )))
216
- );
217
- };
218
- function c(t, a) {
219
- if (t) {
220
- const i = document.createElement("style");
221
- i.innerHTML = a, t.appendChild(i);
222
- }
223
- }
224
- function h(t, a) {
225
- const i = new URL(a);
226
- fetch(i.href).then((n) => n.text()).then((n) => {
227
- const r = document.createElement("style");
228
- r.innerHTML = n, t && t.appendChild(r);
229
- }).catch((n) => {
230
- console.error("There was an error while trying to load client styling from URL", n);
231
- });
232
- }
233
- function F(t, a, i) {
234
- if (window.emMessageBus) {
235
- const n = document.createElement("style");
236
- window.emMessageBus.subscribe(a, (r) => {
237
- n.innerHTML = r, t && t.appendChild(n);
238
- });
239
- }
240
- }
241
- const M = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}', U = M, z = class {
242
- constructor(t) {
243
- y(this, t), this.pageSizes = [10, 25, 50], this.pagination = null, this.endpoint = void 0, this.session = void 0, this.language = o.defaultLanguage, this.userId = void 0, this.translationUrl = void 0, this.mobile = !1, this.clientStyling = null, this.clientStylingUrl = null, this.mbSource = void 0, this.page = 0, this.pageSize = this.pageSizes[0], this.showMobileFilter = !1, this.to = void 0, this.from = void 0, this.type = "0", this.transactions = void 0, this.showLoader = !0;
244
- }
245
- watchMultiple() {
246
- this.loadTransactions();
247
- }
248
- handleClientStylingChange(t, a) {
249
- t != a && c(this.stylingContainer, this.clientStyling);
250
- }
251
- handleClientStylingUrlChange(t, a) {
252
- t != a && this.clientStylingUrl && h(this.stylingContainer, this.clientStylingUrl);
253
- }
254
- async componentWillLoad() {
255
- this.translationUrl && await o.loadCustomTranslations(this.translationUrl), this.loadTransactions();
256
- }
257
- componentDidLoad() {
258
- this.stylingContainer && (window.emMessageBus != null ? F(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && c(this.stylingContainer, this.clientStyling), this.clientStylingUrl && h(this.stylingContainer, this.clientStylingUrl)));
259
- }
260
- componentDidRender() {
261
- this.getComponentHeight();
262
- }
263
- getComponentHeight() {
264
- var t;
265
- if (this.mobile) {
266
- let a = this.el.getBoundingClientRect().height - ((t = this.el.shadowRoot.querySelector(".table")) === null || t === void 0 ? void 0 : t.getBoundingClientRect().y);
267
- this.el.style.setProperty("--heightScrollableContainer", a + "px");
268
- }
269
- }
270
- setHeightTableProperty() {
271
- let t = this.getComponentHeight();
272
- this.el.style.setProperty("--heightScrollableContainer", t + "px");
273
- }
274
- changeTransactionsType(t) {
275
- this.type = t;
276
- }
277
- changePageSize(t) {
278
- this.pageSize = t;
279
- }
280
- prev() {
281
- var t;
282
- !((t = this.pagination) === null || t === void 0) && t.previous && this.page--;
283
- }
284
- next() {
285
- var t;
286
- !((t = this.pagination) === null || t === void 0) && t.next && this.page++;
287
- }
288
- applyFilters(t, a) {
289
- this.from = t ? new Date(t).toISOString() : null, this.to = a ? new Date(a).toISOString() : null, this.loadTransactions();
290
- }
291
- showFilter() {
292
- this.showMobileFilter = !this.showMobileFilter;
293
- }
294
- disconnectedCallback() {
295
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
296
- }
297
- render() {
298
- var t;
299
- const a = d("../assets/filter.svg"), i = d("../assets/warning.svg");
300
- return e(v, { key: "8d6470d73afff5dbc8a8c3a1a47426223971ad47" }, this.showLoader ? e(k, null) : "", e("div", { key: "8c32d9425b701747559ea1e63a3b2c4bb31780ab", class: "wrapper", ref: (n) => this.stylingContainer = n }, e("div", { key: "b2a9216bfcfa5950c174f6e06a179e2ae3790f6b", class: { "types types-mobile": this.mobile, "types types-desktop": !this.mobile } }, e("button", { key: "e2ce33fe2ab27abab68bd721b8b945bde5d672ac", class: "transaction-type " + (this.type === "0" ? "clicked" : ""), onClick: () => this.changeTransactionsType("0") }, o.translate("deposit", this.language)), e("button", { key: "6d80bef56bf4ec590cc2e4aa704f930a47b29f3c", class: "transaction-type " + (this.type === "1" ? "clicked" : ""), onClick: () => this.changeTransactionsType("1") }, o.translate("withdrawals", this.language))), this.mobile ? "" : e(B, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: (n) => this.changePageSize(n) }), this.mobile ? e("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, e("img", { src: a, alt: "Filter" }), o.translate("filter", this.language)) : "", !this.mobile || this.showMobileFilter && this.mobile ? e(L, { language: this.language, applyFilters: (n, r) => this.applyFilters(n, r) }) : "", ((t = this.transactions) === null || t === void 0 ? void 0 : t.length) > 0 ? e("div", { class: "table" }, this.mobile ? e("div", { class: "mobile-table" }, this.transactions.map((n) => e(T, Object.assign({}, n)))) : e(D, { source: this.transactions, language: this.language })) : e("div", { class: "noData" }, e("img", { src: i, alt: "Warning" }), e("span", null, o.translate("noData", this.language))), e("div", { key: "14b4d34c0e1d258ea0547b4aa43766199a629526", class: "pagination" }, e("button", { key: "fdd2a70e6dacf863c0783ab8dce80951294f04cc", onClick: () => this.prev() }, "<"), e("button", { key: "3bdc96262e16573e24ba07362e80ea779d30da9f", onClick: () => this.next() }, ">"))));
301
- }
302
- async loadTransactions() {
303
- this.showLoader = !0;
304
- try {
305
- const t = `${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`, a = await fetch(t, {
306
- headers: {
307
- "X-Sessionid": this.session,
308
- "Content-Type": "application/json"
309
- }
310
- });
311
- if (!a.ok) {
312
- const n = await a.text();
313
- throw new Error(n);
314
- }
315
- const i = await a.json();
316
- this.pagination = i.pagination, this.transactions = i.transactions;
317
- } catch (t) {
318
- console.error(t);
319
- } finally {
320
- this.showLoader = !1;
321
- }
322
- }
323
- getParams() {
324
- var t, a;
325
- const i = /* @__PURE__ */ new Date(), n = (this.page * this.pageSize).toString(), r = (t = this.from) !== null && t !== void 0 ? t : new Date(i.getFullYear(), i.getMonth(), 1).toISOString(), s = (a = this.to) !== null && a !== void 0 ? a : new Date(i.getFullYear(), i.getMonth() + 1, 0).toISOString();
326
- return `offset=${n}&endDate=${s}&startDate=${r}&type=${this.type}&limit=${this.pageSize}`;
327
- }
328
- static get assetsDirs() {
329
- return ["../assets"];
330
- }
331
- get el() {
332
- return x(this);
333
- }
334
- static get watchers() {
335
- return {
336
- page: ["watchMultiple"],
337
- type: ["watchMultiple"],
338
- session: ["watchMultiple"],
339
- userId: ["watchMultiple"],
340
- pageSize: ["watchMultiple"],
341
- clientStyling: ["handleClientStylingChange"],
342
- clientStylingUrl: ["handleClientStylingUrlChange"],
343
- showMobileFilter: ["getComponentHeight"]
344
- };
345
- }
346
- };
347
- z.style = U;
348
- export {
349
- z as user_transaction_history
350
- };
@@ -1 +0,0 @@
1
- "use strict";var c=(t,a,i)=>new Promise((n,r)=>{var l=s=>{try{d(i.next(s))}catch(p){r(p)}},h=s=>{try{d(i.throw(s))}catch(p){r(p)}},d=s=>s.done?n(s.value):Promise.resolve(s.value).then(l,h);d((i=i.apply(t,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7c5e707a-ESX_oqGB.cjs"),v=require("./app-globals-0f993ce5-DgYhdguE.cjs");var u=typeof document!="undefined"?document.currentScript:null,x=()=>{const t=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:u&&u.tagName.toUpperCase()==="SCRIPT"&&u.src||new URL("stencil/user-transaction-history-DiRXpfbN.cjs",document.baseURI).href,a={};return t!==""&&(a.resourcesUrl=new URL(".",t).href),e.promiseResolve(a)};x().then(t=>c(exports,null,function*(){return yield v.globalScripts$4(),e.bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}]]]],t)}));const w={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};class o{constructor(){}static loadCustomTranslations(a){return c(this,null,function*(){try{const i=yield fetch(a,{headers:{"Content-Type":"application/json"}});if(!i.ok){const r=yield i.text();throw new Error(r)}const n=yield i.json();o.updateTranslations(n)}catch(i){console.error(`Failed to load translations ${a}. ${i.message}`)}})}static translate(a,i){var n,r;const l=o.getAvaliableLanguages(i);return((r=(n=o.customTranslation)===null||n===void 0?void 0:n[l.customLanguage])===null||r===void 0?void 0:r[a])||o.defaultTranslation[l.predefinedLanguage][a]}static getAvaliableLanguages(a){var i;const n=!((i=o.customLanguages)===null||i===void 0)&&i.includes(a)?a:o.defaultLanguage;return{predefinedLanguage:o.supportedLanguages.includes(a)?a:o.defaultLanguage,customLanguage:n}}static updateTranslations(a){o.customLanguages=Array.from(new Set([...o.supportedLanguages,...Object.keys(a).map(i=>i.toLowerCase())])),o.customTranslation=a}}o.defaultLanguage="en";o.supportedLanguages=["en"];o.defaultTranslation=w;const S=()=>e.h("div",{class:"loader"},e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null),e.h("div",null));class b{constructor(){}static dateToFormatedString(a){const i=a.toLocaleDateString("en-gb"),n=a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return`${i}, ${n}`}}class f{constructor(){}static format(a,i){let n=`${i} ${a}`;try{n=new Intl.NumberFormat("en-US",{style:"currency",currency:a}).format(i)}catch(r){}return n}}const C=t=>e.h("div",{class:"data-transaction"},e.h("p",null,t.productType),e.h("p",{class:"text-style text-style-status"},e.h("span",{class:t.status.toLowerCase()},t.status)),e.h("p",{class:"date"},t.transId," | ",b.dateToFormatedString(new Date(t.created))),e.h("p",{class:"text-style"},f.format(t.currency,t.realAmount)," ")),k=t=>e.h("div",{class:"page-size"},e.h("span",null,o.translate("show",t.language)),t.pageSizes.map(a=>e.h("button",{class:t.currentPageSize===a?"active":"",onClick:()=>t.changePageSize(a)},a))),T=({from:t,to:a,applyFilters:i,language:n})=>{let r,l;const h=()=>{t=r.value},d=()=>{a=l.value};return e.h("div",{class:"period"},e.h("div",{class:"period-content"},e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:t,ref:s=>r=s,label:o.translate("from",n),onChange:h})),e.h("span",null,e.h("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),e.h("div",{class:"date-input"},e.h("vaadin-date-picker",{value:a,ref:s=>l=s,label:o.translate("to",n),onChange:d})),e.h("button",{class:"filter-btn",onClick:()=>i(t,a)},o.translate("filter",n))))},B=({source:t,language:a})=>{const i=[{name:o.translate("transactionId",a)},{name:o.translate("date",a)},{name:o.translate("amount",a)},{name:o.translate("productType",a)},{name:o.translate("status",a)}];return e.h("table",null,e.h("thead",null,e.h("tr",null,i.map(n=>e.h("th",null,n.name)))),e.h("tbody",null,t.map(n=>e.h("tr",null,e.h("td",null,n.transId),e.h("td",null,b.dateToFormatedString(new Date(n.created))),e.h("td",null,f.format(n.currency,n.realAmount)," "),e.h("td",null,n.productType),e.h("td",null,e.h("span",{class:n.status.toLowerCase()},n.status))))))};function g(t,a){if(t){const i=document.createElement("style");i.innerHTML=a,t.appendChild(i)}}function m(t,a){const i=new URL(a);fetch(i.href).then(n=>n.text()).then(n=>{const r=document.createElement("style");r.innerHTML=n,t&&t.appendChild(r)}).catch(n=>{console.error("There was an error while trying to load client styling from URL",n)})}function L(t,a,i){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(a,r=>{n.innerHTML=r,t&&t.appendChild(n)})}}const F=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}',D=F,y=class{constructor(t){e.registerInstance(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.endpoint=void 0,this.session=void 0,this.language=o.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.mbSource=void 0,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.to=void 0,this.from=void 0,this.type="0",this.transactions=void 0,this.showLoader=!0}watchMultiple(){this.loadTransactions()}handleClientStylingChange(t,a){t!=a&&g(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,a){t!=a&&this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return c(this,null,function*(){this.translationUrl&&(yield o.loadCustomTranslations(this.translationUrl)),this.loadTransactions()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?L(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&g(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl)))}componentDidRender(){this.getComponentHeight()}getComponentHeight(){var t;if(this.mobile){let a=this.el.getBoundingClientRect().height-((t=this.el.shadowRoot.querySelector(".table"))===null||t===void 0?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",a+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;!((t=this.pagination)===null||t===void 0)&&t.previous&&this.page--}next(){var t;!((t=this.pagination)===null||t===void 0)&&t.next&&this.page++}applyFilters(t,a){this.from=t?new Date(t).toISOString():null,this.to=a?new Date(a).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){var t;const a=e.getAssetPath("../assets/filter.svg"),i=e.getAssetPath("../assets/warning.svg");return e.h(e.Host,{key:"8d6470d73afff5dbc8a8c3a1a47426223971ad47"},this.showLoader?e.h(S,null):"",e.h("div",{key:"8c32d9425b701747559ea1e63a3b2c4bb31780ab",class:"wrapper",ref:n=>this.stylingContainer=n},e.h("div",{key:"b2a9216bfcfa5950c174f6e06a179e2ae3790f6b",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},e.h("button",{key:"e2ce33fe2ab27abab68bd721b8b945bde5d672ac",class:"transaction-type "+(this.type==="0"?"clicked":""),onClick:()=>this.changeTransactionsType("0")},o.translate("deposit",this.language)),e.h("button",{key:"6d80bef56bf4ec590cc2e4aa704f930a47b29f3c",class:"transaction-type "+(this.type==="1"?"clicked":""),onClick:()=>this.changeTransactionsType("1")},o.translate("withdrawals",this.language))),this.mobile?"":e.h(k,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:n=>this.changePageSize(n)}),this.mobile?e.h("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},e.h("img",{src:a,alt:"Filter"}),o.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?e.h(T,{language:this.language,applyFilters:(n,r)=>this.applyFilters(n,r)}):"",((t=this.transactions)===null||t===void 0?void 0:t.length)>0?e.h("div",{class:"table"},this.mobile?e.h("div",{class:"mobile-table"},this.transactions.map(n=>e.h(C,Object.assign({},n)))):e.h(B,{source:this.transactions,language:this.language})):e.h("div",{class:"noData"},e.h("img",{src:i,alt:"Warning"}),e.h("span",null,o.translate("noData",this.language))),e.h("div",{key:"14b4d34c0e1d258ea0547b4aa43766199a629526",class:"pagination"},e.h("button",{key:"fdd2a70e6dacf863c0783ab8dce80951294f04cc",onClick:()=>this.prev()},"<"),e.h("button",{key:"3bdc96262e16573e24ba07362e80ea779d30da9f",onClick:()=>this.next()},">"))))}loadTransactions(){return c(this,null,function*(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,a=yield fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!a.ok){const n=yield a.text();throw new Error(n)}const i=yield a.json();this.pagination=i.pagination,this.transactions=i.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}})}getParams(){var t,a;const i=new Date,n=(this.page*this.pageSize).toString(),r=(t=this.from)!==null&&t!==void 0?t:new Date(i.getFullYear(),i.getMonth(),1).toISOString(),l=(a=this.to)!==null&&a!==void 0?a:new Date(i.getFullYear(),i.getMonth()+1,0).toISOString();return`offset=${n}&endDate=${l}&startDate=${r}&type=${this.type}&limit=${this.pageSize}`}static get assetsDirs(){return["../assets"]}get el(){return e.getElement(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}}};y.style=D;exports.user_transaction_history=y;