@voltom.io/sdk 1.0.2 → 1.0.4
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/dist/assets/locales/ar.json +121 -0
- package/dist/assets/locales/ch.json +121 -0
- package/dist/assets/locales/de.json +121 -0
- package/dist/assets/locales/en.json +121 -0
- package/dist/assets/locales/es.json +121 -0
- package/dist/assets/locales/fr.json +121 -0
- package/dist/assets/locales/it.json +121 -0
- package/dist/assets/locales/ja.json +121 -0
- package/dist/assets/locales/pt.json +121 -0
- package/dist/assets/locales/ru.json +121 -0
- package/dist/assets/locales/zh.json +121 -0
- package/dist/sdk/PoseSilhouette-CTZ5kqI_.js +2 -0
- package/dist/sdk/PoseSuccess-CxL2ugaZ.js +2 -0
- package/dist/sdk/facegate/global.d.ts +5 -0
- package/dist/sdk/facegate.d.ts +51 -0
- package/dist/sdk/facegate.dist.js +56 -0
- package/dist/sdk/facegate.js +2 -0
- package/dist/sdk/facekey/global.d.ts +0 -2
- package/dist/sdk/facekey.browser-D_vfob8H.js +2 -0
- package/dist/sdk/facekey.d.ts +2 -3
- package/dist/sdk/facekey.dist.js +3 -2
- package/dist/sdk/facekey.js +1 -1
- package/dist/sdk/media-KU3CWepq.js +2 -0
- package/dist/sdk/poseGuidance-DLg3Dm3T.js +65 -0
- package/dist/sdk/presentation-BCIQkuw0.js +2 -0
- package/dist/sdk/presentation-D9v4ITH0.js +8 -0
- package/dist/sdk/verify/global.d.ts +0 -2
- package/dist/sdk/verify.d.ts +2 -5
- package/dist/sdk/verify.dist.js +18 -18
- package/dist/sdk/verify.js +1 -1
- package/dist/sdk/view-CsOmx3ht.js +3 -0
- package/dist/sdk/view-Dgrm0mpZ.js +3 -0
- package/dist/sdk/view-WiNYUW9A.js +2 -0
- package/package.json +27 -9
- package/dist/sdk/DebugPanel-BJqGy2Dp.js +0 -2
- package/dist/sdk/faceMatch.shared-D6B1I2T0.js +0 -65
- package/dist/sdk/feedback-Cs09W_hs.js +0 -2
- package/dist/sdk/presentation-BrCGZT1u.js +0 -8
- package/dist/sdk/presentation-Jz2euuHa.js +0 -2
- package/dist/sdk/view-usv6rHIE.js +0 -3
- package/dist/sdk/view-vxhVZZc1.js +0 -2
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"invalidDocument": "Invalid document",
|
|
3
|
+
"checkingFaceMatch": "正在检查人脸匹配",
|
|
4
|
+
"checkingDocument": "正在检查证件",
|
|
5
|
+
"loadingAssets": "正在加载验证资源",
|
|
6
|
+
"loadingProgress": "{percent}% · {downloaded} MB / {total} MB",
|
|
7
|
+
"loadingRemaining": "预计剩余 {time}",
|
|
8
|
+
"readyToStart": "准备开始",
|
|
9
|
+
"preparingModels": "正在准备验证模型",
|
|
10
|
+
"document": "证件",
|
|
11
|
+
"documentNotReadable": "证件无法读取",
|
|
12
|
+
"documentBlurry": "证件图像模糊",
|
|
13
|
+
"error": "错误:{message}",
|
|
14
|
+
"face": "人脸",
|
|
15
|
+
"faceNotFound": "请将脸部置于摄像头画面中央,并确保脸部完整可见",
|
|
16
|
+
"faceInPolygon": "这不是真人。请展示您的真实人脸。",
|
|
17
|
+
"faceTooSmall": "请靠近摄像头,直到脸部填满画面",
|
|
18
|
+
"faceNotVisibleInDocument": "证件中未检测到人脸",
|
|
19
|
+
"frameDocument": "请将证件正面放入画面中",
|
|
20
|
+
"framePassport": "请将护照照片页放入画面中",
|
|
21
|
+
"passportMrzNotReadable": "请让所有文字和代码行清晰可读",
|
|
22
|
+
"documentAlignmentInvalid": "请将证件摆正,让照片和文字完整可见",
|
|
23
|
+
"frameDocumentBack": "请将证件背面放入画面中",
|
|
24
|
+
"stayStill": "请保持不动",
|
|
25
|
+
"holdDocumentStill": "请保持证件稳定",
|
|
26
|
+
"lookDown": "请稍微低下下巴",
|
|
27
|
+
"lookLeft": "请稍微向左转头",
|
|
28
|
+
"lookRight": "请稍微向右转头",
|
|
29
|
+
"lookStraight": "请直视镜头",
|
|
30
|
+
"raisePhone": "请将手机举到眼睛高度",
|
|
31
|
+
"centerFace": "请让脸部保持在摄像头画面中央",
|
|
32
|
+
"tiltScreen": "请调整屏幕角度,直到您可以直视摄像头",
|
|
33
|
+
"lookUp": "请稍微抬起下巴",
|
|
34
|
+
"turnLess": "请少转一些",
|
|
35
|
+
"raiseLess": "请少抬一些",
|
|
36
|
+
"lowerLess": "请少低一些",
|
|
37
|
+
"tiltLess": "请少倾斜一些",
|
|
38
|
+
"smile": "请微笑",
|
|
39
|
+
"tiltLeft": "将头稍微向左倾斜",
|
|
40
|
+
"tiltRight": "将头稍微向右倾斜",
|
|
41
|
+
"winkLeft": "请保持左眼闭合",
|
|
42
|
+
"winkRight": "请保持右眼闭合",
|
|
43
|
+
"match": "匹配 ({score}%)",
|
|
44
|
+
"noMatch": "不匹配 ({score}%)",
|
|
45
|
+
"start": "开始",
|
|
46
|
+
"stop": "停止",
|
|
47
|
+
"straightenHead": "请摆正头部",
|
|
48
|
+
"verificationCapture": "验证拍摄 {index}",
|
|
49
|
+
"cameraPermissionDenied": "Allow camera access to continue.",
|
|
50
|
+
"cameraNotFound": "No camera was found.",
|
|
51
|
+
"cameraUnavailable": "The camera is unavailable.",
|
|
52
|
+
"networkError": "Connection failed.",
|
|
53
|
+
"serviceUnavailable": "The verification service is unavailable.",
|
|
54
|
+
"modelLoadFailed": "Verification assets could not be loaded.",
|
|
55
|
+
"faceNotUsable": "Use a clear face image with even lighting.",
|
|
56
|
+
"verificationFailed": "Verification could not be completed.",
|
|
57
|
+
"capturesIncomplete": "缺少必要的采集。",
|
|
58
|
+
"documentValidationFailed": "无法验证证件。",
|
|
59
|
+
"invalidOptions": "验证设置无效。",
|
|
60
|
+
"invalidPoses": "人脸验证顺序无效。",
|
|
61
|
+
"invalidServiceResponse": "验证服务返回了无效响应。",
|
|
62
|
+
"poseBackgroundMismatch": "进行人脸验证时请保持相同背景。",
|
|
63
|
+
"poseIdentityMismatch": "人脸验证图像不匹配。",
|
|
64
|
+
"imageEncodeFailed": "无法准备图像。",
|
|
65
|
+
"imageProcessingFailed": "无法处理图像。",
|
|
66
|
+
"invalidImage": "请选择有效的图像文件。",
|
|
67
|
+
"clientKeyRequired": "缺少验证密钥。",
|
|
68
|
+
"verificationSaveFailed": "无法保存验证结果。",
|
|
69
|
+
"retry": "重试",
|
|
70
|
+
"faceCenterMoveLeft": "将脸向左移动,直到位于摄像头画面中央",
|
|
71
|
+
"faceCenterMoveRight": "将脸向右移动,直到位于摄像头画面中央",
|
|
72
|
+
"faceCenterMoveUp": "将脸向上移动,直到位于摄像头画面中央",
|
|
73
|
+
"faceCenterMoveDown": "将脸向下移动,直到位于摄像头画面中央",
|
|
74
|
+
"faceTiltMoreLeft": "Tilt your head slightly to your left to straighten it.",
|
|
75
|
+
"faceTiltMoreRight": "Tilt your head slightly to your right to straighten it.",
|
|
76
|
+
"faceTurnLeft": "Turn your head slightly to your left.",
|
|
77
|
+
"faceTurnRight": "Turn your head slightly to your right.",
|
|
78
|
+
"faceLookMoreUp": "Raise your chin slightly.",
|
|
79
|
+
"faceLookMoreDown": "Lower your chin slightly.",
|
|
80
|
+
"faceSmileRequired": "Smile more clearly.",
|
|
81
|
+
"faceWinkLeftRequired": "Close your left eye and keep your right eye open.",
|
|
82
|
+
"faceWinkRightRequired": "Close your right eye and keep your left eye open.",
|
|
83
|
+
"documentNotDetected": "找不到文件",
|
|
84
|
+
"documentBoxTooSmall": "请将文件靠近镜头",
|
|
85
|
+
"documentBoxTooLarge": "请将文件远离镜头",
|
|
86
|
+
"documentBoxNearEdge": "请将文件稍微远离镜头",
|
|
87
|
+
"documentBoxTouchesEdges": "请将整份文件放入画面",
|
|
88
|
+
"documentShapeInvalid": "文件形状无效",
|
|
89
|
+
"documentNotSupported": "不支持此文件",
|
|
90
|
+
"documentPhotoNotVisible": "Make sure the photo on the document is fully visible.",
|
|
91
|
+
"documentPhotoNotContained": "Make sure the document photo is fully visible.",
|
|
92
|
+
"documentPhotoSizeInvalid": "Make sure the document photo and text are fully visible.",
|
|
93
|
+
"documentLayoutInvalid": "Keep the document straight, with the photo on the left and text on the right.",
|
|
94
|
+
"documentNotRecognized": "This document could not be recognized. Use a supported identity document.",
|
|
95
|
+
"documentCodeNotReadable": "Make all text and code lines visible and readable.",
|
|
96
|
+
"documentBackHasFace": "请显示背面,不是正面",
|
|
97
|
+
"documentBackSameAsFront": "背面必须与正面不同",
|
|
98
|
+
"documentPhotoTooSmall": "证件上的照片太小",
|
|
99
|
+
"invalidPdf": "Invalid PDF",
|
|
100
|
+
"pdfPasswordRequired": "Password protected PDFs are not supported",
|
|
101
|
+
"pdfLoadFailed": "Could not load PDF support. Try again.",
|
|
102
|
+
"preparingCamera": "正在准备摄像头",
|
|
103
|
+
"checkingFace": "正在检查您的人脸",
|
|
104
|
+
"done": "完成",
|
|
105
|
+
"faceNotRecognized": "无法识别人脸",
|
|
106
|
+
"faceNotCentered": "请将脸部置于圆圈中央",
|
|
107
|
+
"setUpFaceKey": "设置 FaceKey",
|
|
108
|
+
"unlockWithFaceKey": "使用 FaceKey 解锁",
|
|
109
|
+
"cameraPreview": "摄像头预览",
|
|
110
|
+
"faceCaptureProgress": "人脸拍摄进度",
|
|
111
|
+
"moveHeadLeft": "将头转向左边",
|
|
112
|
+
"moveHeadRight": "将头转向右边",
|
|
113
|
+
"moveHeadUp": "抬起头",
|
|
114
|
+
"moveHeadDown": "低下头",
|
|
115
|
+
"tiltHeadLeft": "将头向左倾斜",
|
|
116
|
+
"tiltHeadRight": "将头向右倾斜",
|
|
117
|
+
"cancel": "取消",
|
|
118
|
+
"faceRetryPose": "无法识别人脸。请重试此姿势。",
|
|
119
|
+
"faceRetryMatch": "人脸不匹配。请重试此姿势。",
|
|
120
|
+
"faceRetryUsable": "人脸不可用。请重试此姿势。"
|
|
121
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Copyright (c) 2026 VOLTOM. All rights reserved. Proprietary software. See LICENSE at https://voltom.io/license. */
|
|
2
|
+
import{r as e}from"./PoseSuccess-CxL2ugaZ.js";var t=({className:t,entries:n,kind:r})=>e(`div`,{className:n.length?t:`hidden`,[`data-${r}-debug`]:``,children:n.map(({label:t,valid:n,value:r})=>e(`div`,{children:[e(`span`,{children:[t,`: `]}),e(`span`,{"data-valid":n===void 0?void 0:String(n),children:r})]},t))}),n={faceLeft:`M 78 50 L 22 50`,faceRight:`M 22 50 L 78 50`,faceUp:`M 50 78 L 50 22`,faceDown:`M 50 22 L 50 78`,faceTiltLeft:`M 68 26 Q 44 34 32 62`,faceTiltRight:`M 32 26 Q 56 34 68 62`},r=()=>e(`defs`,{children:e(`marker`,{id:`pose-arrowhead`,markerWidth:`6`,markerHeight:`6`,refX:`4.4`,refY:`3`,orient:`auto`,children:e(`path`,{"data-pose-arrowhead":``,d:`M0,0 L6,3 L0,6 Z`})})}),i=({pose:t})=>{let r=n[t];return r?e(`path`,{"data-pose-motion":``,d:r,"marker-end":`url(#pose-arrowhead)`}):null},a=({pose:t})=>t===`faceSmile`?e(`path`,{"data-pose-smile":``,d:`M 15 45 A 35 35 0 0 0 85 45`}):null,o=({className:t,pose:n})=>e(`svg`,{className:t,"data-pose-arrow":``,"data-pose":n,viewBox:`0 0 100 100`,"aria-hidden":`true`,children:[e(r,{}),e(i,{pose:n}),e(a,{pose:n})]});export{t as n,o as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Copyright (c) 2026 VOLTOM. All rights reserved. Proprietary software. See LICENSE at https://voltom.io/license. */
|
|
2
|
+
import{C as e}from"./media-KU3CWepq.js";var t=Symbol.for(`pv`),n=0;Array.isArray;function r(r,i,a,o,s,c){i||={};var l,u,d=i;if(`ref`in d&&typeof r!=`function`)for(u in d={},i)u==`ref`?l=i[u]:d[u]=i[u];var f={type:r,props:d,key:a,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:t,__v:--n,__i:-1,__u:0};return(s||c)&&(f.__source=s,f.__self=c),e.vnode&&e.vnode(f),f}var i=100,a=2,o=({total:e})=>i/e-(e===1?0:a),s=({arc:e,index:t,total:n})=>({dasharray:`${e} ${i-e}`,offset:`${-t*i/n}`}),c=({className:e,completed:t,label:n,total:a,variant:c=`bar`})=>{if(c===`ring`){let c=o({total:a});return r(`svg`,{className:e,"data-pose-progress":``,"data-variant":`ring`,viewBox:`0 0 100 100`,role:`progressbar`,"aria-label":n,"aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":t,children:r(`g`,{transform:`rotate(-90 50 50)`,children:Array.from({length:a},(e,n)=>{let{dasharray:o,offset:l}=s({arc:c,index:n,total:a});return r(`circle`,{cx:`50`,cy:`50`,r:`50`,pathLength:i,ref:e=>{e&&(e.setAttribute(`stroke-dasharray`,o),e.setAttribute(`stroke-dashoffset`,l))},"data-pose-progress-step":``,"data-complete":n<t?``:void 0},n)})})})}return r(`div`,{className:e,"data-pose-progress":``,"data-variant":`bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":t,children:Array.from({length:a},(e,n)=>r(`span`,{"data-pose-progress-step":``,"data-complete":n<t?``:void 0},n))})},l=({className:e,visible:t})=>r(`svg`,{className:e,"data-pose-success":``,"data-visible":t?``:void 0,viewBox:`0 0 100 100`,"aria-hidden":`true`,children:[r(`circle`,{cx:`50`,cy:`50`,r:`44`}),r(`path`,{d:`M29 51 43 65 72 36`,pathLength:`1`})]});export{c as n,r,l as t};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type FaceGatePose = "faceStraight" | "faceUp" | "faceLeft" | "faceRight" | "faceSmile";
|
|
2
|
+
|
|
3
|
+
export type FaceGateOutcome = "pass" | "fail" | "error";
|
|
4
|
+
|
|
5
|
+
export type VoltomFaceGateOptions = {
|
|
6
|
+
clientKey: string;
|
|
7
|
+
apiUrl?: string;
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
language?: "ar" | "ch" | "de" | "en" | "es" | "fr" | "it" | "ja" | "pt" | "zh";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type FaceGateReject = {
|
|
13
|
+
outcome: "fail" | "error";
|
|
14
|
+
code: string | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type FaceGateArmOptions = {
|
|
18
|
+
action: string;
|
|
19
|
+
subjectId?: () => Promise<string>;
|
|
20
|
+
context?: () => Promise<string>;
|
|
21
|
+
onPass: (token: string) => void | Promise<void>;
|
|
22
|
+
onReject: (reject: FaceGateReject) => void;
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type FaceGateHandle = {
|
|
27
|
+
control: HTMLElement;
|
|
28
|
+
options: FaceGateArmOptions;
|
|
29
|
+
detach: () => void;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type FaceGateState = {
|
|
33
|
+
active: boolean;
|
|
34
|
+
phase: "idle" | "capturing" | "checking" | "pass" | "reject";
|
|
35
|
+
prompt: string;
|
|
36
|
+
completed: number;
|
|
37
|
+
total: number;
|
|
38
|
+
outcome: FaceGateOutcome | null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export declare class VoltomFaceGate {
|
|
42
|
+
constructor(options: VoltomFaceGateOptions);
|
|
43
|
+
prepare(): Promise<void>;
|
|
44
|
+
arm(control: HTMLElement, options: FaceGateArmOptions): FaceGateHandle;
|
|
45
|
+
disarm(handle: FaceGateHandle): void;
|
|
46
|
+
stop(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
getState(): FaceGateState;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default VoltomFaceGate;
|