@ekyc_qoobiss/qbs-ect-cmp 4.7.23 → 4.7.24

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.
@@ -592,6 +592,7 @@ const IdAutoCapture = class {
592
592
  // Method for continuous video frame processing with OpenCV
593
593
  this.processVideoFrame = () => {
594
594
  if (this.videoElement && this.processingCanvasElement && this.opencvReady && this.isDetecting) {
595
+ console.log('Processing frame. cv.Mat is a constructor:', typeof cv.Mat === 'function');
595
596
  const video = this.videoElement;
596
597
  const processingCanvas = this.processingCanvasElement;
597
598
  const context = processingCanvas.getContext('2d');
@@ -734,10 +735,6 @@ const IdAutoCapture = class {
734
735
  this.loadOpenCVScript();
735
736
  // Listen for the custom event dispatched by global.ts (ensures global.ts sets up window.Module)
736
737
  document.addEventListener('opencv:ready', this.handleOpencvReady);
737
- // Initial check in case opencv.js loads very fast and event was already dispatched
738
- if (typeof cv !== 'undefined' && cv.Mat) {
739
- this.handleOpencvReady();
740
- }
741
738
  }
742
739
  disconnectedCallback() {
743
740
  if (this.mediaStream) {
@@ -758,7 +755,7 @@ const IdAutoCapture = class {
758
755
  }
759
756
  }
760
757
  loadOpenCVScript() {
761
- if (!this.opencvScriptElement) {
758
+ if (!document.querySelector('script[src="https://docs.opencv.org/4.x/opencv.js"]')) {
762
759
  // Only load if not already loaded
763
760
  this.opencvScriptElement = document.createElement('script');
764
761
  this.opencvScriptElement.type = 'text/javascript';
@@ -767,6 +764,9 @@ const IdAutoCapture = class {
767
764
  document.body.appendChild(this.opencvScriptElement); // Append to body or head
768
765
  console.log('Dynamically loaded opencv.js');
769
766
  }
767
+ else {
768
+ console.log('OpenCV.js script already present in the DOM.');
769
+ }
770
770
  }
771
771
  // Method to get user media (camera stream)
772
772
  async getMedia() {
@@ -791,7 +791,7 @@ const IdAutoCapture = class {
791
791
  if (TranslationUtils.state.device.isDesktop) {
792
792
  cameraVideoClass = 'cameraVideoSelfieDesk';
793
793
  }
794
- return (index.h("div", { key: '32fa99f679fbbc0009608aeb2eeb26645dbadb59', class: "container flex center" }, index.h("div", { key: '08ee0848724b359253d27120fe5e2751372cab1e', class: "px-2 w-100" }, index.h("h1", { key: '570154c491f44b72f5a6794f17b1a19c964a55e5', class: this.titleStyle, innerHTML: this.titleMesage }), index.h("div", { key: '2a626737524f5748e4d6faeb109f3dc59fe3388b', hidden: this.verified }, index.h("div", { key: 'f38962922b06f902790d9d549c3d1c507cafb8b8', class: "w-100 h-100 rounded" }, index.h("div", { key: '7c69f659183dfdfab7ea759c1a5a574af19df679', class: "camera rounded" }, index.h("video", { key: '7f378deee95b9821715add1f9b66e9299b6e4380', id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.videoElement = el) }), index.h("canvas", { key: '8150fbc30e908e011f415b73a0e3f2d8711f2d20', id: "output", ref: el => (this.canvasElement = el), style: { display: 'none' } }), index.h("canvas", { key: '54887d1f9266d32f653760ff6e70971e2d525c0a', id: "processingCanvasElement", ref: el => (this.processingCanvasElement = el), style: { display: 'none' } }), index.h("div", { key: 'cf656641dcb1cf1bf845c28a97630c72f7da8fe6', class: "id-guide-rectangle" }), this.isCapturing && index.h("div", { key: 'eabb935e014eb3966940a27a5aa100477249dbba', class: "capture-flash-overlay" }), this.countdown > 0 && (index.h("div", { key: 'e8a05e21e03673637e0194b3d967ed0044891a01', class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center" }, index.h("span", { key: 'f6996d51686b935aa4aaa6f2abe4062d5782c116', class: "text-white text-9xl font-bold animate-bounce" }, this.countdown)))))), index.h("div", { key: 'd4fc6a0ff5951767a43f9166fcf47f98b4d209a7', class: "footer text-center" }, index.h("img", { key: 'a84cc0c65a6684807abf314d9839babe16768494', src: Cameras.logoOntraceSvg })))));
794
+ return (index.h("div", { key: '0b0333b5c7b20a216319cf081a9f49111012596e', class: "container flex center" }, index.h("div", { key: 'e7980ea76bddf47ac73f865b3c4cb609d4597cbd', class: "px-2 w-100" }, index.h("h1", { key: 'd5a97b44269a80d3a3cee564ff48cf543d3bfc04', class: this.titleStyle, innerHTML: this.titleMesage }), index.h("div", { key: 'e52e5f59f446be42bba3ae25377fbbe7e2b87d87', hidden: this.verified }, index.h("div", { key: 'f680400952063d743350a607e2f503bc57fdcdff', class: "w-100 h-100 rounded" }, index.h("div", { key: '237debd548236f0a12c71ac73b61ff420bd91203', class: "camera rounded" }, index.h("video", { key: 'db25e8012fc4639d785a175a449ac4ec5130d113', id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.videoElement = el) }), index.h("canvas", { key: 'd2c08faa9f71bf7c8b5f161fd76d49a99960a73e', id: "output", ref: el => (this.canvasElement = el), style: { display: 'none' } }), index.h("canvas", { key: '1882ca42f1716dd6573e28ffb289958000d8e23a', id: "processingCanvasElement", ref: el => (this.processingCanvasElement = el), style: { display: 'none' } }), index.h("div", { key: 'ed29e8ff7706909244dfc6ef8ef2a3529e010628', class: "id-guide-rectangle" }), this.isCapturing && index.h("div", { key: '4df9ad4556cd2d57b0a5e18d0fe18b10b61cd55b', class: "capture-flash-overlay" }), this.countdown > 0 && (index.h("div", { key: 'c06a98f7a785bdefeba161a39a701eb7257a90d6', class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center" }, index.h("span", { key: '63407cf0373b92248eef073d863b12536c6f9cfc', class: "text-white text-9xl font-bold animate-bounce" }, this.countdown)))))), index.h("div", { key: '047ebeeb0b61d05f95f51b23e48a14eed82dbb31', class: "footer text-center" }, index.h("img", { key: 'deeea20a5acf6618ee24fbfa6919b8a5a38bb1d0', src: Cameras.logoOntraceSvg })))));
795
795
  }
796
796
  get el() { return index.getElement(this); }
797
797
  };
@@ -856,7 +856,7 @@ const IdSelection = class {
856
856
  };
857
857
  IdSelection.style = idSelectionCss;
858
858
 
859
- const version$1 = "4.7.23";
859
+ const version$1 = "4.7.24";
860
860
  var packageJson = {
861
861
  version: version$1};
862
862