@authme/identity-verification 2.1.1
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/CHANGELOG.md +943 -0
- package/README.md +7 -0
- package/assets/locale/en_US.json +132 -0
- package/assets/locale/zh_Hant_TW.json +132 -0
- package/assets/styles/style.css +806 -0
- package/package.json +19 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +8 -0
- package/src/index.js.map +1 -0
- package/src/lib/identity-verification-feature-identity-verification.d.ts +26 -0
- package/src/lib/identity-verification-feature-identity-verification.js +105 -0
- package/src/lib/identity-verification-feature-identity-verification.js.map +1 -0
- package/src/lib/interface/config.interface.d.ts +32 -0
- package/src/lib/interface/config.interface.js +24 -0
- package/src/lib/interface/config.interface.js.map +1 -0
- package/src/lib/interface/index.d.ts +1 -0
- package/src/lib/interface/index.js +5 -0
- package/src/lib/interface/index.js.map +1 -0
- package/src/lib/interface/result.model.d.ts +13 -0
- package/src/lib/interface/result.model.js +3 -0
- package/src/lib/interface/result.model.js.map +1 -0
- package/src/lib/lottie/arrow_down.d.ts +215 -0
- package/src/lib/lottie/arrow_down.js +203 -0
- package/src/lib/lottie/arrow_down.js.map +1 -0
- package/src/lib/lottie/arrow_left.d.ts +215 -0
- package/src/lib/lottie/arrow_left.js +203 -0
- package/src/lib/lottie/arrow_left.js.map +1 -0
- package/src/lib/lottie/arrow_right.d.ts +215 -0
- package/src/lib/lottie/arrow_right.js +203 -0
- package/src/lib/lottie/arrow_right.js.map +1 -0
- package/src/lib/lottie/arrow_up.d.ts +215 -0
- package/src/lib/lottie/arrow_up.js +203 -0
- package/src/lib/lottie/arrow_up.js.map +1 -0
- package/src/lib/lottie/card_lr.d.ts +182 -0
- package/src/lib/lottie/card_lr.js +1903 -0
- package/src/lib/lottie/card_lr.js.map +1 -0
- package/src/lib/lottie/card_ud.d.ts +182 -0
- package/src/lib/lottie/card_ud.js +1937 -0
- package/src/lib/lottie/card_ud.js.map +1 -0
- package/src/lib/lottie/index.d.ts +9 -0
- package/src/lib/lottie/index.js +13 -0
- package/src/lib/lottie/index.js.map +1 -0
- package/src/lib/lottie/scan.d.ts +562 -0
- package/src/lib/lottie/scan.js +384 -0
- package/src/lib/lottie/scan.js.map +1 -0
- package/src/lib/lottie/success.d.ts +946 -0
- package/src/lib/lottie/success.js +509 -0
- package/src/lib/lottie/success.js.map +1 -0
- package/src/lib/lottie/tutorial.d.ts +1449 -0
- package/src/lib/lottie/tutorial.js +3683 -0
- package/src/lib/lottie/tutorial.js.map +1 -0
- package/src/lib/module/liveness-verify.module.d.ts +12 -0
- package/src/lib/module/liveness-verify.module.js +189 -0
- package/src/lib/module/liveness-verify.module.js.map +1 -0
- package/src/lib/module/liveness.module.d.ts +12 -0
- package/src/lib/module/liveness.module.js +160 -0
- package/src/lib/module/liveness.module.js.map +1 -0
- package/src/lib/module/mrz.module.d.ts +11 -0
- package/src/lib/module/mrz.module.js +142 -0
- package/src/lib/module/mrz.module.js.map +1 -0
- package/src/lib/module/ocr.module.d.ts +12 -0
- package/src/lib/module/ocr.module.js +220 -0
- package/src/lib/module/ocr.module.js.map +1 -0
- package/src/lib/operator/index.d.ts +16 -0
- package/src/lib/operator/index.js +38 -0
- package/src/lib/operator/index.js.map +1 -0
- package/src/lib/ui/basic.d.ts +13 -0
- package/src/lib/ui/basic.js +62 -0
- package/src/lib/ui/basic.js.map +1 -0
- package/src/lib/ui/index.d.ts +2 -0
- package/src/lib/ui/index.js +6 -0
- package/src/lib/ui/index.js.map +1 -0
- package/src/lib/ui/liveness-flow.d.ts +16 -0
- package/src/lib/ui/liveness-flow.js +154 -0
- package/src/lib/ui/liveness-flow.js.map +1 -0
- package/src/lib/ui/liveness.ui.d.ts +9 -0
- package/src/lib/ui/liveness.ui.js +51 -0
- package/src/lib/ui/liveness.ui.js.map +1 -0
- package/src/lib/ui/ocr-flow.d.ts +73 -0
- package/src/lib/ui/ocr-flow.js +664 -0
- package/src/lib/ui/ocr-flow.js.map +1 -0
- package/src/lib/ui/ocr.ui.d.ts +43 -0
- package/src/lib/ui/ocr.ui.js +193 -0
- package/src/lib/ui/ocr.ui.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@authme/identity-verification",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"lottie-web": "^5.9.2",
|
|
6
|
+
"rxjs": "~7.4.0"
|
|
7
|
+
},
|
|
8
|
+
"main": "./src/index.js",
|
|
9
|
+
"typings": "./src/index.d.ts",
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@authme/core": "2.1.1",
|
|
12
|
+
"@authme/util": "2.1.1",
|
|
13
|
+
"three": "^0.136.0",
|
|
14
|
+
"@authme/engine": "2.1.1",
|
|
15
|
+
"@authme/id-recognition": "2.1.1",
|
|
16
|
+
"@authme/liveness": "2.1.1",
|
|
17
|
+
"tslib": "^2.3.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib/identity-verification-feature-identity-verification"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/ui"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/lottie"), exports);
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/identity-verification/feature-identity-verification/src/index.ts"],"names":[],"mappings":";;;AAAA,oGAA0E;AAC1E,0DAAgC;AAChC,mDAAyB;AACzB,uDAA6B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AuthmeFunctionModule } from '@authme/engine';
|
|
2
|
+
import { IdentityVerificationConfig, IdRecognitionConfig, LivenessConfig } from './interface';
|
|
3
|
+
import { AuthmeLivenessResult, AuthmeOCRResult } from './interface/result.model';
|
|
4
|
+
export declare function identityVerificationFeatureIdentityVerification(): string;
|
|
5
|
+
export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
|
|
6
|
+
private engine;
|
|
7
|
+
private livenessModule;
|
|
8
|
+
private livenessVerifyModule;
|
|
9
|
+
private isAuth;
|
|
10
|
+
private ocrModule;
|
|
11
|
+
private mrzModule;
|
|
12
|
+
init(config: IdentityVerificationConfig): Promise<void>;
|
|
13
|
+
liveness(userConfig?: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
|
|
14
|
+
livenessVerify(userConfig: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
|
|
15
|
+
IdRecognition(userConfig: Partial<IdRecognitionConfig>): Promise<AuthmeOCRResult>;
|
|
16
|
+
confirmOCRResult(data: {
|
|
17
|
+
scanId: string;
|
|
18
|
+
details: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
}): Promise<boolean>;
|
|
22
|
+
auth(authParams: {
|
|
23
|
+
cert: string;
|
|
24
|
+
authToken: string;
|
|
25
|
+
}): Promise<boolean>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthmeIdentityVerification = exports.identityVerificationFeatureIdentityVerification = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@authme/core");
|
|
6
|
+
const engine_1 = require("@authme/engine");
|
|
7
|
+
const id_recognition_1 = require("@authme/id-recognition");
|
|
8
|
+
const rxjs_1 = require("rxjs");
|
|
9
|
+
const interface_1 = require("./interface");
|
|
10
|
+
const liveness_verify_module_1 = require("./module/liveness-verify.module");
|
|
11
|
+
const liveness_module_1 = require("./module/liveness.module");
|
|
12
|
+
const mrz_module_1 = require("./module/mrz.module");
|
|
13
|
+
const ocr_module_1 = require("./module/ocr.module");
|
|
14
|
+
function identityVerificationFeatureIdentityVerification() {
|
|
15
|
+
return 'identity-verification-feature-identity-verification';
|
|
16
|
+
}
|
|
17
|
+
exports.identityVerificationFeatureIdentityVerification = identityVerificationFeatureIdentityVerification;
|
|
18
|
+
class AuthmeIdentityVerification extends engine_1.AuthmeFunctionModule {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.isAuth = false;
|
|
22
|
+
}
|
|
23
|
+
init(config) {
|
|
24
|
+
const _super = Object.create(null, {
|
|
25
|
+
init: { get: () => super.init }
|
|
26
|
+
});
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
yield _super.init.call(this, config);
|
|
30
|
+
config = Object.assign(Object.assign({}, interface_1.defaultIdentityVerificationConfig), config);
|
|
31
|
+
const { canvas } = config, engineConfig = tslib_1.__rest(config, ["canvas"]);
|
|
32
|
+
this.engine = new engine_1.MlEngine(engineConfig);
|
|
33
|
+
this.ocrModule = new ocr_module_1.OCRModule(this.engine, canvas);
|
|
34
|
+
this.mrzModule = new mrz_module_1.MRZModule(this.engine, canvas);
|
|
35
|
+
this.livenessModule = new liveness_module_1.LivenessModule(this.engine, canvas);
|
|
36
|
+
this.livenessVerifyModule = new liveness_verify_module_1.LivenessVerifyModule(this.engine, canvas);
|
|
37
|
+
yield this.engine.init();
|
|
38
|
+
yield this.engine.loadEngineWasm();
|
|
39
|
+
yield (0, core_1.getTranslateInstance)().fetchSource(`${config.scriptPath}locale`);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error instanceof core_1.AuthmeError &&
|
|
43
|
+
error.code === core_1.ErrorCode.BROWSER_NOT_SUPPORT) {
|
|
44
|
+
alert((0, core_1.getTranslateInstance)().translate('browser.error.notSupport'));
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
liveness(userConfig = {}) {
|
|
51
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
if (!this.isAuth) {
|
|
53
|
+
return {
|
|
54
|
+
isSuccess: false,
|
|
55
|
+
message: new core_1.AuthmeError(core_1.ErrorCode.INVALID_AUTH_ERROR).message,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const config = Object.assign(Object.assign({}, interface_1.defaultLivenessConfig), userConfig);
|
|
59
|
+
return this.livenessModule.run(config);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
livenessVerify(userConfig) {
|
|
63
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
if (!this.isAuth) {
|
|
65
|
+
return {
|
|
66
|
+
isSuccess: false,
|
|
67
|
+
message: new core_1.AuthmeError(core_1.ErrorCode.INVALID_AUTH_ERROR).message,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const config = Object.assign(Object.assign({}, interface_1.defaultLivenessConfig), userConfig);
|
|
71
|
+
return this.livenessVerifyModule.run(config);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
IdRecognition(userConfig) {
|
|
75
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (!this.isAuth) {
|
|
77
|
+
return {
|
|
78
|
+
isSuccess: false,
|
|
79
|
+
message: new core_1.AuthmeError(core_1.ErrorCode.INVALID_AUTH_ERROR).message,
|
|
80
|
+
data: {},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const config = Object.assign(Object.assign({}, interface_1.defaultIdRecognitionConfig), userConfig);
|
|
84
|
+
const acceptTypes = (0, id_recognition_1.getCardSubTypes)(config.type, config.country, false);
|
|
85
|
+
return config.type === id_recognition_1.IdRecognitionCardType.Passport
|
|
86
|
+
? this.mrzModule.run(config, acceptTypes)
|
|
87
|
+
: this.ocrModule.run(config, acceptTypes);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
confirmOCRResult(data) {
|
|
91
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
yield (0, id_recognition_1.confirmScan)(data.scanId, data.details);
|
|
93
|
+
return true;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
auth(authParams) {
|
|
97
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const result = yield (0, rxjs_1.firstValueFrom)(this.engine.run(engine_1.EngineModule.Core, 'verify', authParams));
|
|
99
|
+
this.isAuth = result === engine_1.EAuthMeSDKAuthStatus.Pass;
|
|
100
|
+
return this.isAuth;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.AuthmeIdentityVerification = AuthmeIdentityVerification;
|
|
105
|
+
//# sourceMappingURL=identity-verification-feature-identity-verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-verification-feature-identity-verification.js","sourceRoot":"","sources":["../../../../../../libs/identity-verification/feature-identity-verification/src/lib/identity-verification-feature-identity-verification.ts"],"names":[],"mappings":";;;;AAAA,uCAA4E;AAC5E,2CAKwB;AACxB,2DAKgC;AAChC,+BAAsC;AACtC,2CAOqB;AAKrB,4EAAuE;AACvE,8DAA0D;AAC1D,oDAAgD;AAChD,oDAAgD;AAEhD,SAAgB,+CAA+C;IAC7D,OAAO,qDAAqD,CAAC;AAC/D,CAAC;AAFD,0GAEC;AACD,MAAa,0BAA2B,SAAQ,6BAAoB;IAApE;;QAIU,WAAM,GAAG,KAAK,CAAC;IAmGzB,CAAC;IA/FgB,IAAI,CAAC,MAAkC;;;;;YACpD,IAAI;gBACF,MAAM,OAAM,IAAI,YAAC,MAAM,CAAC,CAAC;gBACzB,MAAM,mCACD,6CAAiC,GACjC,MAAM,CACV,CAAC;gBACF,MAAM,EAAE,MAAM,KAAsB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AC;KAAA;IAEK,IAAI,CAAC,UAA+C;;YACxD,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAc,EACjC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CACzD,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,MAAM,KAAK,6BAAoB,CAAC,IAAI,CAAC;YACnD,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;KAAA;CACF;AAvGD,gEAuGC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MlEngineConfig } from '@authme/engine';
|
|
2
|
+
import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
|
|
3
|
+
export interface IdentityVerificationConfig extends MlEngineConfig {
|
|
4
|
+
canvas?: HTMLCanvasElement;
|
|
5
|
+
}
|
|
6
|
+
export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
|
|
7
|
+
export interface LivenessConfig {
|
|
8
|
+
active: boolean;
|
|
9
|
+
icon: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultLivenessConfig: LivenessConfig;
|
|
12
|
+
export interface IdRecognitionConfig {
|
|
13
|
+
needAntiFraud: boolean;
|
|
14
|
+
needOCR: boolean;
|
|
15
|
+
country: CountryCode;
|
|
16
|
+
type: IdRecognitionCardType;
|
|
17
|
+
needConfirm: boolean;
|
|
18
|
+
showStatement: boolean;
|
|
19
|
+
headerMode: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultIdRecognitionConfig: IdRecognitionConfig;
|
|
22
|
+
export interface OcrEngineConfig {
|
|
23
|
+
enableManualUpload: boolean;
|
|
24
|
+
fraudRetryTimes: number;
|
|
25
|
+
fraudTimeout: number;
|
|
26
|
+
fraudMaxFps: number;
|
|
27
|
+
}
|
|
28
|
+
export interface LivenessEngineConfig {
|
|
29
|
+
fasThreshold: number;
|
|
30
|
+
fasTimeout: number;
|
|
31
|
+
fasMaxFps: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultIdRecognitionConfig = exports.defaultLivenessConfig = exports.defaultIdentityVerificationConfig = void 0;
|
|
4
|
+
const id_recognition_1 = require("@authme/id-recognition");
|
|
5
|
+
exports.defaultIdentityVerificationConfig = {
|
|
6
|
+
token: '',
|
|
7
|
+
apiBaseUrl: '/',
|
|
8
|
+
scriptPath: '/assets/',
|
|
9
|
+
dataTransferMethod: 'binary',
|
|
10
|
+
};
|
|
11
|
+
exports.defaultLivenessConfig = {
|
|
12
|
+
active: true,
|
|
13
|
+
icon: '',
|
|
14
|
+
};
|
|
15
|
+
exports.defaultIdRecognitionConfig = {
|
|
16
|
+
type: id_recognition_1.IdRecognitionCardType.IDCard,
|
|
17
|
+
country: id_recognition_1.CountryCode.TW,
|
|
18
|
+
needConfirm: true,
|
|
19
|
+
needAntiFraud: true,
|
|
20
|
+
needOCR: true,
|
|
21
|
+
showStatement: true,
|
|
22
|
+
headerMode: 1,
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=config.interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.interface.js","sourceRoot":"","sources":["../../../../../../../libs/identity-verification/feature-identity-verification/src/lib/interface/config.interface.ts"],"names":[],"mappings":";;;AACA,2DAA4E;AAM/D,QAAA,iCAAiC,GAA+B;IAC3E,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,UAAU;IACtB,kBAAkB,EAAE,QAAQ;CAC7B,CAAC;AAMW,QAAA,qBAAqB,GAAmB;IACnD,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;CACT,CAAC;AAYW,QAAA,0BAA0B,GAAwB;IAC7D,IAAI,EAAE,sCAAqB,CAAC,MAAM;IAClC,OAAO,EAAE,4BAAW,CAAC,EAAE;IACvB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './config.interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/identity-verification/feature-identity-verification/src/lib/interface/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AuthmeResult {
|
|
2
|
+
isSuccess: boolean;
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type AuthmeLivenessResult = AuthmeResult;
|
|
6
|
+
export interface AuthmeOCRResult extends AuthmeResult {
|
|
7
|
+
data: {
|
|
8
|
+
scanId?: string;
|
|
9
|
+
details?: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.model.js","sourceRoot":"","sources":["../../../../../../../libs/identity-verification/feature-identity-verification/src/lib/interface/result.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
export declare const arrow_down: () => {
|
|
2
|
+
v: string;
|
|
3
|
+
fr: number;
|
|
4
|
+
ip: number;
|
|
5
|
+
op: number;
|
|
6
|
+
w: number;
|
|
7
|
+
h: number;
|
|
8
|
+
nm: string;
|
|
9
|
+
ddd: number;
|
|
10
|
+
assets: any[];
|
|
11
|
+
layers: {
|
|
12
|
+
ddd: number;
|
|
13
|
+
ind: number;
|
|
14
|
+
ty: number;
|
|
15
|
+
nm: string;
|
|
16
|
+
sr: number;
|
|
17
|
+
ks: {
|
|
18
|
+
o: {
|
|
19
|
+
a: number;
|
|
20
|
+
k: number;
|
|
21
|
+
ix: number;
|
|
22
|
+
};
|
|
23
|
+
r: {
|
|
24
|
+
a: number;
|
|
25
|
+
k: number;
|
|
26
|
+
ix: number;
|
|
27
|
+
};
|
|
28
|
+
p: {
|
|
29
|
+
a: number;
|
|
30
|
+
k: number[];
|
|
31
|
+
ix: number;
|
|
32
|
+
l: number;
|
|
33
|
+
};
|
|
34
|
+
a: {
|
|
35
|
+
a: number;
|
|
36
|
+
k: number[];
|
|
37
|
+
ix: number;
|
|
38
|
+
l: number;
|
|
39
|
+
};
|
|
40
|
+
s: {
|
|
41
|
+
a: number;
|
|
42
|
+
k: ({
|
|
43
|
+
i: {
|
|
44
|
+
x: number[];
|
|
45
|
+
y: number[];
|
|
46
|
+
};
|
|
47
|
+
o: {
|
|
48
|
+
x: number[];
|
|
49
|
+
y: number[];
|
|
50
|
+
};
|
|
51
|
+
t: number;
|
|
52
|
+
s: number[];
|
|
53
|
+
} | {
|
|
54
|
+
t: number;
|
|
55
|
+
s: number[];
|
|
56
|
+
i?: undefined;
|
|
57
|
+
o?: undefined;
|
|
58
|
+
})[];
|
|
59
|
+
ix: number;
|
|
60
|
+
l: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
ao: number;
|
|
64
|
+
shapes: {
|
|
65
|
+
ty: string;
|
|
66
|
+
it: ({
|
|
67
|
+
ind: number;
|
|
68
|
+
ty: string;
|
|
69
|
+
ix: number;
|
|
70
|
+
ks: {
|
|
71
|
+
a: number;
|
|
72
|
+
k: ({
|
|
73
|
+
i: {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
};
|
|
77
|
+
o: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
};
|
|
81
|
+
t: number;
|
|
82
|
+
s: {
|
|
83
|
+
i: number[][];
|
|
84
|
+
o: number[][];
|
|
85
|
+
v: number[][];
|
|
86
|
+
c: boolean;
|
|
87
|
+
}[];
|
|
88
|
+
} | {
|
|
89
|
+
t: number;
|
|
90
|
+
s: {
|
|
91
|
+
i: number[][];
|
|
92
|
+
o: number[][];
|
|
93
|
+
v: number[][];
|
|
94
|
+
c: boolean;
|
|
95
|
+
}[];
|
|
96
|
+
i?: undefined;
|
|
97
|
+
o?: undefined;
|
|
98
|
+
})[];
|
|
99
|
+
ix: number;
|
|
100
|
+
};
|
|
101
|
+
nm: string;
|
|
102
|
+
mn: string;
|
|
103
|
+
hd: boolean;
|
|
104
|
+
o?: undefined;
|
|
105
|
+
r?: undefined;
|
|
106
|
+
bm?: undefined;
|
|
107
|
+
g?: undefined;
|
|
108
|
+
s?: undefined;
|
|
109
|
+
e?: undefined;
|
|
110
|
+
t?: undefined;
|
|
111
|
+
p?: undefined;
|
|
112
|
+
a?: undefined;
|
|
113
|
+
sk?: undefined;
|
|
114
|
+
sa?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
ty: string;
|
|
117
|
+
o: {
|
|
118
|
+
a: number;
|
|
119
|
+
k: number;
|
|
120
|
+
ix: number;
|
|
121
|
+
};
|
|
122
|
+
r: number;
|
|
123
|
+
bm: number;
|
|
124
|
+
g: {
|
|
125
|
+
p: number;
|
|
126
|
+
k: {
|
|
127
|
+
a: number;
|
|
128
|
+
k: number[];
|
|
129
|
+
ix: number;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
s: {
|
|
133
|
+
a: number;
|
|
134
|
+
k: number[];
|
|
135
|
+
ix: number;
|
|
136
|
+
};
|
|
137
|
+
e: {
|
|
138
|
+
a: number;
|
|
139
|
+
k: number[];
|
|
140
|
+
ix: number;
|
|
141
|
+
};
|
|
142
|
+
t: number;
|
|
143
|
+
nm: string;
|
|
144
|
+
mn: string;
|
|
145
|
+
hd: boolean;
|
|
146
|
+
ind?: undefined;
|
|
147
|
+
ix?: undefined;
|
|
148
|
+
ks?: undefined;
|
|
149
|
+
p?: undefined;
|
|
150
|
+
a?: undefined;
|
|
151
|
+
sk?: undefined;
|
|
152
|
+
sa?: undefined;
|
|
153
|
+
} | {
|
|
154
|
+
ty: string;
|
|
155
|
+
p: {
|
|
156
|
+
a: number;
|
|
157
|
+
k: number[];
|
|
158
|
+
ix: number;
|
|
159
|
+
};
|
|
160
|
+
a: {
|
|
161
|
+
a: number;
|
|
162
|
+
k: number[];
|
|
163
|
+
ix: number;
|
|
164
|
+
};
|
|
165
|
+
s: {
|
|
166
|
+
a: number;
|
|
167
|
+
k: number[];
|
|
168
|
+
ix: number;
|
|
169
|
+
};
|
|
170
|
+
r: {
|
|
171
|
+
a: number;
|
|
172
|
+
k: number;
|
|
173
|
+
ix: number;
|
|
174
|
+
};
|
|
175
|
+
o: {
|
|
176
|
+
a: number;
|
|
177
|
+
k: number;
|
|
178
|
+
ix: number;
|
|
179
|
+
};
|
|
180
|
+
sk: {
|
|
181
|
+
a: number;
|
|
182
|
+
k: number;
|
|
183
|
+
ix: number;
|
|
184
|
+
};
|
|
185
|
+
sa: {
|
|
186
|
+
a: number;
|
|
187
|
+
k: number;
|
|
188
|
+
ix: number;
|
|
189
|
+
};
|
|
190
|
+
nm: string;
|
|
191
|
+
ind?: undefined;
|
|
192
|
+
ix?: undefined;
|
|
193
|
+
ks?: undefined;
|
|
194
|
+
mn?: undefined;
|
|
195
|
+
hd?: undefined;
|
|
196
|
+
bm?: undefined;
|
|
197
|
+
g?: undefined;
|
|
198
|
+
e?: undefined;
|
|
199
|
+
t?: undefined;
|
|
200
|
+
})[];
|
|
201
|
+
nm: string;
|
|
202
|
+
np: number;
|
|
203
|
+
cix: number;
|
|
204
|
+
bm: number;
|
|
205
|
+
ix: number;
|
|
206
|
+
mn: string;
|
|
207
|
+
hd: boolean;
|
|
208
|
+
}[];
|
|
209
|
+
ip: number;
|
|
210
|
+
op: number;
|
|
211
|
+
st: number;
|
|
212
|
+
bm: number;
|
|
213
|
+
}[];
|
|
214
|
+
markers: any[];
|
|
215
|
+
};
|