@everymatrix/general-player-register-form-step3 0.0.187 → 0.0.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2050 +1,2 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.app = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function noop() { }
8
- function add_location(element, file, line, column, char) {
9
- element.__svelte_meta = {
10
- loc: { file, line, column, char }
11
- };
12
- }
13
- function run(fn) {
14
- return fn();
15
- }
16
- function blank_object() {
17
- return Object.create(null);
18
- }
19
- function run_all(fns) {
20
- fns.forEach(run);
21
- }
22
- function is_function(thing) {
23
- return typeof thing === 'function';
24
- }
25
- function safe_not_equal(a, b) {
26
- return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
27
- }
28
- function is_empty(obj) {
29
- return Object.keys(obj).length === 0;
30
- }
31
-
32
- function append(target, node) {
33
- target.appendChild(node);
34
- }
35
- function insert(target, node, anchor) {
36
- target.insertBefore(node, anchor || null);
37
- }
38
- function detach(node) {
39
- node.parentNode.removeChild(node);
40
- }
41
- function destroy_each(iterations, detaching) {
42
- for (let i = 0; i < iterations.length; i += 1) {
43
- if (iterations[i])
44
- iterations[i].d(detaching);
45
- }
46
- }
47
- function element(name) {
48
- return document.createElement(name);
49
- }
50
- function svg_element(name) {
51
- return document.createElementNS('http://www.w3.org/2000/svg', name);
52
- }
53
- function text(data) {
54
- return document.createTextNode(data);
55
- }
56
- function space() {
57
- return text(' ');
58
- }
59
- function empty() {
60
- return text('');
61
- }
62
- function listen(node, event, handler, options) {
63
- node.addEventListener(event, handler, options);
64
- return () => node.removeEventListener(event, handler, options);
65
- }
66
- function attr(node, attribute, value) {
67
- if (value == null)
68
- node.removeAttribute(attribute);
69
- else if (node.getAttribute(attribute) !== value)
70
- node.setAttribute(attribute, value);
71
- }
72
- function children(element) {
73
- return Array.from(element.childNodes);
74
- }
75
- function set_input_value(input, value) {
76
- input.value = value == null ? '' : value;
77
- }
78
- function select_option(select, value) {
79
- for (let i = 0; i < select.options.length; i += 1) {
80
- const option = select.options[i];
81
- if (option.__value === value) {
82
- option.selected = true;
83
- return;
84
- }
85
- }
86
- }
87
- function select_value(select) {
88
- const selected_option = select.querySelector(':checked') || select.options[0];
89
- return selected_option && selected_option.__value;
90
- }
91
- function custom_event(type, detail) {
92
- const e = document.createEvent('CustomEvent');
93
- e.initCustomEvent(type, false, false, detail);
94
- return e;
95
- }
96
- function attribute_to_object(attributes) {
97
- const result = {};
98
- for (const attribute of attributes) {
99
- result[attribute.name] = attribute.value;
100
- }
101
- return result;
102
- }
103
-
104
- let current_component;
105
- function set_current_component(component) {
106
- current_component = component;
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
- }
116
-
117
- const dirty_components = [];
118
- const binding_callbacks = [];
119
- const render_callbacks = [];
120
- const flush_callbacks = [];
121
- const resolved_promise = Promise.resolve();
122
- let update_scheduled = false;
123
- function schedule_update() {
124
- if (!update_scheduled) {
125
- update_scheduled = true;
126
- resolved_promise.then(flush);
127
- }
128
- }
129
- function add_render_callback(fn) {
130
- render_callbacks.push(fn);
131
- }
132
- let flushing = false;
133
- const seen_callbacks = new Set();
134
- function flush() {
135
- if (flushing)
136
- return;
137
- flushing = true;
138
- do {
139
- // first, call beforeUpdate functions
140
- // and update components
141
- for (let i = 0; i < dirty_components.length; i += 1) {
142
- const component = dirty_components[i];
143
- set_current_component(component);
144
- update(component.$$);
145
- }
146
- set_current_component(null);
147
- dirty_components.length = 0;
148
- while (binding_callbacks.length)
149
- binding_callbacks.pop()();
150
- // then, once components are updated, call
151
- // afterUpdate functions. This may cause
152
- // subsequent updates...
153
- for (let i = 0; i < render_callbacks.length; i += 1) {
154
- const callback = render_callbacks[i];
155
- if (!seen_callbacks.has(callback)) {
156
- // ...so guard against infinite loops
157
- seen_callbacks.add(callback);
158
- callback();
159
- }
160
- }
161
- render_callbacks.length = 0;
162
- } while (dirty_components.length);
163
- while (flush_callbacks.length) {
164
- flush_callbacks.pop()();
165
- }
166
- update_scheduled = false;
167
- flushing = false;
168
- seen_callbacks.clear();
169
- }
170
- function update($$) {
171
- if ($$.fragment !== null) {
172
- $$.update();
173
- run_all($$.before_update);
174
- const dirty = $$.dirty;
175
- $$.dirty = [-1];
176
- $$.fragment && $$.fragment.p($$.ctx, dirty);
177
- $$.after_update.forEach(add_render_callback);
178
- }
179
- }
180
- const outroing = new Set();
181
- function transition_in(block, local) {
182
- if (block && block.i) {
183
- outroing.delete(block);
184
- block.i(local);
185
- }
186
- }
187
- function mount_component(component, target, anchor, customElement) {
188
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
189
- fragment && fragment.m(target, anchor);
190
- if (!customElement) {
191
- // onMount happens before the initial afterUpdate
192
- add_render_callback(() => {
193
- const new_on_destroy = on_mount.map(run).filter(is_function);
194
- if (on_destroy) {
195
- on_destroy.push(...new_on_destroy);
196
- }
197
- else {
198
- // Edge case - component was destroyed immediately,
199
- // most likely as a result of a binding initialising
200
- run_all(new_on_destroy);
201
- }
202
- component.$$.on_mount = [];
203
- });
204
- }
205
- after_update.forEach(add_render_callback);
206
- }
207
- function destroy_component(component, detaching) {
208
- const $$ = component.$$;
209
- if ($$.fragment !== null) {
210
- run_all($$.on_destroy);
211
- $$.fragment && $$.fragment.d(detaching);
212
- // TODO null out other refs, including component.$$ (but need to
213
- // preserve final state?)
214
- $$.on_destroy = $$.fragment = null;
215
- $$.ctx = [];
216
- }
217
- }
218
- function make_dirty(component, i) {
219
- if (component.$$.dirty[0] === -1) {
220
- dirty_components.push(component);
221
- schedule_update();
222
- component.$$.dirty.fill(0);
223
- }
224
- component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
225
- }
226
- function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
227
- const parent_component = current_component;
228
- set_current_component(component);
229
- const $$ = component.$$ = {
230
- fragment: null,
231
- ctx: null,
232
- // state
233
- props,
234
- update: noop,
235
- not_equal,
236
- bound: blank_object(),
237
- // lifecycle
238
- on_mount: [],
239
- on_destroy: [],
240
- on_disconnect: [],
241
- before_update: [],
242
- after_update: [],
243
- context: new Map(parent_component ? parent_component.$$.context : options.context || []),
244
- // everything else
245
- callbacks: blank_object(),
246
- dirty,
247
- skip_bound: false
248
- };
249
- let ready = false;
250
- $$.ctx = instance
251
- ? instance(component, options.props || {}, (i, ret, ...rest) => {
252
- const value = rest.length ? rest[0] : ret;
253
- if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
254
- if (!$$.skip_bound && $$.bound[i])
255
- $$.bound[i](value);
256
- if (ready)
257
- make_dirty(component, i);
258
- }
259
- return ret;
260
- })
261
- : [];
262
- $$.update();
263
- ready = true;
264
- run_all($$.before_update);
265
- // `false` as a special case of no DOM component
266
- $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
267
- if (options.target) {
268
- if (options.hydrate) {
269
- const nodes = children(options.target);
270
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
271
- $$.fragment && $$.fragment.l(nodes);
272
- nodes.forEach(detach);
273
- }
274
- else {
275
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
276
- $$.fragment && $$.fragment.c();
277
- }
278
- if (options.intro)
279
- transition_in(component.$$.fragment);
280
- mount_component(component, options.target, options.anchor, options.customElement);
281
- flush();
282
- }
283
- set_current_component(parent_component);
284
- }
285
- let SvelteElement;
286
- if (typeof HTMLElement === 'function') {
287
- SvelteElement = class extends HTMLElement {
288
- constructor() {
289
- super();
290
- this.attachShadow({ mode: 'open' });
291
- }
292
- connectedCallback() {
293
- const { on_mount } = this.$$;
294
- this.$$.on_disconnect = on_mount.map(run).filter(is_function);
295
- // @ts-ignore todo: improve typings
296
- for (const key in this.$$.slotted) {
297
- // @ts-ignore todo: improve typings
298
- this.appendChild(this.$$.slotted[key]);
299
- }
300
- }
301
- attributeChangedCallback(attr, _oldValue, newValue) {
302
- this[attr] = newValue;
303
- }
304
- disconnectedCallback() {
305
- run_all(this.$$.on_disconnect);
306
- }
307
- $destroy() {
308
- destroy_component(this, 1);
309
- this.$destroy = noop;
310
- }
311
- $on(type, callback) {
312
- // TODO should this delegate to addEventListener?
313
- const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
314
- callbacks.push(callback);
315
- return () => {
316
- const index = callbacks.indexOf(callback);
317
- if (index !== -1)
318
- callbacks.splice(index, 1);
319
- };
320
- }
321
- $set($$props) {
322
- if (this.$$set && !is_empty($$props)) {
323
- this.$$.skip_bound = true;
324
- this.$$set($$props);
325
- this.$$.skip_bound = false;
326
- }
327
- }
328
- };
329
- }
330
-
331
- function dispatch_dev(type, detail) {
332
- document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));
333
- }
334
- function append_dev(target, node) {
335
- dispatch_dev('SvelteDOMInsert', { target, node });
336
- append(target, node);
337
- }
338
- function insert_dev(target, node, anchor) {
339
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
340
- insert(target, node, anchor);
341
- }
342
- function detach_dev(node) {
343
- dispatch_dev('SvelteDOMRemove', { node });
344
- detach(node);
345
- }
346
- function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
347
- const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
348
- if (has_prevent_default)
349
- modifiers.push('preventDefault');
350
- if (has_stop_propagation)
351
- modifiers.push('stopPropagation');
352
- dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
353
- const dispose = listen(node, event, handler, options);
354
- return () => {
355
- dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
356
- dispose();
357
- };
358
- }
359
- function attr_dev(node, attribute, value) {
360
- attr(node, attribute, value);
361
- if (value == null)
362
- dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
363
- else
364
- dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
365
- }
366
- function prop_dev(node, property, value) {
367
- node[property] = value;
368
- dispatch_dev('SvelteDOMSetProperty', { node, property, value });
369
- }
370
- function set_data_dev(text, data) {
371
- data = '' + data;
372
- if (text.wholeText === data)
373
- return;
374
- dispatch_dev('SvelteDOMSetData', { node: text, data });
375
- text.data = data;
376
- }
377
- function validate_each_argument(arg) {
378
- if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
379
- let msg = '{#each} only iterates over array-like objects.';
380
- if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
381
- msg += ' You can use a spread to convert this iterable into an array.';
382
- }
383
- throw new Error(msg);
384
- }
385
- }
386
- function validate_slots(name, slot, keys) {
387
- for (const slot_key of Object.keys(slot)) {
388
- if (!~keys.indexOf(slot_key)) {
389
- console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
390
- }
391
- }
392
- }
393
-
394
- /* src/GeneralPlayerRegisterFormStep3.svelte generated by Svelte v3.37.0 */
395
- const file = "src/GeneralPlayerRegisterFormStep3.svelte";
396
-
397
- function get_each_context(ctx, list, i) {
398
- const child_ctx = ctx.slice();
399
- child_ctx[55] = list[i];
400
- return child_ctx;
401
- }
402
-
403
- function get_each_context_1(ctx, list, i) {
404
- const child_ctx = ctx.slice();
405
- child_ctx[58] = list[i];
406
- return child_ctx;
407
- }
408
-
409
- // (230:6) {#if invalidAddress}
410
- function create_if_block_7(ctx) {
411
- let p;
412
-
413
- const block = {
414
- c: function create() {
415
- p = element("p");
416
- p.textContent = "Address must be at least 1 character long and 100 characters maximum.";
417
- attr_dev(p, "class", "InvalidInput");
418
- add_location(p, file, 230, 8, 6685);
419
- },
420
- m: function mount(target, anchor) {
421
- insert_dev(target, p, anchor);
422
- },
423
- d: function destroy(detaching) {
424
- if (detaching) detach_dev(p);
425
- }
426
- };
427
-
428
- dispatch_dev("SvelteRegisterBlock", {
429
- block,
430
- id: create_if_block_7.name,
431
- type: "if",
432
- source: "(230:6) {#if invalidAddress}",
433
- ctx
434
- });
435
-
436
- return block;
437
- }
438
-
439
- // (237:6) {#if invalidPostalCode}
440
- function create_if_block_6(ctx) {
441
- let p;
442
-
443
- const block = {
444
- c: function create() {
445
- p = element("p");
446
- p.textContent = "Postal Code must be at least 1 character long and 20 characters maximum.";
447
- attr_dev(p, "class", "InvalidInput");
448
- add_location(p, file, 237, 8, 7107);
449
- },
450
- m: function mount(target, anchor) {
451
- insert_dev(target, p, anchor);
452
- },
453
- d: function destroy(detaching) {
454
- if (detaching) detach_dev(p);
455
- }
456
- };
457
-
458
- dispatch_dev("SvelteRegisterBlock", {
459
- block,
460
- id: create_if_block_6.name,
461
- type: "if",
462
- source: "(237:6) {#if invalidPostalCode}",
463
- ctx
464
- });
465
-
466
- return block;
467
- }
468
-
469
- // (245:4) {#if invalidCity}
470
- function create_if_block_5(ctx) {
471
- let p;
472
-
473
- const block = {
474
- c: function create() {
475
- p = element("p");
476
- p.textContent = "City must be at least 1 character long and 50 characters maximum.";
477
- attr_dev(p, "class", "InvalidInput");
478
- add_location(p, file, 245, 6, 7482);
479
- },
480
- m: function mount(target, anchor) {
481
- insert_dev(target, p, anchor);
482
- },
483
- d: function destroy(detaching) {
484
- if (detaching) detach_dev(p);
485
- }
486
- };
487
-
488
- dispatch_dev("SvelteRegisterBlock", {
489
- block,
490
- id: create_if_block_5.name,
491
- type: "if",
492
- source: "(245:4) {#if invalidCity}",
493
- ctx
494
- });
495
-
496
- return block;
497
- }
498
-
499
- // (252:6) {#each countries as country}
500
- function create_each_block_1(ctx) {
501
- let option;
502
- let t_value = /*country*/ ctx[58].Name + "";
503
- let t;
504
- let option_value_value;
505
-
506
- const block = {
507
- c: function create() {
508
- option = element("option");
509
- t = text(t_value);
510
- option.__value = option_value_value = /*country*/ ctx[58].Alpha2Code;
511
- option.value = option.__value;
512
- add_location(option, file, 252, 8, 7803);
513
- },
514
- m: function mount(target, anchor) {
515
- insert_dev(target, option, anchor);
516
- append_dev(option, t);
517
- },
518
- p: function update(ctx, dirty) {
519
- if (dirty[0] & /*countries*/ 2048 && t_value !== (t_value = /*country*/ ctx[58].Name + "")) set_data_dev(t, t_value);
520
-
521
- if (dirty[0] & /*countries*/ 2048 && option_value_value !== (option_value_value = /*country*/ ctx[58].Alpha2Code)) {
522
- prop_dev(option, "__value", option_value_value);
523
- option.value = option.__value;
524
- }
525
- },
526
- d: function destroy(detaching) {
527
- if (detaching) detach_dev(option);
528
- }
529
- };
530
-
531
- dispatch_dev("SvelteRegisterBlock", {
532
- block,
533
- id: create_each_block_1.name,
534
- type: "each",
535
- source: "(252:6) {#each countries as country}",
536
- ctx
537
- });
538
-
539
- return block;
540
- }
541
-
542
- // (260:4) {#if invalidNationality}
543
- function create_if_block_4(ctx) {
544
- let p;
545
-
546
- const block = {
547
- c: function create() {
548
- p = element("p");
549
- p.textContent = "Nationality must be at least 1 character long.";
550
- attr_dev(p, "class", "InvalidInput");
551
- add_location(p, file, 260, 6, 8197);
552
- },
553
- m: function mount(target, anchor) {
554
- insert_dev(target, p, anchor);
555
- },
556
- d: function destroy(detaching) {
557
- if (detaching) detach_dev(p);
558
- }
559
- };
560
-
561
- dispatch_dev("SvelteRegisterBlock", {
562
- block,
563
- id: create_if_block_4.name,
564
- type: "if",
565
- source: "(260:4) {#if invalidNationality}",
566
- ctx
567
- });
568
-
569
- return block;
570
- }
571
-
572
- // (268:8) {#each mobilePrefixes as mobilePrefix}
573
- function create_each_block(ctx) {
574
- let option;
575
- let t_value = /*mobilePrefix*/ ctx[55].Prefix + "";
576
- let t;
577
- let option_value_value;
578
-
579
- const block = {
580
- c: function create() {
581
- option = element("option");
582
- t = text(t_value);
583
- option.__value = option_value_value = /*mobilePrefix*/ ctx[55].Prefix;
584
- option.value = option.__value;
585
- add_location(option, file, 268, 10, 8603);
586
- },
587
- m: function mount(target, anchor) {
588
- insert_dev(target, option, anchor);
589
- append_dev(option, t);
590
- },
591
- p: function update(ctx, dirty) {
592
- if (dirty[0] & /*mobilePrefixes*/ 32768 && t_value !== (t_value = /*mobilePrefix*/ ctx[55].Prefix + "")) set_data_dev(t, t_value);
593
-
594
- if (dirty[0] & /*mobilePrefixes*/ 32768 && option_value_value !== (option_value_value = /*mobilePrefix*/ ctx[55].Prefix)) {
595
- prop_dev(option, "__value", option_value_value);
596
- option.value = option.__value;
597
- }
598
- },
599
- d: function destroy(detaching) {
600
- if (detaching) detach_dev(option);
601
- }
602
- };
603
-
604
- dispatch_dev("SvelteRegisterBlock", {
605
- block,
606
- id: create_each_block.name,
607
- type: "each",
608
- source: "(268:8) {#each mobilePrefixes as mobilePrefix}",
609
- ctx
610
- });
611
-
612
- return block;
613
- }
614
-
615
- // (273:6) {#if invalidMobile}
616
- function create_if_block_3(ctx) {
617
- let p;
618
-
619
- const block = {
620
- c: function create() {
621
- p = element("p");
622
- p.textContent = "Mobile must be at least 5 character long and 20 characters maximum.";
623
- attr_dev(p, "class", "InvalidInput");
624
- add_location(p, file, 273, 8, 8953);
625
- },
626
- m: function mount(target, anchor) {
627
- insert_dev(target, p, anchor);
628
- },
629
- d: function destroy(detaching) {
630
- if (detaching) detach_dev(p);
631
- }
632
- };
633
-
634
- dispatch_dev("SvelteRegisterBlock", {
635
- block,
636
- id: create_if_block_3.name,
637
- type: "if",
638
- source: "(273:6) {#if invalidMobile}",
639
- ctx
640
- });
641
-
642
- return block;
643
- }
644
-
645
- // (278:2) {#if userconsentexists}
646
- function create_if_block_1(ctx) {
647
- let div1;
648
- let label0;
649
- let t0;
650
- let br;
651
- let t1;
652
- let input0;
653
- let t2;
654
- let span0;
655
- let t3;
656
- let div0;
657
- let label1;
658
- let t4;
659
- let input1;
660
- let input1_disabled_value;
661
- let t5;
662
- let span1;
663
- let t6;
664
- let label2;
665
- let t7;
666
- let input2;
667
- let input2_disabled_value;
668
- let t8;
669
- let span2;
670
- let t9;
671
- let div2;
672
- let label3;
673
- let t10;
674
- let input3;
675
- let t11;
676
- let span3;
677
- let t12;
678
- let if_block_anchor;
679
- let mounted;
680
- let dispose;
681
- let if_block = !/*consentTerms*/ ctx[20] && create_if_block_2(ctx);
682
-
683
- const block = {
684
- c: function create() {
685
- div1 = element("div");
686
- label0 = element("label");
687
- t0 = text("I want to receive exclusive offers and bonuses.");
688
- br = element("br");
689
- t1 = text("I am aware that I can unsubscribe whenever I want to.\n ");
690
- input0 = element("input");
691
- t2 = space();
692
- span0 = element("span");
693
- t3 = space();
694
- div0 = element("div");
695
- label1 = element("label");
696
- t4 = text("SMS\n ");
697
- input1 = element("input");
698
- t5 = space();
699
- span1 = element("span");
700
- t6 = space();
701
- label2 = element("label");
702
- t7 = text("Emails\n ");
703
- input2 = element("input");
704
- t8 = space();
705
- span2 = element("span");
706
- t9 = space();
707
- div2 = element("div");
708
- label3 = element("label");
709
- t10 = text("I am at least 21 years old and I have read and accepted the Terms of Conditions.\n ");
710
- input3 = element("input");
711
- t11 = space();
712
- span3 = element("span");
713
- t12 = space();
714
- if (if_block) if_block.c();
715
- if_block_anchor = empty();
716
- add_location(br, file, 279, 75, 9216);
717
- attr_dev(input0, "type", "Checkbox");
718
- input0.checked = /*consentOffers*/ ctx[17];
719
- add_location(input0, file, 280, 8, 9283);
720
- attr_dev(span0, "class", "Checkmark");
721
- add_location(span0, file, 281, 8, 9373);
722
- attr_dev(label0, "class", "Offers");
723
- add_location(label0, file, 279, 6, 9147);
724
- attr_dev(input1, "type", "Checkbox");
725
- input1.disabled = input1_disabled_value = !/*consentOffers*/ ctx[17];
726
- input1.checked = /*consentOffersSms*/ ctx[18];
727
- add_location(input1, file, 285, 10, 9511);
728
- attr_dev(span1, "class", "Checkmark");
729
- add_location(span1, file, 286, 10, 9635);
730
- attr_dev(label1, "class", "OffersMethod");
731
- add_location(label1, file, 284, 8, 9469);
732
- attr_dev(input2, "type", "Checkbox");
733
- input2.disabled = input2_disabled_value = !/*consentOffers*/ ctx[17];
734
- input2.checked = /*consentOffersEmail*/ ctx[19];
735
- add_location(input2, file, 289, 10, 9737);
736
- attr_dev(span2, "class", "Checkmark");
737
- add_location(span2, file, 290, 10, 9865);
738
- attr_dev(label2, "class", "OffersMethod");
739
- add_location(label2, file, 288, 8, 9692);
740
- attr_dev(div0, "class", "OffersMethodsWrapper");
741
- add_location(div0, file, 283, 6, 9426);
742
- attr_dev(div1, "class", "OffersContainer");
743
- add_location(div1, file, 278, 4, 9111);
744
- attr_dev(input3, "type", "Checkbox");
745
- input3.checked = /*consentTerms*/ ctx[20];
746
- add_location(input3, file, 296, 8, 10090);
747
- attr_dev(span3, "class", "Checkmark");
748
- add_location(span3, file, 297, 8, 10178);
749
- attr_dev(label3, "class", "AgeConsent");
750
- add_location(label3, file, 295, 6, 9975);
751
- attr_dev(div2, "class", "AgeContainer");
752
- add_location(div2, file, 294, 4, 9942);
753
- },
754
- m: function mount(target, anchor) {
755
- insert_dev(target, div1, anchor);
756
- append_dev(div1, label0);
757
- append_dev(label0, t0);
758
- append_dev(label0, br);
759
- append_dev(label0, t1);
760
- append_dev(label0, input0);
761
- append_dev(label0, t2);
762
- append_dev(label0, span0);
763
- append_dev(div1, t3);
764
- append_dev(div1, div0);
765
- append_dev(div0, label1);
766
- append_dev(label1, t4);
767
- append_dev(label1, input1);
768
- append_dev(label1, t5);
769
- append_dev(label1, span1);
770
- append_dev(div0, t6);
771
- append_dev(div0, label2);
772
- append_dev(label2, t7);
773
- append_dev(label2, input2);
774
- append_dev(label2, t8);
775
- append_dev(label2, span2);
776
- insert_dev(target, t9, anchor);
777
- insert_dev(target, div2, anchor);
778
- append_dev(div2, label3);
779
- append_dev(label3, t10);
780
- append_dev(label3, input3);
781
- append_dev(label3, t11);
782
- append_dev(label3, span3);
783
- insert_dev(target, t12, anchor);
784
- if (if_block) if_block.m(target, anchor);
785
- insert_dev(target, if_block_anchor, anchor);
786
-
787
- if (!mounted) {
788
- dispose = [
789
- listen_dev(input0, "click", /*click_handler*/ ctx[41], false, false, false),
790
- listen_dev(input1, "click", /*click_handler_1*/ ctx[42], false, false, false),
791
- listen_dev(input2, "click", /*click_handler_2*/ ctx[43], false, false, false),
792
- listen_dev(input3, "click", /*click_handler_3*/ ctx[44], false, false, false)
793
- ];
794
-
795
- mounted = true;
796
- }
797
- },
798
- p: function update(ctx, dirty) {
799
- if (dirty[0] & /*consentOffers*/ 131072) {
800
- prop_dev(input0, "checked", /*consentOffers*/ ctx[17]);
801
- }
802
-
803
- if (dirty[0] & /*consentOffers*/ 131072 && input1_disabled_value !== (input1_disabled_value = !/*consentOffers*/ ctx[17])) {
804
- prop_dev(input1, "disabled", input1_disabled_value);
805
- }
806
-
807
- if (dirty[0] & /*consentOffersSms*/ 262144) {
808
- prop_dev(input1, "checked", /*consentOffersSms*/ ctx[18]);
809
- }
810
-
811
- if (dirty[0] & /*consentOffers*/ 131072 && input2_disabled_value !== (input2_disabled_value = !/*consentOffers*/ ctx[17])) {
812
- prop_dev(input2, "disabled", input2_disabled_value);
813
- }
814
-
815
- if (dirty[0] & /*consentOffersEmail*/ 524288) {
816
- prop_dev(input2, "checked", /*consentOffersEmail*/ ctx[19]);
817
- }
818
-
819
- if (dirty[0] & /*consentTerms*/ 1048576) {
820
- prop_dev(input3, "checked", /*consentTerms*/ ctx[20]);
821
- }
822
-
823
- if (!/*consentTerms*/ ctx[20]) {
824
- if (if_block) ; else {
825
- if_block = create_if_block_2(ctx);
826
- if_block.c();
827
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
828
- }
829
- } else if (if_block) {
830
- if_block.d(1);
831
- if_block = null;
832
- }
833
- },
834
- d: function destroy(detaching) {
835
- if (detaching) detach_dev(div1);
836
- if (detaching) detach_dev(t9);
837
- if (detaching) detach_dev(div2);
838
- if (detaching) detach_dev(t12);
839
- if (if_block) if_block.d(detaching);
840
- if (detaching) detach_dev(if_block_anchor);
841
- mounted = false;
842
- run_all(dispose);
843
- }
844
- };
845
-
846
- dispatch_dev("SvelteRegisterBlock", {
847
- block,
848
- id: create_if_block_1.name,
849
- type: "if",
850
- source: "(278:2) {#if userconsentexists}",
851
- ctx
852
- });
853
-
854
- return block;
855
- }
856
-
857
- // (301:4) {#if !consentTerms}
858
- function create_if_block_2(ctx) {
859
- let div;
860
- let p;
861
-
862
- const block = {
863
- c: function create() {
864
- div = element("div");
865
- p = element("p");
866
- p.textContent = "Please accept the Terms and Conditions before proceeding.";
867
- add_location(p, file, 302, 8, 10310);
868
- attr_dev(div, "class", "NotificationContainer");
869
- add_location(div, file, 301, 6, 10266);
870
- },
871
- m: function mount(target, anchor) {
872
- insert_dev(target, div, anchor);
873
- append_dev(div, p);
874
- },
875
- d: function destroy(detaching) {
876
- if (detaching) detach_dev(div);
877
- }
878
- };
879
-
880
- dispatch_dev("SvelteRegisterBlock", {
881
- block,
882
- id: create_if_block_2.name,
883
- type: "if",
884
- source: "(301:4) {#if !consentTerms}",
885
- ctx
886
- });
887
-
888
- return block;
889
- }
890
-
891
- // (308:0) {#if showError}
892
- function create_if_block(ctx) {
893
- let div;
894
- let p;
895
- let t;
896
-
897
- const block = {
898
- c: function create() {
899
- div = element("div");
900
- p = element("p");
901
- t = text(/*error*/ ctx[7]);
902
- attr_dev(p, "class", "RegisterError");
903
- add_location(p, file, 309, 4, 10441);
904
- add_location(div, file, 308, 2, 10431);
905
- },
906
- m: function mount(target, anchor) {
907
- insert_dev(target, div, anchor);
908
- append_dev(div, p);
909
- append_dev(p, t);
910
- },
911
- p: function update(ctx, dirty) {
912
- if (dirty[0] & /*error*/ 128) set_data_dev(t, /*error*/ ctx[7]);
913
- },
914
- d: function destroy(detaching) {
915
- if (detaching) detach_dev(div);
916
- }
917
- };
918
-
919
- dispatch_dev("SvelteRegisterBlock", {
920
- block,
921
- id: create_if_block.name,
922
- type: "if",
923
- source: "(308:0) {#if showError}",
924
- ctx
925
- });
926
-
927
- return block;
928
- }
929
-
930
- function create_fragment(ctx) {
931
- let script;
932
- let script_src_value;
933
- let t0;
934
- let div0;
935
- let t1;
936
- let div1;
937
- let button0;
938
- let svg;
939
- let defs;
940
- let style;
941
- let t2;
942
- let path;
943
- let t3;
944
- let t4;
945
- let div10;
946
- let div4;
947
- let div2;
948
- let label0;
949
- let t5;
950
- let span0;
951
- let t7;
952
- let input0;
953
- let t8;
954
- let div2_class_value;
955
- let t9;
956
- let div3;
957
- let label1;
958
- let t10;
959
- let span1;
960
- let t12;
961
- let input1;
962
- let t13;
963
- let div3_class_value;
964
- let t14;
965
- let div5;
966
- let label2;
967
- let t15;
968
- let span2;
969
- let t17;
970
- let input2;
971
- let t18;
972
- let div5_class_value;
973
- let t19;
974
- let div6;
975
- let label3;
976
- let t20;
977
- let span3;
978
- let t22;
979
- let select0;
980
- let t23;
981
- let div7;
982
- let label4;
983
- let t24;
984
- let span4;
985
- let t26;
986
- let input3;
987
- let t27;
988
- let div7_class_value;
989
- let t28;
990
- let div9;
991
- let label5;
992
- let t29;
993
- let span5;
994
- let t31;
995
- let div8;
996
- let select1;
997
- let t32;
998
- let input4;
999
- let t33;
1000
- let div9_class_value;
1001
- let t34;
1002
- let t35;
1003
- let t36;
1004
- let button1;
1005
- let t37;
1006
- let button1_disabled_value;
1007
- let mounted;
1008
- let dispose;
1009
- let if_block0 = /*invalidAddress*/ ctx[1] && create_if_block_7(ctx);
1010
- let if_block1 = /*invalidPostalCode*/ ctx[2] && create_if_block_6(ctx);
1011
- let if_block2 = /*invalidCity*/ ctx[4] && create_if_block_5(ctx);
1012
- let each_value_1 = /*countries*/ ctx[11];
1013
- validate_each_argument(each_value_1);
1014
- let each_blocks_1 = [];
1015
-
1016
- for (let i = 0; i < each_value_1.length; i += 1) {
1017
- each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
1018
- }
1019
-
1020
- let if_block3 = /*invalidNationality*/ ctx[5] && create_if_block_4(ctx);
1021
- let each_value = /*mobilePrefixes*/ ctx[15];
1022
- validate_each_argument(each_value);
1023
- let each_blocks = [];
1024
-
1025
- for (let i = 0; i < each_value.length; i += 1) {
1026
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
1027
- }
1028
-
1029
- let if_block4 = /*invalidMobile*/ ctx[3] && create_if_block_3(ctx);
1030
- let if_block5 = /*userconsentexists*/ ctx[0] && create_if_block_1(ctx);
1031
- let if_block6 = /*showError*/ ctx[6] && create_if_block(ctx);
1032
-
1033
- const block = {
1034
- c: function create() {
1035
- script = element("script");
1036
- t0 = space();
1037
- div0 = element("div");
1038
- t1 = space();
1039
- div1 = element("div");
1040
- button0 = element("button");
1041
- svg = svg_element("svg");
1042
- defs = svg_element("defs");
1043
- style = svg_element("style");
1044
- t2 = text(".a{fill:#d0046c;}");
1045
- path = svg_element("path");
1046
- t3 = text("\n Back");
1047
- t4 = space();
1048
- div10 = element("div");
1049
- div4 = element("div");
1050
- div2 = element("div");
1051
- label0 = element("label");
1052
- t5 = text("Address:");
1053
- span0 = element("span");
1054
- span0.textContent = "*";
1055
- t7 = space();
1056
- input0 = element("input");
1057
- t8 = space();
1058
- if (if_block0) if_block0.c();
1059
- t9 = space();
1060
- div3 = element("div");
1061
- label1 = element("label");
1062
- t10 = text("Postal Code:");
1063
- span1 = element("span");
1064
- span1.textContent = "*";
1065
- t12 = space();
1066
- input1 = element("input");
1067
- t13 = space();
1068
- if (if_block1) if_block1.c();
1069
- t14 = space();
1070
- div5 = element("div");
1071
- label2 = element("label");
1072
- t15 = text("City:");
1073
- span2 = element("span");
1074
- span2.textContent = "*";
1075
- t17 = space();
1076
- input2 = element("input");
1077
- t18 = space();
1078
- if (if_block2) if_block2.c();
1079
- t19 = space();
1080
- div6 = element("div");
1081
- label3 = element("label");
1082
- t20 = text("Country:");
1083
- span3 = element("span");
1084
- span3.textContent = "*";
1085
- t22 = space();
1086
- select0 = element("select");
1087
-
1088
- for (let i = 0; i < each_blocks_1.length; i += 1) {
1089
- each_blocks_1[i].c();
1090
- }
1091
-
1092
- t23 = space();
1093
- div7 = element("div");
1094
- label4 = element("label");
1095
- t24 = text("Nationality:");
1096
- span4 = element("span");
1097
- span4.textContent = "*";
1098
- t26 = space();
1099
- input3 = element("input");
1100
- t27 = space();
1101
- if (if_block3) if_block3.c();
1102
- t28 = space();
1103
- div9 = element("div");
1104
- label5 = element("label");
1105
- t29 = text("Mobile:");
1106
- span5 = element("span");
1107
- span5.textContent = "*";
1108
- t31 = space();
1109
- div8 = element("div");
1110
- select1 = element("select");
1111
-
1112
- for (let i = 0; i < each_blocks.length; i += 1) {
1113
- each_blocks[i].c();
1114
- }
1115
-
1116
- t32 = space();
1117
- input4 = element("input");
1118
- t33 = space();
1119
- if (if_block4) if_block4.c();
1120
- t34 = space();
1121
- if (if_block5) if_block5.c();
1122
- t35 = space();
1123
- if (if_block6) if_block6.c();
1124
- t36 = space();
1125
- button1 = element("button");
1126
- t37 = text("Open Account");
1127
- this.c = noop;
1128
- if (script.src !== (script_src_value = "//www.google.com/recaptcha/api.js?render=" + captchaKey)) attr_dev(script, "src", script_src_value);
1129
- script.async = true;
1130
- script.defer = true;
1131
- add_location(script, file, 213, 2, 5815);
1132
- attr_dev(div0, "class", "g-recaptcha");
1133
- attr_dev(div0, "data-sitekey", captchaKey);
1134
- add_location(div0, file, 216, 0, 5921);
1135
- add_location(style, file, 220, 70, 6129);
1136
- add_location(defs, file, 220, 64, 6123);
1137
- attr_dev(path, "class", "a");
1138
- attr_dev(path, "d", "M12,0,9.818,2.182l8.26,8.26H0v3.117H18.078l-8.26,8.26L12,24,24,12Z");
1139
- attr_dev(path, "transform", "translate(24 24) rotate(180)");
1140
- add_location(path, file, 220, 109, 6168);
1141
- attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
1142
- attr_dev(svg, "viewBox", "0 0 24 24");
1143
- add_location(svg, file, 220, 4, 6063);
1144
- attr_dev(button0, "class", "BackButton");
1145
- add_location(button0, file, 219, 2, 6013);
1146
- attr_dev(div1, "class", "RegisterFormHeader");
1147
- add_location(div1, file, 218, 0, 5978);
1148
- attr_dev(span0, "class", "FormRequired");
1149
- add_location(span0, file, 227, 35, 6518);
1150
- attr_dev(label0, "for", "Address");
1151
- add_location(label0, file, 227, 6, 6489);
1152
- attr_dev(input0, "type", "text");
1153
- attr_dev(input0, "id", "Address");
1154
- add_location(input0, file, 228, 6, 6568);
1155
- attr_dev(div2, "class", div2_class_value = "AddressContainer " + (/*invalidAddress*/ ctx[1] ? "InvalidField" : ""));
1156
- add_location(div2, file, 226, 4, 6413);
1157
- attr_dev(span1, "class", "FormRequired");
1158
- add_location(span1, file, 234, 42, 6928);
1159
- attr_dev(label1, "for", "PostalCode");
1160
- add_location(label1, file, 234, 6, 6892);
1161
- attr_dev(input1, "type", "text");
1162
- attr_dev(input1, "id", "PostalCode");
1163
- add_location(input1, file, 235, 6, 6978);
1164
- attr_dev(div3, "class", div3_class_value = "PostalCodeContainer " + (/*invalidPostalCode*/ ctx[2] ? "InvalidField" : ""));
1165
- add_location(div3, file, 233, 4, 6810);
1166
- attr_dev(div4, "class", "AddressPostalCodeContainer");
1167
- add_location(div4, file, 225, 2, 6368);
1168
- attr_dev(span2, "class", "FormRequired");
1169
- add_location(span2, file, 242, 27, 7333);
1170
- attr_dev(label2, "for", "City");
1171
- add_location(label2, file, 242, 4, 7310);
1172
- attr_dev(input2, "type", "text");
1173
- attr_dev(input2, "id", "City");
1174
- add_location(input2, file, 243, 4, 7381);
1175
- attr_dev(div5, "class", div5_class_value = "CityContainer " + (/*invalidCity*/ ctx[4] ? "InvalidField" : ""));
1176
- add_location(div5, file, 241, 2, 7242);
1177
- attr_dev(span3, "class", "FormRequired");
1178
- add_location(span3, file, 249, 33, 7661);
1179
- attr_dev(label3, "for", "Country");
1180
- add_location(label3, file, 249, 4, 7632);
1181
- attr_dev(select0, "id", "Country");
1182
- if (/*countrySelected*/ ctx[12] === void 0) add_render_callback(() => /*select0_change_handler*/ ctx[37].call(select0));
1183
- add_location(select0, file, 250, 4, 7709);
1184
- attr_dev(div6, "class", "CountryContainer");
1185
- add_location(div6, file, 248, 2, 7597);
1186
- attr_dev(span4, "class", "FormRequired");
1187
- add_location(span4, file, 257, 41, 8020);
1188
- attr_dev(label4, "for", "Nationality");
1189
- add_location(label4, file, 257, 4, 7983);
1190
- attr_dev(input3, "type", "text");
1191
- attr_dev(input3, "id", "Nationality");
1192
- add_location(input3, file, 258, 4, 8068);
1193
- attr_dev(div7, "class", div7_class_value = "NationalityContainer " + (/*invalidNationality*/ ctx[5] ? "InvalidField" : ""));
1194
- add_location(div7, file, 256, 2, 7901);
1195
- attr_dev(span5, "class", "FormRequired");
1196
- add_location(span5, file, 264, 31, 8392);
1197
- attr_dev(label5, "for", "Mobile");
1198
- add_location(label5, file, 264, 4, 8365);
1199
- attr_dev(select1, "class", "MobilePrefixSelected");
1200
- if (/*mobilePrefixSelected*/ ctx[16] === void 0) add_render_callback(() => /*select1_change_handler*/ ctx[39].call(select1));
1201
- add_location(select1, file, 266, 6, 8474);
1202
- attr_dev(input4, "type", "text");
1203
- attr_dev(input4, "oninput", "this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\\..*)\\./g, '$1');");
1204
- attr_dev(input4, "id", "Mobile");
1205
- attr_dev(input4, "class", "MobileInput");
1206
- add_location(input4, file, 271, 6, 8708);
1207
- attr_dev(div8, "class", "MobileWrapper");
1208
- add_location(div8, file, 265, 4, 8440);
1209
- attr_dev(div9, "class", div9_class_value = "MobileContainer " + (/*invalidMobile*/ ctx[3] ? "InvalidField" : ""));
1210
- add_location(div9, file, 263, 2, 8293);
1211
- attr_dev(div10, "class", "RegisterFormContent");
1212
- add_location(div10, file, 224, 0, 6332);
1213
- attr_dev(button1, "class", "RegisterStepNext");
1214
- button1.disabled = button1_disabled_value = !/*isValid*/ ctx[21];
1215
- add_location(button1, file, 312, 0, 10493);
1216
- },
1217
- l: function claim(nodes) {
1218
- throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
1219
- },
1220
- m: function mount(target, anchor) {
1221
- append_dev(document.head, script);
1222
- insert_dev(target, t0, anchor);
1223
- insert_dev(target, div0, anchor);
1224
- insert_dev(target, t1, anchor);
1225
- insert_dev(target, div1, anchor);
1226
- append_dev(div1, button0);
1227
- append_dev(button0, svg);
1228
- append_dev(svg, defs);
1229
- append_dev(defs, style);
1230
- append_dev(style, t2);
1231
- append_dev(svg, path);
1232
- append_dev(button0, t3);
1233
- insert_dev(target, t4, anchor);
1234
- insert_dev(target, div10, anchor);
1235
- append_dev(div10, div4);
1236
- append_dev(div4, div2);
1237
- append_dev(div2, label0);
1238
- append_dev(label0, t5);
1239
- append_dev(label0, span0);
1240
- append_dev(div2, t7);
1241
- append_dev(div2, input0);
1242
- set_input_value(input0, /*address*/ ctx[8]);
1243
- append_dev(div2, t8);
1244
- if (if_block0) if_block0.m(div2, null);
1245
- append_dev(div4, t9);
1246
- append_dev(div4, div3);
1247
- append_dev(div3, label1);
1248
- append_dev(label1, t10);
1249
- append_dev(label1, span1);
1250
- append_dev(div3, t12);
1251
- append_dev(div3, input1);
1252
- set_input_value(input1, /*postalCode*/ ctx[9]);
1253
- append_dev(div3, t13);
1254
- if (if_block1) if_block1.m(div3, null);
1255
- append_dev(div10, t14);
1256
- append_dev(div10, div5);
1257
- append_dev(div5, label2);
1258
- append_dev(label2, t15);
1259
- append_dev(label2, span2);
1260
- append_dev(div5, t17);
1261
- append_dev(div5, input2);
1262
- set_input_value(input2, /*city*/ ctx[10]);
1263
- append_dev(div5, t18);
1264
- if (if_block2) if_block2.m(div5, null);
1265
- append_dev(div10, t19);
1266
- append_dev(div10, div6);
1267
- append_dev(div6, label3);
1268
- append_dev(label3, t20);
1269
- append_dev(label3, span3);
1270
- append_dev(div6, t22);
1271
- append_dev(div6, select0);
1272
-
1273
- for (let i = 0; i < each_blocks_1.length; i += 1) {
1274
- each_blocks_1[i].m(select0, null);
1275
- }
1276
-
1277
- select_option(select0, /*countrySelected*/ ctx[12]);
1278
- append_dev(div10, t23);
1279
- append_dev(div10, div7);
1280
- append_dev(div7, label4);
1281
- append_dev(label4, t24);
1282
- append_dev(label4, span4);
1283
- append_dev(div7, t26);
1284
- append_dev(div7, input3);
1285
- set_input_value(input3, /*nationality*/ ctx[13]);
1286
- append_dev(div7, t27);
1287
- if (if_block3) if_block3.m(div7, null);
1288
- append_dev(div10, t28);
1289
- append_dev(div10, div9);
1290
- append_dev(div9, label5);
1291
- append_dev(label5, t29);
1292
- append_dev(label5, span5);
1293
- append_dev(div9, t31);
1294
- append_dev(div9, div8);
1295
- append_dev(div8, select1);
1296
-
1297
- for (let i = 0; i < each_blocks.length; i += 1) {
1298
- each_blocks[i].m(select1, null);
1299
- }
1300
-
1301
- select_option(select1, /*mobilePrefixSelected*/ ctx[16]);
1302
- append_dev(div8, t32);
1303
- append_dev(div8, input4);
1304
- set_input_value(input4, /*mobile*/ ctx[14]);
1305
- append_dev(div8, t33);
1306
- if (if_block4) if_block4.m(div8, null);
1307
- append_dev(div10, t34);
1308
- if (if_block5) if_block5.m(div10, null);
1309
- insert_dev(target, t35, anchor);
1310
- if (if_block6) if_block6.m(target, anchor);
1311
- insert_dev(target, t36, anchor);
1312
- insert_dev(target, button1, anchor);
1313
- append_dev(button1, t37);
1314
-
1315
- if (!mounted) {
1316
- dispose = [
1317
- listen_dev(button0, "click", /*goBack*/ ctx[32], false, false, false),
1318
- listen_dev(input0, "input", /*input0_input_handler*/ ctx[34]),
1319
- listen_dev(input0, "blur", /*validateAddress*/ ctx[22], false, false, false),
1320
- listen_dev(input1, "input", /*input1_input_handler*/ ctx[35]),
1321
- listen_dev(input1, "blur", /*validatePostalCode*/ ctx[23], false, false, false),
1322
- listen_dev(input2, "input", /*input2_input_handler*/ ctx[36]),
1323
- listen_dev(input2, "blur", /*validateCity*/ ctx[24], false, false, false),
1324
- listen_dev(select0, "change", /*select0_change_handler*/ ctx[37]),
1325
- listen_dev(input3, "input", /*input3_input_handler*/ ctx[38]),
1326
- listen_dev(input3, "blur", /*validateNationality*/ ctx[25], false, false, false),
1327
- listen_dev(select1, "change", /*select1_change_handler*/ ctx[39]),
1328
- listen_dev(input4, "input", /*input4_input_handler*/ ctx[40]),
1329
- listen_dev(input4, "keyup", /*validateMobile*/ ctx[26], false, false, false),
1330
- listen_dev(button1, "click", /*goNext*/ ctx[31], false, false, false)
1331
- ];
1332
-
1333
- mounted = true;
1334
- }
1335
- },
1336
- p: function update(ctx, dirty) {
1337
- if (dirty[0] & /*address*/ 256 && input0.value !== /*address*/ ctx[8]) {
1338
- set_input_value(input0, /*address*/ ctx[8]);
1339
- }
1340
-
1341
- if (/*invalidAddress*/ ctx[1]) {
1342
- if (if_block0) ; else {
1343
- if_block0 = create_if_block_7(ctx);
1344
- if_block0.c();
1345
- if_block0.m(div2, null);
1346
- }
1347
- } else if (if_block0) {
1348
- if_block0.d(1);
1349
- if_block0 = null;
1350
- }
1351
-
1352
- if (dirty[0] & /*invalidAddress*/ 2 && div2_class_value !== (div2_class_value = "AddressContainer " + (/*invalidAddress*/ ctx[1] ? "InvalidField" : ""))) {
1353
- attr_dev(div2, "class", div2_class_value);
1354
- }
1355
-
1356
- if (dirty[0] & /*postalCode*/ 512 && input1.value !== /*postalCode*/ ctx[9]) {
1357
- set_input_value(input1, /*postalCode*/ ctx[9]);
1358
- }
1359
-
1360
- if (/*invalidPostalCode*/ ctx[2]) {
1361
- if (if_block1) ; else {
1362
- if_block1 = create_if_block_6(ctx);
1363
- if_block1.c();
1364
- if_block1.m(div3, null);
1365
- }
1366
- } else if (if_block1) {
1367
- if_block1.d(1);
1368
- if_block1 = null;
1369
- }
1370
-
1371
- if (dirty[0] & /*invalidPostalCode*/ 4 && div3_class_value !== (div3_class_value = "PostalCodeContainer " + (/*invalidPostalCode*/ ctx[2] ? "InvalidField" : ""))) {
1372
- attr_dev(div3, "class", div3_class_value);
1373
- }
1374
-
1375
- if (dirty[0] & /*city*/ 1024 && input2.value !== /*city*/ ctx[10]) {
1376
- set_input_value(input2, /*city*/ ctx[10]);
1377
- }
1378
-
1379
- if (/*invalidCity*/ ctx[4]) {
1380
- if (if_block2) ; else {
1381
- if_block2 = create_if_block_5(ctx);
1382
- if_block2.c();
1383
- if_block2.m(div5, null);
1384
- }
1385
- } else if (if_block2) {
1386
- if_block2.d(1);
1387
- if_block2 = null;
1388
- }
1389
-
1390
- if (dirty[0] & /*invalidCity*/ 16 && div5_class_value !== (div5_class_value = "CityContainer " + (/*invalidCity*/ ctx[4] ? "InvalidField" : ""))) {
1391
- attr_dev(div5, "class", div5_class_value);
1392
- }
1393
-
1394
- if (dirty[0] & /*countries*/ 2048) {
1395
- each_value_1 = /*countries*/ ctx[11];
1396
- validate_each_argument(each_value_1);
1397
- let i;
1398
-
1399
- for (i = 0; i < each_value_1.length; i += 1) {
1400
- const child_ctx = get_each_context_1(ctx, each_value_1, i);
1401
-
1402
- if (each_blocks_1[i]) {
1403
- each_blocks_1[i].p(child_ctx, dirty);
1404
- } else {
1405
- each_blocks_1[i] = create_each_block_1(child_ctx);
1406
- each_blocks_1[i].c();
1407
- each_blocks_1[i].m(select0, null);
1408
- }
1409
- }
1410
-
1411
- for (; i < each_blocks_1.length; i += 1) {
1412
- each_blocks_1[i].d(1);
1413
- }
1414
-
1415
- each_blocks_1.length = each_value_1.length;
1416
- }
1417
-
1418
- if (dirty[0] & /*countrySelected, countries*/ 6144) {
1419
- select_option(select0, /*countrySelected*/ ctx[12]);
1420
- }
1421
-
1422
- if (dirty[0] & /*nationality*/ 8192 && input3.value !== /*nationality*/ ctx[13]) {
1423
- set_input_value(input3, /*nationality*/ ctx[13]);
1424
- }
1425
-
1426
- if (/*invalidNationality*/ ctx[5]) {
1427
- if (if_block3) ; else {
1428
- if_block3 = create_if_block_4(ctx);
1429
- if_block3.c();
1430
- if_block3.m(div7, null);
1431
- }
1432
- } else if (if_block3) {
1433
- if_block3.d(1);
1434
- if_block3 = null;
1435
- }
1436
-
1437
- if (dirty[0] & /*invalidNationality*/ 32 && div7_class_value !== (div7_class_value = "NationalityContainer " + (/*invalidNationality*/ ctx[5] ? "InvalidField" : ""))) {
1438
- attr_dev(div7, "class", div7_class_value);
1439
- }
1440
-
1441
- if (dirty[0] & /*mobilePrefixes*/ 32768) {
1442
- each_value = /*mobilePrefixes*/ ctx[15];
1443
- validate_each_argument(each_value);
1444
- let i;
1445
-
1446
- for (i = 0; i < each_value.length; i += 1) {
1447
- const child_ctx = get_each_context(ctx, each_value, i);
1448
-
1449
- if (each_blocks[i]) {
1450
- each_blocks[i].p(child_ctx, dirty);
1451
- } else {
1452
- each_blocks[i] = create_each_block(child_ctx);
1453
- each_blocks[i].c();
1454
- each_blocks[i].m(select1, null);
1455
- }
1456
- }
1457
-
1458
- for (; i < each_blocks.length; i += 1) {
1459
- each_blocks[i].d(1);
1460
- }
1461
-
1462
- each_blocks.length = each_value.length;
1463
- }
1464
-
1465
- if (dirty[0] & /*mobilePrefixSelected, mobilePrefixes*/ 98304) {
1466
- select_option(select1, /*mobilePrefixSelected*/ ctx[16]);
1467
- }
1468
-
1469
- if (dirty[0] & /*mobile*/ 16384 && input4.value !== /*mobile*/ ctx[14]) {
1470
- set_input_value(input4, /*mobile*/ ctx[14]);
1471
- }
1472
-
1473
- if (/*invalidMobile*/ ctx[3]) {
1474
- if (if_block4) ; else {
1475
- if_block4 = create_if_block_3(ctx);
1476
- if_block4.c();
1477
- if_block4.m(div8, null);
1478
- }
1479
- } else if (if_block4) {
1480
- if_block4.d(1);
1481
- if_block4 = null;
1482
- }
1483
-
1484
- if (dirty[0] & /*invalidMobile*/ 8 && div9_class_value !== (div9_class_value = "MobileContainer " + (/*invalidMobile*/ ctx[3] ? "InvalidField" : ""))) {
1485
- attr_dev(div9, "class", div9_class_value);
1486
- }
1487
-
1488
- if (/*userconsentexists*/ ctx[0]) {
1489
- if (if_block5) {
1490
- if_block5.p(ctx, dirty);
1491
- } else {
1492
- if_block5 = create_if_block_1(ctx);
1493
- if_block5.c();
1494
- if_block5.m(div10, null);
1495
- }
1496
- } else if (if_block5) {
1497
- if_block5.d(1);
1498
- if_block5 = null;
1499
- }
1500
-
1501
- if (/*showError*/ ctx[6]) {
1502
- if (if_block6) {
1503
- if_block6.p(ctx, dirty);
1504
- } else {
1505
- if_block6 = create_if_block(ctx);
1506
- if_block6.c();
1507
- if_block6.m(t36.parentNode, t36);
1508
- }
1509
- } else if (if_block6) {
1510
- if_block6.d(1);
1511
- if_block6 = null;
1512
- }
1513
-
1514
- if (dirty[0] & /*isValid*/ 2097152 && button1_disabled_value !== (button1_disabled_value = !/*isValid*/ ctx[21])) {
1515
- prop_dev(button1, "disabled", button1_disabled_value);
1516
- }
1517
- },
1518
- i: noop,
1519
- o: noop,
1520
- d: function destroy(detaching) {
1521
- detach_dev(script);
1522
- if (detaching) detach_dev(t0);
1523
- if (detaching) detach_dev(div0);
1524
- if (detaching) detach_dev(t1);
1525
- if (detaching) detach_dev(div1);
1526
- if (detaching) detach_dev(t4);
1527
- if (detaching) detach_dev(div10);
1528
- if (if_block0) if_block0.d();
1529
- if (if_block1) if_block1.d();
1530
- if (if_block2) if_block2.d();
1531
- destroy_each(each_blocks_1, detaching);
1532
- if (if_block3) if_block3.d();
1533
- destroy_each(each_blocks, detaching);
1534
- if (if_block4) if_block4.d();
1535
- if (if_block5) if_block5.d();
1536
- if (detaching) detach_dev(t35);
1537
- if (if_block6) if_block6.d(detaching);
1538
- if (detaching) detach_dev(t36);
1539
- if (detaching) detach_dev(button1);
1540
- mounted = false;
1541
- run_all(dispose);
1542
- }
1543
- };
1544
-
1545
- dispatch_dev("SvelteRegisterBlock", {
1546
- block,
1547
- id: create_fragment.name,
1548
- type: "component",
1549
- source: "",
1550
- ctx
1551
- });
1552
-
1553
- return block;
1554
- }
1555
-
1556
- const captchaKey = "6Lc7w8YcAAAAAEMHc_VNN9bqfVnILoUOHSHyZ0yn";
1557
-
1558
- function instance($$self, $$props, $$invalidate) {
1559
- let { $$slots: slots = {}, $$scope } = $$props;
1560
- validate_slots("undefined", slots, []);
1561
- let { userconsentexists = false } = $$props;
1562
- let { endpoint = "" } = $$props;
1563
- let invalidAddress = "";
1564
- let invalidPostalCode = "";
1565
- let invalidMobile = "";
1566
- let invalidCity = "";
1567
- let invalidNationality = "";
1568
- let showError = false;
1569
- let error = "";
1570
- let address = "";
1571
- let postalCode = "";
1572
- let city = "";
1573
- let countries = [];
1574
- let countrySelected = "";
1575
- let nationality = "";
1576
- let mobile = "";
1577
- let mobilePrefixes = [];
1578
- let mobilePrefixSelected = "";
1579
- let consentOffers = false;
1580
- let consentOffersSms = false;
1581
- let consentOffersEmail = false;
1582
- let consentTerms = false;
1583
- let isValid = false;
1584
-
1585
- const getCountriesList = () => {
1586
- fetch(`${endpoint}/player/countries`).then(res => res.json()).then(data => {
1587
- $$invalidate(11, countries = data.countries);
1588
- $$invalidate(12, countrySelected = countries[0].Alpha2Code);
1589
- });
1590
- };
1591
-
1592
- const getPhoneCodes = () => {
1593
- fetch(`${endpoint}/player/phonecodes`).then(res => res.json()).then(data => {
1594
- $$invalidate(15, mobilePrefixes = data.phoneCodes);
1595
- $$invalidate(16, mobilePrefixSelected = mobilePrefixes[0].Prefix);
1596
- });
1597
- };
1598
-
1599
- const checkIsValid = () => {
1600
- $$invalidate(21, isValid = !(invalidAddress || invalidPostalCode || invalidCity || invalidNationality || invalidMobile || showError || userconsentexists && consentTerms));
1601
-
1602
- if (address.length <= 0 || postalCode.length <= 0 || city.length <= 0 || nationality.length <= 0 || mobile.length <= 0) {
1603
- $$invalidate(21, isValid = false);
1604
- }
1605
- };
1606
-
1607
- const checkAddress = () => {
1608
- if (address && address.length <= 100) {
1609
- return true;
1610
- }
1611
-
1612
- return false;
1613
- };
1614
-
1615
- const validateAddress = () => {
1616
- $$invalidate(1, invalidAddress = !checkAddress());
1617
- checkIsValid();
1618
- };
1619
-
1620
- const checkPostalCode = () => {
1621
- if (postalCode && postalCode.length <= 20) {
1622
- return true;
1623
- }
1624
-
1625
- return false;
1626
- };
1627
-
1628
- const validatePostalCode = () => {
1629
- $$invalidate(2, invalidPostalCode = !checkPostalCode());
1630
- checkIsValid();
1631
- };
1632
-
1633
- const checkCity = () => {
1634
- if (city && city.length <= 50) {
1635
- return true;
1636
- }
1637
-
1638
- return false;
1639
- };
1640
-
1641
- const validateCity = () => {
1642
- $$invalidate(4, invalidCity = !checkCity());
1643
- checkIsValid();
1644
- };
1645
-
1646
- const checkNationality = () => {
1647
- if (nationality) {
1648
- return true;
1649
- }
1650
-
1651
- return false;
1652
- };
1653
-
1654
- const validateNationality = () => {
1655
- $$invalidate(5, invalidNationality = !checkNationality());
1656
- checkIsValid();
1657
- };
1658
-
1659
- const checkMobile = () => {
1660
- if (mobile && mobile.length >= 5 && mobile.length <= 30) {
1661
- return true;
1662
- }
1663
-
1664
- return false;
1665
- };
1666
-
1667
- const validateMobile = () => {
1668
- $$invalidate(3, invalidMobile = !checkMobile());
1669
- checkIsValid();
1670
- };
1671
-
1672
- const toggleOffers = () => {
1673
- if (consentOffers === false) {
1674
- $$invalidate(17, consentOffers = true);
1675
- } else {
1676
- $$invalidate(17, consentOffers = false);
1677
- $$invalidate(18, consentOffersSms = false);
1678
- $$invalidate(19, consentOffersEmail = false);
1679
- }
1680
- };
1681
-
1682
- const toggleOffersSms = () => {
1683
- if (consentOffersSms === false) {
1684
- $$invalidate(18, consentOffersSms = true);
1685
- } else {
1686
- $$invalidate(18, consentOffersSms = false);
1687
- }
1688
- };
1689
-
1690
- const toggleOffersEmail = () => {
1691
- if (consentOffersEmail === false) {
1692
- $$invalidate(19, consentOffersEmail = true);
1693
- } else {
1694
- $$invalidate(19, consentOffersEmail = false);
1695
- }
1696
- };
1697
-
1698
- const toggleTerms = () => {
1699
- if (consentTerms === false) {
1700
- $$invalidate(20, consentTerms = true);
1701
- } else {
1702
- $$invalidate(20, consentTerms = false);
1703
- }
1704
-
1705
- checkIsValid();
1706
- };
1707
-
1708
- const doRecaptcha = () => {
1709
- return new Promise((resolve, reject) => {
1710
- grecaptcha.ready(() => {
1711
- grecaptcha.execute(captchaKey, { action: "submit" }).then(token => {
1712
- resolve(token);
1713
- });
1714
- });
1715
- });
1716
- };
1717
-
1718
- const goNext = () => {
1719
- let registerStepThreeData = {};
1720
-
1721
- doRecaptcha().then(token => {
1722
- registerStepThreeData = {
1723
- address,
1724
- postalCode,
1725
- city,
1726
- countrySelected,
1727
- nationality,
1728
- mobilePrefixSelected,
1729
- mobile,
1730
- consentOffersSms,
1731
- consentOffersEmail,
1732
- consentTerms,
1733
- token
1734
- };
1735
-
1736
- window.postMessage(
1737
- {
1738
- type: "RegisterStepThree",
1739
- registerStepThreeData
1740
- },
1741
- window.location.href
1742
- );
1743
- });
1744
- };
1745
-
1746
- const goBack = () => {
1747
- let registerStepThreeData = {
1748
- address,
1749
- postalCode,
1750
- city,
1751
- countrySelected,
1752
- nationality,
1753
- mobilePrefixSelected,
1754
- mobile,
1755
- consentOffersSms,
1756
- consentOffersEmail,
1757
- consentTerms
1758
- };
1759
-
1760
- window.postMessage(
1761
- {
1762
- type: "GoBackStepThree",
1763
- registerStepThreeData
1764
- },
1765
- window.location.href
1766
- );
1767
- };
1768
-
1769
- const messageHandler = e => {
1770
- if (e.data) {
1771
- switch (e.data.type) {
1772
- case "StepThreeDataBackup":
1773
- $$invalidate(8, address = e.data.userData.address1);
1774
- $$invalidate(9, postalCode = e.data.userData.postalCode);
1775
- $$invalidate(10, city = e.data.userData.city);
1776
- $$invalidate(12, countrySelected = e.data.userData.country);
1777
- $$invalidate(13, nationality = e.data.userData.nationality);
1778
- $$invalidate(16, mobilePrefixSelected = e.data.userData.mobile.prefix);
1779
- $$invalidate(14, mobile = e.data.userData.mobile.number);
1780
- $$invalidate(18, consentOffersSms = e.data.userData.userConsents.additionalProp1);
1781
- $$invalidate(19, consentOffersEmail = e.data.userData.userConsents.additionalProp2);
1782
- $$invalidate(20, consentTerms = e.data.userData.userConsents.additionalProp3);
1783
- checkIsValid();
1784
- break;
1785
- case "ShowRegistrationError":
1786
- $$invalidate(6, showError = e.data.showError);
1787
- $$invalidate(7, error = e.data.error);
1788
- }
1789
- }
1790
- };
1791
-
1792
- onMount(() => {
1793
- window.addEventListener("message", messageHandler, false);
1794
-
1795
- return () => {
1796
- window.removeEventListener("message", messageHandler);
1797
- };
1798
- });
1799
-
1800
- const writable_props = ["userconsentexists", "endpoint"];
1801
-
1802
- Object.keys($$props).forEach(key => {
1803
- if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<undefined> was created with unknown prop '${key}'`);
1804
- });
1805
-
1806
- function input0_input_handler() {
1807
- address = this.value;
1808
- $$invalidate(8, address);
1809
- }
1810
-
1811
- function input1_input_handler() {
1812
- postalCode = this.value;
1813
- $$invalidate(9, postalCode);
1814
- }
1815
-
1816
- function input2_input_handler() {
1817
- city = this.value;
1818
- $$invalidate(10, city);
1819
- }
1820
-
1821
- function select0_change_handler() {
1822
- countrySelected = select_value(this);
1823
- $$invalidate(12, countrySelected);
1824
- $$invalidate(11, countries);
1825
- }
1826
-
1827
- function input3_input_handler() {
1828
- nationality = this.value;
1829
- $$invalidate(13, nationality);
1830
- }
1831
-
1832
- function select1_change_handler() {
1833
- mobilePrefixSelected = select_value(this);
1834
- $$invalidate(16, mobilePrefixSelected);
1835
- $$invalidate(15, mobilePrefixes);
1836
- }
1837
-
1838
- function input4_input_handler() {
1839
- mobile = this.value;
1840
- $$invalidate(14, mobile);
1841
- }
1842
-
1843
- const click_handler = () => toggleOffers();
1844
- const click_handler_1 = () => toggleOffersSms();
1845
- const click_handler_2 = () => toggleOffersEmail();
1846
- const click_handler_3 = () => toggleTerms();
1847
-
1848
- $$self.$$set = $$props => {
1849
- if ("userconsentexists" in $$props) $$invalidate(0, userconsentexists = $$props.userconsentexists);
1850
- if ("endpoint" in $$props) $$invalidate(33, endpoint = $$props.endpoint);
1851
- };
1852
-
1853
- $$self.$capture_state = () => ({
1854
- onMount,
1855
- userconsentexists,
1856
- endpoint,
1857
- invalidAddress,
1858
- invalidPostalCode,
1859
- invalidMobile,
1860
- invalidCity,
1861
- invalidNationality,
1862
- showError,
1863
- error,
1864
- address,
1865
- postalCode,
1866
- city,
1867
- countries,
1868
- countrySelected,
1869
- nationality,
1870
- mobile,
1871
- mobilePrefixes,
1872
- mobilePrefixSelected,
1873
- consentOffers,
1874
- consentOffersSms,
1875
- consentOffersEmail,
1876
- consentTerms,
1877
- isValid,
1878
- captchaKey,
1879
- getCountriesList,
1880
- getPhoneCodes,
1881
- checkIsValid,
1882
- checkAddress,
1883
- validateAddress,
1884
- checkPostalCode,
1885
- validatePostalCode,
1886
- checkCity,
1887
- validateCity,
1888
- checkNationality,
1889
- validateNationality,
1890
- checkMobile,
1891
- validateMobile,
1892
- toggleOffers,
1893
- toggleOffersSms,
1894
- toggleOffersEmail,
1895
- toggleTerms,
1896
- doRecaptcha,
1897
- goNext,
1898
- goBack,
1899
- messageHandler
1900
- });
1901
-
1902
- $$self.$inject_state = $$props => {
1903
- if ("userconsentexists" in $$props) $$invalidate(0, userconsentexists = $$props.userconsentexists);
1904
- if ("endpoint" in $$props) $$invalidate(33, endpoint = $$props.endpoint);
1905
- if ("invalidAddress" in $$props) $$invalidate(1, invalidAddress = $$props.invalidAddress);
1906
- if ("invalidPostalCode" in $$props) $$invalidate(2, invalidPostalCode = $$props.invalidPostalCode);
1907
- if ("invalidMobile" in $$props) $$invalidate(3, invalidMobile = $$props.invalidMobile);
1908
- if ("invalidCity" in $$props) $$invalidate(4, invalidCity = $$props.invalidCity);
1909
- if ("invalidNationality" in $$props) $$invalidate(5, invalidNationality = $$props.invalidNationality);
1910
- if ("showError" in $$props) $$invalidate(6, showError = $$props.showError);
1911
- if ("error" in $$props) $$invalidate(7, error = $$props.error);
1912
- if ("address" in $$props) $$invalidate(8, address = $$props.address);
1913
- if ("postalCode" in $$props) $$invalidate(9, postalCode = $$props.postalCode);
1914
- if ("city" in $$props) $$invalidate(10, city = $$props.city);
1915
- if ("countries" in $$props) $$invalidate(11, countries = $$props.countries);
1916
- if ("countrySelected" in $$props) $$invalidate(12, countrySelected = $$props.countrySelected);
1917
- if ("nationality" in $$props) $$invalidate(13, nationality = $$props.nationality);
1918
- if ("mobile" in $$props) $$invalidate(14, mobile = $$props.mobile);
1919
- if ("mobilePrefixes" in $$props) $$invalidate(15, mobilePrefixes = $$props.mobilePrefixes);
1920
- if ("mobilePrefixSelected" in $$props) $$invalidate(16, mobilePrefixSelected = $$props.mobilePrefixSelected);
1921
- if ("consentOffers" in $$props) $$invalidate(17, consentOffers = $$props.consentOffers);
1922
- if ("consentOffersSms" in $$props) $$invalidate(18, consentOffersSms = $$props.consentOffersSms);
1923
- if ("consentOffersEmail" in $$props) $$invalidate(19, consentOffersEmail = $$props.consentOffersEmail);
1924
- if ("consentTerms" in $$props) $$invalidate(20, consentTerms = $$props.consentTerms);
1925
- if ("isValid" in $$props) $$invalidate(21, isValid = $$props.isValid);
1926
- };
1927
-
1928
- if ($$props && "$$inject" in $$props) {
1929
- $$self.$inject_state($$props.$$inject);
1930
- }
1931
-
1932
- $$self.$$.update = () => {
1933
- if ($$self.$$.dirty[1] & /*endpoint*/ 4) {
1934
- endpoint && getCountriesList();
1935
- }
1936
-
1937
- if ($$self.$$.dirty[1] & /*endpoint*/ 4) {
1938
- endpoint && getPhoneCodes();
1939
- }
1940
- };
1941
-
1942
- return [
1943
- userconsentexists,
1944
- invalidAddress,
1945
- invalidPostalCode,
1946
- invalidMobile,
1947
- invalidCity,
1948
- invalidNationality,
1949
- showError,
1950
- error,
1951
- address,
1952
- postalCode,
1953
- city,
1954
- countries,
1955
- countrySelected,
1956
- nationality,
1957
- mobile,
1958
- mobilePrefixes,
1959
- mobilePrefixSelected,
1960
- consentOffers,
1961
- consentOffersSms,
1962
- consentOffersEmail,
1963
- consentTerms,
1964
- isValid,
1965
- validateAddress,
1966
- validatePostalCode,
1967
- validateCity,
1968
- validateNationality,
1969
- validateMobile,
1970
- toggleOffers,
1971
- toggleOffersSms,
1972
- toggleOffersEmail,
1973
- toggleTerms,
1974
- goNext,
1975
- goBack,
1976
- endpoint,
1977
- input0_input_handler,
1978
- input1_input_handler,
1979
- input2_input_handler,
1980
- select0_change_handler,
1981
- input3_input_handler,
1982
- select1_change_handler,
1983
- input4_input_handler,
1984
- click_handler,
1985
- click_handler_1,
1986
- click_handler_2,
1987
- click_handler_3
1988
- ];
1989
- }
1990
-
1991
- class GeneralPlayerRegisterFormStep3 extends SvelteElement {
1992
- constructor(options) {
1993
- super();
1994
- this.shadowRoot.innerHTML = `<style>.BackButton{display:inline-flex;color:#07072A;height:24px;line-height:24px;border-radius:5px;border:none;background:transparent;padding:0;text-transform:uppercase;font-size:32px;cursor:pointer;margin-bottom:30px}.BackButton svg{width:24px;height:24px;margin-right:20px;fill:#D0046C}.AddressPostalCodeContainer{display:flex;gap:16px}.AddressContainer,.PostalCodeContainer,.CityContainer,.CountryContainer,.NationalityContainer,.MobileContainer{color:#58586B;display:flex;flex-direction:column;padding-bottom:30px;position:relative}.AddressContainer label,.PostalCodeContainer label,.CityContainer label,.CountryContainer label,.NationalityContainer label,.MobileContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.AddressContainer input,.PostalCodeContainer input,.CityContainer input,.CountryContainer select,.NationalityContainer input,.MobileContainer input,.MobileContainer select{width:100%;height:44px;border:1px solid #D1D1D1;border-radius:5px;padding:5px;font-size:14px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.AddressContainer.InvalidField input,.PostalCodeContainer.InvalidField input,.CityContainer.InvalidField input,.NationalityContainer.InvalidField input,.MobileContainer.InvalidField input{border:1px solid #D0046C;background:#FBECF4;color:#D0046C}.AddressContainer{width:65%}.PostalCodeContainer{width:35%}.MobileWrapper{display:flex;gap:16px}.MobileWrapper .MobilePrefixSelected{width:30%}.MobileWrapper .MobileInput{width:70%}.FormRequired{color:#FD2839}.InvalidInput{color:#D0046C;font-size:10px;position:absolute;bottom:-3px;line-height:10px}.OffersMethodsWrapper{padding-left:32px}.Offers,.OffersMethod,.AgeConsent{display:block;position:relative;padding:5.008px 0 0 35.008px;margin-bottom:16px;font-size:16px;user-select:none;line-height:19.2px}.Offers input,.OffersMethod input,.AgeConsent input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Offers .Checkmark,.OffersMethod .Checkmark,.AgeConsent .Checkmark{position:absolute;top:0;left:0;height:25.008px;width:25.008px;background-color:#D1D1D1;border-radius:50%}.Offers input:checked~.Checkmark,.OffersMethod input:checked~.Checkmark,.AgeConsent input:checked~.Checkmark{background-color:#D0046C}.Offers .Checkmark:after,.OffersMethod .Checkmark:after,.AgeConsent .Checkmark:after{content:"";position:absolute;display:none;left:9.008px;top:5.008px;width:5.008px;height:10px;border:solid white;border-width:0 3.008px 3.008px 0;transform:rotate(45deg)}.Offers input:checked~.Checkmark:after,.OffersMethod input:checked~.Checkmark:after,.AgeConsent input:checked~.Checkmark:after{display:block}.NotificationContainer{margin-top:32px}.NotificationContainer p{color:#FD2839;font-size:14px}.RegisterError{color:#FD2839;font-size:16px;line-height:19.2px}.RegisterStepNext{color:#fff;background:#D0046C;border:1px solid #D0046C;border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.RegisterStepNext[disabled]{background:#c1c1c1;border:1px solid #c1c1c1;cursor:not-allowed}</style>`;
1995
-
1996
- init(
1997
- this,
1998
- {
1999
- target: this.shadowRoot,
2000
- props: attribute_to_object(this.attributes),
2001
- customElement: true
2002
- },
2003
- instance,
2004
- create_fragment,
2005
- safe_not_equal,
2006
- { userconsentexists: 0, endpoint: 33 },
2007
- [-1, -1]
2008
- );
2009
-
2010
- if (options) {
2011
- if (options.target) {
2012
- insert_dev(options.target, this, options.anchor);
2013
- }
2014
-
2015
- if (options.props) {
2016
- this.$set(options.props);
2017
- flush();
2018
- }
2019
- }
2020
- }
2021
-
2022
- static get observedAttributes() {
2023
- return ["userconsentexists", "endpoint"];
2024
- }
2025
-
2026
- get userconsentexists() {
2027
- return this.$$.ctx[0];
2028
- }
2029
-
2030
- set userconsentexists(userconsentexists) {
2031
- this.$set({ userconsentexists });
2032
- flush();
2033
- }
2034
-
2035
- get endpoint() {
2036
- return this.$$.ctx[33];
2037
- }
2038
-
2039
- set endpoint(endpoint) {
2040
- this.$set({ endpoint });
2041
- flush();
2042
- }
2043
- }
2044
-
2045
- !customElements.get('general-player-register-form-step3') && customElements.define('general-player-register-form-step3', GeneralPlayerRegisterFormStep3);
2046
-
2047
- return GeneralPlayerRegisterFormStep3;
2048
-
2049
- })));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,function(){"use strict";function xe(){}function u(e){return e()}function p(){return Object.create(null)}function ve(e){e.forEach(u)}function f(e){return"function"==typeof e}function t(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function ye(e,t){e.appendChild(t)}function ke(e,t,n){e.insertBefore(t,n||null)}function $e(e){e.parentNode.removeChild(e)}function we(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function Me(e){return document.createElement(e)}function _e(e){return document.createTextNode(e)}function Ae(){return _e(" ")}function Ie(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function Fe(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function r(e,t){e.wholeText!==(t=""+t)&&(e.data=t)}function De(e,t){e.value=null==t?"":t}function Oe(t,n){for(let e=0;e<t.options.length;e+=1){const o=t.options[e];if(o.__value===n)return o.selected=!0,0}}function P(e){e=e.querySelector(":checked")||e.options[0];return e&&e.__value}let N;function h(e){N=e}const m=[],e=[],o=[],i=[],g=Promise.resolve();let C=!1;function Pe(e){o.push(e)}let a=!1;const s=new Set;function b(){if(!a){a=!0;do{for(let e=0;e<m.length;e+=1){var t=m[e];h(t),function(e){{var t;null!==e.fragment&&(e.update(),ve(e.before_update),t=e.dirty,e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Pe))}}(t.$$)}for(h(null),m.length=0;e.length;)e.pop()();for(let e=0;e<o.length;e+=1){const n=o[e];s.has(n)||(s.add(n),n())}}while(o.length=0,m.length);for(;i.length;)i.pop()();C=!1,a=!1,s.clear()}}const x=new Set;function n(o,e,t,n,i,a,r=[-1]){var s,l=N;h(o);const c=o.$$={fragment:null,ctx:null,props:a,update:xe,not_equal:i,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:e.context||[]),callbacks:p(),dirty:r,skip_bound:!1};let d=!1;if(c.ctx=t?t(o,e.props||{},(e,t,...n)=>{n=n.length?n[0]:t;return c.ctx&&i(c.ctx[e],c.ctx[e]=n)&&(!c.skip_bound&&c.bound[e]&&c.bound[e](n),d&&(n=e,-1===(e=o).$$.dirty[0]&&(m.push(e),C||(C=!0,g.then(b)),e.$$.dirty.fill(0)),e.$$.dirty[n/31|0]|=1<<n%31)),t}):[],c.update(),d=!0,ve(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){const xe=(n=e.target,Array.from(n.childNodes));c.fragment&&c.fragment.l(xe),xe.forEach($e)}else c.fragment&&c.fragment.c();e.intro&&(s=o.$$.fragment)&&s.i&&(x.delete(s),s.i(void 0)),function(t,e,n,o){const{fragment:i,on_mount:a,on_destroy:r,after_update:s}=t.$$;i&&i.m(e,n),o||Pe(()=>{var e=a.map(u).filter(f);r?r.push(...e):ve(e),t.$$.on_mount=[]}),s.forEach(Pe)}(o,e.target,e.anchor,e.customElement),b()}h(l)}let l;function Ne(e,t,n){const o=e.slice();return o[55]=t[n],o}function Ee(e,t,n){const o=e.slice();return o[58]=t[n],o}function Se(){let n;return{c(){n=Me("p"),n.textContent="Address must be at least 1 character long and 100 characters maximum.",Fe(n,"class","InvalidInput")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function Te(){let n;return{c(){n=Me("p"),n.textContent="Postal Code must be at least 1 character long and 20 characters maximum.",Fe(n,"class","InvalidInput")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function He(){let n;return{c(){n=Me("p"),n.textContent="City must be at least 1 character long and 50 characters maximum.",Fe(n,"class","InvalidInput")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function Le(e){let n,o,i,a=e[58].Name+"";return{c(){n=Me("option"),o=_e(a),n.__value=i=e[58].Alpha2Code,n.value=n.__value},m(e,t){ke(e,n,t),ye(n,o)},p(e,t){2048&t[0]&&a!==(a=e[58].Name+"")&&r(o,a),2048&t[0]&&i!==(i=e[58].Alpha2Code)&&(n.__value=i,n.value=n.__value)},d(e){e&&$e(n)}}}function Re(){let n;return{c(){n=Me("p"),n.textContent="Nationality must be at least 1 character long.",Fe(n,"class","InvalidInput")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function Be(e){let n,o,i,a=e[55].Prefix+"";return{c(){n=Me("option"),o=_e(a),n.__value=i=e[55].Prefix,n.value=n.__value},m(e,t){ke(e,n,t),ye(n,o)},p(e,t){32768&t[0]&&a!==(a=e[55].Prefix+"")&&r(o,a),32768&t[0]&&i!==(i=e[55].Prefix)&&(n.__value=i,n.value=n.__value)},d(e){e&&$e(n)}}}function qe(){let n;return{c(){n=Me("p"),n.textContent="Mobile must be at least 5 character long and 20 characters maximum.",Fe(n,"class","InvalidInput")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function ze(n){let o,i,a,r,s,l,c,d,u,p,f,h,m,g,C,b,x,v,y,k,$,w,M,_,A,I,F,D,O,P,N,E,S,T,H=!n[20]&&L();return{c(){o=Me("div"),i=Me("label"),a=_e("I want to receive exclusive offers and bonuses."),r=Me("br"),s=_e("I am aware that I can unsubscribe whenever I want to.\n "),l=Me("input"),c=Ae(),d=Me("span"),u=Ae(),p=Me("div"),f=Me("label"),h=_e("SMS\n "),m=Me("input"),C=Ae(),b=Me("span"),x=Ae(),v=Me("label"),y=_e("Emails\n "),k=Me("input"),w=Ae(),M=Me("span"),_=Ae(),A=Me("div"),I=Me("label"),F=_e("I am at least 21 years old and I have read and accepted the Terms of Conditions.\n "),D=Me("input"),O=Ae(),P=Me("span"),N=Ae(),H&&H.c(),E=_e(""),Fe(l,"type","Checkbox"),l.checked=n[17],Fe(d,"class","Checkmark"),Fe(i,"class","Offers"),Fe(m,"type","Checkbox"),m.disabled=g=!n[17],m.checked=n[18],Fe(b,"class","Checkmark"),Fe(f,"class","OffersMethod"),Fe(k,"type","Checkbox"),k.disabled=$=!n[17],k.checked=n[19],Fe(M,"class","Checkmark"),Fe(v,"class","OffersMethod"),Fe(p,"class","OffersMethodsWrapper"),Fe(o,"class","OffersContainer"),Fe(D,"type","Checkbox"),D.checked=n[20],Fe(P,"class","Checkmark"),Fe(I,"class","AgeConsent"),Fe(A,"class","AgeContainer")},m(e,t){ke(e,o,t),ye(o,i),ye(i,a),ye(i,r),ye(i,s),ye(i,l),ye(i,c),ye(i,d),ye(o,u),ye(o,p),ye(p,f),ye(f,h),ye(f,m),ye(f,C),ye(f,b),ye(p,x),ye(p,v),ye(v,y),ye(v,k),ye(v,w),ye(v,M),ke(e,_,t),ke(e,A,t),ye(A,I),ye(I,F),ye(I,D),ye(I,O),ye(I,P),ke(e,N,t),H&&H.m(e,t),ke(e,E,t),S||(T=[Ie(l,"click",n[41]),Ie(m,"click",n[42]),Ie(k,"click",n[43]),Ie(D,"click",n[44])],S=!0)},p(e,t){131072&t[0]&&(l.checked=e[17]),131072&t[0]&&g!==(g=!e[17])&&(m.disabled=g),262144&t[0]&&(m.checked=e[18]),131072&t[0]&&$!==($=!e[17])&&(k.disabled=$),524288&t[0]&&(k.checked=e[19]),1048576&t[0]&&(D.checked=e[20]),e[20]?H&&(H.d(1),H=null):H||(H=L(),H.c(),H.m(E.parentNode,E))},d(e){e&&$e(o),e&&$e(_),e&&$e(A),e&&$e(N),H&&H.d(e),e&&$e(E),S=!1,ve(T)}}}function L(){let n;return{c(){n=Me("div"),n.innerHTML="<p>Please accept the Terms and Conditions before proceeding.</p>",Fe(n,"class","NotificationContainer")},m(e,t){ke(e,n,t)},d(e){e&&$e(n)}}}function je(e){let n,o,i;return{c(){n=Me("div"),o=Me("p"),i=_e(e[7]),Fe(o,"class","RegisterError")},m(e,t){ke(e,n,t),ye(n,o),ye(o,i)},p(e,t){128&t[0]&&r(i,e[7])},d(e){e&&$e(n)}}}function c(n){let o,e,i,a,r,s,l,c,d,u,p,f,h,m,g,C,b,x,v,y,k,$,w,M,_,A,I,F,D,O,P,N,E,S,T,H,L,R,B,q,z,j,W,V,Z,U,Y,G,J,K,Q,X,ee,te,ne,oe,ie,ae,re,se,le=n[1]&&Se(),ce=n[2]&&Te(),de=n[4]&&He(),ue=n[11],pe=[];for(let e=0;e<ue.length;e+=1)pe[e]=Le(Ee(n,ue,e));let fe=n[5]&&Re(),he=n[15],me=[];for(let e=0;e<he.length;e+=1)me[e]=Be(Ne(n,he,e));let ge=n[3]&&qe(),Ce=n[0]&&ze(n),be=n[6]&&je(n);return{c(){o=Me("script"),i=Ae(),a=Me("div"),r=Ae(),s=Me("div"),l=Me("button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.a{fill:#d0046c;}</style></defs><path class="a" d="M12,0,9.818,2.182l8.26,8.26H0v3.117H18.078l-8.26,8.26L12,24,24,12Z" transform="translate(24 24) rotate(180)"></path></svg>\n Back',c=Ae(),d=Me("div"),u=Me("div"),p=Me("div"),f=Me("label"),f.innerHTML='Address:<span class="FormRequired">*</span>',h=Ae(),m=Me("input"),g=Ae(),le&&le.c(),b=Ae(),x=Me("div"),v=Me("label"),v.innerHTML='Postal Code:<span class="FormRequired">*</span>',y=Ae(),k=Me("input"),$=Ae(),ce&&ce.c(),M=Ae(),_=Me("div"),A=Me("label"),A.innerHTML='City:<span class="FormRequired">*</span>',I=Ae(),F=Me("input"),D=Ae(),de&&de.c(),P=Ae(),N=Me("div"),E=Me("label"),E.innerHTML='Country:<span class="FormRequired">*</span>',S=Ae(),T=Me("select");for(let e=0;e<pe.length;e+=1)pe[e].c();H=Ae(),L=Me("div"),R=Me("label"),R.innerHTML='Nationality:<span class="FormRequired">*</span>',B=Ae(),q=Me("input"),z=Ae(),fe&&fe.c(),W=Ae(),V=Me("div"),Z=Me("label"),Z.innerHTML='Mobile:<span class="FormRequired">*</span>',U=Ae(),Y=Me("div"),G=Me("select");for(let e=0;e<me.length;e+=1)me[e].c();J=Ae(),K=Me("input"),Q=Ae(),ge&&ge.c(),ee=Ae(),Ce&&Ce.c(),te=Ae(),be&&be.c(),ne=Ae(),oe=Me("button"),ie=_e("Open Account"),this.c=xe,o.src!==(e="//www.google.com/recaptcha/api.js?render="+We)&&Fe(o,"src","//www.google.com/recaptcha/api.js?render=6Lc7w8YcAAAAAEMHc_VNN9bqfVnILoUOHSHyZ0yn"),o.async=!0,o.defer=!0,Fe(a,"class","g-recaptcha"),Fe(a,"data-sitekey",We),Fe(l,"class","BackButton"),Fe(s,"class","RegisterFormHeader"),Fe(f,"for","Address"),Fe(m,"type","text"),Fe(m,"id","Address"),Fe(p,"class",C="AddressContainer "+(n[1]?"InvalidField":"")),Fe(v,"for","PostalCode"),Fe(k,"type","text"),Fe(k,"id","PostalCode"),Fe(x,"class",w="PostalCodeContainer "+(n[2]?"InvalidField":"")),Fe(u,"class","AddressPostalCodeContainer"),Fe(A,"for","City"),Fe(F,"type","text"),Fe(F,"id","City"),Fe(_,"class",O="CityContainer "+(n[4]?"InvalidField":"")),Fe(E,"for","Country"),Fe(T,"id","Country"),void 0===n[12]&&Pe(()=>n[37].call(T)),Fe(N,"class","CountryContainer"),Fe(R,"for","Nationality"),Fe(q,"type","text"),Fe(q,"id","Nationality"),Fe(L,"class",j="NationalityContainer "+(n[5]?"InvalidField":"")),Fe(Z,"for","Mobile"),Fe(G,"class","MobilePrefixSelected"),void 0===n[16]&&Pe(()=>n[39].call(G)),Fe(K,"type","text"),Fe(K,"oninput","this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\\..*)\\./g, '$1');"),Fe(K,"id","Mobile"),Fe(K,"class","MobileInput"),Fe(Y,"class","MobileWrapper"),Fe(V,"class",X="MobileContainer "+(n[3]?"InvalidField":"")),Fe(d,"class","RegisterFormContent"),Fe(oe,"class","RegisterStepNext"),oe.disabled=ae=!n[21]},m(e,t){ye(document.head,o),ke(e,i,t),ke(e,a,t),ke(e,r,t),ke(e,s,t),ye(s,l),ke(e,c,t),ke(e,d,t),ye(d,u),ye(u,p),ye(p,f),ye(p,h),ye(p,m),De(m,n[8]),ye(p,g),le&&le.m(p,null),ye(u,b),ye(u,x),ye(x,v),ye(x,y),ye(x,k),De(k,n[9]),ye(x,$),ce&&ce.m(x,null),ye(d,M),ye(d,_),ye(_,A),ye(_,I),ye(_,F),De(F,n[10]),ye(_,D),de&&de.m(_,null),ye(d,P),ye(d,N),ye(N,E),ye(N,S),ye(N,T);for(let e=0;e<pe.length;e+=1)pe[e].m(T,null);Oe(T,n[12]),ye(d,H),ye(d,L),ye(L,R),ye(L,B),ye(L,q),De(q,n[13]),ye(L,z),fe&&fe.m(L,null),ye(d,W),ye(d,V),ye(V,Z),ye(V,U),ye(V,Y),ye(Y,G);for(let e=0;e<me.length;e+=1)me[e].m(G,null);Oe(G,n[16]),ye(Y,J),ye(Y,K),De(K,n[14]),ye(Y,Q),ge&&ge.m(Y,null),ye(d,ee),Ce&&Ce.m(d,null),ke(e,te,t),be&&be.m(e,t),ke(e,ne,t),ke(e,oe,t),ye(oe,ie),re||(se=[Ie(l,"click",n[32]),Ie(m,"input",n[34]),Ie(m,"blur",n[22]),Ie(k,"input",n[35]),Ie(k,"blur",n[23]),Ie(F,"input",n[36]),Ie(F,"blur",n[24]),Ie(T,"change",n[37]),Ie(q,"input",n[38]),Ie(q,"blur",n[25]),Ie(G,"change",n[39]),Ie(K,"input",n[40]),Ie(K,"keyup",n[26]),Ie(oe,"click",n[31])],re=!0)},p(t,n){if(256&n[0]&&m.value!==t[8]&&De(m,t[8]),t[1]?le||(le=Se(),le.c(),le.m(p,null)):le&&(le.d(1),le=null),2&n[0]&&C!==(C="AddressContainer "+(t[1]?"InvalidField":""))&&Fe(p,"class",C),512&n[0]&&k.value!==t[9]&&De(k,t[9]),t[2]?ce||(ce=Te(),ce.c(),ce.m(x,null)):ce&&(ce.d(1),ce=null),4&n[0]&&w!==(w="PostalCodeContainer "+(t[2]?"InvalidField":""))&&Fe(x,"class",w),1024&n[0]&&F.value!==t[10]&&De(F,t[10]),t[4]?de||(de=He(),de.c(),de.m(_,null)):de&&(de.d(1),de=null),16&n[0]&&O!==(O="CityContainer "+(t[4]?"InvalidField":""))&&Fe(_,"class",O),2048&n[0]){let e;for(ue=t[11],e=0;e<ue.length;e+=1){var o=Ee(t,ue,e);pe[e]?pe[e].p(o,n):(pe[e]=Le(o),pe[e].c(),pe[e].m(T,null))}for(;e<pe.length;e+=1)pe[e].d(1);pe.length=ue.length}if(6144&n[0]&&Oe(T,t[12]),8192&n[0]&&q.value!==t[13]&&De(q,t[13]),t[5]?fe||(fe=Re(),fe.c(),fe.m(L,null)):fe&&(fe.d(1),fe=null),32&n[0]&&j!==(j="NationalityContainer "+(t[5]?"InvalidField":""))&&Fe(L,"class",j),32768&n[0]){let e;for(he=t[15],e=0;e<he.length;e+=1){var i=Ne(t,he,e);me[e]?me[e].p(i,n):(me[e]=Be(i),me[e].c(),me[e].m(G,null))}for(;e<me.length;e+=1)me[e].d(1);me.length=he.length}98304&n[0]&&Oe(G,t[16]),16384&n[0]&&K.value!==t[14]&&De(K,t[14]),t[3]?ge||(ge=qe(),ge.c(),ge.m(Y,null)):ge&&(ge.d(1),ge=null),8&n[0]&&X!==(X="MobileContainer "+(t[3]?"InvalidField":""))&&Fe(V,"class",X),t[0]?Ce?Ce.p(t,n):(Ce=ze(t),Ce.c(),Ce.m(d,null)):Ce&&(Ce.d(1),Ce=null),t[6]?be?be.p(t,n):(be=je(t),be.c(),be.m(ne.parentNode,ne)):be&&(be.d(1),be=null),2097152&n[0]&&ae!==(ae=!t[21])&&(oe.disabled=ae)},i:xe,o:xe,d(e){$e(o),e&&$e(i),e&&$e(a),e&&$e(r),e&&$e(s),e&&$e(c),e&&$e(d),le&&le.d(),ce&&ce.d(),de&&de.d(),we(pe,e),fe&&fe.d(),we(me,e),ge&&ge.d(),Ce&&Ce.d(),e&&$e(te),be&&be.d(e),e&&$e(ne),e&&$e(oe),re=!1,ve(se)}}}"function"==typeof HTMLElement&&(l=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(u).filter(f);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){ve(this.$$.on_disconnect)}$destroy(){!function(e){const t=e.$$;null!==t.fragment&&(ve(t.on_destroy),t.fragment&&t.fragment.d(1),t.on_destroy=t.fragment=null,t.ctx=[])}(this),this.$destroy=xe}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{var e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const We="6Lc7w8YcAAAAAEMHc_VNN9bqfVnILoUOHSHyZ0yn";function d(e,t,n){let{userconsentexists:o=!1}=t,{endpoint:i=""}=t,a="",r="",s="",l="",c="",d=!1,u="",p="",f="",h="",m=[],g="",C="",b="",x=[],v="",y=!1,k=!1,$=!1,w=!1,M=!1;const _=()=>{n(21,M=!(a||r||l||c||s||d||o&&w)),(p.length<=0||f.length<=0||h.length<=0||C.length<=0||b.length<=0)&&n(21,M=!1)},A=()=>{!1===y?n(17,y=!0):(n(17,y=!1),n(18,k=!1),n(19,$=!1))},I=()=>{n(18,k=!1===k)},F=()=>{n(19,$=!1===$)},D=()=>{n(20,w=!1===w),_()},O=e=>{if(e.data)switch(e.data.type){case"StepThreeDataBackup":n(8,p=e.data.userData.address1),n(9,f=e.data.userData.postalCode),n(10,h=e.data.userData.city),n(12,g=e.data.userData.country),n(13,C=e.data.userData.nationality),n(16,v=e.data.userData.mobile.prefix),n(14,b=e.data.userData.mobile.number),n(18,k=e.data.userData.userConsents.additionalProp1),n(19,$=e.data.userData.userConsents.additionalProp2),n(20,w=e.data.userData.userConsents.additionalProp3),_();break;case"ShowRegistrationError":n(6,d=e.data.showError),n(7,u=e.data.error)}};return t=()=>(window.addEventListener("message",O,!1),()=>{window.removeEventListener("message",O)}),function(){if(!N)throw new Error("Function called outside component initialization");return N}().$$.on_mount.push(t),e.$$set=e=>{"userconsentexists"in e&&n(0,o=e.userconsentexists),"endpoint"in e&&n(33,i=e.endpoint)},e.$$.update=()=>{4&e.$$.dirty[1]&&i&&fetch(`${i}/player/countries`).then(e=>e.json()).then(e=>{n(11,m=e.countries),n(12,g=m[0].Alpha2Code)}),4&e.$$.dirty[1]&&i&&fetch(`${i}/player/phonecodes`).then(e=>e.json()).then(e=>{n(15,x=e.phoneCodes),n(16,v=x[0].Prefix)})},[o,a,r,s,l,c,d,u,p,f,h,m,g,C,b,x,v,y,k,$,w,M,()=>{n(1,a=!(p&&p.length<=100)),_()},()=>{n(2,r=!(f&&f.length<=20)),_()},()=>{n(4,l=!(h&&h.length<=50)),_()},()=>{n(5,c=!C),_()},()=>{n(3,s=!(b&&5<=b.length&&b.length<=30)),_()},A,I,F,D,()=>{let t;new Promise((t,e)=>{grecaptcha.ready(()=>{grecaptcha.execute(We,{action:"submit"}).then(e=>{t(e)})})}).then(e=>{t={address:p,postalCode:f,city:h,countrySelected:g,nationality:C,mobilePrefixSelected:v,mobile:b,consentOffersSms:k,consentOffersEmail:$,consentTerms:w,token:e},window.postMessage({type:"RegisterStepThree",registerStepThreeData:t},window.location.href)})},()=>{var e={address:p,postalCode:f,city:h,countrySelected:g,nationality:C,mobilePrefixSelected:v,mobile:b,consentOffersSms:k,consentOffersEmail:$,consentTerms:w};window.postMessage({type:"GoBackStepThree",registerStepThreeData:e},window.location.href)},i,function(){p=this.value,n(8,p)},function(){f=this.value,n(9,f)},function(){h=this.value,n(10,h)},function(){g=P(this),n(12,g),n(11,m)},function(){C=this.value,n(13,C)},function(){v=P(this),n(16,v),n(15,x)},function(){b=this.value,n(14,b)},()=>A(),()=>I(),()=>F(),()=>D()]}class v extends l{constructor(e){super(),this.shadowRoot.innerHTML='<style>.BackButton{display:inline-flex;color:#07072A;height:24px;line-height:24px;border-radius:5px;border:none;background:transparent;padding:0;text-transform:uppercase;font-size:32px;cursor:pointer;margin-bottom:30px}.BackButton svg{width:24px;height:24px;margin-right:20px;fill:#D0046C}.AddressPostalCodeContainer{display:flex;gap:16px}.AddressContainer,.PostalCodeContainer,.CityContainer,.CountryContainer,.NationalityContainer,.MobileContainer{color:#58586B;display:flex;flex-direction:column;padding-bottom:30px;position:relative}.AddressContainer label,.PostalCodeContainer label,.CityContainer label,.CountryContainer label,.NationalityContainer label,.MobileContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.AddressContainer input,.PostalCodeContainer input,.CityContainer input,.CountryContainer select,.NationalityContainer input,.MobileContainer input,.MobileContainer select{width:100%;height:44px;border:1px solid #D1D1D1;border-radius:5px;padding:5px;font-size:14px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.AddressContainer.InvalidField input,.PostalCodeContainer.InvalidField input,.CityContainer.InvalidField input,.NationalityContainer.InvalidField input,.MobileContainer.InvalidField input{border:1px solid #D0046C;background:#FBECF4;color:#D0046C}.AddressContainer{width:65%}.PostalCodeContainer{width:35%}.MobileWrapper{display:flex;gap:16px}.MobileWrapper .MobilePrefixSelected{width:30%}.MobileWrapper .MobileInput{width:70%}.FormRequired{color:#FD2839}.InvalidInput{color:#D0046C;font-size:10px;position:absolute;bottom:-3px;line-height:10px}.OffersMethodsWrapper{padding-left:32px}.Offers,.OffersMethod,.AgeConsent{display:block;position:relative;padding:5.008px 0 0 35.008px;margin-bottom:16px;font-size:16px;user-select:none;line-height:19.2px}.Offers input,.OffersMethod input,.AgeConsent input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Offers .Checkmark,.OffersMethod .Checkmark,.AgeConsent .Checkmark{position:absolute;top:0;left:0;height:25.008px;width:25.008px;background-color:#D1D1D1;border-radius:50%}.Offers input:checked~.Checkmark,.OffersMethod input:checked~.Checkmark,.AgeConsent input:checked~.Checkmark{background-color:#D0046C}.Offers .Checkmark:after,.OffersMethod .Checkmark:after,.AgeConsent .Checkmark:after{content:"";position:absolute;display:none;left:9.008px;top:5.008px;width:5.008px;height:10px;border:solid white;border-width:0 3.008px 3.008px 0;transform:rotate(45deg)}.Offers input:checked~.Checkmark:after,.OffersMethod input:checked~.Checkmark:after,.AgeConsent input:checked~.Checkmark:after{display:block}.NotificationContainer{margin-top:32px}.NotificationContainer p{color:#FD2839;font-size:14px}.RegisterError{color:#FD2839;font-size:16px;line-height:19.2px}.RegisterStepNext{color:#fff;background:#D0046C;border:1px solid #D0046C;border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.RegisterStepNext[disabled]{background:#c1c1c1;border:1px solid #c1c1c1;cursor:not-allowed}</style>',n(this,{target:this.shadowRoot,props:function(e){const t={};for(const n of e)t[n.name]=n.value;return t}(this.attributes),customElement:!0},d,c,t,{userconsentexists:0,endpoint:33},[-1,-1]),e&&(e.target&&ke(e.target,this,e.anchor),e.props&&(this.$set(e.props),b()))}static get observedAttributes(){return["userconsentexists","endpoint"]}get userconsentexists(){return this.$$.ctx[0]}set userconsentexists(e){this.$set({userconsentexists:e}),b()}get endpoint(){return this.$$.ctx[33]}set endpoint(e){this.$set({endpoint:e}),b()}}return customElements.get("general-player-register-form-step3")||customElements.define("general-player-register-form-step3",v),v});
2050
2
  //# sourceMappingURL=general-player-register-form-step3.js.map