@tsocial/tvweb-sdk 5.34.4 → 5.34.5
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.
|
@@ -33783,7 +33783,7 @@
|
|
|
33783
33783
|
}, nS$1;
|
|
33784
33784
|
}();
|
|
33785
33785
|
function nB$1() {
|
|
33786
|
-
return "5.34.
|
|
33786
|
+
return "5.34.5";
|
|
33787
33787
|
}
|
|
33788
33788
|
function nI$1() {
|
|
33789
33789
|
return {
|
|
@@ -41259,55 +41259,51 @@
|
|
|
41259
41259
|
}, uz;
|
|
41260
41260
|
}(), uG);
|
|
41261
41261
|
}();
|
|
41262
|
-
let dm =
|
|
41262
|
+
let dm = dg;
|
|
41263
|
+
function dg(e, t) {
|
|
41264
|
+
let r = dv();
|
|
41265
|
+
return (dg = function(e, t) {
|
|
41266
|
+
return r[e -= 187];
|
|
41267
|
+
})(e, t);
|
|
41268
|
+
}
|
|
41269
|
+
let dy = dg, db = dv();
|
|
41263
41270
|
for(;;)try {
|
|
41264
|
-
if (parseInt(
|
|
41265
|
-
|
|
41271
|
+
if (-parseInt(dy(192)) / 1 + -parseInt(dy(203)) / 2 * (parseInt(dy(195)) / 3) + parseInt(dy(196)) / 4 + -parseInt(dy(207)) / 5 + -parseInt(dy(190)) / 6 + -parseInt(dy(189)) / 7 * (parseInt(dy(191)) / 8) + parseInt(dy(187)) / 9 === 698852) break;
|
|
41272
|
+
db.push(db.shift());
|
|
41266
41273
|
} catch (e) {
|
|
41267
|
-
|
|
41274
|
+
db.push(db.shift());
|
|
41268
41275
|
}
|
|
41269
|
-
function
|
|
41270
|
-
let r = dx();
|
|
41271
|
-
return (db = function(e, t) {
|
|
41272
|
-
return r[e -= 454];
|
|
41273
|
-
})(e, t);
|
|
41274
|
-
}
|
|
41275
|
-
let dv = dm(462) + dm(467) + dm(479) + dm(459) + "0301070342" + dm(472), d_ = dm(474) + dm(466) + dm(456) + dm(478) + dm(454) + "ytJdcsPxrD" + dm(461) + dm(464) + "Mjci1ul8mm" + dm(475) + dm(481) + dm(470) + dm(469);
|
|
41276
|
-
function dx() {
|
|
41276
|
+
function dv() {
|
|
41277
41277
|
let e = [
|
|
41278
|
-
"
|
|
41279
|
-
"
|
|
41280
|
-
"18448xyLlKj",
|
|
41281
|
-
"cDQgAE9h6Z",
|
|
41282
|
-
"3d02010608",
|
|
41283
|
-
"204126ixklsL",
|
|
41284
|
-
"MfPrcYTM70",
|
|
41285
|
-
"DepBO8t60S",
|
|
41286
|
-
"87nmVtHP",
|
|
41278
|
+
"ssRdXLZEX8",
|
|
41279
|
+
"0301070342",
|
|
41287
41280
|
"KoZIzj0DAQ",
|
|
41288
|
-
"
|
|
41289
|
-
"2EfgRUw",
|
|
41290
|
-
"2a8648ce3d",
|
|
41291
|
-
"136242zgynFf",
|
|
41292
|
-
"+faHkP3QC3",
|
|
41293
|
-
"3059301306",
|
|
41294
|
-
"553JRucLG",
|
|
41295
|
-
"44P0rKKsZK",
|
|
41296
|
-
"879336fcuqSw",
|
|
41281
|
+
"ytJdcsPxrD",
|
|
41297
41282
|
"ZIzj0CAQYI",
|
|
41298
|
-
"
|
|
41299
|
-
"
|
|
41300
|
-
"
|
|
41301
|
-
"ssRdXLZEX8",
|
|
41302
|
-
"241645RDykmR",
|
|
41283
|
+
"44P0rKKsZK",
|
|
41284
|
+
"78oZoJhH",
|
|
41285
|
+
"2a8648ce3d",
|
|
41303
41286
|
"000",
|
|
41304
|
-
"
|
|
41305
|
-
"
|
|
41287
|
+
"3059301306",
|
|
41288
|
+
"5437410AYDgCq",
|
|
41289
|
+
"+faHkP3QC3",
|
|
41290
|
+
"Mjci1ul8mm",
|
|
41291
|
+
"37124379gQRvRs",
|
|
41292
|
+
"MFkwEwYHKo",
|
|
41293
|
+
"7ZYIbTa",
|
|
41294
|
+
"4421568SgMIDk",
|
|
41295
|
+
"1587704kuyojg",
|
|
41296
|
+
"850895lAaPpT",
|
|
41297
|
+
"DepBO8t60S",
|
|
41298
|
+
"cDQgAE9h6Z",
|
|
41299
|
+
"48579GCEgeE",
|
|
41300
|
+
"316864rFHuHL"
|
|
41306
41301
|
];
|
|
41307
|
-
return (
|
|
41302
|
+
return (dv = function() {
|
|
41308
41303
|
return e;
|
|
41309
41304
|
})();
|
|
41310
41305
|
}
|
|
41306
|
+
let d_ = dm(206) + "072a8648ce3d02010608" + dm(204) + dm(198) + dm(205), dx = dm(188) + dm(201) + dm(199) + dm(194) + dm(193) + dm(200) + dm(208) + dm(202) + dm(209) + "D9EKOWS+U4MfPrcYTM70" + dm(197) + "KA==";
|
|
41311
41307
|
async function dC(e) {
|
|
41312
41308
|
let t = new TextEncoder().encode(e);
|
|
41313
41309
|
return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256", t))).map((e)=>e.toString(16).padStart(2, "0")).join("");
|
|
@@ -41412,7 +41408,7 @@
|
|
|
41412
41408
|
isValid: !1,
|
|
41413
41409
|
error: i0$1.invalid_license
|
|
41414
41410
|
};
|
|
41415
|
-
let { mode: a, license: o, signature: s } = dS(e), c = dw(i4$1(o)), l = (r = t ||
|
|
41411
|
+
let { mode: a, license: o, signature: s } = dS(e), c = dw(i4$1(o)), l = (r = t || dx, n = i4$1(r).replace(d_, ""), i = new dp.ec("p256").keyFromPublic(n, "hex"), {
|
|
41416
41412
|
verifySignature: async (e, t)=>{
|
|
41417
41413
|
try {
|
|
41418
41414
|
let r = await dC(e), n = i4$1(t);
|
|
@@ -45326,7 +45322,7 @@
|
|
|
45326
45322
|
return this.getKey().getPublicKey();
|
|
45327
45323
|
}, e.prototype.getPublicKeyB64 = function() {
|
|
45328
45324
|
return this.getKey().getPublicBaseKeyB64();
|
|
45329
|
-
}, e.version = "5.34.
|
|
45325
|
+
}, e.version = "5.34.4", e;
|
|
45330
45326
|
}();
|
|
45331
45327
|
let hO = [
|
|
45332
45328
|
"-",
|
|
@@ -110652,13 +110648,11 @@
|
|
|
110652
110648
|
}
|
|
110653
110649
|
return apiClient.detectIDTampering(payload);
|
|
110654
110650
|
}
|
|
110655
|
-
async function readIdCard({ cardType, apiClient,
|
|
110651
|
+
async function readIdCard({ cardType, apiClient, cardImageId, qrImageId }) {
|
|
110656
110652
|
const payload = {
|
|
110657
110653
|
card_type: cardType,
|
|
110658
|
-
image1:
|
|
110659
|
-
id:
|
|
110660
|
-
} : {
|
|
110661
|
-
id: backCardId
|
|
110654
|
+
image1: {
|
|
110655
|
+
id: cardImageId
|
|
110662
110656
|
}
|
|
110663
110657
|
};
|
|
110664
110658
|
if (qrImageId) {
|
|
@@ -110671,10 +110665,6 @@
|
|
|
110671
110665
|
return apiClient.readIDCard(payload);
|
|
110672
110666
|
}
|
|
110673
110667
|
async function handleApiCheck({ image, frontCardId: existingFrontCardId, qrImageId: existingQRImageId, onError, recordedVideos, apiClient, cardType, cardSide, qrScannedResult, outputEncryptionSettings, enabledServices, fullVideo, capturingVideo, previousCapturingVideoId, previousFullVideoId }) {
|
|
110674
|
-
if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
|
|
110675
|
-
onError(Errors$3.missing_front_id_card);
|
|
110676
|
-
return;
|
|
110677
|
-
}
|
|
110678
110668
|
const uploadPromises = [
|
|
110679
110669
|
uploadIdCard({
|
|
110680
110670
|
image,
|
|
@@ -110714,15 +110704,6 @@
|
|
|
110714
110704
|
}
|
|
110715
110705
|
const imageId = uploadIdCardResult.data.image_id;
|
|
110716
110706
|
const qrImageId = uploadQrResult?.data?.image_id || existingQRImageId;
|
|
110717
|
-
let frontCardId;
|
|
110718
|
-
let backCardId;
|
|
110719
|
-
const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
|
|
110720
|
-
if (isCapturingFrontSide) {
|
|
110721
|
-
frontCardId = imageId;
|
|
110722
|
-
} else {
|
|
110723
|
-
frontCardId = existingFrontCardId;
|
|
110724
|
-
backCardId = imageId;
|
|
110725
|
-
}
|
|
110726
110707
|
const sanityResult = {
|
|
110727
110708
|
data: null
|
|
110728
110709
|
};
|
|
@@ -110748,9 +110729,7 @@
|
|
|
110748
110729
|
const result = await readIdCard({
|
|
110749
110730
|
cardType,
|
|
110750
110731
|
apiClient,
|
|
110751
|
-
|
|
110752
|
-
backCardId,
|
|
110753
|
-
isCapturingFrontSide,
|
|
110732
|
+
cardImageId: imageId,
|
|
110754
110733
|
qrImageId
|
|
110755
110734
|
});
|
|
110756
110735
|
if (result.errors) {
|
|
@@ -110768,6 +110747,20 @@
|
|
|
110768
110747
|
data: null
|
|
110769
110748
|
};
|
|
110770
110749
|
if (enabledServices?.enableDetectIDCardTampering) {
|
|
110750
|
+
// Detect ID Tampering requires front ID card image
|
|
110751
|
+
if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
|
|
110752
|
+
onError(Errors$3.missing_front_id_card);
|
|
110753
|
+
return;
|
|
110754
|
+
}
|
|
110755
|
+
let frontCardId;
|
|
110756
|
+
let backCardId;
|
|
110757
|
+
const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
|
|
110758
|
+
if (isCapturingFrontSide) {
|
|
110759
|
+
frontCardId = imageId;
|
|
110760
|
+
} else {
|
|
110761
|
+
frontCardId = existingFrontCardId;
|
|
110762
|
+
backCardId = imageId;
|
|
110763
|
+
}
|
|
110771
110764
|
const result = await detectIDTampering({
|
|
110772
110765
|
apiClient,
|
|
110773
110766
|
cardType,
|
|
@@ -113623,7 +113616,7 @@
|
|
|
113623
113616
|
};
|
|
113624
113617
|
};
|
|
113625
113618
|
|
|
113626
|
-
const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.
|
|
113619
|
+
const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.5/assets";
|
|
113627
113620
|
class TVWebSDK extends gU {
|
|
113628
113621
|
constructor(props){
|
|
113629
113622
|
super({
|