@ekyc_qoobiss/qbs-ect-cmp 1.8.2 → 1.8.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.
@@ -1838,25 +1838,16 @@ class IDML5Detector {
1838
1838
  this.stream.timeElapsed();
1839
1839
  return;
1840
1840
  }
1841
- if (results[0].label == 'full' && results[0].confidence > 0.9) {
1842
- if (this.full == 0) {
1843
- this.full = 1;
1844
- this.stream.stopAnimation();
1845
- await this.drawFrame('green');
1846
- this.stream.changeIDPose(IDPose.Tilted);
1847
- }
1848
- if (this.full == 1 && this.tilted == 1) {
1849
- this.stream.stopAnimation();
1850
- this.drawFrame('green', true);
1851
- }
1841
+ if (results[0].label == 'full' && results[0].confidence > 0.9 && this.full == 0) {
1842
+ this.full = 1;
1843
+ this.stream.stopAnimation();
1844
+ await this.drawFrame('green');
1845
+ this.stream.changeIDPose(IDPose.Tilted);
1852
1846
  }
1853
- if (results[0].label == 'tilted' && results[0].confidence > 0.8) {
1854
- if (this.full == 1 && this.tilted == 0) {
1855
- this.tilted = 1;
1856
- this.stream.stopAnimation();
1857
- await this.drawFrame('green');
1858
- this.stream.changeIDPose(IDPose.Straight);
1859
- }
1847
+ if (results[0].label == 'tilted' && results[0].confidence > 0.8 && this.full == 1 && this.tilted == 0) {
1848
+ this.tilted = 1;
1849
+ this.stream.stopAnimation();
1850
+ await this.drawFrame('green');
1860
1851
  }
1861
1852
  this.classifyVideo();
1862
1853
  }
@@ -4836,6 +4827,7 @@ class Stream {
4836
4827
  takePhoto() {
4837
4828
  return new Promise(async (resolve) => {
4838
4829
  const canvas = document.createElement('canvas');
4830
+ canvas.style.visibility = 'hidden';
4839
4831
  canvas.width = this.videoElement.videoWidth;
4840
4832
  canvas.height = this.videoElement.videoHeight;
4841
4833
  resolve([await this.getFrame(canvas)]);
@@ -4859,8 +4851,8 @@ class Stream {
4859
4851
  resolve(frame);
4860
4852
  }
4861
4853
  }, ImageFormat.PNG, 1);
4862
- let outCanvContext = this.canvasElement.getContext('2d');
4863
- outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
4854
+ //let outCanvContext = this.canvasElement.getContext('2d');
4855
+ //outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
4864
4856
  });
4865
4857
  }
