@everymatrix/casino-header-controller 1.50.0 → 1.50.1

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 (21) hide show
  1. package/components/{CasinoHamburgerMenu-CmcbY3lm.js → CasinoHamburgerMenu-BCpMAPAe.js} +315 -309
  2. package/components/CasinoHamburgerMenu-vpzEIIT_.cjs +8 -0
  3. package/components/{CasinoHeaderController-0pAb2v-X.cjs → CasinoHeaderController-Bqi-X-8L.cjs} +1 -1
  4. package/components/{CasinoHeaderController-BBDCq4qg.js → CasinoHeaderController-CsLzZTan.js} +6 -6
  5. package/components/{CasinoSlider-CYAQLH4u.cjs → CasinoSlider-CnDv74QC.cjs} +1 -1
  6. package/components/{CasinoSlider-C1KJ8ahx.js → CasinoSlider-DJSVy9ND.js} +1 -1
  7. package/components/{PlayerAccountBalanceModal-BJjukMsQ.js → PlayerAccountBalanceModal-Ck5Xpx4C.js} +1 -1
  8. package/components/{PlayerAccountBalanceModal-C9Hfbr7e.cjs → PlayerAccountBalanceModal-YLBXGRdn.cjs} +1 -1
  9. package/components/{PlayerDeposit-ltqY6iH2.cjs → PlayerDeposit-DJ0jHpbl.cjs} +1 -1
  10. package/components/{PlayerDeposit-CZL4yy_-.js → PlayerDeposit-DWYXaqBZ.js} +1 -1
  11. package/es2015/casino-header-controller.cjs +1 -1
  12. package/es2015/casino-header-controller.js +1 -1
  13. package/package.json +1 -1
  14. package/stencil/index-657e7a14-6spLHDf6.cjs +1 -0
  15. package/stencil/{index-04d3e726-7SC-B1hF.js → index-657e7a14-DDXA_k23.js} +248 -240
  16. package/stencil/user-deposit-withdrawal-CXzHd7L7.cjs +59 -0
  17. package/stencil/user-deposit-withdrawal-DGyUXAvB.js +597 -0
  18. package/components/CasinoHamburgerMenu-e8fY_qcG.cjs +0 -8
  19. package/stencil/index-04d3e726-Bulen1Dl.cjs +0 -1
  20. package/stencil/user-deposit-withdrawal-CDH6LRSU.cjs +0 -59
  21. package/stencil/user-deposit-withdrawal-D7hnzB7y.js +0 -242
