@everymatrix/player-kyc-verification 1.38.0 → 1.39.1
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.
- package/dist/cjs/player-kyc-verification.cjs.entry.js +15 -1
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +18 -12
- package/dist/collection/utils/locale.utils.js +8 -0
- package/dist/components/player-kyc-verification.js +15 -1
- package/dist/esm/player-kyc-verification.entry.js +15 -1
- package/dist/player-kyc-verification/p-03be0193.entry.js +1 -0
- package/dist/player-kyc-verification/player-kyc-verification.esm.js +1 -1
- package/dist/types/components/player-kyc-verification/player-kyc-verification.d.ts +1 -0
- package/package.json +1 -1
- package/dist/player-kyc-verification/p-4c54b949.entry.js +0 -1
|
@@ -33,6 +33,7 @@ let TRANSLATIONS = {
|
|
|
33
33
|
SourceOfWealth: 'Source of Wealth',
|
|
34
34
|
SocialMedia: 'Social Media',
|
|
35
35
|
ProofOfPayment: 'Proof of Payment',
|
|
36
|
+
uploaded: 'Document already uploaded.'
|
|
36
37
|
},
|
|
37
38
|
de: {
|
|
38
39
|
loading: 'Loading, please wait ...',
|
|
@@ -60,6 +61,7 @@ let TRANSLATIONS = {
|
|
|
60
61
|
SourceOfWealth: 'Source of Wealth',
|
|
61
62
|
SocialMedia: 'Social Media',
|
|
62
63
|
ProofOfPayment: 'Proof of Payment',
|
|
64
|
+
uploaded: 'Dokument bereits hochgeladen.'
|
|
63
65
|
},
|
|
64
66
|
ro: {
|
|
65
67
|
loading: 'Loading, please wait ...',
|
|
@@ -87,6 +89,7 @@ let TRANSLATIONS = {
|
|
|
87
89
|
SourceOfWealth: 'Source of Wealth',
|
|
88
90
|
SocialMedia: 'Social Media',
|
|
89
91
|
ProofOfPayment: 'Proof of Payment',
|
|
92
|
+
uploaded: 'Document deja încărcat.'
|
|
90
93
|
},
|
|
91
94
|
fr: {
|
|
92
95
|
loading: 'Loading, please wait ...',
|
|
@@ -114,6 +117,7 @@ let TRANSLATIONS = {
|
|
|
114
117
|
SourceOfWealth: 'Source of Wealth',
|
|
115
118
|
SocialMedia: 'Social Media',
|
|
116
119
|
ProofOfPayment: 'Proof of Payment',
|
|
120
|
+
uploaded: 'Document déjà téléchargé.'
|
|
117
121
|
},
|
|
118
122
|
ar: {
|
|
119
123
|
loading: 'Loading, please wait ...',
|
|
@@ -141,6 +145,7 @@ let TRANSLATIONS = {
|
|
|
141
145
|
SourceOfWealth: 'Source of Wealth',
|
|
142
146
|
SocialMedia: 'Social Media',
|
|
143
147
|
ProofOfPayment: 'Proof of Payment',
|
|
148
|
+
uploaded: 'Document already uploaded.'
|
|
144
149
|
},
|
|
145
150
|
hr: {
|
|
146
151
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -168,6 +173,7 @@ let TRANSLATIONS = {
|
|
|
168
173
|
SourceOfWealth: 'Izvor sredstava',
|
|
169
174
|
SocialMedia: 'Društvene mreže',
|
|
170
175
|
ProofOfPayment: 'Platna metoda',
|
|
176
|
+
uploaded: 'Dokument je već učitan.'
|
|
171
177
|
},
|
|
172
178
|
'pt-br': {
|
|
173
179
|
Age: 'Age',
|
|
@@ -193,6 +199,7 @@ let TRANSLATIONS = {
|
|
|
193
199
|
SourceOfWealth: 'Source of Wealth',
|
|
194
200
|
SocialMedia: 'Social Media',
|
|
195
201
|
ProofOfPayment: 'Proof of Payment',
|
|
202
|
+
uploaded: 'Documento já carregado.'
|
|
196
203
|
},
|
|
197
204
|
'es-mx': {
|
|
198
205
|
Age: 'Age',
|
|
@@ -218,6 +225,7 @@ let TRANSLATIONS = {
|
|
|
218
225
|
SourceOfWealth: 'Source of Wealth',
|
|
219
226
|
SocialMedia: 'Social Media',
|
|
220
227
|
ProofOfPayment: 'Proof of Payment',
|
|
228
|
+
uploaded: 'Documento ya subido.'
|
|
221
229
|
}
|
|
222
230
|
};
|
|
223
231
|
const getTranslations = (url) => {
|
|
@@ -516,6 +524,11 @@ const PlayerKycVerificationWidget = class {
|
|
|
516
524
|
});
|
|
517
525
|
});
|
|
518
526
|
}
|
|
527
|
+
isStatusUploaded(document) {
|
|
528
|
+
if (document && document.status === 'Uploaded')
|
|
529
|
+
return true;
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
519
532
|
renderVerificationTypeBox(verificationType) {
|
|
520
533
|
if (this.expandedOnDesktop) {
|
|
521
534
|
verificationType.expanded = true;
|
|
@@ -532,7 +545,8 @@ const PlayerKycVerificationWidget = class {
|
|
|
532
545
|
(index.h("div", { class: "box box-content" }, index.h("div", { id: "__avs-wrapper" })))));
|
|
533
546
|
}
|
|
534
547
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
535
|
-
return (index.h("div", null, (selectedDocument
|
|
548
|
+
return (index.h("div", null, this.isStatusUploaded(selectedDocument) ? (index.h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
549
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (index.h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (index.h("div", { class: "documents-action" }, index.h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (index.h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), index.h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })), index.h("span", null, translate('download', this.language)))) : null), index.h("div", { class: "upload-button" }, optionChosen ? (index.h("label", null, index.h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), index.h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), index.h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), index.h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
536
550
|
}
|
|
537
551
|
;
|
|
538
552
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -254,6 +254,11 @@ export class PlayerKycVerificationWidget {
|
|
|
254
254
|
});
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
+
isStatusUploaded(document) {
|
|
258
|
+
if (document && document.status === 'Uploaded')
|
|
259
|
+
return true;
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
257
262
|
renderVerificationTypeBox(verificationType) {
|
|
258
263
|
if (this.expandedOnDesktop) {
|
|
259
264
|
verificationType.expanded = true;
|
|
@@ -288,18 +293,19 @@ export class PlayerKycVerificationWidget {
|
|
|
288
293
|
h("div", { id: "__avs-wrapper" })))));
|
|
289
294
|
}
|
|
290
295
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
291
|
-
return (h("div", null, (selectedDocument
|
|
292
|
-
|
|
293
|
-
h("
|
|
294
|
-
h("
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
h("
|
|
299
|
-
|
|
300
|
-
h("
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
return (h("div", null, this.isStatusUploaded(selectedDocument) ? (h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
297
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (h("div", { class: "documents-action" },
|
|
298
|
+
h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) },
|
|
299
|
+
h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
300
|
+
h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
301
|
+
h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })),
|
|
302
|
+
h("span", null, translate('download', this.language)))) : null),
|
|
303
|
+
h("div", { class: "upload-button" }, optionChosen ? (h("label", null,
|
|
304
|
+
h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }),
|
|
305
|
+
h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" },
|
|
306
|
+
h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
307
|
+
h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }),
|
|
308
|
+
h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
303
309
|
}
|
|
304
310
|
;
|
|
305
311
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -27,6 +27,7 @@ let TRANSLATIONS = {
|
|
|
27
27
|
SourceOfWealth: 'Source of Wealth',
|
|
28
28
|
SocialMedia: 'Social Media',
|
|
29
29
|
ProofOfPayment: 'Proof of Payment',
|
|
30
|
+
uploaded: 'Document already uploaded.'
|
|
30
31
|
},
|
|
31
32
|
de: {
|
|
32
33
|
loading: 'Loading, please wait ...',
|
|
@@ -54,6 +55,7 @@ let TRANSLATIONS = {
|
|
|
54
55
|
SourceOfWealth: 'Source of Wealth',
|
|
55
56
|
SocialMedia: 'Social Media',
|
|
56
57
|
ProofOfPayment: 'Proof of Payment',
|
|
58
|
+
uploaded: 'Dokument bereits hochgeladen.'
|
|
57
59
|
},
|
|
58
60
|
ro: {
|
|
59
61
|
loading: 'Loading, please wait ...',
|
|
@@ -81,6 +83,7 @@ let TRANSLATIONS = {
|
|
|
81
83
|
SourceOfWealth: 'Source of Wealth',
|
|
82
84
|
SocialMedia: 'Social Media',
|
|
83
85
|
ProofOfPayment: 'Proof of Payment',
|
|
86
|
+
uploaded: 'Document deja încărcat.'
|
|
84
87
|
},
|
|
85
88
|
fr: {
|
|
86
89
|
loading: 'Loading, please wait ...',
|
|
@@ -108,6 +111,7 @@ let TRANSLATIONS = {
|
|
|
108
111
|
SourceOfWealth: 'Source of Wealth',
|
|
109
112
|
SocialMedia: 'Social Media',
|
|
110
113
|
ProofOfPayment: 'Proof of Payment',
|
|
114
|
+
uploaded: 'Document déjà téléchargé.'
|
|
111
115
|
},
|
|
112
116
|
ar: {
|
|
113
117
|
loading: 'Loading, please wait ...',
|
|
@@ -135,6 +139,7 @@ let TRANSLATIONS = {
|
|
|
135
139
|
SourceOfWealth: 'Source of Wealth',
|
|
136
140
|
SocialMedia: 'Social Media',
|
|
137
141
|
ProofOfPayment: 'Proof of Payment',
|
|
142
|
+
uploaded: 'Document already uploaded.'
|
|
138
143
|
},
|
|
139
144
|
hr: {
|
|
140
145
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -162,6 +167,7 @@ let TRANSLATIONS = {
|
|
|
162
167
|
SourceOfWealth: 'Izvor sredstava',
|
|
163
168
|
SocialMedia: 'Društvene mreže',
|
|
164
169
|
ProofOfPayment: 'Platna metoda',
|
|
170
|
+
uploaded: 'Dokument je već učitan.'
|
|
165
171
|
},
|
|
166
172
|
'pt-br': {
|
|
167
173
|
Age: 'Age',
|
|
@@ -187,6 +193,7 @@ let TRANSLATIONS = {
|
|
|
187
193
|
SourceOfWealth: 'Source of Wealth',
|
|
188
194
|
SocialMedia: 'Social Media',
|
|
189
195
|
ProofOfPayment: 'Proof of Payment',
|
|
196
|
+
uploaded: 'Documento já carregado.'
|
|
190
197
|
},
|
|
191
198
|
'es-mx': {
|
|
192
199
|
Age: 'Age',
|
|
@@ -212,6 +219,7 @@ let TRANSLATIONS = {
|
|
|
212
219
|
SourceOfWealth: 'Source of Wealth',
|
|
213
220
|
SocialMedia: 'Social Media',
|
|
214
221
|
ProofOfPayment: 'Proof of Payment',
|
|
222
|
+
uploaded: 'Documento ya subido.'
|
|
215
223
|
}
|
|
216
224
|
};
|
|
217
225
|
export const getTranslations = (url) => {
|
|
@@ -29,6 +29,7 @@ let TRANSLATIONS = {
|
|
|
29
29
|
SourceOfWealth: 'Source of Wealth',
|
|
30
30
|
SocialMedia: 'Social Media',
|
|
31
31
|
ProofOfPayment: 'Proof of Payment',
|
|
32
|
+
uploaded: 'Document already uploaded.'
|
|
32
33
|
},
|
|
33
34
|
de: {
|
|
34
35
|
loading: 'Loading, please wait ...',
|
|
@@ -56,6 +57,7 @@ let TRANSLATIONS = {
|
|
|
56
57
|
SourceOfWealth: 'Source of Wealth',
|
|
57
58
|
SocialMedia: 'Social Media',
|
|
58
59
|
ProofOfPayment: 'Proof of Payment',
|
|
60
|
+
uploaded: 'Dokument bereits hochgeladen.'
|
|
59
61
|
},
|
|
60
62
|
ro: {
|
|
61
63
|
loading: 'Loading, please wait ...',
|
|
@@ -83,6 +85,7 @@ let TRANSLATIONS = {
|
|
|
83
85
|
SourceOfWealth: 'Source of Wealth',
|
|
84
86
|
SocialMedia: 'Social Media',
|
|
85
87
|
ProofOfPayment: 'Proof of Payment',
|
|
88
|
+
uploaded: 'Document deja încărcat.'
|
|
86
89
|
},
|
|
87
90
|
fr: {
|
|
88
91
|
loading: 'Loading, please wait ...',
|
|
@@ -110,6 +113,7 @@ let TRANSLATIONS = {
|
|
|
110
113
|
SourceOfWealth: 'Source of Wealth',
|
|
111
114
|
SocialMedia: 'Social Media',
|
|
112
115
|
ProofOfPayment: 'Proof of Payment',
|
|
116
|
+
uploaded: 'Document déjà téléchargé.'
|
|
113
117
|
},
|
|
114
118
|
ar: {
|
|
115
119
|
loading: 'Loading, please wait ...',
|
|
@@ -137,6 +141,7 @@ let TRANSLATIONS = {
|
|
|
137
141
|
SourceOfWealth: 'Source of Wealth',
|
|
138
142
|
SocialMedia: 'Social Media',
|
|
139
143
|
ProofOfPayment: 'Proof of Payment',
|
|
144
|
+
uploaded: 'Document already uploaded.'
|
|
140
145
|
},
|
|
141
146
|
hr: {
|
|
142
147
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -164,6 +169,7 @@ let TRANSLATIONS = {
|
|
|
164
169
|
SourceOfWealth: 'Izvor sredstava',
|
|
165
170
|
SocialMedia: 'Društvene mreže',
|
|
166
171
|
ProofOfPayment: 'Platna metoda',
|
|
172
|
+
uploaded: 'Dokument je već učitan.'
|
|
167
173
|
},
|
|
168
174
|
'pt-br': {
|
|
169
175
|
Age: 'Age',
|
|
@@ -189,6 +195,7 @@ let TRANSLATIONS = {
|
|
|
189
195
|
SourceOfWealth: 'Source of Wealth',
|
|
190
196
|
SocialMedia: 'Social Media',
|
|
191
197
|
ProofOfPayment: 'Proof of Payment',
|
|
198
|
+
uploaded: 'Documento já carregado.'
|
|
192
199
|
},
|
|
193
200
|
'es-mx': {
|
|
194
201
|
Age: 'Age',
|
|
@@ -214,6 +221,7 @@ let TRANSLATIONS = {
|
|
|
214
221
|
SourceOfWealth: 'Source of Wealth',
|
|
215
222
|
SocialMedia: 'Social Media',
|
|
216
223
|
ProofOfPayment: 'Proof of Payment',
|
|
224
|
+
uploaded: 'Documento ya subido.'
|
|
217
225
|
}
|
|
218
226
|
};
|
|
219
227
|
const getTranslations = (url) => {
|
|
@@ -514,6 +522,11 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
514
522
|
});
|
|
515
523
|
});
|
|
516
524
|
}
|
|
525
|
+
isStatusUploaded(document) {
|
|
526
|
+
if (document && document.status === 'Uploaded')
|
|
527
|
+
return true;
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
517
530
|
renderVerificationTypeBox(verificationType) {
|
|
518
531
|
if (this.expandedOnDesktop) {
|
|
519
532
|
verificationType.expanded = true;
|
|
@@ -530,7 +543,8 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
530
543
|
(h("div", { class: "box box-content" }, h("div", { id: "__avs-wrapper" })))));
|
|
531
544
|
}
|
|
532
545
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
533
|
-
return (h("div", null, (selectedDocument
|
|
546
|
+
return (h("div", null, this.isStatusUploaded(selectedDocument) ? (h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
547
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (h("div", { class: "documents-action" }, h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })), h("span", null, translate('download', this.language)))) : null), h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
534
548
|
}
|
|
535
549
|
;
|
|
536
550
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -29,6 +29,7 @@ let TRANSLATIONS = {
|
|
|
29
29
|
SourceOfWealth: 'Source of Wealth',
|
|
30
30
|
SocialMedia: 'Social Media',
|
|
31
31
|
ProofOfPayment: 'Proof of Payment',
|
|
32
|
+
uploaded: 'Document already uploaded.'
|
|
32
33
|
},
|
|
33
34
|
de: {
|
|
34
35
|
loading: 'Loading, please wait ...',
|
|
@@ -56,6 +57,7 @@ let TRANSLATIONS = {
|
|
|
56
57
|
SourceOfWealth: 'Source of Wealth',
|
|
57
58
|
SocialMedia: 'Social Media',
|
|
58
59
|
ProofOfPayment: 'Proof of Payment',
|
|
60
|
+
uploaded: 'Dokument bereits hochgeladen.'
|
|
59
61
|
},
|
|
60
62
|
ro: {
|
|
61
63
|
loading: 'Loading, please wait ...',
|
|
@@ -83,6 +85,7 @@ let TRANSLATIONS = {
|
|
|
83
85
|
SourceOfWealth: 'Source of Wealth',
|
|
84
86
|
SocialMedia: 'Social Media',
|
|
85
87
|
ProofOfPayment: 'Proof of Payment',
|
|
88
|
+
uploaded: 'Document deja încărcat.'
|
|
86
89
|
},
|
|
87
90
|
fr: {
|
|
88
91
|
loading: 'Loading, please wait ...',
|
|
@@ -110,6 +113,7 @@ let TRANSLATIONS = {
|
|
|
110
113
|
SourceOfWealth: 'Source of Wealth',
|
|
111
114
|
SocialMedia: 'Social Media',
|
|
112
115
|
ProofOfPayment: 'Proof of Payment',
|
|
116
|
+
uploaded: 'Document déjà téléchargé.'
|
|
113
117
|
},
|
|
114
118
|
ar: {
|
|
115
119
|
loading: 'Loading, please wait ...',
|
|
@@ -137,6 +141,7 @@ let TRANSLATIONS = {
|
|
|
137
141
|
SourceOfWealth: 'Source of Wealth',
|
|
138
142
|
SocialMedia: 'Social Media',
|
|
139
143
|
ProofOfPayment: 'Proof of Payment',
|
|
144
|
+
uploaded: 'Document already uploaded.'
|
|
140
145
|
},
|
|
141
146
|
hr: {
|
|
142
147
|
loading: 'Učitavanje, molimo pričekajte ...',
|
|
@@ -164,6 +169,7 @@ let TRANSLATIONS = {
|
|
|
164
169
|
SourceOfWealth: 'Izvor sredstava',
|
|
165
170
|
SocialMedia: 'Društvene mreže',
|
|
166
171
|
ProofOfPayment: 'Platna metoda',
|
|
172
|
+
uploaded: 'Dokument je već učitan.'
|
|
167
173
|
},
|
|
168
174
|
'pt-br': {
|
|
169
175
|
Age: 'Age',
|
|
@@ -189,6 +195,7 @@ let TRANSLATIONS = {
|
|
|
189
195
|
SourceOfWealth: 'Source of Wealth',
|
|
190
196
|
SocialMedia: 'Social Media',
|
|
191
197
|
ProofOfPayment: 'Proof of Payment',
|
|
198
|
+
uploaded: 'Documento já carregado.'
|
|
192
199
|
},
|
|
193
200
|
'es-mx': {
|
|
194
201
|
Age: 'Age',
|
|
@@ -214,6 +221,7 @@ let TRANSLATIONS = {
|
|
|
214
221
|
SourceOfWealth: 'Source of Wealth',
|
|
215
222
|
SocialMedia: 'Social Media',
|
|
216
223
|
ProofOfPayment: 'Proof of Payment',
|
|
224
|
+
uploaded: 'Documento ya subido.'
|
|
217
225
|
}
|
|
218
226
|
};
|
|
219
227
|
const getTranslations = (url) => {
|
|
@@ -512,6 +520,11 @@ const PlayerKycVerificationWidget = class {
|
|
|
512
520
|
});
|
|
513
521
|
});
|
|
514
522
|
}
|
|
523
|
+
isStatusUploaded(document) {
|
|
524
|
+
if (document && document.status === 'Uploaded')
|
|
525
|
+
return true;
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
515
528
|
renderVerificationTypeBox(verificationType) {
|
|
516
529
|
if (this.expandedOnDesktop) {
|
|
517
530
|
verificationType.expanded = true;
|
|
@@ -528,7 +541,8 @@ const PlayerKycVerificationWidget = class {
|
|
|
528
541
|
(h("div", { class: "box box-content" }, h("div", { id: "__avs-wrapper" })))));
|
|
529
542
|
}
|
|
530
543
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
531
|
-
return (h("div", null, (selectedDocument
|
|
544
|
+
return (h("div", null, this.isStatusUploaded(selectedDocument) ? (h("div", { class: "upload-status" }, translate('uploaded', this.language))) :
|
|
545
|
+
(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded) ? (h("div", { class: "upload-status" }, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.statusUploaded)) : (h("div", { class: "documents-action" }, h("div", { class: "sample-file" }, (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleType) === "FileDownload" ? (h("button", { class: "download-button", onClick: () => this.downloadPDF(selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.sampleUrl) }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })), h("span", null, translate('download', this.language)))) : null), h("div", { class: "upload-button" }, optionChosen ? (h("label", null, h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }), h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }), h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }), h("line", { x1: "50", y1: "30", x2: "50", y2: "70", stroke: "white", "stroke-width": "6" })))) : null)))));
|
|
532
546
|
}
|
|
533
547
|
;
|
|
534
548
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as i,F as o}from"./p-1f2596d0.js";const n=["de","en","hr"];let t={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account Verification",kycDescription:"We require some documents to protect your account and to comply with legal and license requirements.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Recheck:"Recheck",Biometric:"Biometric",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Document already uploaded."},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account-Verifizierung",kycDescription:"Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Dokument bereits hochgeladen."},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Verificarea contului",kycDescription:"Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Document deja încărcat."},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Vérification de compte",kycDescription:"Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Document déjà téléchargé."},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"التحقق من الحساب",kycDescription:"نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Document already uploaded."},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument",kycTitle:"Verifikacija računa",kycDescription:"Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.",download:"Preuzmi",Age:"Dob",Aml:"AML",Documents:"Dokumenti",PEP:"Politički izložena osoba",Sanction:"Sankcija",Biometric:"Verifikacija",Recheck:"Ponovna provjera",ProofOfAddress:"Potvrda adrese",SourceOfWealth:"Izvor sredstava",SocialMedia:"Društvene mreže",ProofOfPayment:"Platna metoda",uploaded:"Dokument je već učitan."},"pt-br":{Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",Loading:"Carregando, espere por favor…",noVerificationRequired:"Não há necessidade de verificação para sua conta no momento",verificationComplete:"Verificação completa",verificationFailed:"Verificação de falha",verificationExpired:"A verificação expirou",fileSizeExceeded:"Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB",uploading:"Carregando...",successUpload:"Seu documento foi carregado e será analisado em breve",successUploadMultipleFiles:"Seus documentos foram enviados e serão revisados em breve",failedUpload:"Falha no upload do arquivo, tente novamente",chooseDocument:"Escolha um arquivo",download:"Download",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Documento já carregado."},"es-mx":{Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",Loading:"Cargando, espere por favor…",noVerificationRequired:"No hay verificación requerida para su cuenta al momento",verificationComplete:"Verificación completa",verificationFailed:"Verificación fallo",verificationExpired:"Verificación expiro",fileSizeExceeded:"Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb",uploading:"Cargando ...",successUpload:"Su documento ha sido cargado y será revisado en breve",successUploadMultipleFiles:"Sus documento han sido cargados y serán revisado en breve",failedUpload:"La carga del archivo falló, por favor intente de nuevo",chooseDocument:"Elija un archivo",download:"Download",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment",uploaded:"Documento ya subido."}};const a=e=>new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let o in e[i])t[i][o]=e[i][o]})),i(!0)}))})),r=(e,i,o)=>{const a=i;let r=t[void 0!==a&&n.includes(a)?a:"en"][e];if(void 0!==o)for(const[e,i]of Object.entries(o.values)){const o=new RegExp(`{${e}}`,"g");r=r.replace(o,i)}return r},c=class{constructor(i){var o;e(this,i),this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFile=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))},this.handleToggleScreen=()=>{this.toggleScreen(this.isMobile)}}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let e=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(e.href,i).then((e=>{if(200===e.status)return e.json();throw new Error("HTTP status "+e.status)})).then((e=>{this.verificationType=e.verifications})).catch((e=>{console.error(e)}))}catch(e){console.error("Error fetching verification types:",e)}}handleOptionChange(e,i){const o=e.target;this.selectedOption=o.value,this.verificationType=this.verificationType.map((e=>(e.type===i&&(e.optionChosen=o.value),e)))}handleDocumentsStatus(e,i,o){this.verificationType=this.verificationType.map((n=>{if(n.type===e){const e=n.documents.find((e=>e.code===o));e&&(e.statusUploaded=i)}return n}))}downloadPDF(e){const i=document.createElement("a");i.href=e,i.download="file.pdf",i.target="_blank",i.dispatchEvent(new MouseEvent("click"))}toggleVerificationType(e,i){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((o=>{var n;return o.type===e&&(null===(n=o.flowInfo)||void 0===n?void 0:n.type)==i&&(o.expanded=!o.expanded),o}))}toggleScreen(e){window.postMessage({type:"PlayerAccountMenuActive",isMobile:e},window.location.href)}checkFileSize(e){let i=0;return Object.keys(e).forEach((o=>{i+=e[o].size})),i<=this.MAX_UPLOAD_SIZE}handleFileSelection(e,i,o){if(e&&e.length>0)if(this.selectedFile=e,this.checkFileSize(this.selectedFile)){const e={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:i})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,e).then((e=>{if(e.ok)return this.uploadingStatus=r("uploading",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),e.json()})).then((e=>{const n=new FormData;n.append(i,this.selectedFile[0]),fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=r(this.selectedFile.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i)):(this.uploadingStatus=r("failedUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),console.error("File upload error:",e.status))})).catch((e=>{console.error("File upload error:",e)}))})).catch((e=>{console.error("File upload error:",e)}))}else console.error(r("fileSizeExceeded",this.language)),this.uploadingStatus=r("fileSizeExceeded",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),this.uploadSizeExceeded=!0}importScript(e){return new Promise(((i,o)=>{fetch(e).then((e=>e.text())).then((e=>{if(new Function(e)(),this.scriptInjected)i(!0);else{const e=document.createElement("script");e.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(e),this.scriptInjected=!0,i(!0)}})).catch((e=>{o(e)}))}))}isStatusUploaded(e){return!(!e||"Uploaded"!==e.status)}renderVerificationTypeBox(e){this.expandedOnDesktop&&(e.expanded=!0);let o=e.expanded,n=e.type.trim(),t=e.optionChosen,a=e.status,c=e.documents,s=e.flowInfo;const l="Verified"===a,d="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${o?"expanded":""} ${d?"failed":""} ${l?"success":""}`},i("div",{class:"box box-header "+(o?"expanded":""),onClick:()=>{var i;return this.toggleVerificationType(e.type,null===(i=e.flowInfo)||void 0===i?void 0:i.type)}},i("div",{class:"box-icon"},i("div",null,l?this.verifiedIcon?i("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),i("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):d?this.failedIcon?i("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),i("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),i("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?i("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):i("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),i("div",{class:"box-title"},r(n,this.language)),i("div",{class:"chevron-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:o?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),o?this.renderExpandedContent(e,t,a,c,s,l,d):i("div",{class:"box box-content"},i("div",{id:"__avs-wrapper"})))}renderDocumentsActions(e,o,n){return i("div",null,this.isStatusUploaded(e)?i("div",{class:"upload-status"},r("uploaded",this.language)):(null==e?void 0:e.statusUploaded)?i("div",{class:"upload-status"},null==e?void 0:e.statusUploaded):i("div",{class:"documents-action"},i("div",{class:"sample-file"},"FileDownload"===(null==e?void 0:e.sampleType)?i("button",{class:"download-button",onClick:()=>this.downloadPDF(null==e?void 0:e.sampleUrl)},i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"}),i("path",{d:"M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"})),i("span",null,r("download",this.language))):null),i("div",{class:"upload-button"},o?i("label",null,i("input",{type:"file",accept:"*",onChange:e=>this.handleFileSelection(e.target.files,this.selectedOption,n.type),style:{display:"none"}}),i("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"}),i("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),i("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)))}renderExpandedContent(e,n,t,a,c,s,l){return"Widget"===(null==c?void 0:c.type)||"Redirect"===(null==c?void 0:c.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:c.url,frameborder:"0",height:"400px",width:"100%",allowfullScreen:!0,allow:"camera *;microphone *"})):i("div",{class:"box box-content"},i(o,null,s?i("div",{class:"verification-status"},r("verificationComplete",this.language)):l?i("div",{class:"verification-status"},r("Failed"===t?"verificationFailed":"verificationExpired",this.language)):a.length>0?i("div",{class:"documents-dropdown"},i("select",{class:"nice-select",onChange:i=>this.handleOptionChange(i,e.type)},i("option",{value:"",selected:!0,disabled:!0,hidden:!0},r("chooseDocument",this.language)),a.map((e=>i("option",{selected:n==e.code,value:e.code},e.type.replace(/([A-Z])/g," $1"))))),this.renderDocumentsActions(a.find((e=>e.code===n)),n,e)):null))}render(){return this.isLoading?i("div",null,i("p",null,r("loading",this.language))):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},this.isMobile?i("div",{class:"MenuReturnButton",onClick:this.handleToggleScreen},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},i("defs",null),i("g",{transform:"translate(-20 -158)"},i("g",{transform:"translate(20 158)"},i("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),i("h2",null,r("kycTitle",this.language))):i("h2",null,r("kycTitle",this.language)),0===this.verificationType.length?i("div",{class:"no-verification-description",style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i(o,null,i("div",{class:"widget-description"},r("kycDescription",this.language)),i("div",{class:"verification-types"},this.verificationType.map((e=>e?this.renderVerificationTypeBox(e):null))))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};c.style=':host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 15px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23333" d="M10 18.4l-6.5-6.5h13z"/><path fill="%23333" d="M10 1.6l6.5 6.5H3.5z"/></svg>\');\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button {\n font-family: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: none;\n font-size: 16px;\n padding: 10px 0px 0px 0px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button svg {\n margin-right: 10px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n.MenuReturnButton {\n display: flex;\n align-items: center;\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 15px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}';export{c as player_kyc_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-
|
|
1
|
+
import{p as e,b as i}from"./p-1f2596d0.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-03be0193",[[1,"player-kyc-verification",{userId:[1,"user-id"],session:[1],language:[1],endpoint:[1],translationUrl:[1,"translation-url"],clientStyling:[1,"client-styling"],verifiedIcon:[1,"verified-icon"],failedIcon:[1,"failed-icon"],defaultIcon:[1,"default-icon"],clientStylingUrl:[1,"client-styling-url"],verificationType:[32],isLoading:[32],stylingAppends:[32],selectedFile:[32],uploadingStatus:[32],uploadSizeExceeded:[32],selectedOption:[32],expandedOnDesktop:[32]}]]]],e)));
|
|
@@ -67,6 +67,7 @@ export declare class PlayerKycVerificationWidget {
|
|
|
67
67
|
private checkFileSize;
|
|
68
68
|
handleFileSelection(file: FileList | null, documentType: string, verificationTypeId: string): void;
|
|
69
69
|
importScript(url: any): Promise<unknown>;
|
|
70
|
+
isStatusUploaded(document: any): boolean;
|
|
70
71
|
renderVerificationTypeBox(verificationType: any): any;
|
|
71
72
|
renderDocumentsActions(selectedDocument: any, optionChosen: any, verificationType: any): void;
|
|
72
73
|
renderExpandedContent(verificationType: any, optionChosen: any, status: string, documents: any, flowInfo: any, isVerified: boolean, isFailedOrExpired: boolean): void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as i,F as o}from"./p-1f2596d0.js";const n=["de","en","hr"];let t={en:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account Verification",kycDescription:"We require some documents to protect your account and to comply with legal and license requirements.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Recheck:"Recheck",Biometric:"Biometric",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},de:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Account-Verifizierung",kycDescription:"Wir benötigen einige Dokumente, um Ihr Konto zu schützen und den rechtlichen und Lizenzanforderungen zu entsprechen.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},ro:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Verificarea contului",kycDescription:"Avem nevoie de câteva documente pentru a proteja contul dvs. și pentru a respecta cerințele legale și de licență.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},fr:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"Vérification de compte",kycDescription:"Nous avons besoin de certains documents pour protéger votre compte et pour nous conformer aux exigences légales et de licence.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},ar:{loading:"Loading, please wait ...",noVerificationRequired:"There is no verification required for your account at this moment.",verificationComplete:"Verification complete",verificationFailed:"Verification failed",verificationExpired:"Verification expired",fileSizeExceeded:"Maximum file size exceeded. Max file size is: 50mb",uploading:"Uploading ... ",successUpload:"Your document has been uploaded and it will be reviewed shortly",successUploadMultipleFiles:"Your documents have been uploaded and it will be reviewed shortly",failedUpload:"Upload failed please try again",chooseDocument:"Choose Document",kycTitle:"التحقق من الحساب",kycDescription:"نحتاج إلى بعض الوثائق لحماية حسابك والامتثال للمتطلبات القانونية والترخيص.",download:"Download",Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},hr:{loading:"Učitavanje, molimo pričekajte ...",noVerificationRequired:"Trenutačno nije potrebna provjera vašeg računa.",verificationComplete:"Provjera dovršena",verificationFailed:"Provjera nije uspjela",verificationExpired:"Provjera je istekla",fileSizeExceeded:"Premašena je maksimalna veličina datoteke. Maksimalna veličina datoteke je: 50mb",uploading:"Prijenos…",successUpload:"Vaš dokument je učitan i uskoro će biti pregledan",successUploadMultipleFiles:"Vaši su dokumenti učitani i uskoro će biti pregledani",failedUpload:"Prijenos nije uspio pokušajte ponovo",chooseDocument:"Odaberite Dokument",kycTitle:"Verifikacija računa",kycDescription:"Potrebni su nam neki dokumenti kako bismo zaštitili vaš račun i kako bismo se pridržavali zakonskih i licencijskih zahtjeva.",download:"Preuzmi",Age:"Dob",Aml:"AML",Documents:"Dokumenti",PEP:"Politički izložena osoba",Sanction:"Sankcija",Biometric:"Verifikacija",Recheck:"Ponovna provjera",ProofOfAddress:"Potvrda adrese",SourceOfWealth:"Izvor sredstava",SocialMedia:"Društvene mreže",ProofOfPayment:"Platna metoda"},"pt-br":{Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",Loading:"Carregando, espere por favor…",noVerificationRequired:"Não há necessidade de verificação para sua conta no momento",verificationComplete:"Verificação completa",verificationFailed:"Verificação de falha",verificationExpired:"A verificação expirou",fileSizeExceeded:"Tamanho máximo do arquivo excedido. O tamanho máximo do arquivo é: 50 MB",uploading:"Carregando...",successUpload:"Seu documento foi carregado e será analisado em breve",successUploadMultipleFiles:"Seus documentos foram enviados e serão revisados em breve",failedUpload:"Falha no upload do arquivo, tente novamente",chooseDocument:"Escolha um arquivo",download:"Download",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"},"es-mx":{Age:"Age",Aml:"AML",Documents:"Documents",PEP:"PEP",Sanction:"Sanctions",Biometric:"Biometric",Recheck:"Recheck",Loading:"Cargando, espere por favor…",noVerificationRequired:"No hay verificación requerida para su cuenta al momento",verificationComplete:"Verificación completa",verificationFailed:"Verificación fallo",verificationExpired:"Verificación expiro",fileSizeExceeded:"Tamaño máximo de archivo se excedió. El tamaño máximo del archivo es: 50mb",uploading:"Cargando ...",successUpload:"Su documento ha sido cargado y será revisado en breve",successUploadMultipleFiles:"Sus documento han sido cargados y serán revisado en breve",failedUpload:"La carga del archivo falló, por favor intente de nuevo",chooseDocument:"Elija un archivo",download:"Download",ProofOfAddress:"Proof of Address",SourceOfWealth:"Source of Wealth",SocialMedia:"Social Media",ProofOfPayment:"Proof of Payment"}};const a=e=>new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let o in e[i])t[i][o]=e[i][o]})),i(!0)}))})),r=(e,i,o)=>{const a=i;let r=t[void 0!==a&&n.includes(a)?a:"en"][e];if(void 0!==o)for(const[e,i]of Object.entries(o.values)){const o=new RegExp(`{${e}}`,"g");r=r.replace(o,i)}return r},c=class{constructor(i){var o;e(this,i),this.userId="",this.session="",this.endpoint="",this.translationUrl="",this.clientStyling="",this.verifiedIcon="",this.failedIcon="",this.defaultIcon="",this.clientStylingUrl="",this.verificationType=[],this.isLoading=!1,this.stylingAppends=!1,this.selectedFile=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))},this.handleToggleScreen=()=>{this.toggleScreen(this.isMobile)}}handleNewTranslations(){this.isLoading=!0,a(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await a(this.translationUrl)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentDidLoad(){window.innerWidth>700&&(this.expandedOnDesktop=!0);try{let e=new URL(`${this.endpoint}/v2/player/${this.userId}/verification/GetKYCCustomerStatus`);const i={method:"POST",headers:{"X-SessionId":this.session,"Content-Type":"application/json"},body:JSON.stringify({})};fetch(e.href,i).then((e=>{if(200===e.status)return e.json();throw new Error("HTTP status "+e.status)})).then((e=>{this.verificationType=e.verifications})).catch((e=>{console.error(e)}))}catch(e){console.error("Error fetching verification types:",e)}}handleOptionChange(e,i){const o=e.target;this.selectedOption=o.value,this.verificationType=this.verificationType.map((e=>(e.type===i&&(e.optionChosen=o.value),e)))}handleDocumentsStatus(e,i,o){this.verificationType=this.verificationType.map((n=>{if(n.type===e){const e=n.documents.find((e=>e.code===o));e&&(e.statusUploaded=i)}return n}))}downloadPDF(e){const i=document.createElement("a");i.href=e,i.download="file.pdf",i.target="_blank",i.dispatchEvent(new MouseEvent("click"))}toggleVerificationType(e,i){this.expandedOnDesktop=!1,this.verificationType=this.verificationType.map((o=>{var n;return o.type===e&&(null===(n=o.flowInfo)||void 0===n?void 0:n.type)==i&&(o.expanded=!o.expanded),o}))}toggleScreen(e){window.postMessage({type:"PlayerAccountMenuActive",isMobile:e},window.location.href)}checkFileSize(e){let i=0;return Object.keys(e).forEach((o=>{i+=e[o].size})),i<=this.MAX_UPLOAD_SIZE}handleFileSelection(e,i,o){if(e&&e.length>0)if(this.selectedFile=e,this.checkFileSize(this.selectedFile)){const e={method:"POST",headers:{"Content-Type":"application/json","X-SessionId":this.session},body:JSON.stringify({DocumentCode:i})};fetch(`${this.endpoint}/v1/player/${this.userId}/verification/GetKYCVerificationDocumentUploadUrl`,e).then((e=>{if(e.ok)return this.uploadingStatus=r("uploading",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),e.json()})).then((e=>{const n=new FormData;n.append(i,this.selectedFile[0]),fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=r(this.selectedFile.length>1?"successUploadMultipleFiles":"successUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i)):(this.uploadingStatus=r("failedUpload",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),console.error("File upload error:",e.status))})).catch((e=>{console.error("File upload error:",e)}))})).catch((e=>{console.error("File upload error:",e)}))}else console.error(r("fileSizeExceeded",this.language)),this.uploadingStatus=r("fileSizeExceeded",this.language),this.handleDocumentsStatus(o,this.uploadingStatus,i),this.uploadSizeExceeded=!0}importScript(e){return new Promise(((i,o)=>{fetch(e).then((e=>e.text())).then((e=>{if(new Function(e)(),this.scriptInjected)i(!0);else{const e=document.createElement("script");e.src="https://test.insic.de/frontend3/static/js/avs-loader.min.js",document.head.appendChild(e),this.scriptInjected=!0,i(!0)}})).catch((e=>{o(e)}))}))}renderVerificationTypeBox(e){this.expandedOnDesktop&&(e.expanded=!0);let o=e.expanded,n=e.type.trim(),t=e.optionChosen,a=e.status,c=e.documents,s=e.flowInfo;const l="Verified"===a,d="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${o?"expanded":""} ${d?"failed":""} ${l?"success":""}`},i("div",{class:"box box-header "+(o?"expanded":""),onClick:()=>{var i;return this.toggleVerificationType(e.type,null===(i=e.flowInfo)||void 0===i?void 0:i.type)}},i("div",{class:"box-icon"},i("div",null,l?this.verifiedIcon?i("img",{class:"CustomVerifiedIcon",src:this.verifiedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"#388D79"}),i("circle",{cx:"50",cy:"50",r:"34",fill:"none",stroke:"#fff","stroke-width":"12px"}),i("polyline",{points:"30,50 45,63 70,35",fill:"none",stroke:"#fff","stroke-width":"8px"})):d?this.failedIcon?i("img",{class:"CustomFailedIcon",src:this.failedIcon,alt:""}):i("svg",{width:"100",height:"100",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"red"}),i("line",{x1:"30",y1:"30",x2:"70",y2:"70",stroke:"#fff","stroke-width":"10px"}),i("line",{x1:"30",y1:"70",x2:"70",y2:"30",stroke:"#fff","stroke-width":"10px"})):this.defaultIcon?i("img",{class:"CustomDefaultIcon",src:this.defaultIcon,alt:""}):i("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4 4V20C4 21.1046 4.89543 22 6 22L18 22C19.1046 22 20 21.1046 20 20V8.34162C20 7.8034 19.7831 7.28789 19.3982 6.91161L14.9579 2.56999C14.5842 2.20459 14.0824 2 13.5597 2L6 2C4.89543 2 4 2.89543 4 4Z",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 13H15",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M9 17H12",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M14 2V6C14 7.10457 14.8954 8 16 8H20",stroke:"#000000","stroke-width":"2","stroke-linejoin":"round"})))),i("div",{class:"box-title"},r(n,this.language)),i("div",{class:"chevron-icon"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:o?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})))),o?this.renderExpandedContent(e,t,a,c,s,l,d):i("div",{class:"box box-content"},i("div",{id:"__avs-wrapper"})))}renderDocumentsActions(e,o,n){return i("div",null,(null==e?void 0:e.statusUploaded)?i("div",{class:"upload-status"},null==e?void 0:e.statusUploaded):i("div",{class:"documents-action"},i("div",{class:"sample-file"},"FileDownload"===(null==e?void 0:e.sampleType)?i("button",{class:"download-button",onClick:()=>this.downloadPDF(null==e?void 0:e.sampleUrl)},i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M12 0C5.372 0 0 5.372 0 12C0 18.628 5.372 24 12 24C18.628 24 24 18.628 24 12C24 5.372 18.628 0 12 0ZM12 22C6.485 22 2 17.515 2 12C2 6.485 6.485 2 12 2C17.515 2 22 6.485 22 12C22 17.515 17.515 22 12 22Z",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"}),i("path",{d:"M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"})),i("span",null,r("download",this.language))):null),i("div",{class:"upload-button"},o?i("label",null,i("input",{type:"file",accept:"*",onChange:e=>this.handleFileSelection(e.target.files,this.selectedOption,n.type),style:{display:"none"}}),i("svg",{width:"100",height:"100",xmlns:"http://www.w3.org/2000/svg"},i("circle",{cx:"50",cy:"50",r:"40",fill:"var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))"}),i("line",{x1:"30",y1:"50",x2:"70",y2:"50",stroke:"white","stroke-width":"6"}),i("line",{x1:"50",y1:"30",x2:"50",y2:"70",stroke:"white","stroke-width":"6"}))):null)))}renderExpandedContent(e,n,t,a,c,s,l){return"Widget"===(null==c?void 0:c.type)||"Redirect"===(null==c?void 0:c.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:c.url,frameborder:"0",height:"400px",width:"100%",allowfullScreen:!0,allow:"camera *;microphone *"})):i("div",{class:"box box-content"},i(o,null,s?i("div",{class:"verification-status"},r("verificationComplete",this.language)):l?i("div",{class:"verification-status"},r("Failed"===t?"verificationFailed":"verificationExpired",this.language)):a.length>0?i("div",{class:"documents-dropdown"},i("select",{class:"nice-select",onChange:i=>this.handleOptionChange(i,e.type)},i("option",{value:"",selected:!0,disabled:!0,hidden:!0},r("chooseDocument",this.language)),a.map((e=>i("option",{selected:n==e.code,value:e.code},e.type.replace(/([A-Z])/g," $1"))))),this.renderDocumentsActions(a.find((e=>e.code===n)),n,e)):null))}render(){return this.isLoading?i("div",null,i("p",null,r("loading",this.language))):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},this.isMobile?i("div",{class:"MenuReturnButton",onClick:this.handleToggleScreen},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},i("defs",null),i("g",{transform:"translate(-20 -158)"},i("g",{transform:"translate(20 158)"},i("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),i("h2",null,r("kycTitle",this.language))):i("h2",null,r("kycTitle",this.language)),0===this.verificationType.length?i("div",{class:"no-verification-description",style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i(o,null,i("div",{class:"widget-description"},r("kycDescription",this.language)),i("div",{class:"verification-types"},this.verificationType.map((e=>e?this.renderVerificationTypeBox(e):null))))))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};c.style=':host {\n font-family: inherit;\n}\n\nbutton, select {\n font-family: inherit;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.player-kyc-verification-widget {\n padding: 20px;\n align-items: center;\n}\n.player-kyc-verification-widget h2 {\n margin: 15px;\n}\n.player-kyc-verification-widget .widget-description {\n margin: 24px 0px;\n}\n.player-kyc-verification-widget .verification-types {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 34px;\n}\n.player-kyc-verification-widget .verification-types .verification-box {\n transition: height 0.3s, border-color 0.3s;\n border: solid 1px var(--emfe-w-color-gray-100, #E6E6E6);\n border-radius: 2px;\n display: flex;\n flex-direction: column;\n padding: 0px 14px;\n border-width: 2px 2px 8px 2px;\n align-self: start;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box {\n flex-shrink: 0;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header {\n display: flex;\n padding: 14px 0px;\n justify-content: space-between;\n cursor: pointer;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon {\n flex-grow: 1;\n display: flex;\n justify-content: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-icon svg {\n height: 24px;\n width: 24px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .box-title {\n flex-grow: 1;\n font-size: 18px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon {\n flex-grow: 10;\n width: 14px;\n height: 14px;\n display: flex;\n justify-content: flex-end;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-header .chevron-icon svg {\n width: 20px;\n height: 22px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content {\n display: none;\n flex-grow: 1;\n border-top: 0.4px solid var(--emfe-w-color-gray-100, #E6E6E6);\n padding: 10px 0px;\n flex-grow: 1;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .upload-status {\n text-align: center;\n padding: 20px;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: center;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown svg {\n margin: 16px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .nice-select {\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 4px 14px;\n font-size: 14px;\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n border-radius: 2px;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: #333;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 30px;\n background-repeat: no-repeat;\n background-position: right 10px center;\n background-image: url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%23333" d="M10 18.4l-6.5-6.5h13z"/><path fill="%23333" d="M10 1.6l6.5 6.5H3.5z"/></svg>\');\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button {\n font-family: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--emfe-w-color-white, #FFFFFF);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: none;\n font-size: 16px;\n padding: 10px 0px 0px 0px;\n cursor: pointer;\n}\n.player-kyc-verification-widget .verification-types .verification-box .box-content .documents-dropdown .sample-file .download-button svg {\n margin-right: 10px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n min-height: 120px;\n}\n.player-kyc-verification-widget .verification-types .verification-box.failed {\n border-color: var(--emfe-w-color-error var(--emfe-w-color-red, #FD2839));\n}\n.player-kyc-verification-widget .verification-types .verification-box.success {\n border-color: var(--emfe-w-color-valid var(--emfe-w-color-green, #48952a));\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.player-kyc-verification-widget .verification-types .verification-box.expanded .box-content .verification-status {\n margin: 12px 0px 16px;\n font-size: 18px;\n text-align: center;\n color: var(--emfe-w-color-gray-150, #828282);\n}\n\n.MenuReturnButton {\n display: flex;\n align-items: center;\n}\n\n@container (min-width: 700px) {\n .player-kyc-verification-widget {\n padding: 100px 60px;\n }\n}\n@container (max-width: 700px) {\n .player-kyc-verification-widget h2 {\n margin: 15px;\n text-align: center;\n }\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: 1fr;\n grid-gap: 16px;\n }\n}\n@container (max-width: 1240px) and (min-width: 701px) {\n .player-kyc-verification-widget .verification-types {\n grid-template-columns: repeat(2, 1fr);\n }\n}';export{c as player_kyc_verification}
|