@everymatrix/general-player-login-form 1.54.4 → 1.54.8

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.
@@ -1,4 +1,4 @@
1
- import { $ as Y, a as $, b as ee, S as te, i as ie, f as E, c as oe, s as re, d as ne, e as k, g as z, t as S, h as f, j as H, k as s, l as J, m as q, n as C, o as G, p as N, r as ae, q as se, u as le, v as de, w as ce } from "./GeneralPlayerLoginForm-MMmgBHKW.js";
1
+ import { $ as Y, a as $, b as ee, S as te, i as ie, f as E, s as oe, c as re, d as ne, n as J, e as H, r as ae, g as C, h as G, j as f, k as N, l as s, m as q, o as k, p as z, t as S, q as se, u as le, v as de, w as ce } from "./GeneralPlayerLoginForm-CrntUfLK.js";
2
2
  function ue({ withLocale: o, translations: e }) {
3
3
  Y.subscribe((i) => {
4
4
  i == null && ($.set(e), Y.set(o));
@@ -127,7 +127,7 @@ function fe(o) {
127
127
  i = S(e);
128
128
  },
129
129
  m(n, r) {
130
- H(n, i, r);
130
+ N(n, i, r);
131
131
  },
132
132
  p(n, r) {
133
133
  r & /*$_*/
@@ -135,7 +135,7 @@ function fe(o) {
135
135
  n[5]("errorTitle") + "") && C(i, e);
136
136
  },
137
137
  d(n) {
138
- n && N(i);
138
+ n && H(i);
139
139
  }
140
140
  };
141
141
  }
@@ -149,7 +149,7 @@ function ve(o) {
149
149
  i = S(e);
150
150
  },
151
151
  m(n, r) {
152
- H(n, i, r);
152
+ N(n, i, r);
153
153
  },
154
154
  p(n, r) {
155
155
  r & /*$_*/
@@ -157,7 +157,7 @@ function ve(o) {
157
157
  n[5]("title") + "") && C(i, e);
158
158
  },
159
159
  d(n) {
160
- n && N(i);
160
+ n && H(i);
161
161
  }
162
162
  };
163
163
  }
@@ -171,7 +171,7 @@ function Q(o) {
171
171
  e = k("p"), n = S(i), f(e, "class", "InvalidInput");
172
172
  },
173
173
  m(r, l) {
174
- H(r, e, l), s(e, n);
174
+ N(r, e, l), s(e, n);
175
175
  },
176
176
  p(r, l) {
177
177
  l & /*$_*/
@@ -179,7 +179,7 @@ function Q(o) {
179
179
  r[5]("smsCodeError") + "") && C(n, i);
180
180
  },
181
181
  d(r) {
182
- r && N(e);
182
+ r && H(e);
183
183
  }
184
184
  };
185
185
  }
@@ -193,7 +193,7 @@ function X(o) {
193
193
  e = k("p"), n = S(i), f(e, "class", "SmsVerificationResendMessage");
194
194
  },
195
195
  m(r, l) {
196
- H(r, e, l), s(e, n);
196
+ N(r, e, l), s(e, n);
197
197
  },
198
198
  p(r, l) {
199
199
  l & /*$_*/
@@ -201,7 +201,7 @@ function X(o) {
201
201
  r[5]("resendMessage") + "") && C(n, i);
202
202
  },
203
203
  d(r) {
204
- r && N(e);
204
+ r && H(e);
205
205
  }
206
206
  };
207
207
  }
@@ -218,7 +218,7 @@ function Z(o) {
218
218
  ), v = S(")"), f(e, "class", "SmsVerificationResendTimer");
219
219
  },
220
220
  m(g, p) {
221
- H(g, e, p), s(e, i), s(e, r), s(e, l), s(e, v);
221
+ N(g, e, p), s(e, i), s(e, r), s(e, l), s(e, v);
222
222
  },
223
223
  p(g, p) {
224
224
  p & /*secondsLeft*/
@@ -231,7 +231,7 @@ function Z(o) {
231
231
  );
232
232
  },
233
233
  d(g) {
234
- g && N(e);
234
+ g && H(e);
235
235
  }
236
236
  };
237
237
  }
