@everymatrix/player-account-gaming-limits-popup 0.0.161 → 0.0.162

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.
@@ -28,6 +28,11 @@
28
28
  function is_empty(obj) {
29
29
  return Object.keys(obj).length === 0;
30
30
  }
31
+ function validate_store(store, name) {
32
+ if (store != null && typeof store.subscribe !== 'function') {
33
+ throw new Error(`'${name}' is not a store with a 'subscribe' method`);
34
+ }
35
+ }
31
36
  function subscribe(store, ...callbacks) {
32
37
  if (store == null) {
33
38
  return noop$1;
@@ -35,6 +40,9 @@
35
40
  const unsub = store.subscribe(...callbacks);
36
41
  return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
37
42
  }
43
+ function component_subscribe(component, store, callback) {
44
+ component.$$.on_destroy.push(subscribe(store, callback));
45
+ }
38
46
 
39
47
  function append(target, node) {
40
48
  target.appendChild(node);
@@ -97,6 +105,14 @@
97
105
  function set_current_component(component) {
98
106
  current_component = component;
99
107
  }
108
+ function get_current_component() {
109
+ if (!current_component)
110
+ throw new Error('Function called outside component initialization');
111
+ return current_component;
112
+ }
113
+ function onMount(fn) {
114
+ get_current_component().$$.on_mount.push(fn);
115
+ }
100
116
 
101
117
  const dirty_components = [];
102
118
  const binding_callbacks = [];
@@ -168,6 +184,12 @@
168
184
  block.i(local);
169
185
  }
170
186
  }
187
+
188
+ const globals = (typeof window !== 'undefined'
189
+ ? window
190
+ : typeof globalThis !== 'undefined'
191
+ ? globalThis
192
+ : global);
171
193
  function mount_component(component, target, anchor, customElement) {
172
194
  const { fragment, on_mount, on_destroy, after_update } = component.$$;
173
195
  fragment && fragment.m(target, anchor);
@@ -362,17 +384,17 @@
362
384
  }
363
385
  }
364
386
 
365
- var global =
387
+ var global$1 =
366
388
  (typeof globalThis !== 'undefined' && globalThis) ||
367
389
  (typeof self !== 'undefined' && self) ||
368
- (typeof global !== 'undefined' && global);
390
+ (typeof global$1 !== 'undefined' && global$1);
369
391
 
370
392
  var support = {
371
- searchParams: 'URLSearchParams' in global,
372
- iterable: 'Symbol' in global && 'iterator' in Symbol,
393
+ searchParams: 'URLSearchParams' in global$1,
394
+ iterable: 'Symbol' in global$1 && 'iterator' in Symbol,
373
395
  blob:
374
- 'FileReader' in global &&
375
- 'Blob' in global &&
396
+ 'FileReader' in global$1 &&
397
+ 'Blob' in global$1 &&
376
398
  (function() {
377
399
  try {
378
400
  new Blob();
@@ -381,8 +403,8 @@
381
403
  return false
382
404
  }
383
405
  })(),
384
- formData: 'FormData' in global,
385
- arrayBuffer: 'ArrayBuffer' in global
406
+ formData: 'FormData' in global$1,
407
+ arrayBuffer: 'ArrayBuffer' in global$1
386
408
  };
387
409
 
388
410
  function isDataView(obj) {
@@ -847,7 +869,7 @@
847
869
  return new Response(null, {status: status, headers: {location: url}})
848
870
  };
849
871
 
