@everymatrix/general-player-register-form 1.76.0 → 1.76.3
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/components/{GeneralPlayerRegisterForm-VNsNOggD.js → GeneralPlayerRegisterForm-BeZZtEAq.js} +928 -963
- package/components/GeneralPlayerRegisterForm-Bl5rwaJV.cjs +18 -0
- package/components/{GeneralPlayerRegisterForm-iR8TAIDo.js → GeneralPlayerRegisterForm-Q4stLWNr.js} +953 -988
- package/components/{GeneralPlayerRegisterFormStep1-BKf3xyhy.js → GeneralPlayerRegisterFormStep1-1ANwL_Ah.js} +33 -33
- package/components/{GeneralPlayerRegisterFormStep1-S9uu6fXP.cjs → GeneralPlayerRegisterFormStep1-BLEsV23h.cjs} +1 -1
- package/components/{GeneralPlayerRegisterFormStep1-DJmln0eL.js → GeneralPlayerRegisterFormStep1-GNsfdcKk.js} +31 -31
- package/components/{GeneralPlayerRegisterFormStep2-DeVvewUO.js → GeneralPlayerRegisterFormStep2-5ffQp5bV.js} +1014 -1012
- package/components/{GeneralPlayerRegisterFormStep2-ChrULO9z.js → GeneralPlayerRegisterFormStep2-CtErjym9.js} +1003 -1001
- package/components/GeneralPlayerRegisterFormStep2-DGveqfYm.cjs +2 -0
- package/components/{GeneralPlayerRegisterFormStep3-DA6HVSPY.cjs → GeneralPlayerRegisterFormStep3-Bw45W0BF.cjs} +1 -1
- package/components/{GeneralPlayerRegisterFormStep3-D888_eAx.js → GeneralPlayerRegisterFormStep3-S-NRbZka.js} +14 -14
- package/components/{GeneralPlayerRegisterFormStep3-BhHPqyZu.js → GeneralPlayerRegisterFormStep3-lrnipSOp.js} +14 -14
- package/components/{GeneralPlayerSmsVerificationForm-BUWfKH0q.js → GeneralPlayerSmsVerificationForm-CTTloPuI.js} +25 -25
- package/components/{GeneralPlayerSmsVerificationForm-A5WieYXi.cjs → GeneralPlayerSmsVerificationForm-DC_4qENQ.cjs} +1 -1
- package/components/{GeneralPlayerSmsVerificationForm-Bmuohr4j.js → GeneralPlayerSmsVerificationForm-DYarlVYo.js} +25 -25
- package/es2015/general-player-register-form.cjs +1 -1
- package/es2015/general-player-register-form.js +1 -1
- package/esnext/general-player-register-form.js +1 -1
- package/package.json +1 -1
- package/components/GeneralPlayerRegisterForm-DsNh6Be0.cjs +0 -18
- package/components/GeneralPlayerRegisterFormStep2-DugKV0ur.cjs +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as kr, G as Wr, a as Gr, S as Vr, i as Kr,
|
|
1
|
+
import { $ as kr, G as Wr, a as Gr, S as Vr, i as Kr, f as se, c as Qr, s as Jr, b as Zr, C as Ke, E as _r, d as h, e as u, y as gr, t as M, g as l, A as Cr, j as s, h as B, k as $, B as Qe, l as P, m as z, n as vr, o as O, D as hr, r as Xr, p as Yr, q as $r, H as Er, F as br, u as et, v as rt, w as tt, x as st, z as it } from "./GeneralPlayerRegisterForm-BeZZtEAq.js";
|
|
2
2
|
function ot({ withLocale: t, translations: r }) {
|
|
3
3
|
kr.subscribe((e) => {
|
|
4
4
|
e == null && (Wr.set(r), kr.set(t));
|
|
@@ -203,7 +203,7 @@ const Mr = {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
function at(t) {
|
|
206
|
-
|
|
206
|
+
Zr(t, "svelte-ftqinq", `.BackButton{display:inline-flex;color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A));height:15px;border-radius:5px;border:none;background:transparent;padding:0;text-transform:uppercase;font-size:22px;cursor:pointer;margin-bottom:30px}.BackButton svg{width:20px;height:20px;margin-right:20px;fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressPostalCodeContainer{display:flex;gap:16px}.CountryContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.CountryContainer select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--color-white, #FFFFFF);background-position:calc(100% - 0.75rem) center}.CountryContainer select:focus,.CountryContainer select :focus-within,.CountryContainer select :focus-visible,.CountryContainer select :visited{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));box-shadow:0 0 0 1pt var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressContainer,.PostalCodeContainer,.CityContainer,.CountryContainer,.NationalityContainer,.MobileContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.AddressContainer label,.PostalCodeContainer label,.CityContainer label,.CountryContainer label,.NationalityContainer label,.MobileContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.AddressContainer input,.AddressContainer select,.PostalCodeContainer input,.PostalCodeContainer select,.CityContainer input,.CityContainer select,.CountryContainer input,.CountryContainer select,.NationalityContainer input,.NationalityContainer select,.MobileContainer input,.MobileContainer select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.AddressContainer.InvalidField input,.PostalCodeContainer.InvalidField input,.CityContainer.InvalidField input,.CountryContainer.InvalidField input,.NationalityContainer.InvalidField input,.MobileContainer.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressContainer.Hidden,.PostalCodeContainer.Hidden,.CityContainer.Hidden,.CountryContainer.Hidden,.NationalityContainer.Hidden,.MobileContainer.Hidden{display:none}.AddressContainer{width:65%}.PostalCodeContainer{width:35%}.MobileWrapper{display:flex;gap:16px}.MobileWrapper .MobilePrefixSelected{width:30%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--color-white, #FFFFFF);background-position:calc(100% - 0.75rem) center}.MobileWrapper .MobilePrefixSelected:focus,.MobileWrapper .MobilePrefixSelected :focus-within,.MobileWrapper .MobilePrefixSelected :focus-visible,.MobileWrapper .MobilePrefixSelected :visited{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));box-shadow:0 0 0 1pt var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.MobileWrapper .MobileInput{width:70%}.grecaptcha-badge{opacity:0}.FormRequired{color:var(--emw--color-secondary, #FD2839)}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.OffersMethodsWrapper{padding-left:32px}.Offers,.OffersMethod,.AgeConsent{display:block;position:relative;padding:5px 0 0 35px;margin-bottom:16px;font-size:16px;user-select:none;line-height:18px}.Offers label,.OffersMethod label,.AgeConsent label{font-size:16px;cursor:pointer}.Offers input,.OffersMethod input,.AgeConsent input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Offers .Checkmark,.OffersMethod .Checkmark,.AgeConsent .Checkmark{position:absolute;top:0;left:0;height:25px;width:25px;background-color:var(--emw--color-gray-100, #E6E6E6);border-radius:50%}.Offers input:checked~.Checkmark,.OffersMethod input:checked~.Checkmark,.AgeConsent input:checked~.Checkmark{background-color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Offers .Checkmark:after,.OffersMethod .Checkmark:after,.AgeConsent .Checkmark:after{content:"";position:absolute;display:none;left:9px;top:5px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;transform:rotate(45deg)}.Offers input:checked~.Checkmark:after,.OffersMethod input:checked~.Checkmark:after,.AgeConsent input:checked~.Checkmark:after{display:block}.NotificationContainer{margin-top:32px}.NotificationContainer p{color:var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));font-size:14px}.RegisterError{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:16px;line-height:18px}.RegisterStepNext{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.RegisterStepNext[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}`);
|
|
207
207
|
}
|
|
208
208
|
function Ar(t, r, e) {
|
|
209
209
|
const n = t.slice();
|
|
@@ -691,17 +691,17 @@ function lt(t) {
|
|
|
691
691
|
(t[9] && /*cityFocus*/
|
|
692
692
|
t[13] ? "InvalidField" : "") + /*disabledFieldsList*/
|
|
693
693
|
(t[14]?.indexOf("city") >= 0 ? "Hidden" : "")), l(Oe, "class", "FormRequired"), l(he, "for", "Country"), l(ae, "id", "Country"), /*countrySelected*/
|
|
694
|
-
t[21] === void 0 &&
|
|
694
|
+
t[21] === void 0 && Cr(() => (
|
|
695
695
|
/*select0_change_handler*/
|
|
696
696
|
t[58].call(ae)
|
|
697
697
|
)), l(Ce, "class", Te = "CountryContainer " + /*disabledFieldsList*/
|
|
698
698
|
(t[14]?.indexOf("country") >= 0 ? "Hidden" : "")), l(xe, "class", "FormRequired"), l(ye, "for", "Nationality"), l(le, "id", "Nationality"), /*nationalitySelected*/
|
|
699
|
-
t[23] === void 0 &&
|
|
699
|
+
t[23] === void 0 && Cr(() => (
|
|
700
700
|
/*select1_change_handler*/
|
|
701
701
|
t[59].call(le)
|
|
702
702
|
)), l(me, "class", He = "NationalityContainer " + /*disabledFieldsList*/
|
|
703
703
|
(t[14]?.indexOf("nationality") >= 0 ? "Hidden" : "")), l(Re, "class", "FormRequired"), l(ve, "for", "Mobile"), l(ce, "class", "MobilePrefixSelected"), /*mobilePrefixSelected*/
|
|
704
|
-
t[26] === void 0 &&
|
|
704
|
+
t[26] === void 0 && Cr(() => (
|
|
705
705
|
/*select2_change_handler*/
|
|
706
706
|
t[60].call(ce)
|
|
707
707
|
)), l(q, "type", "text"), l(q, "oninput", "this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\\..*)\\./g, '$1');"), l(q, "id", "Mobile"), l(q, "class", "MobileInput"), l(Ee, "class", "MobileWrapper"), l(oe, "class", Le = "MobileContainer " + /*invalidMobile*/
|
|
@@ -1021,13 +1021,13 @@ function lt(t) {
|
|
|
1021
1021
|
i: vr,
|
|
1022
1022
|
o: vr,
|
|
1023
1023
|
d(o) {
|
|
1024
|
-
o && (O(e), O(n), O(a), O(i)), V && V.d(o), O(r), K && K.d(), Q && Q.d(), J && J.d(),
|
|
1024
|
+
o && (O(e), O(n), O(a), O(i)), V && V.d(o), O(r), K && K.d(), Q && Q.d(), J && J.d(), hr(R, o), hr(L, o), hr(D, o), Z && Z.d(), X && X.d(), Y && Y.d(), t[69](null), pr = !1, Xr(yr);
|
|
1025
1025
|
}
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
1028
|
function ct(t, r, e) {
|
|
1029
1029
|
let n;
|
|
1030
|
-
|
|
1030
|
+
Yr(t, it, (c) => e(31, n = c));
|
|
1031
1031
|
let { userconsentsexist: a = "false" } = r, { termsconditions: i = "false" } = r, { smsoffers: f = "false" } = r, { emailmarketing: S = "false" } = r, { endpoint: y = "" } = r, { captchakey: T = "" } = r, { lang: v = "" } = r, { disabledfields: k = "" } = r, { defaultoptions: w = "" } = r, { mbsource: A } = r, { clientstyling: C = "" } = r, { clientstylingurl: _ = "" } = r, { translationurl: F = "" } = r, E, de, W, ue, ke = !1, Me = !1, Fe = !1, _e = !1, Je, I, Ze = !1, Ae = "", fe = "", U = "", G = "", ge = [], ie = "", Pe = [], ee = "", ne = "", x = [], re = "", H = !1, Ne = !1, N, d = { mobile: {}, userConsents: {} }, b = {
|
|
1032
1032
|
address1: !1,
|
|
1033
1033
|
postalCode: !1,
|
|
@@ -1149,7 +1149,7 @@ function ct(t, r, e) {
|
|
|
1149
1149
|
}, xe = () => {
|
|
1150
1150
|
nt(v);
|
|
1151
1151
|
};
|
|
1152
|
-
|
|
1152
|
+
$r(() => (window.addEventListener("message", Be, !1), () => {
|
|
1153
1153
|
window.removeEventListener("message", Be);
|
|
1154
1154
|
}));
|
|
1155
1155
|
function ar() {
|
|
@@ -1178,7 +1178,7 @@ function ct(t, r, e) {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
const ur = () => e(12, Fe = !0), q = () => e(12, Fe = !1), fr = () => Se("GeneralOffers"), Le = () => Se("SmsOffers"), mr = () => Se("EmailOffers"), rr = () => Te(), be = (c) => me(c);
|
|
1180
1180
|
function De(c) {
|
|
1181
|
-
|
|
1181
|
+
et[c ? "unshift" : "push"](() => {
|
|
1182
1182
|
N = c, e(5, N);
|
|
1183
1183
|
});
|
|
1184
1184
|
}
|
|
@@ -1192,11 +1192,11 @@ function ct(t, r, e) {
|
|
|
1192
1192
|
4096 && k && $e(), t.$$.dirty[1] & /*defaultoptions*/
|
|
1193
1193
|
8192 && w && nr(), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1194
1194
|
32 | t.$$.dirty[1] & /*clientstyling*/
|
|
1195
|
-
32768 && C && N &&
|
|
1195
|
+
32768 && C && N && rt(N, C), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1196
1196
|
32 | t.$$.dirty[1] & /*clientstylingurl*/
|
|
1197
|
-
65536 && _ && N &&
|
|
1197
|
+
65536 && _ && N && tt(N, _), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1198
1198
|
32 | t.$$.dirty[1] & /*mbsource*/
|
|
1199
|
-
16384 && A && N &&
|
|
1199
|
+
16384 && A && N && st(N, `${A}.Style`), t.$$.dirty[1] & /*translationurl*/
|
|
1200
1200
|
131072 && F && Xe(), t.$$.dirty[0] & /*userconsentsexist, termsconditions*/
|
|
1201
1201
|
3 && a && e(30, b.termsandconditions = i === "false", b);
|
|
1202
1202
|
}, [
|
|
@@ -1279,7 +1279,7 @@ class dt extends Vr {
|
|
|
1279
1279
|
r,
|
|
1280
1280
|
ct,
|
|
1281
1281
|
lt,
|
|
1282
|
-
|
|
1282
|
+
Jr,
|
|
1283
1283
|
{
|
|
1284
1284
|
userconsentsexist: 0,
|
|
1285
1285
|
termsconditions: 1,
|
|
@@ -1378,7 +1378,7 @@ class dt extends Vr {
|
|
|
1378
1378
|
this.$$set({ translationurl: r }), se();
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1381
|
+
Qr(dt, { userconsentsexist: {}, termsconditions: {}, smsoffers: {}, emailmarketing: {}, endpoint: {}, captchakey: {}, lang: {}, disabledfields: {}, defaultoptions: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
1382
1382
|
export {
|
|
1383
1383
|
dt as default
|
|
1384
1384
|
};
|
|
@@ -10,7 +10,7 @@ var Sr = (t, r, e) => r in t ? et(t, r, { enumerable: !0, configurable: !0, writ
|
|
|
10
10
|
it.call(r, e) && Sr(t, e, r[e]);
|
|
11
11
|
return t;
|
|
12
12
|
}, Br = (t, r) => rt(t, tt(r));
|
|
13
|
-
import { $ as wr, G as ot, a as nt, S as at, i as lt,
|
|
13
|
+
import { $ as wr, G as ot, a as nt, S as at, i as lt, f as oe, c as ct, s as dt, b as ut, C as Je, E as Mr, d as h, e as u, y as kr, t as M, g as l, A as yr, j as s, h as B, k as re, B as Ze, l as P, m as j, n as Fr, o as O, D as vr, r as ft, p as mt, q as gt, H as Nr, F as Er, u as pt, v as Ct, w as ht, x as bt, z as kt } from "./GeneralPlayerRegisterForm-Q4stLWNr.js";
|
|
14
14
|
function _t({ withLocale: t, translations: r }) {
|
|
15
15
|
wr.subscribe((e) => {
|
|
16
16
|
e == null && (ot.set(r), wr.set(t));
|
|
@@ -215,7 +215,7 @@ const jr = {
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
function vt(t) {
|
|
218
|
-
|
|
218
|
+
ut(t, "svelte-ftqinq", `.BackButton{display:inline-flex;color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A));height:15px;border-radius:5px;border:none;background:transparent;padding:0;text-transform:uppercase;font-size:22px;cursor:pointer;margin-bottom:30px}.BackButton svg{width:20px;height:20px;margin-right:20px;fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressPostalCodeContainer{display:flex;gap:16px}.CountryContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.CountryContainer select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--color-white, #FFFFFF);background-position:calc(100% - 0.75rem) center}.CountryContainer select:focus,.CountryContainer select :focus-within,.CountryContainer select :focus-visible,.CountryContainer select :visited{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));box-shadow:0 0 0 1pt var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressContainer,.PostalCodeContainer,.CityContainer,.CountryContainer,.NationalityContainer,.MobileContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.AddressContainer label,.PostalCodeContainer label,.CityContainer label,.CountryContainer label,.NationalityContainer label,.MobileContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.AddressContainer input,.AddressContainer select,.PostalCodeContainer input,.PostalCodeContainer select,.CityContainer input,.CityContainer select,.CountryContainer input,.CountryContainer select,.NationalityContainer input,.NationalityContainer select,.MobileContainer input,.MobileContainer select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.AddressContainer.InvalidField input,.PostalCodeContainer.InvalidField input,.CityContainer.InvalidField input,.CountryContainer.InvalidField input,.NationalityContainer.InvalidField input,.MobileContainer.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.AddressContainer.Hidden,.PostalCodeContainer.Hidden,.CityContainer.Hidden,.CountryContainer.Hidden,.NationalityContainer.Hidden,.MobileContainer.Hidden{display:none}.AddressContainer{width:65%}.PostalCodeContainer{width:35%}.MobileWrapper{display:flex;gap:16px}.MobileWrapper .MobilePrefixSelected{width:30%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emw--color-white, #FFFFFF);background-position:calc(100% - 0.75rem) center}.MobileWrapper .MobilePrefixSelected:focus,.MobileWrapper .MobilePrefixSelected :focus-within,.MobileWrapper .MobilePrefixSelected :focus-visible,.MobileWrapper .MobilePrefixSelected :visited{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));box-shadow:0 0 0 1pt var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.MobileWrapper .MobileInput{width:70%}.grecaptcha-badge{opacity:0}.FormRequired{color:var(--emw--color-secondary, #FD2839)}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.OffersMethodsWrapper{padding-left:32px}.Offers,.OffersMethod,.AgeConsent{display:block;position:relative;padding:5px 0 0 35px;margin-bottom:16px;font-size:16px;user-select:none;line-height:18px}.Offers label,.OffersMethod label,.AgeConsent label{font-size:16px;cursor:pointer}.Offers input,.OffersMethod input,.AgeConsent input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Offers .Checkmark,.OffersMethod .Checkmark,.AgeConsent .Checkmark{position:absolute;top:0;left:0;height:25px;width:25px;background-color:var(--emw--color-gray-100, #E6E6E6);border-radius:50%}.Offers input:checked~.Checkmark,.OffersMethod input:checked~.Checkmark,.AgeConsent input:checked~.Checkmark{background-color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Offers .Checkmark:after,.OffersMethod .Checkmark:after,.AgeConsent .Checkmark:after{content:"";position:absolute;display:none;left:9px;top:5px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;transform:rotate(45deg)}.Offers input:checked~.Checkmark:after,.OffersMethod input:checked~.Checkmark:after,.AgeConsent input:checked~.Checkmark:after{display:block}.NotificationContainer{margin-top:32px}.NotificationContainer p{color:var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));font-size:14px}.RegisterError{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:16px;line-height:18px}.RegisterStepNext{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.RegisterStepNext[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}`);
|
|
219
219
|
}
|
|
220
220
|
function Ur(t, r, e) {
|
|
221
221
|
const o = t.slice();
|
|
@@ -704,17 +704,17 @@ function Et(t) {
|
|
|
704
704
|
(t[9] && /*cityFocus*/
|
|
705
705
|
t[13] ? "InvalidField" : "") + /*disabledFieldsList*/
|
|
706
706
|
(((z = t[14]) == null ? void 0 : z.indexOf("city")) >= 0 ? "Hidden" : "")), l(Te, "class", "FormRequired"), l(ke, "for", "Country"), l(ce, "id", "Country"), /*countrySelected*/
|
|
707
|
-
t[21] === void 0 &&
|
|
707
|
+
t[21] === void 0 && yr(() => (
|
|
708
708
|
/*select0_change_handler*/
|
|
709
709
|
t[58].call(ce)
|
|
710
710
|
)), l(be, "class", Fe = "CountryContainer " + /*disabledFieldsList*/
|
|
711
711
|
(((ir = t[14]) == null ? void 0 : ir.indexOf("country")) >= 0 ? "Hidden" : "")), l(qe, "class", "FormRequired"), l(Ee, "for", "Nationality"), l(de, "id", "Nationality"), /*nationalitySelected*/
|
|
712
|
-
t[23] === void 0 &&
|
|
712
|
+
t[23] === void 0 && yr(() => (
|
|
713
713
|
/*select1_change_handler*/
|
|
714
714
|
t[59].call(de)
|
|
715
715
|
)), l(pe, "class", Re = "NationalityContainer " + /*disabledFieldsList*/
|
|
716
716
|
(((or = t[14]) == null ? void 0 : or.indexOf("nationality")) >= 0 ? "Hidden" : "")), l(De, "class", "FormRequired"), l(we, "for", "Mobile"), l(ue, "class", "MobilePrefixSelected"), /*mobilePrefixSelected*/
|
|
717
|
-
t[26] === void 0 &&
|
|
717
|
+
t[26] === void 0 && yr(() => (
|
|
718
718
|
/*select2_change_handler*/
|
|
719
719
|
t[60].call(ue)
|
|
720
720
|
)), l(R, "type", "text"), l(R, "oninput", "this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\\..*)\\./g, '$1');"), l(R, "id", "Mobile"), l(R, "class", "MobileInput"), l(Me, "class", "MobileWrapper"), l(ae, "class", We = "MobileContainer " + /*invalidMobile*/
|
|
@@ -1035,13 +1035,13 @@ function Et(t) {
|
|
|
1035
1035
|
i: Fr,
|
|
1036
1036
|
o: Fr,
|
|
1037
1037
|
d(n) {
|
|
1038
|
-
n && (O(e), O(o), O(a), O(i)), K && K.d(n), O(r), Q && Q.d(), J && J.d(), Z && Z.d(),
|
|
1038
|
+
n && (O(e), O(o), O(a), O(i)), K && K.d(n), O(r), Q && Q.d(), J && J.d(), Z && Z.d(), vr(L, n), vr(D, n), vr(W, n), X && X.d(), Y && Y.d(), $ && $.d(), t[69](null), _r = !1, ft(Ar);
|
|
1039
1039
|
}
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
1042
|
function wt(t, r, e) {
|
|
1043
1043
|
let o;
|
|
1044
|
-
|
|
1044
|
+
mt(t, kt, (c) => e(31, o = c));
|
|
1045
1045
|
let { userconsentsexist: a = "false" } = r, { termsconditions: i = "false" } = r, { smsoffers: f = "false" } = r, { emailmarketing: S = "false" } = r, { endpoint: y = "" } = r, { captchakey: T = "" } = r, { lang: v = "" } = r, { disabledfields: k = "" } = r, { defaultoptions: w = "" } = r, { mbsource: A } = r, { clientstyling: C = "" } = r, { clientstylingurl: _ = "" } = r, { translationurl: F = "" } = r, E, fe, G, me, ye = !1, Pe = !1, ze = !1, ve = !1, Xe, x, Ye = !1, Oe = "", ge = "", I = "", V = "", Ce = [], ne = "", Se = [], te = "", le = "", H = [], se = "", q = !1, je = !1, N, d = { mobile: {}, userConsents: {} }, b = {
|
|
1046
1046
|
address1: !1,
|
|
1047
1047
|
postalCode: !1,
|
|
@@ -1163,7 +1163,7 @@ function wt(t, r, e) {
|
|
|
1163
1163
|
}, qe = () => {
|
|
1164
1164
|
yt(v);
|
|
1165
1165
|
};
|
|
1166
|
-
|
|
1166
|
+
gt(() => (window.addEventListener("message", Ne, !1), () => {
|
|
1167
1167
|
window.removeEventListener("message", Ne);
|
|
1168
1168
|
}));
|
|
1169
1169
|
function fr() {
|
|
@@ -1192,7 +1192,7 @@ function wt(t, r, e) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
const Cr = () => e(12, ze = !0), R = () => e(12, ze = !1), hr = () => Be("GeneralOffers"), We = () => Be("SmsOffers"), br = () => Be("EmailOffers"), sr = () => Fe(), _e = (c) => pe(c);
|
|
1194
1194
|
function Ge(c) {
|
|
1195
|
-
|
|
1195
|
+
pt[c ? "unshift" : "push"](() => {
|
|
1196
1196
|
N = c, e(5, N);
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
@@ -1206,11 +1206,11 @@ function wt(t, r, e) {
|
|
|
1206
1206
|
4096 && k && rr(), t.$$.dirty[1] & /*defaultoptions*/
|
|
1207
1207
|
8192 && w && ur(), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1208
1208
|
32 | t.$$.dirty[1] & /*clientstyling*/
|
|
1209
|
-
32768 && C && N &&
|
|
1209
|
+
32768 && C && N && Ct(N, C), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1210
1210
|
32 | t.$$.dirty[1] & /*clientstylingurl*/
|
|
1211
|
-
65536 && _ && N &&
|
|
1211
|
+
65536 && _ && N && ht(N, _), t.$$.dirty[0] & /*customStylingContainer*/
|
|
1212
1212
|
32 | t.$$.dirty[1] & /*mbsource*/
|
|
1213
|
-
16384 && A && N &&
|
|
1213
|
+
16384 && A && N && bt(N, `${A}.Style`), t.$$.dirty[1] & /*translationurl*/
|
|
1214
1214
|
131072 && F && $e(), t.$$.dirty[0] & /*userconsentsexist, termsconditions*/
|
|
1215
1215
|
3 && a && e(30, b.termsandconditions = i === "false", b);
|
|
1216
1216
|
}, [
|
|
@@ -1293,7 +1293,7 @@ class Mt extends at {
|
|
|
1293
1293
|
r,
|
|
1294
1294
|
wt,
|
|
1295
1295
|
Et,
|
|
1296
|
-
|
|
1296
|
+
dt,
|
|
1297
1297
|
{
|
|
1298
1298
|
userconsentsexist: 0,
|
|
1299
1299
|
termsconditions: 1,
|
|
@@ -1392,7 +1392,7 @@ class Mt extends at {
|
|
|
1392
1392
|
this.$$set({ translationurl: r }), oe();
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
|
|
1395
|
+
ct(Mt, { userconsentsexist: {}, termsconditions: {}, smsoffers: {}, emailmarketing: {}, endpoint: {}, captchakey: {}, lang: {}, disabledfields: {}, defaultoptions: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
1396
1396
|
export {
|
|
1397
1397
|
Mt as default
|
|
1398
1398
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as D, G as Z, a as $, S as ee, i as te,
|
|
1
|
+
import { $ as D, G as Z, a as $, S as ee, i as te, f as M, c as ie, s as oe, b as re, e as k, d as z, t as S, g as v, h as R, j as s, k as Y, l as L, m as E, n as G, o as P, r as ne, p as ae, q as se, u as le, v as de, w as ce, x as ue, z as me } from "./GeneralPlayerRegisterForm-BeZZtEAq.js";
|
|
2
2
|
function fe({ withLocale: o, translations: e }) {
|
|
3
3
|
D.subscribe((i) => {
|
|
4
4
|
i == null && (Z.set(e), D.set(o));
|
|
@@ -115,7 +115,7 @@ const K = {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
function ve(o) {
|
|
118
|
-
|
|
118
|
+
re(o, "svelte-c25n4u", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}");
|
|
119
119
|
}
|
|
120
120
|
function ge(o) {
|
|
121
121
|
let e = (
|
|
@@ -127,7 +127,7 @@ function ge(o) {
|
|
|
127
127
|
i = S(e);
|
|
128
128
|
},
|
|
129
129
|
m(a, r) {
|
|
130
|
-
|
|
130
|
+
R(a, i, r);
|
|
131
131
|
},
|
|
132
132
|
p(a, r) {
|
|
133
133
|
r & /*$_*/
|
|
@@ -135,7 +135,7 @@ function ge(o) {
|
|
|
135
135
|
a[5]("errorTitle") + "") && E(i, e);
|
|
136
136
|
},
|
|
137
137
|
d(a) {
|
|
138
|
-
a &&
|
|
138
|
+
a && P(i);
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
}
|
|
@@ -149,7 +149,7 @@ function pe(o) {
|
|
|
149
149
|
i = S(e);
|
|
150
150
|
},
|
|
151
151
|
m(a, r) {
|
|
152
|
-
|
|
152
|
+
R(a, i, r);
|
|
153
153
|
},
|
|
154
154
|
p(a, r) {
|
|
155
155
|
r & /*$_*/
|
|
@@ -157,7 +157,7 @@ function pe(o) {
|
|
|
157
157
|
a[5]("title") + "") && E(i, e);
|
|
158
158
|
},
|
|
159
159
|
d(a) {
|
|
160
|
-
a &&
|
|
160
|
+
a && P(i);
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
}
|
|
@@ -171,7 +171,7 @@ function W(o) {
|
|
|
171
171
|
e = k("p"), a = S(i), v(e, "class", "InvalidInput");
|
|
172
172
|
},
|
|
173
173
|
m(r, l) {
|
|
174
|
-
|
|
174
|
+
R(r, e, l), s(e, a);
|
|
175
175
|
},
|
|
176
176
|
p(r, l) {
|
|
177
177
|
l & /*$_*/
|
|
@@ -179,7 +179,7 @@ function W(o) {
|
|
|
179
179
|
r[5]("smsCodeError") + "") && E(a, i);
|
|
180
180
|
},
|
|
181
181
|
d(r) {
|
|
182
|
-
r &&
|
|
182
|
+
r && P(e);
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
185
|
}
|
|
@@ -193,7 +193,7 @@ function Q(o) {
|
|
|
193
193
|
e = k("p"), a = S(i), v(e, "class", "SmsVerificationResendMessage");
|
|
194
194
|
},
|
|
195
195
|
m(r, l) {
|
|
196
|
-
|
|
196
|
+
R(r, e, l), s(e, a);
|
|
197
197
|
},
|
|
198
198
|
p(r, l) {
|
|
199
199
|
l & /*$_*/
|
|
@@ -201,7 +201,7 @@ function Q(o) {
|
|
|
201
201
|
r[5]("resendMessage") + "") && E(a, i);
|
|
202
202
|
},
|
|
203
203
|
d(r) {
|
|
204
|
-
r &&
|
|
204
|
+
r && P(e);
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
}
|
|
@@ -218,7 +218,7 @@ function X(o) {
|
|
|
218
218
|
), g = S(")"), v(e, "class", "SmsVerificationResendTimer");
|
|
219
219
|
},
|
|
220
220
|
m(p, h) {
|
|
221
|
-
|
|
221
|
+
R(p, e, h), s(e, i), s(e, r), s(e, l), s(e, g);
|
|
222
222
|
},
|
|
223
223
|
p(p, h) {
|
|
224
224
|
h & /*secondsLeft*/
|
|
@@ -231,7 +231,7 @@ function X(o) {
|
|
|
231
231
|
);
|
|
232
232
|
},
|
|
233
233
|
d(p) {
|
|
234
|
-
p &&
|
|
234
|
+
p && P(e);
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
237
|
}
|
|
@@ -267,7 +267,7 @@ function ye(o) {
|
|
|
267
267
|
o[3], v(e, "class", "Container SmsVerificationContainer");
|
|
268
268
|
},
|
|
269
269
|
m(n, f) {
|
|
270
|
-
|
|
270
|
+
R(n, e, f), s(e, i), b.m(i, null), s(e, a), s(e, r), s(r, l), s(l, p), s(l, h), s(l, _), s(r, T), s(r, d), Y(
|
|
271
271
|
d,
|
|
272
272
|
/*smsCode*/
|
|
273
273
|
o[1]
|
|
@@ -303,7 +303,7 @@ function ye(o) {
|
|
|
303
303
|
32 && g !== (g = /*$_*/
|
|
304
304
|
n[5]("code") + "") && E(p, g), f & /*smsCode*/
|
|
305
305
|
2 && d.value !== /*smsCode*/
|
|
306
|
-
n[1] &&
|
|
306
|
+
n[1] && Y(
|
|
307
307
|
d,
|
|
308
308
|
/*smsCode*/
|
|
309
309
|
n[1]
|
|
@@ -320,16 +320,16 @@ function ye(o) {
|
|
|
320
320
|
8 && (c.disabled = /*timer*/
|
|
321
321
|
n[3]);
|
|
322
322
|
},
|
|
323
|
-
i:
|
|
324
|
-
o:
|
|
323
|
+
i: G,
|
|
324
|
+
o: G,
|
|
325
325
|
d(n) {
|
|
326
|
-
n &&
|
|
326
|
+
n && P(e), b.d(), u && u.d(), m && m.d(), t && t.d(), o[20](null), N = !1, ne(H);
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function he(o, e, i) {
|
|
331
331
|
let a;
|
|
332
|
-
|
|
332
|
+
ae(o, me, (t) => i(5, a = t));
|
|
333
333
|
let { endpoint: r = "" } = e, { tokenid: l = "" } = e, { playerid: g = "" } = e, { smstemplate: p = "Please use this code {0} to activate your accout" } = e, { number: h = "" } = e, { mbsource: _ } = e, { clientstyling: T = "" } = e, { clientstylingurl: d = "" } = e, { translationurl: F = "" } = e, C, I = !0, j = !1, w, y, x = +localStorage.getItem("smsTimer") || 0, B = Date.now() / 1e3 - x, c = 60 - Math.floor(B);
|
|
334
334
|
const V = { numeric: /^[0-9]{0,6}$/ };
|
|
335
335
|
fe({ withLocale: "en", translations: {} });
|
|
@@ -402,7 +402,7 @@ function he(o, e, i) {
|
|
|
402
402
|
}, A = (t) => {
|
|
403
403
|
!V.numeric.test(t.key) && t.keyCode !== 8 && t.keyCode !== 9 && t.keyCode !== 46 && t.preventDefault();
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
se(() => {
|
|
406
406
|
if (!g || !h) {
|
|
407
407
|
let t = JSON.parse(localStorage.getItem("playerData"));
|
|
408
408
|
i(10, g = t.playerid), i(11, h = t.number);
|
|
@@ -415,7 +415,7 @@ function he(o, e, i) {
|
|
|
415
415
|
}
|
|
416
416
|
const u = (t) => A(t);
|
|
417
417
|
function m(t) {
|
|
418
|
-
|
|
418
|
+
le[t ? "unshift" : "push"](() => {
|
|
419
419
|
y = t, i(0, y);
|
|
420
420
|
});
|
|
421
421
|
}
|
|
@@ -424,9 +424,9 @@ function he(o, e, i) {
|
|
|
424
424
|
}, o.$$.update = () => {
|
|
425
425
|
o.$$.dirty & /*tokenid, playerid, endpoint*/
|
|
426
426
|
5632, o.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
427
|
-
32769 && T && y &&
|
|
428
|
-
65537 && d && y &&
|
|
429
|
-
16385 && _ && y &&
|
|
427
|
+
32769 && T && y && de(y, T), o.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
428
|
+
65537 && d && y && ce(y, d), o.$$.dirty & /*mbsource, customStylingContainer*/
|
|
429
|
+
16385 && _ && y && ue(y, `${_}.Style`), o.$$.dirty & /*translationurl*/
|
|
430
430
|
131072 && F && U();
|
|
431
431
|
}, [
|
|
432
432
|
y,
|
|
@@ -459,7 +459,7 @@ class be extends ee {
|
|
|
459
459
|
e,
|
|
460
460
|
he,
|
|
461
461
|
ye,
|
|
462
|
-
|
|
462
|
+
oe,
|
|
463
463
|
{
|
|
464
464
|
endpoint: 12,
|
|
465
465
|
tokenid: 9,
|
|
@@ -529,7 +529,7 @@ class be extends ee {
|
|
|
529
529
|
this.$$set({ translationurl: e }), M();
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
ie(be, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
533
533
|
export {
|
|
534
534
|
be as default
|
|
535
535
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=(r,t,n)=>new Promise((s,o)=>{var l=d=>{try{c(n.next(d))}catch(h){o(h)}},m=d=>{try{c(n.throw(d))}catch(h){o(h)}},c=d=>d.done?s(d.value):Promise.resolve(d.value).then(l,m);c((n=n.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerRegisterForm-DsNh6Be0.cjs");function q({withLocale:r,translations:t}){e.$locale.subscribe(n=>{n==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function V(r,t){e.addMessages(r,t)}const B={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",code:"SMS kodu",smsCodeError:"Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Aktif hesap",resend:"Yeniden gönder",loginSMSHint:"Telefon numaranıza yeni bir doğrulama kodu gönderildi"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"},hr:{title:"Unesite verifikacijski kod koji ste primili na svoj broj telefona",errorTitle:"Vaš kod je nevažeći",code:"Sms kod",smsCodeError:"Nevažeći sms kod",resendMessage:"Novi verifkacijski kod poslan je na vaš broj telefona.",activate:"Aktiviraj račun",resend:"Ponovno pošalji",loginSMSHint:"Novi verifkacijski kod poslan je na vaš broj telefona"},"pt-br":{title:"Por favor, insira o código de verificação que você recebeu no seu número de celular",errorTitle:"Código inválido,vôce pode reenviar o código e tentar novamente",code:"Código SMS",smsCodeError:"Código SMS inválido,vôce pode reenviar o código",resendMessage:"Um novo código de verificação foi enviado para o seu número de celular.",activate:"Ativar conta",resend:"Reenviar",loginSMSHint:"Um novo código de verificação foi enviado para o seu número de celular."},"es-mx":{title:"Por favor ingrese el código de verificación que recibió en su número móvil",errorTitle:"Código inválido,Puede enviar el código e intentar de nuevo",code:"Código SMS",smsCodeError:"Código SMS inválido,Puede reenviar el código",resendMessage:"Un nuevo código de verificación ha sido enviado a su número móvil .",activate:"Activar Cuenta",resend:"Reenviar",loginSMSHint:"Un nuevo código de verificación ha sido enviado a su número móvil ."},"en-us":{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"}};function L(r){e.append_styles(r,"svelte-c25n4u","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}")}function D(r){let t=r[5]("errorTitle")+"",n;return{c(){n=e.text(t)},m(s,o){e.insert(s,n,o)},p(s,o){o&32&&t!==(t=s[5]("errorTitle")+"")&&e.set_data(n,t)},d(s){s&&e.detach(n)}}}function Y(r){let t=r[5]("title")+"",n;return{c(){n=e.text(t)},m(s,o){e.insert(s,n,o)},p(s,o){o&32&&t!==(t=s[5]("title")+"")&&e.set_data(n,t)},d(s){s&&e.detach(n)}}}function U(r){let t,n=r[5]("smsCodeError")+"",s;return{c(){t=e.element("p"),s=e.text(n),e.attr(t,"class","InvalidInput")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&n!==(n=o[5]("smsCodeError")+"")&&e.set_data(s,n)},d(o){o&&e.detach(t)}}}function N(r){let t,n=r[5]("resendMessage")+"",s;return{c(){t=e.element("p"),s=e.text(n),e.attr(t,"class","SmsVerificationResendMessage")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&n!==(n=o[5]("resendMessage")+"")&&e.set_data(s,n)},d(o){o&&e.detach(t)}}}function H(r){let t,n,s=r[4]<10?"0":"",o,l,m;return{c(){t=e.element("span"),n=e.text("(0:"),o=e.text(s),l=e.text(r[4]),m=e.text(")"),e.attr(t,"class","SmsVerificationResendTimer")},m(c,d){e.insert(c,t,d),e.append(t,n),e.append(t,o),e.append(t,l),e.append(t,m)},p(c,d){d&16&&s!==(s=c[4]<10?"0":"")&&e.set_data(o,s),d&16&&e.set_data(l,c[4])},d(c){c&&e.detach(t)}}}function G(r){let t,n,s,o,l,m=r[5]("code")+"",c,d,h,_,u,w,k,E,C,S,y=r[5]("activate")+"",F,j,p,T=r[5]("resend")+"",A,P,x,z;function I(a,g){return a[2]?Y:D}let M=I(r),b=M(r),f=!r[2]&&U(r),v=r[3]&&N(r),i=r[3]&&H(r);return{c(){t=e.element("div"),n=e.element("h3"),b.c(),s=e.space(),o=e.element("div"),l=e.element("label"),c=e.text(m),d=e.text(":"),h=e.element("span"),h.textContent="*",_=e.space(),u=e.element("input"),w=e.space(),f&&f.c(),E=e.space(),v&&v.c(),C=e.space(),S=e.element("button"),F=e.text(y),j=e.space(),p=e.element("button"),A=e.text(T),P=e.space(),i&&i.c(),e.attr(n,"class","Title"),e.attr(h,"class","FormRequired"),e.attr(l,"for","SmsCode"),e.attr(u,"type","text"),e.attr(u,"id","SmsCode"),e.attr(u,"inputmode","numeric"),e.attr(u,"pattern","[0-9]*"),e.attr(u,"maxlength","6"),e.attr(o,"class",k="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(S,"class","Button SmsVerificationValidate"),e.attr(p,"class","Button SmsVerificationResend"),p.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(a,g){e.insert(a,t,g),e.append(t,n),b.m(n,null),e.append(t,s),e.append(t,o),e.append(o,l),e.append(l,c),e.append(l,d),e.append(l,h),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,w),f&&f.m(o,null),e.append(t,E),v&&v.m(t,null),e.append(t,C),e.append(t,S),e.append(S,F),e.append(t,j),e.append(t,p),e.append(p,A),e.append(p,P),i&&i.m(p,null),r[20](t),x||(z=[e.listen(u,"input",r[18]),e.listen(u,"keydown",r[19]),e.listen(S,"click",r[6]),e.listen(p,"click",r[7])],x=!0)},p(a,[g]){M===(M=I(a))&&b?b.p(a,g):(b.d(1),b=M(a),b&&(b.c(),b.m(n,null))),g&32&&m!==(m=a[5]("code")+"")&&e.set_data(c,m),g&2&&u.value!==a[1]&&e.set_input_value(u,a[1]),a[2]?f&&(f.d(1),f=null):f?f.p(a,g):(f=U(a),f.c(),f.m(o,null)),g&4&&k!==(k="Field SmsVerificationField "+(a[2]?"":"InvalidField"))&&e.attr(o,"class",k),a[3]?v?v.p(a,g):(v=N(a),v.c(),v.m(t,C)):v&&(v.d(1),v=null),g&32&&y!==(y=a[5]("activate")+"")&&e.set_data(F,y),g&32&&T!==(T=a[5]("resend")+"")&&e.set_data(A,T),a[3]?i?i.p(a,g):(i=H(a),i.c(),i.m(p,null)):i&&(i.d(1),i=null),g&8&&(p.disabled=a[3])},i:e.noop,o:e.noop,d(a){a&&e.detach(t),b.d(),f&&f.d(),v&&v.d(),i&&i.d(),r[20](null),x=!1,e.run_all(z)}}}function J(r,t,n){let s;e.component_subscribe(r,e.$format,i=>n(5,s=i));let{endpoint:o=""}=t,{tokenid:l=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{mbsource:h}=t,{clientstyling:_=""}=t,{clientstylingurl:u=""}=t,{translationurl:w=""}=t,k,E=!0,C=!1,S,y,F=+localStorage.getItem("smsTimer")||0,j=Date.now()/1e3-F,p=60-Math.floor(j);const T={numeric:/^[0-9]{0,6}$/};q({withLocale:"en",translations:{}});const A=()=>{fetch(w).then(a=>a.json()).then(a=>{Object.keys(a).forEach(g=>{V(g,a[g])})}).catch(a=>{console.log(a)})};Object.keys(B).forEach(i=>{V(i,B[i])});const P=()=>R(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${l}&validationCode=${k}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)n(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href);else throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),n(2,E=!1),new Error("Could not activate user")}catch(i){console.log(i)}}),x=()=>R(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),I();try{const i=yield fetch(`${o}/v1/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:m,messageTemplate:c,destination:d})}),a=yield i.json();if(i.ok)n(9,l=a.id),C=!1,z();else throw C=!0,new Error("Failed to fetch")}catch(i){C=!0,console.error(i)}}),z=()=>{p>0?n(4,p--,p):(clearInterval(S),n(3,S=!1),n(4,p=60))},I=()=>{j<60&&n(3,S=setInterval(()=>{z()},1e3))},M=i=>{!T.numeric.test(i.key)&&i.keyCode!==8&&i.keyCode!==9&&i.keyCode!==46&&i.preventDefault()};e.onMount(()=>{if(!m||!d){let i=JSON.parse(localStorage.getItem("playerData"));n(10,m=i.playerid),n(11,d=i.number)}return I(),()=>{}});function b(){k=this.value,n(1,k)}const f=i=>M(i);function v(i){e.binding_callbacks[i?"unshift":"push"](()=>{y=i,n(0,y)})}return r.$$set=i=>{"endpoint"in i&&n(12,o=i.endpoint),"tokenid"in i&&n(9,l=i.tokenid),"playerid"in i&&n(10,m=i.playerid),"smstemplate"in i&&n(13,c=i.smstemplate),"number"in i&&n(11,d=i.number),"mbsource"in i&&n(14,h=i.mbsource),"clientstyling"in i&&n(15,_=i.clientstyling),"clientstylingurl"in i&&n(16,u=i.clientstylingurl),"translationurl"in i&&n(17,w=i.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&32769&&_&&y&&e.setClientStyling(y,_),r.$$.dirty&65537&&u&&y&&e.setClientStylingURL(y,u),r.$$.dirty&16385&&h&&y&&e.setStreamStyling(y,`${h}.Style`),r.$$.dirty&131072&&w&&A()},[y,k,E,S,p,s,P,x,M,l,m,d,o,c,h,_,u,w,b,f,v]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,J,G,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,mbsource:14,clientstyling:15,clientstylingurl:16,translationurl:17},L)}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get tokenid(){return this.$$.ctx[9]}set tokenid(t){this.$$set({tokenid:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(t){this.$$set({smstemplate:t}),e.flush()}get number(){return this.$$.ctx[11]}set number(t){this.$$set({number:t}),e.flush()}get mbsource(){return this.$$.ctx[14]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[17]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=O;
|
|
1
|
+
"use strict";var R=(r,t,n)=>new Promise((s,o)=>{var l=d=>{try{c(n.next(d))}catch(h){o(h)}},m=d=>{try{c(n.throw(d))}catch(h){o(h)}},c=d=>d.done?s(d.value):Promise.resolve(d.value).then(l,m);c((n=n.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerRegisterForm-Bl5rwaJV.cjs");function q({withLocale:r,translations:t}){e.$locale.subscribe(n=>{n==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function V(r,t){e.addMessages(r,t)}const B={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",code:"SMS kodu",smsCodeError:"Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Aktif hesap",resend:"Yeniden gönder",loginSMSHint:"Telefon numaranıza yeni bir doğrulama kodu gönderildi"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"},hr:{title:"Unesite verifikacijski kod koji ste primili na svoj broj telefona",errorTitle:"Vaš kod je nevažeći",code:"Sms kod",smsCodeError:"Nevažeći sms kod",resendMessage:"Novi verifkacijski kod poslan je na vaš broj telefona.",activate:"Aktiviraj račun",resend:"Ponovno pošalji",loginSMSHint:"Novi verifkacijski kod poslan je na vaš broj telefona"},"pt-br":{title:"Por favor, insira o código de verificação que você recebeu no seu número de celular",errorTitle:"Código inválido,vôce pode reenviar o código e tentar novamente",code:"Código SMS",smsCodeError:"Código SMS inválido,vôce pode reenviar o código",resendMessage:"Um novo código de verificação foi enviado para o seu número de celular.",activate:"Ativar conta",resend:"Reenviar",loginSMSHint:"Um novo código de verificação foi enviado para o seu número de celular."},"es-mx":{title:"Por favor ingrese el código de verificación que recibió en su número móvil",errorTitle:"Código inválido,Puede enviar el código e intentar de nuevo",code:"Código SMS",smsCodeError:"Código SMS inválido,Puede reenviar el código",resendMessage:"Un nuevo código de verificación ha sido enviado a su número móvil .",activate:"Activar Cuenta",resend:"Reenviar",loginSMSHint:"Un nuevo código de verificación ha sido enviado a su número móvil ."},"en-us":{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"}};function L(r){e.append_styles(r,"svelte-c25n4u","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}")}function D(r){let t=r[5]("errorTitle")+"",n;return{c(){n=e.text(t)},m(s,o){e.insert(s,n,o)},p(s,o){o&32&&t!==(t=s[5]("errorTitle")+"")&&e.set_data(n,t)},d(s){s&&e.detach(n)}}}function Y(r){let t=r[5]("title")+"",n;return{c(){n=e.text(t)},m(s,o){e.insert(s,n,o)},p(s,o){o&32&&t!==(t=s[5]("title")+"")&&e.set_data(n,t)},d(s){s&&e.detach(n)}}}function U(r){let t,n=r[5]("smsCodeError")+"",s;return{c(){t=e.element("p"),s=e.text(n),e.attr(t,"class","InvalidInput")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&n!==(n=o[5]("smsCodeError")+"")&&e.set_data(s,n)},d(o){o&&e.detach(t)}}}function N(r){let t,n=r[5]("resendMessage")+"",s;return{c(){t=e.element("p"),s=e.text(n),e.attr(t,"class","SmsVerificationResendMessage")},m(o,l){e.insert(o,t,l),e.append(t,s)},p(o,l){l&32&&n!==(n=o[5]("resendMessage")+"")&&e.set_data(s,n)},d(o){o&&e.detach(t)}}}function H(r){let t,n,s=r[4]<10?"0":"",o,l,m;return{c(){t=e.element("span"),n=e.text("(0:"),o=e.text(s),l=e.text(r[4]),m=e.text(")"),e.attr(t,"class","SmsVerificationResendTimer")},m(c,d){e.insert(c,t,d),e.append(t,n),e.append(t,o),e.append(t,l),e.append(t,m)},p(c,d){d&16&&s!==(s=c[4]<10?"0":"")&&e.set_data(o,s),d&16&&e.set_data(l,c[4])},d(c){c&&e.detach(t)}}}function G(r){let t,n,s,o,l,m=r[5]("code")+"",c,d,h,_,u,w,k,E,C,S,y=r[5]("activate")+"",F,j,p,T=r[5]("resend")+"",A,P,x,z;function I(a,g){return a[2]?Y:D}let M=I(r),b=M(r),f=!r[2]&&U(r),v=r[3]&&N(r),i=r[3]&&H(r);return{c(){t=e.element("div"),n=e.element("h3"),b.c(),s=e.space(),o=e.element("div"),l=e.element("label"),c=e.text(m),d=e.text(":"),h=e.element("span"),h.textContent="*",_=e.space(),u=e.element("input"),w=e.space(),f&&f.c(),E=e.space(),v&&v.c(),C=e.space(),S=e.element("button"),F=e.text(y),j=e.space(),p=e.element("button"),A=e.text(T),P=e.space(),i&&i.c(),e.attr(n,"class","Title"),e.attr(h,"class","FormRequired"),e.attr(l,"for","SmsCode"),e.attr(u,"type","text"),e.attr(u,"id","SmsCode"),e.attr(u,"inputmode","numeric"),e.attr(u,"pattern","[0-9]*"),e.attr(u,"maxlength","6"),e.attr(o,"class",k="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(S,"class","Button SmsVerificationValidate"),e.attr(p,"class","Button SmsVerificationResend"),p.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(a,g){e.insert(a,t,g),e.append(t,n),b.m(n,null),e.append(t,s),e.append(t,o),e.append(o,l),e.append(l,c),e.append(l,d),e.append(l,h),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,w),f&&f.m(o,null),e.append(t,E),v&&v.m(t,null),e.append(t,C),e.append(t,S),e.append(S,F),e.append(t,j),e.append(t,p),e.append(p,A),e.append(p,P),i&&i.m(p,null),r[20](t),x||(z=[e.listen(u,"input",r[18]),e.listen(u,"keydown",r[19]),e.listen(S,"click",r[6]),e.listen(p,"click",r[7])],x=!0)},p(a,[g]){M===(M=I(a))&&b?b.p(a,g):(b.d(1),b=M(a),b&&(b.c(),b.m(n,null))),g&32&&m!==(m=a[5]("code")+"")&&e.set_data(c,m),g&2&&u.value!==a[1]&&e.set_input_value(u,a[1]),a[2]?f&&(f.d(1),f=null):f?f.p(a,g):(f=U(a),f.c(),f.m(o,null)),g&4&&k!==(k="Field SmsVerificationField "+(a[2]?"":"InvalidField"))&&e.attr(o,"class",k),a[3]?v?v.p(a,g):(v=N(a),v.c(),v.m(t,C)):v&&(v.d(1),v=null),g&32&&y!==(y=a[5]("activate")+"")&&e.set_data(F,y),g&32&&T!==(T=a[5]("resend")+"")&&e.set_data(A,T),a[3]?i?i.p(a,g):(i=H(a),i.c(),i.m(p,null)):i&&(i.d(1),i=null),g&8&&(p.disabled=a[3])},i:e.noop,o:e.noop,d(a){a&&e.detach(t),b.d(),f&&f.d(),v&&v.d(),i&&i.d(),r[20](null),x=!1,e.run_all(z)}}}function J(r,t,n){let s;e.component_subscribe(r,e.$format,i=>n(5,s=i));let{endpoint:o=""}=t,{tokenid:l=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{mbsource:h}=t,{clientstyling:_=""}=t,{clientstylingurl:u=""}=t,{translationurl:w=""}=t,k,E=!0,C=!1,S,y,F=+localStorage.getItem("smsTimer")||0,j=Date.now()/1e3-F,p=60-Math.floor(j);const T={numeric:/^[0-9]{0,6}$/};q({withLocale:"en",translations:{}});const A=()=>{fetch(w).then(a=>a.json()).then(a=>{Object.keys(a).forEach(g=>{V(g,a[g])})}).catch(a=>{console.log(a)})};Object.keys(B).forEach(i=>{V(i,B[i])});const P=()=>R(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${l}&validationCode=${k}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)n(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href);else throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),n(2,E=!1),new Error("Could not activate user")}catch(i){console.log(i)}}),x=()=>R(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),I();try{const i=yield fetch(`${o}/v1/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:m,messageTemplate:c,destination:d})}),a=yield i.json();if(i.ok)n(9,l=a.id),C=!1,z();else throw C=!0,new Error("Failed to fetch")}catch(i){C=!0,console.error(i)}}),z=()=>{p>0?n(4,p--,p):(clearInterval(S),n(3,S=!1),n(4,p=60))},I=()=>{j<60&&n(3,S=setInterval(()=>{z()},1e3))},M=i=>{!T.numeric.test(i.key)&&i.keyCode!==8&&i.keyCode!==9&&i.keyCode!==46&&i.preventDefault()};e.onMount(()=>{if(!m||!d){let i=JSON.parse(localStorage.getItem("playerData"));n(10,m=i.playerid),n(11,d=i.number)}return I(),()=>{}});function b(){k=this.value,n(1,k)}const f=i=>M(i);function v(i){e.binding_callbacks[i?"unshift":"push"](()=>{y=i,n(0,y)})}return r.$$set=i=>{"endpoint"in i&&n(12,o=i.endpoint),"tokenid"in i&&n(9,l=i.tokenid),"playerid"in i&&n(10,m=i.playerid),"smstemplate"in i&&n(13,c=i.smstemplate),"number"in i&&n(11,d=i.number),"mbsource"in i&&n(14,h=i.mbsource),"clientstyling"in i&&n(15,_=i.clientstyling),"clientstylingurl"in i&&n(16,u=i.clientstylingurl),"translationurl"in i&&n(17,w=i.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&32769&&_&&y&&e.setClientStyling(y,_),r.$$.dirty&65537&&u&&y&&e.setClientStylingURL(y,u),r.$$.dirty&16385&&h&&y&&e.setStreamStyling(y,`${h}.Style`),r.$$.dirty&131072&&w&&A()},[y,k,E,S,p,s,P,x,M,l,m,d,o,c,h,_,u,w,b,f,v]}class O extends e.SvelteComponent{constructor(t){super(),e.init(this,t,J,G,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,mbsource:14,clientstyling:15,clientstylingurl:16,translationurl:17},L)}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get tokenid(){return this.$$.ctx[9]}set tokenid(t){this.$$set({tokenid:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(t){this.$$set({smstemplate:t}),e.flush()}get number(){return this.$$.ctx[11]}set number(t){this.$$set({number:t}),e.flush()}get mbsource(){return this.$$.ctx[14]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[17]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(O,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=O;
|