@@ -267,7 +267,7 @@ function ge(o) {
267
267
  o[3], f(e, "class", "Container SmsVerificationContainer");
268
268
  },
269
269
  m(t, a) {
270
- H(t, e, a), s(e, i), h.m(i, null), s(e, n), s(e, r), s(r, l), s(l, g), s(l, p), s(l, w), s(r, F), s(r, d), J(
270
+ N(t, e, a), s(e, i), h.m(i, null), s(e, n), s(e, r), s(r, l), s(l, g), s(l, p), s(l, w), s(r, F), s(r, d), G(
271
271
  d,
272
272
  /*smsCode*/
273
273
  o[1]
@@ -303,7 +303,7 @@ function ge(o) {
303
303
  32 && v !== (v = /*$_*/
304
304
  t[5]("code") + "") && C(g, v), a & /*smsCode*/
305
305
  2 && d.value !== /*smsCode*/
306
- t[1] && J(
306
+ t[1] && G(
307
307
  d,
308
308
  /*smsCode*/
309
309
  t[1]
@@ -320,10 +320,10 @@ function ge(o) {
320
320
  8 && (b.disabled = /*timer*/
321
321
  t[3]);
322
322
  },
323
- i: G,
324
- o: G,
323
+ i: J,
324
+ o: J,
325
325
  d(t) {
326
- t && N(e), h.d(), c && c.d(), u && u.d(), m && m.d(), o[19](null), U = !1, ae(B);
326
+ t && H(e), h.d(), c && c.d(), u && u.d(), m && m.d(), o[19](null), U = !1, ae(B);
327
327
  }
328
328
  };
329
329
  }
@@ -473,7 +473,7 @@ class ye extends te {
473
473
  e,
474
474
  pe,
475
475
  ge,
476
- re,
476
+ oe,
477
477
  {
478
478
  endpoint: 12,
479
479
  tokenid: 9,
@@ -536,7 +536,7 @@ class ye extends te {
536
536
  this.$$set({ translationurl: e }), E();
537
537
  }
538
538
  }
539
- oe(ye, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
539
+ re(ye, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
540
540
  export {
541
541
  ye as default
542
542
  };
@@ -0,0 +1,558 @@
1
+ var Y = (o, e, i) => new Promise((n, r) => {
2
+ var a = (d) => {
3
+ try {
4
+ c(i.next(d));
5
+ } catch (y) {
6
+ r(y);
7
+ }
8
+ }, m = (d) => {
9
+ try {
10
+ c(i.throw(d));
11
+ } catch (y) {
12
+ r(y);
13
+ }
14
+ }, c = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(a, m);
15
+ c((i = i.apply(o, e)).next());
16
+ });
17
+ import { $ as J, a as ee, b as te, S as ie, i as oe, s as re, f as E, c as ne, n as G, d as H, r as ae, e as C, g as K, h as p, j as N, k as l, l as q, m as w, o as z, t as k, p as se, q as le, u as de, v as ce, w as ue } from "./GeneralPlayerLoginForm-02QMdS8-.js";
18
+ function me({ withLocale: o, translations: e }) {
19
+ J.subscribe((i) => {
20
+ i == null && (ee.set(e), J.set(o));
21
+ });
22
+ }
23
+ function W(o, e) {
24
+ te(o, e);
25
+ }
26
+ const Q = {
27
+ en: {
28
+ title: "Please enter the verification code you received on your number",
29
+ errorTitle: "Your code was invalid, you can resend the code and try again",
30
+ code: "Sms code",
31
+ smsCodeError: "Invalid sms code, you can resend the code",
32
+ resendMessage: "A new verification code has been sent to your phone number.",
33
+ activate: "Activate Account",
34
+ resend: "Resend",
35
+ loginSMSHint: "A new verification code has been sent to your phone number"
36
+ },
37
+ "zh-hk": {
38
+ title: "请输入您在号码上收到的验证码",
39
+ errorTitle: "您的代码无效,您可以重新发送代码并重试",
40
+ code: "短信代码",
41
+ smsCodeError: "短信验证码无效,请重新发送验证码",
42
+ resendMessage: "新的验证码已发送至您的手机号码",
43
+ activate: "激活账户",
44
+ resend: "重发"
45
+ },
46
+ fr: {
47
+ title: "Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",
48
+ errorTitle: "Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",
49
+ code: "Code SMS",
50
+ smsCodeError: "Code sms invalide, vous pouvez renvoyer le code",
51
+ resendMessage: "Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",
52
+ activate: "Activer le compte",
53
+ resend: "Renvoyer"
54
+ },
55
+ tr: {
56
+ title: "Please enter the verification code you received on your number",
57
+ errorTitle: "Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",
58
+ code: "SMS kodu",
59
+ smsCodeError: "Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",
60
+ resendMessage: "Telefon numaranıza yeni bir doğrulama kodu gönderildi.",
61
+ activate: "Aktif hesap",
62
+ resend: "Yeniden gönder",
63
+ loginSMSHint: "Telefon numaranıza yeni bir doğrulama kodu gönderildi"
64
+ },
65
+ ro: {
66
+ title: "Please enter the verification code you received on your number",
67
+ errorTitle: "Your code was invalid, you can resend the code and try again",
68
+ code: "Sms code",
69
+ smsCodeError: "Invalid sms code, you can resend the code",
70
+ resendMessage: "Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",
71
+ activate: "Activate Account",
72
+ resend: "Resend"
73
+ },
74
+ es: {
75
+ title: "Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",
76
+ errorTitle: "Su código es invalido",
77
+ code: "Código SMS",
78
+ smsCodeError: "Código SMS invalido",
79
+ resendMessage: "Un nuevo codigo de verificación ha sido enviado a tu número celular.",
80
+ activate: "Activar Cuenta",
81
+ resend: "Reenviar"
82
+ },
83
+ pt: {
84
+ title: "Please enter the verification code you received on your number",
85
+ errorTitle: "Your code was invalid, you can resend the code and try again",
86
+ code: "Sms code",
87
+ smsCodeError: "Invalid sms code, you can resend the code",
88
+ resendMessage: "Um novo código de verificação foi enviado para o seu número de telefone.",
89
+ activate: "Activate Account",
90
+ resend: "Resend"
91
+ },
92
+ hr: {
93
+ title: "Unesite verifikacijski kod koji ste primili na svoj broj telefona",
94
+ errorTitle: "Vaš kod je nevažeći",
95
+ code: "Sms kod",
96
+ smsCodeError: "Nevažeći sms kod",
97
+ resendMessage: "Novi verifkacijski kod poslan je na vaš broj telefona.",
98
+ activate: "Aktiviraj račun",
99
+ resend: "Ponovno pošalji",
100
+ loginSMSHint: "Novi verifkacijski kod poslan je na vaš broj telefona"
101
+ },
102
+ "pt-br": {
103
+ title: "Por favor, insira o código de verificação que você recebeu no seu número de celular",
104
+ errorTitle: "Código inválido,vôce pode reenviar o código e tentar novamente",
105
+ code: "Código SMS",
106
+ smsCodeError: "Código SMS inválido,vôce pode reenviar o código",
107
+ resendMessage: "Um novo código de verificação foi enviado para o seu número de celular.",
108
+ activate: "Ativar conta",
109
+ resend: "Reenviar",
110
+ loginSMSHint: "Um novo código de verificação foi enviado para o seu número de celular."
111
+ },
112
+ "es-mx": {
113
+ title: "Por favor ingrese el código de verificación que recibió en su número móvil",
114
+ errorTitle: "Código inválido,Puede enviar el código e intentar de nuevo",
115
+ code: "Código SMS",
116
+ smsCodeError: "Código SMS inválido,Puede reenviar el código",
117
+ resendMessage: "Un nuevo código de verificación ha sido enviado a su número móvil .",
118
+ activate: "Activar Cuenta",
119
+ resend: "Reenviar",
120
+ loginSMSHint: "Un nuevo código de verificación ha sido enviado a su número móvil ."
121
+ },
122
+ "en-us": {
123
+ title: "Please enter the verification code you received on your number",
124
+ errorTitle: "Your code was invalid, you can resend the code and try again",
125
+ code: "Sms code",
126
+ smsCodeError: "Invalid sms code, you can resend the code",
127
+ resendMessage: "A new verification code has been sent to your phone number.",
128
+ activate: "Activate Account",
129
+ resend: "Resend",
130
+ loginSMSHint: "A new verification code has been sent to your phone number"
131
+ }
132
+ };
133
+ function fe(o) {
134
+ ne(o, "svelte-uutjwi", "*,*::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, #D0046C));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C))}.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, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));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))}");
135
+ }
136
+ function ve(o) {
137
+ let e = (
138
+ /*$_*/
139
+ o[5]("errorTitle") + ""
140
+ ), i;
141
+ return {
142
+ c() {
143
+ i = k(e);
144
+ },
145
+ m(n, r) {
146
+ N(n, i, r);
147
+ },
148
+ p(n, r) {
149
+ r & /*$_*/
150
+ 32 && e !== (e = /*$_*/
151
+ n[5]("errorTitle") + "") && C(i, e);
152
+ },
153
+ d(n) {
154
+ n && H(i);
155
+ }
156
+ };
157
+ }
158
+ function ge(o) {
159
+ let e = (
160
+ /*$_*/
161
+ o[5]("title") + ""
162
+ ), i;
163
+ return {
164
+ c() {
165
+ i = k(e);
166
+ },
167
+ m(n, r) {
168
+ N(n, i, r);
169
+ },
170
+ p(n, r) {
171
+ r & /*$_*/
172
+ 32 && e !== (e = /*$_*/
173
+ n[5]("title") + "") && C(i, e);
174
+ },
175
+ d(n) {
176
+ n && H(i);
177
+ }
178
+ };
179
+ }
180
+ function X(o) {
181
+ let e, i = (
182
+ /*$_*/
183
+ o[5]("smsCodeError") + ""
184
+ ), n;
185
+ return {
186
+ c() {
187
+ e = w("p"), n = k(i), p(e, "class", "InvalidInput");
188
+ },
189
+ m(r, a) {
190
+ N(r, e, a), l(e, n);
191
+ },
192
+ p(r, a) {
193
+ a & /*$_*/
194
+ 32 && i !== (i = /*$_*/
195
+ r[5]("smsCodeError") + "") && C(n, i);
196
+ },
197
+ d(r) {
198
+ r && H(e);
199
+ }
200
+ };
201
+ }
202
+ function Z(o) {
203
+ let e, i = (
204
+ /*$_*/
205
+ o[5]("resendMessage") + ""
206
+ ), n;
207
+ return {
208
+ c() {
209
+ e = w("p"), n = k(i), p(e, "class", "SmsVerificationResendMessage");
210
+ },
211
+ m(r, a) {
212
+ N(r, e, a), l(e, n);
213
+ },
214
+ p(r, a) {
215
+ a & /*$_*/
216
+ 32 && i !== (i = /*$_*/
217
+ r[5]("resendMessage") + "") && C(n, i);
218
+ },
219
+ d(r) {
220
+ r && H(e);
221
+ }
222
+ };
223
+ }
224
+ function $(o) {
225
+ let e, i, n = (
226
+ /*secondsLeft*/
227
+ o[4] < 10 ? "0" : ""
228
+ ), r, a, m;
229
+ return {
230
+ c() {
231
+ e = w("span"), i = k("(0:"), r = k(n), a = k(
232
+ /*secondsLeft*/
233
+ o[4]
234
+ ), m = k(")"), p(e, "class", "SmsVerificationResendTimer");
235
+ },
236
+ m(c, d) {
237
+ N(c, e, d), l(e, i), l(e, r), l(e, a), l(e, m);
238
+ },
239
+ p(c, d) {
240
+ d & /*secondsLeft*/
241
+ 16 && n !== (n = /*secondsLeft*/
242
+ c[4] < 10 ? "0" : "") && C(r, n), d & /*secondsLeft*/
243
+ 16 && C(
244
+ a,
245
+ /*secondsLeft*/
246
+ c[4]
247
+ );
248
+ },
249
+ d(c) {
250
+ c && H(e);
251
+ }
252
+ };
253
+ }
254
+ function pe(o) {
255
+ let e, i, n, r, a, m = (
256
+ /*$_*/
257
+ o[5]("code") + ""
258
+ ), c, d, y, F, u, j, _, I, M, h, R = (
259
+ /*$_*/
260
+ o[5]("activate") + ""
261
+ ), V, T, S, P = (
262
+ /*$_*/
263
+ o[5]("resend") + ""
264
+ ), D, L, U, B;
265
+ function O(t, s) {
266
+ return (
267
+ /*isSmsValid*/
268
+ t[2] ? ge : ve
269
+ );
270
+ }
271
+ let A = O(o), b = A(o), f = !/*isSmsValid*/
272
+ o[2] && X(o), v = (
273
+ /*timer*/
274
+ o[3] && Z(o)
275
+ ), g = (
276
+ /*timer*/
277
+ o[3] && $(o)
278
+ );
279
+ return {
280
+ c() {
281
+ e = w("div"), i = w("h3"), b.c(), n = z(), r = w("div"), a = w("label"), c = k(m), d = k(":"), y = w("span"), y.textContent = "*", F = z(), u = w("input"), j = z(), f && f.c(), I = z(), v && v.c(), M = z(), h = w("button"), V = k(R), T = z(), S = w("button"), D = k(P), L = z(), g && g.c(), p(i, "class", "Title"), p(y, "class", "FormRequired"), p(a, "for", "SmsCode"), p(u, "type", "text"), p(u, "id", "SmsCode"), p(u, "inputmode", "numeric"), p(u, "pattern", "[0-9]*"), p(u, "maxlength", "6"), p(r, "class", _ = "Field SmsVerificationField " + (/*isSmsValid*/
282
+ o[2] ? "" : "InvalidField")), p(h, "class", "Button SmsVerificationValidate"), p(S, "class", "Button SmsVerificationResend"), S.disabled = /*timer*/
283
+ o[3], p(e, "class", "Container SmsVerificationContainer");
284
+ },
285
+ m(t, s) {
286
+ N(t, e, s), l(e, i), b.m(i, null), l(e, n), l(e, r), l(r, a), l(a, c), l(a, d), l(a, y), l(r, F), l(r, u), K(
287
+ u,
288
+ /*smsCode*/
289
+ o[1]
290
+ ), l(r, j), f && f.m(r, null), l(e, I), v && v.m(e, null), l(e, M), l(e, h), l(h, V), l(e, T), l(e, S), l(S, D), l(S, L), g && g.m(S, null), o[19](e), U || (B = [
291
+ q(
292
+ u,
293
+ "input",
294
+ /*input_input_handler*/
295
+ o[17]
296
+ ),
297
+ q(
298
+ u,
299
+ "keydown",
300
+ /*keydown_handler*/
301
+ o[18]
302
+ ),
303
+ q(
304
+ h,
305
+ "click",
306
+ /*activateUser*/
307
+ o[6]
308
+ ),
309
+ q(
310
+ S,
311
+ "click",
312
+ /*resendCode*/
313
+ o[7]
314
+ )
315
+ ], U = !0);
316
+ },
317
+ p(t, [s]) {
318
+ A === (A = O(t)) && b ? b.p(t, s) : (b.d(1), b = A(t), b && (b.c(), b.m(i, null))), s & /*$_*/
319
+ 32 && m !== (m = /*$_*/
320
+ t[5]("code") + "") && C(c, m), s & /*smsCode*/
321
+ 2 && u.value !== /*smsCode*/
322
+ t[1] && K(
323
+ u,
324
+ /*smsCode*/
325
+ t[1]
326
+ ), /*isSmsValid*/
327
+ t[2] ? f && (f.d(1), f = null) : f ? f.p(t, s) : (f = X(t), f.c(), f.m(r, null)), s & /*isSmsValid*/
328
+ 4 && _ !== (_ = "Field SmsVerificationField " + (/*isSmsValid*/
329
+ t[2] ? "" : "InvalidField")) && p(r, "class", _), /*timer*/
330
+ t[3] ? v ? v.p(t, s) : (v = Z(t), v.c(), v.m(e, M)) : v && (v.d(1), v = null), s & /*$_*/
331
+ 32 && R !== (R = /*$_*/
332
+ t[5]("activate") + "") && C(V, R), s & /*$_*/
333
+ 32 && P !== (P = /*$_*/
334
+ t[5]("resend") + "") && C(D, P), /*timer*/
335
+ t[3] ? g ? g.p(t, s) : (g = $(t), g.c(), g.m(S, null)) : g && (g.d(1), g = null), s & /*timer*/
336
+ 8 && (S.disabled = /*timer*/
337
+ t[3]);
338
+ },
339
+ i: G,
340
+ o: G,
341
+ d(t) {
342
+ t && H(e), b.d(), f && f.d(), v && v.d(), g && g.d(), o[19](null), U = !1, ae(B);
343
+ }
344
+ };
345
+ }
346
+ function ye(o, e, i) {
347
+ let n;
348
+ se(o, ue, (t) => i(5, n = t));
349
+ let { endpoint: r = "" } = e, { tokenid: a = "" } = e, { playerid: m = "" } = e, { smstemplate: c = "Please use this code {0} to activate your accout" } = e, { number: d = "" } = e, { clientstyling: y = "" } = e, { clientstylingurl: F = "" } = e, { translationurl: u = "" } = e, j, _ = !0, I = !1, M, h, R = +localStorage.getItem("smsTimer") || 0, V = Date.now() / 1e3 - R, T = 60 - Math.floor(V);
350
+ const S = { numeric: /^[0-9]{0,6}$/ };
351
+ me({ withLocale: "en", translations: {} });
352
+ const P = () => {
353
+ fetch(u).then((s) => s.json()).then((s) => {
354
+ Object.keys(s).forEach((x) => {
355
+ W(x, s[x]);
356
+ });
357
+ }).catch((s) => {
358
+ console.log(s);
359
+ });
360
+ };
361
+ Object.keys(Q).forEach((t) => {
362
+ W(t, Q[t]);
363
+ });
364
+ const D = () => Y(this, null, function* () {
365
+ try {
366
+ if ((yield fetch(`${r}/v1/player/${m}/activateSMS?tokenId=${a}&validationCode=${j}`, {
367
+ headers: {
368
+ "Content-Type": "application/json",
369
+ accept: "application/json"
370
+ }
371
+ })).ok)
372
+ i(2, _ = !0), window.postMessage({ type: "SmsHasBeenValidated" }, window.location.href);
373
+ else
374
+ throw window.postMessage(
375
+ {
376
+ type: "WidgetNotification",
377
+ data: {
378
+ type: "error",
379
+ message: "Could not activate user"
380
+ }
381
+ },
382
+ window.location.href
383
+ ), i(2, _ = !1), new Error("Could not activate user");
384
+ } catch (t) {
385
+ console.log(t);
386
+ }
387
+ }), L = () => Y(this, null, function* () {
388
+ localStorage.setItem("smsTimer", JSON.stringify(Math.floor(Date.now() / 1e3))), A();
389
+ try {
390
+ const t = yield fetch(`${r}/v1/player/sms/token`, {
391
+ method: "POST",
392
+ headers: {
393
+ "Content-Type": "application/json",
394
+ accept: "application/json"
395
+ },
396
+ body: JSON.stringify({
397
+ userId: m,
398
+ messageTemplate: c,
399
+ destination: d
400
+ })
401
+ }), s = yield t.json();
402
+ if (t.ok)
403
+ i(9, a = s.id), I = !1, U();
404
+ else
405
+ throw I = !0, new Error("Failed to fetch");
406
+ } catch (t) {
407
+ I = !0, console.error(t);
408
+ }
409
+ }), U = () => {
410
+ T > 0 ? i(4, T--, T) : (clearInterval(M), i(3, M = !1), i(4, T = 60));
411
+ }, B = () => {
412
+ let t = document.createElement("style");
413
+ t.innerHTML = y, h.appendChild(t);
414
+ }, O = () => {
415
+ let t = new URL(F), s = document.createElement("style");
416
+ fetch(t.href).then((x) => x.text()).then((x) => {
417
+ s.innerHTML = x, setTimeout(
418
+ () => {
419
+ h.appendChild(s);
420
+ },
421
+ 1
422
+ ), setTimeout(
423
+ () => {
424
+ },
425
+ 500
426
+ );
427
+ });
428
+ }, A = () => {
429
+ V < 60 && i(3, M = setInterval(
430
+ () => {
431
+ U();
432
+ },
433
+ 1e3
434
+ ));
435
+ }, b = (t) => {
436
+ !S.numeric.test(t.key) && t.keyCode !== 8 && t.keyCode !== 9 && t.keyCode !== 46 && t.preventDefault();
437
+ };
438
+ le(() => {
439
+ if (!m || !d) {
440
+ let t = JSON.parse(localStorage.getItem("playerData"));
441
+ i(10, m = t.playerid), i(11, d = t.number);
442
+ }
443
+ A();
444
+ });
445
+ function f() {
446
+ j = this.value, i(1, j);
447
+ }
448
+ const v = (t) => b(t);
449
+ function g(t) {
450
+ de[t ? "unshift" : "push"](() => {
451
+ h = t, i(0, h);
452
+ });
453
+ }
454
+ return o.$$set = (t) => {
455
+ "endpoint" in t && i(12, r = t.endpoint), "tokenid" in t && i(9, a = t.tokenid), "playerid" in t && i(10, m = t.playerid), "smstemplate" in t && i(13, c = t.smstemplate), "number" in t && i(11, d = t.number), "clientstyling" in t && i(14, y = t.clientstyling), "clientstylingurl" in t && i(15, F = t.clientstylingurl), "translationurl" in t && i(16, u = t.translationurl);
456
+ }, o.$$.update = () => {
457
+ o.$$.dirty & /*tokenid, playerid, endpoint*/
458
+ 5632, o.$$.dirty & /*clientstyling, customStylingContainer*/
459
+ 16385 && y && h && B(), o.$$.dirty & /*clientstylingurl, customStylingContainer*/
460
+ 32769 && F && h && O(), o.$$.dirty & /*translationurl*/
461
+ 65536 && u && P();
462
+ }, [
463
+ h,
464
+ j,
465
+ _,
466
+ M,
467
+ T,
468
+ n,
469
+ D,
470
+ L,
471
+ b,
472
+ a,
473
+ m,
474
+ d,
475
+ r,
476
+ c,
477
+ y,
478
+ F,
479
+ u,
480
+ f,
481
+ v,
482
+ g
483
+ ];
484
+ }
485
+ class he extends ie {
486
+ constructor(e) {
487
+ super(), oe(
488
+ this,
489
+ e,
490
+ ye,
491
+ pe,
492
+ re,
493
+ {
494
+ endpoint: 12,
495
+ tokenid: 9,
496
+ playerid: 10,
497
+ smstemplate: 13,
498
+ number: 11,
499
+ clientstyling: 14,
500
+ clientstylingurl: 15,
501
+ translationurl: 16
502
+ },
503
+ fe
504
+ );
505
+ }
506
+ get endpoint() {
507
+ return this.$$.ctx[12];
508
+ }
509
+ set endpoint(e) {
510
+ this.$$set({ endpoint: e }), E();
511
+ }
512
+ get tokenid() {
513
+ return this.$$.ctx[9];
514
+ }
515
+ set tokenid(e) {
516
+ this.$$set({ tokenid: e }), E();
517
+ }
518
+ get playerid() {
519
+ return this.$$.ctx[10];
520
+ }
521
+ set playerid(e) {
522
+ this.$$set({ playerid: e }), E();
523
+ }
524
+ get smstemplate() {
525
+ return this.$$.ctx[13];
526
+ }
527
+ set smstemplate(e) {
528
+ this.$$set({ smstemplate: e }), E();
529
+ }
530
+ get number() {
531
+ return this.$$.ctx[11];
532
+ }
533
+ set number(e) {
534
+ this.$$set({ number: e }), E();
535
+ }
536
+ get clientstyling() {
537
+ return this.$$.ctx[14];
538
+ }
539
+ set clientstyling(e) {
540
+ this.$$set({ clientstyling: e }), E();
541
+ }
542
+ get clientstylingurl() {
543
+ return this.$$.ctx[15];
544
+ }
545
+ set clientstylingurl(e) {
546
+ this.$$set({ clientstylingurl: e }), E();
547
+ }
548
+ get translationurl() {
549
+ return this.$$.ctx[16];
550
+ }
551
+ set translationurl(e) {
552
+ this.$$set({ translationurl: e }), E();
553
+ }
554
+ }
555
+ ce(he, { endpoint: {}, tokenid: {}, playerid: {}, smstemplate: {}, number: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
556
+ export {
557
+ he as default
558
+ };