@authme/identity-verification 2.8.25 → 2.8.27

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.
package/index.cjs CHANGED
@@ -9925,7 +9925,8 @@ const scan = params => {
9925
9925
  const [r, g, b] = lottieColor.map(c => parseFloat(c.toFixed(3)));
9926
9926
  const lottieColorGradient = authmeScannningGradient ? util.RGBToLottieColor(util.colorToRGB(authmeScannningGradient)) : [];
9927
9927
  const [rGradient, gGradient, bGradient] = lottieColorGradient.map(c => parseFloat(c.toFixed(3)));
9928
- const opacity = (params === null || params === void 0 ? void 0 : params.opacity) ? params.opacity * 100 : 40;
9928
+ // const opacity = params?.opacity ? params.opacity * 100 : 40;
9929
+ const opacity = 0;
9929
9930
  const lottieGradient = [0, rGradient, gGradient, bGradient, 0.5, r, g, b, 1, r, g, b, 0, 0.03, 0.5, 0.515, 1, 1];
9930
9931
  return {
9931
9932
  v: '5.9.2',
@@ -28864,6 +28865,7 @@ const renderBasicUI = userConfig => {
28864
28865
  video.playsInline = true;
28865
28866
  video.loop = true;
28866
28867
  video.setAttribute('webkit-playsinline', '');
28868
+ video.setAttribute('poster', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAABmJLR0QA/wD/AP+gvaeTAAADKUlEQVR4nO3UMQEAIAzAsIF/zyBjRxMFvXpm5g1A0N0OANhigECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkGCGQZIJBlgECWAQJZBghkGSCQZYBAlgECWQYIZBkgkGWAQJYBAlkfVV0C319akPEAAAAASUVORK5CYII=');
28867
28869
  const lottieScreen = document.createElement('div');
28868
28870
  lottieScreen.classList.add('lottie-screen');
28869
28871
  const pictureIcon = document.createElement('div');
@@ -29110,7 +29112,6 @@ const renderLivenessUI = config => {
29110
29112
  };
29111
29113
  const createTextTitle = () => {
29112
29114
  const ele = document.createElement('div');
29113
- ele.classList.add('text-title');
29114
29115
  return ele;
29115
29116
  };
29116
29117
  const createTextHint = () => {
@@ -29136,12 +29137,8 @@ const renderLivenessUI = config => {
29136
29137
  faceMask.style.setProperty('--authme-liveness-scanner-error-border-width', `${uiThemeConfig.livenessErrorScanFrame.borderWidth}px`);
29137
29138
  // text panel
29138
29139
  const titleTextPanel = createTextPanel();
29139
- titleTextPanel.classList.add('title');
29140
29140
  const titleText = createTextTitle();
29141
- //由於setStatusTop會與titile font size 相關,所以直接在這邊用innerStyle修改,避免未來CSS污染導致setStatusTop失效
29142
- titleText.style.fontSize = `${MASK_STYLE.TITLE_TEXT_FONT_SIZE}px`;
29143
29141
  const statusTextPanel = createTextPanel();
29144
- statusTextPanel.classList.add('status');
29145
29142
  const statusText = createTextHint();
29146
29143
  titleTextPanel.appendChild(titleText);
29147
29144
  statusTextPanel.appendChild(statusText);
@@ -29149,22 +29146,16 @@ const renderLivenessUI = config => {
29149
29146
  config.videoContainer.appendChild(statusTextPanel);
29150
29147
  //Statement
29151
29148
  const statementContainer = document.createElement('div');
29152
- statementContainer.classList.add('statement');
29153
29149
  util.uiThemeText(statementContainer, uiThemeConfig.bodyThreeDarkMode);
29154
29150
  statementContainer.textContent = translateService.translate('sdk.general.footer');
29155
29151
  if (uiThemeConfig.isStatementEnabled) {
29156
29152
  config.videoContainer.appendChild(statementContainer);
29157
29153
  }
29158
29154
  util.uiThemeText(titleText, uiThemeConfig.titleThree);
29159
- util.uiThemeHint(statusText, uiThemeConfig.hint);
29155
+ util.uiThemeHint(statusText, uiThemeConfig.hint, '15vh');
29160
29156
  // Set init text
29161
29157
  titleText.textContent = translateService.translate('sdk.liveness.detection.step');
29162
29158
  statusText.textContent = translateService.translate('sdk.general.verify.error.noFace');
29163
- setStatusTextTop({
29164
- maskHeight,
29165
- statusTextPanel,
29166
- titleTextPanel
29167
- });
29168
29159
  return {
29169
29160
  statusText,
29170
29161
  faceMask,
@@ -29172,18 +29163,6 @@ const renderLivenessUI = config => {
29172
29163
  statusTextPanel
29173
29164
  };
29174
29165
  };
29175
- const setStatusTextTop = params => {
29176
- const {
29177
- maskHeight,
29178
- maskTop,
29179
- titleTextPanel,
29180
- statusTextPanel
29181
- } = params;
29182
- const _maskTop = maskTop !== null && maskTop !== void 0 ? maskTop : window.innerHeight / 2 - maskHeight / 2;
29183
- const _maskBotton = _maskTop + maskHeight;
29184
- titleTextPanel.style.top = `${_maskTop - MASK_STYLE.MASK_TITLE_MARGIN - MASK_STYLE.TITLE_TEXT_FONT_SIZE}px`;
29185
- statusTextPanel.style.top = `${_maskBotton + MASK_STYLE.MASK_TITLE_MARGIN + 60}px`;
29186
- };
29187
29166
 
29188
29167
  const limitFPS = fps => {
29189
29168
  let now = Date.now();
@@ -29804,12 +29783,6 @@ function startLiveness(config) {
29804
29783
  height: ellipseHeight,
29805
29784
  axisProduct: ellipseWidthRate * ellipseHeightRate
29806
29785
  };
29807
- setStatusTextTop({
29808
- maskTop: window.innerHeight * fTop,
29809
- maskHeight: window.innerHeight * (fBottom - fTop),
29810
- titleTextPanel: uiComponentLiveness.titleTextPanel,
29811
- statusTextPanel: uiComponentLiveness.statusTextPanel
29812
- });
29813
29786
  })).pipe(rxjs.switchMap(() => rxjs.of(null).pipe(
29814
29787
  // 明確建立一個 Observable 作為輸入
29815
29788
  sendFrame(canvasSizeInfo, canvas, uiComponentBasic.video, config.onFrame, livenessConfig.fasMaxFps, true, 'all', undefined, frameFlags), rxjs.tap(({
@@ -30120,19 +30093,25 @@ const renderOCRUI = config => {
30120
30093
  config.container.classList.add('ocr-container');
30121
30094
  // Text
30122
30095
  const titleTextPanel = createTextPanel();
30123
- titleTextPanel.classList.add('title');
30124
30096
  const titleText = document.createElement('span');
30125
- titleText.classList.add('title-text');
30126
30097
  titleTextPanel.appendChild(titleText);
30127
30098
  const hintText = document.createElement('div');
30128
- hintText.classList.add('hint-text');
30129
30099
  const statusTextPanel = createTextPanel();
30130
- statusTextPanel.classList.add('status');
30131
30100
  const statusText = document.createElement('span');
30132
- statusText.classList.add('status-text');
30133
30101
  statusTextPanel.appendChild(statusText);
30102
+ const directionTextPanel = createTextPanel();
30103
+ directionTextPanel.classList.add('direction-panel');
30104
+ const directionText = document.createElement('span');
30105
+ directionText.classList.add('status-text');
30106
+ directionText.textContent = '';
30107
+ const directionIcon = document.createElement('span');
30108
+ directionIcon.classList.add('direction-icon');
30109
+ // Put icon and text as siblings in directionTextPanel
30110
+ directionTextPanel.appendChild(directionIcon);
30111
+ directionTextPanel.appendChild(directionText);
30134
30112
  util.uiThemeText(titleText, uiThemeConfig.titleOneDarkMode);
30135
30113
  util.uiThemeHint(statusText, uiThemeConfig.hint);
30114
+ util.uiThemeDirection(directionTextPanel, uiThemeConfig.fraudScanHintText);
30136
30115
  //Statement
30137
30116
  const statementContainer = document.createElement('div');
30138
30117
  statementContainer.classList.add('statement');
@@ -30166,6 +30145,7 @@ const renderOCRUI = config => {
30166
30145
  config.videoContainer.appendChild(statementContainer);
30167
30146
  }
30168
30147
  config.videoContainer.appendChild(statusTextPanel);
30148
+ config.videoContainer.appendChild(directionTextPanel);
30169
30149
  config.videoContainer.appendChild(scanAnimationContainer);
30170
30150
  config.videoContainer.appendChild(successContainer);
30171
30151
  config.videoContainer.appendChild(arrowAnimationContainer);
@@ -30173,14 +30153,15 @@ const renderOCRUI = config => {
30173
30153
  // Anti-fraud Instruction
30174
30154
  const lottieMask = document.createElement('div');
30175
30155
  lottieMask.classList.add('lottie-mask');
30156
+ lottieMask.style.opacity = uiThemeConfig.fraudAnimationLoadingPage.backgroundOpacity;
30176
30157
  const antiFraudInstructionContainer = document.createElement('div');
30177
30158
  antiFraudInstructionContainer.classList.add('anti-fraud-instruction-container');
30159
+ const antiFraudInstructionAnimationContainer = document.createElement('div');
30160
+ antiFraudInstructionAnimationContainer.classList.add('anti-fraud-instruction-animation-container');
30178
30161
  const instructionText = document.createElement('div');
30179
30162
  instructionText.classList.add('anti-fraud-instruction-container__text');
30180
30163
  instructionText.textContent = translateService.translate('sdk.guard.verify.guide.fraudDescribe');
30181
30164
  util.uiThemeText(instructionText, uiThemeConfig.titleOneDarkMode);
30182
- const antiFraudInstructionAnimationContainer = document.createElement('div');
30183
- antiFraudInstructionAnimationContainer.classList.add('anti-fraud-instruction-animation-container');
30184
30165
  const btnContainer = document.createElement('div');
30185
30166
  btnContainer.classList.add('btn-container');
30186
30167
  const confirmBtn = document.createElement('button');
@@ -30234,6 +30215,9 @@ const renderOCRUI = config => {
30234
30215
  titleText,
30235
30216
  hintText,
30236
30217
  statusText,
30218
+ directionTextPanel,
30219
+ directionText,
30220
+ directionIcon,
30237
30221
  statusTextPanel,
30238
30222
  lottieMask,
30239
30223
  arrowAnimationContainer,
@@ -30391,11 +30375,13 @@ function mirrorPoints(points) {
30391
30375
  }));
30392
30376
  }
30393
30377
  const renderOCRMask = params => {
30378
+ const uiThemeConfig = util.Storage.getItem('themeConfig');
30394
30379
  let newCardPoints;
30395
- let borderColor = '';
30396
- let borderOpacity = OcrFrame.borderOpacity;
30397
- let borderColorSuccess = '';
30398
- let borderOpacitySuccess = OcrFrame.successOpacity;
30380
+ let borderColor = uiThemeConfig.scanFrame.undetectedColor;
30381
+ let borderOpacity = uiThemeConfig.scanFrame.opacity;
30382
+ let borderColorSuccess = uiThemeConfig.scanFrame.detectedColor;
30383
+ let borderOpacitySuccess = uiThemeConfig.scanFrame.opacity;
30384
+ const strokeWidth = uiThemeConfig.scanFrame.width;
30399
30385
  const {
30400
30386
  cardPoints,
30401
30387
  container
@@ -30413,7 +30399,7 @@ const renderOCRMask = params => {
30413
30399
  svg.style.position = 'absolute';
30414
30400
  svg.style.top = '0';
30415
30401
  svg.style.left = '0';
30416
- svg.style.boxShadow = 'rgba(0, 0, 0, 0.65) 0 0 0 2000px';
30402
+ svg.style.boxShadow = 'rgba(0, 0, 0, 1) 0 0 0 2000px';
30417
30403
  // 創建遮罩
30418
30404
  const defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
30419
30405
  const mask = document.createElementNS('http://www.w3.org/2000/svg', 'mask');
@@ -30439,6 +30425,13 @@ const renderOCRMask = params => {
30439
30425
  pathOfFrame.setAttribute('fill', 'none');
30440
30426
  pathOfFrame.setAttribute('stroke', OcrFrame.borderColor);
30441
30427
  pathOfFrame.setAttribute('stroke-width', '3');
30428
+ // Create a border path that matches the mask exactly
30429
+ const borderPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
30430
+ borderPath.setAttribute('id', 'authme-border-path');
30431
+ borderPath.setAttribute('stroke', borderColor);
30432
+ borderPath.setAttribute('stroke-width', strokeWidth);
30433
+ borderPath.setAttribute('fill', 'none');
30434
+ borderPath.setAttribute('stroke-opacity', borderOpacity.toString());
30442
30435
  const setBorderType = params => {
30443
30436
  var _a;
30444
30437
  const _mirrored = (_a = params.mirrored) !== null && _a !== void 0 ? _a : false;
@@ -30508,6 +30501,8 @@ const renderOCRMask = params => {
30508
30501
  maskedRect.setAttribute('fill', 'rgba(0, 0, 0, 0.65)');
30509
30502
  maskedRect.setAttribute('mask', 'url(#hole)');
30510
30503
  svg.appendChild(maskedRect);
30504
+ // Add the border path that matches the mask
30505
+ svg.appendChild(borderPath);
30511
30506
  // 添加SVG到容器
30512
30507
  container.appendChild(svg);
30513
30508
  const setCardPoints = (_newCardPoints, antiFraud = false, _mirrored = false) => {
@@ -30544,39 +30539,9 @@ const renderOCRMask = params => {
30544
30539
  });
30545
30540
  return `${acc} ${command} ${_x2 - radius * v.unitVector.x},${_y2 - radius * v.unitVector.y} A 10,10 0 0, ${_mirrored ? '0' : '1'} ${_x2 + radius * vNext.unitVector.x},${_y2 + radius * vNext.unitVector.y}`;
30546
30541
  }, '') + ' Z'; // 結尾加上'Z'來關閉路徑
30547
- newCardPoints.reduce((acc, {
30548
- x,
30549
- y
30550
- }, index) => {
30551
- var _a, _b;
30552
- const lineRotio = 2;
30553
- const previosPoint = (_a = newCardPoints[index - 1]) !== null && _a !== void 0 ? _a : newCardPoints[newCardPoints.length - 1];
30554
- const nextPoint = (_b = newCardPoints[index + 1]) !== null && _b !== void 0 ? _b : newCardPoints[0];
30555
- const windowWidth = container.offsetWidth;
30556
- const windowHeight = container.offsetHeight;
30557
- const _x1 = windowWidth * previosPoint.x;
30558
- const _y1 = windowHeight * previosPoint.y;
30559
- const _x2 = windowWidth * x;
30560
- const _y2 = windowHeight * y;
30561
- const _x3 = windowWidth * nextPoint.x;
30562
- const _y3 = windowHeight * nextPoint.y;
30563
- const v = new Vector({
30564
- x: _x1,
30565
- y: _y1
30566
- }, {
30567
- x: _x2,
30568
- y: _y2
30569
- });
30570
- const vNext = new Vector({
30571
- x: _x2,
30572
- y: _y2
30573
- }, {
30574
- x: _x3,
30575
- y: _y3
30576
- });
30577
- return `${acc} M ${_x2 - lineRotio * radius * v.unitVector.x},${_y2 - lineRotio * radius * v.unitVector.y} L ${_x2 - radius * v.unitVector.x}, ${_y2 - radius * v.unitVector.y} A 10, 10 0 0, ${_mirrored ? '0' : '1'} ${_x2 + radius * vNext.unitVector.x},${_y2 + radius * vNext.unitVector.y} L ${_x2 + lineRotio * radius * vNext.unitVector.x},${_y2 + lineRotio * radius * vNext.unitVector.y} `;
30578
- }, '');
30579
30542
  path.setAttribute('d', d);
30543
+ // Set the same path for the border to match the mask exactly
30544
+ borderPath.setAttribute('d', d);
30580
30545
  if (antiFraud) {
30581
30546
  setBorderType({
30582
30547
  type: borderType,
@@ -30604,6 +30569,8 @@ const renderOCRMask = params => {
30604
30569
  if (borderType === 'bordered') {
30605
30570
  rectOfFrame.setAttribute('stroke', color);
30606
30571
  rectOfFrame.setAttribute('stroke-opacity', opacity.toString());
30572
+ borderPath.setAttribute('stroke', color);
30573
+ borderPath.setAttribute('stroke-opacity', opacity.toString());
30607
30574
  } else {
30608
30575
  pathOfFrame.setAttribute('stroke', color);
30609
30576
  pathOfFrame.setAttribute('stroke-opacity', opacity.toString());
@@ -32500,6 +32467,9 @@ function startOCR(config) {
32500
32467
  hintText: document.createElement('div'),
32501
32468
  statusText: document.createElement('div'),
32502
32469
  statusTextPanel: document.createElement('div'),
32470
+ directionText: document.createElement('div'),
32471
+ directionIcon: document.createElement('div'),
32472
+ directionTextPanel: document.createElement('div'),
32503
32473
  lottieMask: document.createElement('div'),
32504
32474
  arrowAnimationContainer: document.createElement('div'),
32505
32475
  scanAnimationContainer: document.createElement('div'),
@@ -32566,7 +32536,6 @@ function startOCR(config) {
32566
32536
  let rotateCard;
32567
32537
  let getIsRotateCardAnimating;
32568
32538
  let stopAnimate;
32569
- setHintTextLocale();
32570
32539
  setCorrectViewHeight();
32571
32540
  let countdownCaptureTimer;
32572
32541
  let toastManualCapture = null;
@@ -32638,6 +32607,7 @@ function startOCR(config) {
32638
32607
  function startAntiFraud(type, cardType) {
32639
32608
  const animateInterval = 2 * util.TIME_UNIT.SECOND;
32640
32609
  const nextAnimateInterval = 6 * util.TIME_UNIT.SECOND;
32610
+ let eStage = null;
32641
32611
  let needDeformationCount = 0;
32642
32612
  setStatusEvent$1(core.StatusEvent.TWID);
32643
32613
  setStatusView(core.StatusView.Init);
@@ -32735,6 +32705,10 @@ function startOCR(config) {
32735
32705
  stopAnimate();
32736
32706
  previosAntiFraudAnimateTime = Date.now();
32737
32707
  uiComponentOCRMask.setCardBorderColor('pass');
32708
+ // Add 2 second delay before moving to next stage
32709
+ setTimeout(() => {
32710
+ console.log('Stage pass delay completed, ready for next direction');
32711
+ }, 2000);
32738
32712
  break;
32739
32713
  case idRecognition.EAuthMeIDCardAntiFraudStatus.Pass:
32740
32714
  uiComponentOCRMask.setCardBorderColor('pass');
@@ -32776,7 +32750,10 @@ function startOCR(config) {
32776
32750
  })), sendFrame(canvasSizeInfo, uiComponentOCR.image, uiComponentBasic.video, config.onAntiFraudFrame, ocrEngineConfig.fraudMaxFps, false, 'jpg', undefined), rxjs.map(x => x.result), rxjs.tap(x => {
32777
32751
  applyTextByResult(x);
32778
32752
  cardRotateByStage(x.eStage);
32779
- cardRotateTextProcess(x.eStage);
32753
+ if (isTutorialFinish) {
32754
+ cardRotateTextProcess(x.eStage, eStage != x.eStage);
32755
+ eStage = x.eStage;
32756
+ }
32780
32757
  if (x.eStage !== currentAntiFraudStage) {
32781
32758
  needDeformationCount = 0;
32782
32759
  previosAntiFraudAnimateTime = 0;
@@ -32834,8 +32811,6 @@ function startOCR(config) {
32834
32811
  x,
32835
32812
  y
32836
32813
  })), config.ocrConfig.needAntiFraud);
32837
- setHintTextLocale();
32838
- // }
32839
32814
  const applyTextByResult = result => {
32840
32815
  uiComponentOCR.statusText.classList.add('non-empty');
32841
32816
  switch (result.eStatus) {
@@ -32866,6 +32841,11 @@ function startOCR(config) {
32866
32841
  uiComponentOCRMask.setCardBorderColor('error');
32867
32842
  blurCount++;
32868
32843
  break;
32844
+ case idRecognition.EAuthMeCardOCRStatus.Motion:
32845
+ uiComponentOCR.statusText.textContent = translateService.translate('sdk.general.verify.error.motion');
32846
+ sendStatusDescription$1(core.StatusDescription.Motion);
32847
+ uiComponentOCRMask.setCardBorderColor('error');
32848
+ break;
32869
32849
  case idRecognition.EAuthMeMRZServiceStatus.RecogFailed:
32870
32850
  case idRecognition.EAuthMeMRZServiceStatus.WrongCardType:
32871
32851
  uiComponentOCR.statusText.textContent = translateService.translate('sdk.general.verify.error.wrongCardType');
@@ -32935,8 +32915,8 @@ function startOCR(config) {
32935
32915
  if (!confirmBtns || !(confirmBtns === null || confirmBtns === void 0 ? void 0 : confirmBtns.buttonRetry) || !(confirmBtns === null || confirmBtns === void 0 ? void 0 : confirmBtns.buttonNext)) {
32936
32916
  throw new core.AuthmeError(core.ErrorCode.SDK_INTERNAL_ERROR, 'confirmBtns is null');
32937
32917
  }
32938
- const retryEvents = rxjs.fromEvent(confirmBtns.buttonRetry, 'click').pipe(rxjs.mapTo(true));
32939
- const confirmEvents = rxjs.fromEvent(confirmBtns.buttonNext, 'click').pipe(rxjs.mapTo(false));
32918
+ const retryEvents = rxjs.fromEvent(confirmBtns.buttonRetry, 'click').pipe(rxjs.map(() => true));
32919
+ const confirmEvents = rxjs.fromEvent(confirmBtns.buttonNext, 'click').pipe(rxjs.map(() => false));
32940
32920
  const allEvents$ = rxjs.merge(retryEvents, confirmEvents);
32941
32921
  return yield rxjs.firstValueFrom(allEvents$.pipe());
32942
32922
  // showElement(uiComponentOCR.confirmImageContainer);
@@ -32990,7 +32970,7 @@ function startOCR(config) {
32990
32970
  }), rxjs.switchMap(needRetry => {
32991
32971
  if (needRetry) {
32992
32972
  ocrSendFrameAnimation = false;
32993
- return recognition(true).pipe(rxjs.map(() => true));
32973
+ return recognition(true).pipe(rxjs.map(() => false));
32994
32974
  } else {
32995
32975
  util.hideElement(captureBtn);
32996
32976
  // hideElement(uiComponentOCR.confirmImageContainer);
@@ -33434,13 +33414,16 @@ function startOCR(config) {
33434
33414
  yield finishTutorial(point);
33435
33415
  return;
33436
33416
  }))));
33437
- countdownTimer(3);
33438
- uiComponentOCR.confirmBtn.disabled = false;
33417
+ countdownTimer(uiThemeConfig.fraudAnimationLoadingPage.countdownTime);
33418
+ uiComponentOCR.confirmBtn.disabled = true;
33439
33419
  function countdownTimer(countdown) {
33440
33420
  return __awaiter(this, void 0, void 0, function* () {
33441
33421
  if (countdown <= 0 && !isTutorialFinish) {
33442
33422
  uiComponentOCR.confirmBtn.innerText = translateService.translate('sdk.guard.verify.guide.start');
33443
- yield finishTutorial(point);
33423
+ uiComponentOCR.confirmBtn.disabled = false;
33424
+ if (uiThemeConfig.fraudAnimationLoadingPage.isAutoTapEnabled) {
33425
+ yield finishTutorial(point);
33426
+ }
33444
33427
  return;
33445
33428
  }
33446
33429
  uiComponentOCR.confirmBtn.innerText = `${translateService.translate('sdk.guard.verify.guide.start')} (${countdown})`;
@@ -33712,7 +33695,6 @@ function startOCR(config) {
33712
33695
  if (!cardMatchROI || cardMatchROI.length == 0) throw new core.AuthmeError(core.ErrorCode.SDK_INTERNAL_ERROR, 'getCardMatchROI is null');
33713
33696
  uiComponentOCRMask.setCardBorderColor('error');
33714
33697
  uiComponentOCRMask.setCardPoints(cardMatchROI, config.ocrConfig.needAntiFraud, facingMode === 'front');
33715
- setHintTextLocale();
33716
33698
  currentAntiFraudStage = stage;
33717
33699
  if (uiThemeConfig.fraudScanHint.isEnabled && (isTutorialFinish && !getIsRotateCardAnimating() || mandatoryRotate)) {
33718
33700
  yield stopAnimate();
@@ -33720,19 +33702,68 @@ function startOCR(config) {
33720
33702
  }
33721
33703
  });
33722
33704
  }
33723
- function cardRotateTextProcess(stage) {
33705
+ function cardRotateTextProcess(stage, showDirection = false) {
33706
+ // Clear any existing text and icon first
33707
+ uiComponentOCR.directionIcon.innerHTML = '';
33708
+ // Helper function to set up direction display
33709
+ const setupDirectionDisplay = (direction, translationKey, iconOnRight = false) => {
33710
+ const arrow = createDirectionArrow(direction);
33711
+ console.log(`DEBUG: Created ${direction} arrow SVG:`, arrow);
33712
+ uiComponentOCR.directionIcon.appendChild(arrow);
33713
+ // Set text
33714
+ uiComponentOCR.directionText.textContent = translateService.translate(translationKey);
33715
+ // Re-order elements based on direction
33716
+ if (iconOnRight) {
33717
+ // Text first, then icon
33718
+ uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionText);
33719
+ uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionIcon);
33720
+ } else {
33721
+ // Icon first, then text
33722
+ uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionIcon);
33723
+ uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionText);
33724
+ }
33725
+ if (showDirection) {
33726
+ uiComponentOCR.directionTextPanel.style.display = 'flex';
33727
+ // Set timer to hide panel after 2 seconds (for any direction)
33728
+ setTimeout(() => {
33729
+ uiComponentOCR.directionTextPanel.style.display = 'none';
33730
+ }, 2000);
33731
+ }
33732
+ // Set top text
33733
+ setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
33734
+ };
33735
+ // Create direction arrow using embedded SVG content
33736
+ const createDirectionArrow = direction => {
33737
+ const container = document.createElement('div');
33738
+ const svgContent = {
33739
+ left: `<svg width="72" height="72" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
33740
+ <path d="M35.6768 31.1478C36.2223 32.1083 37.4431 32.4447 38.4036 31.8993C39.3641 31.3538 39.7005 30.133 39.155 29.1725L37.4159 30.1601L35.6768 31.1478ZM1.16989 17.0763C0.388844 17.8573 0.388844 19.1237 1.16989 19.9047L13.8978 32.6326C14.6789 33.4137 15.9452 33.4137 16.7262 32.6326C17.5073 31.8516 17.5073 30.5853 16.7262 29.8042L5.41253 18.4905L16.7262 7.1768C17.5073 6.39575 17.5073 5.12942 16.7262 4.34837C15.9452 3.56732 14.6789 3.56732 13.8978 4.34837L1.16989 17.0763ZM37.4159 30.1601L39.155 29.1725C34.775 21.46 29.0347 18.217 22.5604 16.9896C19.3956 16.3896 16.0872 16.2747 12.7603 16.2999C11.0948 16.3125 9.39768 16.3609 7.70512 16.4052C6.00456 16.4497 4.30124 16.4905 2.58411 16.4905V18.4905V20.4905C4.35894 20.4905 6.10892 20.4484 7.80987 20.4038C9.5188 20.3591 11.1714 20.3121 12.7906 20.2998C16.0333 20.2752 19.0348 20.3924 21.8153 20.9196C27.2316 21.9464 31.9232 24.5383 35.6768 31.1478L37.4159 30.1601Z" fill="#4AD396"/>
33741
+ </svg>`,
33742
+ right: `<svg width="72" height="72" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
33743
+ <path d="M0.844991 29.1725C0.29952 30.133 0.635957 31.3538 1.59644 31.8993C2.55693 32.4447 3.77775 32.1083 4.32322 31.1478L2.58411 30.1601L0.844991 29.1725ZM38.8301 19.9047C39.6112 19.1237 39.6112 17.8573 38.8301 17.0763L26.1022 4.34837C25.3212 3.56732 24.0548 3.56732 23.2738 4.34837C22.4927 5.12942 22.4927 6.39575 23.2738 7.1768L34.5875 18.4905L23.2738 29.8042C22.4927 30.5853 22.4927 31.8516 23.2738 32.6326C24.0548 33.4137 25.3212 33.4137 26.1022 32.6326L38.8301 19.9047ZM2.58411 30.1601L4.32322 31.1478C8.07682 24.5383 12.7684 21.9464 18.1847 20.9196C20.9652 20.3924 23.9667 20.2752 27.2094 20.2998C28.8287 20.3121 30.4812 20.3591 32.1902 20.4038C33.8911 20.4484 35.6411 20.4905 37.4159 20.4905V18.4905V16.4905C35.6988 16.4905 33.9955 16.4497 32.2949 16.4052C30.6023 16.3609 28.9052 16.3125 27.2397 16.2999C23.9128 16.2747 20.6044 16.3896 17.4396 16.9896C10.9653 18.217 5.225 21.46 0.844991 29.1725L2.58411 30.1601Z" fill="#4AD396"/>
33744
+ </svg>`,
33745
+ up: `<svg width="72" height="72" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
33746
+ <path d="M31.1478 35.6768C32.1083 36.2223 32.4447 37.4431 31.8993 38.4036C31.3538 39.3641 30.133 39.7005 29.1725 39.155L30.1601 37.4159L31.1478 35.6768ZM17.0763 1.16989C17.8573 0.388844 19.1237 0.388844 19.9047 1.16989L32.6326 13.8978C33.4137 14.6789 33.4137 15.9452 32.6326 16.7262C31.8516 17.5073 30.5853 17.5073 29.8042 16.7262L18.4905 5.41253L7.1768 16.7262C6.39575 17.5073 5.12942 17.5073 4.34837 16.7262C3.56733 15.9452 3.56733 14.6789 4.34837 13.8978L17.0763 1.16989ZM30.1601 37.4159L29.1725 39.155C21.46 34.775 18.217 29.0347 16.9896 22.5604C16.3896 19.3956 16.2747 16.0872 16.2999 12.7603C16.3125 11.0948 16.3609 9.39768 16.4052 7.70512C16.4497 6.00456 16.4905 4.30124 16.4905 2.58411L18.4905 2.58411L20.4905 2.58411C20.4905 4.35894 20.4484 6.10892 20.4038 7.80987C20.3591 9.5188 20.3121 11.1714 20.2998 12.7906C20.2752 16.0333 20.3924 19.0348 20.9196 21.8153C21.9465 27.2316 24.5383 31.9232 31.1478 35.6768L30.1601 37.4159Z" fill="#4AD396"/>
33747
+ </svg>`,
33748
+ down: `<svg width="72" height="72" viewBox="0 0 41 40" fill="none" xmlns="http://www.w3.org/2000/svg">
33749
+ <path d="M15.0559 0.844991C14.0954 0.299519 12.8746 0.635956 12.3291 1.59644C11.7837 2.55693 12.1201 3.77775 13.0806 4.32322L14.0683 2.58411L15.0559 0.844991ZM24.3237 38.8301C25.1047 39.6112 26.371 39.6112 27.1521 38.8301L39.88 26.1022C40.6611 25.3212 40.6611 24.0548 39.88 23.2738C39.099 22.4927 37.8326 22.4927 37.0516 23.2738L25.7379 34.5875L14.4242 23.2738C13.6431 22.4927 12.3768 22.4927 11.5957 23.2738C10.8147 24.0548 10.8147 25.3212 11.5957 26.1022L24.3237 38.8301ZM14.0683 2.58411L13.0806 4.32322C19.6901 8.07682 22.2819 12.7684 23.3088 18.1847C23.836 20.9652 23.9531 23.9667 23.9286 27.2094C23.9163 28.8287 23.8693 30.4812 23.8246 32.1902C23.78 33.8911 23.7379 35.6411 23.7379 37.4159L25.7379 37.4159L27.7379 37.4159C27.7379 35.6988 27.7786 33.9955 27.8232 32.2949C27.8675 30.6023 27.9159 28.9052 27.9285 27.2397C27.9537 23.9128 27.8388 20.6044 27.2388 17.4396C26.0113 10.9653 22.7684 5.225 15.0559 0.844991L14.0683 2.58411Z" fill="#4AD396"/>
33750
+ </svg>`
33751
+ };
33752
+ container.innerHTML = svgContent[direction];
33753
+ return container;
33754
+ };
33724
33755
  switch (stage) {
33725
33756
  case idRecognition.EAuthMeIDCardAntiFraudStage.Left:
33726
- facingMode === 'front' ? setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip')) : setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
33757
+ setupDirectionDisplay('left', 'sdk.guard.verify.guide.idCardFlip.left');
33727
33758
  break;
33728
33759
  case idRecognition.EAuthMeIDCardAntiFraudStage.Right:
33729
- facingMode === 'front' ? setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip')) : setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
33760
+ setupDirectionDisplay('right', 'sdk.guard.verify.guide.idCardFlip.right', true);
33730
33761
  break;
33731
33762
  case idRecognition.EAuthMeIDCardAntiFraudStage.Up:
33732
- setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
33763
+ setupDirectionDisplay('up', 'sdk.guard.verify.guide.idCardFlip.up');
33733
33764
  break;
33734
33765
  case idRecognition.EAuthMeIDCardAntiFraudStage.Down:
33735
- setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
33766
+ setupDirectionDisplay('down', 'sdk.guard.verify.guide.idCardFlip.down', true);
33736
33767
  break;
33737
33768
  }
33738
33769
  }
@@ -34394,7 +34425,7 @@ class LivenessVerifyModule {
34394
34425
  }
34395
34426
  }
34396
34427
 
34397
- function handleUploadError$1(error) {
34428
+ function handleUploadError$1(_error) {
34398
34429
  return new Promise(resolve => {
34399
34430
  util.uploadModal({
34400
34431
  type: 'error',
@@ -34458,6 +34489,7 @@ class LivenessModule {
34458
34489
  try {
34459
34490
  const result = yield rxjs.firstValueFrom(yield startLiveness({
34460
34491
  getOptionConfig: () => __awaiter(this, void 0, void 0, function* () {
34492
+ console.log('config.deviceType', config.deviceType);
34461
34493
  const res = yield liveness.LivenessAPI.IdentityVerification.option(config.deviceType);
34462
34494
  const themeId = res.themeId;
34463
34495
  if (!themeId) {
@@ -34593,7 +34625,7 @@ class LivenessModule {
34593
34625
  // );
34594
34626
  yield handleUpload(id, frameList, resultList, meta, config, shouldEncrypt, encryptDataBase64);
34595
34627
  // upload finish view
34596
- const successView = util.uploadModal({
34628
+ util.uploadModal({
34597
34629
  type: 'success',
34598
34630
  titleSuccess: core.getTranslateInstance().translate('sdk.general.successUpload')
34599
34631
  });
@@ -37172,7 +37204,7 @@ class AuthmeIdentityVerification extends engine.AuthmeFunctionModule {
37172
37204
  getCustomerState(arg) {
37173
37205
  return __awaiter(this, void 0, void 0, function* () {
37174
37206
  const paramsDefault = {
37175
- waitingTime: 3,
37207
+ waitingTime: 60,
37176
37208
  retryTimes: 2
37177
37209
  };
37178
37210
  if (arg === null || arg === void 0 ? void 0 : arg.retryTimes) {
@@ -37221,8 +37253,8 @@ class AuthmeIdentityVerification extends engine.AuthmeFunctionModule {
37221
37253
  }
37222
37254
 
37223
37255
  var name = "authme/sdk";
37224
- var version$1 = "2.8.25";
37225
- var date = "2025-08-20T02:53:44+0000";
37256
+ var version$1 = "2.8.27";
37257
+ var date = "2025-10-02T06:50:39+0000";
37226
37258
  var packageInfo = {
37227
37259
  name: name,
37228
37260
  version: version$1,