@schukai/monster 4.64.0 → 4.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3298 @@
1
+ /**
2
+ * Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
3
+ * Node module: @schukai/monster
4
+ *
5
+ * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
6
+ * The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
7
+ *
8
+ * For those who do not wish to adhere to the AGPLv3, a commercial license is available.
9
+ * Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
10
+ * For more information about purchasing a commercial license, please contact Volker Schukai.
11
+ *
12
+ * SPDX-License-Identifier: AGPL-3.0
13
+ */
14
+
15
+ import { instanceSymbol } from "../../constants.mjs";
16
+ import { ATTRIBUTE_ERRORMESSAGE } from "../../dom/constants.mjs";
17
+ import {
18
+ assembleMethodSymbol,
19
+ registerCustomElement,
20
+ CustomElement,
21
+ } from "../../dom/customelement.mjs";
22
+ import { addAttributeToken } from "../../dom/attributes.mjs";
23
+ import { fireCustomEvent } from "../../dom/events.mjs";
24
+ import { getLocaleOfDocument } from "../../dom/locale.mjs";
25
+ import { Pathfinder } from "../../data/pathfinder.mjs";
26
+ import { isFunction, isObject, isString } from "../../types/is.mjs";
27
+ import { RegisterWizardStyleSheet } from "./stylesheet/register-wizard.mjs";
28
+
29
+ import "../datatable/datasource/rest.mjs";
30
+ import "./field-set.mjs";
31
+ import "./password.mjs";
32
+ import "./button.mjs";
33
+ import "./message-state-button.mjs";
34
+ import "../navigation/wizard-navigation.mjs";
35
+
36
+ export { RegisterWizard };
37
+
38
+ const wizardElementSymbol = Symbol("wizardElement");
39
+ const panelElementsSymbol = Symbol("panelElements");
40
+ const currentStepSymbol = Symbol("currentStep");
41
+ const availabilityDatasourceSymbol = Symbol("availabilityDatasource");
42
+ const registerDatasourceSymbol = Symbol("registerDatasource");
43
+ const consentsDatasourceSymbol = Symbol("consentsDatasource");
44
+ const availabilityStateSymbol = Symbol("availabilityState");
45
+ const availabilityTimerSymbol = Symbol("availabilityTimer");
46
+ const completedSymbol = Symbol("completed");
47
+ const fieldSetElementsSymbol = Symbol("fieldSetElements");
48
+
49
+ const emailInputSymbol = Symbol("emailInput");
50
+ const passwordInputSymbol = Symbol("passwordInput");
51
+ const passwordConfirmInputSymbol = Symbol("passwordConfirmInput");
52
+ const passwordConfirmLabelSymbol = Symbol("passwordConfirmLabel");
53
+
54
+ const profileInputsSymbol = Symbol("profileInputs");
55
+ const birthDateLabelSymbol = Symbol("birthDateLabel");
56
+ const nationalityLabelSymbol = Symbol("nationalityLabel");
57
+ const addressInputsSymbol = Symbol("addressInputs");
58
+
59
+ const availabilityMessageSymbol = Symbol("availabilityMessage");
60
+ const nextButtonsSymbol = Symbol("nextButtons");
61
+ const backButtonsSymbol = Symbol("backButtons");
62
+ const availabilityNextButtonSymbol = Symbol("availabilityNextButton");
63
+ const submitButtonSymbol = Symbol("submitButton");
64
+
65
+ /**
66
+ * Registration wizard control using wizard navigation and multi-step forms.
67
+ *
68
+ * @since 4.38.0
69
+ * @summary A multi-step registration wizard with availability checks and register submit.
70
+ * @fires monster-register-wizard-step-change
71
+ * @fires monster-register-wizard-availability-check
72
+ * @fires monster-register-wizard-availability-result
73
+ * @fires monster-register-wizard-register
74
+ * @fires monster-register-wizard-success
75
+ * @fires monster-register-wizard-error
76
+ * @fires monster-register-wizard-invalid
77
+ */
78
+ class RegisterWizard extends CustomElement {
79
+ static get [instanceSymbol]() {
80
+ return Symbol.for(
81
+ "@schukai/monster/components/form/register-wizard@@instance",
82
+ );
83
+ }
84
+
85
+ /**
86
+ * To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
87
+ * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
88
+ *
89
+ * @property {Object} templates Template definitions
90
+ * @property {string} templates.main Main template
91
+ * @property {Object} labels Labels
92
+ * @property {Object} features Feature toggles
93
+ * @property {Object} requirements Field requirement flags
94
+ * @property {Object} tenant Tenant configuration
95
+ * @property {Object} availability Availability check config
96
+ * @property {Object} register Register submit config
97
+ * @property {Object} consents Consent topics config
98
+ * @property {Object} actions Callback actions
99
+ */
100
+ get defaults() {
101
+ return Object.assign({}, super.defaults, {
102
+ templates: {
103
+ main: getTemplate(),
104
+ },
105
+ labels: getTranslations(),
106
+ features: {
107
+ autoCheckAvailability: false,
108
+ requireAvailability: true,
109
+ confirmPassword: false,
110
+ showAvailabilityMessage: true,
111
+ showBirthDate: false,
112
+ showNationality: false,
113
+ },
114
+ autocomplete: {
115
+ email: "email",
116
+ password: "new-password",
117
+ passwordConfirm: "new-password",
118
+ firstName: "given-name",
119
+ lastName: "family-name",
120
+ birthDate: "bday",
121
+ nationality: "country-name",
122
+ street: "address-line1",
123
+ zip: "postal-code",
124
+ city: "address-level2",
125
+ country: "country",
126
+ },
127
+ requirements: {
128
+ email: true,
129
+ password: true,
130
+ passwordConfirm: false,
131
+ firstName: true,
132
+ lastName: true,
133
+ birthDate: false,
134
+ nationality: false,
135
+ address: {
136
+ street: true,
137
+ zip: true,
138
+ city: true,
139
+ country: true,
140
+ },
141
+ },
142
+ tenant: {
143
+ id: null,
144
+ },
145
+ availability: {
146
+ url: null,
147
+ fetch: {
148
+ method: "POST",
149
+ headers: {
150
+ Accept: "application/json",
151
+ "Content-Type": "application/json",
152
+ },
153
+ },
154
+ payload: {
155
+ emailPath: "email",
156
+ tenantIdPath: "tenantId",
157
+ },
158
+ mapping: {
159
+ selector: "*",
160
+ availablePath: "available",
161
+ existsPath: "exists",
162
+ messagePath: null,
163
+ },
164
+ },
165
+ register: {
166
+ url: null,
167
+ fetch: {
168
+ method: "POST",
169
+ headers: {
170
+ Accept: "application/json",
171
+ "Content-Type": "application/json",
172
+ },
173
+ },
174
+ payload: {
175
+ tenantIdPath: "tenantId",
176
+ emailPath: "email",
177
+ passwordPath: "password",
178
+ firstNamePath: "person.firstName",
179
+ lastNamePath: "person.lastName",
180
+ birthDatePath: "person.birthDate",
181
+ nationalityPath: "person.nationality",
182
+ streetPath: "person.address.street",
183
+ zipPath: "person.address.zip",
184
+ cityPath: "person.address.city",
185
+ countryPath: "person.address.country",
186
+ consentsPath: "consents",
187
+ },
188
+ mapping: {
189
+ selector: "*",
190
+ },
191
+ },
192
+ consents: {
193
+ url: null,
194
+ fetch: {
195
+ method: "GET",
196
+ headers: {
197
+ Accept: "application/json",
198
+ },
199
+ },
200
+ mapping: {
201
+ selector: "*",
202
+ topicsPath: "topics",
203
+ topicPath: "topic",
204
+ labelPath: "label",
205
+ descriptionPath: "description",
206
+ requiredPath: "required",
207
+ },
208
+ topics: [
209
+ {
210
+ topic: "terms_and_conditions",
211
+ label: "Terms and conditions",
212
+ required: true,
213
+ },
214
+ {
215
+ topic: "privacy",
216
+ label: "Privacy policy",
217
+ required: true,
218
+ },
219
+ {
220
+ topic: "marketing",
221
+ label: "Marketing",
222
+ required: false,
223
+ },
224
+ ],
225
+ grantedValue: "granted",
226
+ revokedValue: "revoked",
227
+ },
228
+ actions: {
229
+ onstepchange: null,
230
+ onavailabilitycheck: null,
231
+ onavailabilityresult: null,
232
+ onregister: null,
233
+ onsuccess: null,
234
+ onerror: null,
235
+ oninvalid: null,
236
+ },
237
+ });
238
+ }
239
+
240
+ static getTag() {
241
+ return "monster-register-wizard";
242
+ }
243
+
244
+ static getCSSStyleSheet() {
245
+ return [RegisterWizardStyleSheet];
246
+ }
247
+
248
+ [assembleMethodSymbol]() {
249
+ super[assembleMethodSymbol]();
250
+ this[currentStepSymbol] = 0;
251
+ this[completedSymbol] = false;
252
+ this[availabilityStateSymbol] = {
253
+ checked: false,
254
+ available: null,
255
+ email: null,
256
+ };
257
+
258
+ initControlReferences.call(this);
259
+ initEventHandler.call(this);
260
+ applyRequirements.call(this);
261
+ applyPasswordConfirmVisibility.call(this);
262
+ applyProfileFeatureVisibility.call(this);
263
+ applyAddressLayout.call(this);
264
+ ensureLabels.call(this);
265
+ applyFieldLabels.call(this);
266
+ updateWizardLabels.call(this);
267
+ updateStepVisibility.call(this);
268
+ loadConsentTopics.call(this);
269
+ goToStep.call(this, 0, true);
270
+ return this;
271
+ }
272
+
273
+ refresh() {
274
+ applyRequirements.call(this);
275
+ applyPasswordConfirmVisibility.call(this);
276
+ applyProfileFeatureVisibility.call(this);
277
+ applyAddressLayout.call(this);
278
+ ensureLabels.call(this);
279
+ applyFieldLabels.call(this);
280
+ updateWizardLabels.call(this);
281
+ updateStepVisibility.call(this);
282
+ loadConsentTopics.call(this);
283
+ return this;
284
+ }
285
+ }
286
+
287
+ function initControlReferences() {
288
+ this[wizardElementSymbol] = this.shadowRoot.querySelector(
289
+ "monster-wizard-navigation",
290
+ );
291
+ this[panelElementsSymbol] = {
292
+ email: this.shadowRoot.querySelector('[data-step="email"]'),
293
+ password: this.shadowRoot.querySelector('[data-step="password"]'),
294
+ profile: this.shadowRoot.querySelector('[data-step="profile"]'),
295
+ address: this.shadowRoot.querySelector('[data-step="address"]'),
296
+ consents: this.shadowRoot.querySelector('[data-step="consents"]'),
297
+ };
298
+ this[fieldSetElementsSymbol] = {
299
+ email: this.shadowRoot.querySelector(
300
+ '[data-monster-role="field-set-email"]',
301
+ ),
302
+ password: this.shadowRoot.querySelector(
303
+ '[data-monster-role="field-set-password"]',
304
+ ),
305
+ profile: this.shadowRoot.querySelector(
306
+ '[data-monster-role="field-set-profile"]',
307
+ ),
308
+ address: this.shadowRoot.querySelector(
309
+ '[data-monster-role="field-set-address"]',
310
+ ),
311
+ consents: this.shadowRoot.querySelector(
312
+ '[data-monster-role="field-set-consents"]',
313
+ ),
314
+ };
315
+
316
+ this[emailInputSymbol] = this.shadowRoot.querySelector(
317
+ '[data-monster-role="email-input"]',
318
+ );
319
+ this[passwordInputSymbol] = this.shadowRoot.querySelector(
320
+ '[data-monster-role="password-input"]',
321
+ );
322
+ this[passwordConfirmInputSymbol] = this.shadowRoot.querySelector(
323
+ '[data-monster-role="password-confirm-input"]',
324
+ );
325
+ this[passwordConfirmLabelSymbol] = this.shadowRoot.querySelector(
326
+ '[data-monster-role~="password-confirm-label"]',
327
+ );
328
+
329
+ this[profileInputsSymbol] = {
330
+ firstName: this.shadowRoot.querySelector(
331
+ '[data-monster-role="first-name-input"]',
332
+ ),
333
+ lastName: this.shadowRoot.querySelector(
334
+ '[data-monster-role="last-name-input"]',
335
+ ),
336
+ birthDate: this.shadowRoot.querySelector(
337
+ '[data-monster-role="birth-date-input"]',
338
+ ),
339
+ nationality: this.shadowRoot.querySelector(
340
+ '[data-monster-role="nationality-input"]',
341
+ ),
342
+ };
343
+ this[birthDateLabelSymbol] = this.shadowRoot.querySelector(
344
+ '[data-monster-role~="birth-date-label"]',
345
+ );
346
+ this[nationalityLabelSymbol] = this.shadowRoot.querySelector(
347
+ '[data-monster-role~="nationality-label"]',
348
+ );
349
+
350
+ this[addressInputsSymbol] = {
351
+ street: this.shadowRoot.querySelector('[data-monster-role="street-input"]'),
352
+ zip: this.shadowRoot.querySelector('[data-monster-role="zip-input"]'),
353
+ city: this.shadowRoot.querySelector('[data-monster-role="city-input"]'),
354
+ country: this.shadowRoot.querySelector(
355
+ '[data-monster-role="country-input"]',
356
+ ),
357
+ };
358
+
359
+ this[availabilityMessageSymbol] = this.shadowRoot.querySelector(
360
+ '[data-monster-role="availability-message"]',
361
+ );
362
+
363
+ this[nextButtonsSymbol] = Array.from(
364
+ this.shadowRoot.querySelectorAll('[data-monster-role="next-button"]'),
365
+ );
366
+ this[backButtonsSymbol] = Array.from(
367
+ this.shadowRoot.querySelectorAll('[data-monster-role="back-button"]'),
368
+ );
369
+ this[availabilityNextButtonSymbol] = this.shadowRoot.querySelector(
370
+ '[data-step="email"] [data-monster-role="next-button"]',
371
+ );
372
+ this[submitButtonSymbol] = this.shadowRoot.querySelector(
373
+ '[data-monster-role="submit-button"]',
374
+ );
375
+
376
+ this[availabilityDatasourceSymbol] = this.shadowRoot.querySelector(
377
+ '[data-monster-role="availability-datasource"]',
378
+ );
379
+ this[registerDatasourceSymbol] = this.shadowRoot.querySelector(
380
+ '[data-monster-role="register-datasource"]',
381
+ );
382
+ this[consentsDatasourceSymbol] = this.shadowRoot.querySelector(
383
+ '[data-monster-role="consents-datasource"]',
384
+ );
385
+ }
386
+
387
+ function initEventHandler() {
388
+ const wizard = this[wizardElementSymbol];
389
+ if (wizard) {
390
+ wizard.setOption("actions.beforeStepChange", (fromIndex, toIndex) => {
391
+ return handleStepChangeRequest.call(this, fromIndex, toIndex);
392
+ });
393
+ wizard.addEventListener("monster-wizard-step-changed", (event) => {
394
+ const mainIndex = event?.detail?.newIndex ?? 0;
395
+ const stepIndex = mapWizardStepToIndex(mainIndex);
396
+ if (stepIndex !== null && stepIndex !== this[currentStepSymbol]) {
397
+ goToStep.call(this, stepIndex);
398
+ }
399
+ });
400
+ wizard.addEventListener("monster-wizard-substep-changed", (event) => {
401
+ const mainIndex = event?.detail?.mainIndex ?? 0;
402
+ const subIndex = event?.detail?.subIndex ?? 0;
403
+ const stepIndex = mapWizardSubStepToIndex(mainIndex, subIndex);
404
+ if (stepIndex !== null && stepIndex !== this[currentStepSymbol]) {
405
+ goToStep.call(this, stepIndex);
406
+ }
407
+ });
408
+ }
409
+
410
+ if (this[emailInputSymbol]) {
411
+ this[emailInputSymbol].addEventListener("input", () => {
412
+ resetAvailabilityState.call(this);
413
+ if (this.getOption("features.autoCheckAvailability") === true) {
414
+ debounceAvailabilityCheck.call(this);
415
+ }
416
+ });
417
+ }
418
+
419
+ this[nextButtonsSymbol].forEach((button) => {
420
+ button.setOption("actions.click", () => {
421
+ handleNextClick.call(this);
422
+ });
423
+ });
424
+ this[backButtonsSymbol].forEach((button) => {
425
+ button.setOption("actions.click", () => {
426
+ handleBackClick.call(this);
427
+ });
428
+ });
429
+ if (this[submitButtonSymbol]) {
430
+ this[submitButtonSymbol].setOption("actions.click", () => {
431
+ handleSubmit.call(this);
432
+ });
433
+ }
434
+ }
435
+
436
+ function updateWizardLabels() {
437
+ const wizard = this[wizardElementSymbol];
438
+ if (!wizard) {
439
+ return;
440
+ }
441
+ const list = wizard.querySelector("ol.wizard-steps");
442
+ if (!list) {
443
+ return;
444
+ }
445
+ const labels = this.getOption("labels");
446
+ const items = list.querySelectorAll("li.step");
447
+ const entries = [
448
+ {
449
+ main: labels.stepAccount,
450
+ subs: [labels.subEmail, labels.subPassword],
451
+ },
452
+ {
453
+ main: labels.stepProfileGroup,
454
+ subs: [labels.subProfile, labels.subAddress],
455
+ },
456
+ {
457
+ main: labels.stepConsentsGroup,
458
+ subs: [labels.subConsents],
459
+ },
460
+ ];
461
+ items.forEach((item, index) => {
462
+ const entry = entries[index];
463
+ if (!entry) {
464
+ return;
465
+ }
466
+ const label = item.querySelector('[data-monster-role="step-label"]');
467
+ if (label && entry.main) {
468
+ label.textContent = entry.main;
469
+ }
470
+ const subItems = item.querySelectorAll("ul li");
471
+ subItems.forEach((subItem, subIndex) => {
472
+ const subLabel = entry.subs?.[subIndex];
473
+ if (subLabel) {
474
+ subItem.textContent = subLabel;
475
+ }
476
+ });
477
+ });
478
+ }
479
+
480
+ function updateStepVisibility() {
481
+ if (this[completedSymbol]) {
482
+ Object.values(this[panelElementsSymbol] || {}).forEach((panel) => {
483
+ if (panel) {
484
+ panel.hidden = true;
485
+ panel.classList.remove("is-active");
486
+ }
487
+ });
488
+ const successPanel = this.shadowRoot.querySelector('[data-step="success"]');
489
+ if (successPanel) {
490
+ successPanel.hidden = false;
491
+ successPanel.classList.add("is-active");
492
+ }
493
+ return;
494
+ }
495
+ const steps = getStepOrder();
496
+ steps.forEach((stepId, index) => {
497
+ const panel = this[panelElementsSymbol]?.[stepId];
498
+ if (!panel) {
499
+ return;
500
+ }
501
+ panel.hidden = index !== this[currentStepSymbol];
502
+ panel.classList.toggle("is-active", index === this[currentStepSymbol]);
503
+ });
504
+ }
505
+
506
+ function handleBackClick() {
507
+ const nextIndex = Math.max(0, this[currentStepSymbol] - 1);
508
+ goToStep.call(this, nextIndex);
509
+ }
510
+
511
+ function handleNextClick() {
512
+ if (this[currentStepSymbol] === 0) {
513
+ handleAvailabilityAndNext.call(this);
514
+ return;
515
+ }
516
+ const canProceed = validateStep.call(this, this[currentStepSymbol]);
517
+ if (!canProceed) {
518
+ fireInvalid.call(this, this[currentStepSymbol]);
519
+ return;
520
+ }
521
+ goToStep.call(this, this[currentStepSymbol] + 1);
522
+ }
523
+
524
+ function handleStepChangeRequest(fromIndex, toIndex) {
525
+ if (this[completedSymbol]) {
526
+ return false;
527
+ }
528
+ const currentStepIndex = this[currentStepSymbol];
529
+ const mapping = mapStepToWizardIndices(currentStepIndex);
530
+ const currentMain = mapping ? mapping.main : currentStepIndex;
531
+ if (toIndex <= currentMain) {
532
+ return true;
533
+ }
534
+ const canProceed = validateStep.call(this, currentStepIndex);
535
+ if (!canProceed) {
536
+ fireInvalid.call(this, currentStepIndex);
537
+ return false;
538
+ }
539
+ if (
540
+ currentStepIndex === 0 &&
541
+ this.getOption("features.requireAvailability") === true
542
+ ) {
543
+ const state = this[availabilityStateSymbol];
544
+ if (!state?.checked || state?.available !== true) {
545
+ setInlineMessage.call(
546
+ this,
547
+ this.getOption("labels.messageAvailabilityRequired"),
548
+ );
549
+ fireInvalid.call(this, currentStepIndex);
550
+ return false;
551
+ }
552
+ }
553
+ return true;
554
+ }
555
+
556
+ function goToStep(index, force = false) {
557
+ if (this[completedSymbol]) {
558
+ return;
559
+ }
560
+ const steps = getStepOrder();
561
+ const bounded = Math.min(Math.max(index, 0), steps.length - 1);
562
+ this[currentStepSymbol] = bounded;
563
+ updateStepVisibility.call(this);
564
+
565
+ const wizard = this[wizardElementSymbol];
566
+ if (wizard) {
567
+ const mapping = mapStepToWizardIndices(bounded);
568
+ if (mapping) {
569
+ wizard.activate(mapping.main, mapping.sub, { force });
570
+ } else {
571
+ wizard.goToStep(bounded, { force });
572
+ }
573
+ }
574
+
575
+ fireCustomEvent(this, "monster-register-wizard-step-change", {
576
+ index: bounded,
577
+ step: steps[bounded],
578
+ });
579
+ const action = this.getOption("actions.onstepchange");
580
+ if (isFunction(action)) {
581
+ action.call(this, bounded, steps[bounded]);
582
+ }
583
+ }
584
+
585
+ function validateStep(index) {
586
+ clearInlineMessage.call(this);
587
+ const steps = getStepOrder();
588
+ const stepId = steps[index];
589
+ if (!stepId) {
590
+ return true;
591
+ }
592
+
593
+ if (stepId === "email") {
594
+ return validateEmailStep.call(this);
595
+ }
596
+ if (stepId === "password") {
597
+ return validatePasswordStep.call(this);
598
+ }
599
+ if (stepId === "profile") {
600
+ return validateProfileStep.call(this);
601
+ }
602
+ if (stepId === "address") {
603
+ return validateAddressStep.call(this);
604
+ }
605
+ if (stepId === "consents") {
606
+ return validateConsentsStep.call(this);
607
+ }
608
+ return true;
609
+ }
610
+
611
+ function validateEmailStep() {
612
+ const input = this[emailInputSymbol];
613
+ if (!input) {
614
+ return false;
615
+ }
616
+ if (this.getOption("requirements.email") === false) {
617
+ return true;
618
+ }
619
+ const value = getValue(input).trim();
620
+ if (value === "") {
621
+ setInlineMessage.call(this, this.getOption("labels.messageRequiredEmail"));
622
+ return false;
623
+ }
624
+ if (!isValidEmail(value)) {
625
+ setInlineMessage.call(this, this.getOption("labels.messageInvalidEmail"));
626
+ return false;
627
+ }
628
+ return true;
629
+ }
630
+
631
+ function validatePasswordStep() {
632
+ const password = this[passwordInputSymbol];
633
+ const confirm = this[passwordConfirmInputSymbol];
634
+ let valid = true;
635
+ if (this.getOption("requirements.password") !== false) {
636
+ const pwdValue = getValue(password);
637
+ if (!pwdValue) {
638
+ setInlineMessage.call(
639
+ this,
640
+ this.getOption("labels.messageRequiredPassword"),
641
+ );
642
+ valid = false;
643
+ }
644
+ }
645
+ if (!valid) {
646
+ return false;
647
+ }
648
+ if (
649
+ this.getOption("features.confirmPassword") === true &&
650
+ this.getOption("requirements.passwordConfirm") !== false
651
+ ) {
652
+ const pwdValue = getValue(password);
653
+ if (confirm) {
654
+ const confirmValue = getValue(confirm);
655
+ if (!confirmValue) {
656
+ setInlineMessage.call(
657
+ this,
658
+ this.getOption("labels.messageRequiredPasswordConfirm"),
659
+ );
660
+ return false;
661
+ }
662
+ if (pwdValue !== confirmValue) {
663
+ setInlineMessage.call(
664
+ this,
665
+ this.getOption("labels.messagePasswordMismatch"),
666
+ );
667
+ valid = false;
668
+ }
669
+ }
670
+ }
671
+ return valid;
672
+ }
673
+
674
+ function validateProfileStep() {
675
+ const inputs = this[profileInputsSymbol] || {};
676
+ let valid = true;
677
+ if (this.getOption("requirements.firstName") !== false && inputs.firstName) {
678
+ valid = isFilled(inputs.firstName);
679
+ }
680
+ if (
681
+ valid &&
682
+ this.getOption("requirements.lastName") !== false &&
683
+ inputs.lastName
684
+ ) {
685
+ valid = isFilled(inputs.lastName);
686
+ }
687
+ if (
688
+ valid &&
689
+ this.getOption("requirements.birthDate") !== false &&
690
+ this.getOption("features.showBirthDate") === true &&
691
+ inputs.birthDate
692
+ ) {
693
+ valid = isFilled(inputs.birthDate);
694
+ }
695
+ if (
696
+ valid &&
697
+ this.getOption("requirements.nationality") !== false &&
698
+ this.getOption("features.showNationality") === true &&
699
+ inputs.nationality
700
+ ) {
701
+ valid = isFilled(inputs.nationality);
702
+ }
703
+ if (!valid) {
704
+ setInlineMessage.call(this, this.getOption("labels.messageRequiredField"));
705
+ }
706
+ return valid;
707
+ }
708
+
709
+ function validateAddressStep() {
710
+ const inputs = this[addressInputsSymbol] || {};
711
+ const req = this.getOption("requirements.address") || {};
712
+ let valid = true;
713
+ if (req.street !== false && inputs.street) {
714
+ valid = isFilled(inputs.street);
715
+ }
716
+ if (valid && req.zip !== false && inputs.zip) {
717
+ valid = isFilled(inputs.zip);
718
+ }
719
+ if (valid && req.city !== false && inputs.city) {
720
+ valid = isFilled(inputs.city);
721
+ }
722
+ if (valid && req.country !== false && inputs.country) {
723
+ valid = isFilled(inputs.country);
724
+ }
725
+ if (!valid) {
726
+ setInlineMessage.call(this, this.getOption("labels.messageRequiredField"));
727
+ }
728
+ return valid;
729
+ }
730
+
731
+ function validateConsentsStep() {
732
+ const container = this.shadowRoot.querySelector(
733
+ '[data-monster-role="consents-list"]',
734
+ );
735
+ if (!container) {
736
+ return true;
737
+ }
738
+ const required = container.querySelectorAll(
739
+ 'input[type="checkbox"][data-required="true"]',
740
+ );
741
+ for (const checkbox of required) {
742
+ if (!checkbox.checked) {
743
+ setInlineMessage.call(
744
+ this,
745
+ this.getOption("labels.messageRequiredConsents"),
746
+ );
747
+ return false;
748
+ }
749
+ }
750
+ return true;
751
+ }
752
+
753
+ function handleAvailabilityAndNext() {
754
+ const valid = validateEmailStep.call(this);
755
+ if (!valid) {
756
+ fireInvalid.call(this, 0);
757
+ return;
758
+ }
759
+ const url = this.getOption("availability.url");
760
+ const requireAvailability = this.getOption("features.requireAvailability");
761
+ if ((!isString(url) || url === "") && requireAvailability === false) {
762
+ goToStep.call(this, 1);
763
+ return;
764
+ }
765
+ checkAvailability.call(this).then((available) => {
766
+ if (available) {
767
+ goToStep.call(this, 1);
768
+ }
769
+ });
770
+ }
771
+
772
+ function resetAvailabilityState() {
773
+ this[availabilityStateSymbol] = {
774
+ checked: false,
775
+ available: null,
776
+ email: getValue(this[emailInputSymbol]) || null,
777
+ };
778
+ setAvailabilityMessage.call(this, "");
779
+ }
780
+
781
+ function debounceAvailabilityCheck() {
782
+ if (this[availabilityTimerSymbol]) {
783
+ clearTimeout(this[availabilityTimerSymbol]);
784
+ }
785
+ this[availabilityTimerSymbol] = setTimeout(() => {
786
+ const email = getValue(this[emailInputSymbol]) || "";
787
+ if (!isValidEmail(email)) {
788
+ resetAvailabilityState.call(this);
789
+ return;
790
+ }
791
+ checkAvailability.call(this);
792
+ }, 450);
793
+ }
794
+
795
+ async function checkAvailability() {
796
+ const url = this.getOption("availability.url");
797
+ const email = getValue(this[emailInputSymbol]) || "";
798
+ const requireAvailability = this.getOption("features.requireAvailability");
799
+
800
+ if (!isValidEmail(email)) {
801
+ resetAvailabilityState.call(this);
802
+ return false;
803
+ }
804
+
805
+ if (!isString(url) || url === "") {
806
+ if (requireAvailability) {
807
+ handleMessageButtonError.call(
808
+ this,
809
+ this[availabilityNextButtonSymbol],
810
+ this.getOption("labels.messageAvailabilityNotConfigured"),
811
+ );
812
+ }
813
+ return false;
814
+ }
815
+
816
+ const payload = buildAvailabilityPayload.call(this, email);
817
+ const action = this.getOption("actions.onavailabilitycheck");
818
+ fireCustomEvent(this, "monster-register-wizard-availability-check", {
819
+ email,
820
+ payload,
821
+ });
822
+ if (isFunction(action)) {
823
+ action.call(this, email, payload);
824
+ }
825
+
826
+ try {
827
+ setAvailabilityMessage.call(this, this.getOption("labels.messageChecking"));
828
+ setButtonState.call(this, this[availabilityNextButtonSymbol], "activity");
829
+ const { data } = await writeWithDatasource.call(
830
+ this,
831
+ this[availabilityDatasourceSymbol],
832
+ {
833
+ url,
834
+ fetch: this.getOption("availability.fetch"),
835
+ },
836
+ payload,
837
+ );
838
+
839
+ const result = parseAvailabilityResponse.call(this, data);
840
+ this[availabilityStateSymbol] = {
841
+ checked: true,
842
+ available: result.available,
843
+ email,
844
+ };
845
+
846
+ fireCustomEvent(
847
+ this,
848
+ "monster-register-wizard-availability-result",
849
+ result,
850
+ );
851
+ const resultAction = this.getOption("actions.onavailabilityresult");
852
+ if (isFunction(resultAction)) {
853
+ resultAction.call(this, result);
854
+ }
855
+
856
+ if (result.available) {
857
+ setAvailabilityMessage.call(
858
+ this,
859
+ this.getOption("labels.messageEmailAvailable"),
860
+ );
861
+ setButtonState.call(
862
+ this,
863
+ this[availabilityNextButtonSymbol],
864
+ "successful",
865
+ 900,
866
+ );
867
+ return true;
868
+ }
869
+ setAvailabilityMessage.call(
870
+ this,
871
+ this.getOption("labels.messageEmailUnavailable"),
872
+ );
873
+ handleMessageButtonError.call(
874
+ this,
875
+ this[availabilityNextButtonSymbol],
876
+ this.getOption("labels.messageEmailUnavailable"),
877
+ );
878
+ return false;
879
+ } catch (e) {
880
+ const msg =
881
+ extractAvailabilityMessage.call(this, e) ||
882
+ this.getOption("labels.messageAvailabilityFailed");
883
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, `${e}`);
884
+ setAvailabilityMessage.call(this, msg);
885
+ handleMessageButtonError.call(
886
+ this,
887
+ this[availabilityNextButtonSymbol],
888
+ msg,
889
+ );
890
+ return false;
891
+ }
892
+ }
893
+
894
+ function parseAvailabilityResponse(data) {
895
+ const mapping = this.getOption("availability.mapping") || {};
896
+ const selector = mapping.selector || "*";
897
+ let source = data;
898
+ if (selector && selector !== "*") {
899
+ try {
900
+ source = new Pathfinder(data).getVia(selector);
901
+ } catch (_e) {
902
+ source = data;
903
+ }
904
+ }
905
+ const available = getPathValue(source, mapping.availablePath);
906
+ const exists = getPathValue(source, mapping.existsPath);
907
+ let resolved = available;
908
+ if (resolved === null || resolved === undefined) {
909
+ if (exists !== null && exists !== undefined) {
910
+ resolved = !Boolean(exists);
911
+ }
912
+ }
913
+ return {
914
+ available: Boolean(resolved),
915
+ exists: exists === null || exists === undefined ? null : Boolean(exists),
916
+ data: source,
917
+ };
918
+ }
919
+
920
+ function handleSubmit() {
921
+ const steps = getStepOrder();
922
+ for (let i = 0; i < steps.length; i += 1) {
923
+ if (!validateStep.call(this, i)) {
924
+ fireInvalid.call(this, i);
925
+ goToStep.call(this, i);
926
+ return;
927
+ }
928
+ }
929
+ const payload = buildRegisterPayload.call(this);
930
+ const url = this.getOption("register.url");
931
+ if (!isString(url) || url === "") {
932
+ handleMessageButtonError.call(
933
+ this,
934
+ this[submitButtonSymbol],
935
+ this.getOption("labels.messageRegisterNotConfigured"),
936
+ );
937
+ return;
938
+ }
939
+
940
+ fireCustomEvent(this, "monster-register-wizard-register", { payload });
941
+ const action = this.getOption("actions.onregister");
942
+ if (isFunction(action)) {
943
+ action.call(this, payload);
944
+ }
945
+
946
+ setButtonState.call(this, this[submitButtonSymbol], "activity");
947
+ writeWithDatasource
948
+ .call(
949
+ this,
950
+ this[registerDatasourceSymbol],
951
+ {
952
+ url,
953
+ fetch: this.getOption("register.fetch"),
954
+ },
955
+ payload,
956
+ )
957
+ .then(({ data }) => {
958
+ setButtonState.call(this, this[submitButtonSymbol], "successful", 1500);
959
+ const wizard = this[wizardElementSymbol];
960
+ if (wizard) {
961
+ wizard.completeAll();
962
+ }
963
+ this[completedSymbol] = true;
964
+ updateStepVisibility.call(this);
965
+ fireCustomEvent(this, "monster-register-wizard-success", { data });
966
+ const success = this.getOption("actions.onsuccess");
967
+ if (isFunction(success)) {
968
+ success.call(this, data);
969
+ }
970
+ })
971
+ .catch((e) => {
972
+ const msg =
973
+ extractRegisterMessage.call(this, e) ||
974
+ this.getOption("labels.messageRegisterFailed");
975
+ handleMessageButtonError.call(this, this[submitButtonSymbol], msg);
976
+ fireCustomEvent(this, "monster-register-wizard-error", { error: e });
977
+ const errorAction = this.getOption("actions.onerror");
978
+ if (isFunction(errorAction)) {
979
+ errorAction.call(this, e);
980
+ }
981
+ });
982
+ }
983
+
984
+ function buildAvailabilityPayload(email) {
985
+ const payload = {};
986
+ const mapping = this.getOption("availability.payload") || {};
987
+ const tenantId = this.getOption("tenant.id");
988
+ setPathValue(payload, mapping.emailPath || "email", email);
989
+ if (tenantId) {
990
+ setPathValue(payload, mapping.tenantIdPath || "tenantId", tenantId);
991
+ }
992
+ return payload;
993
+ }
994
+
995
+ function buildRegisterPayload() {
996
+ const payload = {};
997
+ const mapping = this.getOption("register.payload") || {};
998
+ const data = collectFormData.call(this);
999
+
1000
+ setPathValue(payload, mapping.tenantIdPath || "tenantId", data.tenantId);
1001
+ setPathValue(payload, mapping.emailPath || "email", data.email);
1002
+ setPathValue(payload, mapping.passwordPath || "password", data.password);
1003
+ if (data.displayName) {
1004
+ setPathValue(
1005
+ payload,
1006
+ mapping.displayNamePath || "displayName",
1007
+ data.displayName,
1008
+ );
1009
+ }
1010
+ setPathValue(
1011
+ payload,
1012
+ mapping.firstNamePath || "person.firstName",
1013
+ data.firstName,
1014
+ );
1015
+ setPathValue(
1016
+ payload,
1017
+ mapping.lastNamePath || "person.lastName",
1018
+ data.lastName,
1019
+ );
1020
+ if (data.birthDate) {
1021
+ setPathValue(
1022
+ payload,
1023
+ mapping.birthDatePath || "person.birthDate",
1024
+ data.birthDate,
1025
+ );
1026
+ }
1027
+ if (data.nationality) {
1028
+ setPathValue(
1029
+ payload,
1030
+ mapping.nationalityPath || "person.nationality",
1031
+ data.nationality,
1032
+ );
1033
+ }
1034
+ setPathValue(
1035
+ payload,
1036
+ mapping.streetPath || "person.address.street",
1037
+ data.street,
1038
+ );
1039
+ setPathValue(payload, mapping.zipPath || "person.address.zip", data.zip);
1040
+ setPathValue(payload, mapping.cityPath || "person.address.city", data.city);
1041
+ setPathValue(
1042
+ payload,
1043
+ mapping.countryPath || "person.address.country",
1044
+ data.country,
1045
+ );
1046
+ setPathValue(payload, mapping.consentsPath || "consents", data.consents);
1047
+
1048
+ return payload;
1049
+ }
1050
+
1051
+ function collectFormData() {
1052
+ const tenantId = this.getOption("tenant.id");
1053
+ const email = getValue(this[emailInputSymbol]) || "";
1054
+ const password = getValue(this[passwordInputSymbol]) || "";
1055
+ const firstName = getValue(this[profileInputsSymbol]?.firstName) || "";
1056
+ const lastName = getValue(this[profileInputsSymbol]?.lastName) || "";
1057
+ const birthDate =
1058
+ this.getOption("features.showBirthDate") === true
1059
+ ? getValue(this[profileInputsSymbol]?.birthDate) || null
1060
+ : null;
1061
+ const nationality =
1062
+ this.getOption("features.showNationality") === true
1063
+ ? getValue(this[profileInputsSymbol]?.nationality) || null
1064
+ : null;
1065
+ const street = getValue(this[addressInputsSymbol]?.street) || "";
1066
+ const zip = getValue(this[addressInputsSymbol]?.zip) || "";
1067
+ const city = getValue(this[addressInputsSymbol]?.city) || "";
1068
+ const country = getValue(this[addressInputsSymbol]?.country) || "";
1069
+
1070
+ const displayName = [firstName, lastName].filter(Boolean).join(" ").trim();
1071
+
1072
+ return {
1073
+ tenantId,
1074
+ email,
1075
+ password,
1076
+ displayName,
1077
+ firstName,
1078
+ lastName,
1079
+ birthDate,
1080
+ nationality,
1081
+ street,
1082
+ zip,
1083
+ city,
1084
+ country,
1085
+ consents: collectConsents.call(this),
1086
+ };
1087
+ }
1088
+
1089
+ function collectConsents() {
1090
+ const container = this.shadowRoot.querySelector(
1091
+ '[data-monster-role="consents-list"]',
1092
+ );
1093
+ if (!container) {
1094
+ return [];
1095
+ }
1096
+ const grantedValue = this.getOption("consents.grantedValue");
1097
+ const revokedValue = this.getOption("consents.revokedValue");
1098
+ const items = [];
1099
+ container.querySelectorAll('input[type="checkbox"]').forEach((checkbox) => {
1100
+ const topic = checkbox.getAttribute("data-topic");
1101
+ if (!topic) {
1102
+ return;
1103
+ }
1104
+ items.push({
1105
+ topic,
1106
+ status: checkbox.checked ? grantedValue : revokedValue,
1107
+ });
1108
+ });
1109
+ return items;
1110
+ }
1111
+
1112
+ function applyRequirements() {
1113
+ applyRequiredFlag.call(
1114
+ this,
1115
+ this[emailInputSymbol],
1116
+ this.getOption("requirements.email"),
1117
+ );
1118
+ applyRequiredFlag.call(
1119
+ this,
1120
+ this[passwordInputSymbol],
1121
+ this.getOption("requirements.password"),
1122
+ );
1123
+ applyRequiredFlag.call(
1124
+ this,
1125
+ this[passwordConfirmInputSymbol],
1126
+ this.getOption("requirements.passwordConfirm"),
1127
+ );
1128
+
1129
+ const profile = this[profileInputsSymbol] || {};
1130
+ applyRequiredFlag.call(
1131
+ this,
1132
+ profile.firstName,
1133
+ this.getOption("requirements.firstName"),
1134
+ );
1135
+ applyRequiredFlag.call(
1136
+ this,
1137
+ profile.lastName,
1138
+ this.getOption("requirements.lastName"),
1139
+ );
1140
+ applyRequiredFlag.call(
1141
+ this,
1142
+ profile.birthDate,
1143
+ this.getOption("features.showBirthDate") === true
1144
+ ? this.getOption("requirements.birthDate")
1145
+ : false,
1146
+ );
1147
+ applyRequiredFlag.call(
1148
+ this,
1149
+ profile.nationality,
1150
+ this.getOption("features.showNationality") === true
1151
+ ? this.getOption("requirements.nationality")
1152
+ : false,
1153
+ );
1154
+
1155
+ const address = this[addressInputsSymbol] || {};
1156
+ const addr = this.getOption("requirements.address") || {};
1157
+ applyRequiredFlag.call(this, address.street, addr.street);
1158
+ applyRequiredFlag.call(this, address.zip, addr.zip);
1159
+ applyRequiredFlag.call(this, address.city, addr.city);
1160
+ applyRequiredFlag.call(this, address.country, addr.country);
1161
+ }
1162
+
1163
+ function applyPasswordConfirmVisibility() {
1164
+ const enabled = this.getOption("features.confirmPassword") !== false;
1165
+ if (this[passwordConfirmInputSymbol]) {
1166
+ this[passwordConfirmInputSymbol].hidden = !enabled;
1167
+ this[passwordConfirmInputSymbol].setAttribute(
1168
+ "aria-hidden",
1169
+ enabled ? "false" : "true",
1170
+ );
1171
+ }
1172
+ if (this[passwordConfirmLabelSymbol]) {
1173
+ this[passwordConfirmLabelSymbol].hidden = !enabled;
1174
+ this[passwordConfirmLabelSymbol].setAttribute(
1175
+ "aria-hidden",
1176
+ enabled ? "false" : "true",
1177
+ );
1178
+ }
1179
+ }
1180
+
1181
+ function applyProfileFeatureVisibility() {
1182
+ const showBirthDate = this.getOption("features.showBirthDate") === true;
1183
+ const showNationality = this.getOption("features.showNationality") === true;
1184
+ const birthDateInput = this[profileInputsSymbol]?.birthDate;
1185
+ const nationalityInput = this[profileInputsSymbol]?.nationality;
1186
+ if (birthDateInput) {
1187
+ birthDateInput.hidden = !showBirthDate;
1188
+ birthDateInput.setAttribute(
1189
+ "aria-hidden",
1190
+ showBirthDate ? "false" : "true",
1191
+ );
1192
+ }
1193
+ if (this[birthDateLabelSymbol]) {
1194
+ this[birthDateLabelSymbol].hidden = !showBirthDate;
1195
+ this[birthDateLabelSymbol].setAttribute(
1196
+ "aria-hidden",
1197
+ showBirthDate ? "false" : "true",
1198
+ );
1199
+ }
1200
+ if (nationalityInput) {
1201
+ nationalityInput.hidden = !showNationality;
1202
+ nationalityInput.setAttribute(
1203
+ "aria-hidden",
1204
+ showNationality ? "false" : "true",
1205
+ );
1206
+ }
1207
+ if (this[nationalityLabelSymbol]) {
1208
+ this[nationalityLabelSymbol].hidden = !showNationality;
1209
+ this[nationalityLabelSymbol].setAttribute(
1210
+ "aria-hidden",
1211
+ showNationality ? "false" : "true",
1212
+ );
1213
+ }
1214
+ }
1215
+
1216
+ function applyAddressLayout() {
1217
+ const fieldSet = this[fieldSetElementsSymbol]?.address;
1218
+ if (!fieldSet || typeof fieldSet.setOption !== "function") {
1219
+ return;
1220
+ }
1221
+ fieldSet.setOption("features.multipleColumns", true);
1222
+ }
1223
+
1224
+ function applyRequiredFlag(element, required) {
1225
+ if (!element) {
1226
+ return;
1227
+ }
1228
+ if (typeof element.setOption === "function") {
1229
+ element.setOption("required", false);
1230
+ }
1231
+ if (required === false) {
1232
+ element.removeAttribute("required");
1233
+ element.setAttribute("aria-required", "false");
1234
+ return;
1235
+ }
1236
+ element.setAttribute("aria-required", "true");
1237
+ }
1238
+
1239
+ function ensureLabels() {
1240
+ const current = this.getOption("labels");
1241
+ const fallback = getTranslations();
1242
+ if (!isObject(current)) {
1243
+ this.setOption("labels", fallback);
1244
+ return;
1245
+ }
1246
+ const merged = Object.assign({}, fallback, current);
1247
+ this.setOption("labels", merged);
1248
+ }
1249
+
1250
+ function applyFieldLabels() {
1251
+ const labels = this.getOption("labels") || {};
1252
+ setFieldSetTitle.call(this, "email", labels.stepEmail);
1253
+ setFieldSetTitle.call(this, "password", labels.stepPassword);
1254
+ setFieldSetTitle.call(this, "profile", labels.stepProfile);
1255
+ setFieldSetTitle.call(this, "address", labels.stepAddress);
1256
+ setFieldSetTitle.call(this, "consents", labels.stepConsents);
1257
+ setLabelText.call(this, '[data-monster-role~="email-label"]', labels.email);
1258
+ setLabelText.call(
1259
+ this,
1260
+ '[data-monster-role~="password-label"]',
1261
+ labels.password,
1262
+ );
1263
+ setLabelText.call(
1264
+ this,
1265
+ '[data-monster-role~="password-confirm-label"]',
1266
+ labels.passwordConfirm,
1267
+ );
1268
+ setLabelText.call(
1269
+ this,
1270
+ '[data-monster-role~="first-name-label"]',
1271
+ labels.firstName,
1272
+ );
1273
+ setLabelText.call(
1274
+ this,
1275
+ '[data-monster-role~="last-name-label"]',
1276
+ labels.lastName,
1277
+ );
1278
+ setLabelText.call(
1279
+ this,
1280
+ '[data-monster-role~="birth-date-label"]',
1281
+ labels.birthDate,
1282
+ );
1283
+ setLabelText.call(
1284
+ this,
1285
+ '[data-monster-role~="nationality-label"]',
1286
+ labels.nationality,
1287
+ );
1288
+ setLabelText.call(this, '[data-monster-role~="street-label"]', labels.street);
1289
+ setLabelText.call(this, '[data-monster-role~="zip-label"]', labels.zip);
1290
+ setLabelText.call(this, '[data-monster-role~="city-label"]', labels.city);
1291
+ setLabelText.call(
1292
+ this,
1293
+ '[data-monster-role~="country-label"]',
1294
+ labels.country,
1295
+ );
1296
+
1297
+ setInputMeta.call(
1298
+ this,
1299
+ this[emailInputSymbol],
1300
+ labels.emailPlaceholder,
1301
+ labels.emailAria,
1302
+ );
1303
+ setInputMeta.call(
1304
+ this,
1305
+ this[passwordConfirmInputSymbol],
1306
+ labels.passwordConfirmPlaceholder,
1307
+ labels.passwordConfirmAria,
1308
+ );
1309
+ setInputMeta.call(
1310
+ this,
1311
+ this[profileInputsSymbol]?.firstName,
1312
+ labels.firstNamePlaceholder,
1313
+ labels.firstNameAria,
1314
+ );
1315
+ setInputMeta.call(
1316
+ this,
1317
+ this[profileInputsSymbol]?.lastName,
1318
+ labels.lastNamePlaceholder,
1319
+ labels.lastNameAria,
1320
+ );
1321
+ setInputMeta.call(
1322
+ this,
1323
+ this[profileInputsSymbol]?.birthDate,
1324
+ null,
1325
+ labels.birthDateAria,
1326
+ );
1327
+ setInputMeta.call(
1328
+ this,
1329
+ this[profileInputsSymbol]?.nationality,
1330
+ labels.nationalityPlaceholder,
1331
+ labels.nationalityAria,
1332
+ );
1333
+ setInputMeta.call(
1334
+ this,
1335
+ this[addressInputsSymbol]?.street,
1336
+ labels.streetPlaceholder,
1337
+ labels.streetAria,
1338
+ );
1339
+ setInputMeta.call(
1340
+ this,
1341
+ this[addressInputsSymbol]?.zip,
1342
+ labels.zipPlaceholder,
1343
+ labels.zipAria,
1344
+ );
1345
+ setInputMeta.call(
1346
+ this,
1347
+ this[addressInputsSymbol]?.city,
1348
+ labels.cityPlaceholder,
1349
+ labels.cityAria,
1350
+ );
1351
+ setInputMeta.call(
1352
+ this,
1353
+ this[addressInputsSymbol]?.country,
1354
+ labels.countryPlaceholder,
1355
+ labels.countryAria,
1356
+ );
1357
+ }
1358
+
1359
+ function setFieldSetTitle(key, text) {
1360
+ const fieldSet = this[fieldSetElementsSymbol]?.[key];
1361
+ if (!fieldSet || typeof fieldSet.setOption !== "function") {
1362
+ return;
1363
+ }
1364
+ fieldSet.setOption("labels.title", text || "");
1365
+ }
1366
+
1367
+ function setLabelText(selector, text) {
1368
+ const element = this.shadowRoot.querySelector(selector);
1369
+ if (!element) {
1370
+ return;
1371
+ }
1372
+ element.textContent = text || "";
1373
+ }
1374
+
1375
+ function setInputMeta(element, placeholder, aria) {
1376
+ if (!element) {
1377
+ return;
1378
+ }
1379
+ if (placeholder !== null && placeholder !== undefined) {
1380
+ element.setAttribute("placeholder", placeholder);
1381
+ }
1382
+ if (aria) {
1383
+ element.setAttribute("aria-label", aria);
1384
+ }
1385
+ }
1386
+
1387
+ async function loadConsentTopics() {
1388
+ const url = this.getOption("consents.url");
1389
+ const container = this.shadowRoot.querySelector(
1390
+ '[data-monster-role="consents-list"]',
1391
+ );
1392
+ if (!container) {
1393
+ return;
1394
+ }
1395
+ if (isString(url) && url !== "") {
1396
+ try {
1397
+ const { data } = await readWithDatasource.call(
1398
+ this,
1399
+ this[consentsDatasourceSymbol],
1400
+ {
1401
+ url,
1402
+ fetch: this.getOption("consents.fetch"),
1403
+ },
1404
+ );
1405
+ const topics = mapConsentTopics.call(this, data);
1406
+ renderConsentTopics.call(this, topics);
1407
+ return;
1408
+ } catch (e) {
1409
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, `${e}`);
1410
+ }
1411
+ }
1412
+ const fallbackTopics = this.getOption("consents.topics") || [];
1413
+ renderConsentTopics.call(this, fallbackTopics);
1414
+ }
1415
+
1416
+ function mapConsentTopics(data) {
1417
+ const mapping = this.getOption("consents.mapping") || {};
1418
+ const selector = mapping.selector || "*";
1419
+ let source = data;
1420
+ if (selector && selector !== "*") {
1421
+ try {
1422
+ source = new Pathfinder(data).getVia(selector);
1423
+ } catch (_e) {
1424
+ source = data;
1425
+ }
1426
+ }
1427
+ const topicsPath = mapping.topicsPath;
1428
+ let list = Array.isArray(source) ? source : [];
1429
+ if (topicsPath) {
1430
+ try {
1431
+ list = new Pathfinder(source).getVia(topicsPath);
1432
+ } catch (_e) {
1433
+ list = [];
1434
+ }
1435
+ }
1436
+ if (!Array.isArray(list)) {
1437
+ return [];
1438
+ }
1439
+ return list
1440
+ .map((entry) => ({
1441
+ topic: getPathValue(entry, mapping.topicPath) ?? entry?.topic,
1442
+ label: getPathValue(entry, mapping.labelPath) ?? entry?.label,
1443
+ description:
1444
+ getPathValue(entry, mapping.descriptionPath) ?? entry?.description,
1445
+ required: Boolean(
1446
+ getPathValue(entry, mapping.requiredPath) ?? entry?.required,
1447
+ ),
1448
+ }))
1449
+ .filter((entry) => isString(entry.topic) && entry.topic !== "");
1450
+ }
1451
+
1452
+ function renderConsentTopics(topics) {
1453
+ const container = this.shadowRoot.querySelector(
1454
+ '[data-monster-role="consents-list"]',
1455
+ );
1456
+ if (!container) {
1457
+ return;
1458
+ }
1459
+ container.innerHTML = "";
1460
+ topics.forEach((topic) => {
1461
+ const row = document.createElement("label");
1462
+ row.setAttribute("data-monster-role", "consent-row");
1463
+ row.setAttribute("part", "consent-row");
1464
+
1465
+ const input = document.createElement("input");
1466
+ input.type = "checkbox";
1467
+ input.setAttribute("data-topic", topic.topic);
1468
+ input.setAttribute("part", "consent-input");
1469
+ if (topic.required) {
1470
+ input.setAttribute("data-required", "true");
1471
+ input.setAttribute("required", "");
1472
+ }
1473
+
1474
+ const text = document.createElement("span");
1475
+ text.setAttribute("data-monster-role", "consent-label");
1476
+ text.setAttribute("part", "consent-label");
1477
+ text.textContent = topic.label || topic.topic;
1478
+
1479
+ row.appendChild(input);
1480
+ row.appendChild(text);
1481
+
1482
+ if (topic.description) {
1483
+ const description = document.createElement("span");
1484
+ description.setAttribute("data-monster-role", "consent-description");
1485
+ description.setAttribute("part", "consent-description");
1486
+ description.textContent = topic.description;
1487
+ row.appendChild(description);
1488
+ }
1489
+
1490
+ container.appendChild(row);
1491
+ });
1492
+ }
1493
+
1494
+ async function writeWithDatasource(datasource, options, payload) {
1495
+ if (!datasource) {
1496
+ throw new Error("datasource not available");
1497
+ }
1498
+ const responseHolder = { data: null };
1499
+ datasource.setOption("write.url", options.url);
1500
+ datasource.setOption("write.init", options.fetch || {});
1501
+ datasource.setOption("write.parameters", payload);
1502
+ datasource.setOption("write.responseCallback", (obj) => {
1503
+ responseHolder.data = obj;
1504
+ });
1505
+ datasource.data = payload;
1506
+ const response = await datasource.write();
1507
+ return { response, data: responseHolder.data };
1508
+ }
1509
+
1510
+ async function readWithDatasource(datasource, options) {
1511
+ if (!datasource) {
1512
+ throw new Error("datasource not available");
1513
+ }
1514
+ const responseHolder = { data: null };
1515
+ datasource.setOption("read.url", options.url);
1516
+ datasource.setOption("read.init", options.fetch || {});
1517
+ datasource.setOption("read.parameters", {});
1518
+ datasource.setOption("read.responseCallback", (obj) => {
1519
+ responseHolder.data = obj;
1520
+ });
1521
+ const response = await datasource.read();
1522
+ return { response, data: responseHolder.data };
1523
+ }
1524
+
1525
+ function handleMessageButtonError(button, message) {
1526
+ if (!button || !message) {
1527
+ return;
1528
+ }
1529
+ try {
1530
+ button.setMessage(message);
1531
+ button.showMessage(3000);
1532
+ button.setState("failed", 1500);
1533
+ } catch (_e) {}
1534
+ }
1535
+
1536
+ function setButtonState(button, state, timeout) {
1537
+ if (!button || !state) {
1538
+ return;
1539
+ }
1540
+ try {
1541
+ button.setState(state, timeout);
1542
+ } catch (_e) {}
1543
+ }
1544
+
1545
+ function setAvailabilityMessage(message) {
1546
+ if (this.getOption("features.showAvailabilityMessage") === false) {
1547
+ return;
1548
+ }
1549
+ const button = this[availabilityNextButtonSymbol];
1550
+ if (button && typeof button.setMessage === "function") {
1551
+ if (!message) {
1552
+ if (typeof button.clearMessage === "function") {
1553
+ button.clearMessage();
1554
+ }
1555
+ if (typeof button.hideMessage === "function") {
1556
+ button.hideMessage();
1557
+ }
1558
+ return;
1559
+ }
1560
+ try {
1561
+ button.setMessage(message);
1562
+ button.showMessage(3500);
1563
+ } catch (_e) {}
1564
+ return;
1565
+ }
1566
+ if (!this[availabilityMessageSymbol]) {
1567
+ return;
1568
+ }
1569
+ this[availabilityMessageSymbol].textContent = message || "";
1570
+ }
1571
+
1572
+ function setInlineMessage(message) {
1573
+ if (!message) {
1574
+ return;
1575
+ }
1576
+ const button = getActiveStepActionButton.call(this);
1577
+ if (!button) {
1578
+ return;
1579
+ }
1580
+ handleMessageButtonError.call(this, button, message);
1581
+ }
1582
+
1583
+ function clearInlineMessage() {
1584
+ const buttons = [];
1585
+ if (Array.isArray(this[nextButtonsSymbol])) {
1586
+ buttons.push(...this[nextButtonsSymbol]);
1587
+ }
1588
+ if (this[submitButtonSymbol]) {
1589
+ buttons.push(this[submitButtonSymbol]);
1590
+ }
1591
+ for (const button of buttons) {
1592
+ if (!button) {
1593
+ continue;
1594
+ }
1595
+ if (typeof button.clearMessage === "function") {
1596
+ button.clearMessage();
1597
+ }
1598
+ if (typeof button.hideMessage === "function") {
1599
+ button.hideMessage();
1600
+ }
1601
+ }
1602
+ }
1603
+
1604
+ function getActiveStepActionButton() {
1605
+ const steps = getStepOrder();
1606
+ const stepId = steps[this[currentStepSymbol]];
1607
+ if (!stepId) {
1608
+ return null;
1609
+ }
1610
+ if (stepId === "consents") {
1611
+ return this[submitButtonSymbol] || null;
1612
+ }
1613
+ const panel = this[panelElementsSymbol]?.[stepId];
1614
+ if (!panel) {
1615
+ return null;
1616
+ }
1617
+ return panel.querySelector('[data-monster-role="next-button"]') || null;
1618
+ }
1619
+
1620
+ function fireInvalid(stepIndex) {
1621
+ fireCustomEvent(this, "monster-register-wizard-invalid", {
1622
+ stepIndex,
1623
+ });
1624
+ const action = this.getOption("actions.oninvalid");
1625
+ if (isFunction(action)) {
1626
+ action.call(this, stepIndex);
1627
+ }
1628
+ }
1629
+
1630
+ function extractAvailabilityMessage(error) {
1631
+ if (!error) {
1632
+ return null;
1633
+ }
1634
+ const response = error?.response;
1635
+ const raw =
1636
+ response?.[
1637
+ Symbol.for("@schukai/monster/data/datasource/server/restapi/rawdata")
1638
+ ];
1639
+ const messagePath = this.getOption("availability.mapping.messagePath");
1640
+ if (raw && messagePath) {
1641
+ return getPathValue(raw, messagePath);
1642
+ }
1643
+ return null;
1644
+ }
1645
+
1646
+ function extractRegisterMessage(error) {
1647
+ if (!error) {
1648
+ return null;
1649
+ }
1650
+ const response = error?.response;
1651
+ const raw =
1652
+ response?.[
1653
+ Symbol.for("@schukai/monster/data/datasource/server/restapi/rawdata")
1654
+ ];
1655
+ const messagePath = this.getOption("register.mapping.messagePath");
1656
+ if (raw && messagePath) {
1657
+ return getPathValue(raw, messagePath);
1658
+ }
1659
+ return null;
1660
+ }
1661
+
1662
+ function getStepOrder() {
1663
+ return ["email", "password", "profile", "address", "consents"];
1664
+ }
1665
+
1666
+ function mapStepToWizardIndices(stepIndex) {
1667
+ switch (stepIndex) {
1668
+ case 0:
1669
+ return { main: 0, sub: 0 };
1670
+ case 1:
1671
+ return { main: 0, sub: 1 };
1672
+ case 2:
1673
+ return { main: 1, sub: 0 };
1674
+ case 3:
1675
+ return { main: 1, sub: 1 };
1676
+ case 4:
1677
+ return { main: 2, sub: 0 };
1678
+ default:
1679
+ return null;
1680
+ }
1681
+ }
1682
+
1683
+ function mapWizardStepToIndex(mainIndex) {
1684
+ switch (mainIndex) {
1685
+ case 0:
1686
+ return 0;
1687
+ case 1:
1688
+ return 2;
1689
+ case 2:
1690
+ return 4;
1691
+ default:
1692
+ return null;
1693
+ }
1694
+ }
1695
+
1696
+ function mapWizardSubStepToIndex(mainIndex, subIndex) {
1697
+ if (mainIndex === 0) {
1698
+ return subIndex === 1 ? 1 : 0;
1699
+ }
1700
+ if (mainIndex === 1) {
1701
+ return subIndex === 1 ? 3 : 2;
1702
+ }
1703
+ if (mainIndex === 2) {
1704
+ return 4;
1705
+ }
1706
+ return null;
1707
+ }
1708
+
1709
+ function getValue(element) {
1710
+ if (!element) {
1711
+ return "";
1712
+ }
1713
+ if (typeof element.value === "string" || typeof element.value === "number") {
1714
+ return element.value;
1715
+ }
1716
+ if (typeof element.getOption === "function") {
1717
+ return element.getOption("value");
1718
+ }
1719
+ return "";
1720
+ }
1721
+
1722
+ function isFilled(element) {
1723
+ const value = getValue(element);
1724
+ return String(value ?? "").trim() !== "";
1725
+ }
1726
+
1727
+ function isValidEmail(value) {
1728
+ if (!isString(value)) {
1729
+ return false;
1730
+ }
1731
+ const trimmed = value.trim();
1732
+ if (trimmed === "") {
1733
+ return false;
1734
+ }
1735
+ return /^[^\s@]+@[^\s@]+(\.[^\s@]+)*$/.test(trimmed);
1736
+ }
1737
+
1738
+ function setPathValue(target, path, value) {
1739
+ if (!isString(path) || path === "") {
1740
+ return;
1741
+ }
1742
+ try {
1743
+ new Pathfinder(target).setVia(path, value);
1744
+ } catch (_e) {}
1745
+ }
1746
+
1747
+ function getPathValue(source, path) {
1748
+ if (!isString(path) || path === "") {
1749
+ return null;
1750
+ }
1751
+ try {
1752
+ return new Pathfinder(source).getVia(path);
1753
+ } catch (_e) {
1754
+ return null;
1755
+ }
1756
+ }
1757
+
1758
+ function getTemplate() {
1759
+ // language=HTML
1760
+ return `
1761
+ <div data-monster-role="control" part="control">
1762
+ <div data-monster-role="header" part="header">
1763
+ <slot name="title"></slot>
1764
+ </div>
1765
+ <div data-monster-role="body" part="body">
1766
+ <div data-monster-role="nav" part="nav">
1767
+ <monster-wizard-navigation part="nav-control">
1768
+ <ol class="wizard-steps">
1769
+ <li class="step">
1770
+ <span data-monster-role="step-label" part="step-label"
1771
+ data-monster-replace="path:labels.stepAccount"></span>
1772
+ <ul>
1773
+ <li data-monster-replace="path:labels.subEmail"></li>
1774
+ <li data-monster-replace="path:labels.subPassword"></li>
1775
+ </ul>
1776
+ </li>
1777
+ <li class="step">
1778
+ <span data-monster-role="step-label" part="step-label"
1779
+ data-monster-replace="path:labels.stepProfileGroup"></span>
1780
+ <ul>
1781
+ <li data-monster-replace="path:labels.subProfile"></li>
1782
+ <li data-monster-replace="path:labels.subAddress"></li>
1783
+ </ul>
1784
+ </li>
1785
+ <li class="step">
1786
+ <span data-monster-role="step-label" part="step-label"
1787
+ data-monster-replace="path:labels.stepConsentsGroup"></span>
1788
+ <ul>
1789
+ <li data-monster-replace="path:labels.subConsents"></li>
1790
+ </ul>
1791
+ </li>
1792
+ </ol>
1793
+ </monster-wizard-navigation>
1794
+ </div>
1795
+ <div data-monster-role="content" part="content">
1796
+ <section data-monster-role="panel" data-step="email" part="panel panel-email">
1797
+ <monster-field-set data-monster-role="field-set-email" part="field-set field-set-email">
1798
+ <label data-monster-role="field-label email-label" part="field-label email-label"
1799
+ data-monster-replace="path:labels.email"></label>
1800
+ <input data-monster-role="email-input" part="input input-email"
1801
+ type="text" name="email"
1802
+ data-monster-attributes="placeholder path:labels.emailPlaceholder, autocomplete path:autocomplete.email, aria-label path:labels.emailAria" />
1803
+ <slot name="email-fields"></slot>
1804
+ </monster-field-set>
1805
+ <slot name="email-info" part="slot slot-email"></slot>
1806
+ <div data-monster-role="availability-message" part="availability-message"></div>
1807
+ <div data-monster-role="step-message" part="step-message"></div>
1808
+ <div data-monster-role="actions" part="actions">
1809
+ <monster-message-state-button data-monster-role="next-button" part="next-button"
1810
+ data-monster-replace="path:labels.next"></monster-message-state-button>
1811
+ </div>
1812
+ </section>
1813
+
1814
+ <section data-monster-role="panel" data-step="password" part="panel panel-password">
1815
+ <monster-field-set data-monster-role="field-set-password" part="field-set field-set-password">
1816
+ <label data-monster-role="field-label password-label" part="field-label password-label"
1817
+ data-monster-replace="path:labels.password"></label>
1818
+ <monster-password data-monster-role="password-input" part="input input-password"
1819
+ data-monster-attributes="data-monster-option-autocomplete path:autocomplete.password, aria-label path:labels.passwordAria"></monster-password>
1820
+ <label data-monster-role="field-label password-confirm-label"
1821
+ part="field-label password-confirm-label"
1822
+ data-monster-attributes="class path:features.confirmPassword | ?::hidden"
1823
+ data-monster-replace="path:labels.passwordConfirm"></label>
1824
+ <input data-monster-role="password-confirm-input" part="input input-password-confirm"
1825
+ type="password" name="passwordConfirm"
1826
+ data-monster-attributes="class path:features.confirmPassword | ?::hidden, placeholder path:labels.passwordConfirmPlaceholder, autocomplete path:autocomplete.passwordConfirm, aria-label path:labels.passwordConfirmAria" />
1827
+ <slot name="password-fields"></slot>
1828
+ </monster-field-set>
1829
+ <slot name="password-info" part="slot slot-password"></slot>
1830
+ <div data-monster-role="step-message" part="step-message"></div>
1831
+ <div data-monster-role="actions" part="actions">
1832
+ <monster-button data-monster-role="back-button" part="back-button"
1833
+ data-monster-replace="path:labels.back"></monster-button>
1834
+ <monster-message-state-button data-monster-role="next-button" part="next-button"
1835
+ data-monster-replace="path:labels.next"></monster-message-state-button>
1836
+ </div>
1837
+ </section>
1838
+
1839
+ <section data-monster-role="panel" data-step="profile" part="panel panel-profile">
1840
+ <monster-field-set data-monster-role="field-set-profile" part="field-set field-set-profile">
1841
+ <label data-monster-role="field-label first-name-label" part="field-label first-name-label"
1842
+ data-monster-replace="path:labels.firstName"></label>
1843
+ <input data-monster-role="first-name-input" part="input input-first-name"
1844
+ type="text" name="firstName"
1845
+ data-monster-attributes="placeholder path:labels.firstNamePlaceholder, autocomplete path:autocomplete.firstName, aria-label path:labels.firstNameAria" />
1846
+ <label data-monster-role="field-label last-name-label" part="field-label last-name-label"
1847
+ data-monster-replace="path:labels.lastName"></label>
1848
+ <input data-monster-role="last-name-input" part="input input-last-name"
1849
+ type="text" name="lastName"
1850
+ data-monster-attributes="placeholder path:labels.lastNamePlaceholder, autocomplete path:autocomplete.lastName, aria-label path:labels.lastNameAria" />
1851
+ <label data-monster-role="field-label birth-date-label" part="field-label birth-date-label"
1852
+ data-monster-attributes="class path:features.showBirthDate | ?::hidden"
1853
+ data-monster-replace="path:labels.birthDate"></label>
1854
+ <input data-monster-role="birth-date-input" part="input input-birth-date"
1855
+ type="text" name="birthDate"
1856
+ data-monster-attributes="class path:features.showBirthDate | ?::hidden, autocomplete path:autocomplete.birthDate, aria-label path:labels.birthDateAria" />
1857
+ <label data-monster-role="field-label nationality-label" part="field-label nationality-label"
1858
+ data-monster-attributes="class path:features.showNationality | ?::hidden"
1859
+ data-monster-replace="path:labels.nationality"></label>
1860
+ <input data-monster-role="nationality-input" part="input input-nationality"
1861
+ type="text" name="nationality"
1862
+ data-monster-attributes="class path:features.showNationality | ?::hidden, placeholder path:labels.nationalityPlaceholder, autocomplete path:autocomplete.nationality, aria-label path:labels.nationalityAria" />
1863
+ <slot name="profile-fields"></slot>
1864
+ </monster-field-set>
1865
+ <slot name="profile-info" part="slot slot-profile"></slot>
1866
+ <div data-monster-role="step-message" part="step-message"></div>
1867
+ <div data-monster-role="actions" part="actions">
1868
+ <monster-button data-monster-role="back-button" part="back-button"
1869
+ data-monster-replace="path:labels.back"></monster-button>
1870
+ <monster-message-state-button data-monster-role="next-button" part="next-button"
1871
+ data-monster-replace="path:labels.next"></monster-message-state-button>
1872
+ </div>
1873
+ </section>
1874
+
1875
+ <section data-monster-role="panel" data-step="address" part="panel panel-address">
1876
+ <monster-field-set data-monster-role="field-set-address" part="field-set field-set-address">
1877
+ <label data-monster-role="field-label street-label" part="field-label street-label"
1878
+ class="grid-start-1"
1879
+ data-monster-replace="path:labels.street"></label>
1880
+ <input data-monster-role="street-input" part="input input-street"
1881
+ class="grid-start-2 grid-span-full"
1882
+ type="text" name="street"
1883
+ data-monster-attributes="placeholder path:labels.streetPlaceholder, autocomplete path:autocomplete.street, aria-label path:labels.streetAria" />
1884
+ <label data-monster-role="field-label zip-label" part="field-label zip-label"
1885
+ class="grid-start-1"
1886
+ data-monster-replace="path:labels.zip"></label>
1887
+ <input data-monster-role="zip-input" part="input input-zip"
1888
+ class="grid-start-2"
1889
+ type="text" name="zip"
1890
+ data-monster-attributes="placeholder path:labels.zipPlaceholder, autocomplete path:autocomplete.zip, aria-label path:labels.zipAria" />
1891
+ <label data-monster-role="field-label city-label" part="field-label city-label"
1892
+ class="grid-start-3"
1893
+ data-monster-replace="path:labels.city"></label>
1894
+ <input data-monster-role="city-input" part="input input-city"
1895
+ class="grid-start-4"
1896
+ type="text" name="city"
1897
+ data-monster-attributes="placeholder path:labels.cityPlaceholder, autocomplete path:autocomplete.city, aria-label path:labels.cityAria" />
1898
+ <label data-monster-role="field-label country-label" part="field-label country-label"
1899
+ class="grid-start-1"
1900
+ data-monster-replace="path:labels.country"></label>
1901
+ <input data-monster-role="country-input" part="input input-country"
1902
+ class="grid-start-2 grid-span-full"
1903
+ type="text" name="country"
1904
+ data-monster-attributes="placeholder path:labels.countryPlaceholder, autocomplete path:autocomplete.country, aria-label path:labels.countryAria" />
1905
+ <slot name="address-fields"></slot>
1906
+ </monster-field-set>
1907
+ <slot name="address-info" part="slot slot-address"></slot>
1908
+ <div data-monster-role="step-message" part="step-message"></div>
1909
+ <div data-monster-role="actions" part="actions">
1910
+ <monster-button data-monster-role="back-button" part="back-button"
1911
+ data-monster-replace="path:labels.back"></monster-button>
1912
+ <monster-message-state-button data-monster-role="next-button" part="next-button"
1913
+ data-monster-replace="path:labels.next"></monster-message-state-button>
1914
+ </div>
1915
+ </section>
1916
+
1917
+ <section data-monster-role="panel" data-step="consents" part="panel panel-consents">
1918
+ <monster-field-set data-monster-role="field-set-consents" part="field-set field-set-consents">
1919
+ <div data-monster-role="consents-title" part="consents-title"
1920
+ data-monster-replace="path:labels.consentsTitle"></div>
1921
+ <div data-monster-role="consents-list" part="consents-list"></div>
1922
+ <slot name="consents-fields"></slot>
1923
+ </monster-field-set>
1924
+ <slot name="consents-info" part="slot slot-consents"></slot>
1925
+ <div data-monster-role="step-message" part="step-message"></div>
1926
+ <div data-monster-role="actions" part="actions">
1927
+ <monster-button data-monster-role="back-button" part="back-button"
1928
+ data-monster-replace="path:labels.back"></monster-button>
1929
+ <monster-message-state-button data-monster-role="submit-button" part="submit-button"
1930
+ data-monster-replace="path:labels.register"></monster-message-state-button>
1931
+ </div>
1932
+ </section>
1933
+ <section data-monster-role="panel" data-step="success" part="panel panel-success" hidden>
1934
+ <div data-monster-role="success-title" part="success-title"
1935
+ data-monster-replace="path:labels.successTitle"></div>
1936
+ <slot name="success"></slot>
1937
+ </section>
1938
+ </div>
1939
+ </div>
1940
+ <div data-monster-role="footer" part="footer">
1941
+ <slot name="footer"></slot>
1942
+ </div>
1943
+ <monster-datasource-rest data-monster-role="availability-datasource" part="availability-datasource"></monster-datasource-rest>
1944
+ <monster-datasource-rest data-monster-role="register-datasource" part="register-datasource"></monster-datasource-rest>
1945
+ <monster-datasource-rest data-monster-role="consents-datasource" part="consents-datasource"></monster-datasource-rest>
1946
+ </div>
1947
+ `;
1948
+ }
1949
+
1950
+ function getTranslations() {
1951
+ const locale = getLocaleOfDocument();
1952
+ switch (locale.language) {
1953
+ case "de":
1954
+ return {
1955
+ stepEmail: "E-Mail",
1956
+ stepPassword: "Passwort",
1957
+ stepProfile: "Profil",
1958
+ stepAddress: "Adresse",
1959
+ stepConsents: "Einwilligungen",
1960
+ stepAccount: "Zugangsdaten",
1961
+ stepProfileGroup: "Profil",
1962
+ stepConsentsGroup: "Einwilligungen",
1963
+ subEmail: "E-Mail",
1964
+ subPassword: "Passwort",
1965
+ subProfile: "Profil",
1966
+ subAddress: "Adresse",
1967
+ subConsents: "Einwilligungen",
1968
+ email: "E-Mail-Adresse",
1969
+ emailPlaceholder: "name@beispiel.de",
1970
+ emailAria: "E-Mail-Adresse",
1971
+ password: "Passwort",
1972
+ passwordAria: "Passwort",
1973
+ passwordConfirm: "Passwort bestaetigen",
1974
+ passwordConfirmPlaceholder: "Passwort wiederholen",
1975
+ passwordConfirmAria: "Passwort bestaetigen",
1976
+ firstName: "Vorname",
1977
+ firstNamePlaceholder: "Max",
1978
+ firstNameAria: "Vorname",
1979
+ lastName: "Nachname",
1980
+ lastNamePlaceholder: "Mustermann",
1981
+ lastNameAria: "Nachname",
1982
+ birthDate: "Geburtsdatum",
1983
+ birthDateAria: "Geburtsdatum",
1984
+ nationality: "Nationalitaet",
1985
+ nationalityPlaceholder: "DE",
1986
+ nationalityAria: "Nationalitaet",
1987
+ street: "Strasse",
1988
+ streetPlaceholder: "Musterstrasse 1",
1989
+ streetAria: "Strasse",
1990
+ zip: "PLZ",
1991
+ zipPlaceholder: "12345",
1992
+ zipAria: "PLZ",
1993
+ city: "Stadt",
1994
+ cityPlaceholder: "Berlin",
1995
+ cityAria: "Stadt",
1996
+ country: "Land",
1997
+ countryPlaceholder: "DE",
1998
+ countryAria: "Land",
1999
+ consentsTitle: "Einwilligungen",
2000
+ back: "Zurueck",
2001
+ next: "Weiter",
2002
+ register: "Registrieren",
2003
+ successTitle: "Registrierung abgeschlossen",
2004
+ messageChecking: "E-Mail wird geprueft...",
2005
+ messageEmailAvailable: "E-Mail ist verfuegbar.",
2006
+ messageEmailUnavailable: "E-Mail ist bereits vergeben.",
2007
+ messageRequiredEmail: "Bitte eine E-Mail-Adresse eingeben.",
2008
+ messageInvalidEmail: "Bitte eine gueltige E-Mail-Adresse eingeben.",
2009
+ messageRequiredPassword: "Bitte ein Passwort eingeben.",
2010
+ messageRequiredPasswordConfirm: "Bitte Passwort bestaetigen.",
2011
+ messageRequiredField: "Bitte alle Pflichtfelder ausfuellen.",
2012
+ messageAvailabilityFailed: "E-Mail-Pruefung fehlgeschlagen.",
2013
+ messageAvailabilityNotConfigured:
2014
+ "E-Mail-Pruefung ist nicht konfiguriert.",
2015
+ messageAvailabilityRequired: "Bitte zuerst die E-Mail pruefen.",
2016
+ messagePasswordMismatch: "Passwoerter stimmen nicht ueberein.",
2017
+ messageRequiredConsents: "Bitte Pflicht-Einwilligungen akzeptieren.",
2018
+ messageRegisterFailed: "Registrierung fehlgeschlagen.",
2019
+ messageRegisterNotConfigured: "Registrierung ist nicht konfiguriert.",
2020
+ };
2021
+ case "es":
2022
+ return {
2023
+ stepEmail: "Correo",
2024
+ stepPassword: "Contrasena",
2025
+ stepProfile: "Perfil",
2026
+ stepAddress: "Direccion",
2027
+ stepConsents: "Consentimientos",
2028
+ stepAccount: "Cuenta",
2029
+ stepProfileGroup: "Perfil",
2030
+ stepConsentsGroup: "Consentimientos",
2031
+ subEmail: "Correo",
2032
+ subPassword: "Contrasena",
2033
+ subProfile: "Perfil",
2034
+ subAddress: "Direccion",
2035
+ subConsents: "Consentimientos",
2036
+ email: "Correo electronico",
2037
+ emailPlaceholder: "nombre@ejemplo.com",
2038
+ emailAria: "Correo electronico",
2039
+ password: "Contrasena",
2040
+ passwordAria: "Contrasena",
2041
+ passwordConfirm: "Confirmar contrasena",
2042
+ passwordConfirmPlaceholder: "Repetir contrasena",
2043
+ passwordConfirmAria: "Confirmar contrasena",
2044
+ firstName: "Nombre",
2045
+ firstNamePlaceholder: "Max",
2046
+ firstNameAria: "Nombre",
2047
+ lastName: "Apellido",
2048
+ lastNamePlaceholder: "Mustermann",
2049
+ lastNameAria: "Apellido",
2050
+ birthDate: "Fecha de nacimiento",
2051
+ birthDateAria: "Fecha de nacimiento",
2052
+ nationality: "Nacionalidad",
2053
+ nationalityPlaceholder: "ES",
2054
+ nationalityAria: "Nacionalidad",
2055
+ street: "Calle",
2056
+ streetPlaceholder: "Calle 1",
2057
+ streetAria: "Calle",
2058
+ zip: "Codigo postal",
2059
+ zipPlaceholder: "12345",
2060
+ zipAria: "Codigo postal",
2061
+ city: "Ciudad",
2062
+ cityPlaceholder: "Madrid",
2063
+ cityAria: "Ciudad",
2064
+ country: "Pais",
2065
+ countryPlaceholder: "ES",
2066
+ countryAria: "Pais",
2067
+ consentsTitle: "Consentimientos",
2068
+ back: "Atras",
2069
+ next: "Siguiente",
2070
+ register: "Registrarse",
2071
+ successTitle: "Registro completado",
2072
+ messageChecking: "Comprobando correo...",
2073
+ messageEmailAvailable: "El correo esta disponible.",
2074
+ messageEmailUnavailable: "El correo ya esta en uso.",
2075
+ messageRequiredEmail: "Ingrese un correo.",
2076
+ messageInvalidEmail: "Ingrese un correo valido.",
2077
+ messageRequiredPassword: "Ingrese una contrasena.",
2078
+ messageRequiredPasswordConfirm: "Confirme la contrasena.",
2079
+ messageRequiredField: "Complete los campos obligatorios.",
2080
+ messageAvailabilityFailed: "La verificacion fallo.",
2081
+ messageAvailabilityNotConfigured:
2082
+ "La verificacion no esta configurada.",
2083
+ messageAvailabilityRequired: "Por favor revise el correo primero.",
2084
+ messagePasswordMismatch: "Las contrasenas no coinciden.",
2085
+ messageRequiredConsents: "Acepte los consentimientos requeridos.",
2086
+ messageRegisterFailed: "El registro fallo.",
2087
+ messageRegisterNotConfigured: "El registro no esta configurado.",
2088
+ };
2089
+ case "zh":
2090
+ return {
2091
+ stepEmail: "邮箱",
2092
+ stepPassword: "密码",
2093
+ stepProfile: "资料",
2094
+ stepAddress: "地址",
2095
+ stepConsents: "同意",
2096
+ stepAccount: "账户",
2097
+ stepProfileGroup: "资料",
2098
+ stepConsentsGroup: "同意",
2099
+ subEmail: "邮箱",
2100
+ subPassword: "密码",
2101
+ subProfile: "资料",
2102
+ subAddress: "地址",
2103
+ subConsents: "同意",
2104
+ email: "邮箱",
2105
+ emailPlaceholder: "name@example.com",
2106
+ emailAria: "邮箱",
2107
+ password: "密码",
2108
+ passwordAria: "密码",
2109
+ passwordConfirm: "确认密码",
2110
+ passwordConfirmPlaceholder: "再次输入密码",
2111
+ passwordConfirmAria: "确认密码",
2112
+ firstName: "名",
2113
+ firstNamePlaceholder: "Max",
2114
+ firstNameAria: "名",
2115
+ lastName: "姓",
2116
+ lastNamePlaceholder: "Mustermann",
2117
+ lastNameAria: "姓",
2118
+ birthDate: "出生日期",
2119
+ birthDateAria: "出生日期",
2120
+ nationality: "国籍",
2121
+ nationalityPlaceholder: "CN",
2122
+ nationalityAria: "国籍",
2123
+ street: "街道",
2124
+ streetPlaceholder: "街道 1 号",
2125
+ streetAria: "街道",
2126
+ zip: "邮编",
2127
+ zipPlaceholder: "12345",
2128
+ zipAria: "邮编",
2129
+ city: "城市",
2130
+ cityPlaceholder: "北京",
2131
+ cityAria: "城市",
2132
+ country: "国家",
2133
+ countryPlaceholder: "CN",
2134
+ countryAria: "国家",
2135
+ consentsTitle: "同意",
2136
+ back: "返回",
2137
+ next: "继续",
2138
+ register: "注册",
2139
+ successTitle: "注册完成",
2140
+ messageChecking: "正在检查邮箱...",
2141
+ messageEmailAvailable: "邮箱可用。",
2142
+ messageEmailUnavailable: "邮箱已被使用。",
2143
+ messageRequiredEmail: "请输入邮箱。",
2144
+ messageInvalidEmail: "请输入有效的邮箱。",
2145
+ messageRequiredPassword: "请输入密码。",
2146
+ messageRequiredPasswordConfirm: "请确认密码。",
2147
+ messageRequiredField: "请填写必填字段。",
2148
+ messageAvailabilityFailed: "邮箱检查失败。",
2149
+ messageAvailabilityNotConfigured: "邮箱检查未配置。",
2150
+ messageAvailabilityRequired: "请先检查邮箱。",
2151
+ messagePasswordMismatch: "密码不匹配。",
2152
+ messageRequiredConsents: "请同意必选项。",
2153
+ messageRegisterFailed: "注册失败。",
2154
+ messageRegisterNotConfigured: "注册未配置。",
2155
+ };
2156
+ case "hi":
2157
+ return {
2158
+ stepEmail: "ईमेल",
2159
+ stepPassword: "पासवर्ड",
2160
+ stepProfile: "प्रोफाइल",
2161
+ stepAddress: "पता",
2162
+ stepConsents: "सहमति",
2163
+ stepAccount: "Khata",
2164
+ stepProfileGroup: "Profile",
2165
+ stepConsentsGroup: "Sahamati",
2166
+ subEmail: "Email",
2167
+ subPassword: "Password",
2168
+ subProfile: "Profile",
2169
+ subAddress: "Pata",
2170
+ subConsents: "Sahamati",
2171
+ email: "ईमेल",
2172
+ emailPlaceholder: "name@example.com",
2173
+ emailAria: "ईमेल",
2174
+ password: "पासवर्ड",
2175
+ passwordAria: "पासवर्ड",
2176
+ passwordConfirm: "पासवर्ड की पुष्टि",
2177
+ passwordConfirmPlaceholder: "पासवर्ड दोहराएं",
2178
+ passwordConfirmAria: "पासवर्ड की पुष्टि",
2179
+ firstName: "पहला नाम",
2180
+ firstNamePlaceholder: "Max",
2181
+ firstNameAria: "पहला नाम",
2182
+ lastName: "अंतिम नाम",
2183
+ lastNamePlaceholder: "Mustermann",
2184
+ lastNameAria: "अंतिम नाम",
2185
+ birthDate: "जन्म तिथि",
2186
+ birthDateAria: "जन्म तिथि",
2187
+ nationality: "राष्ट्रीयता",
2188
+ nationalityPlaceholder: "IN",
2189
+ nationalityAria: "राष्ट्रीयता",
2190
+ street: "सड़क",
2191
+ streetPlaceholder: "स्ट्रीट 1",
2192
+ streetAria: "सड़क",
2193
+ zip: "पिन कोड",
2194
+ zipPlaceholder: "12345",
2195
+ zipAria: "पिन कोड",
2196
+ city: "शहर",
2197
+ cityPlaceholder: "Delhi",
2198
+ cityAria: "शहर",
2199
+ country: "देश",
2200
+ countryPlaceholder: "IN",
2201
+ countryAria: "देश",
2202
+ consentsTitle: "सहमति",
2203
+ back: "वापस",
2204
+ next: "आगे",
2205
+ register: "रजिस्टर",
2206
+ successTitle: "Registration poora hua",
2207
+ messageChecking: "ईमेल जांच रहे हैं...",
2208
+ messageEmailAvailable: "ईमेल उपलब्ध है।",
2209
+ messageEmailUnavailable: "ईमेल पहले से उपयोग में है।",
2210
+ messageRequiredEmail: "कृपया ईमेल दर्ज करें।",
2211
+ messageInvalidEmail: "कृपया मान्य ईमेल दर्ज करें।",
2212
+ messageRequiredPassword: "कृपया पासवर्ड दर्ज करें।",
2213
+ messageRequiredPasswordConfirm: "कृपया पासवर्ड पुष्टि करें।",
2214
+ messageRequiredField: "कृपया आवश्यक फील्ड भरें।",
2215
+ messageAvailabilityFailed: "ईमेल जांच विफल रही।",
2216
+ messageAvailabilityNotConfigured: "ईमेल जांच कॉन्फ़िगर नहीं है।",
2217
+ messageAvailabilityRequired: "कृपया पहले ईमेल जांचें।",
2218
+ messagePasswordMismatch: "पासवर्ड मेल नहीं खाते।",
2219
+ messageRequiredConsents: "कृपया आवश्यक सहमतियाँ स्वीकार करें।",
2220
+ messageRegisterFailed: "रजिस्ट्रेशन विफल रहा।",
2221
+ messageRegisterNotConfigured: "रजिस्ट्रेशन कॉन्फ़िगर नहीं है।",
2222
+ };
2223
+ case "bn":
2224
+ return {
2225
+ stepEmail: "ইমেল",
2226
+ stepPassword: "পাসওয়ার্ড",
2227
+ stepProfile: "প্রোফাইল",
2228
+ stepAddress: "ঠিকানা",
2229
+ stepConsents: "সম্মতি",
2230
+ stepAccount: "Account",
2231
+ stepProfileGroup: "Profile",
2232
+ stepConsentsGroup: "Sommoti",
2233
+ subEmail: "Email",
2234
+ subPassword: "Password",
2235
+ subProfile: "Profile",
2236
+ subAddress: "Thikana",
2237
+ subConsents: "Sommoti",
2238
+ email: "ইমেল",
2239
+ emailPlaceholder: "name@example.com",
2240
+ emailAria: "ইমেল",
2241
+ password: "পাসওয়ার্ড",
2242
+ passwordAria: "পাসওয়ার্ড",
2243
+ passwordConfirm: "পাসওয়ার্ড নিশ্চিত করুন",
2244
+ passwordConfirmPlaceholder: "পাসওয়ার্ড আবার লিখুন",
2245
+ passwordConfirmAria: "পাসওয়ার্ড নিশ্চিত করুন",
2246
+ firstName: "নাম",
2247
+ firstNamePlaceholder: "Max",
2248
+ firstNameAria: "নাম",
2249
+ lastName: "পদবি",
2250
+ lastNamePlaceholder: "Mustermann",
2251
+ lastNameAria: "পদবি",
2252
+ birthDate: "জন্ম তারিখ",
2253
+ birthDateAria: "জন্ম তারিখ",
2254
+ nationality: "জাতীয়তা",
2255
+ nationalityPlaceholder: "BD",
2256
+ nationalityAria: "জাতীয়তা",
2257
+ street: "রাস্তা",
2258
+ streetPlaceholder: "স্ট্রিট ১",
2259
+ streetAria: "রাস্তা",
2260
+ zip: "পোস্ট কোড",
2261
+ zipPlaceholder: "12345",
2262
+ zipAria: "পোস্ট কোড",
2263
+ city: "শহর",
2264
+ cityPlaceholder: "Dhaka",
2265
+ cityAria: "শহর",
2266
+ country: "দেশ",
2267
+ countryPlaceholder: "BD",
2268
+ countryAria: "দেশ",
2269
+ consentsTitle: "সম্মতি",
2270
+ back: "পেছনে",
2271
+ next: "পরবর্তী",
2272
+ register: "নিবন্ধন",
2273
+ successTitle: "Registration shesh",
2274
+ messageChecking: "ইমেল যাচাই হচ্ছে...",
2275
+ messageEmailAvailable: "ইমেল উপলব্ধ।",
2276
+ messageEmailUnavailable: "ইমেল ব্যবহৃত হচ্ছে।",
2277
+ messageRequiredEmail: "ইমেল লিখুন।",
2278
+ messageInvalidEmail: "সঠিক ইমেল লিখুন।",
2279
+ messageRequiredPassword: "পাসওয়ার্ড লিখুন।",
2280
+ messageRequiredPasswordConfirm: "পাসওয়ার্ড নিশ্চিত করুন।",
2281
+ messageRequiredField: "প্রয়োজনীয় ঘর পূরণ করুন।",
2282
+ messageAvailabilityFailed: "ইমেল যাচাই ব্যর্থ।",
2283
+ messageAvailabilityNotConfigured: "ইমেল যাচাই কনফিগার করা নেই।",
2284
+ messageAvailabilityRequired: "প্রথমে ইমেল যাচাই করুন।",
2285
+ messagePasswordMismatch: "পাসওয়ার্ড মিলছে না।",
2286
+ messageRequiredConsents: "প্রয়োজনীয় সম্মতি দিন।",
2287
+ messageRegisterFailed: "নিবন্ধন ব্যর্থ।",
2288
+ messageRegisterNotConfigured: "নিবন্ধন কনফিগার করা নেই।",
2289
+ };
2290
+ case "pt":
2291
+ return {
2292
+ stepEmail: "Email",
2293
+ stepPassword: "Senha",
2294
+ stepProfile: "Perfil",
2295
+ stepAddress: "Endereco",
2296
+ stepConsents: "Consentimentos",
2297
+ stepAccount: "Conta",
2298
+ stepProfileGroup: "Perfil",
2299
+ stepConsentsGroup: "Consentimentos",
2300
+ subEmail: "Email",
2301
+ subPassword: "Senha",
2302
+ subProfile: "Perfil",
2303
+ subAddress: "Endereco",
2304
+ subConsents: "Consentimentos",
2305
+ email: "Email",
2306
+ emailPlaceholder: "nome@exemplo.com",
2307
+ emailAria: "Email",
2308
+ password: "Senha",
2309
+ passwordAria: "Senha",
2310
+ passwordConfirm: "Confirmar senha",
2311
+ passwordConfirmPlaceholder: "Repetir senha",
2312
+ passwordConfirmAria: "Confirmar senha",
2313
+ firstName: "Nome",
2314
+ firstNamePlaceholder: "Max",
2315
+ firstNameAria: "Nome",
2316
+ lastName: "Sobrenome",
2317
+ lastNamePlaceholder: "Mustermann",
2318
+ lastNameAria: "Sobrenome",
2319
+ birthDate: "Data de nascimento",
2320
+ birthDateAria: "Data de nascimento",
2321
+ nationality: "Nacionalidade",
2322
+ nationalityPlaceholder: "BR",
2323
+ nationalityAria: "Nacionalidade",
2324
+ street: "Rua",
2325
+ streetPlaceholder: "Rua 1",
2326
+ streetAria: "Rua",
2327
+ zip: "CEP",
2328
+ zipPlaceholder: "12345",
2329
+ zipAria: "CEP",
2330
+ city: "Cidade",
2331
+ cityPlaceholder: "Sao Paulo",
2332
+ cityAria: "Cidade",
2333
+ country: "Pais",
2334
+ countryPlaceholder: "BR",
2335
+ countryAria: "Pais",
2336
+ consentsTitle: "Consentimentos",
2337
+ back: "Voltar",
2338
+ next: "Proximo",
2339
+ register: "Registrar",
2340
+ successTitle: "Registro concluido",
2341
+ messageChecking: "Verificando email...",
2342
+ messageEmailAvailable: "Email disponivel.",
2343
+ messageEmailUnavailable: "Email ja em uso.",
2344
+ messageRequiredEmail: "Informe o email.",
2345
+ messageInvalidEmail: "Informe um email valido.",
2346
+ messageRequiredPassword: "Informe a senha.",
2347
+ messageRequiredPasswordConfirm: "Confirme a senha.",
2348
+ messageRequiredField: "Preencha os campos obrigatorios.",
2349
+ messageAvailabilityFailed: "Falha ao verificar email.",
2350
+ messageAvailabilityNotConfigured: "Verificacao nao configurada.",
2351
+ messageAvailabilityRequired: "Verifique o email primeiro.",
2352
+ messagePasswordMismatch: "As senhas nao coincidem.",
2353
+ messageRequiredConsents: "Aceite os consentimentos obrigatorios.",
2354
+ messageRegisterFailed: "Registro falhou.",
2355
+ messageRegisterNotConfigured: "Registro nao configurado.",
2356
+ };
2357
+ case "ru":
2358
+ return {
2359
+ stepEmail: "Email",
2360
+ stepPassword: "Parol",
2361
+ stepProfile: "Profil",
2362
+ stepAddress: "Adres",
2363
+ stepConsents: "Soglasie",
2364
+ stepAccount: "Uchetnaya zapis",
2365
+ stepProfileGroup: "Profil",
2366
+ stepConsentsGroup: "Soglasiya",
2367
+ subEmail: "Email",
2368
+ subPassword: "Parol",
2369
+ subProfile: "Profil",
2370
+ subAddress: "Adres",
2371
+ subConsents: "Soglasiya",
2372
+ email: "Email",
2373
+ emailPlaceholder: "name@example.com",
2374
+ emailAria: "Email",
2375
+ password: "Parol",
2376
+ passwordAria: "Parol",
2377
+ passwordConfirm: "Podtverdit parol",
2378
+ passwordConfirmPlaceholder: "Povtorite parol",
2379
+ passwordConfirmAria: "Podtverdit parol",
2380
+ firstName: "Imya",
2381
+ firstNamePlaceholder: "Max",
2382
+ firstNameAria: "Imya",
2383
+ lastName: "Familiya",
2384
+ lastNamePlaceholder: "Mustermann",
2385
+ lastNameAria: "Familiya",
2386
+ birthDate: "Data rozhdeniya",
2387
+ birthDateAria: "Data rozhdeniya",
2388
+ nationality: "Nacionalnost",
2389
+ nationalityPlaceholder: "RU",
2390
+ nationalityAria: "Nacionalnost",
2391
+ street: "Ulica",
2392
+ streetPlaceholder: "Ulica 1",
2393
+ streetAria: "Ulica",
2394
+ zip: "Indeks",
2395
+ zipPlaceholder: "12345",
2396
+ zipAria: "Indeks",
2397
+ city: "Gorod",
2398
+ cityPlaceholder: "Moskva",
2399
+ cityAria: "Gorod",
2400
+ country: "Strana",
2401
+ countryPlaceholder: "RU",
2402
+ countryAria: "Strana",
2403
+ consentsTitle: "Soglasie",
2404
+ back: "Nazad",
2405
+ next: "Daleye",
2406
+ register: "Registraciya",
2407
+ successTitle: "Registraciya zavershena",
2408
+ messageChecking: "Proverka email...",
2409
+ messageEmailAvailable: "Email dostupen.",
2410
+ messageEmailUnavailable: "Email uzhe ispolzuetsya.",
2411
+ messageRequiredEmail: "Vvedite email.",
2412
+ messageInvalidEmail: "Vvedite korrektnyy email.",
2413
+ messageRequiredPassword: "Vvedite parol.",
2414
+ messageRequiredPasswordConfirm: "Podtverdite parol.",
2415
+ messageRequiredField: "Zapolnite obyazatelnye polya.",
2416
+ messageAvailabilityFailed: "Proverka email ne udalas.",
2417
+ messageAvailabilityNotConfigured: "Proverka ne nastroena.",
2418
+ messageAvailabilityRequired: "Snachala prover'te email.",
2419
+ messagePasswordMismatch: "Paroli ne sovpadayut.",
2420
+ messageRequiredConsents: "Prinyat obyazatelnye soglasiya.",
2421
+ messageRegisterFailed: "Registraciya ne udalas.",
2422
+ messageRegisterNotConfigured: "Registraciya ne nastroena.",
2423
+ };
2424
+ case "ja":
2425
+ return {
2426
+ stepEmail: "メール",
2427
+ stepPassword: "パスワード",
2428
+ stepProfile: "プロフィール",
2429
+ stepAddress: "住所",
2430
+ stepConsents: "同意",
2431
+ stepAccount: "Akaunto",
2432
+ stepProfileGroup: "Purofiiru",
2433
+ stepConsentsGroup: "Doui",
2434
+ subEmail: "Meiru",
2435
+ subPassword: "Pasuwaado",
2436
+ subProfile: "Purofiiru",
2437
+ subAddress: "Jusho",
2438
+ subConsents: "Doui",
2439
+ email: "メール",
2440
+ emailPlaceholder: "name@example.com",
2441
+ emailAria: "メール",
2442
+ password: "パスワード",
2443
+ passwordAria: "パスワード",
2444
+ passwordConfirm: "パスワード確認",
2445
+ passwordConfirmPlaceholder: "パスワードを再入力",
2446
+ passwordConfirmAria: "パスワード確認",
2447
+ firstName: "名",
2448
+ firstNamePlaceholder: "Max",
2449
+ firstNameAria: "名",
2450
+ lastName: "姓",
2451
+ lastNamePlaceholder: "Mustermann",
2452
+ lastNameAria: "姓",
2453
+ birthDate: "生年月日",
2454
+ birthDateAria: "生年月日",
2455
+ nationality: "国籍",
2456
+ nationalityPlaceholder: "JP",
2457
+ nationalityAria: "国籍",
2458
+ street: "住所",
2459
+ streetPlaceholder: "ストリート 1",
2460
+ streetAria: "住所",
2461
+ zip: "郵便番号",
2462
+ zipPlaceholder: "12345",
2463
+ zipAria: "郵便番号",
2464
+ city: "市区町村",
2465
+ cityPlaceholder: "東京",
2466
+ cityAria: "市区町村",
2467
+ country: "国",
2468
+ countryPlaceholder: "JP",
2469
+ countryAria: "国",
2470
+ consentsTitle: "同意",
2471
+ back: "戻る",
2472
+ next: "次へ",
2473
+ register: "登録",
2474
+ successTitle: "Touroku kanryo",
2475
+ messageChecking: "メール確認中...",
2476
+ messageEmailAvailable: "メールは利用可能です。",
2477
+ messageEmailUnavailable: "メールは使用済みです。",
2478
+ messageRequiredEmail: "メールを入力してください。",
2479
+ messageInvalidEmail: "有効なメールを入力してください。",
2480
+ messageRequiredPassword: "パスワードを入力してください。",
2481
+ messageRequiredPasswordConfirm: "パスワードを確認してください。",
2482
+ messageRequiredField: "必須項目を入力してください。",
2483
+ messageAvailabilityFailed: "メール確認に失敗しました。",
2484
+ messageAvailabilityNotConfigured: "メール確認が未設定です。",
2485
+ messageAvailabilityRequired: "先にメールを確認してください。",
2486
+ messagePasswordMismatch: "パスワードが一致しません。",
2487
+ messageRequiredConsents: "必須同意にチェックしてください。",
2488
+ messageRegisterFailed: "登録に失敗しました。",
2489
+ messageRegisterNotConfigured: "登録が未設定です。",
2490
+ };
2491
+ case "pa":
2492
+ return {
2493
+ stepEmail: "ਈਮੇਲ",
2494
+ stepPassword: "ਪਾਸਵਰਡ",
2495
+ stepProfile: "ਪ੍ਰੋਫਾਈਲ",
2496
+ stepAddress: "ਪਤਾ",
2497
+ stepConsents: "ਸਹਿਮਤੀ",
2498
+ stepAccount: "Khata",
2499
+ stepProfileGroup: "Profile",
2500
+ stepConsentsGroup: "Sahmati",
2501
+ subEmail: "Email",
2502
+ subPassword: "Password",
2503
+ subProfile: "Profile",
2504
+ subAddress: "Pata",
2505
+ subConsents: "Sahmati",
2506
+ email: "ਈਮੇਲ",
2507
+ emailPlaceholder: "name@example.com",
2508
+ emailAria: "ਈਮੇਲ",
2509
+ password: "ਪਾਸਵਰਡ",
2510
+ passwordAria: "ਪਾਸਵਰਡ",
2511
+ passwordConfirm: "ਪਾਸਵਰਡ ਪੁਸ਼ਟੀ",
2512
+ passwordConfirmPlaceholder: "ਪਾਸਵਰਡ ਦੁਹਰਾਓ",
2513
+ passwordConfirmAria: "ਪਾਸਵਰਡ ਪੁਸ਼ਟੀ",
2514
+ firstName: "ਪਹਿਲਾ ਨਾਂ",
2515
+ firstNamePlaceholder: "Max",
2516
+ firstNameAria: "ਪਹਿਲਾ ਨਾਂ",
2517
+ lastName: "ਅੰਤਿਮ ਨਾਂ",
2518
+ lastNamePlaceholder: "Mustermann",
2519
+ lastNameAria: "ਅੰਤਿਮ ਨਾਂ",
2520
+ birthDate: "ਜਨਮ ਤਾਰੀਖ",
2521
+ birthDateAria: "ਜਨਮ ਤਾਰੀਖ",
2522
+ nationality: "ਰਾਸ਼ਟਰਤਾ",
2523
+ nationalityPlaceholder: "IN",
2524
+ nationalityAria: "ਰਾਸ਼ਟਰਤਾ",
2525
+ street: "ਗਲੀ",
2526
+ streetPlaceholder: "ਸਟ੍ਰੀਟ 1",
2527
+ streetAria: "ਗਲੀ",
2528
+ zip: "ਪੋਸਟ ਕੋਡ",
2529
+ zipPlaceholder: "12345",
2530
+ zipAria: "ਪੋਸਟ ਕੋਡ",
2531
+ city: "ਸ਼ਹਿਰ",
2532
+ cityPlaceholder: "Amritsar",
2533
+ cityAria: "ਸ਼ਹਿਰ",
2534
+ country: "ਦੇਸ਼",
2535
+ countryPlaceholder: "IN",
2536
+ countryAria: "ਦੇਸ਼",
2537
+ consentsTitle: "ਸਹਿਮਤੀ",
2538
+ back: "ਵਾਪਸ",
2539
+ next: "ਅੱਗੇ",
2540
+ register: "ਰਜਿਸਟਰ",
2541
+ successTitle: "Registration ho gaya",
2542
+ messageChecking: "ਈਮੇਲ ਜਾਂਚ ਰਹੇ ਹਾਂ...",
2543
+ messageEmailAvailable: "ਈਮੇਲ ਉਪਲਬਧ ਹੈ।",
2544
+ messageEmailUnavailable: "ਈਮੇਲ ਵਰਤੋਂ ਵਿੱਚ ਹੈ।",
2545
+ messageRequiredEmail: "ਈਮੇਲ ਦਿਓ।",
2546
+ messageInvalidEmail: "ਠੀਕ ਈਮੇਲ ਦਿਓ।",
2547
+ messageRequiredPassword: "ਪਾਸਵਰਡ ਦਿਓ।",
2548
+ messageRequiredPasswordConfirm: "ਪਾਸਵਰਡ ਪੁਸ਼ਟੀ ਕਰੋ।",
2549
+ messageRequiredField: "ਲਾਜ਼ਮੀ ਖੇਤਰ ਭਰੋ।",
2550
+ messageAvailabilityFailed: "ਈਮੇਲ ਜਾਂਚ ਅਸਫਲ।",
2551
+ messageAvailabilityNotConfigured: "ਈਮੇਲ ਜਾਂਚ ਸੰਰਚਿਤ ਨਹੀਂ।",
2552
+ messageAvailabilityRequired: "ਪਹਿਲਾਂ ਈਮੇਲ ਜਾਂਚੋ।",
2553
+ messagePasswordMismatch: "ਪਾਸਵਰਡ ਨਹੀਂ ਮਿਲਦੇ।",
2554
+ messageRequiredConsents: "ਲਾਜ਼ਮੀ ਸਹਿਮਤੀਆਂ ਮਨਜ਼ੂਰ ਕਰੋ।",
2555
+ messageRegisterFailed: "ਰਜਿਸਟਰੇਸ਼ਨ ਅਸਫਲ।",
2556
+ messageRegisterNotConfigured: "ਰਜਿਸਟਰੇਸ਼ਨ ਸੰਰਚਿਤ ਨਹੀਂ।",
2557
+ };
2558
+ case "mr":
2559
+ return {
2560
+ stepEmail: "ईमेल",
2561
+ stepPassword: "पासवर्ड",
2562
+ stepProfile: "प्रोफाइल",
2563
+ stepAddress: "पत्ता",
2564
+ stepConsents: "संमती",
2565
+ stepAccount: "Khata",
2566
+ stepProfileGroup: "Profile",
2567
+ stepConsentsGroup: "Sammati",
2568
+ subEmail: "Email",
2569
+ subPassword: "Password",
2570
+ subProfile: "Profile",
2571
+ subAddress: "Pata",
2572
+ subConsents: "Sammati",
2573
+ email: "ईमेल",
2574
+ emailPlaceholder: "name@example.com",
2575
+ emailAria: "ईमेल",
2576
+ password: "पासवर्ड",
2577
+ passwordAria: "पासवर्ड",
2578
+ passwordConfirm: "पासवर्ड पुष्टी",
2579
+ passwordConfirmPlaceholder: "पासवर्ड पुन्हा टाका",
2580
+ passwordConfirmAria: "पासवर्ड पुष्टी",
2581
+ firstName: "पहिले नाव",
2582
+ firstNamePlaceholder: "Max",
2583
+ firstNameAria: "पहिले नाव",
2584
+ lastName: "आडनाव",
2585
+ lastNamePlaceholder: "Mustermann",
2586
+ lastNameAria: "आडनाव",
2587
+ birthDate: "जन्म तारीख",
2588
+ birthDateAria: "जन्म तारीख",
2589
+ nationality: "राष्ट्रीयत्व",
2590
+ nationalityPlaceholder: "IN",
2591
+ nationalityAria: "राष्ट्रीयत्व",
2592
+ street: "रस्ता",
2593
+ streetPlaceholder: "स्ट्रीट 1",
2594
+ streetAria: "रस्ता",
2595
+ zip: "पिन",
2596
+ zipPlaceholder: "12345",
2597
+ zipAria: "पिन",
2598
+ city: "शहर",
2599
+ cityPlaceholder: "Mumbai",
2600
+ cityAria: "शहर",
2601
+ country: "देश",
2602
+ countryPlaceholder: "IN",
2603
+ countryAria: "देश",
2604
+ consentsTitle: "संमती",
2605
+ back: "मागे",
2606
+ next: "पुढे",
2607
+ register: "नोंदणी",
2608
+ successTitle: "Nondani purna",
2609
+ messageChecking: "ईमेल तपासत आहे...",
2610
+ messageEmailAvailable: "ईमेल उपलब्ध आहे.",
2611
+ messageEmailUnavailable: "ईमेल आधीच वापरात आहे.",
2612
+ messageRequiredEmail: "ईमेल भरा.",
2613
+ messageInvalidEmail: "वैध ईमेल भरा.",
2614
+ messageRequiredPassword: "पासवर्ड भरा.",
2615
+ messageRequiredPasswordConfirm: "पासवर्ड पुष्टी करा.",
2616
+ messageRequiredField: "आवश्यक फील्ड भरा.",
2617
+ messageAvailabilityFailed: "ईमेल तपासणी अयशस्वी.",
2618
+ messageAvailabilityNotConfigured: "ईमेल तपासणी सेट नाही.",
2619
+ messageAvailabilityRequired: "आधी ईमेल तपासा.",
2620
+ messagePasswordMismatch: "पासवर्ड जुळत नाहीत.",
2621
+ messageRequiredConsents: "आवश्यक संमती द्या.",
2622
+ messageRegisterFailed: "नोंदणी अयशस्वी.",
2623
+ messageRegisterNotConfigured: "नोंदणी सेट नाही.",
2624
+ };
2625
+ case "fr":
2626
+ return {
2627
+ stepEmail: "Email",
2628
+ stepPassword: "Mot de passe",
2629
+ stepProfile: "Profil",
2630
+ stepAddress: "Adresse",
2631
+ stepConsents: "Consentements",
2632
+ stepAccount: "Compte",
2633
+ stepProfileGroup: "Profil",
2634
+ stepConsentsGroup: "Consentements",
2635
+ subEmail: "Email",
2636
+ subPassword: "Mot de passe",
2637
+ subProfile: "Profil",
2638
+ subAddress: "Adresse",
2639
+ subConsents: "Consentements",
2640
+ email: "Email",
2641
+ emailPlaceholder: "nom@exemple.com",
2642
+ emailAria: "Email",
2643
+ password: "Mot de passe",
2644
+ passwordAria: "Mot de passe",
2645
+ passwordConfirm: "Confirmer le mot de passe",
2646
+ passwordConfirmPlaceholder: "Repeter le mot de passe",
2647
+ passwordConfirmAria: "Confirmer le mot de passe",
2648
+ firstName: "Prenom",
2649
+ firstNamePlaceholder: "Max",
2650
+ firstNameAria: "Prenom",
2651
+ lastName: "Nom",
2652
+ lastNamePlaceholder: "Mustermann",
2653
+ lastNameAria: "Nom",
2654
+ birthDate: "Date de naissance",
2655
+ birthDateAria: "Date de naissance",
2656
+ nationality: "Nationalite",
2657
+ nationalityPlaceholder: "FR",
2658
+ nationalityAria: "Nationalite",
2659
+ street: "Rue",
2660
+ streetPlaceholder: "Rue 1",
2661
+ streetAria: "Rue",
2662
+ zip: "Code postal",
2663
+ zipPlaceholder: "12345",
2664
+ zipAria: "Code postal",
2665
+ city: "Ville",
2666
+ cityPlaceholder: "Paris",
2667
+ cityAria: "Ville",
2668
+ country: "Pays",
2669
+ countryPlaceholder: "FR",
2670
+ countryAria: "Pays",
2671
+ consentsTitle: "Consentements",
2672
+ back: "Retour",
2673
+ next: "Suivant",
2674
+ register: "S'inscrire",
2675
+ successTitle: "Inscription terminee",
2676
+ messageChecking: "Verification de l'email...",
2677
+ messageEmailAvailable: "Email disponible.",
2678
+ messageEmailUnavailable: "Email deja utilise.",
2679
+ messageRequiredEmail: "Veuillez saisir un email.",
2680
+ messageInvalidEmail: "Veuillez saisir un email valide.",
2681
+ messageRequiredPassword: "Veuillez saisir un mot de passe.",
2682
+ messageRequiredPasswordConfirm: "Veuillez confirmer le mot de passe.",
2683
+ messageRequiredField: "Veuillez remplir les champs obligatoires.",
2684
+ messageAvailabilityFailed: "Verification echouee.",
2685
+ messageAvailabilityNotConfigured: "Verification non configuree.",
2686
+ messageAvailabilityRequired: "Veuillez verifier l'email d'abord.",
2687
+ messagePasswordMismatch: "Les mots de passe ne correspondent pas.",
2688
+ messageRequiredConsents: "Veuillez accepter les consentements requis.",
2689
+ messageRegisterFailed: "Inscription echouee.",
2690
+ messageRegisterNotConfigured: "Inscription non configuree.",
2691
+ };
2692
+ case "it":
2693
+ return {
2694
+ stepEmail: "Email",
2695
+ stepPassword: "Password",
2696
+ stepProfile: "Profilo",
2697
+ stepAddress: "Indirizzo",
2698
+ stepConsents: "Consensi",
2699
+ stepAccount: "Account",
2700
+ stepProfileGroup: "Profilo",
2701
+ stepConsentsGroup: "Consensi",
2702
+ subEmail: "Email",
2703
+ subPassword: "Password",
2704
+ subProfile: "Profilo",
2705
+ subAddress: "Indirizzo",
2706
+ subConsents: "Consensi",
2707
+ email: "Email",
2708
+ emailPlaceholder: "nome@esempio.com",
2709
+ emailAria: "Email",
2710
+ password: "Password",
2711
+ passwordAria: "Password",
2712
+ passwordConfirm: "Conferma password",
2713
+ passwordConfirmPlaceholder: "Ripeti password",
2714
+ passwordConfirmAria: "Conferma password",
2715
+ firstName: "Nome",
2716
+ firstNamePlaceholder: "Max",
2717
+ firstNameAria: "Nome",
2718
+ lastName: "Cognome",
2719
+ lastNamePlaceholder: "Mustermann",
2720
+ lastNameAria: "Cognome",
2721
+ birthDate: "Data di nascita",
2722
+ birthDateAria: "Data di nascita",
2723
+ nationality: "Nazionalita",
2724
+ nationalityPlaceholder: "IT",
2725
+ nationalityAria: "Nazionalita",
2726
+ street: "Via",
2727
+ streetPlaceholder: "Via 1",
2728
+ streetAria: "Via",
2729
+ zip: "CAP",
2730
+ zipPlaceholder: "12345",
2731
+ zipAria: "CAP",
2732
+ city: "Citta",
2733
+ cityPlaceholder: "Roma",
2734
+ cityAria: "Citta",
2735
+ country: "Paese",
2736
+ countryPlaceholder: "IT",
2737
+ countryAria: "Paese",
2738
+ consentsTitle: "Consensi",
2739
+ back: "Indietro",
2740
+ next: "Avanti",
2741
+ register: "Registrati",
2742
+ successTitle: "Registrazione completata",
2743
+ messageChecking: "Verifica email...",
2744
+ messageEmailAvailable: "Email disponibile.",
2745
+ messageEmailUnavailable: "Email gia usata.",
2746
+ messageRequiredEmail: "Inserisci email.",
2747
+ messageInvalidEmail: "Inserisci email valida.",
2748
+ messageRequiredPassword: "Inserisci password.",
2749
+ messageRequiredPasswordConfirm: "Conferma la password.",
2750
+ messageRequiredField: "Compila i campi obbligatori.",
2751
+ messageAvailabilityFailed: "Verifica fallita.",
2752
+ messageAvailabilityNotConfigured: "Verifica non configurata.",
2753
+ messageAvailabilityRequired: "Verifica prima l'email.",
2754
+ messagePasswordMismatch: "Le password non corrispondono.",
2755
+ messageRequiredConsents: "Accetta i consensi richiesti.",
2756
+ messageRegisterFailed: "Registrazione fallita.",
2757
+ messageRegisterNotConfigured: "Registrazione non configurata.",
2758
+ };
2759
+ case "nl":
2760
+ return {
2761
+ stepEmail: "Email",
2762
+ stepPassword: "Wachtwoord",
2763
+ stepProfile: "Profiel",
2764
+ stepAddress: "Adres",
2765
+ stepConsents: "Toestemmingen",
2766
+ stepAccount: "Account",
2767
+ stepProfileGroup: "Profiel",
2768
+ stepConsentsGroup: "Toestemmingen",
2769
+ subEmail: "Email",
2770
+ subPassword: "Wachtwoord",
2771
+ subProfile: "Profiel",
2772
+ subAddress: "Adres",
2773
+ subConsents: "Toestemmingen",
2774
+ email: "Email",
2775
+ emailPlaceholder: "naam@voorbeeld.com",
2776
+ emailAria: "Email",
2777
+ password: "Wachtwoord",
2778
+ passwordAria: "Wachtwoord",
2779
+ passwordConfirm: "Bevestig wachtwoord",
2780
+ passwordConfirmPlaceholder: "Herhaal wachtwoord",
2781
+ passwordConfirmAria: "Bevestig wachtwoord",
2782
+ firstName: "Voornaam",
2783
+ firstNamePlaceholder: "Max",
2784
+ firstNameAria: "Voornaam",
2785
+ lastName: "Achternaam",
2786
+ lastNamePlaceholder: "Mustermann",
2787
+ lastNameAria: "Achternaam",
2788
+ birthDate: "Geboortedatum",
2789
+ birthDateAria: "Geboortedatum",
2790
+ nationality: "Nationaliteit",
2791
+ nationalityPlaceholder: "NL",
2792
+ nationalityAria: "Nationaliteit",
2793
+ street: "Straat",
2794
+ streetPlaceholder: "Straat 1",
2795
+ streetAria: "Straat",
2796
+ zip: "Postcode",
2797
+ zipPlaceholder: "12345",
2798
+ zipAria: "Postcode",
2799
+ city: "Stad",
2800
+ cityPlaceholder: "Amsterdam",
2801
+ cityAria: "Stad",
2802
+ country: "Land",
2803
+ countryPlaceholder: "NL",
2804
+ countryAria: "Land",
2805
+ consentsTitle: "Toestemmingen",
2806
+ back: "Terug",
2807
+ next: "Volgende",
2808
+ register: "Registreren",
2809
+ successTitle: "Registratie voltooid",
2810
+ messageChecking: "Email controleren...",
2811
+ messageEmailAvailable: "Email is beschikbaar.",
2812
+ messageEmailUnavailable: "Email is al in gebruik.",
2813
+ messageRequiredEmail: "Vul een email in.",
2814
+ messageInvalidEmail: "Vul een geldig email in.",
2815
+ messageRequiredPassword: "Vul een wachtwoord in.",
2816
+ messageRequiredPasswordConfirm: "Bevestig het wachtwoord.",
2817
+ messageRequiredField: "Vul de verplichte velden in.",
2818
+ messageAvailabilityFailed: "Controle mislukt.",
2819
+ messageAvailabilityNotConfigured: "Controle niet ingesteld.",
2820
+ messageAvailabilityRequired: "Controleer eerst het emailadres.",
2821
+ messagePasswordMismatch: "Wachtwoorden komen niet overeen.",
2822
+ messageRequiredConsents: "Accepteer de verplichte toestemmingen.",
2823
+ messageRegisterFailed: "Registratie mislukt.",
2824
+ messageRegisterNotConfigured: "Registratie niet ingesteld.",
2825
+ };
2826
+ case "sv":
2827
+ return {
2828
+ stepEmail: "E-post",
2829
+ stepPassword: "Losenord",
2830
+ stepProfile: "Profil",
2831
+ stepAddress: "Adress",
2832
+ stepConsents: "Samtycken",
2833
+ stepAccount: "Konto",
2834
+ stepProfileGroup: "Profil",
2835
+ stepConsentsGroup: "Samtycken",
2836
+ subEmail: "E-post",
2837
+ subPassword: "Losenord",
2838
+ subProfile: "Profil",
2839
+ subAddress: "Adress",
2840
+ subConsents: "Samtycken",
2841
+ email: "E-post",
2842
+ emailPlaceholder: "namn@exempel.se",
2843
+ emailAria: "E-post",
2844
+ password: "Losenord",
2845
+ passwordAria: "Losenord",
2846
+ passwordConfirm: "Bekrafta losenord",
2847
+ passwordConfirmPlaceholder: "Upprepa losenord",
2848
+ passwordConfirmAria: "Bekrafta losenord",
2849
+ firstName: "Fornamn",
2850
+ firstNamePlaceholder: "Max",
2851
+ firstNameAria: "Fornamn",
2852
+ lastName: "Efternamn",
2853
+ lastNamePlaceholder: "Mustermann",
2854
+ lastNameAria: "Efternamn",
2855
+ birthDate: "Fodelsedatum",
2856
+ birthDateAria: "Fodelsedatum",
2857
+ nationality: "Nationalitet",
2858
+ nationalityPlaceholder: "SE",
2859
+ nationalityAria: "Nationalitet",
2860
+ street: "Gata",
2861
+ streetPlaceholder: "Gata 1",
2862
+ streetAria: "Gata",
2863
+ zip: "Postnummer",
2864
+ zipPlaceholder: "12345",
2865
+ zipAria: "Postnummer",
2866
+ city: "Stad",
2867
+ cityPlaceholder: "Stockholm",
2868
+ cityAria: "Stad",
2869
+ country: "Land",
2870
+ countryPlaceholder: "SE",
2871
+ countryAria: "Land",
2872
+ consentsTitle: "Samtycken",
2873
+ back: "Tillbaka",
2874
+ next: "Nasta",
2875
+ register: "Registrera",
2876
+ successTitle: "Registrering klar",
2877
+ messageChecking: "Kontrollerar e-post...",
2878
+ messageEmailAvailable: "E-post ar tillganglig.",
2879
+ messageEmailUnavailable: "E-post ar redan upptagen.",
2880
+ messageRequiredEmail: "Ange e-post.",
2881
+ messageInvalidEmail: "Ange giltig e-post.",
2882
+ messageRequiredPassword: "Ange losenord.",
2883
+ messageRequiredPasswordConfirm: "Bekrafta losenord.",
2884
+ messageRequiredField: "Fyll i obligatoriska fält.",
2885
+ messageAvailabilityFailed: "Kontroll misslyckades.",
2886
+ messageAvailabilityNotConfigured: "Kontroll ej konfigurerad.",
2887
+ messageAvailabilityRequired: "Kontrollera e-post forst.",
2888
+ messagePasswordMismatch: "Losenorden matchar inte.",
2889
+ messageRequiredConsents: "Godkann obligatoriska samtycken.",
2890
+ messageRegisterFailed: "Registrering misslyckades.",
2891
+ messageRegisterNotConfigured: "Registrering ej konfigurerad.",
2892
+ };
2893
+ case "pl":
2894
+ return {
2895
+ stepEmail: "Email",
2896
+ stepPassword: "Haslo",
2897
+ stepProfile: "Profil",
2898
+ stepAddress: "Adres",
2899
+ stepConsents: "Zgody",
2900
+ stepAccount: "Konto",
2901
+ stepProfileGroup: "Profil",
2902
+ stepConsentsGroup: "Zgody",
2903
+ subEmail: "Email",
2904
+ subPassword: "Haslo",
2905
+ subProfile: "Profil",
2906
+ subAddress: "Adres",
2907
+ subConsents: "Zgody",
2908
+ email: "Email",
2909
+ emailPlaceholder: "name@example.com",
2910
+ emailAria: "Email",
2911
+ password: "Haslo",
2912
+ passwordAria: "Haslo",
2913
+ passwordConfirm: "Potwierdz haslo",
2914
+ passwordConfirmPlaceholder: "Powtorz haslo",
2915
+ passwordConfirmAria: "Potwierdz haslo",
2916
+ firstName: "Imie",
2917
+ firstNamePlaceholder: "Max",
2918
+ firstNameAria: "Imie",
2919
+ lastName: "Nazwisko",
2920
+ lastNamePlaceholder: "Mustermann",
2921
+ lastNameAria: "Nazwisko",
2922
+ birthDate: "Data urodzenia",
2923
+ birthDateAria: "Data urodzenia",
2924
+ nationality: "Narodowosc",
2925
+ nationalityPlaceholder: "PL",
2926
+ nationalityAria: "Narodowosc",
2927
+ street: "Ulica",
2928
+ streetPlaceholder: "Ulica 1",
2929
+ streetAria: "Ulica",
2930
+ zip: "Kod pocztowy",
2931
+ zipPlaceholder: "12345",
2932
+ zipAria: "Kod pocztowy",
2933
+ city: "Miasto",
2934
+ cityPlaceholder: "Warszawa",
2935
+ cityAria: "Miasto",
2936
+ country: "Kraj",
2937
+ countryPlaceholder: "PL",
2938
+ countryAria: "Kraj",
2939
+ consentsTitle: "Zgody",
2940
+ back: "Wstecz",
2941
+ next: "Dalej",
2942
+ register: "Rejestracja",
2943
+ successTitle: "Rejestracja zakonczona",
2944
+ messageChecking: "Sprawdzanie email...",
2945
+ messageEmailAvailable: "Email dostepny.",
2946
+ messageEmailUnavailable: "Email zajety.",
2947
+ messageRequiredEmail: "Wpisz email.",
2948
+ messageInvalidEmail: "Wpisz poprawny email.",
2949
+ messageRequiredPassword: "Wpisz haslo.",
2950
+ messageRequiredPasswordConfirm: "Potwierdz haslo.",
2951
+ messageRequiredField: "Wypelnij wymagane pola.",
2952
+ messageAvailabilityFailed: "Sprawdzenie nie powiodlo sie.",
2953
+ messageAvailabilityNotConfigured: "Sprawdzenie nie skonfigurowane.",
2954
+ messageAvailabilityRequired: "Najpierw sprawdz email.",
2955
+ messagePasswordMismatch: "Hasla nie sa zgodne.",
2956
+ messageRequiredConsents: "Zaakceptuj wymagane zgody.",
2957
+ messageRegisterFailed: "Rejestracja nieudana.",
2958
+ messageRegisterNotConfigured: "Rejestracja nie skonfigurowana.",
2959
+ };
2960
+ case "da":
2961
+ return {
2962
+ stepEmail: "Email",
2963
+ stepPassword: "Adgangskode",
2964
+ stepProfile: "Profil",
2965
+ stepAddress: "Adresse",
2966
+ stepConsents: "Samtykker",
2967
+ stepAccount: "Konto",
2968
+ stepProfileGroup: "Profil",
2969
+ stepConsentsGroup: "Samtykker",
2970
+ subEmail: "Email",
2971
+ subPassword: "Adgangskode",
2972
+ subProfile: "Profil",
2973
+ subAddress: "Adresse",
2974
+ subConsents: "Samtykker",
2975
+ email: "Email",
2976
+ emailPlaceholder: "navn@example.com",
2977
+ emailAria: "Email",
2978
+ password: "Adgangskode",
2979
+ passwordAria: "Adgangskode",
2980
+ passwordConfirm: "Bekraeft adgangskode",
2981
+ passwordConfirmPlaceholder: "Gentag adgangskode",
2982
+ passwordConfirmAria: "Bekraeft adgangskode",
2983
+ firstName: "Fornavn",
2984
+ firstNamePlaceholder: "Max",
2985
+ firstNameAria: "Fornavn",
2986
+ lastName: "Efternavn",
2987
+ lastNamePlaceholder: "Mustermann",
2988
+ lastNameAria: "Efternavn",
2989
+ birthDate: "Foedselsdato",
2990
+ birthDateAria: "Foedselsdato",
2991
+ nationality: "Nationalitet",
2992
+ nationalityPlaceholder: "DK",
2993
+ nationalityAria: "Nationalitet",
2994
+ street: "Gade",
2995
+ streetPlaceholder: "Gade 1",
2996
+ streetAria: "Gade",
2997
+ zip: "Postnummer",
2998
+ zipPlaceholder: "12345",
2999
+ zipAria: "Postnummer",
3000
+ city: "By",
3001
+ cityPlaceholder: "Kobenhavn",
3002
+ cityAria: "By",
3003
+ country: "Land",
3004
+ countryPlaceholder: "DK",
3005
+ countryAria: "Land",
3006
+ consentsTitle: "Samtykker",
3007
+ back: "Tilbage",
3008
+ next: "Naeste",
3009
+ register: "Registrer",
3010
+ successTitle: "Registrering gennemfort",
3011
+ messageChecking: "Tjekker email...",
3012
+ messageEmailAvailable: "Email er tilgaengelig.",
3013
+ messageEmailUnavailable: "Email er allerede i brug.",
3014
+ messageRequiredEmail: "Indtast email.",
3015
+ messageInvalidEmail: "Indtast gyldig email.",
3016
+ messageRequiredPassword: "Indtast adgangskode.",
3017
+ messageRequiredPasswordConfirm: "Bekraeft adgangskode.",
3018
+ messageRequiredField: "Udfyld paakraevet felter.",
3019
+ messageAvailabilityFailed: "Tjek mislykkedes.",
3020
+ messageAvailabilityNotConfigured: "Tjek ikke konfigureret.",
3021
+ messageAvailabilityRequired: "Tjek email foerst.",
3022
+ messagePasswordMismatch: "Adgangskoder matcher ikke.",
3023
+ messageRequiredConsents: "Accepter obligatoriske samtykker.",
3024
+ messageRegisterFailed: "Registrering mislykkedes.",
3025
+ messageRegisterNotConfigured: "Registrering ikke konfigureret.",
3026
+ };
3027
+ case "no":
3028
+ return {
3029
+ stepEmail: "E-post",
3030
+ stepPassword: "Passord",
3031
+ stepProfile: "Profil",
3032
+ stepAddress: "Adresse",
3033
+ stepConsents: "Samtykker",
3034
+ stepAccount: "Konto",
3035
+ stepProfileGroup: "Profil",
3036
+ stepConsentsGroup: "Samtykker",
3037
+ subEmail: "E-post",
3038
+ subPassword: "Passord",
3039
+ subProfile: "Profil",
3040
+ subAddress: "Adresse",
3041
+ subConsents: "Samtykker",
3042
+ email: "E-post",
3043
+ emailPlaceholder: "navn@example.com",
3044
+ emailAria: "E-post",
3045
+ password: "Passord",
3046
+ passwordAria: "Passord",
3047
+ passwordConfirm: "Bekreft passord",
3048
+ passwordConfirmPlaceholder: "Gjenta passord",
3049
+ passwordConfirmAria: "Bekreft passord",
3050
+ firstName: "Fornavn",
3051
+ firstNamePlaceholder: "Max",
3052
+ firstNameAria: "Fornavn",
3053
+ lastName: "Etternavn",
3054
+ lastNamePlaceholder: "Mustermann",
3055
+ lastNameAria: "Etternavn",
3056
+ birthDate: "Fodselsdato",
3057
+ birthDateAria: "Fodselsdato",
3058
+ nationality: "Nasjonalitet",
3059
+ nationalityPlaceholder: "NO",
3060
+ nationalityAria: "Nasjonalitet",
3061
+ street: "Gate",
3062
+ streetPlaceholder: "Gate 1",
3063
+ streetAria: "Gate",
3064
+ zip: "Postnummer",
3065
+ zipPlaceholder: "12345",
3066
+ zipAria: "Postnummer",
3067
+ city: "By",
3068
+ cityPlaceholder: "Oslo",
3069
+ cityAria: "By",
3070
+ country: "Land",
3071
+ countryPlaceholder: "NO",
3072
+ countryAria: "Land",
3073
+ consentsTitle: "Samtykker",
3074
+ back: "Tilbake",
3075
+ next: "Neste",
3076
+ register: "Registrer",
3077
+ successTitle: "Registrering fullfort",
3078
+ messageChecking: "Sjekker e-post...",
3079
+ messageEmailAvailable: "E-post er tilgjengelig.",
3080
+ messageEmailUnavailable: "E-post er allerede i bruk.",
3081
+ messageRequiredEmail: "Skriv inn e-post.",
3082
+ messageInvalidEmail: "Skriv inn gyldig e-post.",
3083
+ messageRequiredPassword: "Skriv inn passord.",
3084
+ messageRequiredPasswordConfirm: "Bekreft passord.",
3085
+ messageRequiredField: "Fyll ut obligatoriske felter.",
3086
+ messageAvailabilityFailed: "Sjekk feilet.",
3087
+ messageAvailabilityNotConfigured: "Sjekk ikke konfigurert.",
3088
+ messageAvailabilityRequired: "Sjekk e-post først.",
3089
+ messagePasswordMismatch: "Passord stemmer ikke.",
3090
+ messageRequiredConsents: "Godta obligatoriske samtykker.",
3091
+ messageRegisterFailed: "Registrering feilet.",
3092
+ messageRegisterNotConfigured: "Registrering ikke konfigurert.",
3093
+ };
3094
+ case "fi":
3095
+ return {
3096
+ stepEmail: "Sahkoposti",
3097
+ stepPassword: "Salasana",
3098
+ stepProfile: "Profiili",
3099
+ stepAddress: "Osoite",
3100
+ stepConsents: "Suostumukset",
3101
+ stepAccount: "Tili",
3102
+ stepProfileGroup: "Profiili",
3103
+ stepConsentsGroup: "Suostumukset",
3104
+ subEmail: "Sahkoposti",
3105
+ subPassword: "Salasana",
3106
+ subProfile: "Profiili",
3107
+ subAddress: "Osoite",
3108
+ subConsents: "Suostumukset",
3109
+ email: "Sahkoposti",
3110
+ emailPlaceholder: "nimi@example.com",
3111
+ emailAria: "Sahkoposti",
3112
+ password: "Salasana",
3113
+ passwordAria: "Salasana",
3114
+ passwordConfirm: "Vahvista salasana",
3115
+ passwordConfirmPlaceholder: "Toista salasana",
3116
+ passwordConfirmAria: "Vahvista salasana",
3117
+ firstName: "Etunimi",
3118
+ firstNamePlaceholder: "Max",
3119
+ firstNameAria: "Etunimi",
3120
+ lastName: "Sukunimi",
3121
+ lastNamePlaceholder: "Mustermann",
3122
+ lastNameAria: "Sukunimi",
3123
+ birthDate: "Syntymaaika",
3124
+ birthDateAria: "Syntymaaika",
3125
+ nationality: "Kansallisuus",
3126
+ nationalityPlaceholder: "FI",
3127
+ nationalityAria: "Kansallisuus",
3128
+ street: "Katu",
3129
+ streetPlaceholder: "Katu 1",
3130
+ streetAria: "Katu",
3131
+ zip: "Postinumero",
3132
+ zipPlaceholder: "12345",
3133
+ zipAria: "Postinumero",
3134
+ city: "Kaupunki",
3135
+ cityPlaceholder: "Helsinki",
3136
+ cityAria: "Kaupunki",
3137
+ country: "Maa",
3138
+ countryPlaceholder: "FI",
3139
+ countryAria: "Maa",
3140
+ consentsTitle: "Suostumukset",
3141
+ back: "Takaisin",
3142
+ next: "Seuraava",
3143
+ register: "Rekisteroidy",
3144
+ successTitle: "Rekisterointi valmis",
3145
+ messageChecking: "Tarkistetaan sahkoposti...",
3146
+ messageEmailAvailable: "Sahkoposti on saatavilla.",
3147
+ messageEmailUnavailable: "Sahkoposti on jo kaytossa.",
3148
+ messageRequiredEmail: "Syota sahkoposti.",
3149
+ messageInvalidEmail: "Syota kelvollinen sahkoposti.",
3150
+ messageRequiredPassword: "Syota salasana.",
3151
+ messageRequiredPasswordConfirm: "Vahvista salasana.",
3152
+ messageRequiredField: "Tayta pakolliset kentat.",
3153
+ messageAvailabilityFailed: "Tarkistus epaaonnistui.",
3154
+ messageAvailabilityNotConfigured: "Tarkistus ei ole maaritetty.",
3155
+ messageAvailabilityRequired: "Tarkista sahkoposti ensin.",
3156
+ messagePasswordMismatch: "Salasanat eivat tasmää.",
3157
+ messageRequiredConsents: "Hyvaksy pakolliset suostumukset.",
3158
+ messageRegisterFailed: "Rekisterointi epaonnistui.",
3159
+ messageRegisterNotConfigured: "Rekisterointi ei ole maaritetty.",
3160
+ };
3161
+ case "cs":
3162
+ return {
3163
+ stepEmail: "Email",
3164
+ stepPassword: "Heslo",
3165
+ stepProfile: "Profil",
3166
+ stepAddress: "Adresa",
3167
+ stepConsents: "Souhlasy",
3168
+ stepAccount: "Ucet",
3169
+ stepProfileGroup: "Profil",
3170
+ stepConsentsGroup: "Souhlasy",
3171
+ subEmail: "Email",
3172
+ subPassword: "Heslo",
3173
+ subProfile: "Profil",
3174
+ subAddress: "Adresa",
3175
+ subConsents: "Souhlasy",
3176
+ email: "Email",
3177
+ emailPlaceholder: "name@example.com",
3178
+ emailAria: "Email",
3179
+ password: "Heslo",
3180
+ passwordAria: "Heslo",
3181
+ passwordConfirm: "Potvrdit heslo",
3182
+ passwordConfirmPlaceholder: "Zopakujte heslo",
3183
+ passwordConfirmAria: "Potvrdit heslo",
3184
+ firstName: "Jmeno",
3185
+ firstNamePlaceholder: "Max",
3186
+ firstNameAria: "Jmeno",
3187
+ lastName: "Prijmeni",
3188
+ lastNamePlaceholder: "Mustermann",
3189
+ lastNameAria: "Prijmeni",
3190
+ birthDate: "Datum narozeni",
3191
+ birthDateAria: "Datum narozeni",
3192
+ nationality: "Narodnost",
3193
+ nationalityPlaceholder: "CZ",
3194
+ nationalityAria: "Narodnost",
3195
+ street: "Ulice",
3196
+ streetPlaceholder: "Ulice 1",
3197
+ streetAria: "Ulice",
3198
+ zip: "PSC",
3199
+ zipPlaceholder: "12345",
3200
+ zipAria: "PSC",
3201
+ city: "Mesto",
3202
+ cityPlaceholder: "Praha",
3203
+ cityAria: "Mesto",
3204
+ country: "Zeme",
3205
+ countryPlaceholder: "CZ",
3206
+ countryAria: "Zeme",
3207
+ consentsTitle: "Souhlasy",
3208
+ back: "Zpet",
3209
+ next: "Dal",
3210
+ register: "Registrovat",
3211
+ successTitle: "Registrace dokoncena",
3212
+ messageChecking: "Overovani emailu...",
3213
+ messageEmailAvailable: "Email je dostupny.",
3214
+ messageEmailUnavailable: "Email je obsazeny.",
3215
+ messageRequiredEmail: "Zadejte email.",
3216
+ messageInvalidEmail: "Zadejte platny email.",
3217
+ messageRequiredPassword: "Zadejte heslo.",
3218
+ messageRequiredPasswordConfirm: "Potvrdte heslo.",
3219
+ messageRequiredField: "Vyplnte povinna pole.",
3220
+ messageAvailabilityFailed: "Overeni selhalo.",
3221
+ messageAvailabilityNotConfigured: "Overeni neni nastaveno.",
3222
+ messageAvailabilityRequired: "Nejprve overte email.",
3223
+ messagePasswordMismatch: "Hesla se neshoduji.",
3224
+ messageRequiredConsents: "Potvrdte povinne souhlasy.",
3225
+ messageRegisterFailed: "Registrace selhala.",
3226
+ messageRegisterNotConfigured: "Registrace neni nastavena.",
3227
+ };
3228
+ default:
3229
+ return {
3230
+ stepEmail: "Email",
3231
+ stepPassword: "Password",
3232
+ stepProfile: "Profile",
3233
+ stepAddress: "Address",
3234
+ stepConsents: "Consents",
3235
+ stepAccount: "Account",
3236
+ stepProfileGroup: "Profile",
3237
+ stepConsentsGroup: "Consents",
3238
+ subEmail: "Email",
3239
+ subPassword: "Password",
3240
+ subProfile: "Profile",
3241
+ subAddress: "Address",
3242
+ subConsents: "Consents",
3243
+ email: "Email",
3244
+ emailPlaceholder: "name@example.com",
3245
+ emailAria: "Email",
3246
+ password: "Password",
3247
+ passwordAria: "Password",
3248
+ passwordConfirm: "Confirm password",
3249
+ passwordConfirmPlaceholder: "Repeat password",
3250
+ passwordConfirmAria: "Confirm password",
3251
+ firstName: "First name",
3252
+ firstNamePlaceholder: "Max",
3253
+ firstNameAria: "First name",
3254
+ lastName: "Last name",
3255
+ lastNamePlaceholder: "Mustermann",
3256
+ lastNameAria: "Last name",
3257
+ birthDate: "Birth date",
3258
+ birthDateAria: "Birth date",
3259
+ nationality: "Nationality",
3260
+ nationalityPlaceholder: "DE",
3261
+ nationalityAria: "Nationality",
3262
+ street: "Street",
3263
+ streetPlaceholder: "Street 1",
3264
+ streetAria: "Street",
3265
+ zip: "ZIP",
3266
+ zipPlaceholder: "12345",
3267
+ zipAria: "ZIP",
3268
+ city: "City",
3269
+ cityPlaceholder: "Berlin",
3270
+ cityAria: "City",
3271
+ country: "Country",
3272
+ countryPlaceholder: "DE",
3273
+ countryAria: "Country",
3274
+ consentsTitle: "Consents",
3275
+ back: "Back",
3276
+ next: "Next",
3277
+ register: "Register",
3278
+ successTitle: "Registration completed",
3279
+ messageChecking: "Checking email...",
3280
+ messageEmailAvailable: "Email is available.",
3281
+ messageEmailUnavailable: "Email is already in use.",
3282
+ messageRequiredEmail: "Please enter an email.",
3283
+ messageInvalidEmail: "Please enter a valid email.",
3284
+ messageRequiredPassword: "Please enter a password.",
3285
+ messageRequiredPasswordConfirm: "Please confirm the password.",
3286
+ messageRequiredField: "Please fill all required fields.",
3287
+ messageAvailabilityFailed: "Availability check failed.",
3288
+ messageAvailabilityNotConfigured: "Availability check not configured.",
3289
+ messageAvailabilityRequired: "Please check email first.",
3290
+ messagePasswordMismatch: "Passwords do not match.",
3291
+ messageRequiredConsents: "Please accept required consents.",
3292
+ messageRegisterFailed: "Registration failed.",
3293
+ messageRegisterNotConfigured: "Registration not configured.",
3294
+ };
3295
+ }
3296
+ }
3297
+
3298
+ registerCustomElement(RegisterWizard);