@polyguard/sdk 1.1.3 → 1.2.0
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/sdk.js +200 -199
- package/package.json +2 -2
- package/src/PolyguardWebsocketClientImpl.js +75 -36
- package/src/generated/src/ApiClient.js +0 -16
- package/src/index.js +1 -9
package/dist/sdk.js
CHANGED
|
@@ -5,13 +5,7 @@
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
15
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
10
|
};
|
|
17
11
|
var __export = (target, all) => {
|
|
@@ -37,9 +31,9 @@
|
|
|
37
31
|
|
|
38
32
|
// node_modules/component-emitter/index.js
|
|
39
33
|
var require_component_emitter = __commonJS({
|
|
40
|
-
"node_modules/component-emitter/index.js"(exports,
|
|
41
|
-
if (typeof
|
|
42
|
-
|
|
34
|
+
"node_modules/component-emitter/index.js"(exports, module) {
|
|
35
|
+
if (typeof module !== "undefined") {
|
|
36
|
+
module.exports = Emitter;
|
|
43
37
|
}
|
|
44
38
|
function Emitter(obj) {
|
|
45
39
|
if (obj) return mixin(obj);
|
|
@@ -115,8 +109,8 @@
|
|
|
115
109
|
|
|
116
110
|
// node_modules/fast-safe-stringify/index.js
|
|
117
111
|
var require_fast_safe_stringify = __commonJS({
|
|
118
|
-
"node_modules/fast-safe-stringify/index.js"(exports,
|
|
119
|
-
|
|
112
|
+
"node_modules/fast-safe-stringify/index.js"(exports, module) {
|
|
113
|
+
module.exports = stringify;
|
|
120
114
|
stringify.default = stringify;
|
|
121
115
|
stringify.stable = deterministicStringify;
|
|
122
116
|
stringify.stableStringify = deterministicStringify;
|
|
@@ -309,9 +303,9 @@
|
|
|
309
303
|
|
|
310
304
|
// node_modules/es-errors/type.js
|
|
311
305
|
var require_type = __commonJS({
|
|
312
|
-
"node_modules/es-errors/type.js"(exports,
|
|
306
|
+
"node_modules/es-errors/type.js"(exports, module) {
|
|
313
307
|
"use strict";
|
|
314
|
-
|
|
308
|
+
module.exports = TypeError;
|
|
315
309
|
}
|
|
316
310
|
});
|
|
317
311
|
|
|
@@ -323,7 +317,7 @@
|
|
|
323
317
|
|
|
324
318
|
// node_modules/object-inspect/index.js
|
|
325
319
|
var require_object_inspect = __commonJS({
|
|
326
|
-
"node_modules/object-inspect/index.js"(exports,
|
|
320
|
+
"node_modules/object-inspect/index.js"(exports, module) {
|
|
327
321
|
var hasMap = typeof Map === "function" && Map.prototype;
|
|
328
322
|
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
329
323
|
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
@@ -388,7 +382,7 @@
|
|
|
388
382
|
"double": /(["\\])/g,
|
|
389
383
|
single: /(['\\])/g
|
|
390
384
|
};
|
|
391
|
-
|
|
385
|
+
module.exports = function inspect_(obj, options, depth, seen) {
|
|
392
386
|
var opts = options || {};
|
|
393
387
|
if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
|
|
394
388
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -854,7 +848,7 @@
|
|
|
854
848
|
|
|
855
849
|
// node_modules/side-channel-list/index.js
|
|
856
850
|
var require_side_channel_list = __commonJS({
|
|
857
|
-
"node_modules/side-channel-list/index.js"(exports,
|
|
851
|
+
"node_modules/side-channel-list/index.js"(exports, module) {
|
|
858
852
|
"use strict";
|
|
859
853
|
var inspect = require_object_inspect();
|
|
860
854
|
var $TypeError = require_type();
|
|
@@ -905,7 +899,7 @@
|
|
|
905
899
|
return listGetNode(objects, key, true);
|
|
906
900
|
}
|
|
907
901
|
};
|
|
908
|
-
|
|
902
|
+
module.exports = function getSideChannelList() {
|
|
909
903
|
var $o;
|
|
910
904
|
var channel = {
|
|
911
905
|
assert: function(key) {
|
|
@@ -948,113 +942,113 @@
|
|
|
948
942
|
|
|
949
943
|
// node_modules/es-object-atoms/index.js
|
|
950
944
|
var require_es_object_atoms = __commonJS({
|
|
951
|
-
"node_modules/es-object-atoms/index.js"(exports,
|
|
945
|
+
"node_modules/es-object-atoms/index.js"(exports, module) {
|
|
952
946
|
"use strict";
|
|
953
|
-
|
|
947
|
+
module.exports = Object;
|
|
954
948
|
}
|
|
955
949
|
});
|
|
956
950
|
|
|
957
951
|
// node_modules/es-errors/index.js
|
|
958
952
|
var require_es_errors = __commonJS({
|
|
959
|
-
"node_modules/es-errors/index.js"(exports,
|
|
953
|
+
"node_modules/es-errors/index.js"(exports, module) {
|
|
960
954
|
"use strict";
|
|
961
|
-
|
|
955
|
+
module.exports = Error;
|
|
962
956
|
}
|
|
963
957
|
});
|
|
964
958
|
|
|
965
959
|
// node_modules/es-errors/eval.js
|
|
966
960
|
var require_eval = __commonJS({
|
|
967
|
-
"node_modules/es-errors/eval.js"(exports,
|
|
961
|
+
"node_modules/es-errors/eval.js"(exports, module) {
|
|
968
962
|
"use strict";
|
|
969
|
-
|
|
963
|
+
module.exports = EvalError;
|
|
970
964
|
}
|
|
971
965
|
});
|
|
972
966
|
|
|
973
967
|
// node_modules/es-errors/range.js
|
|
974
968
|
var require_range = __commonJS({
|
|
975
|
-
"node_modules/es-errors/range.js"(exports,
|
|
969
|
+
"node_modules/es-errors/range.js"(exports, module) {
|
|
976
970
|
"use strict";
|
|
977
|
-
|
|
971
|
+
module.exports = RangeError;
|
|
978
972
|
}
|
|
979
973
|
});
|
|
980
974
|
|
|
981
975
|
// node_modules/es-errors/ref.js
|
|
982
976
|
var require_ref = __commonJS({
|
|
983
|
-
"node_modules/es-errors/ref.js"(exports,
|
|
977
|
+
"node_modules/es-errors/ref.js"(exports, module) {
|
|
984
978
|
"use strict";
|
|
985
|
-
|
|
979
|
+
module.exports = ReferenceError;
|
|
986
980
|
}
|
|
987
981
|
});
|
|
988
982
|
|
|
989
983
|
// node_modules/es-errors/syntax.js
|
|
990
984
|
var require_syntax = __commonJS({
|
|
991
|
-
"node_modules/es-errors/syntax.js"(exports,
|
|
985
|
+
"node_modules/es-errors/syntax.js"(exports, module) {
|
|
992
986
|
"use strict";
|
|
993
|
-
|
|
987
|
+
module.exports = SyntaxError;
|
|
994
988
|
}
|
|
995
989
|
});
|
|
996
990
|
|
|
997
991
|
// node_modules/es-errors/uri.js
|
|
998
992
|
var require_uri = __commonJS({
|
|
999
|
-
"node_modules/es-errors/uri.js"(exports,
|
|
993
|
+
"node_modules/es-errors/uri.js"(exports, module) {
|
|
1000
994
|
"use strict";
|
|
1001
|
-
|
|
995
|
+
module.exports = URIError;
|
|
1002
996
|
}
|
|
1003
997
|
});
|
|
1004
998
|
|
|
1005
999
|
// node_modules/math-intrinsics/abs.js
|
|
1006
1000
|
var require_abs = __commonJS({
|
|
1007
|
-
"node_modules/math-intrinsics/abs.js"(exports,
|
|
1001
|
+
"node_modules/math-intrinsics/abs.js"(exports, module) {
|
|
1008
1002
|
"use strict";
|
|
1009
|
-
|
|
1003
|
+
module.exports = Math.abs;
|
|
1010
1004
|
}
|
|
1011
1005
|
});
|
|
1012
1006
|
|
|
1013
1007
|
// node_modules/math-intrinsics/floor.js
|
|
1014
1008
|
var require_floor = __commonJS({
|
|
1015
|
-
"node_modules/math-intrinsics/floor.js"(exports,
|
|
1009
|
+
"node_modules/math-intrinsics/floor.js"(exports, module) {
|
|
1016
1010
|
"use strict";
|
|
1017
|
-
|
|
1011
|
+
module.exports = Math.floor;
|
|
1018
1012
|
}
|
|
1019
1013
|
});
|
|
1020
1014
|
|
|
1021
1015
|
// node_modules/math-intrinsics/max.js
|
|
1022
1016
|
var require_max = __commonJS({
|
|
1023
|
-
"node_modules/math-intrinsics/max.js"(exports,
|
|
1017
|
+
"node_modules/math-intrinsics/max.js"(exports, module) {
|
|
1024
1018
|
"use strict";
|
|
1025
|
-
|
|
1019
|
+
module.exports = Math.max;
|
|
1026
1020
|
}
|
|
1027
1021
|
});
|
|
1028
1022
|
|
|
1029
1023
|
// node_modules/math-intrinsics/min.js
|
|
1030
1024
|
var require_min = __commonJS({
|
|
1031
|
-
"node_modules/math-intrinsics/min.js"(exports,
|
|
1025
|
+
"node_modules/math-intrinsics/min.js"(exports, module) {
|
|
1032
1026
|
"use strict";
|
|
1033
|
-
|
|
1027
|
+
module.exports = Math.min;
|
|
1034
1028
|
}
|
|
1035
1029
|
});
|
|
1036
1030
|
|
|
1037
1031
|
// node_modules/math-intrinsics/pow.js
|
|
1038
1032
|
var require_pow = __commonJS({
|
|
1039
|
-
"node_modules/math-intrinsics/pow.js"(exports,
|
|
1033
|
+
"node_modules/math-intrinsics/pow.js"(exports, module) {
|
|
1040
1034
|
"use strict";
|
|
1041
|
-
|
|
1035
|
+
module.exports = Math.pow;
|
|
1042
1036
|
}
|
|
1043
1037
|
});
|
|
1044
1038
|
|
|
1045
1039
|
// node_modules/math-intrinsics/round.js
|
|
1046
1040
|
var require_round = __commonJS({
|
|
1047
|
-
"node_modules/math-intrinsics/round.js"(exports,
|
|
1041
|
+
"node_modules/math-intrinsics/round.js"(exports, module) {
|
|
1048
1042
|
"use strict";
|
|
1049
|
-
|
|
1043
|
+
module.exports = Math.round;
|
|
1050
1044
|
}
|
|
1051
1045
|
});
|
|
1052
1046
|
|
|
1053
1047
|
// node_modules/math-intrinsics/isNaN.js
|
|
1054
1048
|
var require_isNaN = __commonJS({
|
|
1055
|
-
"node_modules/math-intrinsics/isNaN.js"(exports,
|
|
1049
|
+
"node_modules/math-intrinsics/isNaN.js"(exports, module) {
|
|
1056
1050
|
"use strict";
|
|
1057
|
-
|
|
1051
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
1058
1052
|
return a !== a;
|
|
1059
1053
|
};
|
|
1060
1054
|
}
|
|
@@ -1062,10 +1056,10 @@
|
|
|
1062
1056
|
|
|
1063
1057
|
// node_modules/math-intrinsics/sign.js
|
|
1064
1058
|
var require_sign = __commonJS({
|
|
1065
|
-
"node_modules/math-intrinsics/sign.js"(exports,
|
|
1059
|
+
"node_modules/math-intrinsics/sign.js"(exports, module) {
|
|
1066
1060
|
"use strict";
|
|
1067
1061
|
var $isNaN = require_isNaN();
|
|
1068
|
-
|
|
1062
|
+
module.exports = function sign(number) {
|
|
1069
1063
|
if ($isNaN(number) || number === 0) {
|
|
1070
1064
|
return number;
|
|
1071
1065
|
}
|
|
@@ -1076,15 +1070,15 @@
|
|
|
1076
1070
|
|
|
1077
1071
|
// node_modules/gopd/gOPD.js
|
|
1078
1072
|
var require_gOPD = __commonJS({
|
|
1079
|
-
"node_modules/gopd/gOPD.js"(exports,
|
|
1073
|
+
"node_modules/gopd/gOPD.js"(exports, module) {
|
|
1080
1074
|
"use strict";
|
|
1081
|
-
|
|
1075
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
1082
1076
|
}
|
|
1083
1077
|
});
|
|
1084
1078
|
|
|
1085
1079
|
// node_modules/gopd/index.js
|
|
1086
1080
|
var require_gopd = __commonJS({
|
|
1087
|
-
"node_modules/gopd/index.js"(exports,
|
|
1081
|
+
"node_modules/gopd/index.js"(exports, module) {
|
|
1088
1082
|
"use strict";
|
|
1089
1083
|
var $gOPD = require_gOPD();
|
|
1090
1084
|
if ($gOPD) {
|
|
@@ -1094,13 +1088,13 @@
|
|
|
1094
1088
|
$gOPD = null;
|
|
1095
1089
|
}
|
|
1096
1090
|
}
|
|
1097
|
-
|
|
1091
|
+
module.exports = $gOPD;
|
|
1098
1092
|
}
|
|
1099
1093
|
});
|
|
1100
1094
|
|
|
1101
1095
|
// node_modules/es-define-property/index.js
|
|
1102
1096
|
var require_es_define_property = __commonJS({
|
|
1103
|
-
"node_modules/es-define-property/index.js"(exports,
|
|
1097
|
+
"node_modules/es-define-property/index.js"(exports, module) {
|
|
1104
1098
|
"use strict";
|
|
1105
1099
|
var $defineProperty = Object.defineProperty || false;
|
|
1106
1100
|
if ($defineProperty) {
|
|
@@ -1110,15 +1104,15 @@
|
|
|
1110
1104
|
$defineProperty = false;
|
|
1111
1105
|
}
|
|
1112
1106
|
}
|
|
1113
|
-
|
|
1107
|
+
module.exports = $defineProperty;
|
|
1114
1108
|
}
|
|
1115
1109
|
});
|
|
1116
1110
|
|
|
1117
1111
|
// node_modules/has-symbols/shams.js
|
|
1118
1112
|
var require_shams = __commonJS({
|
|
1119
|
-
"node_modules/has-symbols/shams.js"(exports,
|
|
1113
|
+
"node_modules/has-symbols/shams.js"(exports, module) {
|
|
1120
1114
|
"use strict";
|
|
1121
|
-
|
|
1115
|
+
module.exports = function hasSymbols() {
|
|
1122
1116
|
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
1123
1117
|
return false;
|
|
1124
1118
|
}
|
|
@@ -1171,11 +1165,11 @@
|
|
|
1171
1165
|
|
|
1172
1166
|
// node_modules/has-symbols/index.js
|
|
1173
1167
|
var require_has_symbols = __commonJS({
|
|
1174
|
-
"node_modules/has-symbols/index.js"(exports,
|
|
1168
|
+
"node_modules/has-symbols/index.js"(exports, module) {
|
|
1175
1169
|
"use strict";
|
|
1176
1170
|
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
1177
1171
|
var hasSymbolSham = require_shams();
|
|
1178
|
-
|
|
1172
|
+
module.exports = function hasNativeSymbols() {
|
|
1179
1173
|
if (typeof origSymbol !== "function") {
|
|
1180
1174
|
return false;
|
|
1181
1175
|
}
|
|
@@ -1195,24 +1189,24 @@
|
|
|
1195
1189
|
|
|
1196
1190
|
// node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
1197
1191
|
var require_Reflect_getPrototypeOf = __commonJS({
|
|
1198
|
-
"node_modules/get-proto/Reflect.getPrototypeOf.js"(exports,
|
|
1192
|
+
"node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
|
|
1199
1193
|
"use strict";
|
|
1200
|
-
|
|
1194
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
1201
1195
|
}
|
|
1202
1196
|
});
|
|
1203
1197
|
|
|
1204
1198
|
// node_modules/get-proto/Object.getPrototypeOf.js
|
|
1205
1199
|
var require_Object_getPrototypeOf = __commonJS({
|
|
1206
|
-
"node_modules/get-proto/Object.getPrototypeOf.js"(exports,
|
|
1200
|
+
"node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
|
|
1207
1201
|
"use strict";
|
|
1208
1202
|
var $Object = require_es_object_atoms();
|
|
1209
|
-
|
|
1203
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
1210
1204
|
}
|
|
1211
1205
|
});
|
|
1212
1206
|
|
|
1213
1207
|
// node_modules/function-bind/implementation.js
|
|
1214
1208
|
var require_implementation = __commonJS({
|
|
1215
|
-
"node_modules/function-bind/implementation.js"(exports,
|
|
1209
|
+
"node_modules/function-bind/implementation.js"(exports, module) {
|
|
1216
1210
|
"use strict";
|
|
1217
1211
|
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1218
1212
|
var toStr = Object.prototype.toString;
|
|
@@ -1245,7 +1239,7 @@
|
|
|
1245
1239
|
}
|
|
1246
1240
|
return str;
|
|
1247
1241
|
};
|
|
1248
|
-
|
|
1242
|
+
module.exports = function bind(that) {
|
|
1249
1243
|
var target = this;
|
|
1250
1244
|
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
1251
1245
|
throw new TypeError(ERROR_MESSAGE + target);
|
|
@@ -1288,58 +1282,58 @@
|
|
|
1288
1282
|
|
|
1289
1283
|
// node_modules/function-bind/index.js
|
|
1290
1284
|
var require_function_bind = __commonJS({
|
|
1291
|
-
"node_modules/function-bind/index.js"(exports,
|
|
1285
|
+
"node_modules/function-bind/index.js"(exports, module) {
|
|
1292
1286
|
"use strict";
|
|
1293
1287
|
var implementation = require_implementation();
|
|
1294
|
-
|
|
1288
|
+
module.exports = Function.prototype.bind || implementation;
|
|
1295
1289
|
}
|
|
1296
1290
|
});
|
|
1297
1291
|
|
|
1298
1292
|
// node_modules/call-bind-apply-helpers/functionCall.js
|
|
1299
1293
|
var require_functionCall = __commonJS({
|
|
1300
|
-
"node_modules/call-bind-apply-helpers/functionCall.js"(exports,
|
|
1294
|
+
"node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
|
|
1301
1295
|
"use strict";
|
|
1302
|
-
|
|
1296
|
+
module.exports = Function.prototype.call;
|
|
1303
1297
|
}
|
|
1304
1298
|
});
|
|
1305
1299
|
|
|
1306
1300
|
// node_modules/call-bind-apply-helpers/functionApply.js
|
|
1307
1301
|
var require_functionApply = __commonJS({
|
|
1308
|
-
"node_modules/call-bind-apply-helpers/functionApply.js"(exports,
|
|
1302
|
+
"node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
|
|
1309
1303
|
"use strict";
|
|
1310
|
-
|
|
1304
|
+
module.exports = Function.prototype.apply;
|
|
1311
1305
|
}
|
|
1312
1306
|
});
|
|
1313
1307
|
|
|
1314
1308
|
// node_modules/call-bind-apply-helpers/reflectApply.js
|
|
1315
1309
|
var require_reflectApply = __commonJS({
|
|
1316
|
-
"node_modules/call-bind-apply-helpers/reflectApply.js"(exports,
|
|
1310
|
+
"node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
|
|
1317
1311
|
"use strict";
|
|
1318
|
-
|
|
1312
|
+
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1319
1313
|
}
|
|
1320
1314
|
});
|
|
1321
1315
|
|
|
1322
1316
|
// node_modules/call-bind-apply-helpers/actualApply.js
|
|
1323
1317
|
var require_actualApply = __commonJS({
|
|
1324
|
-
"node_modules/call-bind-apply-helpers/actualApply.js"(exports,
|
|
1318
|
+
"node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
|
|
1325
1319
|
"use strict";
|
|
1326
1320
|
var bind = require_function_bind();
|
|
1327
1321
|
var $apply = require_functionApply();
|
|
1328
1322
|
var $call = require_functionCall();
|
|
1329
1323
|
var $reflectApply = require_reflectApply();
|
|
1330
|
-
|
|
1324
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
|
1331
1325
|
}
|
|
1332
1326
|
});
|
|
1333
1327
|
|
|
1334
1328
|
// node_modules/call-bind-apply-helpers/index.js
|
|
1335
1329
|
var require_call_bind_apply_helpers = __commonJS({
|
|
1336
|
-
"node_modules/call-bind-apply-helpers/index.js"(exports,
|
|
1330
|
+
"node_modules/call-bind-apply-helpers/index.js"(exports, module) {
|
|
1337
1331
|
"use strict";
|
|
1338
1332
|
var bind = require_function_bind();
|
|
1339
1333
|
var $TypeError = require_type();
|
|
1340
1334
|
var $call = require_functionCall();
|
|
1341
1335
|
var $actualApply = require_actualApply();
|
|
1342
|
-
|
|
1336
|
+
module.exports = function callBindBasic(args) {
|
|
1343
1337
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
1344
1338
|
throw new $TypeError("a function is required");
|
|
1345
1339
|
}
|
|
@@ -1350,7 +1344,7 @@
|
|
|
1350
1344
|
|
|
1351
1345
|
// node_modules/dunder-proto/get.js
|
|
1352
1346
|
var require_get = __commonJS({
|
|
1353
|
-
"node_modules/dunder-proto/get.js"(exports,
|
|
1347
|
+
"node_modules/dunder-proto/get.js"(exports, module) {
|
|
1354
1348
|
"use strict";
|
|
1355
1349
|
var callBind = require_call_bind_apply_helpers();
|
|
1356
1350
|
var gOPD = require_gopd();
|
|
@@ -1370,7 +1364,7 @@
|
|
|
1370
1364
|
);
|
|
1371
1365
|
var $Object = Object;
|
|
1372
1366
|
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
1373
|
-
|
|
1367
|
+
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
1374
1368
|
/** @type {import('./get')} */
|
|
1375
1369
|
function getDunder(value) {
|
|
1376
1370
|
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
@@ -1381,12 +1375,12 @@
|
|
|
1381
1375
|
|
|
1382
1376
|
// node_modules/get-proto/index.js
|
|
1383
1377
|
var require_get_proto = __commonJS({
|
|
1384
|
-
"node_modules/get-proto/index.js"(exports,
|
|
1378
|
+
"node_modules/get-proto/index.js"(exports, module) {
|
|
1385
1379
|
"use strict";
|
|
1386
1380
|
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
1387
1381
|
var originalGetProto = require_Object_getPrototypeOf();
|
|
1388
1382
|
var getDunderProto = require_get();
|
|
1389
|
-
|
|
1383
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
1390
1384
|
return reflectGetProto(O);
|
|
1391
1385
|
} : originalGetProto ? function getProto(O) {
|
|
1392
1386
|
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
@@ -1401,18 +1395,18 @@
|
|
|
1401
1395
|
|
|
1402
1396
|
// node_modules/hasown/index.js
|
|
1403
1397
|
var require_hasown = __commonJS({
|
|
1404
|
-
"node_modules/hasown/index.js"(exports,
|
|
1398
|
+
"node_modules/hasown/index.js"(exports, module) {
|
|
1405
1399
|
"use strict";
|
|
1406
1400
|
var call = Function.prototype.call;
|
|
1407
1401
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
1408
1402
|
var bind = require_function_bind();
|
|
1409
|
-
|
|
1403
|
+
module.exports = bind.call(call, $hasOwn);
|
|
1410
1404
|
}
|
|
1411
1405
|
});
|
|
1412
1406
|
|
|
1413
1407
|
// node_modules/get-intrinsic/index.js
|
|
1414
1408
|
var require_get_intrinsic = __commonJS({
|
|
1415
|
-
"node_modules/get-intrinsic/index.js"(exports,
|
|
1409
|
+
"node_modules/get-intrinsic/index.js"(exports, module) {
|
|
1416
1410
|
"use strict";
|
|
1417
1411
|
var undefined2;
|
|
1418
1412
|
var $Object = require_es_object_atoms();
|
|
@@ -1677,7 +1671,7 @@
|
|
|
1677
1671
|
}
|
|
1678
1672
|
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1679
1673
|
};
|
|
1680
|
-
|
|
1674
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1681
1675
|
if (typeof name !== "string" || name.length === 0) {
|
|
1682
1676
|
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1683
1677
|
}
|
|
@@ -1717,7 +1711,7 @@
|
|
|
1717
1711
|
if (!allowMissing) {
|
|
1718
1712
|
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1719
1713
|
}
|
|
1720
|
-
return void
|
|
1714
|
+
return void undefined2;
|
|
1721
1715
|
}
|
|
1722
1716
|
if ($gOPD && i + 1 >= parts.length) {
|
|
1723
1717
|
var desc = $gOPD(value, part);
|
|
@@ -1743,12 +1737,12 @@
|
|
|
1743
1737
|
|
|
1744
1738
|
// node_modules/call-bound/index.js
|
|
1745
1739
|
var require_call_bound = __commonJS({
|
|
1746
|
-
"node_modules/call-bound/index.js"(exports,
|
|
1740
|
+
"node_modules/call-bound/index.js"(exports, module) {
|
|
1747
1741
|
"use strict";
|
|
1748
1742
|
var GetIntrinsic = require_get_intrinsic();
|
|
1749
1743
|
var callBindBasic = require_call_bind_apply_helpers();
|
|
1750
1744
|
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1751
|
-
|
|
1745
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1752
1746
|
var intrinsic = (
|
|
1753
1747
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1754
1748
|
GetIntrinsic(name, !!allowMissing)
|
|
@@ -1766,7 +1760,7 @@
|
|
|
1766
1760
|
|
|
1767
1761
|
// node_modules/side-channel-map/index.js
|
|
1768
1762
|
var require_side_channel_map = __commonJS({
|
|
1769
|
-
"node_modules/side-channel-map/index.js"(exports,
|
|
1763
|
+
"node_modules/side-channel-map/index.js"(exports, module) {
|
|
1770
1764
|
"use strict";
|
|
1771
1765
|
var GetIntrinsic = require_get_intrinsic();
|
|
1772
1766
|
var callBound = require_call_bound();
|
|
@@ -1778,7 +1772,7 @@
|
|
|
1778
1772
|
var $mapHas = callBound("Map.prototype.has", true);
|
|
1779
1773
|
var $mapDelete = callBound("Map.prototype.delete", true);
|
|
1780
1774
|
var $mapSize = callBound("Map.prototype.size", true);
|
|
1781
|
-
|
|
1775
|
+
module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
|
|
1782
1776
|
function getSideChannelMap() {
|
|
1783
1777
|
var $m;
|
|
1784
1778
|
var channel = {
|
|
@@ -1822,7 +1816,7 @@
|
|
|
1822
1816
|
|
|
1823
1817
|
// node_modules/side-channel-weakmap/index.js
|
|
1824
1818
|
var require_side_channel_weakmap = __commonJS({
|
|
1825
|
-
"node_modules/side-channel-weakmap/index.js"(exports,
|
|
1819
|
+
"node_modules/side-channel-weakmap/index.js"(exports, module) {
|
|
1826
1820
|
"use strict";
|
|
1827
1821
|
var GetIntrinsic = require_get_intrinsic();
|
|
1828
1822
|
var callBound = require_call_bound();
|
|
@@ -1834,7 +1828,7 @@
|
|
|
1834
1828
|
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
1835
1829
|
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
1836
1830
|
var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
|
|
1837
|
-
|
|
1831
|
+
module.exports = $WeakMap ? (
|
|
1838
1832
|
/** @type {Exclude<import('.'), false>} */
|
|
1839
1833
|
function getSideChannelWeakMap() {
|
|
1840
1834
|
var $wm;
|
|
@@ -1895,7 +1889,7 @@
|
|
|
1895
1889
|
|
|
1896
1890
|
// node_modules/side-channel/index.js
|
|
1897
1891
|
var require_side_channel = __commonJS({
|
|
1898
|
-
"node_modules/side-channel/index.js"(exports,
|
|
1892
|
+
"node_modules/side-channel/index.js"(exports, module) {
|
|
1899
1893
|
"use strict";
|
|
1900
1894
|
var $TypeError = require_type();
|
|
1901
1895
|
var inspect = require_object_inspect();
|
|
@@ -1903,7 +1897,7 @@
|
|
|
1903
1897
|
var getSideChannelMap = require_side_channel_map();
|
|
1904
1898
|
var getSideChannelWeakMap = require_side_channel_weakmap();
|
|
1905
1899
|
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
1906
|
-
|
|
1900
|
+
module.exports = function getSideChannel() {
|
|
1907
1901
|
var $channelData;
|
|
1908
1902
|
var channel = {
|
|
1909
1903
|
assert: function(key) {
|
|
@@ -1934,7 +1928,7 @@
|
|
|
1934
1928
|
|
|
1935
1929
|
// node_modules/qs/lib/formats.js
|
|
1936
1930
|
var require_formats = __commonJS({
|
|
1937
|
-
"node_modules/qs/lib/formats.js"(exports,
|
|
1931
|
+
"node_modules/qs/lib/formats.js"(exports, module) {
|
|
1938
1932
|
"use strict";
|
|
1939
1933
|
var replace = String.prototype.replace;
|
|
1940
1934
|
var percentTwenties = /%20/g;
|
|
@@ -1942,7 +1936,7 @@
|
|
|
1942
1936
|
RFC1738: "RFC1738",
|
|
1943
1937
|
RFC3986: "RFC3986"
|
|
1944
1938
|
};
|
|
1945
|
-
|
|
1939
|
+
module.exports = {
|
|
1946
1940
|
"default": Format.RFC3986,
|
|
1947
1941
|
formatters: {
|
|
1948
1942
|
RFC1738: function(value) {
|
|
@@ -1960,7 +1954,7 @@
|
|
|
1960
1954
|
|
|
1961
1955
|
// node_modules/qs/lib/utils.js
|
|
1962
1956
|
var require_utils = __commonJS({
|
|
1963
|
-
"node_modules/qs/lib/utils.js"(exports,
|
|
1957
|
+
"node_modules/qs/lib/utils.js"(exports, module) {
|
|
1964
1958
|
"use strict";
|
|
1965
1959
|
var formats = require_formats();
|
|
1966
1960
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -2148,7 +2142,7 @@
|
|
|
2148
2142
|
}
|
|
2149
2143
|
return fn(val);
|
|
2150
2144
|
};
|
|
2151
|
-
|
|
2145
|
+
module.exports = {
|
|
2152
2146
|
arrayToObject,
|
|
2153
2147
|
assign,
|
|
2154
2148
|
combine,
|
|
@@ -2165,7 +2159,7 @@
|
|
|
2165
2159
|
|
|
2166
2160
|
// node_modules/qs/lib/stringify.js
|
|
2167
2161
|
var require_stringify = __commonJS({
|
|
2168
|
-
"node_modules/qs/lib/stringify.js"(exports,
|
|
2162
|
+
"node_modules/qs/lib/stringify.js"(exports, module) {
|
|
2169
2163
|
"use strict";
|
|
2170
2164
|
var getSideChannel = require_side_channel();
|
|
2171
2165
|
var utils = require_utils();
|
|
@@ -2380,7 +2374,7 @@
|
|
|
2380
2374
|
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
|
|
2381
2375
|
};
|
|
2382
2376
|
};
|
|
2383
|
-
|
|
2377
|
+
module.exports = function(object, opts) {
|
|
2384
2378
|
var obj = object;
|
|
2385
2379
|
var options = normalizeStringifyOptions(opts);
|
|
2386
2380
|
var objKeys;
|
|
@@ -2448,7 +2442,7 @@
|
|
|
2448
2442
|
|
|
2449
2443
|
// node_modules/qs/lib/parse.js
|
|
2450
2444
|
var require_parse = __commonJS({
|
|
2451
|
-
"node_modules/qs/lib/parse.js"(exports,
|
|
2445
|
+
"node_modules/qs/lib/parse.js"(exports, module) {
|
|
2452
2446
|
"use strict";
|
|
2453
2447
|
var utils = require_utils();
|
|
2454
2448
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -2676,7 +2670,7 @@
|
|
|
2676
2670
|
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
|
|
2677
2671
|
};
|
|
2678
2672
|
};
|
|
2679
|
-
|
|
2673
|
+
module.exports = function(str, opts) {
|
|
2680
2674
|
var options = normalizeParseOptions(opts);
|
|
2681
2675
|
if (str === "" || str === null || typeof str === "undefined") {
|
|
2682
2676
|
return options.plainObjects ? { __proto__: null } : {};
|
|
@@ -2699,12 +2693,12 @@
|
|
|
2699
2693
|
|
|
2700
2694
|
// node_modules/qs/lib/index.js
|
|
2701
2695
|
var require_lib = __commonJS({
|
|
2702
|
-
"node_modules/qs/lib/index.js"(exports,
|
|
2696
|
+
"node_modules/qs/lib/index.js"(exports, module) {
|
|
2703
2697
|
"use strict";
|
|
2704
2698
|
var stringify = require_stringify();
|
|
2705
2699
|
var parse = require_parse();
|
|
2706
2700
|
var formats = require_formats();
|
|
2707
|
-
|
|
2701
|
+
module.exports = {
|
|
2708
2702
|
formats,
|
|
2709
2703
|
parse,
|
|
2710
2704
|
stringify
|
|
@@ -2839,13 +2833,13 @@
|
|
|
2839
2833
|
|
|
2840
2834
|
// node_modules/superagent/lib/request-base.js
|
|
2841
2835
|
var require_request_base = __commonJS({
|
|
2842
|
-
"node_modules/superagent/lib/request-base.js"(exports,
|
|
2836
|
+
"node_modules/superagent/lib/request-base.js"(exports, module) {
|
|
2843
2837
|
"use strict";
|
|
2844
2838
|
var semver = require_semver();
|
|
2845
2839
|
var _require = require_utils2();
|
|
2846
2840
|
var isObject = _require.isObject;
|
|
2847
2841
|
var hasOwn = _require.hasOwn;
|
|
2848
|
-
|
|
2842
|
+
module.exports = RequestBase;
|
|
2849
2843
|
function RequestBase() {
|
|
2850
2844
|
}
|
|
2851
2845
|
RequestBase.prototype.clearTimeout = function() {
|
|
@@ -3190,10 +3184,10 @@
|
|
|
3190
3184
|
|
|
3191
3185
|
// node_modules/superagent/lib/response-base.js
|
|
3192
3186
|
var require_response_base = __commonJS({
|
|
3193
|
-
"node_modules/superagent/lib/response-base.js"(exports,
|
|
3187
|
+
"node_modules/superagent/lib/response-base.js"(exports, module) {
|
|
3194
3188
|
"use strict";
|
|
3195
3189
|
var utils = require_utils2();
|
|
3196
|
-
|
|
3190
|
+
module.exports = ResponseBase;
|
|
3197
3191
|
function ResponseBase() {
|
|
3198
3192
|
}
|
|
3199
3193
|
ResponseBase.prototype.get = function(field) {
|
|
@@ -3240,7 +3234,7 @@
|
|
|
3240
3234
|
|
|
3241
3235
|
// node_modules/superagent/lib/agent-base.js
|
|
3242
3236
|
var require_agent_base = __commonJS({
|
|
3243
|
-
"node_modules/superagent/lib/agent-base.js"(exports,
|
|
3237
|
+
"node_modules/superagent/lib/agent-base.js"(exports, module) {
|
|
3244
3238
|
"use strict";
|
|
3245
3239
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
3246
3240
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
@@ -3321,13 +3315,13 @@
|
|
|
3321
3315
|
_iterator.f();
|
|
3322
3316
|
}
|
|
3323
3317
|
};
|
|
3324
|
-
|
|
3318
|
+
module.exports = Agent;
|
|
3325
3319
|
}
|
|
3326
3320
|
});
|
|
3327
3321
|
|
|
3328
3322
|
// node_modules/superagent/lib/client.js
|
|
3329
3323
|
var require_client = __commonJS({
|
|
3330
|
-
"node_modules/superagent/lib/client.js"(exports,
|
|
3324
|
+
"node_modules/superagent/lib/client.js"(exports, module) {
|
|
3331
3325
|
"use strict";
|
|
3332
3326
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
3333
3327
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
@@ -3398,7 +3392,7 @@
|
|
|
3398
3392
|
var Agent = require_agent_base();
|
|
3399
3393
|
function noop() {
|
|
3400
3394
|
}
|
|
3401
|
-
|
|
3395
|
+
module.exports = function(method, url) {
|
|
3402
3396
|
if (typeof url === "function") {
|
|
3403
3397
|
return new exports.Request("GET", method).end(url);
|
|
3404
3398
|
}
|
|
@@ -3407,7 +3401,7 @@
|
|
|
3407
3401
|
}
|
|
3408
3402
|
return new exports.Request(method, url);
|
|
3409
3403
|
};
|
|
3410
|
-
exports =
|
|
3404
|
+
exports = module.exports;
|
|
3411
3405
|
var request = exports;
|
|
3412
3406
|
exports.Request = Request;
|
|
3413
3407
|
request.getXHR = () => {
|
|
@@ -3861,16 +3855,10 @@
|
|
|
3861
3855
|
}
|
|
3862
3856
|
});
|
|
3863
3857
|
|
|
3864
|
-
// (disabled):fs
|
|
3865
|
-
var require_fs = __commonJS({
|
|
3866
|
-
"(disabled):fs"() {
|
|
3867
|
-
}
|
|
3868
|
-
});
|
|
3869
|
-
|
|
3870
3858
|
// node_modules/qrcode/lib/can-promise.js
|
|
3871
3859
|
var require_can_promise = __commonJS({
|
|
3872
|
-
"node_modules/qrcode/lib/can-promise.js"(exports,
|
|
3873
|
-
|
|
3860
|
+
"node_modules/qrcode/lib/can-promise.js"(exports, module) {
|
|
3861
|
+
module.exports = function() {
|
|
3874
3862
|
return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
|
|
3875
3863
|
};
|
|
3876
3864
|
}
|
|
@@ -4002,7 +3990,7 @@
|
|
|
4002
3990
|
|
|
4003
3991
|
// node_modules/qrcode/lib/core/bit-buffer.js
|
|
4004
3992
|
var require_bit_buffer = __commonJS({
|
|
4005
|
-
"node_modules/qrcode/lib/core/bit-buffer.js"(exports,
|
|
3993
|
+
"node_modules/qrcode/lib/core/bit-buffer.js"(exports, module) {
|
|
4006
3994
|
function BitBuffer() {
|
|
4007
3995
|
this.buffer = [];
|
|
4008
3996
|
this.length = 0;
|
|
@@ -4031,13 +4019,13 @@
|
|
|
4031
4019
|
this.length++;
|
|
4032
4020
|
}
|
|
4033
4021
|
};
|
|
4034
|
-
|
|
4022
|
+
module.exports = BitBuffer;
|
|
4035
4023
|
}
|
|
4036
4024
|
});
|
|
4037
4025
|
|
|
4038
4026
|
// node_modules/qrcode/lib/core/bit-matrix.js
|
|
4039
4027
|
var require_bit_matrix = __commonJS({
|
|
4040
|
-
"node_modules/qrcode/lib/core/bit-matrix.js"(exports,
|
|
4028
|
+
"node_modules/qrcode/lib/core/bit-matrix.js"(exports, module) {
|
|
4041
4029
|
function BitMatrix(size) {
|
|
4042
4030
|
if (!size || size < 1) {
|
|
4043
4031
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -4060,7 +4048,7 @@
|
|
|
4060
4048
|
BitMatrix.prototype.isReserved = function(row, col) {
|
|
4061
4049
|
return this.reservedBit[row * this.size + col];
|
|
4062
4050
|
};
|
|
4063
|
-
|
|
4051
|
+
module.exports = BitMatrix;
|
|
4064
4052
|
}
|
|
4065
4053
|
});
|
|
4066
4054
|
|
|
@@ -4154,20 +4142,20 @@
|
|
|
4154
4142
|
sameCountCol = sameCountRow = 0;
|
|
4155
4143
|
lastCol = lastRow = null;
|
|
4156
4144
|
for (let col = 0; col < size; col++) {
|
|
4157
|
-
let
|
|
4158
|
-
if (
|
|
4145
|
+
let module2 = data.get(row, col);
|
|
4146
|
+
if (module2 === lastCol) {
|
|
4159
4147
|
sameCountCol++;
|
|
4160
4148
|
} else {
|
|
4161
4149
|
if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
|
|
4162
|
-
lastCol =
|
|
4150
|
+
lastCol = module2;
|
|
4163
4151
|
sameCountCol = 1;
|
|
4164
4152
|
}
|
|
4165
|
-
|
|
4166
|
-
if (
|
|
4153
|
+
module2 = data.get(col, row);
|
|
4154
|
+
if (module2 === lastRow) {
|
|
4167
4155
|
sameCountRow++;
|
|
4168
4156
|
} else {
|
|
4169
4157
|
if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
|
|
4170
|
-
lastRow =
|
|
4158
|
+
lastRow = module2;
|
|
4171
4159
|
sameCountRow = 1;
|
|
4172
4160
|
}
|
|
4173
4161
|
}
|
|
@@ -4692,7 +4680,7 @@
|
|
|
4692
4680
|
|
|
4693
4681
|
// node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
4694
4682
|
var require_reed_solomon_encoder = __commonJS({
|
|
4695
|
-
"node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports,
|
|
4683
|
+
"node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module) {
|
|
4696
4684
|
var Polynomial = require_polynomial();
|
|
4697
4685
|
function ReedSolomonEncoder(degree) {
|
|
4698
4686
|
this.genPoly = void 0;
|
|
@@ -4718,7 +4706,7 @@
|
|
|
4718
4706
|
}
|
|
4719
4707
|
return remainder;
|
|
4720
4708
|
};
|
|
4721
|
-
|
|
4709
|
+
module.exports = ReedSolomonEncoder;
|
|
4722
4710
|
}
|
|
4723
4711
|
});
|
|
4724
4712
|
|
|
@@ -4955,7 +4943,7 @@
|
|
|
4955
4943
|
|
|
4956
4944
|
// node_modules/qrcode/lib/core/numeric-data.js
|
|
4957
4945
|
var require_numeric_data = __commonJS({
|
|
4958
|
-
"node_modules/qrcode/lib/core/numeric-data.js"(exports,
|
|
4946
|
+
"node_modules/qrcode/lib/core/numeric-data.js"(exports, module) {
|
|
4959
4947
|
var Mode = require_mode();
|
|
4960
4948
|
function NumericData(data) {
|
|
4961
4949
|
this.mode = Mode.NUMERIC;
|
|
@@ -4984,13 +4972,13 @@
|
|
|
4984
4972
|
bitBuffer.put(value, remainingNum * 3 + 1);
|
|
4985
4973
|
}
|
|
4986
4974
|
};
|
|
4987
|
-
|
|
4975
|
+
module.exports = NumericData;
|
|
4988
4976
|
}
|
|
4989
4977
|
});
|
|
4990
4978
|
|
|
4991
4979
|
// node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
4992
4980
|
var require_alphanumeric_data = __commonJS({
|
|
4993
|
-
"node_modules/qrcode/lib/core/alphanumeric-data.js"(exports,
|
|
4981
|
+
"node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module) {
|
|
4994
4982
|
var Mode = require_mode();
|
|
4995
4983
|
var ALPHA_NUM_CHARS = [
|
|
4996
4984
|
"0",
|
|
@@ -5063,13 +5051,13 @@
|
|
|
5063
5051
|
bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
|
|
5064
5052
|
}
|
|
5065
5053
|
};
|
|
5066
|
-
|
|
5054
|
+
module.exports = AlphanumericData;
|
|
5067
5055
|
}
|
|
5068
5056
|
});
|
|
5069
5057
|
|
|
5070
5058
|
// node_modules/qrcode/lib/core/byte-data.js
|
|
5071
5059
|
var require_byte_data = __commonJS({
|
|
5072
|
-
"node_modules/qrcode/lib/core/byte-data.js"(exports,
|
|
5060
|
+
"node_modules/qrcode/lib/core/byte-data.js"(exports, module) {
|
|
5073
5061
|
var Mode = require_mode();
|
|
5074
5062
|
function ByteData(data) {
|
|
5075
5063
|
this.mode = Mode.BYTE;
|
|
@@ -5093,13 +5081,13 @@
|
|
|
5093
5081
|
bitBuffer.put(this.data[i], 8);
|
|
5094
5082
|
}
|
|
5095
5083
|
};
|
|
5096
|
-
|
|
5084
|
+
module.exports = ByteData;
|
|
5097
5085
|
}
|
|
5098
5086
|
});
|
|
5099
5087
|
|
|
5100
5088
|
// node_modules/qrcode/lib/core/kanji-data.js
|
|
5101
5089
|
var require_kanji_data = __commonJS({
|
|
5102
|
-
"node_modules/qrcode/lib/core/kanji-data.js"(exports,
|
|
5090
|
+
"node_modules/qrcode/lib/core/kanji-data.js"(exports, module) {
|
|
5103
5091
|
var Mode = require_mode();
|
|
5104
5092
|
var Utils = require_utils3();
|
|
5105
5093
|
function KanjiData(data) {
|
|
@@ -5132,13 +5120,13 @@
|
|
|
5132
5120
|
bitBuffer.put(value, 13);
|
|
5133
5121
|
}
|
|
5134
5122
|
};
|
|
5135
|
-
|
|
5123
|
+
module.exports = KanjiData;
|
|
5136
5124
|
}
|
|
5137
5125
|
});
|
|
5138
5126
|
|
|
5139
5127
|
// node_modules/dijkstrajs/dijkstra.js
|
|
5140
5128
|
var require_dijkstra = __commonJS({
|
|
5141
|
-
"node_modules/dijkstrajs/dijkstra.js"(exports,
|
|
5129
|
+
"node_modules/dijkstrajs/dijkstra.js"(exports, module) {
|
|
5142
5130
|
"use strict";
|
|
5143
5131
|
var dijkstra = {
|
|
5144
5132
|
single_source_shortest_paths: function(graph, s, d) {
|
|
@@ -5231,8 +5219,8 @@
|
|
|
5231
5219
|
}
|
|
5232
5220
|
}
|
|
5233
5221
|
};
|
|
5234
|
-
if (typeof
|
|
5235
|
-
|
|
5222
|
+
if (typeof module !== "undefined") {
|
|
5223
|
+
module.exports = dijkstra;
|
|
5236
5224
|
}
|
|
5237
5225
|
}
|
|
5238
5226
|
});
|
|
@@ -6089,19 +6077,6 @@
|
|
|
6089
6077
|
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
|
6090
6078
|
*/
|
|
6091
6079
|
isFileParam(param) {
|
|
6092
|
-
if (typeof __require === "function") {
|
|
6093
|
-
let fs;
|
|
6094
|
-
try {
|
|
6095
|
-
fs = require_fs();
|
|
6096
|
-
} catch (err) {
|
|
6097
|
-
}
|
|
6098
|
-
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
|
|
6099
|
-
return true;
|
|
6100
|
-
}
|
|
6101
|
-
}
|
|
6102
|
-
if (typeof Buffer === "function" && param instanceof Buffer) {
|
|
6103
|
-
return true;
|
|
6104
|
-
}
|
|
6105
6080
|
if (typeof Blob === "function" && param instanceof Blob) {
|
|
6106
6081
|
return true;
|
|
6107
6082
|
}
|
|
@@ -10969,7 +10944,7 @@
|
|
|
10969
10944
|
var PolyguardWebsocketClientImpl = class {
|
|
10970
10945
|
constructor(params = {}) {
|
|
10971
10946
|
this.apiClient = new ApiClient_default();
|
|
10972
|
-
const { apiKey, baseUrl, appId, apiServer, requiredProofs = ["Full Name"], scanType = "single", redirectUrl, callbackUrl, cookieName } = params;
|
|
10947
|
+
const { apiKey, baseUrl, appId, apiServer, requiredProofs = ["Full Name"], scanType = "single", redirectUrl, callbackUrl, cookieName, link_uuid } = params;
|
|
10973
10948
|
if (baseUrl) {
|
|
10974
10949
|
this.apiClient.basePath = baseUrl;
|
|
10975
10950
|
}
|
|
@@ -10992,6 +10967,7 @@
|
|
|
10992
10967
|
this.redirectUrl = redirectUrl;
|
|
10993
10968
|
this.callbackUrl = callbackUrl;
|
|
10994
10969
|
this.cookieName = cookieName;
|
|
10970
|
+
this.link_uuid = link_uuid;
|
|
10995
10971
|
}
|
|
10996
10972
|
buildModal() {
|
|
10997
10973
|
const modal = document.createElement("div");
|
|
@@ -11024,33 +11000,60 @@
|
|
|
11024
11000
|
`;
|
|
11025
11001
|
return modal;
|
|
11026
11002
|
}
|
|
11027
|
-
async verify() {
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11003
|
+
async verify(target = null, rawJwt = false) {
|
|
11004
|
+
let modal = null;
|
|
11005
|
+
let qrDiv = null;
|
|
11006
|
+
let isTargetMode = false;
|
|
11007
|
+
if (target) {
|
|
11008
|
+
isTargetMode = true;
|
|
11009
|
+
qrDiv = document.getElementById(target);
|
|
11010
|
+
if (!qrDiv) {
|
|
11011
|
+
throw new Error(`Target element with ID '${target}' not found`);
|
|
11012
|
+
}
|
|
11013
|
+
} else {
|
|
11014
|
+
modal = this.buildModal();
|
|
11015
|
+
}
|
|
11016
|
+
if (!isTargetMode) {
|
|
11017
|
+
document.body.appendChild(modal);
|
|
11018
|
+
qrDiv = modal.querySelector("#polyguard-qr");
|
|
11019
|
+
}
|
|
11031
11020
|
if (qrDiv) {
|
|
11032
11021
|
qrDiv.innerHTML = LOADING_SPINNER;
|
|
11033
11022
|
}
|
|
11034
11023
|
function cleanup() {
|
|
11035
|
-
if (
|
|
11024
|
+
if (isTargetMode) {
|
|
11025
|
+
if (qrDiv) {
|
|
11026
|
+
qrDiv.innerHTML = "";
|
|
11027
|
+
}
|
|
11028
|
+
} else if (modal && modal.parentNode) {
|
|
11029
|
+
modal.parentNode.removeChild(modal);
|
|
11030
|
+
}
|
|
11036
11031
|
}
|
|
11037
11032
|
return new Promise(async (resolve, reject) => {
|
|
11038
11033
|
let ws = null;
|
|
11039
11034
|
let closed = false;
|
|
11040
11035
|
function returnError(msg, score = "OFFLINE") {
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
errDiv.textContent = msg;
|
|
11044
|
-
errDiv.style.display = "block";
|
|
11045
|
-
}
|
|
11046
|
-
setTimeout(() => {
|
|
11036
|
+
if (isTargetMode) {
|
|
11037
|
+
console.error("Polyguard Error:", msg);
|
|
11047
11038
|
cleanup();
|
|
11048
11039
|
resolve({ presence: { score, msg } });
|
|
11049
|
-
}
|
|
11040
|
+
} else {
|
|
11041
|
+
const errDiv = modal.querySelector("#polyguard-error");
|
|
11042
|
+
if (errDiv) {
|
|
11043
|
+
errDiv.textContent = msg;
|
|
11044
|
+
errDiv.style.display = "block";
|
|
11045
|
+
}
|
|
11046
|
+
setTimeout(() => {
|
|
11047
|
+
cleanup();
|
|
11048
|
+
resolve({ presence: { score, msg } });
|
|
11049
|
+
}, 1250);
|
|
11050
|
+
}
|
|
11050
11051
|
}
|
|
11051
11052
|
function clearError() {
|
|
11052
|
-
|
|
11053
|
-
|
|
11053
|
+
if (!isTargetMode) {
|
|
11054
|
+
const errDiv = modal.querySelector("#polyguard-error");
|
|
11055
|
+
if (errDiv) errDiv.style.display = "none";
|
|
11056
|
+
}
|
|
11054
11057
|
}
|
|
11055
11058
|
function handleClose() {
|
|
11056
11059
|
closed = true;
|
|
@@ -11058,12 +11061,15 @@
|
|
|
11058
11061
|
cleanup();
|
|
11059
11062
|
reject(new Error("User cancelled"));
|
|
11060
11063
|
}
|
|
11061
|
-
|
|
11062
|
-
|
|
11064
|
+
if (!isTargetMode) {
|
|
11065
|
+
modal.querySelector("#polyguard-modal-close").onclick = handleClose;
|
|
11066
|
+
modal.querySelector("#polyguard-modal-cancel").onclick = handleClose;
|
|
11067
|
+
}
|
|
11063
11068
|
try {
|
|
11064
11069
|
clearError();
|
|
11065
11070
|
const wsProtocol = window.location.protocol === "https:" ? "wss" : "ws";
|
|
11066
|
-
const
|
|
11071
|
+
const ticketUrl = this.link_uuid ? `https://${this.apiServer}/v2/ticket/${this.appId}/${this.link_uuid}` : `https://${this.apiServer}/v2/ticket/${this.appId}`;
|
|
11072
|
+
const ticketRes = await fetch(ticketUrl, {
|
|
11067
11073
|
method: "POST",
|
|
11068
11074
|
headers: { "Content-Type": "application/json" },
|
|
11069
11075
|
body: JSON.stringify({ requiredProofs: this.requiredProofs, scanType: this.scanType })
|
|
@@ -11103,26 +11109,27 @@
|
|
|
11103
11109
|
if (pcre) {
|
|
11104
11110
|
ws.send(JSON.stringify({ type: "pong", seq: pcre[1] }));
|
|
11105
11111
|
}
|
|
11106
|
-
|
|
11107
|
-
if (!qrDiv2) return;
|
|
11112
|
+
if (!qrDiv) return;
|
|
11108
11113
|
const isMobile = /Mobi|Android/i.test(navigator.userAgent);
|
|
11109
11114
|
if (isMobile) {
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
instructionText
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
instructionList.children[1]
|
|
11115
|
+
qrDiv.innerHTML = `<button id="polyguard-open-app-button" style="background: #7be7c2; color: #222; font-weight: 600; border-radius: 8px; border: none; padding: 10px 32px; font-size: 16px; cursor: pointer;">Open Polyguard App</button>`;
|
|
11116
|
+
qrDiv.style.background = "transparent";
|
|
11117
|
+
qrDiv.querySelector("#polyguard-open-app-button").onclick = () => window.location.assign(data.qr_url);
|
|
11118
|
+
if (!isTargetMode) {
|
|
11119
|
+
const instructionText = qrDiv.nextElementSibling;
|
|
11120
|
+
if (instructionText) {
|
|
11121
|
+
instructionText.textContent = "Tap the button to verify with the Polyguard app.";
|
|
11122
|
+
}
|
|
11123
|
+
const instructionList = instructionText.nextElementSibling;
|
|
11124
|
+
if (instructionList && instructionList.children[1]) {
|
|
11125
|
+
instructionList.children[1].textContent = "If you do not have the Polyguard app, you will be redirected to download it.";
|
|
11126
|
+
}
|
|
11120
11127
|
}
|
|
11121
11128
|
} else {
|
|
11122
11129
|
const startTime = Date.now();
|
|
11123
11130
|
console.log("time before qr code", startTime);
|
|
11124
11131
|
import_qrcode.default.toString(data.qr_url, { type: "svg" }, (err, svg) => {
|
|
11125
|
-
if (!err)
|
|
11132
|
+
if (!err) qrDiv.innerHTML = svg;
|
|
11126
11133
|
});
|
|
11127
11134
|
console.log("time to generate qr code", Date.now() - startTime);
|
|
11128
11135
|
}
|
|
@@ -11130,12 +11137,11 @@
|
|
|
11130
11137
|
} else if (data && data.jwt) {
|
|
11131
11138
|
cleanup();
|
|
11132
11139
|
ws.close();
|
|
11133
|
-
resolve(data.jwt);
|
|
11140
|
+
resolve(rawJwt ? data : data.jwt);
|
|
11134
11141
|
return;
|
|
11135
11142
|
} else if (data && data.status) {
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
qrDiv2.innerHTML = LOADING_SPINNER;
|
|
11143
|
+
if (!qrDiv) return;
|
|
11144
|
+
qrDiv.innerHTML = LOADING_SPINNER;
|
|
11139
11145
|
return;
|
|
11140
11146
|
} else if (data && data.error) {
|
|
11141
11147
|
returnError(data.error);
|
|
@@ -11167,11 +11173,12 @@
|
|
|
11167
11173
|
/**
|
|
11168
11174
|
* Wrapper around verify that checks received proof values against expected values.
|
|
11169
11175
|
* @param {Object} expectedProofs - An object mapping proof names to expected values.
|
|
11176
|
+
* @param {string} target - Optional ID of target element to render QR code in.
|
|
11170
11177
|
* @returns {Promise<boolean>} - Resolves to true if all expected proofs match, false otherwise or if cancelled.
|
|
11171
11178
|
*/
|
|
11172
|
-
async require(expectedProofs = {}) {
|
|
11179
|
+
async require(expectedProofs = {}, target = null) {
|
|
11173
11180
|
try {
|
|
11174
|
-
const jwt = await this.verify();
|
|
11181
|
+
const jwt = await this.verify(target);
|
|
11175
11182
|
if (!jwt) return false;
|
|
11176
11183
|
const payload = JSON.parse(atob(jwt.split(".")[1]));
|
|
11177
11184
|
console.dir(payload);
|
|
@@ -11215,12 +11222,6 @@
|
|
|
11215
11222
|
window.Polyguard.Client = PolyguardClient;
|
|
11216
11223
|
Object.assign(window.Polyguard, src_exports);
|
|
11217
11224
|
}
|
|
11218
|
-
if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
|
|
11219
|
-
module.exports = {
|
|
11220
|
-
PolyguardClient,
|
|
11221
|
-
...src_exports
|
|
11222
|
-
};
|
|
11223
|
-
}
|
|
11224
11225
|
})();
|
|
11225
11226
|
/*! Bundled license information:
|
|
11226
11227
|
|