@jaak.ai/stamps 2.3.0-dev.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -738,7 +738,7 @@ class HighPerformanceDeviceStrategy {
738
738
  class IOSSafariStrategy {
739
739
  getDeviceInfo() {
740
740
  return {
741
- estimatedRAM: 3, // Assume low memory for iOS
741
+ estimatedRAM: 3,
742
742
  isLowMemory: true,
743
743
  isSlowConnection: false
744
744
  };
@@ -766,9 +766,9 @@ class DeviceStrategyFactory {
766
766
  static createStrategy() {
767
767
  const nav = navigator;
768
768
  const ua = navigator.userAgent;
769
- // iOS Safari requires special handling due to WebKit memory constraints
770
- const isIOSSafari = /iPad|iPhone|iPod/.test(ua) && /Safari/.test(ua) && !/CriOS|FxiOS|OPiOS|EdgiOS/.test(ua);
771
- if (isIOSSafari) {
769
+ // All iOS browsers use WebKit, which has memory constraints
770
+ const isIOS = /iPad|iPhone|iPod/.test(ua);
771
+ if (isIOS) {
772
772
  return new IOSSafariStrategy();
773
773
  }
774
774
  const memory = nav.deviceMemory || nav.hardwareConcurrency || 4;
@@ -18915,10 +18915,11 @@ const JaakStamps = class {
18915
18915
  if (!window.ort) {
18916
18916
  this.updateStatus('Preparando herramientas...', 'Configurando funciones de captura', 'initializing');
18917
18917
  const script = document.createElement('script');
18918
- // iOS Safari uses WASM-only build to prevent memory issues (WebKit 26+ bug)
18918
+ // iOS devices use WASM-only build to prevent memory issues (WebKit 26+ bug)
18919
+ // All iOS browsers use WebKit, so this applies to Safari, Chrome, Firefox, etc.
18919
18920
  const ua = navigator.userAgent;
18920
- const isIOSSafari = /iPad|iPhone|iPod/.test(ua) && /Safari/.test(ua) && !/CriOS|FxiOS|OPiOS|EdgiOS/.test(ua);
18921
- if (isIOSSafari) {
18921
+ const isIOS = /iPad|iPhone|iPod/.test(ua);
18922
+ if (isIOS) {
18922
18923
  script.src = 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.23.0/dist/ort.wasm.min.js';
18923
18924
  }
18924
18925
  else {
@@ -18927,8 +18928,8 @@ const JaakStamps = class {
18927
18928
  document.head.appendChild(script);
18928
18929
  await new Promise((resolve) => {
18929
18930
  script.onload = () => {
18930
- // Configure ONNX for iOS Safari low memory mode
18931
- if (isIOSSafari && window.ort?.env) {
18931
+ // Configure ONNX for iOS low memory mode
18932
+ if (isIOS && window.ort?.env) {
18932
18933
  const ort = window.ort;
18933
18934
  ort.env.wasm.simd = false;
18934
18935
  ort.env.wasm.numThreads = 1;
@@ -19790,7 +19791,7 @@ const JaakStamps = class {
19790
19791
  isCapturing: false
19791
19792
  };
19792
19793
  const cameraInfo = this.cameraInfoWithAutofocus;
19793
- return (index.h("div", { key: 'dc3aed0b4d2d84039b4a123d4bdfe484ea3320ef', class: "detector-container" }, !this.licenseValid && this.licenseError && (index.h("div", { key: 'a9da275905e2d051252f191be944675781632d10', class: "license-error-container" }, index.h("div", { key: 'a36f7408f0d862edd1183ba813c64d9be91f15c6', class: "license-error-card" }, index.h("svg", { key: 'a8e5f3eefc224e16fb62fc0b6d152c85cee249d1', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'f645fb46a62004309dee1ede871d980c104fedc5', d: "M12 22C12 22 20 18 20 12V5L12 2L4 5V12C4 18 12 22 12 22Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { key: 'ee472eb3d17cddf46bef7e96561296ff6fbb1aed', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), index.h("circle", { key: 'c58c787c6c9e307159b3103fdd240e282823aa2f', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), index.h("h2", { key: 'f737ae630fb7661d12a17b7e48cb2c3a1cb6cb4e', class: "license-error-title" }, "Licencia Requerida"), index.h("p", { key: 'fb5cf8d815cddc79f7b5e9ff39f34852a43bc976', class: "license-error-message" }, this.licenseError), index.h("p", { key: 'b47831ee55110b100aa0ea9cbe21d39d2fc19306', class: "license-error-help" }, "Contacte a soporte: ", index.h("a", { key: '52eb8dea1dfdc989b921134f57f1f3f188429061', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), index.h("div", { key: 'fd78565f67049165236694de5ddd415421d0063e', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (index.h("div", { key: '19e5854e1683f57dbde2d857289095db75084496', class: "video-container" }, index.h("video", { key: 'e44fbc4c020317899620e8aa9e7e3c854ca5a2d9', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: { display: captureState.isVideoActive ? 'block' : 'none' } }), index.h("div", { key: '2b3af557f8ccb39fd7dbcef07fa6d41d021fd772', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index$1) => (index.h("div", { key: index$1, class: "detection-box", style: {
19794
+ return (index.h("div", { key: 'c5af80713fb108ab73d086f2acbdd11277d7d52c', class: "detector-container" }, !this.licenseValid && this.licenseError && (index.h("div", { key: '99c886b52f58e667f76dce00f09828b9962b3606', class: "license-error-container" }, index.h("div", { key: 'ffd643ef41b3a4b1aa8f40075232a1d70695d566', class: "license-error-card" }, index.h("svg", { key: '90e628f4e6e20ac8b27560833ada7486aac1c9fb', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'cb442fe342c6c0ffb50dfcda42d0af43adedf143', d: "M12 22C12 22 20 18 20 12V5L12 2L4 5V12C4 18 12 22 12 22Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { key: '6b29651b70273f585d9870e71811c0cdb57ea659', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), index.h("circle", { key: '9ec1e61c3bc9e6f7046a49e45e7ef87880d8a443', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), index.h("h2", { key: '56de8037a70da2c0b185029d4a9da0c935fd8c2b', class: "license-error-title" }, "Licencia Requerida"), index.h("p", { key: 'b6634818db630b62c8a5aa6152adc8e6da5f329f', class: "license-error-message" }, this.licenseError), index.h("p", { key: '8c0b404805c2515912416b9a62d66680e6d4b411', class: "license-error-help" }, "Contacte a soporte: ", index.h("a", { key: '1cd69e09c282353548ad9b14985054e47b6ff218', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), index.h("div", { key: 'c2d13002c8f91a35b647199c77eb78b5643316df', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (index.h("div", { key: '094f1c85b06758399520cb85a461e1af755e3d45', class: "video-container" }, index.h("video", { key: 'e7973937fa0d77c9793e984d063ec29a80d464eb', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: { display: captureState.isVideoActive ? 'block' : 'none' } }), index.h("div", { key: 'fb86b9eb362e13902d31803c187f5d2b6c5ac664', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index$1) => (index.h("div", { key: index$1, class: "detection-box", style: {
19794
19795
  position: 'absolute',
19795
19796
  left: `${box.x}px`,
19796
19797
  top: `${box.y}px`,
@@ -19799,9 +19800,9 @@ const JaakStamps = class {
19799
19800
  border: '2px solid #32406C',
19800
19801
  pointerEvents: 'none',
19801
19802
  boxSizing: 'border-box'
19802
- } })))), this.isMaskReady && (index.h("div", { key: '2cf20cef5e5dc4d5d3282413dce2af0f75b1babe', class: "overlay-mask" }, index.h("div", { key: '241879ebba739d63a736eca258b735c5c8fdac00', class: "card-outline" }, index.h("div", { key: '30d895b1a438636d9cd9a759b0fc096446e256a1', class: "side side-top" }), index.h("div", { key: 'dcca6a422e4c1c20bfc1bd17d7f45305422386a8', class: "side side-right" }), index.h("div", { key: '2cec938bd863737ae9c0906ed0bce2f16b7461fa', class: "side side-bottom" }), index.h("div", { key: 'c6045def438350be85f4333b9166111a9820c8fd', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '187bb5013fe6e7454bfc498b3f24844bb16881a3', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: 'a8ffba382875432493eb6564e4d8872d5d7e485a', class: "back-capture-section" }, index.h("div", { key: '562c149a1f81b8a73df631c81dc2119c1b9427cd', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (index.h("button", { key: '6dc9a222959df902caec68d72c885fba11e41a79', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (index.h("span", { key: 'dd3ae6cdba5f4e6085d4d31abebda12f1c1367f8', class: "button-spinner" })), "Capturar Reverso")), index.h("button", { key: 'cddd1951d4370da5165bf0fa450e3c176ec6cf61', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (index.h("span", { key: 'da8c1c0af97e164150110cce97d4f4d83e9ffb20', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
19803
+ } })))), this.isMaskReady && (index.h("div", { key: '28a8d52ace75ee2dc3f4cd31275f2feae0db31e3', class: "overlay-mask" }, index.h("div", { key: '16c956f26a514c67ae178da5db2c0d19b53acdac', class: "card-outline" }, index.h("div", { key: '578f111f358c0b66968b389f99235d1361ff035c', class: "side side-top" }), index.h("div", { key: 'e7854fd3363f340fd2c832815e7c8aaf8935e5f4', class: "side side-right" }), index.h("div", { key: 'c6f58f1c03506ec8920b914b76679730d1944b0e', class: "side side-bottom" }), index.h("div", { key: 'a1af9d6777819d2c941ff99b985c3430d673e534', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: 'fc9ec8cf13eb9b25140ebb9cfddd6636dc3b6e99', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '078ce12f5f2d24928d3f66eedac97f8c4bae3717', class: "back-capture-section" }, index.h("div", { key: '9bf0528cc9fc691c212cf413bafdfeb999b47682', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (index.h("button", { key: '8d5613bda9e823293181f4551dfc5a49683a0e3e', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (index.h("span", { key: '19909120ab9576d4b820e528c1456f8ba5f17fb9', class: "button-spinner" })), "Capturar Reverso")), index.h("button", { key: '6e1cfac4e73ace6a2e59ed601e82c3f5b2770681', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (index.h("span", { key: '4aa6846d76295a428185ef3a83d15554eb2d9d00', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
19803
19804
  ? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
19804
- : 'Saltar reverso')))), captureState.isVideoActive && (index.h("div", { key: 'd6478c7161d61e1f9f95a9d7bd13cd0cde157061', class: "camera-controls" }, index.h("button", { key: 'dfede9b72f07c88fc5133d3951ddfb6e507b8e8a', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (index.h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (index.h("div", { key: '9218f824cc57b7a8b08f87ed0728c3995fa8b57e', class: "camera-selector-dropdown" }, index.h("div", { key: '48828e7532f49c3e9eece8051585aa803ea3c69e', class: "camera-selector-header" }, index.h("span", { key: '49488cbea9f196788e4110cb9b1f132b8097a771' }, "Seleccionar C\u00E1mara"), index.h("button", { key: '5b762a2da1719c645a490e5234703ba07c50d294', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), index.h("div", { key: '4c13d185e4166dc59621dd8a79a2e7123d810dff', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (index.h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, index.h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (index.h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (index.h("span", { class: "selected-indicator" }, "\u2713")))))), index.h("div", { key: '6860e0fbc0578a74fcd59b3567dd6e4f9a5a4139', class: "device-info" }, index.h("small", { key: '45e6045c7fdc0f4d58bc3c4da059a6b7c2ce09f6' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '600d4932b6a7ae7529ef9dc8c22bb352e0f3ae5d', class: "manual-capture-section" }, index.h("button", { key: '6ad22fbe065602d9214530c374aed05d728114cc', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (index.h("span", { key: 'd54d5624764ef2774bac1f77551d4c657f4b3e92', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (index.h("div", { key: 'ab8c46dd497c3911e72d685310c4dccd0e5aca57', class: "capture-animation" })), captureState.showFlipAnimation && (index.h("div", { key: '545fc8d38085825921e5d61e9d20960b5767a50a', class: "flip-animation" }, index.h("div", { key: 'fd8540ca1e388070233e366aef791e00c1970de1', class: "id-card-icon" }), index.h("div", { key: 'f952bdf0b5eccffe5d6b36930250e699ebfb8fd8', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (index.h("div", { key: 'cd9b11e3de2f799096b610582b66e044eda64c2e', class: "success-animation" }, index.h("div", { key: '73091c9dae5e6c0f2dbd23bf2e0b760f2495f33b', class: "check-icon" }), index.h("div", { key: 'ad2f9b0b90190b385740bb2fd4ed9454858f13a2', class: "success-text" }, "\u00A1Proceso completado!"))), index.h("div", { key: 'd74d66f12fab510f0aff01f0e233482ed6f63e46', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (index.h("div", { key: '9060ae79961c7b1b473d5148493fda6462e50388', class: "status-spinner" })), index.h("div", { key: 'fd0c61e49a751afd826d30ed9f63b96b58c8e275', class: "status-content" }, index.h("div", { key: 'd0f0e155fba7a09658f7c21beae5f07c26c0701e', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (index.h("div", { key: '0694da4ec0ef14750097e69e8caf1db88cf58ed5', class: "status-description" }, this.currentStatus.description)))), this.debug && (index.h("div", { key: '277369112303b12a3cef89c1b7218fdc6f130723', class: "performance-monitor" }, index.h("div", { key: 'f6456cfd210c0d4b8b02b2b73d2405fa7c12923d', class: "performance-expanded" }, index.h("div", { key: '2cd33cbccf2cf3422f09bd3b914a3bc37b0a1190', class: "metrics-row" }, index.h("div", { key: '7871e7fe4f63249731ff33f87023351d9c5ded77', class: "metric-compact" }, index.h("span", { key: 'b864eb43b44838fd5c67c8e430bfa04553130473', class: "metric-label" }, "FPS"), index.h("span", { key: '7a0e6f4ebcf80b1483102094e0906b2b1a5aa83b', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), index.h("div", { key: 'ef5e590957e12bd6e9371710654278396baa5314', class: "metric-compact" }, index.h("span", { key: '5cc740e4a2a1e07eb53bcb0cc8c5c3df59f27730', class: "metric-label" }, "MEM"), index.h("span", { key: '758018f1731d7f26aa5d84e7563b059f352be361', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), index.h("div", { key: '1bedd37486ae4b8ba547507f2664ea19c67a18c7', class: "metrics-row" }, index.h("div", { key: '4f99be14cda01b199cae93905043a6e03a852d1b', class: "metric-compact" }, index.h("span", { key: 'c29a4a3461633e776cd86168c59c89c6b39af18d', class: "metric-label" }, "INF"), index.h("span", { key: '9401828ffd1d3e41ce473ba3d0aec592a683472f', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), index.h("div", { key: '7d4fdad150bb665640add08464ea361aeaa8ef6b', class: "metric-compact" }, index.h("span", { key: '7c21d775970466b339fdbb392227ec7006b87e31', class: "metric-label" }, "FRAME"), index.h("span", { key: '255d408312a11f350ea75654fc64edf0d4bcfef2', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), index.h("div", { key: '54ab129c3ffda4f1a32a2b0f437a7c38cb480aba', class: "metrics-row" }, index.h("div", { key: 'a246db2ef3a69d0d64827a73dd32968cb1e978e9', class: "metric-compact" }, index.h("span", { key: '8da1c9a5be45bcc23584234cb04f0e75fa3662c6', class: "metric-label" }, "DET"), index.h("span", { key: 'ad05c2b885a6b344391f70ce3acee8b41523743d', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), index.h("div", { key: '7449e8f7cbd15a6b828b90c923212c3578de3d11', class: "metric-compact" }, index.h("span", { key: 'da37f89e9641edfdfd60de7fdbf2f6285a2a4120', class: "metric-label" }, "RATE"), index.h("span", { key: 'de71b2072ce451a304ceb6b158d32b0ecde6d64a', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), index.h("div", { key: '6e2c10e239bca24062cd2972b5e4a3eb0951d0eb', class: "watermark" }, index.h("img", { key: '63fbe0ade07a191ccc9c007fc2813ac8f6e5ab2f', src: "https://storage.googleapis.com/jaak-static/commons/powered-by-jaak.png", alt: "Powered by Jaak" }))))));
19805
+ : 'Saltar reverso')))), captureState.isVideoActive && (index.h("div", { key: '1c2ca195f159238c1b234e97dd3871d0a1caa3c8', class: "camera-controls" }, index.h("button", { key: '085795c9083606fde64aeb211c242c031ebaf66a', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (index.h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (index.h("div", { key: 'e153c9e786afc0e911c32056351fa358eca45d21', class: "camera-selector-dropdown" }, index.h("div", { key: 'cb611c0d0b3170da382cb54895888d465ac4bd0a', class: "camera-selector-header" }, index.h("span", { key: '200f7cdf43ec10163e573fbc00b077d75cc703ae' }, "Seleccionar C\u00E1mara"), index.h("button", { key: '86cd2942c5a499053e64d2432dfbaa2bf9612777', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), index.h("div", { key: '1085775e191c43105ac4c645bb8fa227f1a230f5', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (index.h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, index.h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (index.h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (index.h("span", { class: "selected-indicator" }, "\u2713")))))), index.h("div", { key: 'b7465daa8357fce5192ba4800b03fc200e065145', class: "device-info" }, index.h("small", { key: '2c824e7585afd324cefd071cdda380f3df5ada1b' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (index.h("div", { key: '703f54145582191eaddcecd22a718dd72e16f977', class: "manual-capture-section" }, index.h("button", { key: 'dcbaa7e780c4bdb0703653e25146b17248a2d8c9', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (index.h("span", { key: 'cb989324a41f502ae740941ad75e6240051d8273', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (index.h("div", { key: 'c3567ccbd287c39f72cbca897e5f643c68624b5e', class: "capture-animation" })), captureState.showFlipAnimation && (index.h("div", { key: 'b16f56f7fc7c710a4b41760515b2b8054d2aad4c', class: "flip-animation" }, index.h("div", { key: 'df905809f04bece3856545f8a6a1dcce89377377', class: "id-card-icon" }), index.h("div", { key: 'daa09f264bf3708e535a3be580b86145568d4f66', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (index.h("div", { key: '1be7277ef588b42060808b575670872a6aa08925', class: "success-animation" }, index.h("div", { key: 'ce18848121423499a4bc7b2e95586f3a01bc6ceb', class: "check-icon" }), index.h("div", { key: '2e2ae20c3e4bffbf3ec45f2fd7016a485ea380c1', class: "success-text" }, "\u00A1Proceso completado!"))), index.h("div", { key: '951f37ba2b6366aa44e15c1dcf17b2ec6975131d', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (index.h("div", { key: '1718aa68ed5db592183696bc212c7066f35bf789', class: "status-spinner" })), index.h("div", { key: '45bf0d9ee7786578b34d25623667ee8336720270', class: "status-content" }, index.h("div", { key: '4fa2c1f9ddc62981cefbd63c19e04d14a503a406', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (index.h("div", { key: '7f38fb0096a15467a63362979137981e84df55f9', class: "status-description" }, this.currentStatus.description)))), this.debug && (index.h("div", { key: '692e49518f3f78960b74f47741f2051e95ce9280', class: "performance-monitor" }, index.h("div", { key: 'be9f96048e16510203d8abc3b2b09ea9a0e91fe1', class: "performance-expanded" }, index.h("div", { key: 'ca19a5467a8bba02be34e3515af3f92839a4397a', class: "metrics-row" }, index.h("div", { key: '54a6b187da25a3a6af0c8fbfc023fb16b45bb606', class: "metric-compact" }, index.h("span", { key: '52b9bd1bbb8542011139b4556af213f64cc62c1f', class: "metric-label" }, "FPS"), index.h("span", { key: 'eff3acd45c407866e9c67205a4b4f0727b47afc8', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), index.h("div", { key: 'fad4f7c5603ba7c2a95544d37f9d4b61c1840dca', class: "metric-compact" }, index.h("span", { key: 'e01386e6898c3f036f66795e71e65dad4d11366a', class: "metric-label" }, "MEM"), index.h("span", { key: '71cb13b49656c869be920080f7b53ce2e709a4c0', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), index.h("div", { key: '61fa2c277a2226f68d9dc036450dc086a1409b62', class: "metrics-row" }, index.h("div", { key: '752052d1cdc68a5d65c3ec3f0b85241527d251ae', class: "metric-compact" }, index.h("span", { key: 'de5fae8f627df6347e5569d31433a96476bba22d', class: "metric-label" }, "INF"), index.h("span", { key: '841c1a1b42e63e9fc4c56c72b54e07e47997f8be', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), index.h("div", { key: '194d01303155cda7b58a3bca1bd34795eac31556', class: "metric-compact" }, index.h("span", { key: '73f023e1de8b6fbc8976bc3fe1d9655d3d5f3c92', class: "metric-label" }, "FRAME"), index.h("span", { key: 'ddb8d7fa99b83f477bd8cbfe4ca856d2baa7a493', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), index.h("div", { key: '37eb5780cd09e3c056e7094b6b028789529112e3', class: "metrics-row" }, index.h("div", { key: '236828977e1a634fddda1fef079c7780e469b815', class: "metric-compact" }, index.h("span", { key: 'd704dd8ba1e2080159a932c87208d2747feeb030', class: "metric-label" }, "DET"), index.h("span", { key: 'e0ceaf4cc91c00835bf92fdd3744a26958f39105', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), index.h("div", { key: '96ad9e60657306f20efc285fd6eb5a83c3b8ee32', class: "metric-compact" }, index.h("span", { key: '25e0ea0b4f16118b0bf7b9b974997b9bf832d2f8', class: "metric-label" }, "RATE"), index.h("span", { key: '3f6f5370611d6fa6a927bc8ec1e03d0c262a3466', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), index.h("div", { key: '429a70ff02a2a2de127cb6cfe3426df1fdc4bbae', class: "watermark" }, index.h("img", { key: 'cc4174740e58367b2e66b6029dcca8404a3dccee', src: "https://storage.googleapis.com/jaak-static/commons/powered-by-jaak.png", alt: "Powered by Jaak" }))))));
19805
19806
  }
19806
19807
  // Utility methods
19807
19808
  updateDetectionBoxes(boxes) {