@jaak.ai/stamps 2.5.7-dev.3 → 2.5.7

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 (45) hide show
  1. package/dist/cjs/{index-BcFBOmM6.js → index-D6NBn_qu.js} +4 -30
  2. package/dist/cjs/index-D6NBn_qu.js.map +1 -0
  3. package/dist/cjs/jaak-stamps-webcomponent.cjs.js +2 -2
  4. package/dist/cjs/jaak-stamps.cjs.entry.js +72 -143
  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 +2 -2
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/{jaak-stamps/jaak-stamps.js → my-component/my-component.js} +34 -88
  10. package/dist/collection/components/my-component/my-component.js.map +1 -0
  11. package/dist/collection/components/my-component/watermark-fallback.js.map +1 -0
  12. package/dist/collection/services/DetectionService.js +38 -60
  13. package/dist/collection/services/DetectionService.js.map +1 -1
  14. package/dist/collection/utils/utils.js +4 -0
  15. package/dist/collection/utils/utils.js.map +1 -0
  16. package/dist/components/index.js +2 -20
  17. package/dist/components/index.js.map +1 -1
  18. package/dist/components/jaak-stamps.js +71 -145
  19. package/dist/components/jaak-stamps.js.map +1 -1
  20. package/dist/esm/{index-Cb0ILUvS.js → index-BCfAsrzL.js} +4 -30
  21. package/dist/esm/index-BCfAsrzL.js.map +1 -0
  22. package/dist/esm/jaak-stamps-webcomponent.js +3 -3
  23. package/dist/esm/jaak-stamps.entry.js +72 -143
  24. package/dist/esm/jaak-stamps.entry.js.map +1 -1
  25. package/dist/esm/loader.js +3 -3
  26. package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
  27. package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
  28. package/dist/jaak-stamps-webcomponent/{p-268577ba.entry.js → p-63c2c085.entry.js} +3 -3
  29. package/dist/jaak-stamps-webcomponent/p-63c2c085.entry.js.map +1 -0
  30. package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js +3 -0
  31. package/dist/jaak-stamps-webcomponent/p-BCfAsrzL.js.map +1 -0
  32. package/dist/types/components/{jaak-stamps/jaak-stamps.d.ts → my-component/my-component.d.ts} +0 -5
  33. package/dist/types/services/DetectionService.d.ts +4 -5
  34. package/dist/types/utils/utils.d.ts +1 -0
  35. package/package.json +4 -4
  36. package/dist/cjs/index-BcFBOmM6.js.map +0 -1
  37. package/dist/collection/components/jaak-stamps/jaak-stamps.js.map +0 -1
  38. package/dist/collection/components/jaak-stamps/watermark-fallback.js.map +0 -1
  39. package/dist/esm/index-Cb0ILUvS.js.map +0 -1
  40. package/dist/jaak-stamps-webcomponent/p-268577ba.entry.js.map +0 -1
  41. package/dist/jaak-stamps-webcomponent/p-Cb0ILUvS.js +0 -3
  42. package/dist/jaak-stamps-webcomponent/p-Cb0ILUvS.js.map +0 -1
  43. /package/dist/collection/components/{jaak-stamps/jaak-stamps.css → my-component/my-component.css} +0 -0
  44. /package/dist/collection/components/{jaak-stamps → my-component}/watermark-fallback.js +0 -0
  45. /package/dist/types/components/{jaak-stamps → my-component}/watermark-fallback.d.ts +0 -0
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BcFBOmM6.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) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["jaak-stamps.cjs",[[257,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"telemetryCollectorUrl":[1,"telemetry-collector-url"],"metricsCollectorUrl":[1,"metrics-collector-url"],"enableTelemetry":[4,"enable-telemetry"],"enableMetrics":[4,"enable-metrics"],"customerId":[1,"customer-id"],"tenantId":[1,"tenant-id"],"environment":[1],"propagateTraceHeaderCorsUrls":[1,"propagate-trace-header-cors-urls"],"metricsExportIntervalMillis":[2,"metrics-export-interval-millis"],"license":[1],"licenseEnvironment":[1,"license-environment"],"traceId":[1,"trace-id"],"appId":[1,"app-id"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"performanceDegradedMode":[32],"showPerformanceMessage":[32],"captureStateVersion":[32],"processingButton":[32],"licenseValid":[32],"licenseError":[32],"classificationDisabled":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]},null,{"license":["onLicenseChanged"],"licenseEnvironment":["onLicenseEnvironmentChanged"]}]]]], options);
9
+ return index.bootstrapLazy([["jaak-stamps.cjs",[[257,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"telemetryCollectorUrl":[1,"telemetry-collector-url"],"metricsCollectorUrl":[1,"metrics-collector-url"],"enableTelemetry":[4,"enable-telemetry"],"enableMetrics":[4,"enable-metrics"],"customerId":[1,"customer-id"],"tenantId":[1,"tenant-id"],"environment":[1],"propagateTraceHeaderCorsUrls":[1,"propagate-trace-header-cors-urls"],"metricsExportIntervalMillis":[2,"metrics-export-interval-millis"],"license":[1],"licenseEnvironment":[1,"license-environment"],"traceId":[1,"trace-id"],"appId":[1,"app-id"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"performanceDegradedMode":[32],"showPerformanceMessage":[32],"captureStateVersion":[32],"processingButton":[32],"licenseValid":[32],"licenseError":[32],"classificationDisabled":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "entries": [
3
- "components/jaak-stamps/jaak-stamps.js"
3
+ "components/my-component/my-component.js"
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
@@ -24,7 +24,7 @@ export class JaakStamps {
24
24
  propagateTraceHeaderCorsUrls; // Comma-separated URLs or regex patterns
25
25
  metricsExportIntervalMillis = 60000; // Export metrics every 60 seconds
26
26
  license; // License key for validation
27
- licenseEnvironment = 'prod';
27
+ licenseEnvironment = 'prod'; // Environment for license validation
28
28
  traceId; // Optional trace ID for tracking
29
29
  appId = 'jaak-stamps-web'; // Application ID for license validation
30
30
  captureCompleted;
@@ -72,8 +72,6 @@ export class JaakStamps {
72
72
  licenseValid = true; // License validation status
73
73
  licenseError = null; // License validation error message
74
74
  classificationDisabled = false; // Classification disabled at runtime due to errors
75
- _initialized = false;
76
- _initializing = false;
77
75
  // Services
78
76
  licenseValidationService = null;
79
77
  serviceContainer;
@@ -143,10 +141,8 @@ export class JaakStamps {
143
141
  canvasPool = [];
144
142
  MAX_CANVAS_POOL_SIZE = 3;
145
143
  async componentWillLoad() {
146
- // Yield one microtask so attributes set synchronously after innerHTML are reflected as props
147
- await Promise.resolve();
148
144
  if (this.debug) {
149
- console.log('[JAAK-DEBUG] componentWillLoad() - Props after microtask yield:');
145
+ console.log('[JAAK-DEBUG] componentWillLoad() - Props at initialization:');
150
146
  console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
151
147
  console.log('[JAAK-DEBUG] useDocumentClassification:', this.useDocumentClassification);
152
148
  console.log('[JAAK-DEBUG] debug:', this.debug);
@@ -158,64 +154,32 @@ export class JaakStamps {
158
154
  console.log('[JAAK-DEBUG] preferredCamera:', this.preferredCamera);
159
155
  console.log('[JAAK-DEBUG] appId:', this.appId);
160
156
  }
161
- if (!this.license) {
162
- // No license yet show blocking UI; @Watch('license') triggers init when it arrives
163
- this.licenseValid = false;
164
- this.licenseError = 'Se requiere una licencia para continuar. Por favor, proporcione una licencia usando el atributo "license".';
165
- this.updateStatus('Licencia requerida', 'Proporcione una licencia para continuar', 'error');
166
- }
167
- else {
168
- // License present — pre-set the first status synchronously so the initial render
169
- // already shows it, preventing a state change inside componentDidLoad that Stencil
170
- // would flag as an extra re-render.
171
- this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
172
- }
173
- // Heavy initialization is deferred to componentDidLoad so the first render is not blocked
174
- }
175
- async componentDidLoad() {
176
- // License absent at mount time — @Watch('license') handles initialization when it arrives
177
- if (!this.license || this._initialized || this._initializing) {
178
- return;
157
+ // License is required - always validate
158
+ // Wait a bit to ensure props are set from attributes
159
+ await new Promise(resolve => setTimeout(resolve, 50));
160
+ if (this.debug) {
161
+ console.log('[JAAK-DEBUG] Props AFTER 50ms wait:');
162
+ console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
179
163
  }
180
- await this.validateAndInitialize();
181
- }
182
- async onLicenseChanged(newLicense) {
183
- if (!newLicense || this._initialized || this._initializing) {
164
+ this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
165
+ await this.validateLicense();
166
+ // If license validation failed, stop initialization
167
+ if (!this.licenseValid) {
168
+ if (this.debug) {
169
+ console.error('[JAAK-DEBUG] License validation FAILED. Stopping initialization.');
170
+ }
184
171
  return;
185
172
  }
186
- // Set status synchronously before the async work so the UI updates immediately
187
- this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
188
- await this.validateAndInitialize();
189
- }
190
- async onLicenseEnvironmentChanged() {
191
- // Always recreate the service so the correct environment URL is used from now on.
192
- this.licenseValidationService = new LicenseValidationService(this.licenseEnvironment);
193
- // If a license is present but the component never finished initializing
194
- // (e.g. first validate ran against the wrong env and failed, or license arrived
195
- // before licenseEnvironment was set), retry the full init flow now.
196
- if (this.license && !this._initialized && !this._initializing) {
197
- this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
198
- await this.validateAndInitialize();
173
+ if (this.debug) {
174
+ console.log('[JAAK-DEBUG] License validation OK');
199
175
  }
200
176
  }
201
- async validateAndInitialize() {
202
- if (this._initialized || this._initializing) {
203
- return;
204
- }
205
- this._initializing = true;
177
+ async componentDidLoad() {
206
178
  try {
207
- // Status was already set synchronously by the caller (componentWillLoad or @Watch)
208
- // to avoid a state change inside componentDidLoad that Stencil warns about.
209
- await this.validateLicense();
179
+ // If license validation failed, stop initialization
210
180
  if (!this.licenseValid) {
211
- if (this.debug) {
212
- console.error('[JAAK-DEBUG] License validation FAILED. Stopping initialization.');
213
- }
214
181
  return;
215
182
  }
216
- if (this.debug) {
217
- console.log('[JAAK-DEBUG] License validation OK');
218
- }
219
183
  this.updateStatus('Preparando capturador...', 'Configurando herramientas de captura', 'initializing');
220
184
  await this.initializeServices();
221
185
  this.updateStatus('Preparando funciones...', 'Configurando herramientas de trabajo', 'initializing');
@@ -225,14 +189,9 @@ export class JaakStamps {
225
189
  if (this.debug) {
226
190
  this.initializePerformanceMonitor();
227
191
  }
228
- this._initialized = true;
229
192
  }
230
193
  catch (error) {
231
- const errorMessage = error instanceof Error ? error.message : String(error);
232
- this.updateStatus('Error de inicialización', errorMessage, 'error');
233
- }
234
- finally {
235
- this._initializing = false;
194
+ this.updateStatus('Error de inicialización', error.message, 'error');
236
195
  }
237
196
  }
238
197
  async initializeServices() {
@@ -282,14 +241,14 @@ export class JaakStamps {
282
241
  }
283
242
  async validateLicense() {
284
243
  if (!this.license) {
244
+ console.error('❌ No license provided for JAAK Stamps component');
285
245
  this.licenseError = 'Este componente requiere una licencia válida. Por favor, proporcione una licencia usando el atributo "license".';
286
246
  this.licenseValid = false;
287
247
  this.updateStatus('Error de licencia', 'Licencia no proporcionada', 'error');
288
248
  return;
289
249
  }
290
250
  try {
291
- if (this.debug)
292
- console.log('[jaak-stamps] validating license...');
251
+ console.log('🔑 Validating license for JAAK Stamps...');
293
252
  // Initialize license validation service
294
253
  this.licenseValidationService = new LicenseValidationService(this.licenseEnvironment);
295
254
  // Validate the license, passing traceId and appId if provided
@@ -297,21 +256,18 @@ export class JaakStamps {
297
256
  if (response && response.access_token) {
298
257
  this.licenseValid = true;
299
258
  this.licenseError = null;
300
- if (this.debug)
301
- console.log('[jaak-stamps] license validated successfully');
259
+ console.log('✅ License validated successfully for JAAK Stamps');
302
260
  // Emit the traceId (either provided or generated)
303
261
  if (response.traceId) {
304
262
  this.traceIdGenerated.emit({ traceId: response.traceId });
305
- if (this.debug)
306
- console.log('[jaak-stamps] traceId:', response.traceId);
263
+ console.log('📋 TraceId:', response.traceId);
307
264
  }
308
265
  }
309
266
  else {
310
267
  this.licenseValid = false;
311
268
  this.licenseError = 'La licencia proporcionada no es válida. Por favor, verifique su licencia e intente nuevamente.';
312
269
  this.updateStatus('Error de licencia', 'Licencia inválida', 'error');
313
- if (this.debug)
314
- console.error('[jaak-stamps] invalid license');
270
+ console.error('❌ Invalid license for JAAK Stamps');
315
271
  }
316
272
  }
317
273
  catch (error) {
@@ -319,8 +275,7 @@ export class JaakStamps {
319
275
  const licenseError = error;
320
276
  this.licenseError = licenseError.error_description || 'Error al validar la licencia. Por favor, verifique su conexión e intente nuevamente.';
321
277
  this.updateStatus('Error de licencia', 'Fallo en la validación', 'error');
322
- if (this.debug)
323
- console.error('[jaak-stamps] license validation failed:', error);
278
+ console.error('❌ License validation failed for JAAK Stamps:', error);
324
279
  }
325
280
  }
326
281
  async setupEventListeners() {
@@ -1607,7 +1562,7 @@ export class JaakStamps {
1607
1562
  isCapturing: false
1608
1563
  };
1609
1564
  const cameraInfo = this.cameraInfoWithAutofocus;
1610
- return (h("div", { key: '831ee76dee1c7f852e4c3d1d6c5ccc31f5b2633f', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: '65244e91e43e6bb589c56c4e33ccb4841a6049dc', class: "license-error-container" }, h("div", { key: '0c7e0c47c2d2186183f935969d15b6ec4e285475', class: "license-error-card" }, h("svg", { key: '45a1eebecf7c36ef63ea88697265a3579fbc1c5a', 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: '24f1d5a4ae9627336c4a0a8293df137f20b21161', 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: '3717c8724487846702c58ba895384e6f8d19f638', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '82b0527d2241b370f842d66fa6d2f3e06042568e', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '2ff63e9ca1f37e68a4516f79d609c0111d6bc7b1', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '151ac9130f685016f9d3568474ce2dda955509dc', class: "license-error-message" }, this.licenseError), h("p", { key: '022fd22a1b627442e8161971b86173ab9f134ba0', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '4a4fd93259895d8909d888f64d55cc88b6b85f8f', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: '6fb9b5e305d83ec1bc2296accd0d60b1f3c832ca', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: 'd81a43d70a7277fc9ff13b6906c851d8b69a2f01', class: "video-container" }, h("video", { key: 'dcb6c1224c91d9eae41f3ebcdf65516cec5dfcb7', 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: {
1611
1566
  // Keep the element rendered (display: block) so the browser
1612
1567
  // loads stream metadata and fires 'loadedmetadata'. Hiding it
1613
1568
  // with display:none prevents metadata loading in Chrome and
@@ -1616,7 +1571,7 @@ export class JaakStamps {
1616
1571
  // render context alive.
1617
1572
  opacity: captureState.isVideoActive ? '1' : '0',
1618
1573
  visibility: captureState.isVideoActive ? 'visible' : 'hidden',
1619
- } }), h("div", { key: '0535a299fe2e94e991d76c494c2067eca1617c58', 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: {
1620
1575
  position: 'absolute',
1621
1576
  left: `${box.x}px`,
1622
1577
  top: `${box.y}px`,
@@ -1625,9 +1580,9 @@ export class JaakStamps {
1625
1580
  border: '2px solid #32406C',
1626
1581
  pointerEvents: 'none',
1627
1582
  boxSizing: 'border-box'
1628
- } })))), this.isMaskReady && (h("div", { key: '625041af12b0ea65deb22ffbf7161fda8fd23bd2', class: "overlay-mask" }, h("div", { key: '37f6df4fb029c14ca81ccdb7a7fedb30a2c2832e', class: "card-outline" }, h("div", { key: '91a5fee25260fc2304f6b79c8bcd6b74688562d4', class: "side side-top" }), h("div", { key: '7c62e4cb1120495b985b1d4d8482bbf0ffe86745', class: "side side-right" }), h("div", { key: '4536e2835e2a3fd572bbec5076d45f854d262e32', class: "side side-bottom" }), h("div", { key: '150d7800a958dcd9e7bbd52a5725c240badc0fe5', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'a266cbc2fd63215b863b55a291f36ff464453c9b', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b7f7de8ecccd6a7929569184b724ae4b6ab55c34', class: "back-capture-section" }, h("div", { key: '3ac3ffcd9ae3a8b841b4f56cc3567da68a92ed4e', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: 'ad1dcfed7e27036f188e5ddce9ada28b15d24aad', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '06d97ebbaf4f57e0c090a98732b1227fb6f6f8b2', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: 'c018d29db7bb2369744ca8ad5aa87bff2c6d15dd', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: 'faf0c7995f2cecaf5d4df8ff6d3bb92364e36806', 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
1629
1584
  ? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
1630
- : 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '7000fa21f319e3c1fd2290710a60a4e4bd44d25b', class: "camera-controls" }, h("button", { key: '643aef1a72365b8b2d6e340fff4c837dba96a3fb', 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: '76e6765fc5264de81eeeab184d23c3ba23cd0976', class: "camera-selector-dropdown" }, h("div", { key: '0a9eb0ffc9a2a8ec5a632e0dc1e367a4f89c0499', class: "camera-selector-header" }, h("span", { key: 'ad09fc0efb7cda425853a156d310da57ddfa1906' }, "Seleccionar C\u00E1mara"), h("button", { key: '2ebaff48a49b56e6b65cd93c96048e3050ad92a4', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: 'fbb80070332766d85f9a91856d90251928490a5f', 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: '8ce8fbefe3cacf05f34f216de2b9539fd0f4c405', class: "device-info" }, h("small", { key: 'dec43734808a18f5a0b2c6dc8555b62d5bc4eafa' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '3560ead8bf670c71c94457689cc7280127e6bb26', class: "manual-capture-section" }, h("button", { key: 'bb642fddb0bdd3014b600869f0c9fb892f40454c', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: '2bcfd2b481e43684bf38584598747e68277ab18a', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '7c6ac830d622ff91de6f03273b11bdebf64b335e', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: '8a6b470eaafc34aadc6192553e38ccadf5755272', class: "flip-animation" }, h("div", { key: '965bc9d8858447eb44cc860df814fa54fc7ab697', class: "id-card-icon" }), h("div", { key: '2a4ff10eb928f88501e25112597efc345a6c587a', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: 'a599c61bb9dd4b910abdb1a5cb271484184a1ecd', class: "success-animation" }, h("div", { key: 'ce0d1f0f824e4ef2d3f24521246fde546bcb479a', class: "check-icon" }), h("div", { key: '752859c69c65130cd065f1fa6d15269ce7789035', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '421768cd2d6aa9ab491861fb0cae305470b1456b', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '81374800169c2b4e331cf8f876085c3420700423', class: "status-spinner" })), h("div", { key: 'f13c794c2c8c71bed1cae401f7e1104edfcad428', class: "status-content" }, h("div", { key: 'e662075d24c9400eb6e6b97e785f8453ea2c350b', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '42e03d32e3697b4095c190a670c04dd1a09d5f9d', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: 'cda6b3292ef939bbc1f0f0176ef55b8c8fc37929', class: "performance-monitor" }, h("div", { key: 'bc149a754f6e65f1870f2ce151f502694a2a8e52', class: "performance-expanded" }, h("div", { key: '30d7519b0ea3c72997363840dad433fbeef64569', class: "metrics-row" }, h("div", { key: 'da4101538afc21090ceb59f5d48ca4d48abc41e0', class: "metric-compact" }, h("span", { key: '8150ece409d7e62f61d79507d3a332042af5934a', class: "metric-label" }, "FPS"), h("span", { key: '0b07ac0de7f294f8d253e0c57931c52345918914', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: '7242ad6791000c0d6cd86cfe5043c961f57ea754', class: "metric-compact" }, h("span", { key: '5499d7e3fac025933916b3efbd2b511128515ff8', class: "metric-label" }, "MEM"), h("span", { key: '885851d31aa1b639e8e2352b4c6813ee2b45b953', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '14e3bda4caab1b182cb772e2da4cea4d3c342d00', class: "metrics-row" }, h("div", { key: 'be33011987e3cfa6b499fa618aba0575f6253992', class: "metric-compact" }, h("span", { key: '111dd593ba724adbd148a9bba5728db6f569b88d', class: "metric-label" }, "INF"), h("span", { key: '104680823cc990a0181a7a770c50ad43241856f8', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: '006e6417a404a9296170bc1c20660716a9eca169', class: "metric-compact" }, h("span", { key: '2f5e7c8cfcd99e22b0c5399a05eb84816e6c3133', class: "metric-label" }, "FRAME"), h("span", { key: '3cedfc835bf282e513aef93e3e96a0154a62193b', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: '21ba720f1a3a4a5a900bf75602a0286a779b7cd0', class: "metrics-row" }, h("div", { key: 'b1bcdabe6feeee08068d70e280772a15f1ff9a1a', class: "metric-compact" }, h("span", { key: 'b9686f5946d878366b6b282a677b4e10eed7e3f3', class: "metric-label" }, "DET"), h("span", { key: 'fd6cf1adac9dd90936f64e6da93a9ea16bc060d1', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: 'a4f796a8b19f3689f68a9213df7335b93d3947ad', class: "metric-compact" }, h("span", { key: 'abdec7d8b8cfc53cb635ba513d01e95e68ceb703', class: "metric-label" }, "RATE"), h("span", { key: '8fa1b3a30ad7dfcc77ee86c022e085b779a9ced7', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: 'f9d1c4fd872a7d7bfd06b0b31ad557941de5067d', class: "watermark" }, h("img", { key: 'e9ea47bbc2eca4bde520198924e417e94f4e228f', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
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) => {
1631
1586
  const img = e.target;
1632
1587
  img.onerror = null;
1633
1588
  img.src = POWERED_BY_JAAK_FALLBACK;
@@ -2175,7 +2130,7 @@ export class JaakStamps {
2175
2130
  await this.tracingService.flush();
2176
2131
  }
2177
2132
  catch (error) {
2178
- console.error('[jaak-stamps] Failed to flush traces:', error);
2133
+ console.error('[my-component] Failed to flush traces:', error);
2179
2134
  }
2180
2135
  }
2181
2136
  this.captureCompleted.emit(finalImages);
@@ -2451,12 +2406,12 @@ export class JaakStamps {
2451
2406
  static get encapsulation() { return "shadow"; }
2452
2407
  static get originalStyleUrls() {
2453
2408
  return {
2454
- "$": ["jaak-stamps.css"]
2409
+ "$": ["my-component.css"]
2455
2410
  };
2456
2411
  }
2457
2412
  static get styleUrls() {
2458
2413
  return {
2459
- "$": ["jaak-stamps.css"]
2414
+ "$": ["my-component.css"]
2460
2415
  };
2461
2416
  }
2462
2417
  static get assetsDirs() { return ["../../assets"]; }
@@ -3222,14 +3177,5 @@ export class JaakStamps {
3222
3177
  };
3223
3178
  }
3224
3179
  static get elementRef() { return "el"; }
3225
- static get watchers() {
3226
- return [{
3227
- "propName": "license",
3228
- "methodName": "onLicenseChanged"
3229
- }, {
3230
- "propName": "licenseEnvironment",
3231
- "methodName": "onLicenseEnvironmentChanged"
3232
- }];
3233
- }
3234
3180
  }
3235
- //# sourceMappingURL=jaak-stamps.js.map
3181
+ //# sourceMappingURL=my-component.js.map