@everymatrix/player-lugas-limit 1.10.13 → 1.13.4
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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-lugas-limit.cjs.entry.js +41 -26
- package/dist/cjs/player-lugas-limit.cjs.js +1 -1
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.css +20 -10
- package/dist/collection/components/player-lugas-limit/player-lugas-limit.js +48 -31
- package/dist/components/player-lugas-limit.js +44 -27
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-lugas-limit.entry.js +41 -26
- package/dist/esm/player-lugas-limit.js +1 -1
- package/dist/player-lugas-limit/{p-ed160dc8.entry.js → p-dae2a02f.entry.js} +1 -1
- package/dist/player-lugas-limit/player-lugas-limit.esm.js +1 -1
- package/dist/types/components/player-lugas-limit/player-lugas-limit.d.ts +5 -4
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"stylingAppends":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"regularDepositLimitAmount":[32],"stylingAppends":[32],"isWithinRange":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -165,7 +165,7 @@ const translate = (key, customLang, values) => {
|
|
|
165
165
|
return translation;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .
|
|
168
|
+
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {\n background-color: #404350;\n color: white;\n margin: 5px 0px;\n padding: 10px 15px;\n border-radius: 2px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {\n position: absolute;\n width: 5px;\n height: 28px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {\n padding-left: 15px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {\n background-color: #ffffff;\n font-weight: bold;\n color: #002554;\n font-size: 10px;\n border: 2.5px solid #dee2e6;\n width: 100%;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {\n background-color: #6BB816;\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: 10px;\n color: #ffffff;\n width: 100%;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n.ModalContainer .ModalFooter {\n display: flex;\n justify-content: center;\n background-color: rgba(161, 156, 156, 0.11);\n margin: 5px 0px;\n}\n.ModalContainer .ModalFooter .Dropdown {\n background-color: white;\n padding: 8px;\n width: 100%;\n border: 1px solid #dee2e6;\n}\n.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {\n font-size: 10px;\n color: #FF0000;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput input {\n flex: 4;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button {\n padding: 2px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out 0s;\n flex: 1;\n font-size: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {\n background-color: #6BB816;\n color: #ffffff;\n font-weight: bold;\n border: none;\n border: 2.5px solid rgba(255, 255, 255, 0);\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {\n background-color: #ffffff;\n color: #002554;\n font-weight: bold;\n cursor: not-allowed;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {\n margin-left: 0px;\n display: flex;\n padding: 10px 0px;\n justify-content: center;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {\n border: 1px solid #FF0000;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}";
|
|
169
169
|
|
|
170
170
|
const PlayerLugasLimit = class {
|
|
171
171
|
constructor(hostRef) {
|
|
@@ -205,7 +205,7 @@ const PlayerLugasLimit = class {
|
|
|
205
205
|
*/
|
|
206
206
|
this.clientStyling = '';
|
|
207
207
|
/**
|
|
208
|
-
* Client custom styling via url
|
|
208
|
+
* Client custom styling via url
|
|
209
209
|
*/
|
|
210
210
|
this.clientStylingUrl = '';
|
|
211
211
|
/**
|
|
@@ -219,9 +219,9 @@ const PlayerLugasLimit = class {
|
|
|
219
219
|
this.inputValue = '';
|
|
220
220
|
this.isButtonDisabled = true;
|
|
221
221
|
this.crossProviders = false;
|
|
222
|
-
this.invalidInput = false;
|
|
223
222
|
this.userAmount = '';
|
|
224
223
|
this.operatorDepositLimitAmount = '';
|
|
224
|
+
this.regularDepositLimitAmount = '';
|
|
225
225
|
this.stylingAppends = false;
|
|
226
226
|
this.setClientStyling = () => {
|
|
227
227
|
let sheet = document.createElement('style');
|
|
@@ -241,8 +241,15 @@ const PlayerLugasLimit = class {
|
|
|
241
241
|
console.log('error ', err);
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
|
-
this.postPlayerSituation = (userAmount) => {
|
|
245
|
-
let url = new URL(`${this.endpoint}
|
|
244
|
+
this.postPlayerSituation = (userAmount, keepLimit = false, initialNewLimit = false) => {
|
|
245
|
+
let url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
246
|
+
let roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
247
|
+
let bodyDraft = {
|
|
248
|
+
softMigration: this.flow == '1',
|
|
249
|
+
keepLimit: keepLimit,
|
|
250
|
+
roleLimitAmount: roleLimitAmount
|
|
251
|
+
};
|
|
252
|
+
userAmount && (bodyDraft['amount'] = `${userAmount}`);
|
|
246
253
|
let options = {
|
|
247
254
|
method: 'POST',
|
|
248
255
|
headers: {
|
|
@@ -250,7 +257,7 @@ const PlayerLugasLimit = class {
|
|
|
250
257
|
'Content-Type': 'application/json',
|
|
251
258
|
'Authorization': `Bearer ${this.session}`
|
|
252
259
|
},
|
|
253
|
-
body:
|
|
260
|
+
body: JSON.stringify(bodyDraft)
|
|
254
261
|
};
|
|
255
262
|
fetch(url.href, options)
|
|
256
263
|
.then((res) => {
|
|
@@ -270,6 +277,9 @@ const PlayerLugasLimit = class {
|
|
|
270
277
|
if (data.operatorDepositLimitAmount) {
|
|
271
278
|
this.operatorDepositLimitAmount = data.operatorDepositLimitAmount;
|
|
272
279
|
}
|
|
280
|
+
if (data.regulatorDepositLimitAmount) {
|
|
281
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount;
|
|
282
|
+
}
|
|
273
283
|
})
|
|
274
284
|
.catch((err) => {
|
|
275
285
|
// Handle any errors
|
|
@@ -278,6 +288,13 @@ const PlayerLugasLimit = class {
|
|
|
278
288
|
};
|
|
279
289
|
this.handleClick = (input) => {
|
|
280
290
|
switch (input) {
|
|
291
|
+
case 'keepCurrentLimit':
|
|
292
|
+
this.postPlayerSituation(this.amount, true);
|
|
293
|
+
break;
|
|
294
|
+
case 'keepCurrentLimitNewUser':
|
|
295
|
+
// new user should not have a limit amount
|
|
296
|
+
this.postPlayerSituation(null, true);
|
|
297
|
+
break;
|
|
281
298
|
case 'postSituation':
|
|
282
299
|
this.postPlayerSituation();
|
|
283
300
|
break;
|
|
@@ -294,10 +311,6 @@ const PlayerLugasLimit = class {
|
|
|
294
311
|
break;
|
|
295
312
|
}
|
|
296
313
|
};
|
|
297
|
-
this.setLimit = () => {
|
|
298
|
-
this.userAmount = this.inputValue;
|
|
299
|
-
this.postPlayerSituation(this.userAmount);
|
|
300
|
-
};
|
|
301
314
|
}
|
|
302
315
|
componentDidRender() {
|
|
303
316
|
// start custom styling area
|
|
@@ -326,7 +339,12 @@ const PlayerLugasLimit = class {
|
|
|
326
339
|
if (this.invalidInput) {
|
|
327
340
|
return;
|
|
328
341
|
}
|
|
329
|
-
this.
|
|
342
|
+
this.userAmount = this.inputValue;
|
|
343
|
+
this.postPlayerSituation(this.inputValue, false, true);
|
|
344
|
+
}
|
|
345
|
+
containsOnlyDigits(input) {
|
|
346
|
+
const regex = /^[0-9]+$/;
|
|
347
|
+
return regex.test(input);
|
|
330
348
|
}
|
|
331
349
|
handleInputChange(event) {
|
|
332
350
|
const inputValue = event.target.value;
|
|
@@ -334,11 +352,10 @@ const PlayerLugasLimit = class {
|
|
|
334
352
|
let min = parseInt(this.amountMinMax.split(',')[0]);
|
|
335
353
|
let max = parseInt(this.amountMinMax.split(',')[1]);
|
|
336
354
|
// Perform validation checks
|
|
337
|
-
this.isValidNumber = !isNaN(Number(inputValue));
|
|
355
|
+
this.isValidNumber = !isNaN(Number(inputValue)) && this.containsOnlyDigits(inputValue);
|
|
356
|
+
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange;
|
|
357
|
+
this.invalidInput = !this.isValidNumber;
|
|
338
358
|
this.isWithinRange = Number(inputValue) >= min && Number(inputValue) <= max;
|
|
339
|
-
this.hasValidDecimalSeparator = !/[',']/.test(inputValue); // Check if decimal separator is a dot (.) and not a comma (,)
|
|
340
|
-
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
341
|
-
this.invalidInput = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
342
359
|
}
|
|
343
360
|
renderKYC(step) {
|
|
344
361
|
if (step == 0) {
|
|
@@ -348,27 +365,27 @@ const PlayerLugasLimit = class {
|
|
|
348
365
|
return;
|
|
349
366
|
}
|
|
350
367
|
if (step == 1) {
|
|
351
|
-
return (index.h("div", { class: "
|
|
368
|
+
return (index.h("div", { class: "ValidatorContainer" }, index.h("div", { class: "Paragraphs" }, index.h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), index.h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
352
369
|
}
|
|
353
370
|
else if (step == 2) {
|
|
354
|
-
return (index.h("div", { class: "
|
|
371
|
+
return (index.h("div", { class: "ValidatorContainer" }, index.h("div", { class: "Paragraphs" }, index.h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), index.h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
355
372
|
}
|
|
356
373
|
else {
|
|
357
|
-
return (index.h("div", { class: "
|
|
374
|
+
return (index.h("div", { class: "ValidatorContainer" }, index.h("div", { class: "Paragraphs" }, index.h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), index.h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
|
|
358
375
|
}
|
|
359
376
|
}
|
|
360
377
|
renderValidator(input) {
|
|
361
378
|
if (input == '1') {
|
|
362
|
-
return (index.h("div", { class: "
|
|
379
|
+
return (index.h("div", { class: "ValidatorContainer" }, index.h("div", { class: "Paragraphs" }, index.h("p", null, translate('softMigrationP1', this.lang, { values: { currency: this.currency } })), index.h("p", { innerHTML: translate('softMigrationP2', this.lang, { values: { currency: this.currency } }) }), index.h("p", { innerHTML: translate('softMigrationP3', this.lang, { values: { currency: this.currency, amount: this.amount } }) })), this.crossProviders ?
|
|
363
380
|
index.h("div", { class: "CrossProvider" }, index.h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), index.h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), index.h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
364
381
|
:
|
|
365
|
-
index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
382
|
+
index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('confirm', this.lang, { values: { currency: this.currency } })))));
|
|
366
383
|
}
|
|
367
384
|
else if (input == '2') {
|
|
368
|
-
return (index.h("div", { class: "
|
|
385
|
+
return (index.h("div", { class: "ValidatorContainer" }, index.h("div", { class: "Paragraphs" }, index.h("p", null, translate('newUserP1', this.lang, { values: { currency: this.currency } })), index.h("p", null, translate('newUserP2', this.lang, { values: { currency: this.currency } })), index.h("p", null, translate('newUserP3', this.lang, { values: { currency: this.currency } }))), this.crossProviders ?
|
|
369
386
|
index.h("div", { class: "CrossProvider" }, index.h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), index.h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), index.h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
370
387
|
:
|
|
371
|
-
index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
388
|
+
index.h("div", { class: "ContainerButtons" }, index.h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), index.h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimitNewUser') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } })))));
|
|
372
389
|
}
|
|
373
390
|
}
|
|
374
391
|
render() {
|
|
@@ -383,10 +400,8 @@ const PlayerLugasLimit = class {
|
|
|
383
400
|
}
|
|
384
401
|
else {
|
|
385
402
|
return (index.h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "Container" }, index.h("div", { class: "ModalHeader" }, index.h("svg", { width: "107", height: "20", viewBox: "0 0 107 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z", fill: "#7EC51E" }), index.h("path", { d: "M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z", fill: "#002554" }), index.h("path", { d: "M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z", fill: "#002554" }), index.h("path", { d: "M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z", fill: "#002554" }), index.h("path", { d: "M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z", fill: "#002554" }), index.h("path", { d: "M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z", fill: "#002554" }), index.h("path", { d: "M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z", fill: "#002554" }), index.h("path", { d: "M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z", fill: "#002554" }), index.h("path", { d: "M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z", fill: "#002554" }), index.h("path", { d: "M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z", fill: "#002554" }), index.h("path", { d: "M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z", fill: "#002554" }), index.h("path", { d: "M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z", fill: "#002554" }))), index.h("div", { class: "ModalBody" }, this.validation ? validationContainer : kycConfirmation, this.dropDown ?
|
|
386
|
-
index.h("div", null, index.h("hr", null), index.h("div", { class: "ModalFooter" }, index.h("div", { class: "Dropdown" }, index.h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), index.h("form", { onSubmit: (event) => this.handleSubmit(event) }, index.h("div", { class: "DropdownInput" }, this.invalidInput ?
|
|
387
|
-
index.h("
|
|
388
|
-
: index.h("input", { type: "text", value: this.inputValue, placeholder: "0.00", onInput: (event) => this.handleInputChange(event) }), index.h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput ?
|
|
389
|
-
index.h("p", { class: "InvalidParagraph" }, !this.hasValidDecimalSeparator ? (translate('invalidDecimalSeparator', this.lang, { values: { currency: this.currency } })) : !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
403
|
+
index.h("div", null, index.h("hr", null), index.h("div", { class: "ModalFooter" }, index.h("div", { class: "Dropdown" }, index.h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), index.h("form", { onSubmit: (event) => this.handleSubmit(event) }, index.h("div", { class: "DropdownInput" }, index.h("input", { type: "number", value: this.inputValue, class: !this.invalidInput || this.invalidInput == undefined ? '' : "InvalidInput", placeholder: "0", onInput: (event) => this.handleInputChange(event) }), index.h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput || !this.isWithinRange && this.invalidInput != undefined ?
|
|
404
|
+
index.h("p", { class: "InvalidParagraph" }, !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
390
405
|
: null))))
|
|
391
406
|
: null))));
|
|
392
407
|
}
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"stylingAppends":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"regularDepositLimitAmount":[32],"stylingAppends":[32],"isWithinRange":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -48,39 +48,39 @@
|
|
|
48
48
|
.ModalContainer .ModalBody p {
|
|
49
49
|
margin: 0;
|
|
50
50
|
}
|
|
51
|
-
.ModalContainer .ModalBody .
|
|
51
|
+
.ModalContainer .ModalBody .ValidatorContainer {
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
justify-content: space-between;
|
|
55
55
|
}
|
|
56
|
-
.ModalContainer .ModalBody .
|
|
56
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {
|
|
57
57
|
background-color: #404350;
|
|
58
58
|
color: white;
|
|
59
59
|
margin: 5px 0px;
|
|
60
60
|
padding: 10px 15px;
|
|
61
61
|
border-radius: 2px;
|
|
62
62
|
}
|
|
63
|
-
.ModalContainer .ModalBody .
|
|
63
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {
|
|
64
64
|
position: absolute;
|
|
65
65
|
width: 5px;
|
|
66
66
|
height: 28px;
|
|
67
67
|
}
|
|
68
|
-
.ModalContainer .ModalBody .
|
|
68
|
+
.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {
|
|
69
69
|
padding-left: 15px;
|
|
70
70
|
}
|
|
71
|
-
.ModalContainer .ModalBody .
|
|
71
|
+
.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {
|
|
72
72
|
padding: 5px 0px;
|
|
73
73
|
}
|
|
74
|
-
.ModalContainer .ModalBody .
|
|
74
|
+
.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {
|
|
75
75
|
padding: 5px 0px;
|
|
76
76
|
}
|
|
77
|
-
.ModalContainer .ModalBody .
|
|
77
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {
|
|
78
78
|
display: flex;
|
|
79
79
|
justify-content: space-around;
|
|
80
80
|
gap: 10px;
|
|
81
81
|
padding-top: 5px;
|
|
82
82
|
}
|
|
83
|
-
.ModalContainer .ModalBody .
|
|
83
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {
|
|
84
84
|
background-color: #ffffff;
|
|
85
85
|
font-weight: bold;
|
|
86
86
|
color: #002554;
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
width: 100%;
|
|
90
90
|
cursor: pointer;
|
|
91
91
|
}
|
|
92
|
-
.ModalContainer .ModalBody .
|
|
92
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {
|
|
93
93
|
background-color: #6BB816;
|
|
94
94
|
border: none;
|
|
95
95
|
cursor: pointer;
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
color: #ffffff;
|
|
99
99
|
width: 100%;
|
|
100
100
|
}
|
|
101
|
-
.ModalContainer .ModalBody .
|
|
101
|
+
.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {
|
|
102
102
|
width: 240px;
|
|
103
103
|
height: 30px;
|
|
104
104
|
}
|
|
@@ -159,6 +159,16 @@
|
|
|
159
159
|
border: 1px solid #FF0000;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
input {
|
|
163
|
+
/* Firefox */
|
|
164
|
+
-moz-appearance: textfield;
|
|
165
|
+
/* Chrome, Safari, Edge, Opera */
|
|
166
|
+
}
|
|
167
|
+
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
|
|
168
|
+
-webkit-appearance: none;
|
|
169
|
+
margin: 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
162
172
|
@container (max-width: 1300px) {
|
|
163
173
|
.ModalContainer .Container {
|
|
164
174
|
width: 50%;
|
|
@@ -35,7 +35,7 @@ export class PlayerLugasLimit {
|
|
|
35
35
|
*/
|
|
36
36
|
this.clientStyling = '';
|
|
37
37
|
/**
|
|
38
|
-
* Client custom styling via url
|
|
38
|
+
* Client custom styling via url
|
|
39
39
|
*/
|
|
40
40
|
this.clientStylingUrl = '';
|
|
41
41
|
/**
|
|
@@ -49,9 +49,9 @@ export class PlayerLugasLimit {
|
|
|
49
49
|
this.inputValue = '';
|
|
50
50
|
this.isButtonDisabled = true;
|
|
51
51
|
this.crossProviders = false;
|
|
52
|
-
this.invalidInput = false;
|
|
53
52
|
this.userAmount = '';
|
|
54
53
|
this.operatorDepositLimitAmount = '';
|
|
54
|
+
this.regularDepositLimitAmount = '';
|
|
55
55
|
this.stylingAppends = false;
|
|
56
56
|
this.setClientStyling = () => {
|
|
57
57
|
let sheet = document.createElement('style');
|
|
@@ -71,8 +71,15 @@ export class PlayerLugasLimit {
|
|
|
71
71
|
console.log('error ', err);
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
this.postPlayerSituation = (userAmount) => {
|
|
75
|
-
let url = new URL(`${this.endpoint}
|
|
74
|
+
this.postPlayerSituation = (userAmount, keepLimit = false, initialNewLimit = false) => {
|
|
75
|
+
let url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
76
|
+
let roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
77
|
+
let bodyDraft = {
|
|
78
|
+
softMigration: this.flow == '1',
|
|
79
|
+
keepLimit: keepLimit,
|
|
80
|
+
roleLimitAmount: roleLimitAmount
|
|
81
|
+
};
|
|
82
|
+
userAmount && (bodyDraft['amount'] = `${userAmount}`);
|
|
76
83
|
let options = {
|
|
77
84
|
method: 'POST',
|
|
78
85
|
headers: {
|
|
@@ -80,7 +87,7 @@ export class PlayerLugasLimit {
|
|
|
80
87
|
'Content-Type': 'application/json',
|
|
81
88
|
'Authorization': `Bearer ${this.session}`
|
|
82
89
|
},
|
|
83
|
-
body:
|
|
90
|
+
body: JSON.stringify(bodyDraft)
|
|
84
91
|
};
|
|
85
92
|
fetch(url.href, options)
|
|
86
93
|
.then((res) => {
|
|
@@ -100,6 +107,9 @@ export class PlayerLugasLimit {
|
|
|
100
107
|
if (data.operatorDepositLimitAmount) {
|
|
101
108
|
this.operatorDepositLimitAmount = data.operatorDepositLimitAmount;
|
|
102
109
|
}
|
|
110
|
+
if (data.regulatorDepositLimitAmount) {
|
|
111
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount;
|
|
112
|
+
}
|
|
103
113
|
})
|
|
104
114
|
.catch((err) => {
|
|
105
115
|
// Handle any errors
|
|
@@ -108,6 +118,13 @@ export class PlayerLugasLimit {
|
|
|
108
118
|
};
|
|
109
119
|
this.handleClick = (input) => {
|
|
110
120
|
switch (input) {
|
|
121
|
+
case 'keepCurrentLimit':
|
|
122
|
+
this.postPlayerSituation(this.amount, true);
|
|
123
|
+
break;
|
|
124
|
+
case 'keepCurrentLimitNewUser':
|
|
125
|
+
// new user should not have a limit amount
|
|
126
|
+
this.postPlayerSituation(null, true);
|
|
127
|
+
break;
|
|
111
128
|
case 'postSituation':
|
|
112
129
|
this.postPlayerSituation();
|
|
113
130
|
break;
|
|
@@ -124,10 +141,6 @@ export class PlayerLugasLimit {
|
|
|
124
141
|
break;
|
|
125
142
|
}
|
|
126
143
|
};
|
|
127
|
-
this.setLimit = () => {
|
|
128
|
-
this.userAmount = this.inputValue;
|
|
129
|
-
this.postPlayerSituation(this.userAmount);
|
|
130
|
-
};
|
|
131
144
|
}
|
|
132
145
|
componentDidRender() {
|
|
133
146
|
// start custom styling area
|
|
@@ -156,7 +169,12 @@ export class PlayerLugasLimit {
|
|
|
156
169
|
if (this.invalidInput) {
|
|
157
170
|
return;
|
|
158
171
|
}
|
|
159
|
-
this.
|
|
172
|
+
this.userAmount = this.inputValue;
|
|
173
|
+
this.postPlayerSituation(this.inputValue, false, true);
|
|
174
|
+
}
|
|
175
|
+
containsOnlyDigits(input) {
|
|
176
|
+
const regex = /^[0-9]+$/;
|
|
177
|
+
return regex.test(input);
|
|
160
178
|
}
|
|
161
179
|
handleInputChange(event) {
|
|
162
180
|
const inputValue = event.target.value;
|
|
@@ -164,11 +182,10 @@ export class PlayerLugasLimit {
|
|
|
164
182
|
let min = parseInt(this.amountMinMax.split(',')[0]);
|
|
165
183
|
let max = parseInt(this.amountMinMax.split(',')[1]);
|
|
166
184
|
// Perform validation checks
|
|
167
|
-
this.isValidNumber = !isNaN(Number(inputValue));
|
|
185
|
+
this.isValidNumber = !isNaN(Number(inputValue)) && this.containsOnlyDigits(inputValue);
|
|
186
|
+
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange;
|
|
187
|
+
this.invalidInput = !this.isValidNumber;
|
|
168
188
|
this.isWithinRange = Number(inputValue) >= min && Number(inputValue) <= max;
|
|
169
|
-
this.hasValidDecimalSeparator = !/[',']/.test(inputValue); // Check if decimal separator is a dot (.) and not a comma (,)
|
|
170
|
-
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
171
|
-
this.invalidInput = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
172
189
|
}
|
|
173
190
|
renderKYC(step) {
|
|
174
191
|
if (step == 0) {
|
|
@@ -178,25 +195,25 @@ export class PlayerLugasLimit {
|
|
|
178
195
|
return;
|
|
179
196
|
}
|
|
180
197
|
if (step == 1) {
|
|
181
|
-
return (h("div", { class: "
|
|
198
|
+
return (h("div", { class: "ValidatorContainer" },
|
|
182
199
|
h("div", { class: "Paragraphs" },
|
|
183
200
|
h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })),
|
|
184
201
|
h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })),
|
|
185
202
|
h("div", { class: "ContainerButtons" },
|
|
186
|
-
h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })),
|
|
187
|
-
h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
203
|
+
h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })),
|
|
204
|
+
h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
188
205
|
}
|
|
189
206
|
else if (step == 2) {
|
|
190
|
-
return (h("div", { class: "
|
|
207
|
+
return (h("div", { class: "ValidatorContainer" },
|
|
191
208
|
h("div", { class: "Paragraphs" },
|
|
192
209
|
h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })),
|
|
193
|
-
h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.
|
|
210
|
+
h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }),
|
|
194
211
|
h("div", { class: "ContainerButtons" },
|
|
195
212
|
h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })),
|
|
196
213
|
h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
197
214
|
}
|
|
198
215
|
else {
|
|
199
|
-
return (h("div", { class: "
|
|
216
|
+
return (h("div", { class: "ValidatorContainer" },
|
|
200
217
|
h("div", { class: "Paragraphs" },
|
|
201
218
|
h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })),
|
|
202
219
|
h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })),
|
|
@@ -206,7 +223,7 @@ export class PlayerLugasLimit {
|
|
|
206
223
|
}
|
|
207
224
|
renderValidator(input) {
|
|
208
225
|
if (input == '1') {
|
|
209
|
-
return (h("div", { class: "
|
|
226
|
+
return (h("div", { class: "ValidatorContainer" },
|
|
210
227
|
h("div", { class: "Paragraphs" },
|
|
211
228
|
h("p", null, translate('softMigrationP1', this.lang, { values: { currency: this.currency } })),
|
|
212
229
|
h("p", { innerHTML: translate('softMigrationP2', this.lang, { values: { currency: this.currency } }) }),
|
|
@@ -220,10 +237,10 @@ export class PlayerLugasLimit {
|
|
|
220
237
|
:
|
|
221
238
|
h("div", { class: "ContainerButtons" },
|
|
222
239
|
h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })),
|
|
223
|
-
h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
240
|
+
h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('confirm', this.lang, { values: { currency: this.currency } })))));
|
|
224
241
|
}
|
|
225
242
|
else if (input == '2') {
|
|
226
|
-
return (h("div", { class: "
|
|
243
|
+
return (h("div", { class: "ValidatorContainer" },
|
|
227
244
|
h("div", { class: "Paragraphs" },
|
|
228
245
|
h("p", null, translate('newUserP1', this.lang, { values: { currency: this.currency } })),
|
|
229
246
|
h("p", null, translate('newUserP2', this.lang, { values: { currency: this.currency } })),
|
|
@@ -237,7 +254,7 @@ export class PlayerLugasLimit {
|
|
|
237
254
|
:
|
|
238
255
|
h("div", { class: "ContainerButtons" },
|
|
239
256
|
h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })),
|
|
240
|
-
h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
257
|
+
h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimitNewUser') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } })))));
|
|
241
258
|
}
|
|
242
259
|
}
|
|
243
260
|
render() {
|
|
@@ -279,12 +296,10 @@ export class PlayerLugasLimit {
|
|
|
279
296
|
h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })),
|
|
280
297
|
h("form", { onSubmit: (event) => this.handleSubmit(event) },
|
|
281
298
|
h("div", { class: "DropdownInput" },
|
|
282
|
-
this.invalidInput ?
|
|
283
|
-
h("input", { type: "text", value: this.inputValue, class: "InvalidInput", placeholder: "0.00", onInput: (event) => this.handleInputChange(event) })
|
|
284
|
-
: h("input", { type: "text", value: this.inputValue, placeholder: "0.00", onInput: (event) => this.handleInputChange(event) }),
|
|
299
|
+
h("input", { type: "number", value: this.inputValue, class: !this.invalidInput || this.invalidInput == undefined ? '' : "InvalidInput", placeholder: "0", onInput: (event) => this.handleInputChange(event) }),
|
|
285
300
|
h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))),
|
|
286
|
-
this.invalidInput ?
|
|
287
|
-
h("p", { class: "InvalidParagraph" }, !this.
|
|
301
|
+
this.invalidInput || !this.isWithinRange && this.invalidInput != undefined ?
|
|
302
|
+
h("p", { class: "InvalidParagraph" }, !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
288
303
|
: null))))
|
|
289
304
|
: null))));
|
|
290
305
|
}
|
|
@@ -472,7 +487,7 @@ export class PlayerLugasLimit {
|
|
|
472
487
|
"optional": false,
|
|
473
488
|
"docs": {
|
|
474
489
|
"tags": [],
|
|
475
|
-
"text": "Client custom styling via url
|
|
490
|
+
"text": "Client custom styling via url"
|
|
476
491
|
},
|
|
477
492
|
"attribute": "client-styling-url",
|
|
478
493
|
"reflect": false,
|
|
@@ -509,7 +524,9 @@ export class PlayerLugasLimit {
|
|
|
509
524
|
"invalidInput": {},
|
|
510
525
|
"userAmount": {},
|
|
511
526
|
"operatorDepositLimitAmount": {},
|
|
512
|
-
"
|
|
527
|
+
"regularDepositLimitAmount": {},
|
|
528
|
+
"stylingAppends": {},
|
|
529
|
+
"isWithinRange": {}
|
|
513
530
|
}; }
|
|
514
531
|
static get events() { return [{
|
|
515
532
|
"method": "uploadDocuments",
|
|
@@ -161,7 +161,7 @@ const translate = (key, customLang, values) => {
|
|
|
161
161
|
return translation;
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .
|
|
164
|
+
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {\n background-color: #404350;\n color: white;\n margin: 5px 0px;\n padding: 10px 15px;\n border-radius: 2px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {\n position: absolute;\n width: 5px;\n height: 28px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {\n padding-left: 15px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {\n background-color: #ffffff;\n font-weight: bold;\n color: #002554;\n font-size: 10px;\n border: 2.5px solid #dee2e6;\n width: 100%;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {\n background-color: #6BB816;\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: 10px;\n color: #ffffff;\n width: 100%;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n.ModalContainer .ModalFooter {\n display: flex;\n justify-content: center;\n background-color: rgba(161, 156, 156, 0.11);\n margin: 5px 0px;\n}\n.ModalContainer .ModalFooter .Dropdown {\n background-color: white;\n padding: 8px;\n width: 100%;\n border: 1px solid #dee2e6;\n}\n.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {\n font-size: 10px;\n color: #FF0000;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput input {\n flex: 4;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button {\n padding: 2px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out 0s;\n flex: 1;\n font-size: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {\n background-color: #6BB816;\n color: #ffffff;\n font-weight: bold;\n border: none;\n border: 2.5px solid rgba(255, 255, 255, 0);\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {\n background-color: #ffffff;\n color: #002554;\n font-weight: bold;\n cursor: not-allowed;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {\n margin-left: 0px;\n display: flex;\n padding: 10px 0px;\n justify-content: center;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {\n border: 1px solid #FF0000;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}";
|
|
165
165
|
|
|
166
166
|
const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
167
167
|
constructor() {
|
|
@@ -203,7 +203,7 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
203
203
|
*/
|
|
204
204
|
this.clientStyling = '';
|
|
205
205
|
/**
|
|
206
|
-
* Client custom styling via url
|
|
206
|
+
* Client custom styling via url
|
|
207
207
|
*/
|
|
208
208
|
this.clientStylingUrl = '';
|
|
209
209
|
/**
|
|
@@ -217,9 +217,9 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
217
217
|
this.inputValue = '';
|
|
218
218
|
this.isButtonDisabled = true;
|
|
219
219
|
this.crossProviders = false;
|
|
220
|
-
this.invalidInput = false;
|
|
221
220
|
this.userAmount = '';
|
|
222
221
|
this.operatorDepositLimitAmount = '';
|
|
222
|
+
this.regularDepositLimitAmount = '';
|
|
223
223
|
this.stylingAppends = false;
|
|
224
224
|
this.setClientStyling = () => {
|
|
225
225
|
let sheet = document.createElement('style');
|
|
@@ -239,8 +239,15 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
239
239
|
console.log('error ', err);
|
|
240
240
|
});
|
|
241
241
|
};
|
|
242
|
-
this.postPlayerSituation = (userAmount) => {
|
|
243
|
-
let url = new URL(`${this.endpoint}
|
|
242
|
+
this.postPlayerSituation = (userAmount, keepLimit = false, initialNewLimit = false) => {
|
|
243
|
+
let url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
244
|
+
let roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
245
|
+
let bodyDraft = {
|
|
246
|
+
softMigration: this.flow == '1',
|
|
247
|
+
keepLimit: keepLimit,
|
|
248
|
+
roleLimitAmount: roleLimitAmount
|
|
249
|
+
};
|
|
250
|
+
userAmount && (bodyDraft['amount'] = `${userAmount}`);
|
|
244
251
|
let options = {
|
|
245
252
|
method: 'POST',
|
|
246
253
|
headers: {
|
|
@@ -248,7 +255,7 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
248
255
|
'Content-Type': 'application/json',
|
|
249
256
|
'Authorization': `Bearer ${this.session}`
|
|
250
257
|
},
|
|
251
|
-
body:
|
|
258
|
+
body: JSON.stringify(bodyDraft)
|
|
252
259
|
};
|
|
253
260
|
fetch(url.href, options)
|
|
254
261
|
.then((res) => {
|
|
@@ -268,6 +275,9 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
268
275
|
if (data.operatorDepositLimitAmount) {
|
|
269
276
|
this.operatorDepositLimitAmount = data.operatorDepositLimitAmount;
|
|
270
277
|
}
|
|
278
|
+
if (data.regulatorDepositLimitAmount) {
|
|
279
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount;
|
|
280
|
+
}
|
|
271
281
|
})
|
|
272
282
|
.catch((err) => {
|
|
273
283
|
// Handle any errors
|
|
@@ -276,6 +286,13 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
276
286
|
};
|
|
277
287
|
this.handleClick = (input) => {
|
|
278
288
|
switch (input) {
|
|
289
|
+
case 'keepCurrentLimit':
|
|
290
|
+
this.postPlayerSituation(this.amount, true);
|
|
291
|
+
break;
|
|
292
|
+
case 'keepCurrentLimitNewUser':
|
|
293
|
+
// new user should not have a limit amount
|
|
294
|
+
this.postPlayerSituation(null, true);
|
|
295
|
+
break;
|
|
279
296
|
case 'postSituation':
|
|
280
297
|
this.postPlayerSituation();
|
|
281
298
|
break;
|
|
@@ -292,10 +309,6 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
292
309
|
break;
|
|
293
310
|
}
|
|
294
311
|
};
|
|
295
|
-
this.setLimit = () => {
|
|
296
|
-
this.userAmount = this.inputValue;
|
|
297
|
-
this.postPlayerSituation(this.userAmount);
|
|
298
|
-
};
|
|
299
312
|
}
|
|
300
313
|
componentDidRender() {
|
|
301
314
|
// start custom styling area
|
|
@@ -324,7 +337,12 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
324
337
|
if (this.invalidInput) {
|
|
325
338
|
return;
|
|
326
339
|
}
|
|
327
|
-
this.
|
|
340
|
+
this.userAmount = this.inputValue;
|
|
341
|
+
this.postPlayerSituation(this.inputValue, false, true);
|
|
342
|
+
}
|
|
343
|
+
containsOnlyDigits(input) {
|
|
344
|
+
const regex = /^[0-9]+$/;
|
|
345
|
+
return regex.test(input);
|
|
328
346
|
}
|
|
329
347
|
handleInputChange(event) {
|
|
330
348
|
const inputValue = event.target.value;
|
|
@@ -332,11 +350,10 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
332
350
|
let min = parseInt(this.amountMinMax.split(',')[0]);
|
|
333
351
|
let max = parseInt(this.amountMinMax.split(',')[1]);
|
|
334
352
|
// Perform validation checks
|
|
335
|
-
this.isValidNumber = !isNaN(Number(inputValue));
|
|
353
|
+
this.isValidNumber = !isNaN(Number(inputValue)) && this.containsOnlyDigits(inputValue);
|
|
354
|
+
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange;
|
|
355
|
+
this.invalidInput = !this.isValidNumber;
|
|
336
356
|
this.isWithinRange = Number(inputValue) >= min && Number(inputValue) <= max;
|
|
337
|
-
this.hasValidDecimalSeparator = !/[',']/.test(inputValue); // Check if decimal separator is a dot (.) and not a comma (,)
|
|
338
|
-
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
339
|
-
this.invalidInput = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
340
357
|
}
|
|
341
358
|
renderKYC(step) {
|
|
342
359
|
if (step == 0) {
|
|
@@ -346,27 +363,27 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
346
363
|
return;
|
|
347
364
|
}
|
|
348
365
|
if (step == 1) {
|
|
349
|
-
return (h("div", { class: "
|
|
366
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
350
367
|
}
|
|
351
368
|
else if (step == 2) {
|
|
352
|
-
return (h("div", { class: "
|
|
369
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
353
370
|
}
|
|
354
371
|
else {
|
|
355
|
-
return (h("div", { class: "
|
|
372
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
|
|
356
373
|
}
|
|
357
374
|
}
|
|
358
375
|
renderValidator(input) {
|
|
359
376
|
if (input == '1') {
|
|
360
|
-
return (h("div", { class: "
|
|
377
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('softMigrationP1', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('softMigrationP2', this.lang, { values: { currency: this.currency } }) }), h("p", { innerHTML: translate('softMigrationP3', this.lang, { values: { currency: this.currency, amount: this.amount } }) })), this.crossProviders ?
|
|
361
378
|
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
362
379
|
:
|
|
363
|
-
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
380
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('confirm', this.lang, { values: { currency: this.currency } })))));
|
|
364
381
|
}
|
|
365
382
|
else if (input == '2') {
|
|
366
|
-
return (h("div", { class: "
|
|
383
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('newUserP1', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP2', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP3', this.lang, { values: { currency: this.currency } }))), this.crossProviders ?
|
|
367
384
|
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
368
385
|
:
|
|
369
|
-
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
386
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimitNewUser') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } })))));
|
|
370
387
|
}
|
|
371
388
|
}
|
|
372
389
|
render() {
|
|
@@ -381,10 +398,8 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
381
398
|
}
|
|
382
399
|
else {
|
|
383
400
|
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("svg", { width: "107", height: "20", viewBox: "0 0 107 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z", fill: "#7EC51E" }), h("path", { d: "M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z", fill: "#002554" }), h("path", { d: "M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z", fill: "#002554" }), h("path", { d: "M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z", fill: "#002554" }), h("path", { d: "M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z", fill: "#002554" }), h("path", { d: "M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z", fill: "#002554" }), h("path", { d: "M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z", fill: "#002554" }), h("path", { d: "M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z", fill: "#002554" }), h("path", { d: "M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z", fill: "#002554" }), h("path", { d: "M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z", fill: "#002554" }), h("path", { d: "M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z", fill: "#002554" }), h("path", { d: "M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z", fill: "#002554" }))), h("div", { class: "ModalBody" }, this.validation ? validationContainer : kycConfirmation, this.dropDown ?
|
|
384
|
-
h("div", null, h("hr", null), h("div", { class: "ModalFooter" }, h("div", { class: "Dropdown" }, h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), h("form", { onSubmit: (event) => this.handleSubmit(event) }, h("div", { class: "DropdownInput" }, this.invalidInput ?
|
|
385
|
-
h("
|
|
386
|
-
: h("input", { type: "text", value: this.inputValue, placeholder: "0.00", onInput: (event) => this.handleInputChange(event) }), h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput ?
|
|
387
|
-
h("p", { class: "InvalidParagraph" }, !this.hasValidDecimalSeparator ? (translate('invalidDecimalSeparator', this.lang, { values: { currency: this.currency } })) : !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
401
|
+
h("div", null, h("hr", null), h("div", { class: "ModalFooter" }, h("div", { class: "Dropdown" }, h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), h("form", { onSubmit: (event) => this.handleSubmit(event) }, h("div", { class: "DropdownInput" }, h("input", { type: "number", value: this.inputValue, class: !this.invalidInput || this.invalidInput == undefined ? '' : "InvalidInput", placeholder: "0", onInput: (event) => this.handleInputChange(event) }), h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput || !this.isWithinRange && this.invalidInput != undefined ?
|
|
402
|
+
h("p", { class: "InvalidParagraph" }, !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
388
403
|
: null))))
|
|
389
404
|
: null))));
|
|
390
405
|
}
|
|
@@ -417,7 +432,9 @@ const PlayerLugasLimit$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
417
432
|
"invalidInput": [32],
|
|
418
433
|
"userAmount": [32],
|
|
419
434
|
"operatorDepositLimitAmount": [32],
|
|
420
|
-
"
|
|
435
|
+
"regularDepositLimitAmount": [32],
|
|
436
|
+
"stylingAppends": [32],
|
|
437
|
+
"isWithinRange": [32]
|
|
421
438
|
}]);
|
|
422
439
|
function defineCustomElement$1() {
|
|
423
440
|
if (typeof customElements === "undefined") {
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"stylingAppends":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"regularDepositLimitAmount":[32],"stylingAppends":[32],"isWithinRange":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -161,7 +161,7 @@ const translate = (key, customLang, values) => {
|
|
|
161
161
|
return translation;
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .
|
|
164
|
+
const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {\n background-color: #404350;\n color: white;\n margin: 5px 0px;\n padding: 10px 15px;\n border-radius: 2px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {\n position: absolute;\n width: 5px;\n height: 28px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {\n padding-left: 15px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {\n background-color: #ffffff;\n font-weight: bold;\n color: #002554;\n font-size: 10px;\n border: 2.5px solid #dee2e6;\n width: 100%;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {\n background-color: #6BB816;\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: 10px;\n color: #ffffff;\n width: 100%;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n.ModalContainer .ModalFooter {\n display: flex;\n justify-content: center;\n background-color: rgba(161, 156, 156, 0.11);\n margin: 5px 0px;\n}\n.ModalContainer .ModalFooter .Dropdown {\n background-color: white;\n padding: 8px;\n width: 100%;\n border: 1px solid #dee2e6;\n}\n.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {\n font-size: 10px;\n color: #FF0000;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput input {\n flex: 4;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button {\n padding: 2px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out 0s;\n flex: 1;\n font-size: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {\n background-color: #6BB816;\n color: #ffffff;\n font-weight: bold;\n border: none;\n border: 2.5px solid rgba(255, 255, 255, 0);\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {\n background-color: #ffffff;\n color: #002554;\n font-weight: bold;\n cursor: not-allowed;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {\n margin-left: 0px;\n display: flex;\n padding: 10px 0px;\n justify-content: center;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {\n border: 1px solid #FF0000;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}";
|
|
165
165
|
|
|
166
166
|
const PlayerLugasLimit = class {
|
|
167
167
|
constructor(hostRef) {
|
|
@@ -201,7 +201,7 @@ const PlayerLugasLimit = class {
|
|
|
201
201
|
*/
|
|
202
202
|
this.clientStyling = '';
|
|
203
203
|
/**
|
|
204
|
-
* Client custom styling via url
|
|
204
|
+
* Client custom styling via url
|
|
205
205
|
*/
|
|
206
206
|
this.clientStylingUrl = '';
|
|
207
207
|
/**
|
|
@@ -215,9 +215,9 @@ const PlayerLugasLimit = class {
|
|
|
215
215
|
this.inputValue = '';
|
|
216
216
|
this.isButtonDisabled = true;
|
|
217
217
|
this.crossProviders = false;
|
|
218
|
-
this.invalidInput = false;
|
|
219
218
|
this.userAmount = '';
|
|
220
219
|
this.operatorDepositLimitAmount = '';
|
|
220
|
+
this.regularDepositLimitAmount = '';
|
|
221
221
|
this.stylingAppends = false;
|
|
222
222
|
this.setClientStyling = () => {
|
|
223
223
|
let sheet = document.createElement('style');
|
|
@@ -237,8 +237,15 @@ const PlayerLugasLimit = class {
|
|
|
237
237
|
console.log('error ', err);
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
|
-
this.postPlayerSituation = (userAmount) => {
|
|
241
|
-
let url = new URL(`${this.endpoint}
|
|
240
|
+
this.postPlayerSituation = (userAmount, keepLimit = false, initialNewLimit = false) => {
|
|
241
|
+
let url = new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`);
|
|
242
|
+
let roleLimitAmount = initialNewLimit ? this.amount : 0;
|
|
243
|
+
let bodyDraft = {
|
|
244
|
+
softMigration: this.flow == '1',
|
|
245
|
+
keepLimit: keepLimit,
|
|
246
|
+
roleLimitAmount: roleLimitAmount
|
|
247
|
+
};
|
|
248
|
+
userAmount && (bodyDraft['amount'] = `${userAmount}`);
|
|
242
249
|
let options = {
|
|
243
250
|
method: 'POST',
|
|
244
251
|
headers: {
|
|
@@ -246,7 +253,7 @@ const PlayerLugasLimit = class {
|
|
|
246
253
|
'Content-Type': 'application/json',
|
|
247
254
|
'Authorization': `Bearer ${this.session}`
|
|
248
255
|
},
|
|
249
|
-
body:
|
|
256
|
+
body: JSON.stringify(bodyDraft)
|
|
250
257
|
};
|
|
251
258
|
fetch(url.href, options)
|
|
252
259
|
.then((res) => {
|
|
@@ -266,6 +273,9 @@ const PlayerLugasLimit = class {
|
|
|
266
273
|
if (data.operatorDepositLimitAmount) {
|
|
267
274
|
this.operatorDepositLimitAmount = data.operatorDepositLimitAmount;
|
|
268
275
|
}
|
|
276
|
+
if (data.regulatorDepositLimitAmount) {
|
|
277
|
+
this.regularDepositLimitAmount = data.regulatorDepositLimitAmount;
|
|
278
|
+
}
|
|
269
279
|
})
|
|
270
280
|
.catch((err) => {
|
|
271
281
|
// Handle any errors
|
|
@@ -274,6 +284,13 @@ const PlayerLugasLimit = class {
|
|
|
274
284
|
};
|
|
275
285
|
this.handleClick = (input) => {
|
|
276
286
|
switch (input) {
|
|
287
|
+
case 'keepCurrentLimit':
|
|
288
|
+
this.postPlayerSituation(this.amount, true);
|
|
289
|
+
break;
|
|
290
|
+
case 'keepCurrentLimitNewUser':
|
|
291
|
+
// new user should not have a limit amount
|
|
292
|
+
this.postPlayerSituation(null, true);
|
|
293
|
+
break;
|
|
277
294
|
case 'postSituation':
|
|
278
295
|
this.postPlayerSituation();
|
|
279
296
|
break;
|
|
@@ -290,10 +307,6 @@ const PlayerLugasLimit = class {
|
|
|
290
307
|
break;
|
|
291
308
|
}
|
|
292
309
|
};
|
|
293
|
-
this.setLimit = () => {
|
|
294
|
-
this.userAmount = this.inputValue;
|
|
295
|
-
this.postPlayerSituation(this.userAmount);
|
|
296
|
-
};
|
|
297
310
|
}
|
|
298
311
|
componentDidRender() {
|
|
299
312
|
// start custom styling area
|
|
@@ -322,7 +335,12 @@ const PlayerLugasLimit = class {
|
|
|
322
335
|
if (this.invalidInput) {
|
|
323
336
|
return;
|
|
324
337
|
}
|
|
325
|
-
this.
|
|
338
|
+
this.userAmount = this.inputValue;
|
|
339
|
+
this.postPlayerSituation(this.inputValue, false, true);
|
|
340
|
+
}
|
|
341
|
+
containsOnlyDigits(input) {
|
|
342
|
+
const regex = /^[0-9]+$/;
|
|
343
|
+
return regex.test(input);
|
|
326
344
|
}
|
|
327
345
|
handleInputChange(event) {
|
|
328
346
|
const inputValue = event.target.value;
|
|
@@ -330,11 +348,10 @@ const PlayerLugasLimit = class {
|
|
|
330
348
|
let min = parseInt(this.amountMinMax.split(',')[0]);
|
|
331
349
|
let max = parseInt(this.amountMinMax.split(',')[1]);
|
|
332
350
|
// Perform validation checks
|
|
333
|
-
this.isValidNumber = !isNaN(Number(inputValue));
|
|
351
|
+
this.isValidNumber = !isNaN(Number(inputValue)) && this.containsOnlyDigits(inputValue);
|
|
352
|
+
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange;
|
|
353
|
+
this.invalidInput = !this.isValidNumber;
|
|
334
354
|
this.isWithinRange = Number(inputValue) >= min && Number(inputValue) <= max;
|
|
335
|
-
this.hasValidDecimalSeparator = !/[',']/.test(inputValue); // Check if decimal separator is a dot (.) and not a comma (,)
|
|
336
|
-
this.isButtonDisabled = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
337
|
-
this.invalidInput = !this.isValidNumber || !this.isWithinRange || !this.hasValidDecimalSeparator;
|
|
338
355
|
}
|
|
339
356
|
renderKYC(step) {
|
|
340
357
|
if (step == 0) {
|
|
@@ -344,27 +361,27 @@ const PlayerLugasLimit = class {
|
|
|
344
361
|
return;
|
|
345
362
|
}
|
|
346
363
|
if (step == 1) {
|
|
347
|
-
return (h("div", { class: "
|
|
364
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycSure', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc1', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.postPlayerSituation(this.userAmount, false) }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } }))))));
|
|
348
365
|
}
|
|
349
366
|
else if (step == 2) {
|
|
350
|
-
return (h("div", { class: "
|
|
367
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('kyc2', this.lang, { values: { currency: this.currency, amount: this.regularDepositLimitAmount } }) }), h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('UploadDocuments') }, translate('UploadDocuments', this.lang, { values: { currency: this.currency } }))))));
|
|
351
368
|
}
|
|
352
369
|
else {
|
|
353
|
-
return (h("div", { class: "
|
|
370
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('kycThanks', this.lang, { values: { currency: this.currency } })), h("p", null, translate('kyc3', this.lang, { values: { currency: this.currency } })), h("div", { class: "ContainerButtons" }, h("button", { class: "SecondButton", onClick: () => this.handleClick('Close') }, translate('Close', this.lang, { values: { currency: this.currency } }))))));
|
|
354
371
|
}
|
|
355
372
|
}
|
|
356
373
|
renderValidator(input) {
|
|
357
374
|
if (input == '1') {
|
|
358
|
-
return (h("div", { class: "
|
|
375
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('softMigrationP1', this.lang, { values: { currency: this.currency } })), h("p", { innerHTML: translate('softMigrationP2', this.lang, { values: { currency: this.currency } }) }), h("p", { innerHTML: translate('softMigrationP3', this.lang, { values: { currency: this.currency, amount: this.amount } }) })), this.crossProviders ?
|
|
359
376
|
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
360
377
|
:
|
|
361
|
-
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
378
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimit') }, translate('confirm', this.lang, { values: { currency: this.currency } })))));
|
|
362
379
|
}
|
|
363
380
|
else if (input == '2') {
|
|
364
|
-
return (h("div", { class: "
|
|
381
|
+
return (h("div", { class: "ValidatorContainer" }, h("div", { class: "Paragraphs" }, h("p", null, translate('newUserP1', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP2', this.lang, { values: { currency: this.currency } })), h("p", null, translate('newUserP3', this.lang, { values: { currency: this.currency } }))), this.crossProviders ?
|
|
365
382
|
h("div", { class: "CrossProvider" }, h("svg", { width: "4", height: "17", viewBox: "0 0 4 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "4", height: "12", rx: "2", fill: "white" }), h("rect", { y: "14", width: "4", height: "3", rx: "1.5", fill: "white" })), h("p", null, translate('crossProviders', this.lang, { values: { currency: this.currency } })))
|
|
366
383
|
:
|
|
367
|
-
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('
|
|
384
|
+
h("div", { class: "ContainerButtons" }, h("button", { class: "FirstButton", onClick: () => this.handleClick('setNewLimit') }, translate('setNewLimit', this.lang, { values: { currency: this.currency } })), h("button", { class: "SecondButton", onClick: () => this.handleClick('keepCurrentLimitNewUser') }, translate('keepExistingLimit', this.lang, { values: { currency: this.currency } })))));
|
|
368
385
|
}
|
|
369
386
|
}
|
|
370
387
|
render() {
|
|
@@ -379,10 +396,8 @@ const PlayerLugasLimit = class {
|
|
|
379
396
|
}
|
|
380
397
|
else {
|
|
381
398
|
return (h("div", { class: "ModalContainer", ref: el => this.stylingContainer = el }, h("div", { class: "Container" }, h("div", { class: "ModalHeader" }, h("svg", { width: "107", height: "20", viewBox: "0 0 107 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z", fill: "#7EC51E" }), h("path", { d: "M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z", fill: "#002554" }), h("path", { d: "M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z", fill: "#002554" }), h("path", { d: "M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z", fill: "#002554" }), h("path", { d: "M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z", fill: "#002554" }), h("path", { d: "M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z", fill: "#002554" }), h("path", { d: "M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z", fill: "#002554" }), h("path", { d: "M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z", fill: "#002554" }), h("path", { d: "M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z", fill: "#002554" }), h("path", { d: "M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z", fill: "#002554" }), h("path", { d: "M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z", fill: "#002554" }), h("path", { d: "M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z", fill: "#002554" }))), h("div", { class: "ModalBody" }, this.validation ? validationContainer : kycConfirmation, this.dropDown ?
|
|
382
|
-
h("div", null, h("hr", null), h("div", { class: "ModalFooter" }, h("div", { class: "Dropdown" }, h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), h("form", { onSubmit: (event) => this.handleSubmit(event) }, h("div", { class: "DropdownInput" }, this.invalidInput ?
|
|
383
|
-
h("
|
|
384
|
-
: h("input", { type: "text", value: this.inputValue, placeholder: "0.00", onInput: (event) => this.handleInputChange(event) }), h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput ?
|
|
385
|
-
h("p", { class: "InvalidParagraph" }, !this.hasValidDecimalSeparator ? (translate('invalidDecimalSeparator', this.lang, { values: { currency: this.currency } })) : !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
399
|
+
h("div", null, h("hr", null), h("div", { class: "ModalFooter" }, h("div", { class: "Dropdown" }, h("p", null, translate('monthlyDeposit', this.lang, { values: { currency: this.currency } })), h("form", { onSubmit: (event) => this.handleSubmit(event) }, h("div", { class: "DropdownInput" }, h("input", { type: "number", value: this.inputValue, class: !this.invalidInput || this.invalidInput == undefined ? '' : "InvalidInput", placeholder: "0", onInput: (event) => this.handleInputChange(event) }), h("button", { disabled: this.isButtonDisabled }, translate('setLimit', this.lang, { values: { currency: this.currency } }))), this.invalidInput || !this.isWithinRange && this.invalidInput != undefined ?
|
|
400
|
+
h("p", { class: "InvalidParagraph" }, !this.isValidNumber ? (translate('invalidNumber', this.lang, { values: { currency: this.currency } })) : !this.isWithinRange ? (translate('outOfRange', this.lang, { values: { currency: this.currency, min: this.amountMinMax.split(',')[0], max: this.amountMinMax.split(',')[1] } })) : null)
|
|
386
401
|
: null))))
|
|
387
402
|
: null))));
|
|
388
403
|
}
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"stylingAppends":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"flow":[1],"amountMinMax":[1,"amount-min-max"],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"validation":[32],"kyc":[32],"dropDown":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"isButtonDisabled":[32],"crossProviders":[32],"invalidInput":[32],"userAmount":[32],"operatorDepositLimitAmount":[32],"regularDepositLimitAmount":[32],"stylingAppends":[32],"isWithinRange":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-d4aa7282.js";const n=["de","en"];let o={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit (of {currency} <b>{amount}</b>) ?",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},de:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit (of {currency} <b>{amount}</b>) ?",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."}};const a=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])o[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{const a=e;let s=o[void 0!==a&&n.includes(a)?a:"de"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},r=class{constructor(i){t(this,i),this.uploadDocuments=e(this,"uploadDocuments",7),this.closePopup=e(this,"closePopup",7),this.userId="",this.session="",this.endpoint="",this.currency="EUR",this.flow="",this.amountMinMax="",this.amount="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.validation=!0,this.dropDown=!1,this.isLoading=!1,this.hasErrors=!1,this.inputValue="",this.isButtonDisabled=!0,this.crossProviders=!1,this.invalidInput=!1,this.userAmount="",this.operatorDepositLimitAmount="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.postPlayerSituation=t=>{let e=new URL(`${this.endpoint}v1/player/${this.userId}/limit/lugas`),i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json",Authorization:`Bearer ${this.session}`},body:t?JSON.stringify({amount:`${t}`}):JSON.stringify({})};fetch(e.href,i).then((t=>{if(200===t.status)return t.json();throw this.crossProviders=!0,this.dropDown=!0,new Error("HTTP status "+t.status)})).then((t=>{this.kyc=t.popup,this.validation=!1,this.dropDown=!1,t.operatorDepositLimitAmount&&(this.operatorDepositLimitAmount=t.operatorDepositLimitAmount)})).catch((t=>{console.error(t)}))},this.handleClick=t=>{switch(t){case"postSituation":this.postPlayerSituation();break;case"setNewLimit":this.dropDown=!0;break;case"UploadDocuments":this.uploadDocuments.emit(),window.postMessage({type:"uploadDocuments"},window.location.href);break;case"Close":this.closePopup.emit(),window.postMessage({type:"closePopup"},window.location.href)}},this.setLimit=()=>{this.userAmount=this.inputValue,this.postPlayerSituation(this.userAmount)}}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}handleSubmit(t){t.preventDefault(),this.invalidInput||this.setLimit()}handleInputChange(t){const e=t.target.value;this.inputValue=e;let i=parseInt(this.amountMinMax.split(",")[0]),n=parseInt(this.amountMinMax.split(",")[1]);this.isValidNumber=!isNaN(Number(e)),this.isWithinRange=Number(e)>=i&&Number(e)<=n,this.hasValidDecimalSeparator=!/[',']/.test(e),this.isButtonDisabled=!this.isValidNumber||!this.isWithinRange||!this.hasValidDecimalSeparator,this.invalidInput=!this.isValidNumber||!this.isWithinRange||!this.hasValidDecimalSeparator}renderKYC(t){return 0==t?(this.closePopup.emit(),void window.postMessage({type:"closePopup"},window.location.href)):i("div",{class:"VallidatorContainer"},1==t?i("div",{class:"Paragraphs"},i("p",null,s("kycSure",this.lang,{values:{currency:this.currency}})),i("p",null,s("kyc1",this.lang,{values:{currency:this.currency}})),i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.postPlayerSituation(this.userAmount)},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("postSituation")},s("keepExistingLimit",this.lang,{values:{currency:this.currency}})))):2==t?i("div",{class:"Paragraphs"},i("p",null,s("kycThanks",this.lang,{values:{currency:this.currency}})),i("p",{innerHTML:s("kyc2",this.lang,{values:{currency:this.currency,amount:this.operatorDepositLimitAmount}})}),i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("Close")},s("Close",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("UploadDocuments")},s("UploadDocuments",this.lang,{values:{currency:this.currency}})))):i("div",{class:"Paragraphs"},i("p",null,s("kycThanks",this.lang,{values:{currency:this.currency}})),i("p",null,s("kyc3",this.lang,{values:{currency:this.currency}})),i("div",{class:"ContainerButtons"},i("button",{class:"SecondButton",onClick:()=>this.handleClick("Close")},s("Close",this.lang,{values:{currency:this.currency}})))))}renderValidator(t){return"1"==t?i("div",{class:"VallidatorContainer"},i("div",{class:"Paragraphs"},i("p",null,s("softMigrationP1",this.lang,{values:{currency:this.currency}})),i("p",{innerHTML:s("softMigrationP2",this.lang,{values:{currency:this.currency}})}),i("p",{innerHTML:s("softMigrationP3",this.lang,{values:{currency:this.currency,amount:this.amount}})})),this.crossProviders?i("div",{class:"CrossProvider"},i("svg",{width:"4",height:"17",viewBox:"0 0 4 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"4",height:"12",rx:"2",fill:"white"}),i("rect",{y:"14",width:"4",height:"3",rx:"1.5",fill:"white"})),i("p",null,s("crossProviders",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("setNewLimit")},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("postSituation")},s("confirm",this.lang,{values:{currency:this.currency}})))):"2"==t?i("div",{class:"VallidatorContainer"},i("div",{class:"Paragraphs"},i("p",null,s("newUserP1",this.lang,{values:{currency:this.currency}})),i("p",null,s("newUserP2",this.lang,{values:{currency:this.currency}})),i("p",null,s("newUserP3",this.lang,{values:{currency:this.currency}}))),this.crossProviders?i("div",{class:"CrossProvider"},i("svg",{width:"4",height:"17",viewBox:"0 0 4 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"4",height:"12",rx:"2",fill:"white"}),i("rect",{y:"14",width:"4",height:"3",rx:"1.5",fill:"white"})),i("p",null,s("crossProviders",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("setNewLimit")},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("postSituation")},s("keepExistingLimit",this.lang,{values:{currency:this.currency}})))):void 0}render(){let t=this.renderKYC(this.kyc),e=this.renderValidator(this.flow);return this.isLoading?i("div",null,i("p",null,s("loading",this.lang,{values:{currency:this.currency}}))):this.hasErrors?i("div",null,i("p",null,s("error",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ModalContainer",ref:t=>this.stylingContainer=t},i("div",{class:"Container"},i("div",{class:"ModalHeader"},i("svg",{width:"107",height:"20",viewBox:"0 0 107 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z",fill:"#7EC51E"}),i("path",{d:"M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z",fill:"#002554"}),i("path",{d:"M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z",fill:"#002554"}),i("path",{d:"M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z",fill:"#002554"}),i("path",{d:"M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z",fill:"#002554"}),i("path",{d:"M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z",fill:"#002554"}),i("path",{d:"M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z",fill:"#002554"}),i("path",{d:"M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z",fill:"#002554"}),i("path",{d:"M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z",fill:"#002554"}),i("path",{d:"M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z",fill:"#002554"}),i("path",{d:"M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z",fill:"#002554"}),i("path",{d:"M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z",fill:"#002554"}))),i("div",{class:"ModalBody"},this.validation?e:t,this.dropDown?i("div",null,i("hr",null),i("div",{class:"ModalFooter"},i("div",{class:"Dropdown"},i("p",null,s("monthlyDeposit",this.lang,{values:{currency:this.currency}})),i("form",{onSubmit:t=>this.handleSubmit(t)},i("div",{class:"DropdownInput"},i("input",this.invalidInput?{type:"text",value:this.inputValue,class:"InvalidInput",placeholder:"0.00",onInput:t=>this.handleInputChange(t)}:{type:"text",value:this.inputValue,placeholder:"0.00",onInput:t=>this.handleInputChange(t)}),i("button",{disabled:this.isButtonDisabled},s("setLimit",this.lang,{values:{currency:this.currency}}))),this.invalidInput?i("p",{class:"InvalidParagraph"},this.hasValidDecimalSeparator?this.isValidNumber?this.isWithinRange?null:s("outOfRange",this.lang,{values:{currency:this.currency,min:this.amountMinMax.split(",")[0],max:this.amountMinMax.split(",")[1]}}):s("invalidNumber",this.lang,{values:{currency:this.currency}}):s("invalidDecimalSeparator",this.lang,{values:{currency:this.currency}})):null)))):null)))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .VallidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .VallidatorContainer .CrossProvider {\n background-color: #404350;\n color: white;\n margin: 5px 0px;\n padding: 10px 15px;\n border-radius: 2px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .CrossProvider svg {\n position: absolute;\n width: 5px;\n height: 28px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .CrossProvider p {\n padding-left: 15px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .Paragraphs {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .Paragraphs p {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ModalContainer .ModalBody .VallidatorContainer .ContainerButtons .FirstButton {\n background-color: #ffffff;\n font-weight: bold;\n color: #002554;\n font-size: 10px;\n border: 2.5px solid #dee2e6;\n width: 100%;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .VallidatorContainer .ContainerButtons .SecondButton {\n background-color: #6BB816;\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: 10px;\n color: #ffffff;\n width: 100%;\n}\n.ModalContainer .ModalBody .VallidatorContainer .ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n.ModalContainer .ModalFooter {\n display: flex;\n justify-content: center;\n background-color: rgba(161, 156, 156, 0.11);\n margin: 5px 0px;\n}\n.ModalContainer .ModalFooter .Dropdown {\n background-color: white;\n padding: 8px;\n width: 100%;\n border: 1px solid #dee2e6;\n}\n.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {\n font-size: 10px;\n color: #FF0000;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput input {\n flex: 4;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button {\n padding: 2px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out 0s;\n flex: 1;\n font-size: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {\n background-color: #6BB816;\n color: #ffffff;\n font-weight: bold;\n border: none;\n border: 2.5px solid rgba(255, 255, 255, 0);\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {\n background-color: #ffffff;\n color: #002554;\n font-weight: bold;\n cursor: not-allowed;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {\n margin-left: 0px;\n display: flex;\n padding: 10px 0px;\n justify-content: center;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {\n border: 1px solid #FF0000;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}';export{r as player_lugas_limit}
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-d4aa7282.js";const n=["de","en"];let o={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit (of {currency} <b>{amount}</b>) ?",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},de:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to <b>{amount} {currency}</b>. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit (of {currency} <b>{amount}</b>) ?",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",kyc1:"All deposit limit changes must be reported to LUGAS in accordance with regulatory requirements. Please note that decreases in the limit will take effect immediately, while increases will only come into effect after 8 days at the latest.",kyc2:"We were able to set your monthly deposit limit to {amount}. For the selected limit, we require documents that show your economic capacity. Please upload your last payslip as well as a current bank statement, including the balance, that confirms that you received the payment.",kyc3:"We have transmitted your desired limit to Lugas Please be aware that the limit will only come into effect after 8 days at the latest.",kycThanks:"Thank you!",kycSure:"Are you sure?",setNewLimit:"SET NEW LIMIT",setLimit:"SET LIMIT",keepExistingLimit:"KEEP EXISTING LIMIT",Close:"CLOSE",UploadDocuments:"UPLOAD DOCUMENTS",confirm:"CONFIRM",crossProviders:"No cross-provider deposit limit (LUGAS) has been established yet, but there's no need to worry. Please enter a new deposit limit.",monthlyDeposit:"Monthly deposit limit (EUR)",newUserP1:"To start off, set your monthly limit!",newUserP2:"Having a deposit limit in place allows you to regulate your gaming activity. Once you have set your limit, it will be transmitted to the cross-provider limit database (LUGAS).",newUserP3:"If you have set a deposit limit with another provider before, you may maintain the existing limit.",softMigrationP1:"Set deposit limit",softMigrationP2:"According to legal regulations, players are required to set an individual monthly deposit limit or indicate that an already set deposit limit should be kept unchanged. Please note that the limit set should correspond to your financial situation. Consume gambling responsibly and adapt the gambling behavior to your individual circumstances!",softMigrationP3:"Do you want to set a new limit or confirm the existing limit ",invalidNumber:"Invalid number format. Please enter a valid number.",outOfRange:"The value entered must be between {min} and {max}.",invalidDecimalSeparator:"Invalid decimal separator. Please use a dot (.) instead of a comma (,)."}};const a=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])o[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{const a=e;let s=o[void 0!==a&&n.includes(a)?a:"de"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},r=class{constructor(i){t(this,i),this.uploadDocuments=e(this,"uploadDocuments",7),this.closePopup=e(this,"closePopup",7),this.userId="",this.session="",this.endpoint="",this.currency="EUR",this.flow="",this.amountMinMax="",this.amount="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.validation=!0,this.dropDown=!1,this.isLoading=!1,this.hasErrors=!1,this.inputValue="",this.isButtonDisabled=!0,this.crossProviders=!1,this.userAmount="",this.operatorDepositLimitAmount="",this.regularDepositLimitAmount="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.postPlayerSituation=(t,e=!1,i=!1)=>{let n=new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`),o={softMigration:"1"==this.flow,keepLimit:e,roleLimitAmount:i?this.amount:0};t&&(o.amount=`${t}`);let a={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json",Authorization:`Bearer ${this.session}`},body:JSON.stringify(o)};fetch(n.href,a).then((t=>{if(200===t.status)return t.json();throw this.crossProviders=!0,this.dropDown=!0,new Error("HTTP status "+t.status)})).then((t=>{this.kyc=t.popup,this.validation=!1,this.dropDown=!1,t.operatorDepositLimitAmount&&(this.operatorDepositLimitAmount=t.operatorDepositLimitAmount),t.regulatorDepositLimitAmount&&(this.regularDepositLimitAmount=t.regulatorDepositLimitAmount)})).catch((t=>{console.error(t)}))},this.handleClick=t=>{switch(t){case"keepCurrentLimit":this.postPlayerSituation(this.amount,!0);break;case"keepCurrentLimitNewUser":this.postPlayerSituation(null,!0);break;case"postSituation":this.postPlayerSituation();break;case"setNewLimit":this.dropDown=!0;break;case"UploadDocuments":this.uploadDocuments.emit(),window.postMessage({type:"uploadDocuments"},window.location.href);break;case"Close":this.closePopup.emit(),window.postMessage({type:"closePopup"},window.location.href)}}}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}handleSubmit(t){t.preventDefault(),this.invalidInput||(this.userAmount=this.inputValue,this.postPlayerSituation(this.inputValue,!1,!0))}containsOnlyDigits(t){return/^[0-9]+$/.test(t)}handleInputChange(t){const e=t.target.value;this.inputValue=e;let i=parseInt(this.amountMinMax.split(",")[0]),n=parseInt(this.amountMinMax.split(",")[1]);this.isValidNumber=!isNaN(Number(e))&&this.containsOnlyDigits(e),this.isButtonDisabled=!this.isValidNumber||!this.isWithinRange,this.invalidInput=!this.isValidNumber,this.isWithinRange=Number(e)>=i&&Number(e)<=n}renderKYC(t){return 0==t?(this.closePopup.emit(),void window.postMessage({type:"closePopup"},window.location.href)):i("div",{class:"ValidatorContainer"},1==t?i("div",{class:"Paragraphs"},i("p",null,s("kycSure",this.lang,{values:{currency:this.currency}})),i("p",null,s("kyc1",this.lang,{values:{currency:this.currency}})),i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.postPlayerSituation(this.userAmount,!1)},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("keepCurrentLimit")},s("keepExistingLimit",this.lang,{values:{currency:this.currency}})))):2==t?i("div",{class:"Paragraphs"},i("p",null,s("kycThanks",this.lang,{values:{currency:this.currency}})),i("p",{innerHTML:s("kyc2",this.lang,{values:{currency:this.currency,amount:this.regularDepositLimitAmount}})}),i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("Close")},s("Close",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("UploadDocuments")},s("UploadDocuments",this.lang,{values:{currency:this.currency}})))):i("div",{class:"Paragraphs"},i("p",null,s("kycThanks",this.lang,{values:{currency:this.currency}})),i("p",null,s("kyc3",this.lang,{values:{currency:this.currency}})),i("div",{class:"ContainerButtons"},i("button",{class:"SecondButton",onClick:()=>this.handleClick("Close")},s("Close",this.lang,{values:{currency:this.currency}})))))}renderValidator(t){return"1"==t?i("div",{class:"ValidatorContainer"},i("div",{class:"Paragraphs"},i("p",null,s("softMigrationP1",this.lang,{values:{currency:this.currency}})),i("p",{innerHTML:s("softMigrationP2",this.lang,{values:{currency:this.currency}})}),i("p",{innerHTML:s("softMigrationP3",this.lang,{values:{currency:this.currency,amount:this.amount}})})),this.crossProviders?i("div",{class:"CrossProvider"},i("svg",{width:"4",height:"17",viewBox:"0 0 4 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"4",height:"12",rx:"2",fill:"white"}),i("rect",{y:"14",width:"4",height:"3",rx:"1.5",fill:"white"})),i("p",null,s("crossProviders",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("setNewLimit")},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("keepCurrentLimit")},s("confirm",this.lang,{values:{currency:this.currency}})))):"2"==t?i("div",{class:"ValidatorContainer"},i("div",{class:"Paragraphs"},i("p",null,s("newUserP1",this.lang,{values:{currency:this.currency}})),i("p",null,s("newUserP2",this.lang,{values:{currency:this.currency}})),i("p",null,s("newUserP3",this.lang,{values:{currency:this.currency}}))),this.crossProviders?i("div",{class:"CrossProvider"},i("svg",{width:"4",height:"17",viewBox:"0 0 4 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("rect",{width:"4",height:"12",rx:"2",fill:"white"}),i("rect",{y:"14",width:"4",height:"3",rx:"1.5",fill:"white"})),i("p",null,s("crossProviders",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ContainerButtons"},i("button",{class:"FirstButton",onClick:()=>this.handleClick("setNewLimit")},s("setNewLimit",this.lang,{values:{currency:this.currency}})),i("button",{class:"SecondButton",onClick:()=>this.handleClick("keepCurrentLimitNewUser")},s("keepExistingLimit",this.lang,{values:{currency:this.currency}})))):void 0}render(){let t=this.renderKYC(this.kyc),e=this.renderValidator(this.flow);return this.isLoading?i("div",null,i("p",null,s("loading",this.lang,{values:{currency:this.currency}}))):this.hasErrors?i("div",null,i("p",null,s("error",this.lang,{values:{currency:this.currency}}))):i("div",{class:"ModalContainer",ref:t=>this.stylingContainer=t},i("div",{class:"Container"},i("div",{class:"ModalHeader"},i("svg",{width:"107",height:"20",viewBox:"0 0 107 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M2.7948 17.4348C10.9082 18.9412 30.1923 20.0001 52.698 20.0001C75.2036 20.0001 94.4729 18.9412 102.601 17.4348H2.7948Z",fill:"#7EC51E"}),i("path",{d:"M66.4489 3.87771H64.1074L64.7934 0L60.7815 1.37211L58.3505 14.9143H62.1089L63.481 7.308C63.5705 6.84565 63.7942 6.65177 64.1969 6.65177H64.5697C64.9426 6.65177 65.0917 6.80091 65.0321 7.14394L63.6301 14.9292H67.4034L68.8949 6.63685C69.1931 4.95154 68.5518 3.87771 66.4489 3.87771Z",fill:"#002554"}),i("path",{d:"M93.0858 3.87769H92.6831H85.3901H81.6913L79.6928 14.9143H83.4512L84.8233 7.30797C84.9128 6.84563 85.1365 6.65174 85.5392 6.65174H85.9121C86.2849 6.65174 86.4341 6.80088 86.3744 7.14391L84.9725 14.9292H88.7309L90.103 7.32288C90.1925 6.86054 90.4162 6.66666 90.8189 6.66666H91.1917C91.5646 6.66666 91.7137 6.8158 91.6541 7.15883L90.2521 14.9441H94.0105L95.5019 6.65174C95.8301 4.95151 95.1887 3.87769 93.0858 3.87769Z",fill:"#002554"}),i("path",{d:"M51.9523 10.6639H57.0828L57.5302 8.11353H52.3997L51.9523 10.6639Z",fill:"#002554"}),i("path",{d:"M51.2363 1.34229L47.2244 2.7144L45.5093 12.1701C45.211 13.8255 45.897 14.9143 48.2684 14.9143H50.1476L50.6398 12.1551H49.8195C49.4466 12.1551 49.2975 12.006 49.3571 11.663L50.3266 6.42805H51.6689L52.1163 3.87771H50.7889L51.2363 1.34229Z",fill:"#002554"}),i("path",{d:"M27.2095 1.34229L23.1976 2.7144L21.4825 12.1701C21.1842 13.8255 21.8702 14.9143 24.2416 14.9143H26.1208L26.613 12.1551H25.7927C25.4198 12.1551 25.2707 12.006 25.3303 11.663L26.2998 6.42805H27.6421L28.0895 3.87771H26.7621L27.2095 1.34229Z",fill:"#002554"}),i("path",{d:"M27.8807 10.6639H33.0112L33.4736 8.11353H28.3431L27.8807 10.6639Z",fill:"#002554"}),i("path",{d:"M7.6569 3.87771H5.31536L6.01633 0L2.00439 1.37211L0.169932 11.5735L0.0655323 12.1701C-0.232753 13.8255 0.453304 14.9143 2.82467 14.9143H5.65839C7.7613 14.9143 8.79039 13.8255 9.08867 12.1701L10.0879 6.62194C10.4011 4.95154 9.75981 3.87771 7.6569 3.87771ZM6.25496 7.12903L5.43467 11.663C5.37502 11.9911 5.16622 12.1551 4.79336 12.1551H4.4205C4.01782 12.1551 3.85376 11.9613 3.94324 11.4989L4.70387 7.32291C4.79336 6.86057 5.01707 6.66668 5.41976 6.66668H5.79262C6.16547 6.63685 6.31461 6.786 6.25496 7.12903Z",fill:"#002554"}),i("path",{d:"M76.8891 3.87769H74.0852C71.7138 3.87769 70.7444 4.96643 70.4461 6.62191L69.4468 12.17C69.1486 13.8255 69.7302 14.9143 72.0867 14.9143H74.8906C77.2619 14.9143 78.2313 13.8255 78.5296 12.17L79.5289 6.62191C79.8421 4.95151 79.2604 3.87769 76.8891 3.87769ZM75.7854 6.96494L74.9055 11.8121C74.8458 12.1402 74.637 12.3043 74.2641 12.3043H73.6676C73.2947 12.3043 73.1456 12.1551 73.2052 11.8121L74.0852 6.96494C74.1448 6.63683 74.3536 6.47277 74.7265 6.47277H75.3231C75.6959 6.47277 75.8451 6.63683 75.7854 6.96494Z",fill:"#002554"}),i("path",{d:"M18.082 3.87769H15.3825C13.0111 3.87769 11.9373 4.96643 11.639 6.62191L10.6398 12.17C10.3415 13.8255 11.0275 14.9143 13.3989 14.9143H16.0984C18.4697 14.9143 19.5436 13.8255 19.8419 12.17L19.991 11.3796H16.4265L16.3519 11.7972C16.2923 12.1253 16.0835 12.3341 15.6957 12.3341H14.7263C14.3534 12.3341 14.2043 12.1849 14.2639 11.8419L14.4727 10.6637H20.1103L20.4832 8.62043L20.8411 6.62191C21.1394 4.95151 20.4384 3.87769 18.082 3.87769ZM17.2169 6.95003L17.0081 8.12825H14.9351L15.1439 6.95003C15.2035 6.62191 15.4123 6.45786 15.7852 6.45786H16.7546C17.1275 6.45786 17.2766 6.607 17.2169 6.95003Z",fill:"#002554"}),i("path",{d:"M42.2133 3.87769H39.5138C37.1424 3.87769 36.0686 4.96643 35.7703 6.62191L35.6212 7.41237H39.1857L39.2602 6.99477C39.3199 6.66666 39.5287 6.45786 39.9165 6.45786H40.8859C41.2588 6.45786 41.4079 6.607 41.3482 6.95003L41.1394 8.12825H37.0828C36.2028 8.12825 35.3676 8.82923 35.2185 9.70917L35.0842 10.4101L34.771 12.17C34.4728 13.8255 35.1588 14.9143 37.5302 14.9143H43.4959L44.9873 6.62191C45.2707 4.95151 44.5846 3.87769 42.2133 3.87769ZM40.4683 11.827C40.4086 12.1551 40.1998 12.3192 39.827 12.3192H38.8576C38.4847 12.3192 38.3356 12.17 38.3952 11.827L38.604 10.6488H40.6771L40.4683 11.827Z",fill:"#002554"}),i("path",{d:"M103.63 3.87769H100.931C98.5593 3.87769 97.4855 4.96643 97.1872 6.62191L96.1879 12.17C95.8896 13.8255 96.5757 14.9143 98.947 14.9143H101.647C104.018 14.9143 105.092 13.8255 105.39 12.17L105.539 11.3796H101.975L101.9 11.7972C101.84 12.1253 101.632 12.3341 101.259 12.3341H100.289C99.9165 12.3341 99.7673 12.1849 99.827 11.8419L100.036 10.6637H105.673L106.046 8.62043L106.404 6.62191C106.688 4.95151 106.002 3.87769 103.63 3.87769ZM102.765 6.95003L102.556 8.12825H100.483L100.692 6.95003C100.752 6.62191 100.96 6.45786 101.333 6.45786H102.303C102.676 6.45786 102.825 6.607 102.765 6.95003Z",fill:"#002554"}))),i("div",{class:"ModalBody"},this.validation?e:t,this.dropDown?i("div",null,i("hr",null),i("div",{class:"ModalFooter"},i("div",{class:"Dropdown"},i("p",null,s("monthlyDeposit",this.lang,{values:{currency:this.currency}})),i("form",{onSubmit:t=>this.handleSubmit(t)},i("div",{class:"DropdownInput"},i("input",{type:"number",value:this.inputValue,class:this.invalidInput&&null!=this.invalidInput?"InvalidInput":"",placeholder:"0",onInput:t=>this.handleInputChange(t)}),i("button",{disabled:this.isButtonDisabled},s("setLimit",this.lang,{values:{currency:this.currency}}))),this.invalidInput||!this.isWithinRange&&null!=this.invalidInput?i("p",{class:"InvalidParagraph"},this.isValidNumber?this.isWithinRange?null:s("outOfRange",this.lang,{values:{currency:this.currency,min:this.amountMinMax.split(",")[0],max:this.amountMinMax.split(",")[1]}}):s("invalidNumber",this.lang,{values:{currency:this.currency}})):null)))):null)))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n container-type: inline-size;\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 25%;\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n border-radius: 4px;\n transform: scale(1.1);\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n border-radius: 4px 4px 0px 0px;\n padding: 10px;\n}\n.ModalContainer .ModalBody {\n background: #F5F6F6;\n padding: 16px 10px 10px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 12px 0px;\n}\n.ModalContainer .ModalBody p {\n margin: 0;\n}\n.ModalContainer .ModalBody .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider {\n background-color: #404350;\n color: white;\n margin: 5px 0px;\n padding: 10px 15px;\n border-radius: 2px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider svg {\n position: absolute;\n width: 5px;\n height: 28px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .CrossProvider p {\n padding-left: 15px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .Paragraphs p {\n padding: 5px 0px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons {\n display: flex;\n justify-content: space-around;\n gap: 10px;\n padding-top: 5px;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .FirstButton {\n background-color: #ffffff;\n font-weight: bold;\n color: #002554;\n font-size: 10px;\n border: 2.5px solid #dee2e6;\n width: 100%;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons .SecondButton {\n background-color: #6BB816;\n border: none;\n cursor: pointer;\n font-weight: bold;\n font-size: 10px;\n color: #ffffff;\n width: 100%;\n}\n.ModalContainer .ModalBody .ValidatorContainer .ContainerButtons button {\n width: 240px;\n height: 30px;\n}\n.ModalContainer .ModalFooter {\n display: flex;\n justify-content: center;\n background-color: rgba(161, 156, 156, 0.11);\n margin: 5px 0px;\n}\n.ModalContainer .ModalFooter .Dropdown {\n background-color: white;\n padding: 8px;\n width: 100%;\n border: 1px solid #dee2e6;\n}\n.ModalContainer .ModalFooter .Dropdown .InvalidParagraph {\n font-size: 10px;\n color: #FF0000;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput {\n display: flex;\n flex-direction: row;\n width: 100%;\n gap: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput input {\n flex: 4;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button {\n padding: 2px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out 0s;\n flex: 1;\n font-size: 10px;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:enabled {\n background-color: #6BB816;\n color: #ffffff;\n font-weight: bold;\n border: none;\n border: 2.5px solid rgba(255, 255, 255, 0);\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput button:disabled {\n background-color: #ffffff;\n color: #002554;\n font-weight: bold;\n cursor: not-allowed;\n border: 1px solid #E3E3E3;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput:first-child {\n margin-left: 0px;\n display: flex;\n padding: 10px 0px;\n justify-content: center;\n}\n.ModalContainer .ModalFooter .Dropdown .DropdownInput .InvalidInput {\n border: 1px solid #FF0000;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}';export{r as player_lugas_limit}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as i,b as n}from"./p-d4aa7282.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),i(t)})().then((i=>n([["p-dae2a02f",[[1,"player-lugas-limit",{userId:[1,"user-id"],session:[1],endpoint:[1],currency:[1],flow:[1],amountMinMax:[1,"amount-min-max"],amount:[1],lang:[1],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],validation:[32],kyc:[32],dropDown:[32],isLoading:[32],hasErrors:[32],inputValue:[32],isButtonDisabled:[32],crossProviders:[32],invalidInput:[32],userAmount:[32],operatorDepositLimitAmount:[32],regularDepositLimitAmount:[32],stylingAppends:[32],isWithinRange:[32]}]]]],i)));
|
|
@@ -37,7 +37,7 @@ export declare class PlayerLugasLimit {
|
|
|
37
37
|
*/
|
|
38
38
|
clientStyling: string;
|
|
39
39
|
/**
|
|
40
|
-
* Client custom styling via url
|
|
40
|
+
* Client custom styling via url
|
|
41
41
|
*/
|
|
42
42
|
clientStylingUrl: string;
|
|
43
43
|
/**
|
|
@@ -55,9 +55,10 @@ export declare class PlayerLugasLimit {
|
|
|
55
55
|
invalidInput: boolean;
|
|
56
56
|
userAmount: string;
|
|
57
57
|
operatorDepositLimitAmount: string;
|
|
58
|
+
regularDepositLimitAmount: string;
|
|
58
59
|
private stylingAppends;
|
|
59
|
-
isValidNumber: boolean;
|
|
60
60
|
isWithinRange: boolean;
|
|
61
|
+
isValidNumber: boolean;
|
|
61
62
|
hasValidDecimalSeparator: boolean;
|
|
62
63
|
private stylingContainer;
|
|
63
64
|
/**
|
|
@@ -70,10 +71,10 @@ export declare class PlayerLugasLimit {
|
|
|
70
71
|
componentWillLoad(): Promise<void>;
|
|
71
72
|
setClientStyling: () => void;
|
|
72
73
|
setClientStylingURL: () => void;
|
|
73
|
-
postPlayerSituation: (userAmount?: any) => void;
|
|
74
|
+
postPlayerSituation: (userAmount?: any, keepLimit?: boolean, initialNewLimit?: boolean) => void;
|
|
74
75
|
handleClick: (input: string) => void;
|
|
75
76
|
handleSubmit(event: Event): void;
|
|
76
|
-
|
|
77
|
+
containsOnlyDigits(input: any): boolean;
|
|
77
78
|
handleInputChange(event: Event): void;
|
|
78
79
|
renderKYC(step: any): any;
|
|
79
80
|
renderValidator(input: any): any;
|
|
@@ -20,7 +20,7 @@ export namespace Components {
|
|
|
20
20
|
*/
|
|
21
21
|
"clientStyling": string;
|
|
22
22
|
/**
|
|
23
|
-
* Client custom styling via url
|
|
23
|
+
* Client custom styling via url
|
|
24
24
|
*/
|
|
25
25
|
"clientStylingUrl": string;
|
|
26
26
|
/**
|
|
@@ -79,7 +79,7 @@ declare namespace LocalJSX {
|
|
|
79
79
|
*/
|
|
80
80
|
"clientStyling"?: string;
|
|
81
81
|
/**
|
|
82
|
-
* Client custom styling via url
|
|
82
|
+
* Client custom styling via url
|
|
83
83
|
*/
|
|
84
84
|
"clientStylingUrl"?: string;
|
|
85
85
|
/**
|