@everymatrix/player-sms-verification 1.54.12 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'player-sms-verification';
24
- const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -1170,12 +1170,17 @@ var connectedCallback = (elm) => {
1170
1170
  }
1171
1171
  };
1172
1172
  var disconnectInstance = (instance, elm) => {
1173
+ {
1174
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1175
+ }
1173
1176
  };
1174
1177
  var disconnectedCallback = async (elm) => {
1175
1178
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1176
1179
  const hostRef = getHostRef(elm);
1177
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1178
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1180
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1181
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1182
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1183
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1179
1184
  }
1180
1185
  }
1181
1186
  if (rootAppliedStyles.has(elm)) {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b3d161e5.js');
5
+ const index = require('./index-2de7dcf7.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
11
+ return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b3d161e5.js');
5
+ const index = require('./index-2de7dcf7.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -194,6 +194,63 @@ const translate = (key, customLang) => {
194
194
  return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
195
195
  };
196
196
 
197
+ /**
198
+ * @name setClientStyling
199
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
200
+ * @param {HTMLElement} stylingContainer The reference element of the widget
201
+ * @param {string} clientStyling The style content
202
+ */
203
+ function setClientStyling(stylingContainer, clientStyling) {
204
+ if (stylingContainer) {
205
+ const sheet = document.createElement('style');
206
+ sheet.innerHTML = clientStyling;
207
+ stylingContainer.appendChild(sheet);
208
+ }
209
+ }
210
+
211
+ /**
212
+ * @name setClientStylingURL
213
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
214
+ * @param {HTMLElement} stylingContainer The reference element of the widget
215
+ * @param {string} clientStylingUrl The URL of the style content
216
+ */
217
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
218
+ const url = new URL(clientStylingUrl);
219
+
220
+ fetch(url.href)
221
+ .then((res) => res.text())
222
+ .then((data) => {
223
+ const cssFile = document.createElement('style');
224
+ cssFile.innerHTML = data;
225
+ if (stylingContainer) {
226
+ stylingContainer.appendChild(cssFile);
227
+ }
228
+ })
229
+ .catch((err) => {
230
+ console.error('There was an error while trying to load client styling from URL', err);
231
+ });
232
+ }
233
+
234
+ /**
235
+ * @name setStreamLibrary
236
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
237
+ * @param {HTMLElement} stylingContainer The highest element of the widget
238
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
239
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
240
+ */
241
+ function setStreamStyling(stylingContainer, domain, subscription) {
242
+ if (window.emMessageBus) {
243
+ const sheet = document.createElement('style');
244
+
245
+ window.emMessageBus.subscribe(domain, (data) => {
246
+ sheet.innerHTML = data;
247
+ if (stylingContainer) {
248
+ stylingContainer.appendChild(sheet);
249
+ }
250
+ });
251
+ }
252
+ }
253
+
197
254
  const playerSmsVerificationCss = ":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{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;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{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;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";
198
255
  const PlayerSmsVerificationStyle0 = playerSmsVerificationCss;
199
256
 
@@ -223,30 +280,17 @@ const PlayerSmsVerification = class {
223
280
  this.btnResendCount = 60;
224
281
  this.isCodeSentOnce = false;
225
282
  this.isBtnSendAvailable = true;
226
- this.setClientStyling = () => {
227
- let sheet = document.createElement('style');
228
- sheet.innerHTML = this.clientStyling;
229
- this.stylingContainer.prepend(sheet);
230
- };
231
- this.setClientStylingURL = () => {
232
- let url = new URL(this.clientStylingUrl);
233
- let cssFile = document.createElement('style');
234
- fetch(url.href)
235
- .then((res) => res.text())
236
- .then((data) => {
237
- cssFile.innerHTML = data;
238
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
239
- })
240
- .catch((err) => {
241
- console.log('error ', err);
242
- });
243
- };
244
283
  }
245
- updateClientStyling() {
246
- if (this.clientStyling)
247
- this.setClientStyling();
248
- if (this.clientStylingUrl)
249
- this.setClientStylingURL();
284
+ handleClientStylingChange(newValue, oldValue) {
285
+ if (newValue != oldValue) {
286
+ setClientStyling(this.stylingContainer, this.clientStyling);
287
+ }
288
+ }
289
+ handleClientStylingUrlChange(newValue, oldValue) {
290
+ if (newValue != oldValue) {
291
+ if (this.clientStylingUrl)
292
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
293
+ }
250
294
  }
251
295
  componentWillLoad() {
252
296
  if (this.translationUrl) {
@@ -255,10 +299,17 @@ const PlayerSmsVerification = class {
255
299
  }
256
300
  }
257
301
  componentDidLoad() {
258
- if (this.clientStyling)
259
- this.setClientStyling();
260
- if (this.clientStylingUrl)
261
- this.setClientStylingURL();
302
+ if (this.stylingContainer) {
303
+ if (window.emMessageBus != undefined) {
304
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
305
+ }
306
+ else {
307
+ if (this.clientStyling)
308
+ setClientStyling(this.stylingContainer, this.clientStyling);
309
+ if (this.clientStylingUrl)
310
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
311
+ }
312
+ }
262
313
  }
263
314
  startTimerBtnResendCode() {
264
315
  this.isBtnSendAvailable = false;
@@ -363,14 +414,17 @@ const PlayerSmsVerification = class {
363
414
  handleInput(event) {
364
415
  this.code = event.target.value;
365
416
  }
417
+ disconnectedCallback() {
418
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
419
+ }
366
420
  render() {
367
- return index.h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, index.h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, index.h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), index.h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), index.h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, index.h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), index.h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, index.h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
421
+ return index.h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, index.h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, index.h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), index.h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), index.h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, index.h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), index.h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, index.h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
368
422
  ? index.h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
369
- : index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), index.h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, index.h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), index.h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
423
+ : index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), index.h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, index.h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), index.h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
370
424
  }
