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

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.
Files changed (30) hide show
  1. package/dist/cjs/{index-ucw61xdq.js → index-D6NBn_qu.js} +2 -9
  2. package/dist/cjs/{index-ucw61xdq.js.map → index-D6NBn_qu.js.map} +1 -1
  3. package/dist/cjs/jaak-stamps-webcomponent.cjs.js +1 -1
  4. package/dist/cjs/jaak-stamps.cjs.entry.js +11 -5
  5. package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
  6. package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/my-component/my-component.js +10 -5
  9. package/dist/collection/components/my-component/my-component.js.map +1 -1
  10. package/dist/collection/components/my-component/watermark-fallback.js +2 -0
  11. package/dist/collection/components/my-component/watermark-fallback.js.map +1 -0
  12. package/dist/components/jaak-stamps.js +11 -5
  13. package/dist/components/jaak-stamps.js.map +1 -1
  14. package/dist/esm/{index-CqdAwiLj.js → index-BCfAsrzL.js} +3 -9
  15. package/dist/esm/{index-CqdAwiLj.js.map → index-BCfAsrzL.js.map} +1 -1
  16. package/dist/esm/jaak-stamps-webcomponent.js +2 -2
  17. package/dist/esm/jaak-stamps.entry.js +11 -5
  18. package/dist/esm/jaak-stamps.entry.js.map +1 -1
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
  21. package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
  22. package/dist/jaak-stamps-webcomponent/p-5724f34b.entry.js +7 -0
  23. package/dist/jaak-stamps-webcomponent/p-5724f34b.entry.js.map +1 -0
  24. package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js +3 -0
  25. package/dist/jaak-stamps-webcomponent/{p-CqdAwiLj.js.map → p-BCfAsrzL.js.map} +1 -1
  26. package/dist/types/components/my-component/watermark-fallback.d.ts +1 -0
  27. package/package.json +1 -1
  28. package/dist/jaak-stamps-webcomponent/p-569b2c6e.entry.js +0 -7
  29. package/dist/jaak-stamps-webcomponent/p-569b2c6e.entry.js.map +0 -1
  30. package/dist/jaak-stamps-webcomponent/p-CqdAwiLj.js +0 -3
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-ucw61xdq.js');
3
+ var index = require('./index-D6NBn_qu.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
@@ -1,5 +1,6 @@
1
- import { h, getAssetPath } from "@stencil/core";
1
+ import { h } from "@stencil/core";
2
2
  import { ServiceContainer } from "../../services/ServiceContainer";
3
+ import { POWERED_BY_JAAK_FALLBACK } from "./watermark-fallback";
3
4
  import { LicenseValidationService } from "../../services/LicenseValidationService";
4
5
  export class JaakStamps {
5
6
  el;
@@ -1561,7 +1562,7 @@ export class JaakStamps {
1561
1562
  isCapturing: false
1562
1563
  };
1563
1564
  const cameraInfo = this.cameraInfoWithAutofocus;
1564
- return (h("div", { key: 'a3d244546eaeef7149d64aa95ecbb8be015ada66', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: '6400a254607f90316927c6e4798b8a2db7464864', class: "license-error-container" }, h("div", { key: '08d6ac784c680b8ca326951c8dec078c4400525b', class: "license-error-card" }, h("svg", { key: 'bbd5a1989469beaf8c18b4d8c683ae993b29828f', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'a136775f4775c0f4619921493ef98ec2a4ee22c2', 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" }), h("path", { key: '87b34ca04da868f1e4d109c2f8c41763d6442408', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: 'c4b81005418baa0ae7548c192719017a62824627', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: 'ed12b053433315b6f06b76388471f48fbeedf6ba', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '07d429c3568f7623656b349467ec0b45da85b974', class: "license-error-message" }, this.licenseError), h("p", { key: 'c03e509b2de76977c96929c5dc4995195e723c91', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: 'dacd34365bb1a34148e949638ebd02c792ed0591', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: 'e77324a34dd06629f599d32b019a30d042913004', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: 'ae30ba52e849f494cf2618802e0779d4cf84ec17', class: "video-container" }, h("video", { key: '9ae44f392d00753800a6313ce42cc0aee4344407', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
1565
+ return (h("div", { key: 'a4f5254bb0f5198cfea553fb46d8841c4a410853', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: '48353567b7c23df1b44e035cd6b52dd692b338a6', class: "license-error-container" }, h("div", { key: '8a520b2cb936cae9ed64c513ae9e583f62d31b99', class: "license-error-card" }, h("svg", { key: 'dccdda293c28bd5d1e76bbff0060859a394a800c', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '09015453d8230c523abe8e5b4b800b4a55a81202', 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" }), h("path", { key: '5f9fd50412d21de2274e124c02dcc8e971fd23ee', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: 'e534af1f29c6382c2c47623129a94d3aac3ec71e', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '6ed105bb6e16d8ce7419bc64a0f69e7e2d7ed0ac', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: 'c1d7e06b03a4af316e28836eb7a0f3729993ca1f', class: "license-error-message" }, this.licenseError), h("p", { key: '349ae281248b56524460cb18f36300e69c11ab5e', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '62546d77296d220338953c3bd1820946164ff96c', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: 'b45ac9c2d9b9d65e4156d07a067e6c9214da8113', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: '77c274b14b69fe4220f71ef789de8c4943833fee', class: "video-container" }, h("video", { key: 'e036a408939aa5875e36a1f038bed98bfbfba134', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
1565
1566
  // Keep the element rendered (display: block) so the browser
1566
1567
  // loads stream metadata and fires 'loadedmetadata'. Hiding it
1567
1568
  // with display:none prevents metadata loading in Chrome and
@@ -1570,7 +1571,7 @@ export class JaakStamps {
1570
1571
  // render context alive.
1571
1572
  opacity: captureState.isVideoActive ? '1' : '0',
1572
1573
  visibility: captureState.isVideoActive ? 'visible' : 'hidden',
1573
- } }), h("div", { key: '59a38f3b6802619fee5d842aeeb6a43836b7f968', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index) => (h("div", { key: index, class: "detection-box", style: {
1574
+ } }), h("div", { key: '9389f1495814409aa849ce409a28cb578761df76', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index) => (h("div", { key: index, class: "detection-box", style: {
1574
1575
  position: 'absolute',
1575
1576
  left: `${box.x}px`,
1576
1577
  top: `${box.y}px`,
@@ -1579,9 +1580,13 @@ export class JaakStamps {
1579
1580
  border: '2px solid #32406C',
1580
1581
  pointerEvents: 'none',
1581
1582
  boxSizing: 'border-box'
1582
- } })))), this.isMaskReady && (h("div", { key: '1ed03a5e802b37135a40d378626bd74bb073a43f', class: "overlay-mask" }, h("div", { key: '78a0b501f4843da323084c3d497a8f56328afb5b', class: "card-outline" }, h("div", { key: 'f0336bbed8bb46da78a39b65bb16d0270db35a57', class: "side side-top" }), h("div", { key: 'adc08df2c33f1b118eb4ce9db64bb601b8b8d12c', class: "side side-right" }), h("div", { key: '5ec3d1a15fe62b8ca5a55bf6627fd02afa8feb8f', class: "side side-bottom" }), h("div", { key: '426b2309dfd9285d915bdf6ec4cb291eb2069593', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '8018f394316265e3057b47b89e5e9c452524ea71', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '29925b48f81be064d2e33626bb8175c5243b3864', class: "back-capture-section" }, h("div", { key: '7f3308c16486accc43462c915ae6038d97f87b58', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: '8369d371a1c96758ca622bc8b4e8d24b29459719', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '019265cc28c7f080b1dae6f61e1cf219ee2c0a95', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: '5c5a9e7d629d615102af2060548cb0a06b307906', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: 'df999e06a6e161591fa591117c75a0763954846b', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
1583
+ } })))), this.isMaskReady && (h("div", { key: '8050beb9a72279f3a2d54884fe598eca8b1929af', class: "overlay-mask" }, h("div", { key: '25028f1c5bab6b457563c098899c7645083be3a0', class: "card-outline" }, h("div", { key: 'd125b627160c671f1be837d1f957704d016dcf47', class: "side side-top" }), h("div", { key: '78ed55f578fcadba60e80c50315f4a82bbe9c15c', class: "side side-right" }), h("div", { key: '263d29d0844bfa88d68698d71630fd9b08debc26', class: "side side-bottom" }), h("div", { key: '18e528b4d877699add45d9b4e1e029a2bb993582', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '7e09980601c146cd48f80a04640a8a7d635e14d4', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '102e95d211e79d5c5d8e13ae717cb8913eae7ea1', class: "back-capture-section" }, h("div", { key: 'cde593bf62825392df6e950585e9950351bac430', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: '823b35d70e2bb1cf242e01578e921c8a091c7639', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: 'b6f6e82f515cd588eeca60e7abe220d89b40cfe8', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: '7d91e6b780958a36df9a859fb02d8224b0de46dc', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: '0d5bce58452c7f7b5e197dfa0eff959971357b3c', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
1583
1584
  ? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
1584
- : 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: 'e6a79f49886c03ecf262ade76d53994887adb17c', class: "camera-controls" }, h("button", { key: '1ca0f1e46a853411d689b8228f7418f2e8ff24b5', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (h("div", { key: '2a8eb6c6938875ae9971a047c20b999efd6509dc', class: "camera-selector-dropdown" }, h("div", { key: 'd95f49de7bc6ab29c6254024cf1deba6e1e13cfc', class: "camera-selector-header" }, h("span", { key: 'fd423f2b078b758dec5283faa54e64a7f7ba0bce' }, "Seleccionar C\u00E1mara"), h("button", { key: '6aca1ad6dcafe54e144cf1c0dcd08dd3a2c497f0', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: '2bc34b3d59cbd0a572eee969f5a305ca08673f83', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (h("span", { class: "selected-indicator" }, "\u2713")))))), h("div", { key: '5d21a6b9e6c8e205f14643b6e84487dbda375548', class: "device-info" }, h("small", { key: '5d581972b430af0fc61cc42f7f0de000e6b174ee' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'eb18c71b9e514a619b1e112db5ae106b38c81190', class: "manual-capture-section" }, h("button", { key: '2edec59ada00c0429e84e27e4de01d813a366bc3', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: '505e7abe8858b90fe5683676a42d1634729e6b6f', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '7345607ae827e8cca3f3fc40c727f9042e239072', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: 'a683f98e07a91ef4b97c219180922efea393854e', class: "flip-animation" }, h("div", { key: '4b9ca137471d62e90d416690182bf222b7c498c1', class: "id-card-icon" }), h("div", { key: 'ac3f39c86800a3ea5010055068f64889fd35cfe0', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: 'bbb692da28e5564de42c1eb56284caa864dcb9b3', class: "success-animation" }, h("div", { key: '6cc653c662db4ef5d9b2c8b5c806c9776eaab816', class: "check-icon" }), h("div", { key: 'e486173624aec1d944015ad0a0a857b9127876fc', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: 'dc9dd48bd3cefe8ee90e2725a0ebc600f0382f17', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '90961611abd91d6cf9eacc7950c89ecd8b017237', class: "status-spinner" })), h("div", { key: '43d8e13ccda8d7c64119ddad6d4ada0868b3f038', class: "status-content" }, h("div", { key: '39ff2f9d94580b3759bc5ad7d01eb050316d2cd2', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: 'a0dba517725af922d83afd2f36dbc6e69d2acd56', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: '6d5f577de7bcea145355870ac7e246963f3fe85e', class: "performance-monitor" }, h("div", { key: '6f1bb9e5e74a84272fef5f13f7179a19fc162955', class: "performance-expanded" }, h("div", { key: '17fc9a04076d6b4104ccef4d010554263e0a6e9b', class: "metrics-row" }, h("div", { key: '9ba18148930854ab784f68d5e28952d891007fe9', class: "metric-compact" }, h("span", { key: '70918fd23d3039654d07231d2ebdaff0e2d3c986', class: "metric-label" }, "FPS"), h("span", { key: 'fa95b3d6446910fc9090408334bccd84b00baf5a', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: 'fec1b176842e9731f8385bd2f121c0481c2df058', class: "metric-compact" }, h("span", { key: '3cabbd63dadb8d2f756f080dd8f4a4d7f6708dfb', class: "metric-label" }, "MEM"), h("span", { key: '84f2e1b13e2630b63bb2728705311ae13dc3e5b1', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '2753b4ee2eb2698a9f664b738d87264a0f5cf192', class: "metrics-row" }, h("div", { key: '89e256e02ff73b9c1b348fd60c4e90803cbd52de', class: "metric-compact" }, h("span", { key: '7bf4f222a8b44d856717e44343d7471c96d23669', class: "metric-label" }, "INF"), h("span", { key: '3ddf0e7aa7daaf5d715b6867c77641ac56339225', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: '396ce3d444bf4125e49b38862204c3ecf176e842', class: "metric-compact" }, h("span", { key: 'b95910b6a51c4639cd32cfe509b23229de8992f5', class: "metric-label" }, "FRAME"), h("span", { key: '5d66332f1d1a79fd882e72ea0d082a90f9ac8a1d', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: '93b93682098d0c05b35b93059f287dd06fbaefa4', class: "metrics-row" }, h("div", { key: '7336b87d7e9041620843786a497c906c67de3024', class: "metric-compact" }, h("span", { key: '8e2428de98ccf2fb3d85365d53170f061c564f51', class: "metric-label" }, "DET"), h("span", { key: '5c909118072f4b66f42439fe2ede035dcd5be7e3', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '16882eccf6996698a90f7c17ad65ebeac82af0fa', class: "metric-compact" }, h("span", { key: 'b5bed40ee58ff219c37f0c4d3e99b9647a0b0061', class: "metric-label" }, "RATE"), h("span", { key: 'ce1317db2062cca13c728dbc437f316b90d518d1', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: '9e760ab7f19424f10bf7bf8d0e8a1e3892cee3da', class: "watermark" }, h("img", { key: 'ce2700c6224bdbd0a498bf0251cee4308442dbdd', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => { e.target.src = getAssetPath('/assets/powered-by-jaak.png'); } }))))));
1585
+ : 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: 'e8fc7f2bb1a0ca8235a82ed368717205c7b63ad8', class: "camera-controls" }, h("button", { key: '691e4a97f2804666db5e32236619196d616227f7', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (h("div", { key: '80233723131262f516574a4dd2bb125970f7aeea', class: "camera-selector-dropdown" }, h("div", { key: 'c9284a77cd9f2d3e600924c9e5f38614f3d06dc4', class: "camera-selector-header" }, h("span", { key: '92a495d2b605a73a067791442a8c8617706d96bf' }, "Seleccionar C\u00E1mara"), h("button", { key: 'dc06382c154443ea9928740d53546dc2ab3ce662', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: 'b520d0940ef51dc1a46641adaf834e105a16c964', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (h("span", { class: "selected-indicator" }, "\u2713")))))), h("div", { key: '7df8908982af0142d5c02d9b09827f44e697cbb5', class: "device-info" }, h("small", { key: '5669aa375b7aa6cd98d36e5a77eb217e549a5d4d' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '40ed9bde6c2a0afadd8b949ce0cba59344b09379', class: "manual-capture-section" }, h("button", { key: 'f394d0a578888782a0a569e721f06bb642ebfbd4', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: 'ec5ee370a578705ccc3a562763c906701a1e4da4', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '60520ec5cdd2632ac9cd645a5d8d820298b7388b', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: 'af3647bc1dd4e58630bf06bae37d7e5cd522c900', class: "flip-animation" }, h("div", { key: 'e974ee4fc12ebdef1cdcef288951abb0b98b368a', class: "id-card-icon" }), h("div", { key: 'd80764bf0e01069d4fa1367b250215024c8e41ee', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '07956e4e03dee2ebe64d5eeb1d0c6559dbd8c944', class: "success-animation" }, h("div", { key: 'd8cb39f4f7ad3adc9c16b2226b75d14b788636f6', class: "check-icon" }), h("div", { key: '9e3ddbac4946cd585de7c406d55915f532a390ed', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: 'b1ba412c9c4664eda9c024c3fa22e53f11acae4f', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: 'b466904829c87bcb050500c9f24f507a6d42d56d', class: "status-spinner" })), h("div", { key: '3dcfe509f83adf031fadd2fa322a110456e5993b', class: "status-content" }, h("div", { key: '3a6c820251b30c0cbd63538b23872ac1191b5213', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: 'a7c35a8a773d852035a35e77fb99cf475307a5f7', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: 'd581099e2e1aedc1aea88a4c26af59a118042070', class: "performance-monitor" }, h("div", { key: '18bf5ba4feb6515a454d0769fe8eb02fd37ef167', class: "performance-expanded" }, h("div", { key: '7765f916c26556046b8326befc796f9188aeca3f', class: "metrics-row" }, h("div", { key: '9533109a7a762a7d8a95f12f45dddb6833fa7326', class: "metric-compact" }, h("span", { key: 'c236d06e692694a58519e86f133f39a5184a485f', class: "metric-label" }, "FPS"), h("span", { key: '4a7b53c89c4822dc03c6683f6d6895f96458b95d', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: 'd362ceb5edf7585fc7c05da7367a6affee83b942', class: "metric-compact" }, h("span", { key: '08779e8da11b1593f7d91b409b36184ed405dee6', class: "metric-label" }, "MEM"), h("span", { key: '64c15bcbaeca6760e578e4ff9386583938c0be87', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '1ef4f7a5aaae9ed9131bd45c7a4c227ad6419d93', class: "metrics-row" }, h("div", { key: 'c5d5ab2a81f7c8f5145253ece37e43981c68ccb8', class: "metric-compact" }, h("span", { key: '7ba45cae45b336c52adf1eb4588851be20475f4e', class: "metric-label" }, "INF"), h("span", { key: '1341edaafa1de81b304605378a8b1262f2f8a084', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: '4c6edc10f88b776825a5a07643864fef4295c295', class: "metric-compact" }, h("span", { key: '7d58a7250a133b84f001a5313dce606fcd9eda82', class: "metric-label" }, "FRAME"), h("span", { key: 'de6a8e8475cd893546b939d5e3a7045a9d7df6dc', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: 'a26794337b9fd17fc9bc6718461c5251b57c1949', class: "metrics-row" }, h("div", { key: 'd790ac359b04532a5e7aa44e2a2952522c1ceb64', class: "metric-compact" }, h("span", { key: '581c72f166de867bbbfe3bb654cdf89e94cfc27b', class: "metric-label" }, "DET"), h("span", { key: '8d478a6d5e84151504e2dd136e2b1ff1e26e0853', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: 'bb7f6dad291a79b5f683e51e07558ca73c22ad98', class: "metric-compact" }, h("span", { key: '1d2626fb63026ce3eb9d0696501b08c0ddf4be09', class: "metric-label" }, "RATE"), h("span", { key: '8f8a67276ad40ce3fe9acab86c2a807f426d2a23', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: 'a9ae57be92d04f8d5d7eae801c0a0ae7c548f770', class: "watermark" }, h("img", { key: 'c9cd4510dfff2265e3ae5d213845e7b5d8f9a343', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
1586
+ const img = e.target;
1587
+ img.onerror = null;
1588
+ img.src = POWERED_BY_JAAK_FALLBACK;
1589
+ } }))))));
1585
1590
  }
1586
1591
  // Utility methods
1587
1592
  updateDetectionBoxes(boxes) {