@everymatrix/player-kyc-verification 1.37.2 → 1.37.4
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/loader.cjs.js +1 -1
- package/dist/cjs/player-kyc-verification.cjs.entry.js +8 -11
- package/dist/cjs/player-kyc-verification.cjs.js +1 -1
- package/dist/collection/components/player-kyc-verification/player-kyc-verification.js +9 -12
- package/dist/components/player-kyc-verification.js +9 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-kyc-verification.entry.js +8 -11
- package/dist/esm/player-kyc-verification.js +1 -1
- package/dist/player-kyc-verification/p-7a5dea2d.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 +2 -2
- package/package.json +1 -1
- package/dist/player-kyc-verification/p-b7d82cca.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[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],"
|
|
17
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[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]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -203,7 +203,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
203
203
|
this.verificationType = [];
|
|
204
204
|
this.isLoading = false;
|
|
205
205
|
this.stylingAppends = false;
|
|
206
|
-
this.
|
|
206
|
+
this.selectedFile = null;
|
|
207
207
|
this.uploadSizeExceeded = false;
|
|
208
208
|
this.expandedOnDesktop = false;
|
|
209
209
|
this.scriptInjected = false;
|
|
@@ -329,10 +329,10 @@ const PlayerKycVerificationWidget = class {
|
|
|
329
329
|
});
|
|
330
330
|
return size <= this.MAX_UPLOAD_SIZE;
|
|
331
331
|
}
|
|
332
|
-
handleFileSelection(
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
if (!this.checkFileSize(this.
|
|
332
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
333
|
+
if (file && file.length > 0) {
|
|
334
|
+
this.selectedFile = file;
|
|
335
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
336
336
|
console.error(translate('fileSizeExceeded', this.language));
|
|
337
337
|
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
338
338
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
@@ -356,14 +356,11 @@ const PlayerKycVerificationWidget = class {
|
|
|
356
356
|
}
|
|
357
357
|
}).then((data) => {
|
|
358
358
|
const formData = new FormData();
|
|
359
|
-
|
|
360
|
-
for (let i = 0; i < files.length; i++) {
|
|
361
|
-
formData.append("files", files[i]);
|
|
362
|
-
}
|
|
359
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
363
360
|
fetch(data.Url, { method: "POST", body: formData })
|
|
364
361
|
.then(res => {
|
|
365
362
|
if (res.ok) {
|
|
366
|
-
if (this.
|
|
363
|
+
if (this.selectedFile.length > 1) {
|
|
367
364
|
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
368
365
|
}
|
|
369
366
|
else {
|
|
@@ -426,7 +423,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
426
423
|
(index.h("div", { class: "box box-content" }, index.h("div", { id: "__avs-wrapper" })))));
|
|
427
424
|
}
|
|
428
425
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
429
|
-
return (index.h("div", null, (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: "*",
|
|
426
|
+
return (index.h("div", null, (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)))));
|
|
430
427
|
}
|
|
431
428
|
;
|
|
432
429
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["player-kyc-verification.cjs",[[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],"
|
|
18
|
+
return index.bootstrapLazy([["player-kyc-verification.cjs",[[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]}]]]], options);
|
|
19
19
|
});
|
|
@@ -41,7 +41,7 @@ export class PlayerKycVerificationWidget {
|
|
|
41
41
|
this.verificationType = [];
|
|
42
42
|
this.isLoading = false;
|
|
43
43
|
this.stylingAppends = false;
|
|
44
|
-
this.
|
|
44
|
+
this.selectedFile = null;
|
|
45
45
|
this.uploadSizeExceeded = false;
|
|
46
46
|
this.expandedOnDesktop = false;
|
|
47
47
|
this.scriptInjected = false;
|
|
@@ -167,10 +167,10 @@ export class PlayerKycVerificationWidget {
|
|
|
167
167
|
});
|
|
168
168
|
return size <= this.MAX_UPLOAD_SIZE;
|
|
169
169
|
}
|
|
170
|
-
handleFileSelection(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (!this.checkFileSize(this.
|
|
170
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
171
|
+
if (file && file.length > 0) {
|
|
172
|
+
this.selectedFile = file;
|
|
173
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
174
174
|
console.error(translate('fileSizeExceeded', this.language));
|
|
175
175
|
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
176
176
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
@@ -194,14 +194,11 @@ export class PlayerKycVerificationWidget {
|
|
|
194
194
|
}
|
|
195
195
|
}).then((data) => {
|
|
196
196
|
const formData = new FormData();
|
|
197
|
-
|
|
198
|
-
for (let i = 0; i < files.length; i++) {
|
|
199
|
-
formData.append("files", files[i]);
|
|
200
|
-
}
|
|
197
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
201
198
|
fetch(data.Url, { method: "POST", body: formData })
|
|
202
199
|
.then(res => {
|
|
203
200
|
if (res.ok) {
|
|
204
|
-
if (this.
|
|
201
|
+
if (this.selectedFile.length > 1) {
|
|
205
202
|
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
206
203
|
}
|
|
207
204
|
else {
|
|
@@ -289,7 +286,7 @@ export class PlayerKycVerificationWidget {
|
|
|
289
286
|
h("path", { d: "M17 11H14V6H10V11H7L12 16L17 11ZM7 17V19H17V17H7Z", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" })),
|
|
290
287
|
h("span", null, translate('download', this.language)))) : null),
|
|
291
288
|
h("div", { class: "upload-button" }, optionChosen ? (h("label", null,
|
|
292
|
-
h("input", { type: "file", accept: "*",
|
|
289
|
+
h("input", { type: "file", accept: "*", onChange: ($event) => this.handleFileSelection($event.target.files, this.selectedOption, verificationType.type), style: { display: 'none' } }),
|
|
293
290
|
h("svg", { width: "100", height: "100", xmlns: "http://www.w3.org/2000/svg" },
|
|
294
291
|
h("circle", { cx: "50", cy: "50", r: "40", fill: "var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))" }),
|
|
295
292
|
h("line", { x1: "30", y1: "50", x2: "70", y2: "50", stroke: "white", "stroke-width": "6" }),
|
|
@@ -539,7 +536,7 @@ export class PlayerKycVerificationWidget {
|
|
|
539
536
|
"verificationType": {},
|
|
540
537
|
"isLoading": {},
|
|
541
538
|
"stylingAppends": {},
|
|
542
|
-
"
|
|
539
|
+
"selectedFile": {},
|
|
543
540
|
"uploadingStatus": {},
|
|
544
541
|
"uploadSizeExceeded": {},
|
|
545
542
|
"selectedOption": {},
|
|
@@ -201,7 +201,7 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
201
201
|
this.verificationType = [];
|
|
202
202
|
this.isLoading = false;
|
|
203
203
|
this.stylingAppends = false;
|
|
204
|
-
this.
|
|
204
|
+
this.selectedFile = null;
|
|
205
205
|
this.uploadSizeExceeded = false;
|
|
206
206
|
this.expandedOnDesktop = false;
|
|
207
207
|
this.scriptInjected = false;
|
|
@@ -327,10 +327,10 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
327
327
|
});
|
|
328
328
|
return size <= this.MAX_UPLOAD_SIZE;
|
|
329
329
|
}
|
|
330
|
-
handleFileSelection(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (!this.checkFileSize(this.
|
|
330
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
331
|
+
if (file && file.length > 0) {
|
|
332
|
+
this.selectedFile = file;
|
|
333
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
334
334
|
console.error(translate('fileSizeExceeded', this.language));
|
|
335
335
|
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
336
336
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
@@ -354,14 +354,11 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
354
354
|
}
|
|
355
355
|
}).then((data) => {
|
|
356
356
|
const formData = new FormData();
|
|
357
|
-
|
|
358
|
-
for (let i = 0; i < files.length; i++) {
|
|
359
|
-
formData.append("files", files[i]);
|
|
360
|
-
}
|
|
357
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
361
358
|
fetch(data.Url, { method: "POST", body: formData })
|
|
362
359
|
.then(res => {
|
|
363
360
|
if (res.ok) {
|
|
364
|
-
if (this.
|
|
361
|
+
if (this.selectedFile.length > 1) {
|
|
365
362
|
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
366
363
|
}
|
|
367
364
|
else {
|
|
@@ -424,7 +421,7 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
424
421
|
(h("div", { class: "box box-content" }, h("div", { id: "__avs-wrapper" })))));
|
|
425
422
|
}
|
|
426
423
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
427
|
-
return (h("div", null, (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: "*",
|
|
424
|
+
return (h("div", null, (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)))));
|
|
428
425
|
}
|
|
429
426
|
;
|
|
430
427
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -481,7 +478,7 @@ const PlayerKycVerificationWidget = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
481
478
|
"verificationType": [32],
|
|
482
479
|
"isLoading": [32],
|
|
483
480
|
"stylingAppends": [32],
|
|
484
|
-
"
|
|
481
|
+
"selectedFile": [32],
|
|
485
482
|
"uploadingStatus": [32],
|
|
486
483
|
"uploadSizeExceeded": [32],
|
|
487
484
|
"selectedOption": [32],
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["player-kyc-verification",[[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],"
|
|
13
|
+
return bootstrapLazy([["player-kyc-verification",[[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]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -199,7 +199,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
199
199
|
this.verificationType = [];
|
|
200
200
|
this.isLoading = false;
|
|
201
201
|
this.stylingAppends = false;
|
|
202
|
-
this.
|
|
202
|
+
this.selectedFile = null;
|
|
203
203
|
this.uploadSizeExceeded = false;
|
|
204
204
|
this.expandedOnDesktop = false;
|
|
205
205
|
this.scriptInjected = false;
|
|
@@ -325,10 +325,10 @@ const PlayerKycVerificationWidget = class {
|
|
|
325
325
|
});
|
|
326
326
|
return size <= this.MAX_UPLOAD_SIZE;
|
|
327
327
|
}
|
|
328
|
-
handleFileSelection(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
if (!this.checkFileSize(this.
|
|
328
|
+
handleFileSelection(file, documentType, verificationTypeId) {
|
|
329
|
+
if (file && file.length > 0) {
|
|
330
|
+
this.selectedFile = file;
|
|
331
|
+
if (!this.checkFileSize(this.selectedFile)) {
|
|
332
332
|
console.error(translate('fileSizeExceeded', this.language));
|
|
333
333
|
this.uploadingStatus = translate('fileSizeExceeded', this.language);
|
|
334
334
|
this.handleDocumentsStatus(verificationTypeId, this.uploadingStatus, documentType);
|
|
@@ -352,14 +352,11 @@ const PlayerKycVerificationWidget = class {
|
|
|
352
352
|
}
|
|
353
353
|
}).then((data) => {
|
|
354
354
|
const formData = new FormData();
|
|
355
|
-
|
|
356
|
-
for (let i = 0; i < files.length; i++) {
|
|
357
|
-
formData.append("files", files[i]);
|
|
358
|
-
}
|
|
355
|
+
formData.append(documentType, this.selectedFile[0]);
|
|
359
356
|
fetch(data.Url, { method: "POST", body: formData })
|
|
360
357
|
.then(res => {
|
|
361
358
|
if (res.ok) {
|
|
362
|
-
if (this.
|
|
359
|
+
if (this.selectedFile.length > 1) {
|
|
363
360
|
this.uploadingStatus = translate('successUploadMultipleFiles', this.language);
|
|
364
361
|
}
|
|
365
362
|
else {
|
|
@@ -422,7 +419,7 @@ const PlayerKycVerificationWidget = class {
|
|
|
422
419
|
(h("div", { class: "box box-content" }, h("div", { id: "__avs-wrapper" })))));
|
|
423
420
|
}
|
|
424
421
|
renderDocumentsActions(selectedDocument, optionChosen, verificationType) {
|
|
425
|
-
return (h("div", null, (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: "*",
|
|
422
|
+
return (h("div", null, (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)))));
|
|
426
423
|
}
|
|
427
424
|
;
|
|
428
425
|
renderExpandedContent(verificationType, optionChosen, status, documents, flowInfo, isVerified, isFailedOrExpired) {
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["player-kyc-verification",[[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],"
|
|
16
|
+
return bootstrapLazy([["player-kyc-verification",[[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]}]]]], options);
|
|
17
17
|
});
|
|
@@ -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"},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"},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"},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"},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"},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:"Download"},"pt-br":{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"},"es-mx":{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"}};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},l=class{constructor(i){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.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)}))}}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}))}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.replace(/([A-Z])/g," $1"),t=e.optionChosen,a=e.status,r=e.documents,l=e.flowInfo;const c="Verified"===a,s="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${o?"expanded":""} ${s?"failed":""} ${c?"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,c?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"})):s?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"},n),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,r,l,c,s):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,l,c,s){return"Widget"===(null==l?void 0:l.type)||"Redirect"===(null==l?void 0:l.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:l.url,frameborder:"0",height:"400px",width:"100%",allowfullScreen:!0,allow:"camera *;microphone *"})):i("div",{class:"box box-content"},i(o,null,c?i("div",{class:"verification-status"},r("verificationComplete",this.language)):s?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))):0===this.verificationType.length?i("div",{style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},i("h2",null,r("kycTitle",this.language)),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"]}}};l.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: 4px;\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@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: 4px;\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{l 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-7a5dea2d",[[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)));
|
|
@@ -42,7 +42,7 @@ export declare class PlayerKycVerificationWidget {
|
|
|
42
42
|
verificationType: any;
|
|
43
43
|
private isLoading;
|
|
44
44
|
private stylingAppends;
|
|
45
|
-
|
|
45
|
+
selectedFile: FileList | null;
|
|
46
46
|
uploadingStatus: string;
|
|
47
47
|
uploadSizeExceeded: boolean;
|
|
48
48
|
selectedOption: string;
|
|
@@ -61,7 +61,7 @@ export declare class PlayerKycVerificationWidget {
|
|
|
61
61
|
downloadPDF(pdfUrl: string): void;
|
|
62
62
|
toggleVerificationType(verificationTypeId: string, verificationTypeFlowInfoType: any): void;
|
|
63
63
|
private checkFileSize;
|
|
64
|
-
handleFileSelection(
|
|
64
|
+
handleFileSelection(file: FileList | null, documentType: string, verificationTypeId: string): void;
|
|
65
65
|
importScript(url: any): Promise<unknown>;
|
|
66
66
|
renderVerificationTypeBox(verificationType: any): any;
|
|
67
67
|
renderDocumentsActions(selectedDocument: any, optionChosen: any, verificationType: any): 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"},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"},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"},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"},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"},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:"Download"},"pt-br":{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"},"es-mx":{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"}};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},l=class{constructor(i){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.selectedFiles=null,this.uploadSizeExceeded=!1,this.expandedOnDesktop=!1,this.scriptInjected=!1,this.MAX_UPLOAD_SIZE=5e7,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)}))}}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}))}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(this.selectedFiles=e,this.selectedFiles)if(this.checkFileSize(this.selectedFiles)){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,t=this.selectedFiles;for(let e=0;e<t.length;e++)n.append("files",t[e]);fetch(e.Url,{method:"POST",body:n}).then((e=>{e.ok?(this.uploadingStatus=r(this.selectedFiles.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.replace(/([A-Z])/g," $1"),t=e.optionChosen,a=e.status,r=e.documents,l=e.flowInfo;const s="Verified"===a,c="Failed"===a||"Expired"===a;return i("div",{class:`verification-box ${o?"expanded":""} ${c?"failed":""} ${s?"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,s?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"})):c?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"},n),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,r,l,s,c):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:"*",multiple:!0,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,l,s,c){return"Widget"===(null==l?void 0:l.type)||"Redirect"===(null==l?void 0:l.type)&&"Manual"!==e.vendorName?i("div",null,i("hr",{style:{margin:"5px"}}),i("iframe",{src:l.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)):c?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))):0===this.verificationType.length?i("div",{style:{padding:"24px",fontSize:"18px"}},r("noVerificationRequired",this.language)):i("div",{class:"ModalContainer",ref:e=>this.stylingContainer=e},i("div",{class:"player-kyc-verification-widget"},i("h2",null,r("kycTitle",this.language)),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"]}}};l.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: 4px;\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@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: 4px;\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{l as player_kyc_verification}
|