4866
4858
  async startIdDetection() {
@@ -5261,8 +5253,10 @@ const IdBackCapture = class {
5261
5253
  this.videoStarted = undefined;
5262
5254
  this.cameraSize = undefined;
5263
5255
  this.captureTaken = undefined;
5256
+ this.verified = undefined;
5264
5257
  this.titleMesage = undefined;
5265
5258
  this.captureTaken = false;
5259
+ this.verified = false;
5266
5260
  this.cameras = new Cameras();
5267
5261
  }
5268
5262
  eventChangeTitle(event) {
@@ -5322,6 +5316,9 @@ const IdBackCapture = class {
5322
5316
  FaceML5Detector.instance = null;
5323
5317
  }
5324
5318
  verificationFinished() {
5319
+ if (this.verified)
5320
+ return;
5321
+ this.verified = true;
5325
5322
  this.closeCamera();
5326
5323
  }
5327
5324
  takePhoto() {
@@ -5337,7 +5334,7 @@ const IdBackCapture = class {
5337
5334
  }
5338
5335
  render() {
5339
5336
  let loadingBlock;
5340
- if (this.captureTaken) {
5337
+ if (this.verified) {
5341
5338
  loadingBlock = (index.h("div", { class: "pos-relative" }, index.h("div", { class: "dot-effect" }, index.h("div", { class: "snippet", "data-title": ".dot-shuttle" }, index.h("div", { class: "stage filter-contrast" }, index.h("div", { class: "dot-shuttle" }))))));
5342
5339
  }
5343
5340
  // let animationBlock: HTMLImageElement;
@@ -5350,7 +5347,7 @@ const IdBackCapture = class {
5350
5347
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
5351
5348
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
5352
5349
  }
5353
- return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5350
+ return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5354
5351
  }
5355
5352
  get component() { return index.getElement(this); }
5356
5353
  };
@@ -5371,8 +5368,10 @@ const IdCapture = class {
5371
5368
  this.videoStarted = undefined;
5372
5369
  this.cameraSize = undefined;
5373
5370
  this.captureTaken = undefined;
5371
+ this.verified = undefined;
5374
5372
  this.titleMesage = undefined;
5375
5373
  this.captureTaken = false;
5374
+ this.verified = false;
5376
5375
  this.cameras = new Cameras();
5377
5376
  }
5378
5377
  eventChangeTitle(event) {
@@ -5435,7 +5434,6 @@ const IdCapture = class {
5435
5434
  if (this.captureTaken)
5436
5435
  return;
5437
5436
  this.captureTaken = true;
5438
- this.titleMesage = IdCaptureValues.Loading;
5439
5437
  Stream.getInstance()
5440
5438
  .takePhoto()
5441
5439
  .then(res => {
@@ -5443,11 +5441,14 @@ const IdCapture = class {
5443
5441
  });
5444
5442
  }
5445
5443
  verificationFinished() {
5444
+ if (this.verified)
5445
+ return;
5446
+ this.verified = true;
5446
5447
  this.closeCamera();
5447
5448
  }
5448
5449
  render() {
5449
5450
  let loadingBlock;
5450
- if (this.captureTaken) {
5451
+ if (this.verified) {
5451
5452
  loadingBlock = (index.h("div", { class: "pos-relative" }, index.h("div", { class: "dot-effect" }, index.h("div", { class: "snippet", "data-title": ".dot-shuttle" }, index.h("div", { class: "stage filter-contrast" }, index.h("div", { class: "dot-shuttle" }))))));
5452
5453
  }
5453
5454
  // let animationBlock: HTMLImageElement;
@@ -5460,7 +5461,7 @@ const IdCapture = class {
5460
5461
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
5461
5462
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
5462
5463
  }
5463
- return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5464
+ return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5464
5465
  }
5465
5466
  get component() { return index.getElement(this); }
5466
5467
  };
@@ -5963,8 +5964,10 @@ const SelfieCapture = class {
5963
5964
  this.videoStarted = undefined;
5964
5965
  this.cameraSize = undefined;
5965
5966
  this.captureTaken = undefined;
5967
+ this.verified = undefined;
5966
5968
  this.titleMesage = undefined;
5967
5969
  this.captureTaken = false;
5970
+ this.verified = false;
5968
5971
  this.cameras = new Cameras();
5969
5972
  }
5970
5973
  eventChangeTitle(event) {
@@ -6033,11 +6036,14 @@ const SelfieCapture = class {
6033
6036
  });
6034
6037
  }
6035
6038
  verificationFinished() {
6039
+ if (this.verified)
6040
+ return;
6041
+ this.verified = true;
6036
6042
  this.closeCamera();
6037
6043
  }
6038
6044
  render() {
6039
6045
  let loadingBlock;
6040
- if (this.captureTaken) {
6046
+ if (this.verified) {
6041
6047
  loadingBlock = (index.h("div", { class: "pos-relative" }, index.h("div", { class: "dot-effect" }, index.h("div", { class: "snippet", "data-title": ".dot-shuttle" }, index.h("div", { class: "stage filter-contrast" }, index.h("div", { class: "dot-shuttle" }))))));
6042
6048
  }
6043
6049
  // let animationBlock: HTMLImageElement;
@@ -6050,7 +6056,7 @@ const SelfieCapture = class {
6050
6056
  let divClass = 'chenar-buletin pos-relative';
6051
6057
  if (this.videoStarted && this.cameraSize.width < this.cameraSize.height)
6052
6058
  divClass += ' block';
6053
- return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.captureTaken, class: divClass }, index.h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
6059
+ return (index.h("div", { class: "container bg-black" }, index.h("div", { class: "row ctheight-100" }, index.h("div", null, index.h("h1", { class: "color-white" }, this.titleMesage)), index.h("div", { hidden: this.verified, class: divClass }, index.h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, index.h("div", { class: "pos-relative" }, index.h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
6054
6060
  }
6055
6061
  get component() { return index.getElement(this); }
6056
6062
  };
@@ -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([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_16.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
17
+ return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_16.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_16.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
18
+ return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_16.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
19
19
  });
@@ -17,8 +17,10 @@ export class IdBackCapture {
17
17
  this.videoStarted = undefined;
18
18
  this.cameraSize = undefined;
19
19
  this.captureTaken = undefined;
20
+ this.verified = undefined;
20
21
  this.titleMesage = undefined;
21
22
  this.captureTaken = false;
23
+ this.verified = false;
22
24
  this.cameras = new Cameras();
23
25
  }
24
26
  eventChangeTitle(event) {
@@ -78,6 +80,9 @@ export class IdBackCapture {
78
80
  FaceML5Detector.instance = null;
79
81
  }
80
82
  verificationFinished() {
83
+ if (this.verified)
84
+ return;
85
+ this.verified = true;
81
86
  this.closeCamera();
82
87
  }
83
88
  takePhoto() {
@@ -93,7 +98,7 @@ export class IdBackCapture {
93
98
  }
94
99
  render() {
95
100
  let loadingBlock;
96
- if (this.captureTaken) {
101
+ if (this.verified) {
97
102
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
98
103
  }
99
104
  // let animationBlock: HTMLImageElement;
@@ -106,7 +111,7 @@ export class IdBackCapture {
106
111
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
107
112
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
108
113
  }
109
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
114
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
110
115
  }
111
116
  static get is() { return "id-back-capture"; }
112
117
  static get originalStyleUrls() {
@@ -148,6 +153,7 @@ export class IdBackCapture {
148
153
  "videoStarted": {},
149
154
  "cameraSize": {},
150
155
  "captureTaken": {},
156
+ "verified": {},
151
157
  "titleMesage": {}
152
158
  };
153
159
  }
@@ -17,8 +17,10 @@ export class IdCapture {
17
17
  this.videoStarted = undefined;
18
18
  this.cameraSize = undefined;
19
19
  this.captureTaken = undefined;
20
+ this.verified = undefined;
20
21
  this.titleMesage = undefined;
21
22
  this.captureTaken = false;
23
+ this.verified = false;
22
24
  this.cameras = new Cameras();
23
25
  }
24
26
  eventChangeTitle(event) {
@@ -81,7 +83,6 @@ export class IdCapture {
81
83
  if (this.captureTaken)
82
84
  return;
83
85
  this.captureTaken = true;
84
- this.titleMesage = IdCaptureValues.Loading;
85
86
  Stream.getInstance()
86
87
  .takePhoto()
87
88
  .then(res => {
@@ -89,11 +90,14 @@ export class IdCapture {
89
90
  });
90
91
  }
91
92
  verificationFinished() {
93
+ if (this.verified)
94
+ return;
95
+ this.verified = true;
92
96
  this.closeCamera();
93
97
  }
94
98
  render() {
95
99
  let loadingBlock;
96
- if (this.captureTaken) {
100
+ if (this.verified) {
97
101
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
98
102
  }
99
103
  // let animationBlock: HTMLImageElement;
@@ -106,7 +110,7 @@ export class IdCapture {
106
110
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
107
111
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
108
112
  }
109
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
113
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
110
114
  }
111
115
  static get is() { return "id-capture"; }
112
116
  static get originalStyleUrls() {
@@ -148,6 +152,7 @@ export class IdCapture {
148
152
  "videoStarted": {},
149
153
  "cameraSize": {},
150
154
  "captureTaken": {},
155
+ "verified": {},
151
156
  "titleMesage": {}
152
157
  };
153
158
  }
@@ -16,8 +16,10 @@ export class SelfieCapture {
16
16
  this.videoStarted = undefined;
17
17
  this.cameraSize = undefined;
18
18
  this.captureTaken = undefined;
19
+ this.verified = undefined;
19
20
  this.titleMesage = undefined;
20
21
  this.captureTaken = false;
22
+ this.verified = false;
21
23
  this.cameras = new Cameras();
22
24
  }
23
25
  eventChangeTitle(event) {
@@ -86,11 +88,14 @@ export class SelfieCapture {
86
88
  });
87
89
  }
88
90
  verificationFinished() {
91
+ if (this.verified)
92
+ return;
93
+ this.verified = true;
89
94
  this.closeCamera();
90
95
  }
91
96
  render() {
92
97
  let loadingBlock;
93
- if (this.captureTaken) {
98
+ if (this.verified) {
94
99
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
95
100
  }
96
101
  // let animationBlock: HTMLImageElement;
@@ -103,7 +108,7 @@ export class SelfieCapture {
103
108
  let divClass = 'chenar-buletin pos-relative';
104
109
  if (this.videoStarted && this.cameraSize.width < this.cameraSize.height)
105
110
  divClass += ' block';
106
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: divClass }, h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
111
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: divClass }, h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
107
112
  }
108
113
  static get is() { return "selfie-capture"; }
109
114
  static get originalStyleUrls() {
@@ -145,6 +150,7 @@ export class SelfieCapture {
145
150
  "videoStarted": {},
146
151
  "cameraSize": {},
147
152
  "captureTaken": {},
153
+ "verified": {},
148
154
  "titleMesage": {}
149
155
  };
150
156
  }
@@ -170,6 +170,7 @@ export class Stream {
170
170
  takePhoto() {
171
171
  return new Promise(async (resolve) => {
172
172
  const canvas = document.createElement('canvas');
173
+ canvas.style.visibility = 'hidden';
173
174
  canvas.width = this.videoElement.videoWidth;
174
175
  canvas.height = this.videoElement.videoHeight;
175
176
  resolve([await this.getFrame(canvas)]);
@@ -193,8 +194,8 @@ export class Stream {
193
194
  resolve(frame);
194
195
  }
195
196
  }, ImageFormat.PNG, 1);
196
- let outCanvContext = this.canvasElement.getContext('2d');
197
- outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
197
+ //let outCanvContext = this.canvasElement.getContext('2d');
198
+ //outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
198
199
  });
199
200
  }
200
201
  async startIdDetection() {
@@ -58,25 +58,16 @@ export class IDML5Detector {
58
58
  this.stream.timeElapsed();
59
59
  return;
60
60
  }
61
- if (results[0].label == 'full' && results[0].confidence > 0.9) {
62
- if (this.full == 0) {
63
- this.full = 1;
64
- this.stream.stopAnimation();
65
- await this.drawFrame('green');
66
- this.stream.changeIDPose(IDPose.Tilted);
67
- }
68
- if (this.full == 1 && this.tilted == 1) {
69
- this.stream.stopAnimation();
70
- this.drawFrame('green', true);
71
- }
61
+ if (results[0].label == 'full' && results[0].confidence > 0.9 && this.full == 0) {
62
+ this.full = 1;
63
+ this.stream.stopAnimation();
64
+ await this.drawFrame('green');
65
+ this.stream.changeIDPose(IDPose.Tilted);
72
66
  }
73
- if (results[0].label == 'tilted' && results[0].confidence > 0.8) {
74
- if (this.full == 1 && this.tilted == 0) {
75
- this.tilted = 1;
76
- this.stream.stopAnimation();
77
- await this.drawFrame('green');
78
- this.stream.changeIDPose(IDPose.Straight);
79
- }
67
+ if (results[0].label == 'tilted' && results[0].confidence > 0.8 && this.full == 1 && this.tilted == 0) {
68
+ this.tilted = 1;
69
+ this.stream.stopAnimation();
70
+ await this.drawFrame('green');
80
71
  }
81
72
  this.classifyVideo();
82
73
  }
@@ -1834,25 +1834,16 @@ class IDML5Detector {
1834
1834
  this.stream.timeElapsed();
1835
1835
  return;
1836
1836
  }
1837
- if (results[0].label == 'full' && results[0].confidence > 0.9) {
1838
- if (this.full == 0) {
1839
- this.full = 1;
1840
- this.stream.stopAnimation();
1841
- await this.drawFrame('green');
1842
- this.stream.changeIDPose(IDPose.Tilted);
1843
- }
1844
- if (this.full == 1 && this.tilted == 1) {
1845
- this.stream.stopAnimation();
1846
- this.drawFrame('green', true);
1847
- }
1837
+ if (results[0].label == 'full' && results[0].confidence > 0.9 && this.full == 0) {
1838
+ this.full = 1;
1839
+ this.stream.stopAnimation();
1840
+ await this.drawFrame('green');
1841
+ this.stream.changeIDPose(IDPose.Tilted);
1848
1842
  }
1849
- if (results[0].label == 'tilted' && results[0].confidence > 0.8) {
1850
- if (this.full == 1 && this.tilted == 0) {
1851
- this.tilted = 1;
1852
- this.stream.stopAnimation();
1853
- await this.drawFrame('green');
1854
- this.stream.changeIDPose(IDPose.Straight);
1855
- }
1843
+ if (results[0].label == 'tilted' && results[0].confidence > 0.8 && this.full == 1 && this.tilted == 0) {
1844
+ this.tilted = 1;
1845
+ this.stream.stopAnimation();
1846
+ await this.drawFrame('green');
1856
1847
  }
1857
1848
  this.classifyVideo();
1858
1849
  }
@@ -4832,6 +4823,7 @@ class Stream {
4832
4823
  takePhoto() {
4833
4824
  return new Promise(async (resolve) => {
4834
4825
  const canvas = document.createElement('canvas');
4826
+ canvas.style.visibility = 'hidden';
4835
4827
  canvas.width = this.videoElement.videoWidth;
4836
4828
  canvas.height = this.videoElement.videoHeight;
4837
4829
  resolve([await this.getFrame(canvas)]);
@@ -4855,8 +4847,8 @@ class Stream {
4855
4847
  resolve(frame);
4856
4848
  }
4857
4849
  }, ImageFormat.PNG, 1);
4858
- let outCanvContext = this.canvasElement.getContext('2d');
4859
- outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
4850
+ //let outCanvContext = this.canvasElement.getContext('2d');
4851
+ //outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
4860
4852
  });
4861
4853
  }
4862
4854
  async startIdDetection() {
@@ -5257,8 +5249,10 @@ const IdBackCapture = class {
5257
5249
  this.videoStarted = undefined;
5258
5250
  this.cameraSize = undefined;
5259
5251
  this.captureTaken = undefined;
5252
+ this.verified = undefined;
5260
5253
  this.titleMesage = undefined;
5261
5254
  this.captureTaken = false;
5255
+ this.verified = false;
5262
5256
  this.cameras = new Cameras();
5263
5257
  }
5264
5258
  eventChangeTitle(event) {
@@ -5318,6 +5312,9 @@ const IdBackCapture = class {
5318
5312
  FaceML5Detector.instance = null;
5319
5313
  }
5320
5314
  verificationFinished() {
5315
+ if (this.verified)
5316
+ return;
5317
+ this.verified = true;
5321
5318
  this.closeCamera();
5322
5319
  }
5323
5320
  takePhoto() {
@@ -5333,7 +5330,7 @@ const IdBackCapture = class {
5333
5330
  }
5334
5331
  render() {
5335
5332
  let loadingBlock;
5336
- if (this.captureTaken) {
5333
+ if (this.verified) {
5337
5334
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
5338
5335
  }
5339
5336
  // let animationBlock: HTMLImageElement;
@@ -5346,7 +5343,7 @@ const IdBackCapture = class {
5346
5343
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
5347
5344
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
5348
5345
  }
5349
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5346
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5350
5347
  }
5351
5348
  get component() { return getElement(this); }
5352
5349
  };
@@ -5367,8 +5364,10 @@ const IdCapture = class {
5367
5364
  this.videoStarted = undefined;
5368
5365
  this.cameraSize = undefined;
5369
5366
  this.captureTaken = undefined;
5367
+ this.verified = undefined;
5370
5368
  this.titleMesage = undefined;
5371
5369
  this.captureTaken = false;
5370
+ this.verified = false;
5372
5371
  this.cameras = new Cameras();
5373
5372
  }
5374
5373
  eventChangeTitle(event) {
@@ -5431,7 +5430,6 @@ const IdCapture = class {
5431
5430
  if (this.captureTaken)
5432
5431
  return;
5433
5432
  this.captureTaken = true;
5434
- this.titleMesage = IdCaptureValues.Loading;
5435
5433
  Stream.getInstance()
5436
5434
  .takePhoto()
5437
5435
  .then(res => {
@@ -5439,11 +5437,14 @@ const IdCapture = class {
5439
5437
  });
5440
5438
  }
5441
5439
  verificationFinished() {
5440
+ if (this.verified)
5441
+ return;
5442
+ this.verified = true;
5442
5443
  this.closeCamera();
5443
5444
  }
5444
5445
  render() {
5445
5446
  let loadingBlock;
5446
- if (this.captureTaken) {
5447
+ if (this.verified) {
5447
5448
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
5448
5449
  }
5449
5450
  // let animationBlock: HTMLImageElement;
@@ -5456,7 +5457,7 @@ const IdCapture = class {
5456
5457
  cameraStyle = { width: Math.round(this.cameraSize.width) + 'px', height: Math.round((this.cameraSize.width * 9) / 16) + 'px', overflow: 'hidden', borderRadius: '10px' };
5457
5458
  cameraStyleInner = { marginTop: Math.round((this.cameraSize.height - (this.cameraSize.width * 9) / 16) / 2) * -1 + 'px' };
5458
5459
  }
5459
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5460
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: "chenar-buletin pos-relative" }, h("div", { style: cameraStyle }, h("div", { style: cameraStyleInner }, h("camera-comp", { device: this.device, "capture-mode": "id" })))), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText)))));
5460
5461
  }
5461
5462
  get component() { return getElement(this); }
5462
5463
  };
@@ -5959,8 +5960,10 @@ const SelfieCapture = class {
5959
5960
  this.videoStarted = undefined;
5960
5961
  this.cameraSize = undefined;
5961
5962
  this.captureTaken = undefined;
5963
+ this.verified = undefined;
5962
5964
  this.titleMesage = undefined;
5963
5965
  this.captureTaken = false;
5966
+ this.verified = false;
5964
5967
  this.cameras = new Cameras();
5965
5968
  }
5966
5969
  eventChangeTitle(event) {
@@ -6029,11 +6032,14 @@ const SelfieCapture = class {
6029
6032
  });
6030
6033
  }
6031
6034
  verificationFinished() {
6035
+ if (this.verified)
6036
+ return;
6037
+ this.verified = true;
6032
6038
  this.closeCamera();
6033
6039
  }
6034
6040
  render() {
6035
6041
  let loadingBlock;
6036
- if (this.captureTaken) {
6042
+ if (this.verified) {
6037
6043
  loadingBlock = (h("div", { class: "pos-relative" }, h("div", { class: "dot-effect" }, h("div", { class: "snippet", "data-title": ".dot-shuttle" }, h("div", { class: "stage filter-contrast" }, h("div", { class: "dot-shuttle" }))))));
6038
6044
  }
6039
6045
  // let animationBlock: HTMLImageElement;
@@ -6046,7 +6052,7 @@ const SelfieCapture = class {
6046
6052
  let divClass = 'chenar-buletin pos-relative';
6047
6053
  if (this.videoStarted && this.cameraSize.width < this.cameraSize.height)
6048
6054
  divClass += ' block';
6049
- return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.captureTaken, class: divClass }, h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
6055
+ return (h("div", { class: "container bg-black" }, h("div", { class: "row ctheight-100" }, h("div", null, h("h1", { class: "color-white" }, this.titleMesage)), h("div", { hidden: this.verified, class: divClass }, h("camera-comp", { device: this.device, "capture-mode": "selfie" })), loadingBlock, h("div", { class: "pos-relative" }, h("p", { class: "main-text font-size-18 text-right mb-0" }, SelfieCaptureValues.FooterText)))));
6050
6056
  }
6051
6057
  get component() { return getElement(this); }
6052
6058
  };
@@ -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([["loader-dots",[[1,"loader-dots"]]],["agreement-check_16",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
13
+ return bootstrapLazy([["loader-dots",[[1,"loader-dots"]]],["agreement-check_16",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"idSide":[32],"errorMessage":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"stopAnimation","eventStopAnimation"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"descriptionR1":[32],"descriptionR2":[32],"descriptionR3":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
14
14
  });
15
15
  };
16
16