371
425
  static get watchers() { return {
372
- "clientStyling": ["updateClientStyling"],
373
- "clientStylingUrl": ["updateClientStyling"]
426
+ "clientStyling": ["handleClientStylingChange"],
427
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
374
428
  }; }
375
429
  };
376
430
  PlayerSmsVerification.style = PlayerSmsVerificationStyle0;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b3d161e5.js');
5
+ const index = require('./index-2de7dcf7.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
22
+ return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  export class PlayerSmsVerification {
4
5
  constructor() {
5
6
  /**
@@ -25,30 +26,17 @@ export class PlayerSmsVerification {
25
26
  this.btnResendCount = 60;
26
27
  this.isCodeSentOnce = false;
27
28
  this.isBtnSendAvailable = true;
28
- this.setClientStyling = () => {
29
- let sheet = document.createElement('style');
30
- sheet.innerHTML = this.clientStyling;
31
- this.stylingContainer.prepend(sheet);
32
- };
33
- this.setClientStylingURL = () => {
34
- let url = new URL(this.clientStylingUrl);
35
- let cssFile = document.createElement('style');
36
- fetch(url.href)
37
- .then((res) => res.text())
38
- .then((data) => {
39
- cssFile.innerHTML = data;
40
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
41
- })
42
- .catch((err) => {
43
- console.log('error ', err);
44
- });
45
- };
46
29
  }
47
- updateClientStyling() {
48
- if (this.clientStyling)
49
- this.setClientStyling();
50
- if (this.clientStylingUrl)
51
- this.setClientStylingURL();
30
+ handleClientStylingChange(newValue, oldValue) {
31
+ if (newValue != oldValue) {
32
+ setClientStyling(this.stylingContainer, this.clientStyling);
33
+ }
34
+ }
35
+ handleClientStylingUrlChange(newValue, oldValue) {
36
+ if (newValue != oldValue) {
37
+ if (this.clientStylingUrl)
38
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
39
+ }
52
40
  }
53
41
  componentWillLoad() {
54
42
  if (this.translationUrl) {
@@ -57,10 +45,17 @@ export class PlayerSmsVerification {
57
45
  }
58
46
  }
59
47
  componentDidLoad() {
60
- if (this.clientStyling)
61
- this.setClientStyling();
62
- if (this.clientStylingUrl)
63
- this.setClientStylingURL();
48
+ if (this.stylingContainer) {
49
+ if (window.emMessageBus != undefined) {
50
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
51
+ }
52
+ else {
53
+ if (this.clientStyling)
54
+ setClientStyling(this.stylingContainer, this.clientStyling);
55
+ if (this.clientStylingUrl)
56
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
57
+ }
58
+ }
64
59
  }
65
60
  startTimerBtnResendCode() {
66
61
  this.isBtnSendAvailable = false;
@@ -165,10 +160,13 @@ export class PlayerSmsVerification {
165
160
  handleInput(event) {
166
161
  this.code = event.target.value;
167
162
  }
163
+ disconnectedCallback() {
164
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
165
+ }
168
166
  render() {
169
- return h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
167
+ return h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
170
168
  ? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
171
- : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
169
+ : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
172
170
  }
173
171
  static get is() { return "player-sms-verification"; }
174
172
  static get encapsulation() { return "shadow"; }
@@ -282,6 +280,25 @@ export class PlayerSmsVerification {
282
280
  "reflect": true,
283
281
  "defaultValue": "''"
284
282
  },
283
+ "mbSource": {
284
+ "type": "string",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "string",
288
+ "resolved": "string",
289
+ "references": {}
290
+ },
291
+ "required": false,
292
+ "optional": false,
293
+ "docs": {
294
+ "tags": [],
295
+ "text": ""
296
+ },
297
+ "getter": false,
298
+ "setter": false,
299
+ "attribute": "mb-source",
300
+ "reflect": false
301
+ },
285
302
  "translationUrl": {
286
303
  "type": "string",
287
304
  "mutable": false,
@@ -315,10 +332,10 @@ export class PlayerSmsVerification {
315
332
  static get watchers() {
316
333
  return [{
317
334
  "propName": "clientStyling",
318
- "methodName": "updateClientStyling"
335
+ "methodName": "handleClientStylingChange"
319
336
  }, {
320
337
  "propName": "clientStylingUrl",
321
- "methodName": "updateClientStyling"
338
+ "methodName": "handleClientStylingUrlChange"
322
339
  }];
323
340
  }
324
341
  }
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'player-sms-verification';
2
- const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -1148,12 +1148,17 @@ var connectedCallback = (elm) => {
1148
1148
  }
1149
1149
  };
1150
1150
  var disconnectInstance = (instance, elm) => {
1151
+ {
1152
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1153
+ }
1151
1154
  };
1152
1155
  var disconnectedCallback = async (elm) => {
1153
1156
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1154
1157
  const hostRef = getHostRef(elm);
1155
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1156
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1158
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1159
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1160
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1161
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1157
1162
  }
1158
1163
  }
1159
1164
  if (rootAppliedStyles.has(elm)) {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-36c69749.js';
2
- export { s as setNonce } from './index-36c69749.js';
1
+ import { b as bootstrapLazy } from './index-3ab66176.js';
2
+ export { s as setNonce } from './index-3ab66176.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
8
+ return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-36c69749.js';
1
+ import { r as registerInstance, h } from './index-3ab66176.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -190,6 +190,63 @@ const translate = (key, customLang) => {
190
190
  return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
191
191
  };
192
192
 
193
+ /**
194
+ * @name setClientStyling
195
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
196
+ * @param {HTMLElement} stylingContainer The reference element of the widget
197
+ * @param {string} clientStyling The style content
198
+ */
199
+ function setClientStyling(stylingContainer, clientStyling) {
200
+ if (stylingContainer) {
201
+ const sheet = document.createElement('style');
202
+ sheet.innerHTML = clientStyling;
203
+ stylingContainer.appendChild(sheet);
204
+ }
205
+ }
206
+
207
+ /**
208
+ * @name setClientStylingURL
209
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
210
+ * @param {HTMLElement} stylingContainer The reference element of the widget
211
+ * @param {string} clientStylingUrl The URL of the style content
212
+ */
213
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
214
+ const url = new URL(clientStylingUrl);
215
+
216
+ fetch(url.href)
217
+ .then((res) => res.text())
218
+ .then((data) => {
219
+ const cssFile = document.createElement('style');
220
+ cssFile.innerHTML = data;
221
+ if (stylingContainer) {
222
+ stylingContainer.appendChild(cssFile);
223
+ }
224
+ })
225
+ .catch((err) => {
226
+ console.error('There was an error while trying to load client styling from URL', err);
227
+ });
228
+ }
229
+
230
+ /**
231
+ * @name setStreamLibrary
232
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
233
+ * @param {HTMLElement} stylingContainer The highest element of the widget
234
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
235
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
236
+ */
237
+ function setStreamStyling(stylingContainer, domain, subscription) {
238
+ if (window.emMessageBus) {
239
+ const sheet = document.createElement('style');
240
+
241
+ window.emMessageBus.subscribe(domain, (data) => {
242
+ sheet.innerHTML = data;
243
+ if (stylingContainer) {
244
+ stylingContainer.appendChild(sheet);
245
+ }
246
+ });
247
+ }
248
+ }
249
+
193
250
  const playerSmsVerificationCss = ":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{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;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{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;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";
194
251
  const PlayerSmsVerificationStyle0 = playerSmsVerificationCss;
195
252
 
@@ -219,30 +276,17 @@ const PlayerSmsVerification = class {
219
276
  this.btnResendCount = 60;
220
277
  this.isCodeSentOnce = false;
221
278
  this.isBtnSendAvailable = true;
222
- this.setClientStyling = () => {
223
- let sheet = document.createElement('style');
224
- sheet.innerHTML = this.clientStyling;
225
- this.stylingContainer.prepend(sheet);
226
- };
227
- this.setClientStylingURL = () => {
228
- let url = new URL(this.clientStylingUrl);
229
- let cssFile = document.createElement('style');
230
- fetch(url.href)
231
- .then((res) => res.text())
232
- .then((data) => {
233
- cssFile.innerHTML = data;
234
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
235
- })
236
- .catch((err) => {
237
- console.log('error ', err);
238
- });
239
- };
240
279
  }
241
- updateClientStyling() {
242
- if (this.clientStyling)
243
- this.setClientStyling();
244
- if (this.clientStylingUrl)
245
- this.setClientStylingURL();
280
+ handleClientStylingChange(newValue, oldValue) {
281
+ if (newValue != oldValue) {
282
+ setClientStyling(this.stylingContainer, this.clientStyling);
283
+ }
284
+ }
285
+ handleClientStylingUrlChange(newValue, oldValue) {
286
+ if (newValue != oldValue) {
287
+ if (this.clientStylingUrl)
288
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
289
+ }
246
290
  }
247
291
  componentWillLoad() {
248
292
  if (this.translationUrl) {
@@ -251,10 +295,17 @@ const PlayerSmsVerification = class {
251
295
  }
252
296
  }
253
297
  componentDidLoad() {
254
- if (this.clientStyling)
255
- this.setClientStyling();
256
- if (this.clientStylingUrl)
257
- this.setClientStylingURL();
298
+ if (this.stylingContainer) {
299
+ if (window.emMessageBus != undefined) {
300
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
301
+ }
302
+ else {
303
+ if (this.clientStyling)
304
+ setClientStyling(this.stylingContainer, this.clientStyling);
305
+ if (this.clientStylingUrl)
306
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
307
+ }
308
+ }
258
309
  }
259
310
  startTimerBtnResendCode() {
260
311
  this.isBtnSendAvailable = false;
@@ -359,14 +410,17 @@ const PlayerSmsVerification = class {
359
410
  handleInput(event) {
360
411
  this.code = event.target.value;
361
412
  }
413
+ disconnectedCallback() {
414
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
415
+ }
362
416
  render() {
363
- return h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
417
+ return h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
364
418
  ? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
365
- : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
419
+ : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
366
420
  }
367
421
  static get watchers() { return {
368
- "clientStyling": ["updateClientStyling"],
369
- "clientStylingUrl": ["updateClientStyling"]
422
+ "clientStyling": ["handleClientStylingChange"],
423
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
370
424
  }; }
371
425
  };
372
426
  PlayerSmsVerification.style = PlayerSmsVerificationStyle0;
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-36c69749.js';
2
- export { s as setNonce } from './index-36c69749.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-3ab66176.js';
2
+ export { s as setNonce } from './index-3ab66176.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
19
+ return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
20
20
  });
@@ -1 +1 @@
1
- import{r as e,h as r}from"./p-30f94a36.js";const i={en:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},ro:{title:"Verificare SMS necesară",subtitle:"Trebuie să vă verificați numărul de telefon",btnSend:"Trimite cod",btnResend:"Retrimite cod",btnActivate:"Activează",msgEnterCode:"Introduceți codul de verificare primit pe numărul dvs.",msgResendNotice:"Un nou cod de verificare a fost trimis pe numărul dvs. de telefon",errGenerateCode:"A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod",errInvalidCode:"Codul este incorect",errExceededAttempts:"Prea multe încercări. Încercați din nou mai târziu",errExpiredToken:"Codul a expirat, retrimiteți codul",errInvalidPhone:"Numărul de telefon furnizat este invalid"},fr:{title:"Vérification SMS requise",subtitle:"Vous devez vérifier votre numéro de téléphone",btnSend:"Envoyer le code",btnResend:"Renvoyer le code",btnActivate:"Activer",msgEnterCode:"Veuillez entrer le code de vérification reçu sur votre numéro",msgResendNotice:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone",errGenerateCode:"Une erreur est survenue lors de la génération de votre code. Cliquez sur le bouton renvoyer pour générer un nouveau code",errInvalidCode:"Le code est incorrect",errExceededAttempts:"Trop de tentatives. Réessayez plus tard",errExpiredToken:"Le code a expiré, renvoyez le code",errInvalidPhone:"Le numéro de téléphone fourni est invalide"},hu:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},tr:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},el:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},es:{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},pt:{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"},hr:{title:"SMS verifikacija je potrebna",subtitle:"Potrebno je verificirati broj mobitela. Verifikacijski kod je poslan",btnSend:"Pošalji kod",btnResend:"Ponovno pošalji",btnActivate:"Aktiviraj",msgEnterCode:"Molimo unesite verifikacijski kod koji je poslan na broj mobitela",msgResendNotice:"Novi verifikacijski kod je poslan na broj mobitela",errGenerateCode:"Došlo je do pogreške prilikom generiranja Vašeg verifikacijskog koda. Molimo da odaberete Ponovno pošalji kako bismo poslali novi kod",errInvalidCode:"SMS kod nije ispravan",errExceededAttempts:"Previše pokušaja. Pokušajte ponovno kasnije",errExpiredToken:"Verifikacijski kod je istekao, ponovno zatražite kod",errInvalidPhone:"Navedeni telefonski broj je nevažeći"},de:{title:"SMS-Verifizierung erforderlich",subtitle:"Sie müssen Ihre Telefonnummer verifizieren",btnSend:"Code senden",btnResend:"Code erneut senden",btnActivate:"Aktivieren",msgEnterCode:"Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben",msgResendNotice:"Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet",errGenerateCode:"Es ist ein Fehler bei der Generierung Ihres Codes aufgetreten. Klicken Sie auf die Schaltfläche zum erneuten Senden, um einen neuen Code zu generieren",errInvalidCode:"Der Code ist falsch",errExceededAttempts:"Zu viele Versuche. Bitte versuchen Sie es später erneut",errExpiredToken:"Der Code ist abgelaufen, bitte erneut senden",errInvalidPhone:"Die angegebene Telefonnummer ist ungültig"},"es-mx":{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},"pt-br":{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"}},t=(e,r)=>i[void 0!==r?r:"en"][e],o=class{constructor(r){e(this,r),this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.code="",this.errMsg="",this.msgEnterCode="",this.btnResendCount=60,this.isCodeSentOnce=!1,this.isBtnSendAvailable=!0,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),r=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{r.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(r)}),1)})).catch((e=>{console.log("error ",e)}))}}updateClientStyling(){this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL()}componentWillLoad(){if(this.translationUrl)return e=this.translationUrl,new Promise((r=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((r=>{for(let t in e[r])i[r][t]=e[r][t]})),r(!0)}))}));var e}componentDidLoad(){this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL()}startTimerBtnResendCode(){this.isBtnSendAvailable=!1,this.tempBtnResendCount=this.btnResendCount,this.btnResendTimer=setInterval((()=>{this.tempBtnResendCount--,this.tempBtnResendCount<0&&(clearInterval(this.btnResendTimer),this.isBtnSendAvailable=!0)}),1e3)}setErrMsg(e){"INVALID_CODE"===e?this.errMsg="errInvalidCode":"BLOCK_USER_INCORRECT_CODE"===e?this.errMsg="errExceededAttempts":"ExpiredToken"===e?this.errMsg="errExpiredToken":"errGenerateCode"===e?this.errMsg="errGenerateCode":"INVALID_PHONE_NUMBER"===e&&(this.errMsg="errInvalidPhone")}debounce(e,r){return function(...i){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e.apply(this,i)}),r)}}handleSendCode(){this.errMsg="";let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);const r={method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({userId:`${this.userId}`})};fetch(e.href,r).then((()=>{this.msgEnterCode="msgEnterCode",this.isCodeSentOnce&&this.startTimerBtnResendCode(),this.isCodeSentOnce=!0})).catch((e=>{this.setErrMsg("errGenerateCode"),window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)}))}handleCheckCode(){let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);e.searchParams.append("userId",this.userId),e.searchParams.append("code",this.code),fetch(e.href,{method:"GET",headers:{accept:"application/json"}}).then((e=>e.json())).then((e=>{200===e.httpStatusCode?(this.errMsg="",window.postMessage({type:"SmsVerificationSuccess"},window.location.href)):e.thirdPartyResponse&&(this.setErrMsg(e.thirdPartyResponse.message),"errExceededAttempts"===this.errMsg&&window.postMessage({type:"SmsVerificationErrExceededAttempts",data:t(this.errMsg)},window.location.href))})).catch((e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)})).finally((()=>{this.code=""}))}handleInput(e){this.code=e.target.value}render(){return r("div",{key:"f9433650b2e4a6c674be0bfec4ed043dcfb89e4f",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},r("div",{key:"5f232e9b271aec1ae71b37b5790593703088639f",class:"PlayerSmsVerificationTitleContainer"},r("h4",{key:"bb197f37b8bf50c4dd18a14d3961292fc195363f",class:"PlayerSmsVerificationTitle"},t("title",this.lang)),r("p",{key:"c20c1efb474c107aa560a9d4880f98df6467254a",class:"PlayerSmsVerificationSubtitle"},t("subtitle",this.lang))),r("div",{key:"99e96a1bd91e4c94813c4f29279a37f3de7cd037",class:"PlayerSmsVerificationContainer"},r("p",{key:"20762aa83d74261f01d834699159cb8f2a76038c",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},t(this.msgEnterCode,this.lang)),r("div",{key:"d55c2e83e5a97451051a0c8e6d16c00c43ea00df",class:"PlayerSmsVerificationInput"},r("input",{key:"94acb6c934dde4f9b8b8476306c9851ab5ebb642",type:"text",onInput:e=>this.handleInput(e),value:this.code})),this.errMsg?r("p",{class:"PlayerSmsVerificationErrMsg"},t(this.errMsg,this.lang)):r("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},t("msgResendNotice",this.lang)),!this.errMsg&&r("p",{key:"1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2",class:"PlayerSMSErrorTextPlaceholder"})),r("div",{key:"722cc5e47fd4f45eca29624aa1227f1f313f3de3",class:"PlayerSmsVerificationButtonContainer"},r("button",{key:"1413cb8915f12ab35cb87cd641d88252f520a6ae",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleSendCode.bind(this),850),disabled:!this.isBtnSendAvailable},this.isCodeSentOnce?this.isBtnSendAvailable?t("btnResend",this.lang):this.tempBtnResendCount:t("btnSend",this.lang)),r("button",{key:"19cf151085f9b983565ff9df0851cd3256776842",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleCheckCode.bind(this),850),disabled:!this.isCodeSentOnce||""===this.code||void 0===this.code},t("btnActivate",this.lang))))}static get watchers(){return{clientStyling:["updateClientStyling"],clientStylingUrl:["updateClientStyling"]}}};o.style=":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{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;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{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;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";export{o as player_sms_verification}
1
+ import{r as e,h as i}from"./p-e4128523.js";const r={en:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},ro:{title:"Verificare SMS necesară",subtitle:"Trebuie să vă verificați numărul de telefon",btnSend:"Trimite cod",btnResend:"Retrimite cod",btnActivate:"Activează",msgEnterCode:"Introduceți codul de verificare primit pe numărul dvs.",msgResendNotice:"Un nou cod de verificare a fost trimis pe numărul dvs. de telefon",errGenerateCode:"A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod",errInvalidCode:"Codul este incorect",errExceededAttempts:"Prea multe încercări. Încercați din nou mai târziu",errExpiredToken:"Codul a expirat, retrimiteți codul",errInvalidPhone:"Numărul de telefon furnizat este invalid"},fr:{title:"Vérification SMS requise",subtitle:"Vous devez vérifier votre numéro de téléphone",btnSend:"Envoyer le code",btnResend:"Renvoyer le code",btnActivate:"Activer",msgEnterCode:"Veuillez entrer le code de vérification reçu sur votre numéro",msgResendNotice:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone",errGenerateCode:"Une erreur est survenue lors de la génération de votre code. Cliquez sur le bouton renvoyer pour générer un nouveau code",errInvalidCode:"Le code est incorrect",errExceededAttempts:"Trop de tentatives. Réessayez plus tard",errExpiredToken:"Le code a expiré, renvoyez le code",errInvalidPhone:"Le numéro de téléphone fourni est invalide"},hu:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},tr:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},el:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},es:{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},pt:{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"},hr:{title:"SMS verifikacija je potrebna",subtitle:"Potrebno je verificirati broj mobitela. Verifikacijski kod je poslan",btnSend:"Pošalji kod",btnResend:"Ponovno pošalji",btnActivate:"Aktiviraj",msgEnterCode:"Molimo unesite verifikacijski kod koji je poslan na broj mobitela",msgResendNotice:"Novi verifikacijski kod je poslan na broj mobitela",errGenerateCode:"Došlo je do pogreške prilikom generiranja Vašeg verifikacijskog koda. Molimo da odaberete Ponovno pošalji kako bismo poslali novi kod",errInvalidCode:"SMS kod nije ispravan",errExceededAttempts:"Previše pokušaja. Pokušajte ponovno kasnije",errExpiredToken:"Verifikacijski kod je istekao, ponovno zatražite kod",errInvalidPhone:"Navedeni telefonski broj je nevažeći"},de:{title:"SMS-Verifizierung erforderlich",subtitle:"Sie müssen Ihre Telefonnummer verifizieren",btnSend:"Code senden",btnResend:"Code erneut senden",btnActivate:"Aktivieren",msgEnterCode:"Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben",msgResendNotice:"Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet",errGenerateCode:"Es ist ein Fehler bei der Generierung Ihres Codes aufgetreten. Klicken Sie auf die Schaltfläche zum erneuten Senden, um einen neuen Code zu generieren",errInvalidCode:"Der Code ist falsch",errExceededAttempts:"Zu viele Versuche. Bitte versuchen Sie es später erneut",errExpiredToken:"Der Code ist abgelaufen, bitte erneut senden",errInvalidPhone:"Die angegebene Telefonnummer ist ungültig"},"es-mx":{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},"pt-br":{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"}},t=(e,i)=>r[void 0!==i?i:"en"][e];function n(e,i){if(e){const r=document.createElement("style");r.innerHTML=i,e.appendChild(r)}}function o(e,i){const r=new URL(i);fetch(r.href).then((e=>e.text())).then((i=>{const r=document.createElement("style");r.innerHTML=i,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const a=class{constructor(i){e(this,i),this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.code="",this.errMsg="",this.msgEnterCode="",this.btnResendCount=60,this.isCodeSentOnce=!1,this.isBtnSendAvailable=!0}handleClientStylingChange(e,i){e!=i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.translationUrl)return e=this.translationUrl,new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let t in e[i])r[i][t]=e[i][t]})),i(!0)}))}));var e}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,i){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{r.innerHTML=i,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)))}startTimerBtnResendCode(){this.isBtnSendAvailable=!1,this.tempBtnResendCount=this.btnResendCount,this.btnResendTimer=setInterval((()=>{this.tempBtnResendCount--,this.tempBtnResendCount<0&&(clearInterval(this.btnResendTimer),this.isBtnSendAvailable=!0)}),1e3)}setErrMsg(e){"INVALID_CODE"===e?this.errMsg="errInvalidCode":"BLOCK_USER_INCORRECT_CODE"===e?this.errMsg="errExceededAttempts":"ExpiredToken"===e?this.errMsg="errExpiredToken":"errGenerateCode"===e?this.errMsg="errGenerateCode":"INVALID_PHONE_NUMBER"===e&&(this.errMsg="errInvalidPhone")}debounce(e,i){return function(...r){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e.apply(this,r)}),i)}}handleSendCode(){this.errMsg="";let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);const i={method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({userId:`${this.userId}`})};fetch(e.href,i).then((()=>{this.msgEnterCode="msgEnterCode",this.isCodeSentOnce&&this.startTimerBtnResendCode(),this.isCodeSentOnce=!0})).catch((e=>{this.setErrMsg("errGenerateCode"),window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)}))}handleCheckCode(){let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);e.searchParams.append("userId",this.userId),e.searchParams.append("code",this.code),fetch(e.href,{method:"GET",headers:{accept:"application/json"}}).then((e=>e.json())).then((e=>{200===e.httpStatusCode?(this.errMsg="",window.postMessage({type:"SmsVerificationSuccess"},window.location.href)):e.thirdPartyResponse&&(this.setErrMsg(e.thirdPartyResponse.message),"errExceededAttempts"===this.errMsg&&window.postMessage({type:"SmsVerificationErrExceededAttempts",data:t(this.errMsg)},window.location.href))})).catch((e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)})).finally((()=>{this.code=""}))}handleInput(e){this.code=e.target.value}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"da8e1da7cf6a49519ff1c6cae3eb17ee288237f2",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},i("div",{key:"f6d7f84527ec88f6027e2ba717bb2a92fe6175e9",class:"PlayerSmsVerificationTitleContainer"},i("h4",{key:"37f471083259e90b5b54e0a76f1fcff7bb40c14c",class:"PlayerSmsVerificationTitle"},t("title",this.lang)),i("p",{key:"545c12575aa056b7fc92e60f95db351c2938f85d",class:"PlayerSmsVerificationSubtitle"},t("subtitle",this.lang))),i("div",{key:"9277f7f1147b1f245393be66e66e81f1ae03f373",class:"PlayerSmsVerificationContainer"},i("p",{key:"a37c285eb9aade13bc80cc8d2fa48c3818f1316b",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},t(this.msgEnterCode,this.lang)),i("div",{key:"57da383cbb9d70f9d5f656f7c9775d9311cdc923",class:"PlayerSmsVerificationInput"},i("input",{key:"cd34b784a81c9eab6b0c26dc03c5e7aafd917824",type:"text",onInput:e=>this.handleInput(e),value:this.code})),this.errMsg?i("p",{class:"PlayerSmsVerificationErrMsg"},t(this.errMsg,this.lang)):i("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},t("msgResendNotice",this.lang)),!this.errMsg&&i("p",{key:"f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e",class:"PlayerSMSErrorTextPlaceholder"})),i("div",{key:"51fd4a63efdf720ef743148ca2126cf188b14d83",class:"PlayerSmsVerificationButtonContainer"},i("button",{key:"527ec723234d3479d120314a3bb09cea4d11224f",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleSendCode.bind(this),850),disabled:!this.isBtnSendAvailable},this.isCodeSentOnce?this.isBtnSendAvailable?t("btnResend",this.lang):this.tempBtnResendCount:t("btnSend",this.lang)),i("button",{key:"ac5d61787dcca55870e80e0d1c5423622b9caaf8",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleCheckCode.bind(this),850),disabled:!this.isCodeSentOnce||""===this.code||void 0===this.code},t("btnActivate",this.lang))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};a.style=":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{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;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{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;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";export{a as player_sms_verification}
@@ -1,2 +1,2 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>{t.set(n.t=e,n)},o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},f=u.document||{head:{}},a={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.l?w(b):a.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&a.raf(b)},w=e=>h().then(e),S=v(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return k(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!g(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?A(null,l):l),i=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},N=(e,t)=>null==e||g(e)?e:1&t?e+"":e,R=new WeakMap,T=e=>"sc-"+e.$,D=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=U(n);let s=U(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]!==l&&(e[t]=l);else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(W);t=t.replace(F,""),n&&a.rel(e,t,n,o),l&&a.ael(e,t,l,o)}}},H=/\s/,U=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||{},s=t.u||{};for(const e of q(Object.keys(o)))e in s||D(l,e,o[e],void 0,n,t.l);for(const e of q(Object.keys(s)))D(l,e,o[e],s[e],n,t.l)};function q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var G=!1,_=(e,t,n)=>{const l=t.h[n];let o,s,i=0;if(null!==l.i)o=l.v=f.createTextNode(l.i);else if(o=l.v=f.createElement(l.m),V(null,l,G),l.h)for(i=0;i<l.h.length;++i)s=_(e,l,i),s&&o.appendChild(s);return o["s-hn"]=C,o},z=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=_(null,n,o),i&&(l[o].v=i,Q(r,i,t)))},B=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),J=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,i=t.i;null===i?(V(e,t,G),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=t.length-1,h=t[0],d=t[a],p=l.length-1,m=l[0],y=l[p];for(;r<=a&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--a];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(I(h,m,o))J(h,m,o),h=t[++r],m=l[++c];else if(I(d,y,o))J(d,y,o),d=t[--a],y=l[--p];else if(I(h,y,o))J(h,y,o),Q(e,h.v,d.v.nextSibling),h=t[++r],y=l[--p];else if(I(d,m,o))J(d,m,o),Q(e,d.v,h.v),d=t[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(t[f]&&null!==t[f].p&&t[f].p===m.p){u=f;break}u>=0?(i=t[u],i.m!==m.m?s=_(t&&t[c],n,u):(J(i,m,o),t[u]=void 0,s=i.v),m=l[++c]):(s=_(t&&t[c],n,c),m=l[++c]),s&&Q(h.v.parentNode,s,h.v)}r>a?z(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&B(t,r,a)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),z(l,null,t,s,0,s.length-1)):!n&&null!==o&&B(o,0,o.length-1)):e.i!==i&&(l.data=i)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.S=()=>{t["s-p"].splice(n-1,1),l()})))}},Y=(e,t)=>{if(e.l|=16,!(4&e.l))return X(e,e.j),S((()=>Z(e,t)));e.l|=512},Z=(e,t)=>{const n=e.$hostElement$,l=e.t;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=ie(l,"componentWillLoad",void 0,n)),ee(o,(()=>ne(e,l,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=T(t),o=r.get(l);if(e=11===e.nodeType?e:f,o)if("string"==typeof o){let s,i=R.get(e=e.head||e);if(i||R.set(e,i=new Set),!i.has(l)){{s=document.querySelector(`[sty-id="${l}"]`)||f.createElement("style"),s.innerHTML=o;const i=null!=(n=a.k)?n:j(f);if(null!=i&&s.setAttribute("nonce",i),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);(10&l&&2&l||128&l)&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);le(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},le=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.C||A(null,null),i=(e=>e&&e.m===L)(t)?t:P(null,null,t);if(C=l.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.m=null,i.l|=4,e.C=i,i.v=s.v=l.shadowRoot||l,J(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,re(t),ie(n,"componentDidLoad",void 0,t),e.P(t),l||se()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>Y(e,!1))),e.l&=-517},se=()=>{w((()=>(e=>{const t=a.ce("appload",{detail:{namespace:"player-sms-verification"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n,l)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,l)}},re=e=>e.classList.add("hydrated"),ce=(e,t,l,o)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.A.get(t),u=i.l,f=i.t;if(l=N(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.A.set(t,l),f)){if(o.N&&128&u){const e=o.N[t];e&&e.map((e=>{try{f[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&Y(i,!1)}},ue=(e,t,l)=>{var o,s;const i=e.prototype;if(t.L||t.N||e.watchers){e.watchers&&!t.N&&(t.N=e.watchers);const r=Object.entries(null!=(o=t.L)?o:{});if(r.map((([e,[o]])=>{if(31&o||2&l&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.L[e][0]|=2048),r&&(t.L[e][0]|=4096),(1&l||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.L[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const l=n(this),o=l?l.t:i;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&o?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,N(s,o)),void ce(this,e,s=32&o?this[e]:i.$hostElement$[e],t)}{if(!(1&l&&4096&t.L[e][0]))return ce(this,e,s,t),void(1&l&&!i.t&&i.R.then((()=>{4096&t.L[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=N(s,o),ce(this,e,i.t[e],t)};i.t?n():i.R.then((()=>n()))}}})}})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.N)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.N)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},fe=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=f.head,v=y.querySelector("meta[charset]"),$=f.createElement("style"),b=[];let w,S=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],L:l[2],T:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.N=null!=(o=l[4])?o:{};const u=c.$,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,A:new Map};l.R=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?b.push(this):a.jmp((()=>(e=>{if(!(1&a.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.R)&&t.R.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.D){const o=((e,t)=>{const n=e.$.replace(/-/g,"_"),l=e.D;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((e=>(i.set(l,e),e[n])),(e=>{s(e,t.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(o&&"then"in o){const e=()=>{};l=await o,e()}else l=o;if(!l)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);l.isProxied||(n.N=l.watchers,ue(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(t){s(t,e)}t.l&=-9,t.l|=128,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=T(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Y(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){a.jmp((()=>(async e=>{if(!(1&a.l)){const t=n(e);(null==t?void 0:t.t)||(null==t?void 0:t.R)&&t.R.then((()=>{}))}R.has(e)&&R.delete(e),e.shadowRoot&&R.has(e.shadowRoot)&&R.delete(e.shadowRoot)})(this))),a.raf((()=>{var e;const t=n(this),l=b.findIndex((e=>e===this));l>-1&&b.splice(l,1),(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).R}};c.D=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(f,c,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=a.k)?o:j(f);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((e=>e.connectedCallback())):a.jmp((()=>w=setTimeout(se,30)))},ae=e=>a.k=e;export{fe as b,P as h,h as p,l as r,ae as s}
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>{t.set(n.t=e,n)},o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w(b):f.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(y),(p=m.length>0)&&f.raf(b)},w=e=>h().then(e),S=v(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>E,ok:()=>k,unwrap:()=>M,unwrapErr:()=>x});var k=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return O(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!g(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?A(null,l):l),i=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},N=(e,t)=>null==e||g(e)?e:1&t?e+"":e,R=new WeakMap,T=e=>"sc-"+e.$,D=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=U(n);let s=U(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]!==l&&(e[t]=l);else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(W);t=t.replace(F,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,U=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||{},s=t.u||{};for(const e of q(Object.keys(o)))e in s||D(l,e,o[e],void 0,n,t.l);for(const e of q(Object.keys(s)))D(l,e,o[e],s[e],n,t.l)};function q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var G=!1,_=(e,t,n)=>{const l=t.h[n];let o,s,i=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.m),V(null,l,G),l.h)for(i=0;i<l.h.length;++i)s=_(e,l,i),s&&o.appendChild(s);return o["s-hn"]=C,o},z=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=_(null,n,o),i&&(l[o].v=i,Q(r,i,t)))},B=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),J=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,i=t.i;null===i?(V(e,t,G),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;r<=f&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(I(h,m,o))J(h,m,o),h=t[++r],m=l[++c];else if(I(d,y,o))J(d,y,o),d=t[--f],y=l[--p];else if(I(h,y,o))J(h,y,o),Q(e,h.v,d.v.nextSibling),h=t[++r],y=l[--p];else if(I(d,m,o))J(d,m,o),Q(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=_(t&&t[c],n,u):(J(i,m,o),t[u]=void 0,s=i.v),m=l[++c]):(s=_(t&&t[c],n,c),m=l[++c]),s&&Q(h.v.parentNode,s,h.v)}r>f?z(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&B(t,r,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),z(l,null,t,s,0,s.length-1)):!n&&null!==o&&B(o,0,o.length-1)):e.i!==i&&(l.data=i)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.S=()=>{t["s-p"].splice(n-1,1),l()})))}},Y=(e,t)=>{if(e.l|=16,!(4&e.l))return X(e,e.j),S((()=>Z(e,t)));e.l|=512},Z=(e,t)=>{const n=e.$hostElement$,l=e.t;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=ie(l,"componentWillLoad",void 0,n)),ee(o,(()=>ne(e,l,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=T(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=R.get(e=e.head||e);if(i||R.set(e,i=new Set),!i.has(l)){{s=document.querySelector(`[sty-id="${l}"]`)||a.createElement("style"),s.innerHTML=o;const i=null!=(n=f.O)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);(10&l&&2&l||128&l)&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);le(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},le=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||A(null,null),i=(e=>e&&e.m===L)(t)?t:P(null,null,t);if(C=l.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.m=null,i.l|=4,e.C=i,i.v=s.v=l.shadowRoot||l,J(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,re(t),ie(n,"componentDidLoad",void 0,t),e.P(t),l||se()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>Y(e,!1))),e.l&=-517},se=()=>{w((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"player-sms-verification"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n,l)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,l)}},re=e=>e.classList.add("hydrated"),ce=(e,t,l,o)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.A.get(t),u=i.l,a=i.t;if(l=N(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.A.set(t,l),a)){if(o.N&&128&u){const e=o.N[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&Y(i,!1)}},ue=(e,t,l)=>{var o,s;const i=e.prototype;if(t.L||t.N||e.watchers){e.watchers&&!t.N&&(t.N=e.watchers);const r=Object.entries(null!=(o=t.L)?o:{});if(r.map((([e,[o]])=>{if(31&o||2&l&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.L[e][0]|=2048),r&&(t.L[e][0]|=4096),(1&l||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.L[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const l=n(this),o=l?l.t:i;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&o?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,N(s,o)),void ce(this,e,s=32&o?this[e]:i.$hostElement$[e],t)}{if(!(1&l&&4096&t.L[e][0]))return ce(this,e,s,t),void(1&l&&!i.t&&i.R.then((()=>{4096&t.L[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=N(s,o),ce(this,e,i.t[e],t)};i.t?n():i.R.then((()=>n()))}}})}})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.N)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.N)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ae=(e,t)=>{ie(e,"disconnectedCallback",void 0,t||e)},fe=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],L:l[2],T:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.N=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,A:new Map};l.R=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.R)&&t.R.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.D){const o=((e,t)=>{const n=e.$.replace(/-/g,"_"),l=e.D;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((e=>(i.set(l,e),e[n])),(e=>{s(e,t.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(o&&"then"in o){const e=()=>{};l=await o,e()}else l=o;if(!l)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);l.isProxied||(n.N=l.watchers,ue(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(t){s(t,e)}t.l&=-9,t.l|=128,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=T(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Y(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async e=>{if(!(1&f.l)){const t=n(e);(null==t?void 0:t.t)?ae(t.t,e):(null==t?void 0:t.R)&&t.R.then((()=>ae(t.t,e)))}R.has(e)&&R.delete(e),e.shadowRoot&&R.has(e.shadowRoot)&&R.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this),l=b.findIndex((e=>e===this));l>-1&&b.splice(l,1),(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).R}};c.D=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(g&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}S=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(se,30)))},he=e=>f.O=e;export{fe as b,P as h,h as p,l as r,he as s}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-30f94a36.js";export{s as setNonce}from"./p-30f94a36.js";import{g as e}from"./p-e1255160.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((async t=>(await e(),n([["p-a03171e7",[[1,"player-sms-verification",{endpoint:[513],userId:[513,"user-id"],lang:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],tempBtnResendCount:[32],code:[32],errMsg:[32],msgEnterCode:[32]},null,{clientStyling:["updateClientStyling"],clientStylingUrl:["updateClientStyling"]}]]]],t))));
1
+ import{p as n,b as e}from"./p-e4128523.js";export{s as setNonce}from"./p-e4128523.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["p-8b381f95",[[1,"player-sms-verification",{endpoint:[513],userId:[513,"user-id"],lang:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[513,"translation-url"],tempBtnResendCount:[32],code:[32],errMsg:[32],msgEnterCode:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],n))));
@@ -19,6 +19,7 @@ export declare class PlayerSmsVerification {
19
19
  * Client custom styling via url
20
20
  */
21
21
  clientStylingUrl: string;
22
+ mbSource: string;
22
23
  /**
23
24
  * Translations via URL
24
25
  */
@@ -33,16 +34,17 @@ export declare class PlayerSmsVerification {
33
34
  debounceTimer: ReturnType<typeof setTimeout>;
34
35
  btnResendTimer: ReturnType<typeof setInterval>;
35
36
  private stylingContainer;
36
- updateClientStyling(): void;
37
+ private stylingSubscription;
38
+ handleClientStylingChange(newValue: any, oldValue: any): void;
39
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
37
40
  componentWillLoad(): Promise<any>;
38
41
  componentDidLoad(): void;
39
- setClientStyling: () => void;
40
- setClientStylingURL: () => void;
41
42
  startTimerBtnResendCode(): void;
42
43
  setErrMsg(errMsg: string): void;
43
44
  debounce(func: Function, delay: number): () => void;
44
45
  handleSendCode(): void;
45
46
  handleCheckCode(): void;
46
47
  handleInput(event: Event): void;
48
+ disconnectedCallback(): void;
47
49
  render(): any;
48
50
  }
@@ -23,6 +23,7 @@ export namespace Components {
23
23
  * Currently selected language
24
24
  */
25
25
  "lang": string;
26
+ "mbSource": string;
26
27
  /**
27
28
  * Translations via URL
28
29
  */
@@ -62,6 +63,7 @@ declare namespace LocalJSX {
62
63
  * Currently selected language
63
64
  */
64
65
  "lang"?: string;
66
+ "mbSource"?: string;
65
67
  /**
66
68
  * Translations via URL
67
69
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-sms-verification",
3
- "version": "1.54.12",
3
+ "version": "1.56.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",