850
- var DOMException = global.DOMException;
872
+ var DOMException = global$1.DOMException;
851
873
  try {
852
874
  new DOMException();
853
875
  } catch (err) {
@@ -908,7 +930,7 @@
908
930
 
909
931
  function fixUrl(url) {
910
932
  try {
911
- return url === '' && global.location.href ? global.location.href : url
933
+ return url === '' && global$1.location.href ? global$1.location.href : url
912
934
  } catch (e) {
913
935
  return url
914
936
  }
@@ -961,11 +983,11 @@
961
983
 
962
984
  fetch.polyfill = true;
963
985
 
964
- if (!global.fetch) {
965
- global.fetch = fetch;
966
- global.Headers = Headers;
967
- global.Request = Request;
968
- global.Response = Response;
986
+ if (!global$1.fetch) {
987
+ global$1.fetch = fetch;
988
+ global$1.Headers = Headers;
989
+ global$1.Request = Request;
990
+ global$1.Response = Response;
969
991
  }
970
992
 
971
993
  // the whatwg-fetch polyfill installs the fetch() function
@@ -4396,7 +4418,7 @@
4396
4418
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4397
4419
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4398
4420
  PERFORMANCE OF THIS SOFTWARE.
4399
- ***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);}return t}const O={fallbackLocale:null,initialLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,ignoreTag:!0};function j(){return O}const k=writable(!1);let L;const T=writable(null);function x(e){return e.split("-").map(((e,n,t)=>t.slice(0,n+1).join("-"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return L}T.subscribe((e=>{L=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e);}));const M=T.set;T.set=e=>{if(function(e){if(null==e)return;const n=E(e);for(let e=0;e<n.length;e++){const t=n[e];if(u(t))return t}}(e)&&w(e)){const{loadingDelay:n}=j();let t;return "undefined"!=typeof window&&null!=D()&&n?t=window.setTimeout((()=>k.set(!0)),n):k.set(!0),b(e).then((()=>{M(e);})).finally((()=>{clearTimeout(t),k.set(!1);}))}return M(e)},T.update=e=>M(e(L));const Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown "${n}" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(o=C("number",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?o=C("date",t):0===Object.keys(o).length&&(o=C("date","short")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?o=C("time",t):0===Object.keys(o).length&&(o=C("time","short")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new IntlMessageFormat(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{"object"==typeof e&&(e=(n=e).id);const{values:t,locale:o=D(),default:r}=n;if(null==o)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let i=a(e,o);if(i){if("string"!=typeof i)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof i}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),i}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${E(o).join('", "')}".${w(D())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),i=r||e;if(!t)return i;let l=i;try{l=H(i,o).format(t);}catch(n){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,n.message);}return l},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>a(e,n);derived([T,s],(()=>K));derived([T],(()=>Q));derived([T],(()=>R));derived([T],(()=>V));derived([T,s],(()=>W));
4421
+ ***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]]);}return t}const O={fallbackLocale:null,initialLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,ignoreTag:!0};function j(){return O}const k=writable(!1);let L;const T=writable(null);function x(e){return e.split("-").map(((e,n,t)=>t.slice(0,n+1).join("-"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return L}T.subscribe((e=>{L=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e);}));const M=T.set;T.set=e=>{if(function(e){if(null==e)return;const n=E(e);for(let e=0;e<n.length;e++){const t=n[e];if(u(t))return t}}(e)&&w(e)){const{loadingDelay:n}=j();let t;return "undefined"!=typeof window&&null!=D()&&n?t=window.setTimeout((()=>k.set(!0)),n):k.set(!0),b(e).then((()=>{M(e);})).finally((()=>{clearTimeout(t),k.set(!1);}))}return M(e)},T.update=e=>M(e(L));const Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown "${n}" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(o=C("number",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?o=C("date",t):0===Object.keys(o).length&&(o=C("date","short")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?o=C("time",t):0===Object.keys(o).length&&(o=C("time","short")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new IntlMessageFormat(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{"object"==typeof e&&(e=(n=e).id);const{values:t,locale:o=D(),default:r}=n;if(null==o)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let i=a(e,o);if(i){if("string"!=typeof i)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof i}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),i}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${E(o).join('", "')}".${w(D())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),i=r||e;if(!t)return i;let l=i;try{l=H(i,o).format(t);}catch(n){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,n.message);}return l},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>a(e,n),X=derived([T,s],(()=>K));derived([T],(()=>Q));derived([T],(()=>R));derived([T],(()=>V));derived([T,s],(()=>W));
4400
4422
 
4401
4423
  window.emWidgets = { topic };
4402
4424
 
@@ -4422,10 +4444,29 @@
4422
4444
  return 'PC';
4423
4445
  };
4424
4446
 
4447
+ function addNewMessages(lang, dict) {
4448
+ m(lang, dict);
4449
+ }
4450
+
4451
+ const PlayerGamingLimitsTranslations = {
4452
+ en: {
4453
+ popupText: {
4454
+ amountChanged: `Your limit has been changed or increased: {amount} {currency}. You will have to wait for the expiration date for your new limit to take effect:`,
4455
+ }
4456
+ },
4457
+ ro: {
4458
+ popupText: {
4459
+ amountChanged: `Your limit has been changed or increased: {amount} {currency}. You will have to wait for the expiration date for your new limit to take effect:`,
4460
+ }
4461
+ }
4462
+ };
4463
+
4425
4464
  /* src/PlayerAccountGamingLimitsPopup.svelte generated by Svelte v3.37.0 */
4465
+
4466
+ const { Object: Object_1 } = globals;
4426
4467
  const file = "src/PlayerAccountGamingLimitsPopup.svelte";
4427
4468
 
4428
- // (19:0) {#if showPopup}
4469
+ // (42:0) {#if showPopup}
4429
4470
  function create_if_block(ctx) {
4430
4471
  let section;
4431
4472
  let div5;
@@ -4440,11 +4481,18 @@
4440
4481
  let path;
4441
4482
  let t4;
4442
4483
  let div4;
4443
- let p;
4444
- let t5;
4484
+ let div5_class_value;
4445
4485
  let mounted;
4446
4486
  let dispose;
4447
4487
 
4488
+ function select_block_type(ctx, dirty) {
4489
+ if (/*iteminfoamount*/ ctx[0]) return create_if_block_1;
4490
+ return create_else_block;
4491
+ }
4492
+
4493
+ let current_block_type = select_block_type(ctx);
4494
+ let if_block = current_block_type(ctx);
4495
+
4448
4496
  const block = {
4449
4497
  c: function create() {
4450
4498
  section = element("section");
@@ -4454,42 +4502,43 @@
4454
4502
  div0.textContent = "i";
4455
4503
  t1 = space();
4456
4504
  div1 = element("div");
4457
- t2 = text(/*infoname*/ ctx[1]);
4505
+ t2 = text(/*infoname*/ ctx[2]);
4458
4506
  t3 = space();
4459
4507
  div2 = element("div");
4460
4508
  svg = svg_element("svg");
4461
4509
  path = svg_element("path");
4462
4510
  t4 = space();
4463
4511
  div4 = element("div");
4464
- p = element("p");
4465
- t5 = text(/*infocontent*/ ctx[0]);
4512
+ if_block.c();
4466
4513
  attr_dev(div0, "class", "InfoCardPopupIcon");
4467
- add_location(div0, file, 22, 8, 793);
4514
+ add_location(div0, file, 45, 8, 1569);
4468
4515
  attr_dev(div1, "class", "InfoCardPopupTitle");
4469
- add_location(div1, file, 23, 8, 840);
4516
+ add_location(div1, file, 46, 8, 1616);
4470
4517
  attr_dev(path, "stroke-linecap", "round");
4471
4518
  attr_dev(path, "stroke-linejoin", "round");
4472
4519
  attr_dev(path, "stroke-width", "2");
4473
4520
  attr_dev(path, "d", "M6 18L18 6M6 6l12 12");
4474
- add_location(path, file, 25, 120, 1097);
4521
+ add_location(path, file, 48, 120, 1873);
4475
4522
  attr_dev(svg, "class", "w-6 h-6");
4476
4523
  attr_dev(svg, "fill", "none");
4477
4524
  attr_dev(svg, "stroke", "currentColor");
4478
4525
  attr_dev(svg, "viewBox", "0 0 24 24");
4479
4526
  attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
4480
- add_location(svg, file, 25, 10, 987);
4527
+ add_location(svg, file, 48, 10, 1763);
4481
4528
  attr_dev(div2, "class", "InfoCardPopupCloseButton");
4482
- add_location(div2, file, 24, 8, 897);
4529
+ add_location(div2, file, 47, 8, 1673);
4483
4530
  attr_dev(div3, "class", "InfoCardPopupHeader");
4484
- add_location(div3, file, 21, 6, 751);
4485
- attr_dev(p, "class", "InfoCardPopupContent");
4486
- add_location(p, file, 29, 8, 1287);
4531
+ add_location(div3, file, 44, 6, 1527);
4487
4532
  attr_dev(div4, "class", "InfoCardPopupContentArea");
4488
- add_location(div4, file, 28, 6, 1240);
4489
- attr_dev(div5, "class", "InfoCardPopupWrapper " + (/*isMobile*/ ctx[3] ? "InfoCardPopupMobileWrapper" : ""));
4490
- add_location(div5, file, 20, 4, 663);
4491
- attr_dev(section, "class", /*isMobile*/ ctx[3] ? "InfoCardPopupMobileModal" : "");
4492
- add_location(section, file, 19, 2, 598);
4533
+ add_location(div4, file, 51, 6, 2016);
4534
+
4535
+ attr_dev(div5, "class", div5_class_value = "InfoCardPopupWrapper " + (/*isMobile*/ ctx[6] ? "InfoCardPopupMobileWrapper" : "") + " " + (/*iteminfoamount*/ ctx[0]
4536
+ ? "InfoCardPopupLimitChanged"
4537
+ : ""));
4538
+
4539
+ add_location(div5, file, 43, 4, 1387);
4540
+ attr_dev(section, "class", /*isMobile*/ ctx[6] ? "InfoCardPopupMobileModal" : "");
4541
+ add_location(section, file, 42, 2, 1322);
4493
4542
  },
4494
4543
  m: function mount(target, anchor) {
4495
4544
  insert_dev(target, section, anchor);
@@ -4505,20 +4554,37 @@
4505
4554
  append_dev(svg, path);
4506
4555
  append_dev(div5, t4);
4507
4556
  append_dev(div5, div4);
4508
- append_dev(div4, p);
4509
- append_dev(p, t5);
4557
+ if_block.m(div4, null);
4510
4558
 
4511
4559
  if (!mounted) {
4512
- dispose = listen_dev(div2, "click", prevent_default(/*closeInfoPopup*/ ctx[4]), false, true, false);
4560
+ dispose = listen_dev(div2, "click", prevent_default(/*closeInfoPopup*/ ctx[7]), false, true, false);
4513
4561
  mounted = true;
4514
4562
  }
4515
4563
  },
4516
4564
  p: function update(ctx, dirty) {
4517
- if (dirty & /*infoname*/ 2) set_data_dev(t2, /*infoname*/ ctx[1]);
4518
- if (dirty & /*infocontent*/ 1) set_data_dev(t5, /*infocontent*/ ctx[0]);
4565
+ if (dirty & /*infoname*/ 4) set_data_dev(t2, /*infoname*/ ctx[2]);
4566
+
4567
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
4568
+ if_block.p(ctx, dirty);
4569
+ } else {
4570
+ if_block.d(1);
4571
+ if_block = current_block_type(ctx);
4572
+
4573
+ if (if_block) {
4574
+ if_block.c();
4575
+ if_block.m(div4, null);
4576
+ }
4577
+ }
4578
+
4579
+ if (dirty & /*iteminfoamount*/ 1 && div5_class_value !== (div5_class_value = "InfoCardPopupWrapper " + (/*isMobile*/ ctx[6] ? "InfoCardPopupMobileWrapper" : "") + " " + (/*iteminfoamount*/ ctx[0]
4580
+ ? "InfoCardPopupLimitChanged"
4581
+ : ""))) {
4582
+ attr_dev(div5, "class", div5_class_value);
4583
+ }
4519
4584
  },
4520
4585
  d: function destroy(detaching) {
4521
4586
  if (detaching) detach_dev(section);
4587
+ if_block.d();
4522
4588
  mounted = false;
4523
4589
  dispose();
4524
4590
  }
@@ -4528,7 +4594,90 @@
4528
4594
  block,
4529
4595
  id: create_if_block.name,
4530
4596
  type: "if",
4531
- source: "(19:0) {#if showPopup}",
4597
+ source: "(42:0) {#if showPopup}",
4598
+ ctx
4599
+ });
4600
+
4601
+ return block;
4602
+ }
4603
+
4604
+ // (55:8) {:else}
4605
+ function create_else_block(ctx) {
4606
+ let p;
4607
+ let t;
4608
+
4609
+ const block = {
4610
+ c: function create() {
4611
+ p = element("p");
4612
+ t = text(/*infocontent*/ ctx[1]);
4613
+ attr_dev(p, "class", "InfoCardPopupContent");
4614
+ add_location(p, file, 55, 10, 2252);
4615
+ },
4616
+ m: function mount(target, anchor) {
4617
+ insert_dev(target, p, anchor);
4618
+ append_dev(p, t);
4619
+ },
4620
+ p: function update(ctx, dirty) {
4621
+ if (dirty & /*infocontent*/ 2) set_data_dev(t, /*infocontent*/ ctx[1]);
4622
+ },
4623
+ d: function destroy(detaching) {
4624
+ if (detaching) detach_dev(p);
4625
+ }
4626
+ };
4627
+
4628
+ dispatch_dev("SvelteRegisterBlock", {
4629
+ block,
4630
+ id: create_else_block.name,
4631
+ type: "else",
4632
+ source: "(55:8) {:else}",
4633
+ ctx
4634
+ });
4635
+
4636
+ return block;
4637
+ }
4638
+
4639
+ // (53:8) {#if iteminfoamount}
4640
+ function create_if_block_1(ctx) {
4641
+ let p;
4642
+
4643
+ let t_value = /*$_*/ ctx[5]("popupText.amountChanged", {
4644
+ values: {
4645
+ amount: /*iteminfoamount*/ ctx[0],
4646
+ currency: /*playercurrency*/ ctx[3]
4647
+ }
4648
+ }) + "";
4649
+
4650
+ let t;
4651
+
4652
+ const block = {
4653
+ c: function create() {
4654
+ p = element("p");
4655
+ t = text(t_value);
4656
+ attr_dev(p, "class", "InfoCardPopupContent");
4657
+ add_location(p, file, 53, 10, 2094);
4658
+ },
4659
+ m: function mount(target, anchor) {
4660
+ insert_dev(target, p, anchor);
4661
+ append_dev(p, t);
4662
+ },
4663
+ p: function update(ctx, dirty) {
4664
+ if (dirty & /*$_, iteminfoamount, playercurrency*/ 41 && t_value !== (t_value = /*$_*/ ctx[5]("popupText.amountChanged", {
4665
+ values: {
4666
+ amount: /*iteminfoamount*/ ctx[0],
4667
+ currency: /*playercurrency*/ ctx[3]
4668
+ }
4669
+ }) + "")) set_data_dev(t, t_value);
4670
+ },
4671
+ d: function destroy(detaching) {
4672
+ if (detaching) detach_dev(p);
4673
+ }
4674
+ };
4675
+
4676
+ dispatch_dev("SvelteRegisterBlock", {
4677
+ block,
4678
+ id: create_if_block_1.name,
4679
+ type: "if",
4680
+ source: "(53:8) {#if iteminfoamount}",
4532
4681
  ctx
4533
4682
  });
4534
4683
 
@@ -4537,7 +4686,7 @@
4537
4686
 
4538
4687
  function create_fragment(ctx) {
4539
4688
  let if_block_anchor;
4540
- let if_block = /*showPopup*/ ctx[2] && create_if_block(ctx);
4689
+ let if_block = /*showPopup*/ ctx[4] && create_if_block(ctx);
4541
4690
 
4542
4691
  const block = {
4543
4692
  c: function create() {
@@ -4553,7 +4702,7 @@
4553
4702
  insert_dev(target, if_block_anchor, anchor);
4554
4703
  },
4555
4704
  p: function update(ctx, [dirty]) {
4556
- if (/*showPopup*/ ctx[2]) {
4705
+ if (/*showPopup*/ ctx[4]) {
4557
4706
  if (if_block) {
4558
4707
  if_block.p(ctx, dirty);
4559
4708
  } else {
@@ -4586,62 +4735,112 @@
4586
4735
  }
4587
4736
 
4588
4737
  function instance($$self, $$props, $$invalidate) {
4738
+ let $_;
4739
+ validate_store(X, "_");
4740
+ component_subscribe($$self, X, $$value => $$invalidate(5, $_ = $$value));
4589
4741
  let { $$slots: slots = {}, $$scope } = $$props;
4590
4742
  validate_slots("undefined", slots, []);
4591
4743
  let { showpopup = "" } = $$props;
4592
4744
  let { infocontent = "" } = $$props;
4593
4745
  let { infoname = "" } = $$props;
4746
+ let { iteminfoamount = "" } = $$props;
4747
+ let { lang = "en" } = $$props;
4748
+ let { playercurrency = "USD" } = $$props;
4594
4749
  let showPopup = false;
4750
+
4751
+ Object.keys(PlayerGamingLimitsTranslations).forEach(item => {
4752
+ addNewMessages(item, PlayerGamingLimitsTranslations[item]);
4753
+ });
4754
+
4595
4755
  let userAgent = window.navigator.userAgent;
4596
4756
  let isMobile = getDevice(userAgent) === "PC" ? false : true;
4597
4757
 
4598
4758
  const closeInfoPopup = () => {
4599
- $$invalidate(2, showPopup = false);
4759
+ $$invalidate(4, showPopup = false);
4600
4760
 
4601
4761
  window.postMessage(
4602
4762
  {
4603
- type: "ClosePlayerAccountGamingLimitsPopup",
4604
- showPopup
4763
+ type: "ClosePlayerAccountGamingLimitsPopup"
4605
4764
  },
4606
4765
  window.location.href
4607
4766
  );
4608
4767
  };
4609
4768
 
4769
+ const messageHandler = e => {
4770
+ if (e.data && e.data.type == "ClosePlayerAccountGamingLimitsPopup") {
4771
+ $$invalidate(4, showPopup = false);
4772
+ }
4773
+ };
4774
+
4610
4775
  const initialLoad = () => {
4611
- $$invalidate(2, showPopup = showpopup);
4776
+ if (iteminfoamount < 0) {
4777
+ $$invalidate(0, iteminfoamount = "0");
4778
+ }
4779
+
4780
+ $$invalidate(4, showPopup = showpopup);
4612
4781
  };
4613
4782
 
4614
- const writable_props = ["showpopup", "infocontent", "infoname"];
4783
+ onMount(() => {
4784
+ window.addEventListener("message", messageHandler, false);
4615
4785
 
4616
- Object.keys($$props).forEach(key => {
4786
+ return () => {
4787
+ window.removeEventListener("message", messageHandler);
4788
+ };
4789
+ });
4790
+
4791
+ const writable_props = [
4792
+ "showpopup",
4793
+ "infocontent",
4794
+ "infoname",
4795
+ "iteminfoamount",
4796
+ "lang",
4797
+ "playercurrency"
4798
+ ];
4799
+
4800
+ Object_1.keys($$props).forEach(key => {
4617
4801
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<undefined> was created with unknown prop '${key}'`);
4618
4802
  });
4619
4803
 
4620
4804
  $$self.$$set = $$props => {
4621
- if ("showpopup" in $$props) $$invalidate(5, showpopup = $$props.showpopup);
4622
- if ("infocontent" in $$props) $$invalidate(0, infocontent = $$props.infocontent);
4623
- if ("infoname" in $$props) $$invalidate(1, infoname = $$props.infoname);
4805
+ if ("showpopup" in $$props) $$invalidate(8, showpopup = $$props.showpopup);
4806
+ if ("infocontent" in $$props) $$invalidate(1, infocontent = $$props.infocontent);
4807
+ if ("infoname" in $$props) $$invalidate(2, infoname = $$props.infoname);
4808
+ if ("iteminfoamount" in $$props) $$invalidate(0, iteminfoamount = $$props.iteminfoamount);
4809
+ if ("lang" in $$props) $$invalidate(9, lang = $$props.lang);
4810
+ if ("playercurrency" in $$props) $$invalidate(3, playercurrency = $$props.playercurrency);
4624
4811
  };
4625
4812
 
4626
4813
  $$self.$capture_state = () => ({
4814
+ onMount,
4815
+ getDevice,
4816
+ _: X,
4817
+ addNewMessages,
4818
+ PlayerGamingLimitsTranslations,
4627
4819
  showpopup,
4628
4820
  infocontent,
4629
4821
  infoname,
4630
- getDevice,
4822
+ iteminfoamount,
4823
+ lang,
4824
+ playercurrency,
4631
4825
  showPopup,
4632
4826
  userAgent,
4633
4827
  isMobile,
4634
4828
  closeInfoPopup,
4635
- initialLoad
4829
+ messageHandler,
4830
+ initialLoad,
4831
+ $_
4636
4832
  });
4637
4833
 
4638
4834
  $$self.$inject_state = $$props => {
4639
- if ("showpopup" in $$props) $$invalidate(5, showpopup = $$props.showpopup);
4640
- if ("infocontent" in $$props) $$invalidate(0, infocontent = $$props.infocontent);
4641
- if ("infoname" in $$props) $$invalidate(1, infoname = $$props.infoname);
4642
- if ("showPopup" in $$props) $$invalidate(2, showPopup = $$props.showPopup);
4835
+ if ("showpopup" in $$props) $$invalidate(8, showpopup = $$props.showpopup);
4836
+ if ("infocontent" in $$props) $$invalidate(1, infocontent = $$props.infocontent);
4837
+ if ("infoname" in $$props) $$invalidate(2, infoname = $$props.infoname);
4838
+ if ("iteminfoamount" in $$props) $$invalidate(0, iteminfoamount = $$props.iteminfoamount);
4839
+ if ("lang" in $$props) $$invalidate(9, lang = $$props.lang);
4840
+ if ("playercurrency" in $$props) $$invalidate(3, playercurrency = $$props.playercurrency);
4841
+ if ("showPopup" in $$props) $$invalidate(4, showPopup = $$props.showPopup);
4643
4842
  if ("userAgent" in $$props) userAgent = $$props.userAgent;
4644
- if ("isMobile" in $$props) $$invalidate(3, isMobile = $$props.isMobile);
4843
+ if ("isMobile" in $$props) $$invalidate(6, isMobile = $$props.isMobile);
4645
4844
  };
4646
4845
 
4647
4846
  if ($$props && "$$inject" in $$props) {
@@ -4649,18 +4848,29 @@
4649
4848
  }
4650
4849
 
4651
4850
  $$self.$$.update = () => {
4652
- if ($$self.$$.dirty & /*showpopup*/ 32) {
4851
+ if ($$self.$$.dirty & /*showpopup*/ 256) {
4653
4852
  showpopup && initialLoad();
4654
4853
  }
4655
4854
  };
4656
4855
 
4657
- return [infocontent, infoname, showPopup, isMobile, closeInfoPopup, showpopup];
4856
+ return [
4857
+ iteminfoamount,
4858
+ infocontent,
4859
+ infoname,
4860
+ playercurrency,
4861
+ showPopup,
4862
+ $_,
4863
+ isMobile,
4864
+ closeInfoPopup,
4865
+ showpopup,
4866
+ lang
4867
+ ];
4658
4868
  }
4659
4869
 
4660
4870
  class PlayerAccountGamingLimitsPopup extends SvelteElement {
4661
4871
  constructor(options) {
4662
4872
  super();
4663
- this.shadowRoot.innerHTML = `<style>.InfoCardPopupMobileModal:after{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);content:''}.InfoCardPopupWrapper{width:200px;padding:20px;color:#000;background:#fff;box-shadow:0px 4px 12px #00000012;border-radius:0.3125;display:block;position:absolute;top:25px;left:-100px;z-index:9}.InfoCardPopupWrapper:before{content:"";position:absolute;top:-7px;left:104px;border-style:solid;border-width:0 7px 7px;border-color:#FFF transparent;display:block;width:0;z-index:1}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper{width:70%;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupTitle{font-size:18px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupCloseButton{width:30px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupContent{font-size:16px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper:before{content:none}.InfoCardPopupHeader{display:inline-flex}.InfoCardPopupHeader .InfoCardPopupTitle{line-height:24px;font-size:16px;font-weight:400;padding-left:10px}.InfoCardPopupIcon{display:flex;font-size:24px;width:24px;height:24px;background:transparent;border:1px solid #000;align-items:center;justify-content:center;border-radius:30px}.InfoCardPopupContent{font-size:14px;font-weight:300}.InfoCardPopupCloseButton{width:20px;position:absolute;right:10px;top:10px;cursor:pointer;transition-duration:0.3s}.InfoCardPopupCloseButton:hover{color:#FD2839;fill:#FD2839}</style>`;
4873
+ this.shadowRoot.innerHTML = `<style>.InfoCardPopupMobileModal:after{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);content:''}.InfoCardPopupLimitChanged{background:#FFFFF8}.InfoCardPopupWrapper{width:200px;padding:20px;color:#000;background:#fff;box-shadow:0px 4px 12px #00000012;border-radius:0.3125;display:block;position:absolute;top:32px;left:-84px;z-index:9}.InfoCardPopupWrapper:before{content:"";position:absolute;top:-7px;left:104px;border-style:solid;border-width:0 7px 7px;border-color:#FFF transparent;display:block;width:0;z-index:1}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper{width:70%;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%)}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupTitle{font-size:18px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupCloseButton{width:30px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper .InfoCardPopupContent{font-size:16px}.InfoCardPopupWrapper.InfoCardPopupMobileWrapper:before{content:none}.InfoCardPopupHeader{display:inline-flex}.InfoCardPopupHeader .InfoCardPopupTitle{line-height:24px;font-size:16px;font-weight:400;padding-left:10px}.InfoCardPopupIcon{display:flex;font-size:24px;width:24px;height:24px;background:transparent;border:1px solid #000;align-items:center;justify-content:center;border-radius:30px}.InfoCardPopupContent{font-size:14px;font-weight:300}.InfoCardPopupCloseButton{width:20px;position:absolute;right:10px;top:10px;cursor:pointer;transition-duration:0.3s}.InfoCardPopupCloseButton:hover{color:#FD2839;fill:#FD2839}</style>`;
4664
4874
 
4665
4875
  init(
4666
4876
  this,
@@ -4673,9 +4883,12 @@
4673
4883
  create_fragment,
4674
4884
  safe_not_equal,
4675
4885
  {
4676
- showpopup: 5,
4677
- infocontent: 0,
4678
- infoname: 1
4886
+ showpopup: 8,
4887
+ infocontent: 1,
4888
+ infoname: 2,
4889
+ iteminfoamount: 0,
4890
+ lang: 9,
4891
+ playercurrency: 3
4679
4892
  }
4680
4893
  );
4681
4894
 
@@ -4692,11 +4905,18 @@
4692
4905
  }
4693
4906
 
4694
4907
  static get observedAttributes() {
4695
- return ["showpopup", "infocontent", "infoname"];
4908
+ return [
4909
+ "showpopup",
4910
+ "infocontent",
4911
+ "infoname",
4912
+ "iteminfoamount",
4913
+ "lang",
4914
+ "playercurrency"
4915
+ ];
4696
4916
  }
4697
4917
 
4698
4918
  get showpopup() {
4699
- return this.$$.ctx[5];
4919
+ return this.$$.ctx[8];
4700
4920
  }
4701
4921
 
4702
4922
  set showpopup(showpopup) {
@@ -4705,7 +4925,7 @@
4705
4925
  }
4706
4926
 
4707
4927
  get infocontent() {
4708
- return this.$$.ctx[0];
4928
+ return this.$$.ctx[1];
4709
4929
  }
4710
4930
 
4711
4931
  set infocontent(infocontent) {
@@ -4714,13 +4934,40 @@
4714
4934
  }
4715
4935
 
4716
4936
  get infoname() {
4717
- return this.$$.ctx[1];
4937
+ return this.$$.ctx[2];
4718
4938
  }
4719
4939
 
4720
4940
  set infoname(infoname) {
4721
4941
  this.$set({ infoname });
4722
4942
  flush();
4723
4943
  }
4944
+
4945
+ get iteminfoamount() {
4946
+ return this.$$.ctx[0];
4947
+ }
4948
+
4949
+ set iteminfoamount(iteminfoamount) {
4950
+ this.$set({ iteminfoamount });
4951
+ flush();
4952
+ }
4953
+
4954
+ get lang() {
4955
+ return this.$$.ctx[9];
4956
+ }
4957
+
4958
+ set lang(lang) {
4959
+ this.$set({ lang });
4960
+ flush();
4961
+ }
4962
+
4963
+ get playercurrency() {
4964
+ return this.$$.ctx[3];
4965
+ }
4966
+
4967
+ set playercurrency(playercurrency) {
4968
+ this.$set({ playercurrency });
4969
+ flush();
4970
+ }
4724
4971
  }
4725
4972
 
4726
4973
  !customElements.get('player-account-gaming-limits-popup') && customElements.define('player-account-gaming-limits-popup', PlayerAccountGamingLimitsPopup);