@everymatrix/general-player-register-form-step2 0.0.188 → 0.0.192

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,1696 +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 listen(node, event, handler, options) {
60
- node.addEventListener(event, handler, options);
61
- return () => node.removeEventListener(event, handler, options);
62
- }
63
- function attr(node, attribute, value) {
64
- if (value == null)
65
- node.removeAttribute(attribute);
66
- else if (node.getAttribute(attribute) !== value)
67
- node.setAttribute(attribute, value);
68
- }
69
- function children(element) {
70
- return Array.from(element.childNodes);
71
- }
72
- function set_input_value(input, value) {
73
- input.value = value == null ? '' : value;
74
- }
75
- function select_option(select, value) {
76
- for (let i = 0; i < select.options.length; i += 1) {
77
- const option = select.options[i];
78
- if (option.__value === value) {
79
- option.selected = true;
80
- return;
81
- }
82
- }
83
- }
84
- function select_value(select) {
85
- const selected_option = select.querySelector(':checked') || select.options[0];
86
- return selected_option && selected_option.__value;
87
- }
88
- function custom_event(type, detail) {
89
- const e = document.createEvent('CustomEvent');
90
- e.initCustomEvent(type, false, false, detail);
91
- return e;
92
- }
93
- function attribute_to_object(attributes) {
94
- const result = {};
95
- for (const attribute of attributes) {
96
- result[attribute.name] = attribute.value;
97
- }
98
- return result;
99
- }
100
-
101
- let current_component;
102
- function set_current_component(component) {
103
- current_component = component;
104
- }
105
- function get_current_component() {
106
- if (!current_component)
107
- throw new Error('Function called outside component initialization');
108
- return current_component;
109
- }
110
- function onMount(fn) {
111
- get_current_component().$$.on_mount.push(fn);
112
- }
113
-
114
- const dirty_components = [];
115
- const binding_callbacks = [];
116
- const render_callbacks = [];
117
- const flush_callbacks = [];
118
- const resolved_promise = Promise.resolve();
119
- let update_scheduled = false;
120
- function schedule_update() {
121
- if (!update_scheduled) {
122
- update_scheduled = true;
123
- resolved_promise.then(flush);
124
- }
125
- }
126
- function add_render_callback(fn) {
127
- render_callbacks.push(fn);
128
- }
129
- let flushing = false;
130
- const seen_callbacks = new Set();
131
- function flush() {
132
- if (flushing)
133
- return;
134
- flushing = true;
135
- do {
136
- // first, call beforeUpdate functions
137
- // and update components
138
- for (let i = 0; i < dirty_components.length; i += 1) {
139
- const component = dirty_components[i];
140
- set_current_component(component);
141
- update(component.$$);
142
- }
143
- set_current_component(null);
144
- dirty_components.length = 0;
145
- while (binding_callbacks.length)
146
- binding_callbacks.pop()();
147
- // then, once components are updated, call
148
- // afterUpdate functions. This may cause
149
- // subsequent updates...
150
- for (let i = 0; i < render_callbacks.length; i += 1) {
151
- const callback = render_callbacks[i];
152
- if (!seen_callbacks.has(callback)) {
153
- // ...so guard against infinite loops
154
- seen_callbacks.add(callback);
155
- callback();
156
- }
157
- }
158
- render_callbacks.length = 0;
159
- } while (dirty_components.length);
160
- while (flush_callbacks.length) {
161
- flush_callbacks.pop()();
162
- }
163
- update_scheduled = false;
164
- flushing = false;
165
- seen_callbacks.clear();
166
- }
167
- function update($$) {
168
- if ($$.fragment !== null) {
169
- $$.update();
170
- run_all($$.before_update);
171
- const dirty = $$.dirty;
172
- $$.dirty = [-1];
173
- $$.fragment && $$.fragment.p($$.ctx, dirty);
174
- $$.after_update.forEach(add_render_callback);
175
- }
176
- }
177
- const outroing = new Set();
178
- function transition_in(block, local) {
179
- if (block && block.i) {
180
- outroing.delete(block);
181
- block.i(local);
182
- }
183
- }
184
- function mount_component(component, target, anchor, customElement) {
185
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
186
- fragment && fragment.m(target, anchor);
187
- if (!customElement) {
188
- // onMount happens before the initial afterUpdate
189
- add_render_callback(() => {
190
- const new_on_destroy = on_mount.map(run).filter(is_function);
191
- if (on_destroy) {
192
- on_destroy.push(...new_on_destroy);
193
- }
194
- else {
195
- // Edge case - component was destroyed immediately,
196
- // most likely as a result of a binding initialising
197
- run_all(new_on_destroy);
198
- }
199
- component.$$.on_mount = [];
200
- });
201
- }
202
- after_update.forEach(add_render_callback);
203
- }
204
- function destroy_component(component, detaching) {
205
- const $$ = component.$$;
206
- if ($$.fragment !== null) {
207
- run_all($$.on_destroy);
208
- $$.fragment && $$.fragment.d(detaching);
209
- // TODO null out other refs, including component.$$ (but need to
210
- // preserve final state?)
211
- $$.on_destroy = $$.fragment = null;
212
- $$.ctx = [];
213
- }
214
- }
215
- function make_dirty(component, i) {
216
- if (component.$$.dirty[0] === -1) {
217
- dirty_components.push(component);
218
- schedule_update();
219
- component.$$.dirty.fill(0);
220
- }
221
- component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
222
- }
223
- function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
224
- const parent_component = current_component;
225
- set_current_component(component);
226
- const $$ = component.$$ = {
227
- fragment: null,
228
- ctx: null,
229
- // state
230
- props,
231
- update: noop,
232
- not_equal,
233
- bound: blank_object(),
234
- // lifecycle
235
- on_mount: [],
236
- on_destroy: [],
237
- on_disconnect: [],
238
- before_update: [],
239
- after_update: [],
240
- context: new Map(parent_component ? parent_component.$$.context : options.context || []),
241
- // everything else
242
- callbacks: blank_object(),
243
- dirty,
244
- skip_bound: false
245
- };
246
- let ready = false;
247
- $$.ctx = instance
248
- ? instance(component, options.props || {}, (i, ret, ...rest) => {
249
- const value = rest.length ? rest[0] : ret;
250
- if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
251
- if (!$$.skip_bound && $$.bound[i])
252
- $$.bound[i](value);
253
- if (ready)
254
- make_dirty(component, i);
255
- }
256
- return ret;
257
- })
258
- : [];
259
- $$.update();
260
- ready = true;
261
- run_all($$.before_update);
262
- // `false` as a special case of no DOM component
263
- $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
264
- if (options.target) {
265
- if (options.hydrate) {
266
- const nodes = children(options.target);
267
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
268
- $$.fragment && $$.fragment.l(nodes);
269
- nodes.forEach(detach);
270
- }
271
- else {
272
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
273
- $$.fragment && $$.fragment.c();
274
- }
275
- if (options.intro)
276
- transition_in(component.$$.fragment);
277
- mount_component(component, options.target, options.anchor, options.customElement);
278
- flush();
279
- }
280
- set_current_component(parent_component);
281
- }
282
- let SvelteElement;
283
- if (typeof HTMLElement === 'function') {
284
- SvelteElement = class extends HTMLElement {
285
- constructor() {
286
- super();
287
- this.attachShadow({ mode: 'open' });
288
- }
289
- connectedCallback() {
290
- const { on_mount } = this.$$;
291
- this.$$.on_disconnect = on_mount.map(run).filter(is_function);
292
- // @ts-ignore todo: improve typings
293
- for (const key in this.$$.slotted) {
294
- // @ts-ignore todo: improve typings
295
- this.appendChild(this.$$.slotted[key]);
296
- }
297
- }
298
- attributeChangedCallback(attr, _oldValue, newValue) {
299
- this[attr] = newValue;
300
- }
301
- disconnectedCallback() {
302
- run_all(this.$$.on_disconnect);
303
- }
304
- $destroy() {
305
- destroy_component(this, 1);
306
- this.$destroy = noop;
307
- }
308
- $on(type, callback) {
309
- // TODO should this delegate to addEventListener?
310
- const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
311
- callbacks.push(callback);
312
- return () => {
313
- const index = callbacks.indexOf(callback);
314
- if (index !== -1)
315
- callbacks.splice(index, 1);
316
- };
317
- }
318
- $set($$props) {
319
- if (this.$$set && !is_empty($$props)) {
320
- this.$$.skip_bound = true;
321
- this.$$set($$props);
322
- this.$$.skip_bound = false;
323
- }
324
- }
325
- };
326
- }
327
-
328
- function dispatch_dev(type, detail) {
329
- document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));
330
- }
331
- function append_dev(target, node) {
332
- dispatch_dev('SvelteDOMInsert', { target, node });
333
- append(target, node);
334
- }
335
- function insert_dev(target, node, anchor) {
336
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
337
- insert(target, node, anchor);
338
- }
339
- function detach_dev(node) {
340
- dispatch_dev('SvelteDOMRemove', { node });
341
- detach(node);
342
- }
343
- function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
344
- const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
345
- if (has_prevent_default)
346
- modifiers.push('preventDefault');
347
- if (has_stop_propagation)
348
- modifiers.push('stopPropagation');
349
- dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
350
- const dispose = listen(node, event, handler, options);
351
- return () => {
352
- dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
353
- dispose();
354
- };
355
- }
356
- function attr_dev(node, attribute, value) {
357
- attr(node, attribute, value);
358
- if (value == null)
359
- dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
360
- else
361
- dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
362
- }
363
- function prop_dev(node, property, value) {
364
- node[property] = value;
365
- dispatch_dev('SvelteDOMSetProperty', { node, property, value });
366
- }
367
- function validate_each_argument(arg) {
368
- if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
369
- let msg = '{#each} only iterates over array-like objects.';
370
- if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
371
- msg += ' You can use a spread to convert this iterable into an array.';
372
- }
373
- throw new Error(msg);
374
- }
375
- }
376
- function validate_slots(name, slot, keys) {
377
- for (const slot_key of Object.keys(slot)) {
378
- if (!~keys.indexOf(slot_key)) {
379
- console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
380
- }
381
- }
382
- }
383
-
384
- /* src/GeneralPlayerRegisterFormStep2.svelte generated by Svelte v3.37.0 */
385
- const file = "src/GeneralPlayerRegisterFormStep2.svelte";
386
-
387
- function get_each_context(ctx, list, i) {
388
- const child_ctx = ctx.slice();
389
- child_ctx[35] = list[i];
390
- return child_ctx;
391
- }
392
-
393
- function get_each_context_1(ctx, list, i) {
394
- const child_ctx = ctx.slice();
395
- child_ctx[38] = list[i];
396
- return child_ctx;
397
- }
398
-
399
- function get_each_context_2(ctx, list, i) {
400
- const child_ctx = ctx.slice();
401
- child_ctx[41] = list[i];
402
- return child_ctx;
403
- }
404
-
405
- function get_each_context_3(ctx, list, i) {
406
- const child_ctx = ctx.slice();
407
- child_ctx[44] = list[i];
408
- return child_ctx;
409
- }
410
-
411
- function get_each_context_4(ctx, list, i) {
412
- const child_ctx = ctx.slice();
413
- child_ctx[47] = list[i];
414
- return child_ctx;
415
- }
416
-
417
- // (118:6) {#each userTitles as userTitle}
418
- function create_each_block_4(ctx) {
419
- let option;
420
- let t_value = /*userTitle*/ ctx[47] + "";
421
- let t;
422
-
423
- const block = {
424
- c: function create() {
425
- option = element("option");
426
- t = text(t_value);
427
- option.__value = /*userTitle*/ ctx[47];
428
- option.value = option.__value;
429
- add_location(option, file, 118, 8, 4012);
430
- },
431
- m: function mount(target, anchor) {
432
- insert_dev(target, option, anchor);
433
- append_dev(option, t);
434
- },
435
- p: noop,
436
- d: function destroy(detaching) {
437
- if (detaching) detach_dev(option);
438
- }
439
- };
440
-
441
- dispatch_dev("SvelteRegisterBlock", {
442
- block,
443
- id: create_each_block_4.name,
444
- type: "each",
445
- source: "(118:6) {#each userTitles as userTitle}",
446
- ctx
447
- });
448
-
449
- return block;
450
- }
451
-
452
- // (126:4) {#if invalidFirstName}
453
- function create_if_block_2(ctx) {
454
- let p;
455
-
456
- const block = {
457
- c: function create() {
458
- p = element("p");
459
- p.textContent = "First name must be at least 2 characters long and contain no special characters.";
460
- attr_dev(p, "class", "InvalidInput");
461
- add_location(p, file, 126, 6, 4390);
462
- },
463
- m: function mount(target, anchor) {
464
- insert_dev(target, p, anchor);
465
- },
466
- d: function destroy(detaching) {
467
- if (detaching) detach_dev(p);
468
- }
469
- };
470
-
471
- dispatch_dev("SvelteRegisterBlock", {
472
- block,
473
- id: create_if_block_2.name,
474
- type: "if",
475
- source: "(126:4) {#if invalidFirstName}",
476
- ctx
477
- });
478
-
479
- return block;
480
- }
481
-
482
- // (133:4) {#if invalidLastName}
483
- function create_if_block_1(ctx) {
484
- let p;
485
-
486
- const block = {
487
- c: function create() {
488
- p = element("p");
489
- p.textContent = "Last name must be at least 2 characters long and contain no special characters.";
490
- attr_dev(p, "class", "InvalidInput");
491
- add_location(p, file, 133, 6, 4801);
492
- },
493
- m: function mount(target, anchor) {
494
- insert_dev(target, p, anchor);
495
- },
496
- d: function destroy(detaching) {
497
- if (detaching) detach_dev(p);
498
- }
499
- };
500
-
501
- dispatch_dev("SvelteRegisterBlock", {
502
- block,
503
- id: create_if_block_1.name,
504
- type: "if",
505
- source: "(133:4) {#if invalidLastName}",
506
- ctx
507
- });
508
-
509
- return block;
510
- }
511
-
512
- // (141:8) {#each birthDays as birthDay}
513
- function create_each_block_3(ctx) {
514
- let option;
515
- let t_value = /*birthDay*/ ctx[44] + "";
516
- let t;
517
-
518
- const block = {
519
- c: function create() {
520
- option = element("option");
521
- t = text(t_value);
522
- option.__value = /*birthDay*/ ctx[44];
523
- option.value = option.__value;
524
- add_location(option, file, 141, 10, 5201);
525
- },
526
- m: function mount(target, anchor) {
527
- insert_dev(target, option, anchor);
528
- append_dev(option, t);
529
- },
530
- p: noop,
531
- d: function destroy(detaching) {
532
- if (detaching) detach_dev(option);
533
- }
534
- };
535
-
536
- dispatch_dev("SvelteRegisterBlock", {
537
- block,
538
- id: create_each_block_3.name,
539
- type: "each",
540
- source: "(141:8) {#each birthDays as birthDay}",
541
- ctx
542
- });
543
-
544
- return block;
545
- }
546
-
547
- // (146:8) {#each birthMonths as birthMonth}
548
- function create_each_block_2(ctx) {
549
- let option;
550
- let t_value = /*birthMonth*/ ctx[41] + "";
551
- let t;
552
-
553
- const block = {
554
- c: function create() {
555
- option = element("option");
556
- t = text(t_value);
557
- option.__value = /*birthMonth*/ ctx[41];
558
- option.value = option.__value;
559
- add_location(option, file, 146, 10, 5404);
560
- },
561
- m: function mount(target, anchor) {
562
- insert_dev(target, option, anchor);
563
- append_dev(option, t);
564
- },
565
- p: noop,
566
- d: function destroy(detaching) {
567
- if (detaching) detach_dev(option);
568
- }
569
- };
570
-
571
- dispatch_dev("SvelteRegisterBlock", {
572
- block,
573
- id: create_each_block_2.name,
574
- type: "each",
575
- source: "(146:8) {#each birthMonths as birthMonth}",
576
- ctx
577
- });
578
-
579
- return block;
580
- }
581
-
582
- // (151:8) {#each birthYears as birthYear}
583
- function create_each_block_1(ctx) {
584
- let option;
585
- let t_value = /*birthYear*/ ctx[38] + "";
586
- let t;
587
-
588
- const block = {
589
- c: function create() {
590
- option = element("option");
591
- t = text(t_value);
592
- option.__value = /*birthYear*/ ctx[38];
593
- option.value = option.__value;
594
- add_location(option, file, 151, 10, 5607);
595
- },
596
- m: function mount(target, anchor) {
597
- insert_dev(target, option, anchor);
598
- append_dev(option, t);
599
- },
600
- p: noop,
601
- d: function destroy(detaching) {
602
- if (detaching) detach_dev(option);
603
- }
604
- };
605
-
606
- dispatch_dev("SvelteRegisterBlock", {
607
- block,
608
- id: create_each_block_1.name,
609
- type: "each",
610
- source: "(151:8) {#each birthYears as birthYear}",
611
- ctx
612
- });
613
-
614
- return block;
615
- }
616
-
617
- // (160:4) {#if invalidBirthPlace}
618
- function create_if_block(ctx) {
619
- let p;
620
-
621
- const block = {
622
- c: function create() {
623
- p = element("p");
624
- p.textContent = "Birth place must be at least 1 character long.";
625
- attr_dev(p, "class", "InvalidInput");
626
- add_location(p, file, 160, 6, 5998);
627
- },
628
- m: function mount(target, anchor) {
629
- insert_dev(target, p, anchor);
630
- },
631
- d: function destroy(detaching) {
632
- if (detaching) detach_dev(p);
633
- }
634
- };
635
-
636
- dispatch_dev("SvelteRegisterBlock", {
637
- block,
638
- id: create_if_block.name,
639
- type: "if",
640
- source: "(160:4) {#if invalidBirthPlace}",
641
- ctx
642
- });
643
-
644
- return block;
645
- }
646
-
647
- // (167:6) {#each currencies as currency}
648
- function create_each_block(ctx) {
649
- let option;
650
- let t_value = /*currency*/ ctx[35] + "";
651
- let t;
652
-
653
- const block = {
654
- c: function create() {
655
- option = element("option");
656
- t = text(t_value);
657
- option.__value = /*currency*/ ctx[35];
658
- option.value = option.__value;
659
- add_location(option, file, 167, 8, 6307);
660
- },
661
- m: function mount(target, anchor) {
662
- insert_dev(target, option, anchor);
663
- append_dev(option, t);
664
- },
665
- p: noop,
666
- d: function destroy(detaching) {
667
- if (detaching) detach_dev(option);
668
- }
669
- };
670
-
671
- dispatch_dev("SvelteRegisterBlock", {
672
- block,
673
- id: create_each_block.name,
674
- type: "each",
675
- source: "(167:6) {#each currencies as currency}",
676
- ctx
677
- });
678
-
679
- return block;
680
- }
681
-
682
- function create_fragment(ctx) {
683
- let div0;
684
- let button0;
685
- let svg;
686
- let defs;
687
- let style;
688
- let t0;
689
- let path;
690
- let t1;
691
- let t2;
692
- let div8;
693
- let div1;
694
- let label0;
695
- let t3;
696
- let span0;
697
- let t5;
698
- let select0;
699
- let t6;
700
- let t7;
701
- let div2;
702
- let label1;
703
- let t8;
704
- let span1;
705
- let t10;
706
- let input0;
707
- let t11;
708
- let div2_class_value;
709
- let t12;
710
- let div3;
711
- let label2;
712
- let t13;
713
- let span2;
714
- let t15;
715
- let input1;
716
- let t16;
717
- let div3_class_value;
718
- let t17;
719
- let div5;
720
- let label3;
721
- let t18;
722
- let span3;
723
- let t20;
724
- let div4;
725
- let select1;
726
- let t21;
727
- let select2;
728
- let t22;
729
- let select3;
730
- let t23;
731
- let div6;
732
- let label4;
733
- let t24;
734
- let span4;
735
- let t26;
736
- let input2;
737
- let t27;
738
- let div6_class_value;
739
- let t28;
740
- let div7;
741
- let label5;
742
- let t29;
743
- let span5;
744
- let t31;
745
- let select4;
746
- let t32;
747
- let button1;
748
- let t33;
749
- let button1_disabled_value;
750
- let mounted;
751
- let dispose;
752
- let each_value_4 = /*userTitles*/ ctx[12];
753
- validate_each_argument(each_value_4);
754
- let each_blocks_4 = [];
755
-
756
- for (let i = 0; i < each_value_4.length; i += 1) {
757
- each_blocks_4[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i));
758
- }
759
-
760
- let if_block0 = /*invalidFirstName*/ ctx[0] && create_if_block_2(ctx);
761
- let if_block1 = /*invalidLastName*/ ctx[1] && create_if_block_1(ctx);
762
- let each_value_3 = /*birthDays*/ ctx[13];
763
- validate_each_argument(each_value_3);
764
- let each_blocks_3 = [];
765
-
766
- for (let i = 0; i < each_value_3.length; i += 1) {
767
- each_blocks_3[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i));
768
- }
769
-
770
- let each_value_2 = /*birthMonths*/ ctx[14];
771
- validate_each_argument(each_value_2);
772
- let each_blocks_2 = [];
773
-
774
- for (let i = 0; i < each_value_2.length; i += 1) {
775
- each_blocks_2[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
776
- }
777
-
778
- let each_value_1 = /*birthYears*/ ctx[15];
779
- validate_each_argument(each_value_1);
780
- let each_blocks_1 = [];
781
-
782
- for (let i = 0; i < each_value_1.length; i += 1) {
783
- each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
784
- }
785
-
786
- let if_block2 = /*invalidBirthPlace*/ ctx[2] && create_if_block(ctx);
787
- let each_value = /*currencies*/ ctx[16];
788
- validate_each_argument(each_value);
789
- let each_blocks = [];
790
-
791
- for (let i = 0; i < each_value.length; i += 1) {
792
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
793
- }
794
-
795
- const block = {
796
- c: function create() {
797
- div0 = element("div");
798
- button0 = element("button");
799
- svg = svg_element("svg");
800
- defs = svg_element("defs");
801
- style = svg_element("style");
802
- t0 = text(".a{fill:#d0046c;}");
803
- path = svg_element("path");
804
- t1 = text("\n Back");
805
- t2 = space();
806
- div8 = element("div");
807
- div1 = element("div");
808
- label0 = element("label");
809
- t3 = text("Gender:");
810
- span0 = element("span");
811
- span0.textContent = "*";
812
- t5 = space();
813
- select0 = element("select");
814
-
815
- for (let i = 0; i < each_blocks_4.length; i += 1) {
816
- each_blocks_4[i].c();
817
- }
818
-
819
- t6 = text("}");
820
- t7 = space();
821
- div2 = element("div");
822
- label1 = element("label");
823
- t8 = text("First Name:");
824
- span1 = element("span");
825
- span1.textContent = "*";
826
- t10 = space();
827
- input0 = element("input");
828
- t11 = space();
829
- if (if_block0) if_block0.c();
830
- t12 = space();
831
- div3 = element("div");
832
- label2 = element("label");
833
- t13 = text("Last Name:");
834
- span2 = element("span");
835
- span2.textContent = "*";
836
- t15 = space();
837
- input1 = element("input");
838
- t16 = space();
839
- if (if_block1) if_block1.c();
840
- t17 = space();
841
- div5 = element("div");
842
- label3 = element("label");
843
- t18 = text("Date of Birth:");
844
- span3 = element("span");
845
- span3.textContent = "*";
846
- t20 = space();
847
- div4 = element("div");
848
- select1 = element("select");
849
-
850
- for (let i = 0; i < each_blocks_3.length; i += 1) {
851
- each_blocks_3[i].c();
852
- }
853
-
854
- t21 = space();
855
- select2 = element("select");
856
-
857
- for (let i = 0; i < each_blocks_2.length; i += 1) {
858
- each_blocks_2[i].c();
859
- }
860
-
861
- t22 = space();
862
- select3 = element("select");
863
-
864
- for (let i = 0; i < each_blocks_1.length; i += 1) {
865
- each_blocks_1[i].c();
866
- }
867
-
868
- t23 = space();
869
- div6 = element("div");
870
- label4 = element("label");
871
- t24 = text("Birth Place:");
872
- span4 = element("span");
873
- span4.textContent = "*";
874
- t26 = space();
875
- input2 = element("input");
876
- t27 = space();
877
- if (if_block2) if_block2.c();
878
- t28 = space();
879
- div7 = element("div");
880
- label5 = element("label");
881
- t29 = text("Currency:");
882
- span5 = element("span");
883
- span5.textContent = "*";
884
- t31 = space();
885
- select4 = element("select");
886
-
887
- for (let i = 0; i < each_blocks.length; i += 1) {
888
- each_blocks[i].c();
889
- }
890
-
891
- t32 = space();
892
- button1 = element("button");
893
- t33 = text("Next");
894
- this.c = noop;
895
- add_location(style, file, 109, 70, 3566);
896
- add_location(defs, file, 109, 64, 3560);
897
- attr_dev(path, "class", "a");
898
- attr_dev(path, "d", "M12,0,9.818,2.182l8.26,8.26H0v3.117H18.078l-8.26,8.26L12,24,24,12Z");
899
- attr_dev(path, "transform", "translate(24 24) rotate(180)");
900
- add_location(path, file, 109, 109, 3605);
901
- attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
902
- attr_dev(svg, "viewBox", "0 0 24 24");
903
- add_location(svg, file, 109, 4, 3500);
904
- attr_dev(button0, "class", "BackButton");
905
- add_location(button0, file, 108, 2, 3450);
906
- attr_dev(div0, "class", "RegisterFormHeader");
907
- add_location(div0, file, 107, 0, 3415);
908
- attr_dev(span0, "class", "FormRequired");
909
- add_location(span0, file, 115, 31, 3866);
910
- attr_dev(label0, "for", "Gender");
911
- add_location(label0, file, 115, 4, 3839);
912
- attr_dev(select0, "id", "Gender");
913
- if (/*userTitleSelected*/ ctx[3] === void 0) add_render_callback(() => /*select0_change_handler*/ ctx[22].call(select0));
914
- add_location(select0, file, 116, 4, 3914);
915
- attr_dev(div1, "class", "GenderContainer");
916
- add_location(div1, file, 114, 2, 3805);
917
- attr_dev(span1, "class", "FormRequired");
918
- add_location(span1, file, 123, 38, 4213);
919
- attr_dev(label1, "for", "FirstName");
920
- add_location(label1, file, 123, 4, 4179);
921
- attr_dev(input0, "type", "text");
922
- attr_dev(input0, "id", "FirstName");
923
- add_location(input0, file, 124, 4, 4261);
924
- attr_dev(div2, "class", div2_class_value = "FirstNameContainer " + (/*invalidFirstName*/ ctx[0] ? "InvalidField" : ""));
925
- add_location(div2, file, 122, 2, 4101);
926
- attr_dev(span2, "class", "FormRequired");
927
- add_location(span2, file, 130, 36, 4628);
928
- attr_dev(label2, "for", "LastName");
929
- add_location(label2, file, 130, 4, 4596);
930
- attr_dev(input1, "type", "text");
931
- attr_dev(input1, "id", "LastName");
932
- add_location(input1, file, 131, 4, 4676);
933
- attr_dev(div3, "class", div3_class_value = "LastNameContainer " + (/*invalidLastName*/ ctx[1] ? "InvalidField" : ""));
934
- add_location(div3, file, 129, 2, 4520);
935
- attr_dev(span3, "class", "FormRequired");
936
- add_location(span3, file, 137, 41, 5004);
937
- attr_dev(label3, "for", "BirthDate");
938
- add_location(label3, file, 137, 4, 4967);
939
- attr_dev(select1, "class", "BirthDaySelected");
940
- if (/*birthDaySelected*/ ctx[6] === void 0) add_render_callback(() => /*select1_change_handler*/ ctx[25].call(select1));
941
- add_location(select1, file, 139, 6, 5089);
942
- attr_dev(select2, "class", "BirthMonthSelected");
943
- if (/*birthMonthSelected*/ ctx[7] === void 0) add_render_callback(() => /*select2_change_handler*/ ctx[26].call(select2));
944
- add_location(select2, file, 144, 6, 5284);
945
- attr_dev(select3, "class", "BirthYearSelected");
946
- if (/*birthYearSelected*/ ctx[8] === void 0) add_render_callback(() => /*select3_change_handler*/ ctx[27].call(select3));
947
- add_location(select3, file, 149, 6, 5491);
948
- attr_dev(div4, "class", "BirthDateOptions");
949
- add_location(div4, file, 138, 4, 5052);
950
- attr_dev(div5, "class", "BirthDateContainer");
951
- add_location(div5, file, 136, 2, 4930);
952
- attr_dev(span4, "class", "FormRequired");
953
- add_location(span4, file, 157, 40, 5824);
954
- attr_dev(label4, "for", "BirthPlace");
955
- add_location(label4, file, 157, 4, 5788);
956
- attr_dev(input2, "type", "text");
957
- attr_dev(input2, "id", "BirthPlace");
958
- add_location(input2, file, 158, 4, 5872);
959
- attr_dev(div6, "class", div6_class_value = "BirthPlaceContainer " + (/*invalidBirthPlace*/ ctx[2] ? "InvalidField" : ""));
960
- add_location(div6, file, 156, 2, 5708);
961
- attr_dev(span5, "class", "FormRequired");
962
- add_location(span5, file, 164, 35, 6161);
963
- attr_dev(label5, "for", "Currency");
964
- add_location(label5, file, 164, 4, 6130);
965
- attr_dev(select4, "id", "Currency");
966
- if (/*currencySelected*/ ctx[10] === void 0) add_render_callback(() => /*select4_change_handler*/ ctx[29].call(select4));
967
- add_location(select4, file, 165, 4, 6209);
968
- attr_dev(div7, "class", "CurrencyContainer");
969
- add_location(div7, file, 163, 2, 6094);
970
- attr_dev(div8, "class", "RegisterFormContent");
971
- add_location(div8, file, 113, 0, 3769);
972
- attr_dev(button1, "class", "RegisterStepNext");
973
- button1.disabled = button1_disabled_value = !/*isValid*/ ctx[11];
974
- add_location(button1, file, 172, 0, 6396);
975
- },
976
- l: function claim(nodes) {
977
- throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
978
- },
979
- m: function mount(target, anchor) {
980
- insert_dev(target, div0, anchor);
981
- append_dev(div0, button0);
982
- append_dev(button0, svg);
983
- append_dev(svg, defs);
984
- append_dev(defs, style);
985
- append_dev(style, t0);
986
- append_dev(svg, path);
987
- append_dev(button0, t1);
988
- insert_dev(target, t2, anchor);
989
- insert_dev(target, div8, anchor);
990
- append_dev(div8, div1);
991
- append_dev(div1, label0);
992
- append_dev(label0, t3);
993
- append_dev(label0, span0);
994
- append_dev(div1, t5);
995
- append_dev(div1, select0);
996
-
997
- for (let i = 0; i < each_blocks_4.length; i += 1) {
998
- each_blocks_4[i].m(select0, null);
999
- }
1000
-
1001
- append_dev(select0, t6);
1002
- select_option(select0, /*userTitleSelected*/ ctx[3]);
1003
- append_dev(div8, t7);
1004
- append_dev(div8, div2);
1005
- append_dev(div2, label1);
1006
- append_dev(label1, t8);
1007
- append_dev(label1, span1);
1008
- append_dev(div2, t10);
1009
- append_dev(div2, input0);
1010
- set_input_value(input0, /*userFirstName*/ ctx[4]);
1011
- append_dev(div2, t11);
1012
- if (if_block0) if_block0.m(div2, null);
1013
- append_dev(div8, t12);
1014
- append_dev(div8, div3);
1015
- append_dev(div3, label2);
1016
- append_dev(label2, t13);
1017
- append_dev(label2, span2);
1018
- append_dev(div3, t15);
1019
- append_dev(div3, input1);
1020
- set_input_value(input1, /*userLastName*/ ctx[5]);
1021
- append_dev(div3, t16);
1022
- if (if_block1) if_block1.m(div3, null);
1023
- append_dev(div8, t17);
1024
- append_dev(div8, div5);
1025
- append_dev(div5, label3);
1026
- append_dev(label3, t18);
1027
- append_dev(label3, span3);
1028
- append_dev(div5, t20);
1029
- append_dev(div5, div4);
1030
- append_dev(div4, select1);
1031
-
1032
- for (let i = 0; i < each_blocks_3.length; i += 1) {
1033
- each_blocks_3[i].m(select1, null);
1034
- }
1035
-
1036
- select_option(select1, /*birthDaySelected*/ ctx[6]);
1037
- append_dev(div4, t21);
1038
- append_dev(div4, select2);
1039
-
1040
- for (let i = 0; i < each_blocks_2.length; i += 1) {
1041
- each_blocks_2[i].m(select2, null);
1042
- }
1043
-
1044
- select_option(select2, /*birthMonthSelected*/ ctx[7]);
1045
- append_dev(div4, t22);
1046
- append_dev(div4, select3);
1047
-
1048
- for (let i = 0; i < each_blocks_1.length; i += 1) {
1049
- each_blocks_1[i].m(select3, null);
1050
- }
1051
-
1052
- select_option(select3, /*birthYearSelected*/ ctx[8]);
1053
- append_dev(div8, t23);
1054
- append_dev(div8, div6);
1055
- append_dev(div6, label4);
1056
- append_dev(label4, t24);
1057
- append_dev(label4, span4);
1058
- append_dev(div6, t26);
1059
- append_dev(div6, input2);
1060
- set_input_value(input2, /*birthPlace*/ ctx[9]);
1061
- append_dev(div6, t27);
1062
- if (if_block2) if_block2.m(div6, null);
1063
- append_dev(div8, t28);
1064
- append_dev(div8, div7);
1065
- append_dev(div7, label5);
1066
- append_dev(label5, t29);
1067
- append_dev(label5, span5);
1068
- append_dev(div7, t31);
1069
- append_dev(div7, select4);
1070
-
1071
- for (let i = 0; i < each_blocks.length; i += 1) {
1072
- each_blocks[i].m(select4, null);
1073
- }
1074
-
1075
- select_option(select4, /*currencySelected*/ ctx[10]);
1076
- insert_dev(target, t32, anchor);
1077
- insert_dev(target, button1, anchor);
1078
- append_dev(button1, t33);
1079
-
1080
- if (!mounted) {
1081
- dispose = [
1082
- listen_dev(button0, "click", /*goBack*/ ctx[21], false, false, false),
1083
- listen_dev(select0, "change", /*select0_change_handler*/ ctx[22]),
1084
- listen_dev(input0, "input", /*input0_input_handler*/ ctx[23]),
1085
- listen_dev(input0, "blur", /*validateUserFirstName*/ ctx[17], false, false, false),
1086
- listen_dev(input1, "input", /*input1_input_handler*/ ctx[24]),
1087
- listen_dev(input1, "blur", /*validateUserLastName*/ ctx[18], false, false, false),
1088
- listen_dev(select1, "change", /*select1_change_handler*/ ctx[25]),
1089
- listen_dev(select2, "change", /*select2_change_handler*/ ctx[26]),
1090
- listen_dev(select3, "change", /*select3_change_handler*/ ctx[27]),
1091
- listen_dev(input2, "input", /*input2_input_handler*/ ctx[28]),
1092
- listen_dev(input2, "keyup", /*validateBirthPlace*/ ctx[19], false, false, false),
1093
- listen_dev(select4, "change", /*select4_change_handler*/ ctx[29]),
1094
- listen_dev(button1, "click", /*goNext*/ ctx[20], false, false, false)
1095
- ];
1096
-
1097
- mounted = true;
1098
- }
1099
- },
1100
- p: function update(ctx, dirty) {
1101
- if (dirty[0] & /*userTitles*/ 4096) {
1102
- each_value_4 = /*userTitles*/ ctx[12];
1103
- validate_each_argument(each_value_4);
1104
- let i;
1105
-
1106
- for (i = 0; i < each_value_4.length; i += 1) {
1107
- const child_ctx = get_each_context_4(ctx, each_value_4, i);
1108
-
1109
- if (each_blocks_4[i]) {
1110
- each_blocks_4[i].p(child_ctx, dirty);
1111
- } else {
1112
- each_blocks_4[i] = create_each_block_4(child_ctx);
1113
- each_blocks_4[i].c();
1114
- each_blocks_4[i].m(select0, t6);
1115
- }
1116
- }
1117
-
1118
- for (; i < each_blocks_4.length; i += 1) {
1119
- each_blocks_4[i].d(1);
1120
- }
1121
-
1122
- each_blocks_4.length = each_value_4.length;
1123
- }
1124
-
1125
- if (dirty[0] & /*userTitleSelected, userTitles*/ 4104) {
1126
- select_option(select0, /*userTitleSelected*/ ctx[3]);
1127
- }
1128
-
1129
- if (dirty[0] & /*userFirstName*/ 16 && input0.value !== /*userFirstName*/ ctx[4]) {
1130
- set_input_value(input0, /*userFirstName*/ ctx[4]);
1131
- }
1132
-
1133
- if (/*invalidFirstName*/ ctx[0]) {
1134
- if (if_block0) ; else {
1135
- if_block0 = create_if_block_2(ctx);
1136
- if_block0.c();
1137
- if_block0.m(div2, null);
1138
- }
1139
- } else if (if_block0) {
1140
- if_block0.d(1);
1141
- if_block0 = null;
1142
- }
1143
-
1144
- if (dirty[0] & /*invalidFirstName*/ 1 && div2_class_value !== (div2_class_value = "FirstNameContainer " + (/*invalidFirstName*/ ctx[0] ? "InvalidField" : ""))) {
1145
- attr_dev(div2, "class", div2_class_value);
1146
- }
1147
-
1148
- if (dirty[0] & /*userLastName*/ 32 && input1.value !== /*userLastName*/ ctx[5]) {
1149
- set_input_value(input1, /*userLastName*/ ctx[5]);
1150
- }
1151
-
1152
- if (/*invalidLastName*/ ctx[1]) {
1153
- if (if_block1) ; else {
1154
- if_block1 = create_if_block_1(ctx);
1155
- if_block1.c();
1156
- if_block1.m(div3, null);
1157
- }
1158
- } else if (if_block1) {
1159
- if_block1.d(1);
1160
- if_block1 = null;
1161
- }
1162
-
1163
- if (dirty[0] & /*invalidLastName*/ 2 && div3_class_value !== (div3_class_value = "LastNameContainer " + (/*invalidLastName*/ ctx[1] ? "InvalidField" : ""))) {
1164
- attr_dev(div3, "class", div3_class_value);
1165
- }
1166
-
1167
- if (dirty[0] & /*birthDays*/ 8192) {
1168
- each_value_3 = /*birthDays*/ ctx[13];
1169
- validate_each_argument(each_value_3);
1170
- let i;
1171
-
1172
- for (i = 0; i < each_value_3.length; i += 1) {
1173
- const child_ctx = get_each_context_3(ctx, each_value_3, i);
1174
-
1175
- if (each_blocks_3[i]) {
1176
- each_blocks_3[i].p(child_ctx, dirty);
1177
- } else {
1178
- each_blocks_3[i] = create_each_block_3(child_ctx);
1179
- each_blocks_3[i].c();
1180
- each_blocks_3[i].m(select1, null);
1181
- }
1182
- }
1183
-
1184
- for (; i < each_blocks_3.length; i += 1) {
1185
- each_blocks_3[i].d(1);
1186
- }
1187
-
1188
- each_blocks_3.length = each_value_3.length;
1189
- }
1190
-
1191
- if (dirty[0] & /*birthDaySelected, birthDays*/ 8256) {
1192
- select_option(select1, /*birthDaySelected*/ ctx[6]);
1193
- }
1194
-
1195
- if (dirty[0] & /*birthMonths*/ 16384) {
1196
- each_value_2 = /*birthMonths*/ ctx[14];
1197
- validate_each_argument(each_value_2);
1198
- let i;
1199
-
1200
- for (i = 0; i < each_value_2.length; i += 1) {
1201
- const child_ctx = get_each_context_2(ctx, each_value_2, i);
1202
-
1203
- if (each_blocks_2[i]) {
1204
- each_blocks_2[i].p(child_ctx, dirty);
1205
- } else {
1206
- each_blocks_2[i] = create_each_block_2(child_ctx);
1207
- each_blocks_2[i].c();
1208
- each_blocks_2[i].m(select2, null);
1209
- }
1210
- }
1211
-
1212
- for (; i < each_blocks_2.length; i += 1) {
1213
- each_blocks_2[i].d(1);
1214
- }
1215
-
1216
- each_blocks_2.length = each_value_2.length;
1217
- }
1218
-
1219
- if (dirty[0] & /*birthMonthSelected, birthMonths*/ 16512) {
1220
- select_option(select2, /*birthMonthSelected*/ ctx[7]);
1221
- }
1222
-
1223
- if (dirty[0] & /*birthYears*/ 32768) {
1224
- each_value_1 = /*birthYears*/ ctx[15];
1225
- validate_each_argument(each_value_1);
1226
- let i;
1227
-
1228
- for (i = 0; i < each_value_1.length; i += 1) {
1229
- const child_ctx = get_each_context_1(ctx, each_value_1, i);
1230
-
1231
- if (each_blocks_1[i]) {
1232
- each_blocks_1[i].p(child_ctx, dirty);
1233
- } else {
1234
- each_blocks_1[i] = create_each_block_1(child_ctx);
1235
- each_blocks_1[i].c();
1236
- each_blocks_1[i].m(select3, null);
1237
- }
1238
- }
1239
-
1240
- for (; i < each_blocks_1.length; i += 1) {
1241
- each_blocks_1[i].d(1);
1242
- }
1243
-
1244
- each_blocks_1.length = each_value_1.length;
1245
- }
1246
-
1247
- if (dirty[0] & /*birthYearSelected, birthYears*/ 33024) {
1248
- select_option(select3, /*birthYearSelected*/ ctx[8]);
1249
- }
1250
-
1251
- if (dirty[0] & /*birthPlace*/ 512 && input2.value !== /*birthPlace*/ ctx[9]) {
1252
- set_input_value(input2, /*birthPlace*/ ctx[9]);
1253
- }
1254
-
1255
- if (/*invalidBirthPlace*/ ctx[2]) {
1256
- if (if_block2) ; else {
1257
- if_block2 = create_if_block(ctx);
1258
- if_block2.c();
1259
- if_block2.m(div6, null);
1260
- }
1261
- } else if (if_block2) {
1262
- if_block2.d(1);
1263
- if_block2 = null;
1264
- }
1265
-
1266
- if (dirty[0] & /*invalidBirthPlace*/ 4 && div6_class_value !== (div6_class_value = "BirthPlaceContainer " + (/*invalidBirthPlace*/ ctx[2] ? "InvalidField" : ""))) {
1267
- attr_dev(div6, "class", div6_class_value);
1268
- }
1269
-
1270
- if (dirty[0] & /*currencies*/ 65536) {
1271
- each_value = /*currencies*/ ctx[16];
1272
- validate_each_argument(each_value);
1273
- let i;
1274
-
1275
- for (i = 0; i < each_value.length; i += 1) {
1276
- const child_ctx = get_each_context(ctx, each_value, i);
1277
-
1278
- if (each_blocks[i]) {
1279
- each_blocks[i].p(child_ctx, dirty);
1280
- } else {
1281
- each_blocks[i] = create_each_block(child_ctx);
1282
- each_blocks[i].c();
1283
- each_blocks[i].m(select4, null);
1284
- }
1285
- }
1286
-
1287
- for (; i < each_blocks.length; i += 1) {
1288
- each_blocks[i].d(1);
1289
- }
1290
-
1291
- each_blocks.length = each_value.length;
1292
- }
1293
-
1294
- if (dirty[0] & /*currencySelected, currencies*/ 66560) {
1295
- select_option(select4, /*currencySelected*/ ctx[10]);
1296
- }
1297
-
1298
- if (dirty[0] & /*isValid*/ 2048 && button1_disabled_value !== (button1_disabled_value = !/*isValid*/ ctx[11])) {
1299
- prop_dev(button1, "disabled", button1_disabled_value);
1300
- }
1301
- },
1302
- i: noop,
1303
- o: noop,
1304
- d: function destroy(detaching) {
1305
- if (detaching) detach_dev(div0);
1306
- if (detaching) detach_dev(t2);
1307
- if (detaching) detach_dev(div8);
1308
- destroy_each(each_blocks_4, detaching);
1309
- if (if_block0) if_block0.d();
1310
- if (if_block1) if_block1.d();
1311
- destroy_each(each_blocks_3, detaching);
1312
- destroy_each(each_blocks_2, detaching);
1313
- destroy_each(each_blocks_1, detaching);
1314
- if (if_block2) if_block2.d();
1315
- destroy_each(each_blocks, detaching);
1316
- if (detaching) detach_dev(t32);
1317
- if (detaching) detach_dev(button1);
1318
- mounted = false;
1319
- run_all(dispose);
1320
- }
1321
- };
1322
-
1323
- dispatch_dev("SvelteRegisterBlock", {
1324
- block,
1325
- id: create_fragment.name,
1326
- type: "component",
1327
- source: "",
1328
- ctx
1329
- });
1330
-
1331
- return block;
1332
- }
1333
-
1334
- function instance($$self, $$props, $$invalidate) {
1335
- let { $$slots: slots = {}, $$scope } = $$props;
1336
- validate_slots("undefined", slots, []);
1337
- let invalidFirstName = false;
1338
- let invalidLastName = false;
1339
- let invalidBirthPlace = false;
1340
- let userTitles = ["Mr.", "Mrs.", "Ms."];
1341
- let userTitleSelected = userTitles[0];
1342
- let userFirstName = "";
1343
- let userLastName = "";
1344
-
1345
- let birthDays = [
1346
- 1,
1347
- 2,
1348
- 3,
1349
- 4,
1350
- 5,
1351
- 6,
1352
- 7,
1353
- 8,
1354
- 9,
1355
- 10,
1356
- 11,
1357
- 12,
1358
- 13,
1359
- 14,
1360
- 15,
1361
- 16,
1362
- 17,
1363
- 18,
1364
- 19,
1365
- 20,
1366
- 21,
1367
- 22,
1368
- 23,
1369
- 24,
1370
- 25,
1371
- 26,
1372
- 27,
1373
- 28,
1374
- 29,
1375
- 30,
1376
- 31
1377
- ];
1378
-
1379
- let birthDaySelected = birthDays[0];
1380
- let birthMonths = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
1381
- let birthMonthSelected = birthMonths[0];
1382
-
1383
- let birthYears = [
1384
- 1999,
1385
- 1998,
1386
- 1997,
1387
- 1996,
1388
- 1995,
1389
- 1994,
1390
- 1993,
1391
- 1992,
1392
- 1991,
1393
- 1990,
1394
- 1989,
1395
- 1988,
1396
- 1987,
1397
- 1986,
1398
- 1985,
1399
- 1984,
1400
- 1983,
1401
- 1982,
1402
- 1981,
1403
- 1980,
1404
- 1979
1405
- ];
1406
-
1407
- let birthYearSelected = birthYears[0];
1408
- let birthPlace = "";
1409
- let currencies = ["EUR"];
1410
- let currencySelected = currencies[0];
1411
- let isValid = false;
1412
-
1413
- const checkIsValid = () => {
1414
- $$invalidate(11, isValid = !(invalidFirstName || invalidLastName || invalidBirthPlace));
1415
-
1416
- if (userFirstName.length <= 0 || userLastName.length <= 0 || birthPlace.length <= 0) {
1417
- $$invalidate(11, isValid = false);
1418
- }
1419
- };
1420
-
1421
- const regexValidators = {
1422
- user: /^(?!(?:.*\d){9})(?=(?:.*[a-zA-Z]){2})^[a-zA-Z\d]*$/
1423
- };
1424
-
1425
- const checkUserIdentifier = user => {
1426
- if (regexValidators.user.test(user)) {
1427
- return true;
1428
- }
1429
-
1430
- return false;
1431
- };
1432
-
1433
- const validateUserFirstName = () => {
1434
- $$invalidate(0, invalidFirstName = !checkUserIdentifier(userFirstName));
1435
- checkIsValid();
1436
- };
1437
-
1438
- const validateUserLastName = () => {
1439
- $$invalidate(1, invalidLastName = !checkUserIdentifier(userLastName));
1440
- checkIsValid();
1441
- };
1442
-
1443
- const checkBirthPlace = () => {
1444
- if (birthPlace) {
1445
- return true;
1446
- }
1447
-
1448
- return false;
1449
- };
1450
-
1451
- const validateBirthPlace = () => {
1452
- $$invalidate(2, invalidBirthPlace = !checkBirthPlace());
1453
- checkIsValid();
1454
- };
1455
-
1456
- const goNext = () => {
1457
- let registerStepTwoData = {
1458
- userTitleSelected,
1459
- userFirstName,
1460
- userLastName,
1461
- birthDaySelected,
1462
- birthMonthSelected,
1463
- birthYearSelected,
1464
- birthPlace,
1465
- currencySelected
1466
- };
1467
-
1468
- window.postMessage(
1469
- {
1470
- type: "RegisterStepTwo",
1471
- registerStepTwoData
1472
- },
1473
- window.location.href
1474
- );
1475
- };
1476
-
1477
- const goBack = () => {
1478
- let registerStepTwoData = {
1479
- userTitleSelected,
1480
- userFirstName,
1481
- userLastName,
1482
- birthDaySelected,
1483
- birthMonthSelected,
1484
- birthYearSelected,
1485
- birthPlace,
1486
- currencySelected
1487
- };
1488
-
1489
- window.postMessage(
1490
- {
1491
- type: "GoBackStepTwo",
1492
- registerStepTwoData
1493
- },
1494
- window.location.href
1495
- );
1496
- };
1497
-
1498
- const messageHandler = e => {
1499
- if (e.data) {
1500
- switch (e.data.type) {
1501
- case "StepTwoDataBackup":
1502
- $$invalidate(3, userTitleSelected = e.data.userData.title);
1503
- $$invalidate(4, userFirstName = e.data.userData.firstname);
1504
- $$invalidate(5, userLastName = e.data.userData.lastname);
1505
- $$invalidate(6, birthDaySelected = e.data.userData.birth.day);
1506
- $$invalidate(7, birthMonthSelected = e.data.userData.birth.month);
1507
- $$invalidate(8, birthYearSelected = e.data.userData.birth.year);
1508
- $$invalidate(9, birthPlace = e.data.userData.birthPlace);
1509
- $$invalidate(10, currencySelected = e.data.userData.currency);
1510
- checkIsValid();
1511
- break;
1512
- }
1513
- }
1514
- };
1515
-
1516
- onMount(() => {
1517
- window.addEventListener("message", messageHandler, false);
1518
-
1519
- return () => {
1520
- window.removeEventListener("message", messageHandler);
1521
- };
1522
- });
1523
-
1524
- const writable_props = [];
1525
-
1526
- Object.keys($$props).forEach(key => {
1527
- if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<undefined> was created with unknown prop '${key}'`);
1528
- });
1529
-
1530
- function select0_change_handler() {
1531
- userTitleSelected = select_value(this);
1532
- $$invalidate(3, userTitleSelected);
1533
- $$invalidate(12, userTitles);
1534
- }
1535
-
1536
- function input0_input_handler() {
1537
- userFirstName = this.value;
1538
- $$invalidate(4, userFirstName);
1539
- }
1540
-
1541
- function input1_input_handler() {
1542
- userLastName = this.value;
1543
- $$invalidate(5, userLastName);
1544
- }
1545
-
1546
- function select1_change_handler() {
1547
- birthDaySelected = select_value(this);
1548
- $$invalidate(6, birthDaySelected);
1549
- $$invalidate(13, birthDays);
1550
- }
1551
-
1552
- function select2_change_handler() {
1553
- birthMonthSelected = select_value(this);
1554
- $$invalidate(7, birthMonthSelected);
1555
- $$invalidate(14, birthMonths);
1556
- }
1557
-
1558
- function select3_change_handler() {
1559
- birthYearSelected = select_value(this);
1560
- $$invalidate(8, birthYearSelected);
1561
- $$invalidate(15, birthYears);
1562
- }
1563
-
1564
- function input2_input_handler() {
1565
- birthPlace = this.value;
1566
- $$invalidate(9, birthPlace);
1567
- }
1568
-
1569
- function select4_change_handler() {
1570
- currencySelected = select_value(this);
1571
- $$invalidate(10, currencySelected);
1572
- $$invalidate(16, currencies);
1573
- }
1574
-
1575
- $$self.$capture_state = () => ({
1576
- onMount,
1577
- invalidFirstName,
1578
- invalidLastName,
1579
- invalidBirthPlace,
1580
- userTitles,
1581
- userTitleSelected,
1582
- userFirstName,
1583
- userLastName,
1584
- birthDays,
1585
- birthDaySelected,
1586
- birthMonths,
1587
- birthMonthSelected,
1588
- birthYears,
1589
- birthYearSelected,
1590
- birthPlace,
1591
- currencies,
1592
- currencySelected,
1593
- isValid,
1594
- checkIsValid,
1595
- regexValidators,
1596
- checkUserIdentifier,
1597
- validateUserFirstName,
1598
- validateUserLastName,
1599
- checkBirthPlace,
1600
- validateBirthPlace,
1601
- goNext,
1602
- goBack,
1603
- messageHandler
1604
- });
1605
-
1606
- $$self.$inject_state = $$props => {
1607
- if ("invalidFirstName" in $$props) $$invalidate(0, invalidFirstName = $$props.invalidFirstName);
1608
- if ("invalidLastName" in $$props) $$invalidate(1, invalidLastName = $$props.invalidLastName);
1609
- if ("invalidBirthPlace" in $$props) $$invalidate(2, invalidBirthPlace = $$props.invalidBirthPlace);
1610
- if ("userTitles" in $$props) $$invalidate(12, userTitles = $$props.userTitles);
1611
- if ("userTitleSelected" in $$props) $$invalidate(3, userTitleSelected = $$props.userTitleSelected);
1612
- if ("userFirstName" in $$props) $$invalidate(4, userFirstName = $$props.userFirstName);
1613
- if ("userLastName" in $$props) $$invalidate(5, userLastName = $$props.userLastName);
1614
- if ("birthDays" in $$props) $$invalidate(13, birthDays = $$props.birthDays);
1615
- if ("birthDaySelected" in $$props) $$invalidate(6, birthDaySelected = $$props.birthDaySelected);
1616
- if ("birthMonths" in $$props) $$invalidate(14, birthMonths = $$props.birthMonths);
1617
- if ("birthMonthSelected" in $$props) $$invalidate(7, birthMonthSelected = $$props.birthMonthSelected);
1618
- if ("birthYears" in $$props) $$invalidate(15, birthYears = $$props.birthYears);
1619
- if ("birthYearSelected" in $$props) $$invalidate(8, birthYearSelected = $$props.birthYearSelected);
1620
- if ("birthPlace" in $$props) $$invalidate(9, birthPlace = $$props.birthPlace);
1621
- if ("currencies" in $$props) $$invalidate(16, currencies = $$props.currencies);
1622
- if ("currencySelected" in $$props) $$invalidate(10, currencySelected = $$props.currencySelected);
1623
- if ("isValid" in $$props) $$invalidate(11, isValid = $$props.isValid);
1624
- };
1625
-
1626
- if ($$props && "$$inject" in $$props) {
1627
- $$self.$inject_state($$props.$$inject);
1628
- }
1629
-
1630
- return [
1631
- invalidFirstName,
1632
- invalidLastName,
1633
- invalidBirthPlace,
1634
- userTitleSelected,
1635
- userFirstName,
1636
- userLastName,
1637
- birthDaySelected,
1638
- birthMonthSelected,
1639
- birthYearSelected,
1640
- birthPlace,
1641
- currencySelected,
1642
- isValid,
1643
- userTitles,
1644
- birthDays,
1645
- birthMonths,
1646
- birthYears,
1647
- currencies,
1648
- validateUserFirstName,
1649
- validateUserLastName,
1650
- validateBirthPlace,
1651
- goNext,
1652
- goBack,
1653
- select0_change_handler,
1654
- input0_input_handler,
1655
- input1_input_handler,
1656
- select1_change_handler,
1657
- select2_change_handler,
1658
- select3_change_handler,
1659
- input2_input_handler,
1660
- select4_change_handler
1661
- ];
1662
- }
1663
-
1664
- class GeneralPlayerRegisterFormStep2 extends SvelteElement {
1665
- constructor(options) {
1666
- super();
1667
- 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}.GenderContainer,.FirstNameContainer,.LastNameContainer,.BirthDateContainer,.BirthPlaceContainer,.CurrencyContainer{color:#58586B;display:flex;flex-direction:column;padding-bottom:30px;position:relative}.GenderContainer label,.FirstNameContainer label,.LastNameContainer label,.BirthDateContainer label,.BirthPlaceContainer label,.CurrencyContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.GenderContainer select,.FirstNameContainer input,.LastNameContainer input,.BirthDateContainer select,.BirthPlaceContainer input,.CurrencyContainer 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}.FirstNameContainer.InvalidField input,.LastNameContainer.InvalidField input,.BirthPlaceContainer.InvalidField input{border:1px solid #D0046C;background:#FBECF4;color:#D0046C}.BirthDateOptions{display:flex;gap:10px}.BirthDateOptions .BirthDaySelected{width:30%}.BirthDateOptions .BirthMonthSelected{width:30%}.BirthDateOptions .BirthYearSelected{width:40%}.FormRequired{color:#FD2839}.InvalidInput{color:#D0046C;font-size:10px;position:absolute;bottom:-3px;line-height:10px}.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>`;
1668
-
1669
- init(
1670
- this,
1671
- {
1672
- target: this.shadowRoot,
1673
- props: attribute_to_object(this.attributes),
1674
- customElement: true
1675
- },
1676
- instance,
1677
- create_fragment,
1678
- safe_not_equal,
1679
- {},
1680
- [-1, -1]
1681
- );
1682
-
1683
- if (options) {
1684
- if (options.target) {
1685
- insert_dev(options.target, this, options.anchor);
1686
- }
1687
- }
1688
- }
1689
- }
1690
-
1691
- !customElements.get('general-player-register-form-step2') && customElements.define('general-player-register-form-step2', GeneralPlayerRegisterFormStep2);
1692
-
1693
- return GeneralPlayerRegisterFormStep2;
1694
-
1695
- })));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,function(){"use strict";function ht(){}function d(t){return t()}function h(){return Object.create(null)}function pt(t){t.forEach(d)}function p(t){return"function"==typeof t}function e(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function ft(t,e){t.appendChild(e)}function gt(t,e,n){t.insertBefore(e,n||null)}function mt(t){t.parentNode.removeChild(t)}function vt(e,n){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(n)}function bt(t){return document.createElement(t)}function xt(t){return document.createTextNode(t)}function yt(){return xt(" ")}function Ct(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function $t(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _t(t,e){t.value=null==e?"":e}function Bt(e,n){for(let t=0;t<e.options.length;t+=1){const r=e.options[t];if(r.__value===n)return r.selected=!0,0}}function w(t){t=t.querySelector(":checked")||t.options[0];return t&&t.__value}let D;function f(t){D=t}const g=[],t=[],r=[],a=[],m=Promise.resolve();let v=!1;function wt(t){r.push(t)}let l=!1;const i=new Set;function b(){if(!l){l=!0;do{for(let t=0;t<g.length;t+=1){var e=g[t];f(e),function(t){{var e;null!==t.fragment&&(t.update(),pt(t.before_update),e=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt))}}(e.$$)}for(f(null),g.length=0;t.length;)t.pop()();for(let t=0;t<r.length;t+=1){const n=r[t];i.has(n)||(i.add(n),n())}}while(r.length=0,g.length);for(;a.length;)a.pop()();v=!1,l=!1,i.clear()}}const x=new Set;function n(r,t,e,n,a,l,i=[-1]){var o,s=D;f(r);const c=r.$$={fragment:null,ctx:null,props:l,update:ht,not_equal:a,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let u=!1;if(c.ctx=e?e(r,t.props||{},(t,e,...n)=>{n=n.length?n[0]:e;return c.ctx&&a(c.ctx[t],c.ctx[t]=n)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](n),u&&(n=t,-1===(t=r).$$.dirty[0]&&(g.push(t),v||(v=!0,m.then(b)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31)),e}):[],c.update(),u=!0,pt(c.before_update),c.fragment=!!n&&n(c.ctx),t.target){if(t.hydrate){const ht=(n=t.target,Array.from(n.childNodes));c.fragment&&c.fragment.l(ht),ht.forEach(mt)}else c.fragment&&c.fragment.c();t.intro&&(o=r.$$.fragment)&&o.i&&(x.delete(o),o.i(void 0)),function(e,t,n,r){const{fragment:a,on_mount:l,on_destroy:i,after_update:o}=e.$$;a&&a.m(t,n),r||wt(()=>{var t=l.map(d).filter(p);i?i.push(...t):pt(t),e.$$.on_mount=[]}),o.forEach(wt)}(r,t.target,t.anchor,t.customElement),b()}f(s)}let o;function Dt(t,e,n){const r=t.slice();return r[35]=e[n],r}function Ft(t,e,n){const r=t.slice();return r[38]=e[n],r}function Nt(t,e,n){const r=t.slice();return r[41]=e[n],r}function St(t,e,n){const r=t.slice();return r[44]=e[n],r}function Lt(t,e,n){const r=t.slice();return r[47]=e[n],r}function kt(t){let n,r,e=t[47]+"";return{c(){n=bt("option"),r=xt(e),n.__value=t[47],n.value=n.__value},m(t,e){gt(t,n,e),ft(n,r)},p:ht,d(t){t&&mt(n)}}}function Mt(){let n;return{c(){n=bt("p"),n.textContent="First name must be at least 2 characters long and contain no special characters.",$t(n,"class","InvalidInput")},m(t,e){gt(t,n,e)},d(t){t&&mt(n)}}}function Tt(){let n;return{c(){n=bt("p"),n.textContent="Last name must be at least 2 characters long and contain no special characters.",$t(n,"class","InvalidInput")},m(t,e){gt(t,n,e)},d(t){t&&mt(n)}}}function Et(t){let n,r,e=t[44]+"";return{c(){n=bt("option"),r=xt(e),n.__value=t[44],n.value=n.__value},m(t,e){gt(t,n,e),ft(n,r)},p:ht,d(t){t&&mt(n)}}}function It(t){let n,r,e=t[41]+"";return{c(){n=bt("option"),r=xt(e),n.__value=t[41],n.value=n.__value},m(t,e){gt(t,n,e),ft(n,r)},p:ht,d(t){t&&mt(n)}}}function Rt(t){let n,r,e=t[38]+"";return{c(){n=bt("option"),r=xt(e),n.__value=t[38],n.value=n.__value},m(t,e){gt(t,n,e),ft(n,r)},p:ht,d(t){t&&mt(n)}}}function Ht(){let n;return{c(){n=bt("p"),n.textContent="Birth place must be at least 1 character long.",$t(n,"class","InvalidInput")},m(t,e){gt(t,n,e)},d(t){t&&mt(n)}}}function Pt(t){let n,r,e=t[35]+"";return{c(){n=bt("option"),r=xt(e),n.__value=t[35],n.value=n.__value},m(t,e){gt(t,n,e),ft(n,r)},p:ht,d(t){t&&mt(n)}}}function s(n){let r,a,l,i,o,s,c,u,d,h,p,f,g,m,v,t,b,x,y,C,$,_,B,w,D,F,N,S,L,k,M,T,E,I,R,H,P,z,q,G,O,A,j,Y,Z,U,J,K,Q,V,W,X=n[12],tt=[];for(let t=0;t<X.length;t+=1)tt[t]=kt(Lt(n,X,t));let et=n[0]&&Mt(),nt=n[1]&&Tt(),rt=n[13],at=[];for(let t=0;t<rt.length;t+=1)at[t]=Et(St(n,rt,t));let lt=n[14],it=[];for(let t=0;t<lt.length;t+=1)it[t]=It(Nt(n,lt,t));let ot=n[15],st=[];for(let t=0;t<ot.length;t+=1)st[t]=Rt(Ft(n,ot,t));let ct=n[2]&&Ht(),ut=n[16],dt=[];for(let t=0;t<ut.length;t+=1)dt[t]=Pt(Dt(n,ut,t));return{c(){r=bt("div"),a=bt("button"),a.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',l=yt(),i=bt("div"),o=bt("div"),s=bt("label"),s.innerHTML='Gender:<span class="FormRequired">*</span>',c=yt(),u=bt("select");for(let t=0;t<tt.length;t+=1)tt[t].c();d=xt("}"),h=yt(),p=bt("div"),f=bt("label"),f.innerHTML='First Name:<span class="FormRequired">*</span>',g=yt(),m=bt("input"),v=yt(),et&&et.c(),b=yt(),x=bt("div"),y=bt("label"),y.innerHTML='Last Name:<span class="FormRequired">*</span>',C=yt(),$=bt("input"),_=yt(),nt&&nt.c(),w=yt(),D=bt("div"),F=bt("label"),F.innerHTML='Date of Birth:<span class="FormRequired">*</span>',N=yt(),S=bt("div"),L=bt("select");for(let t=0;t<at.length;t+=1)at[t].c();k=yt(),M=bt("select");for(let t=0;t<it.length;t+=1)it[t].c();T=yt(),E=bt("select");for(let t=0;t<st.length;t+=1)st[t].c();I=yt(),R=bt("div"),H=bt("label"),H.innerHTML='Birth Place:<span class="FormRequired">*</span>',P=yt(),z=bt("input"),q=yt(),ct&&ct.c(),O=yt(),A=bt("div"),j=bt("label"),j.innerHTML='Currency:<span class="FormRequired">*</span>',Y=yt(),Z=bt("select");for(let t=0;t<dt.length;t+=1)dt[t].c();U=yt(),J=bt("button"),K=xt("Next"),this.c=ht,$t(a,"class","BackButton"),$t(r,"class","RegisterFormHeader"),$t(s,"for","Gender"),$t(u,"id","Gender"),void 0===n[3]&&wt(()=>n[22].call(u)),$t(o,"class","GenderContainer"),$t(f,"for","FirstName"),$t(m,"type","text"),$t(m,"id","FirstName"),$t(p,"class",t="FirstNameContainer "+(n[0]?"InvalidField":"")),$t(y,"for","LastName"),$t($,"type","text"),$t($,"id","LastName"),$t(x,"class",B="LastNameContainer "+(n[1]?"InvalidField":"")),$t(F,"for","BirthDate"),$t(L,"class","BirthDaySelected"),void 0===n[6]&&wt(()=>n[25].call(L)),$t(M,"class","BirthMonthSelected"),void 0===n[7]&&wt(()=>n[26].call(M)),$t(E,"class","BirthYearSelected"),void 0===n[8]&&wt(()=>n[27].call(E)),$t(S,"class","BirthDateOptions"),$t(D,"class","BirthDateContainer"),$t(H,"for","BirthPlace"),$t(z,"type","text"),$t(z,"id","BirthPlace"),$t(R,"class",G="BirthPlaceContainer "+(n[2]?"InvalidField":"")),$t(j,"for","Currency"),$t(Z,"id","Currency"),void 0===n[10]&&wt(()=>n[29].call(Z)),$t(A,"class","CurrencyContainer"),$t(i,"class","RegisterFormContent"),$t(J,"class","RegisterStepNext"),J.disabled=Q=!n[11]},m(t,e){gt(t,r,e),ft(r,a),gt(t,l,e),gt(t,i,e),ft(i,o),ft(o,s),ft(o,c),ft(o,u);for(let t=0;t<tt.length;t+=1)tt[t].m(u,null);ft(u,d),Bt(u,n[3]),ft(i,h),ft(i,p),ft(p,f),ft(p,g),ft(p,m),_t(m,n[4]),ft(p,v),et&&et.m(p,null),ft(i,b),ft(i,x),ft(x,y),ft(x,C),ft(x,$),_t($,n[5]),ft(x,_),nt&&nt.m(x,null),ft(i,w),ft(i,D),ft(D,F),ft(D,N),ft(D,S),ft(S,L);for(let t=0;t<at.length;t+=1)at[t].m(L,null);Bt(L,n[6]),ft(S,k),ft(S,M);for(let t=0;t<it.length;t+=1)it[t].m(M,null);Bt(M,n[7]),ft(S,T),ft(S,E);for(let t=0;t<st.length;t+=1)st[t].m(E,null);Bt(E,n[8]),ft(i,I),ft(i,R),ft(R,H),ft(R,P),ft(R,z),_t(z,n[9]),ft(R,q),ct&&ct.m(R,null),ft(i,O),ft(i,A),ft(A,j),ft(A,Y),ft(A,Z);for(let t=0;t<dt.length;t+=1)dt[t].m(Z,null);Bt(Z,n[10]),gt(t,U,e),gt(t,J,e),ft(J,K),V||(W=[Ct(a,"click",n[21]),Ct(u,"change",n[22]),Ct(m,"input",n[23]),Ct(m,"blur",n[17]),Ct($,"input",n[24]),Ct($,"blur",n[18]),Ct(L,"change",n[25]),Ct(M,"change",n[26]),Ct(E,"change",n[27]),Ct(z,"input",n[28]),Ct(z,"keyup",n[19]),Ct(Z,"change",n[29]),Ct(J,"click",n[20])],V=!0)},p(e,n){if(4096&n[0]){let t;for(X=e[12],t=0;t<X.length;t+=1){var r=Lt(e,X,t);tt[t]?tt[t].p(r,n):(tt[t]=kt(r),tt[t].c(),tt[t].m(u,d))}for(;t<tt.length;t+=1)tt[t].d(1);tt.length=X.length}if(4104&n[0]&&Bt(u,e[3]),16&n[0]&&m.value!==e[4]&&_t(m,e[4]),e[0]?et||(et=Mt(),et.c(),et.m(p,null)):et&&(et.d(1),et=null),1&n[0]&&t!==(t="FirstNameContainer "+(e[0]?"InvalidField":""))&&$t(p,"class",t),32&n[0]&&$.value!==e[5]&&_t($,e[5]),e[1]?nt||(nt=Tt(),nt.c(),nt.m(x,null)):nt&&(nt.d(1),nt=null),2&n[0]&&B!==(B="LastNameContainer "+(e[1]?"InvalidField":""))&&$t(x,"class",B),8192&n[0]){let t;for(rt=e[13],t=0;t<rt.length;t+=1){var a=St(e,rt,t);at[t]?at[t].p(a,n):(at[t]=Et(a),at[t].c(),at[t].m(L,null))}for(;t<at.length;t+=1)at[t].d(1);at.length=rt.length}if(8256&n[0]&&Bt(L,e[6]),16384&n[0]){let t;for(lt=e[14],t=0;t<lt.length;t+=1){var l=Nt(e,lt,t);it[t]?it[t].p(l,n):(it[t]=It(l),it[t].c(),it[t].m(M,null))}for(;t<it.length;t+=1)it[t].d(1);it.length=lt.length}if(16512&n[0]&&Bt(M,e[7]),32768&n[0]){let t;for(ot=e[15],t=0;t<ot.length;t+=1){var i=Ft(e,ot,t);st[t]?st[t].p(i,n):(st[t]=Rt(i),st[t].c(),st[t].m(E,null))}for(;t<st.length;t+=1)st[t].d(1);st.length=ot.length}if(33024&n[0]&&Bt(E,e[8]),512&n[0]&&z.value!==e[9]&&_t(z,e[9]),e[2]?ct||(ct=Ht(),ct.c(),ct.m(R,null)):ct&&(ct.d(1),ct=null),4&n[0]&&G!==(G="BirthPlaceContainer "+(e[2]?"InvalidField":""))&&$t(R,"class",G),65536&n[0]){let t;for(ut=e[16],t=0;t<ut.length;t+=1){var o=Dt(e,ut,t);dt[t]?dt[t].p(o,n):(dt[t]=Pt(o),dt[t].c(),dt[t].m(Z,null))}for(;t<dt.length;t+=1)dt[t].d(1);dt.length=ut.length}66560&n[0]&&Bt(Z,e[10]),2048&n[0]&&Q!==(Q=!e[11])&&(J.disabled=Q)},i:ht,o:ht,d(t){t&&mt(r),t&&mt(l),t&&mt(i),vt(tt,t),et&&et.d(),nt&&nt.d(),vt(at,t),vt(it,t),vt(st,t),ct&&ct.d(),vt(dt,t),t&&mt(U),t&&mt(J),V=!1,pt(W)}}}function c(t,e,n){let r=!1,a=!1,l=!1,i=["Mr.","Mrs.","Ms."],o=i[0],s="",c="",u=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],d=u[0],h=[1,2,3,4,5,6,7,8,9,10,11,12],p=h[0],f=[1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979],g=f[0],m="",v=["EUR"],b=v[0],x=!1;const y=()=>{n(11,x=!(r||a||l)),(s.length<=0||c.length<=0||m.length<=0)&&n(11,x=!1)},C={user:/^(?!(?:.*\d){9})(?=(?:.*[a-zA-Z]){2})^[a-zA-Z\d]*$/},$=t=>!!C.user.test(t),_=t=>{t.data&&"StepTwoDataBackup"===t.data.type&&(n(3,o=t.data.userData.title),n(4,s=t.data.userData.firstname),n(5,c=t.data.userData.lastname),n(6,d=t.data.userData.birth.day),n(7,p=t.data.userData.birth.month),n(8,g=t.data.userData.birth.year),n(9,m=t.data.userData.birthPlace),n(10,b=t.data.userData.currency),y())};return B=()=>(window.addEventListener("message",_,!1),()=>{window.removeEventListener("message",_)}),function(){if(!D)throw new Error("Function called outside component initialization");return D}().$$.on_mount.push(B),[r,a,l,o,s,c,d,p,g,m,b,x,i,u,h,f,v,()=>{n(0,r=!$(s)),y()},()=>{n(1,a=!$(c)),y()},()=>{n(2,l=!m),y()},()=>{var t={userTitleSelected:o,userFirstName:s,userLastName:c,birthDaySelected:d,birthMonthSelected:p,birthYearSelected:g,birthPlace:m,currencySelected:b};window.postMessage({type:"RegisterStepTwo",registerStepTwoData:t},window.location.href)},()=>{var t={userTitleSelected:o,userFirstName:s,userLastName:c,birthDaySelected:d,birthMonthSelected:p,birthYearSelected:g,birthPlace:m,currencySelected:b};window.postMessage({type:"GoBackStepTwo",registerStepTwoData:t},window.location.href)},function(){o=w(this),n(3,o),n(12,i)},function(){s=this.value,n(4,s)},function(){c=this.value,n(5,c)},function(){d=w(this),n(6,d),n(13,u)},function(){p=w(this),n(7,p),n(14,h)},function(){g=w(this),n(8,g),n(15,f)},function(){m=this.value,n(9,m)},function(){b=w(this),n(10,b),n(16,v)}];var B}"function"==typeof HTMLElement&&(o=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(d).filter(p);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){pt(this.$$.on_disconnect)}$destroy(){!function(t){const e=t.$$;null!==e.fragment&&(pt(e.on_destroy),e.fragment&&e.fragment.d(1),e.on_destroy=e.fragment=null,e.ctx=[])}(this),this.$destroy=ht}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class u extends o{constructor(t){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}.GenderContainer,.FirstNameContainer,.LastNameContainer,.BirthDateContainer,.BirthPlaceContainer,.CurrencyContainer{color:#58586B;display:flex;flex-direction:column;padding-bottom:30px;position:relative}.GenderContainer label,.FirstNameContainer label,.LastNameContainer label,.BirthDateContainer label,.BirthPlaceContainer label,.CurrencyContainer label{font-size:14px;font-weight:300;padding-bottom:5px}.GenderContainer select,.FirstNameContainer input,.LastNameContainer input,.BirthDateContainer select,.BirthPlaceContainer input,.CurrencyContainer 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}.FirstNameContainer.InvalidField input,.LastNameContainer.InvalidField input,.BirthPlaceContainer.InvalidField input{border:1px solid #D0046C;background:#FBECF4;color:#D0046C}.BirthDateOptions{display:flex;gap:10px}.BirthDateOptions .BirthDaySelected{width:30%}.BirthDateOptions .BirthMonthSelected{width:30%}.BirthDateOptions .BirthYearSelected{width:40%}.FormRequired{color:#FD2839}.InvalidInput{color:#D0046C;font-size:10px;position:absolute;bottom:-3px;line-height:10px}.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(t){const e={};for(const n of t)e[n.name]=n.value;return e}(this.attributes),customElement:!0},c,s,e,{},[-1,-1]),t&&t.target&&gt(t.target,this,t.anchor)}}return customElements.get("general-player-register-form-step2")||customElements.define("general-player-register-form-step2",u),u});
1696
2
  //# sourceMappingURL=general-player-register-form-step2.js.map