@@ -1,242 +0,0 @@
1
- var c = (e, i, t) => new Promise((r, n) => {
2
- var h = (a) => {
3
- try {
4
- s(t.next(a));
5
- } catch (p) {
6
- n(p);
7
- }
8
- }, d = (a) => {
9
- try {
10
- s(t.throw(a));
11
- } catch (p) {
12
- n(p);
13
- }
14
- }, s = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(h, d);
15
- s((t = t.apply(e, i)).next());
16
- });
17
- import { b as u, p as w, r as y, h as o, H as g } from "./index-04d3e726-7SC-B1hF.js";
18
- import { g as f } from "./app-globals-0f993ce5-D-kw1sls.js";
19
- var m = () => {
20
- const e = import.meta.url, i = {};
21
- return e !== "" && (i.resourcesUrl = new URL(".", e).href), w(i);
22
- };
23
- m().then((e) => c(void 0, null, function* () {
24
- return yield f(), u([["user-deposit-withdrawal", [[1, "user-deposit-withdrawal", { clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], endpoint: [513], type: [513], channel: [513], language: [513], productType: [513, "product-type"], userId: [513, "user-id"], session: [513], successUrl: [513, "success-url"], cancelUrl: [513, "cancel-url"], failUrl: [513, "fail-url"], sportsUrl: [513, "sports-url"], casinoUrl: [513, "casino-url"], contactUrl: [513, "contact-url"], depositUrl: [513, "deposit-url"], currency: [513], showBonusSelectionInput: [513, "show-bonus-selection-input"], isShortCashier: [516, "is-short-cashier"], homeUrl: [513, "home-url"], beforeRedirect: [16], limitStylingAppends: [32], dynamicHeight: [32], cashierInfoUrl: [32] }, null, { session: ["watchLoadWidget"], userId: ["watchLoadWidget"], isShortCashier: ["watchLoadWidget"], currency: ["watchLoadWidget"], showBonusSelectionInput: ["watchLoadWidget"] }]]]], e);
25
- }));
26
- const C = "en", v = ["ro", "en", "fr", "hr"], b = {
27
- en: {
28
- Deposit: "Deposit",
29
- Withdraw: "Withdraw",
30
- denyDeposit: "Please be informed that currently you are not allowed to initiate depost transactions.",
31
- denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
32
- notFoundErrorCode: "Not found error code",
33
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
34
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
35
- },
36
- ro: {
37
- Deposit: "Depozit",
38
- Withdraw: "Retragere",
39
- denyDeposit: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",
40
- denyWithdrawal: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",
41
- notFoundErrorCode: "Not found error code",
42
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
43
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
44
- },
45
- fr: {
46
- Deposit: "Deposit",
47
- Withdraw: "Withdraw",
48
- denyDeposit: "Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",
49
- denyWithdrawal: "Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",
50
- notFoundErrorCode: "Not found error code",
51
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
52
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
53
- },
54
- hr: {
55
- Deposit: "Uplata",
56
- Withdraw: "Isplata",
57
- denyDeposit: "Obavještavamo Vas da trenutno nemate mogućnost uplata.",
58
- denyWithdrawal: "Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",
59
- notFoundErrorCode: "Not found error code",
60
- errorCode21122: "Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",
61
- errorCode21123: "Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"
62
- }
63
- }, l = (e, i) => {
64
- const t = i;
65
- return b[t !== void 0 && v.includes(t) ? t : C][e];
66
- }, S = (e) => !!(e.toLowerCase().match(/android/i) || e.toLowerCase().match(/blackberry|bb/i) || e.toLowerCase().match(/iphone|ipad|ipod/i) || e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)), U = `:host {
67
- font: inherit;
68
- display: block;
69
- height: 100%;
70
- overflow: hidden;
71
- }
72
-
73
- .CategoryTitle {
74
- font-size: var(--emw--font-size-x-large, 26px);
75
- color: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
76
- }
77
-
78
- .MenuReturnButton {
79
- font: inherit;
80
- color: var(--emw--color-gray-300, #58586B);
81
- display: inline-flex;
82
- align-items: center;
83
- column-gap: 10px;
84
- margin-bottom: 10px;
85
- }
86
- .MenuReturnButton svg {
87
- fill: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
88
- }
89
- .MenuReturnButton h2.CategoryTitleMobile {
90
- font-size: 16px;
91
- color: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
92
- }
93
-
94
- .ErrorMessage {
95
- color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));
96
- }
97
-
98
- .DepositWithdrawalWrapper {
99
- width: 100%;
100
- padding: 0;
101
- margin: 0;
102
- height: 100vh;
103
- }
104
-
105
- @container (max-width: 475px) {
106
- .DepositWithdrawalWrapper {
107
- height: 100vh;
108
- }
109
- }
110
- .ShortCashier.DepositWithdrawalWrapper {
111
- height: 500px;
112
- }
113
- .ShortCashier.CategoryTitle.CategoryTitle {
114
- margin-right: 20px;
115
- padding-top: 20px;
116
- color: ar(--emw--color-black, #000000);
117
- }
118
- .ShortCashier .ErrorMessage {
119
- margin: auto;
120
- width: 90%;
121
- margin-top: 70px;
122
- text-align: center;
123
- color: var(--emw--color-black, #000000);
124
- }`, W = U, D = () => {
125
- }, M = class {
126
- constructor(e) {
127
- y(this, e), this.bindedHandler = this.handleMessage.bind(this), this.userAgent = window.navigator.userAgent, this.isMobile = S(this.userAgent), this.errorCodes = ["21123", "21122"], this.setClientStyling = () => {
128
- let i = document.createElement("style");
129
- i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
130
- }, this.setClientStylingURL = () => {
131
- let i = new URL(this.clientStylingUrl), t = document.createElement("style");
132
- fetch(i.href).then((r) => r.text()).then((r) => {
133
- t.innerHTML = r, setTimeout(() => {
134
- this.stylingContainer.prepend(t);
135
- }, 1);
136
- }).catch((r) => {
137
- console.log("error ", r);
138
- });
139
- }, this.clientStyling = "", this.clientStylingUrl = "", this.endpoint = void 0, this.type = void 0, this.channel = void 0, this.language = void 0, this.productType = void 0, this.userId = void 0, this.session = void 0, this.successUrl = void 0, this.cancelUrl = void 0, this.failUrl = void 0, this.sportsUrl = void 0, this.casinoUrl = void 0, this.contactUrl = void 0, this.depositUrl = void 0, this.currency = "", this.showBonusSelectionInput = "true", this.isShortCashier = !1, this.homeUrl = void 0, this.beforeRedirect = D, this.limitStylingAppends = !1, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
140
- }
141
- get typeParameter() {
142
- if (this.type === "deposit")
143
- return "Deposit";
144
- if (this.type === "withdraw")
145
- return "Withdraw";
146
- }
147
- watchLoadWidget() {
148
- this.loadWidget();
149
- }
150
- componentWillLoad() {
151
- return c(this, null, function* () {
152
- yield this.loadWidget();
153
- });
154
- }
155
- toggleScreen(e) {
156
- window.postMessage({ type: "PlayerAccountMenuActive", isMobile: e }, window.location.href);
157
- }
158
- componentDidLoad() {
159
- window.addEventListener("message", this.bindedHandler, !1);
160
- }
161
- disconnectedCallback() {
162
- window.removeEventListener("message", this.bindedHandler, !1);
163
- }
164
- componentDidRender() {
165
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.limitStylingAppends = !0);
166
- }
167
- render() {
168
- return o(g, { key: "ccdd9243da65080f4ac854a4bc6ed4006f0c9f5e" }, o("div", { key: "e39b500a56740d0f7e23f92e2f73ea386a3bbb5c", ref: (e) => this.stylingContainer = e }, !(this.isMobile && !this.isShortCashier) && o("h2", { key: "3e2e8bf8a07a4249674f4dae7df7a76da6435fa3", class: "CategoryTitle" }, l(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), o("div", { key: "886bedf58fac20d2f620d4600b6588089d0e502c", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? "30px" : "0" } }, o("div", { key: "fa038bb3d599cbd894ba6a14ead4c03bbfa425fd" }, this.isMobile && !this.isShortCashier ? o("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, o("defs", null), o("g", { transform: "translate(-20 -158)" }, o("g", { transform: "translate(20 158)" }, o("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), o("h2", { class: "CategoryTitleMobile" }, l(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? o("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : o("h3", { class: "ErrorMessage" }, this.type === "deposit" ? l("denyDeposit", this.language) : l("denyWithdrawal", this.language)))));
169
- }
170
- loadWidget() {
171
- return c(this, null, function* () {
172
- const e = {
173
- Channel: this.channel,
174
- Type: this.typeParameter,
175
- SuccessUrl: this.successUrl,
176
- CancelUrl: this.cancelUrl,
177
- FailUrl: this.failUrl,
178
- Language: this.language,
179
- productType: this.productType,
180
- isShortCashier: this.isShortCashier,
181
- currency: this.currency,
182
- showBonusSelectionInput: this.showBonusSelectionInput
183
- };
184
- try {
185
- const i = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, t = yield fetch(i, {
186
- method: "POST",
187
- headers: {
188
- "X-Sessionid": this.session,
189
- "Content-Type": "application/json"
190
- },
191
- body: JSON.stringify(e)
192
- });
193
- if (!t.ok) {
194
- const n = yield t.text();
195
- throw new Error(n);
196
- }
197
- const r = yield t.json();
198
- if (r.CashierInfo)
199
- this.cashierInfoUrl = r.CashierInfo.Url;
200
- else {
201
- let n;
202
- if (r.ResponseMessage) {
203
- let d = this.errorCodes.find((s) => r.ResponseMessage.includes(s)) || null;
204
- d ? n = l(`errorCode${d}`, this.language) : n = l("notFoundErrorCode", this.language);
205
- } else
206
- n = this.type === "deposit" ? l("denyDeposit", this.language) : l("denyWithdrawal", this.language);
207
- const h = { type: "error", message: n };
208
- window.postMessage({ type: "DenyDepositOrWithdrawal", data: h }, window.location.href);
209
- }
210
- } catch (i) {
211
- console.error(i);
212
- }
213
- });
214
- }
215
- handleMessage(e) {
216
- var i, t, r, n, h, d, s, a;
217
- e.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), e.data["MMFE:setQuickDepositHeight"] && this.isShortCashier && (this.dynamicHeight = e.data["MMFE:setQuickDepositHeight"].toString() + "px"), e.data["MMFE:setIFrameHeight"] && this.isShortCashier && (this.dynamicHeight = e.data["MMFE:setIFrameHeight"].toString() + "px"), ((i = e.data) === null || i === void 0 ? void 0 : i.type) === "mm-hcback-to-merchant" && this.doRedirect(e.data.type, this.homeUrl), ((t = e.data) === null || t === void 0 ? void 0 : t.redirect) === "mm-hc-back-tomerchant" && this.doRedirect(e.data.redirect, this.homeUrl), ((r = e.data) === null || r === void 0 ? void 0 : r.redirect) === "mm-hc-sports" && this.doRedirect((n = e.data) === null || n === void 0 ? void 0 : n.redirect, this.sportsUrl), ((h = e.data) === null || h === void 0 ? void 0 : h.redirect) === "mm-hc-casino" && this.doRedirect(window.location.href, this.casinoUrl), ((d = e.data) === null || d === void 0 ? void 0 : d.redirect) === "mm-hc-contact" && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.contactUrl)), (((s = e.data) === null || s === void 0 ? void 0 : s.redirect) === "mm-wm-hc-init-deposit" || ((a = e.data) === null || a === void 0 ? void 0 : a.redirect) === "mm-wm-hc-init-deposit-quick") && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.depositUrl));
218
- }
219
- doRedirect(e, i) {
220
- const t = { reason: e, url: i, cancel: !1 };
221
- if (this.beforeRedirect(t), !t.cancel) {
222
- if (!t.url) {
223
- window.location.href = "/";
224
- return;
225
- }
226
- window.location.href = t.url;
227
- }
228
- }
229
- static get watchers() {
230
- return {
231
- session: ["watchLoadWidget"],
232
- userId: ["watchLoadWidget"],
233
- isShortCashier: ["watchLoadWidget"],
234
- currency: ["watchLoadWidget"],
235
- showBonusSelectionInput: ["watchLoadWidget"]
236
- };
237
- }
238
- };
239
- M.style = W;
240
- export {
241
- M as user_deposit_withdrawal
242
- };