@kong-ui-public/entities-certificates 1.1.6 → 1.1.8
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as te, defineComponent as Be, inject as ul, computed as L, resolveComponent as ee, openBlock as _, createElementBlock as K, createElementVNode as oe, normalizeClass as Qt, toDisplayString as M, createCommentVNode as Ie, createBlock as
|
|
1
|
+
import { ref as te, defineComponent as Be, inject as ul, computed as L, resolveComponent as ee, openBlock as _, createElementBlock as K, createElementVNode as oe, normalizeClass as Qt, toDisplayString as M, createCommentVNode as Ie, createBlock as fe, resolveDynamicComponent as cn, mergeProps as Po, withCtx as x, createVNode as $, withModifiers as hr, unref as k, onBeforeMount as ai, renderSlot as Ce, useCssVars as _f, useSlots as $o, createSlots as yr, createTextVNode as ue, normalizeProps as Nf, guardReactiveProps as Of, Fragment as Fe, renderList as Ue, watch as Or, withDirectives as Bi, vShow as Ii, onMounted as Tf, onUnmounted as jf, reactive as Oi } from "vue";
|
|
2
2
|
import { useRouter as ci } from "vue-router";
|
|
3
|
-
import { createI18n as ln, i18nTComponent as
|
|
4
|
-
import
|
|
5
|
-
import { MethodsArray as
|
|
3
|
+
import { createI18n as ln, i18nTComponent as fl } from "@kong-ui-public/i18n";
|
|
4
|
+
import Pf from "axios";
|
|
5
|
+
import { MethodsArray as $f } from "@kong/kongponents";
|
|
6
6
|
var gs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (C) Microsoft. All rights reserved.
|
|
@@ -29,7 +29,7 @@ var _a;
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
})(function(e) {
|
|
32
|
-
var t = Object.prototype.hasOwnProperty, i = typeof Symbol == "function", n = i && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", s = i && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", a = typeof Object.create == "function", u = { __proto__: [] } instanceof Array, c = !a && !u,
|
|
32
|
+
var t = Object.prototype.hasOwnProperty, i = typeof Symbol == "function", n = i && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", s = i && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", a = typeof Object.create == "function", u = { __proto__: [] } instanceof Array, c = !a && !u, f = {
|
|
33
33
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
34
34
|
create: a ? function() {
|
|
35
35
|
return ns(/* @__PURE__ */ Object.create(null));
|
|
@@ -48,7 +48,7 @@ var _a;
|
|
|
48
48
|
} : function(S, C) {
|
|
49
49
|
return S[C];
|
|
50
50
|
}
|
|
51
|
-
}, p = Object.getPrototypeOf(Function), b = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", P = !b && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map :
|
|
51
|
+
}, p = Object.getPrototypeOf(Function), b = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", P = !b && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Bf(), A = !b && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : If(), d = !b && typeof WeakMap == "function" ? WeakMap : Ef(), g = new d();
|
|
52
52
|
function h(S, C, O, V) {
|
|
53
53
|
if (W(O)) {
|
|
54
54
|
if (!Z(S))
|
|
@@ -71,7 +71,7 @@ var _a;
|
|
|
71
71
|
function O(V, Y) {
|
|
72
72
|
if (!ie(V))
|
|
73
73
|
throw new TypeError();
|
|
74
|
-
if (!W(Y) && !
|
|
74
|
+
if (!W(Y) && !Sf(Y))
|
|
75
75
|
throw new TypeError();
|
|
76
76
|
bt(S, C, V, Y);
|
|
77
77
|
}
|
|
@@ -189,7 +189,7 @@ var _a;
|
|
|
189
189
|
/*Create*/
|
|
190
190
|
!1
|
|
191
191
|
);
|
|
192
|
-
return W(V) ? !1 :
|
|
192
|
+
return W(V) ? !1 : fr(V.has(S));
|
|
193
193
|
}
|
|
194
194
|
function Le(S, C, O) {
|
|
195
195
|
var V = ke(S, C, O);
|
|
@@ -246,16 +246,16 @@ var _a;
|
|
|
246
246
|
);
|
|
247
247
|
if (W(V))
|
|
248
248
|
return O;
|
|
249
|
-
for (var Y = V.keys(), Oe =
|
|
250
|
-
var le =
|
|
249
|
+
for (var Y = V.keys(), Oe = kf(Y), ae = 0; ; ) {
|
|
250
|
+
var le = xf(Oe);
|
|
251
251
|
if (!le)
|
|
252
252
|
return O.length = ae, O;
|
|
253
|
-
var X =
|
|
253
|
+
var X = Af(le);
|
|
254
254
|
try {
|
|
255
255
|
O[ae] = X;
|
|
256
256
|
} catch (pe) {
|
|
257
257
|
try {
|
|
258
|
-
|
|
258
|
+
Cf(Oe);
|
|
259
259
|
} finally {
|
|
260
260
|
throw pe;
|
|
261
261
|
}
|
|
@@ -349,7 +349,7 @@ var _a;
|
|
|
349
349
|
}
|
|
350
350
|
throw new TypeError();
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function fr(S) {
|
|
353
353
|
return !!S;
|
|
354
354
|
}
|
|
355
355
|
function ne(S) {
|
|
@@ -372,7 +372,7 @@ var _a;
|
|
|
372
372
|
function Kt(S) {
|
|
373
373
|
return typeof S == "function";
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Sf(S) {
|
|
376
376
|
switch (Ht(S)) {
|
|
377
377
|
case 3:
|
|
378
378
|
return !0;
|
|
@@ -390,7 +390,7 @@ var _a;
|
|
|
390
390
|
return O;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function kf(S) {
|
|
394
394
|
var C = Ia(S, s);
|
|
395
395
|
if (!Se(C))
|
|
396
396
|
throw new TypeError();
|
|
@@ -399,14 +399,14 @@ var _a;
|
|
|
399
399
|
throw new TypeError();
|
|
400
400
|
return O;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function Af(S) {
|
|
403
403
|
return S.value;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function xf(S) {
|
|
406
406
|
var C = S.next();
|
|
407
407
|
return C.done ? !1 : C;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Cf(S) {
|
|
410
410
|
var C = S.return;
|
|
411
411
|
C && C.call(S);
|
|
412
412
|
}
|
|
@@ -420,7 +420,7 @@ var _a;
|
|
|
420
420
|
var Y = V.constructor;
|
|
421
421
|
return typeof Y != "function" || Y === S ? C : Y;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Bf() {
|
|
424
424
|
var S = {}, C = [], O = (
|
|
425
425
|
/** @class */
|
|
426
426
|
function() {
|
|
@@ -516,7 +516,7 @@ var _a;
|
|
|
516
516
|
return [ae, le];
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function If() {
|
|
520
520
|
return (
|
|
521
521
|
/** @class */
|
|
522
522
|
function() {
|
|
@@ -551,8 +551,8 @@ var _a;
|
|
|
551
551
|
}()
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
var S = 16, C =
|
|
554
|
+
function Ef() {
|
|
555
|
+
var S = 16, C = f.create(), O = V();
|
|
556
556
|
return (
|
|
557
557
|
/** @class */
|
|
558
558
|
function() {
|
|
@@ -565,14 +565,14 @@ var _a;
|
|
|
565
565
|
/*create*/
|
|
566
566
|
!1
|
|
567
567
|
);
|
|
568
|
-
return he !== void 0 ?
|
|
568
|
+
return he !== void 0 ? f.has(he, this._key) : !1;
|
|
569
569
|
}, X.prototype.get = function(pe) {
|
|
570
570
|
var he = Y(
|
|
571
571
|
pe,
|
|
572
572
|
/*create*/
|
|
573
573
|
!1
|
|
574
574
|
);
|
|
575
|
-
return he !== void 0 ?
|
|
575
|
+
return he !== void 0 ? f.get(he, this._key) : void 0;
|
|
576
576
|
}, X.prototype.set = function(pe, he) {
|
|
577
577
|
var Pt = Y(
|
|
578
578
|
pe,
|
|
@@ -596,14 +596,14 @@ var _a;
|
|
|
596
596
|
var X;
|
|
597
597
|
do
|
|
598
598
|
X = "@@WeakMap@@" + le();
|
|
599
|
-
while (
|
|
599
|
+
while (f.has(C, X));
|
|
600
600
|
return C[X] = !0, X;
|
|
601
601
|
}
|
|
602
602
|
function Y(X, pe) {
|
|
603
603
|
if (!t.call(X, O)) {
|
|
604
604
|
if (!pe)
|
|
605
605
|
return;
|
|
606
|
-
Object.defineProperty(X, O, { value:
|
|
606
|
+
Object.defineProperty(X, O, { value: f.create() });
|
|
607
607
|
}
|
|
608
608
|
return X[O];
|
|
609
609
|
}
|
|
@@ -654,10 +654,10 @@ var _a;
|
|
|
654
654
|
* SOFTWARE.
|
|
655
655
|
*
|
|
656
656
|
*/
|
|
657
|
-
const
|
|
657
|
+
const Rf = "[object ArrayBuffer]";
|
|
658
658
|
class U {
|
|
659
659
|
static isArrayBuffer(e) {
|
|
660
|
-
return Object.prototype.toString.call(e) ===
|
|
660
|
+
return Object.prototype.toString.call(e) === Rf;
|
|
661
661
|
}
|
|
662
662
|
static toArrayBuffer(e) {
|
|
663
663
|
return this.isArrayBuffer(e) ? e : e.byteLength === e.buffer.byteLength || e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : this.toUint8Array(e).slice().buffer;
|
|
@@ -704,7 +704,7 @@ class U {
|
|
|
704
704
|
return e[e.length - 1] instanceof Function ? this.toView(n, e[e.length - 1]) : n.buffer;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
const ss = "string",
|
|
707
|
+
const ss = "string", Vf = /^[0-9a-f]+$/i, Uf = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, Mf = /^[a-zA-Z0-9-_]+$/;
|
|
708
708
|
class Na {
|
|
709
709
|
static fromString(e) {
|
|
710
710
|
const t = unescape(encodeURIComponent(e)), i = new Uint8Array(t.length);
|
|
@@ -739,13 +739,13 @@ class ut {
|
|
|
739
739
|
}
|
|
740
740
|
class H {
|
|
741
741
|
static isHex(e) {
|
|
742
|
-
return typeof e === ss &&
|
|
742
|
+
return typeof e === ss && Vf.test(e);
|
|
743
743
|
}
|
|
744
744
|
static isBase64(e) {
|
|
745
|
-
return typeof e === ss &&
|
|
745
|
+
return typeof e === ss && Uf.test(e);
|
|
746
746
|
}
|
|
747
747
|
static isBase64Url(e) {
|
|
748
|
-
return typeof e === ss &&
|
|
748
|
+
return typeof e === ss && Mf.test(e);
|
|
749
749
|
}
|
|
750
750
|
static ToString(e, t = "utf8") {
|
|
751
751
|
const i = U.toUint8Array(e);
|
|
@@ -906,7 +906,7 @@ class H {
|
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
H.DEFAULT_UTF8_ENCODING = "utf8";
|
|
909
|
-
function
|
|
909
|
+
function Df(...r) {
|
|
910
910
|
const e = r.map((n) => n.byteLength).reduce((n, s) => n + s), t = new Uint8Array(e);
|
|
911
911
|
let i = 0;
|
|
912
912
|
return r.map((n) => new Uint8Array(n)).forEach((n) => {
|
|
@@ -914,7 +914,7 @@ function Md(...r) {
|
|
|
914
914
|
t[i++] = s;
|
|
915
915
|
}), t.buffer;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function dl(r, e) {
|
|
918
918
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
919
919
|
return !1;
|
|
920
920
|
const t = new Uint8Array(r), i = new Uint8Array(e);
|
|
@@ -947,10 +947,10 @@ function Xt(r, e, t = -1) {
|
|
|
947
947
|
return new ArrayBuffer(0);
|
|
948
948
|
c = new ArrayBuffer(i), s = i;
|
|
949
949
|
}
|
|
950
|
-
const
|
|
950
|
+
const f = new Uint8Array(c);
|
|
951
951
|
for (let p = u - 1; p >= 0; p--) {
|
|
952
952
|
const b = Math.pow(2, p * e);
|
|
953
|
-
|
|
953
|
+
f[s - p - 1] = Math.floor(n / b), n -= f[s - p - 1] * b;
|
|
954
954
|
}
|
|
955
955
|
return c;
|
|
956
956
|
}
|
|
@@ -982,7 +982,7 @@ function pl() {
|
|
|
982
982
|
s[u] = r[u];
|
|
983
983
|
return s[0] &= 127, gr(s, 8) - i;
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function Lf(r) {
|
|
986
986
|
const e = r < 0 ? r * -1 : r;
|
|
987
987
|
let t = 128;
|
|
988
988
|
for (let i = 1; i < 8; i++) {
|
|
@@ -1005,7 +1005,7 @@ function Dd(r) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
return new ArrayBuffer(0);
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function Hf(r, e) {
|
|
1009
1009
|
if (r.byteLength !== e.byteLength)
|
|
1010
1010
|
return !1;
|
|
1011
1011
|
const t = new Uint8Array(r), i = new Uint8Array(e);
|
|
@@ -1087,7 +1087,7 @@ class un {
|
|
|
1087
1087
|
return Ro(this.items);
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
|
-
const Hr = [new Uint8Array([1])], Oa = "0123456789", os = "name", Ta = "valueHexView",
|
|
1090
|
+
const Hr = [new Uint8Array([1])], Oa = "0123456789", os = "name", Ta = "valueHexView", Kf = "isHexOnly", Ff = "idBlock", qf = "tagClass", zf = "tagNumber", Gf = "isConstructed", Wf = "fromBER", Jf = "toBER", Yf = "local", Ke = "", ct = new ArrayBuffer(0), fn = new Uint8Array(0), Wr = "EndOfContent", hl = "OCTET STRING", yl = "BIT STRING";
|
|
1091
1091
|
function ht(r) {
|
|
1092
1092
|
var e;
|
|
1093
1093
|
return e = class extends r {
|
|
@@ -1095,7 +1095,7 @@ function ht(r) {
|
|
|
1095
1095
|
var n;
|
|
1096
1096
|
super(...i);
|
|
1097
1097
|
const s = i[0] || {};
|
|
1098
|
-
this.isHexOnly = (n = s.isHexOnly) !== null && n !== void 0 ? n : !1, this.valueHexView = s.valueHex ? U.toUint8Array(s.valueHex) :
|
|
1098
|
+
this.isHexOnly = (n = s.isHexOnly) !== null && n !== void 0 ? n : !1, this.valueHexView = s.valueHex ? U.toUint8Array(s.valueHex) : fn;
|
|
1099
1099
|
}
|
|
1100
1100
|
get valueHex() {
|
|
1101
1101
|
return this.valueHexView.slice().buffer;
|
|
@@ -1123,7 +1123,7 @@ function ht(r) {
|
|
|
1123
1123
|
}, e.NAME = "hexBlock", e;
|
|
1124
1124
|
}
|
|
1125
1125
|
class or {
|
|
1126
|
-
constructor({ blockLength: e = 0, error: t = Ke, warnings: i = [], valueBeforeDecode: n =
|
|
1126
|
+
constructor({ blockLength: e = 0, error: t = Ke, warnings: i = [], valueBeforeDecode: n = fn } = {}) {
|
|
1127
1127
|
this.blockLength = e, this.error = t, this.warnings = i, this.valueBeforeDecodeView = U.toUint8Array(n);
|
|
1128
1128
|
}
|
|
1129
1129
|
static blockName() {
|
|
@@ -1158,7 +1158,7 @@ De.NAME = "valueBlock";
|
|
|
1158
1158
|
class gl extends ht(or) {
|
|
1159
1159
|
constructor({ idBlock: e = {} } = {}) {
|
|
1160
1160
|
var t, i, n, s;
|
|
1161
|
-
super(), e ? (this.isHexOnly = (t = e.isHexOnly) !== null && t !== void 0 ? t : !1, this.valueHexView = e.valueHex ? U.toUint8Array(e.valueHex) :
|
|
1161
|
+
super(), e ? (this.isHexOnly = (t = e.isHexOnly) !== null && t !== void 0 ? t : !1, this.valueHexView = e.valueHex ? U.toUint8Array(e.valueHex) : fn, this.tagClass = (i = e.tagClass) !== null && i !== void 0 ? i : -1, this.tagNumber = (n = e.tagNumber) !== null && n !== void 0 ? n : -1, this.isConstructed = (s = e.isConstructed) !== null && s !== void 0 ? s : !1) : (this.tagClass = -1, this.tagNumber = -1, this.isConstructed = !1);
|
|
1162
1162
|
}
|
|
1163
1163
|
toBER(e = !1) {
|
|
1164
1164
|
let t = 0;
|
|
@@ -1232,23 +1232,23 @@ class gl extends ht(or) {
|
|
|
1232
1232
|
if (u !== 31)
|
|
1233
1233
|
this.tagNumber = u, this.blockLength = 1;
|
|
1234
1234
|
else {
|
|
1235
|
-
let c = 1,
|
|
1235
|
+
let c = 1, f = this.valueHexView = new Uint8Array(255), p = 255;
|
|
1236
1236
|
for (; s[c] & 128; ) {
|
|
1237
|
-
if (
|
|
1237
|
+
if (f[c - 1] = s[c] & 127, c++, c >= s.length)
|
|
1238
1238
|
return this.error = "End of input reached before message was fully decoded", -1;
|
|
1239
1239
|
if (c === p) {
|
|
1240
1240
|
p += 255;
|
|
1241
1241
|
const P = new Uint8Array(p);
|
|
1242
|
-
for (let A = 0; A <
|
|
1243
|
-
P[A] =
|
|
1244
|
-
|
|
1242
|
+
for (let A = 0; A < f.length; A++)
|
|
1243
|
+
P[A] = f[A];
|
|
1244
|
+
f = this.valueHexView = new Uint8Array(p);
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
|
-
this.blockLength = c + 1,
|
|
1247
|
+
this.blockLength = c + 1, f[c - 1] = s[c] & 127;
|
|
1248
1248
|
const b = new Uint8Array(c);
|
|
1249
1249
|
for (let P = 0; P < c; P++)
|
|
1250
|
-
b[P] =
|
|
1251
|
-
|
|
1250
|
+
b[P] = f[P];
|
|
1251
|
+
f = this.valueHexView = new Uint8Array(c), f.set(b), this.blockLength <= 9 ? this.tagNumber = gr(f, 7) : (this.isHexOnly = !0, this.warnings.push("Tag too long, represented as hex-coded"));
|
|
1252
1252
|
}
|
|
1253
1253
|
if (this.tagClass === 1 && this.isConstructed)
|
|
1254
1254
|
switch (this.tagNumber) {
|
|
@@ -1379,7 +1379,7 @@ class Te extends or {
|
|
|
1379
1379
|
if (!(e instanceof this.constructor))
|
|
1380
1380
|
return !1;
|
|
1381
1381
|
const t = this.toBER(), i = e.toBER();
|
|
1382
|
-
return
|
|
1382
|
+
return Hf(t, i);
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
1385
|
Te.NAME = "BaseBlock";
|
|
@@ -1423,7 +1423,7 @@ class li extends Te {
|
|
|
1423
1423
|
wl = li;
|
|
1424
1424
|
D.Primitive = wl;
|
|
1425
1425
|
li.NAME = "PRIMITIVE";
|
|
1426
|
-
function
|
|
1426
|
+
function Zf(r, e) {
|
|
1427
1427
|
if (r instanceof e)
|
|
1428
1428
|
return r;
|
|
1429
1429
|
const t = new e();
|
|
@@ -1569,8 +1569,8 @@ function Tr(r, e = 0, t = r.length) {
|
|
|
1569
1569
|
c = D.Duration;
|
|
1570
1570
|
break;
|
|
1571
1571
|
default: {
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1572
|
+
const f = n.idBlock.isConstructed ? new D.Constructed() : new D.Primitive();
|
|
1573
|
+
f.idBlock = n.idBlock, f.lenBlock = n.lenBlock, f.warnings = n.warnings, n = f;
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
break;
|
|
@@ -1580,7 +1580,7 @@ function Tr(r, e = 0, t = r.length) {
|
|
|
1580
1580
|
default:
|
|
1581
1581
|
c = n.idBlock.isConstructed ? D.Constructed : D.Primitive;
|
|
1582
1582
|
}
|
|
1583
|
-
return n =
|
|
1583
|
+
return n = Zf(n, c), u = n.fromBER(r, e, n.lenBlock.isIndefiniteForm ? t : n.lenBlock.length), n.valueBeforeDecodeView = r.subarray(i, i + n.blockLength), {
|
|
1584
1584
|
offset: u,
|
|
1585
1585
|
result: n
|
|
1586
1586
|
};
|
|
@@ -1595,7 +1595,7 @@ function pr(r) {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
return Tr(U.toUint8Array(r).slice(), 0, r.byteLength);
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function Qf(r, e) {
|
|
1599
1599
|
return r ? 1 : e;
|
|
1600
1600
|
}
|
|
1601
1601
|
class Rt extends De {
|
|
@@ -1609,7 +1609,7 @@ class Rt extends De {
|
|
|
1609
1609
|
if (this.valueBeforeDecodeView = n.subarray(t, t + i), this.valueBeforeDecodeView.length === 0)
|
|
1610
1610
|
return this.warnings.push("Zero buffer length"), t;
|
|
1611
1611
|
let s = t;
|
|
1612
|
-
for (;
|
|
1612
|
+
for (; Qf(this.isIndefiniteForm, i) > 0; ) {
|
|
1613
1613
|
const a = Tr(n, s, i);
|
|
1614
1614
|
if (a.offset === -1)
|
|
1615
1615
|
return this.error = a.result.error, this.warnings.concat(a.result.warnings), -1;
|
|
@@ -1731,7 +1731,7 @@ class Cl extends ht(De) {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
Cl.NAME = "BooleanValueBlock";
|
|
1733
1733
|
var Bl;
|
|
1734
|
-
let
|
|
1734
|
+
let dn = class extends Te {
|
|
1735
1735
|
constructor(e = {}) {
|
|
1736
1736
|
super(e, Cl), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 1;
|
|
1737
1737
|
}
|
|
@@ -1745,9 +1745,9 @@ let fn = class extends Te {
|
|
|
1745
1745
|
return `${this.constructor.NAME} : ${this.getValue}`;
|
|
1746
1746
|
}
|
|
1747
1747
|
};
|
|
1748
|
-
Bl =
|
|
1748
|
+
Bl = dn;
|
|
1749
1749
|
D.Boolean = Bl;
|
|
1750
|
-
|
|
1750
|
+
dn.NAME = "BOOLEAN";
|
|
1751
1751
|
class Il extends ht(Rt) {
|
|
1752
1752
|
constructor({ isConstructed: e = !1, ...t } = {}) {
|
|
1753
1753
|
super(t), this.isConstructed = e;
|
|
@@ -1848,10 +1848,10 @@ class Nl extends ht(Rt) {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
if (c !== yl)
|
|
1850
1850
|
return this.error = "BIT STRING may consists of BIT STRINGs only", -1;
|
|
1851
|
-
const
|
|
1852
|
-
if (this.unusedBits > 0 &&
|
|
1851
|
+
const f = u.valueBlock;
|
|
1852
|
+
if (this.unusedBits > 0 && f.unusedBits > 0)
|
|
1853
1853
|
return this.error = 'Using of "unused bits" inside constructive BIT STRING allowed for least one only', -1;
|
|
1854
|
-
this.unusedBits =
|
|
1854
|
+
this.unusedBits = f.unusedBits;
|
|
1855
1855
|
}
|
|
1856
1856
|
return n;
|
|
1857
1857
|
}
|
|
@@ -1927,27 +1927,27 @@ Ol = Wt;
|
|
|
1927
1927
|
D.BitString = Ol;
|
|
1928
1928
|
Wt.NAME = yl;
|
|
1929
1929
|
var Tl;
|
|
1930
|
-
function
|
|
1930
|
+
function Xf(r, e) {
|
|
1931
1931
|
const t = new Uint8Array([0]), i = new Uint8Array(r), n = new Uint8Array(e);
|
|
1932
1932
|
let s = i.slice(0);
|
|
1933
1933
|
const a = s.length - 1, u = n.slice(0), c = u.length - 1;
|
|
1934
|
-
let
|
|
1934
|
+
let f = 0;
|
|
1935
1935
|
const p = c < a ? a : c;
|
|
1936
1936
|
let b = 0;
|
|
1937
1937
|
for (let P = p; P >= 0; P--, b++) {
|
|
1938
1938
|
switch (!0) {
|
|
1939
1939
|
case b < u.length:
|
|
1940
|
-
|
|
1940
|
+
f = s[a - b] + u[c - b] + t[0];
|
|
1941
1941
|
break;
|
|
1942
1942
|
default:
|
|
1943
|
-
|
|
1943
|
+
f = s[a - b] + t[0];
|
|
1944
1944
|
}
|
|
1945
|
-
switch (t[0] =
|
|
1945
|
+
switch (t[0] = f / 10, !0) {
|
|
1946
1946
|
case b >= s.length:
|
|
1947
|
-
s = vs(new Uint8Array([
|
|
1947
|
+
s = vs(new Uint8Array([f % 10]), s);
|
|
1948
1948
|
break;
|
|
1949
1949
|
default:
|
|
1950
|
-
s[a - b] =
|
|
1950
|
+
s[a - b] = f % 10;
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
return t[0] > 0 && (s = vs(t, s)), s;
|
|
@@ -1965,24 +1965,24 @@ function ja(r) {
|
|
|
1965
1965
|
}
|
|
1966
1966
|
return Hr[r];
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function ed(r, e) {
|
|
1969
1969
|
let t = 0;
|
|
1970
1970
|
const i = new Uint8Array(r), n = new Uint8Array(e), s = i.slice(0), a = s.length - 1, u = n.slice(0), c = u.length - 1;
|
|
1971
|
-
let
|
|
1971
|
+
let f, p = 0;
|
|
1972
1972
|
for (let b = c; b >= 0; b--, p++)
|
|
1973
|
-
switch (
|
|
1974
|
-
case
|
|
1975
|
-
t = 1, s[a - p] =
|
|
1973
|
+
switch (f = s[a - p] - u[c - p] - t, !0) {
|
|
1974
|
+
case f < 0:
|
|
1975
|
+
t = 1, s[a - p] = f + 10;
|
|
1976
1976
|
break;
|
|
1977
1977
|
default:
|
|
1978
|
-
t = 0, s[a - p] =
|
|
1978
|
+
t = 0, s[a - p] = f;
|
|
1979
1979
|
}
|
|
1980
1980
|
if (t > 0)
|
|
1981
1981
|
for (let b = a - c + 1; b >= 0; b--, p++)
|
|
1982
|
-
if (
|
|
1983
|
-
t = 1, s[a - p] =
|
|
1982
|
+
if (f = s[a - p] - t, f < 0)
|
|
1983
|
+
t = 1, s[a - p] = f + 10;
|
|
1984
1984
|
else {
|
|
1985
|
-
t = 0, s[a - p] =
|
|
1985
|
+
t = 0, s[a - p] = f;
|
|
1986
1986
|
break;
|
|
1987
1987
|
}
|
|
1988
1988
|
return s.slice();
|
|
@@ -1995,7 +1995,7 @@ class Mo extends ht(De) {
|
|
|
1995
1995
|
this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (this._valueDec = pl.call(this)));
|
|
1996
1996
|
}
|
|
1997
1997
|
set valueDec(e) {
|
|
1998
|
-
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(
|
|
1998
|
+
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(Lf(e));
|
|
1999
1999
|
}
|
|
2000
2000
|
get valueDec() {
|
|
2001
2001
|
return this._valueDec;
|
|
@@ -2042,14 +2042,14 @@ class Mo extends ht(De) {
|
|
|
2042
2042
|
let a = "", u = !1;
|
|
2043
2043
|
for (let c = s.byteLength - 1; c >= 0; c--) {
|
|
2044
2044
|
n = s[c];
|
|
2045
|
-
for (let
|
|
2045
|
+
for (let f = 0; f < 8; f++) {
|
|
2046
2046
|
if ((n & 1) === 1)
|
|
2047
2047
|
switch (i) {
|
|
2048
2048
|
case e:
|
|
2049
|
-
t =
|
|
2049
|
+
t = ed(ja(i), t), a = "-";
|
|
2050
2050
|
break;
|
|
2051
2051
|
default:
|
|
2052
|
-
t =
|
|
2052
|
+
t = Xf(t, ja(i));
|
|
2053
2053
|
}
|
|
2054
2054
|
i++, n >>= 1;
|
|
2055
2055
|
}
|
|
@@ -2070,7 +2070,7 @@ Object.defineProperty(Tl.prototype, "valueHex", {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
});
|
|
2072
2072
|
var jl;
|
|
2073
|
-
class
|
|
2073
|
+
class ft extends Te {
|
|
2074
2074
|
constructor(e = {}) {
|
|
2075
2075
|
super(e, Mo), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 2;
|
|
2076
2076
|
}
|
|
@@ -2083,20 +2083,20 @@ class dt extends Te {
|
|
|
2083
2083
|
if (t < 0) {
|
|
2084
2084
|
const u = new Uint8Array(s.length + (s[0] & 128 ? 1 : 0));
|
|
2085
2085
|
u[0] |= 128;
|
|
2086
|
-
const
|
|
2086
|
+
const f = BigInt(`0x${H.ToHex(u)}`) + t, p = U.toUint8Array(H.FromHex(f.toString(16)));
|
|
2087
2087
|
p[0] |= 128, i.write(p);
|
|
2088
2088
|
} else
|
|
2089
2089
|
s[0] & 128 && i.write(new Uint8Array([0])), i.write(s);
|
|
2090
|
-
return new
|
|
2090
|
+
return new ft({
|
|
2091
2091
|
valueHex: i.final()
|
|
2092
2092
|
});
|
|
2093
2093
|
}
|
|
2094
2094
|
convertToDER() {
|
|
2095
|
-
const e = new
|
|
2095
|
+
const e = new ft({ valueHex: this.valueBlock.valueHexView });
|
|
2096
2096
|
return e.valueBlock.toDER(), e;
|
|
2097
2097
|
}
|
|
2098
2098
|
convertFromDER() {
|
|
2099
|
-
return new
|
|
2099
|
+
return new ft({
|
|
2100
2100
|
valueHex: this.valueBlock.valueHexView[0] === 0 ? this.valueBlock.valueHexView.subarray(1) : this.valueBlock.valueHexView
|
|
2101
2101
|
});
|
|
2102
2102
|
}
|
|
@@ -2104,11 +2104,11 @@ class dt extends Te {
|
|
|
2104
2104
|
return `${this.constructor.NAME} : ${this.valueBlock.toString()}`;
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
jl =
|
|
2107
|
+
jl = ft;
|
|
2108
2108
|
D.Integer = jl;
|
|
2109
|
-
|
|
2109
|
+
ft.NAME = "INTEGER";
|
|
2110
2110
|
var Pl;
|
|
2111
|
-
class pn extends
|
|
2111
|
+
class pn extends ft {
|
|
2112
2112
|
constructor(e = {}) {
|
|
2113
2113
|
super(e), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 10;
|
|
2114
2114
|
}
|
|
@@ -2625,7 +2625,7 @@ iu = xn;
|
|
|
2625
2625
|
D.CharacterString = iu;
|
|
2626
2626
|
xn.NAME = "CharacterString";
|
|
2627
2627
|
var nu;
|
|
2628
|
-
class
|
|
2628
|
+
class fi extends ui {
|
|
2629
2629
|
constructor({ value: e, valueDate: t, ...i } = {}) {
|
|
2630
2630
|
if (super(i), this.year = 0, this.month = 0, this.day = 0, this.hour = 0, this.minute = 0, this.second = 0, e) {
|
|
2631
2631
|
this.fromString(e), this.valueBlock.valueHexView = new Uint8Array(e.length);
|
|
@@ -2680,11 +2680,11 @@ class di extends ui {
|
|
|
2680
2680
|
};
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|
|
2683
|
-
nu =
|
|
2683
|
+
nu = fi;
|
|
2684
2684
|
D.UTCTime = nu;
|
|
2685
|
-
|
|
2685
|
+
fi.NAME = "UTCTime";
|
|
2686
2686
|
var su;
|
|
2687
|
-
class Cn extends
|
|
2687
|
+
class Cn extends fi {
|
|
2688
2688
|
constructor(e = {}) {
|
|
2689
2689
|
var t;
|
|
2690
2690
|
super(e), (t = this.millisecond) !== null && t !== void 0 || (this.millisecond = 0), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 24;
|
|
@@ -2715,43 +2715,43 @@ class Cn extends di {
|
|
|
2715
2715
|
if (P === -1 && (P = i.indexOf("-"), b = -1), P !== -1) {
|
|
2716
2716
|
if (A = i.substring(P + 1), i = i.substring(0, P), A.length !== 2 && A.length !== 4)
|
|
2717
2717
|
throw new Error("Wrong input string for conversion");
|
|
2718
|
-
let
|
|
2719
|
-
if (isNaN(
|
|
2718
|
+
let d = parseInt(A.substring(0, 2), 10);
|
|
2719
|
+
if (isNaN(d.valueOf()))
|
|
2720
2720
|
throw new Error("Wrong input string for conversion");
|
|
2721
|
-
if (u = b *
|
|
2722
|
-
if (
|
|
2721
|
+
if (u = b * d, A.length === 4) {
|
|
2722
|
+
if (d = parseInt(A.substring(2, 4), 10), isNaN(d.valueOf()))
|
|
2723
2723
|
throw new Error("Wrong input string for conversion");
|
|
2724
|
-
c = b *
|
|
2724
|
+
c = b * d;
|
|
2725
2725
|
}
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
|
-
let
|
|
2729
|
-
if (
|
|
2730
|
-
const b = new Number(`0${i.substring(
|
|
2728
|
+
let f = i.indexOf(".");
|
|
2729
|
+
if (f === -1 && (f = i.indexOf(",")), f !== -1) {
|
|
2730
|
+
const b = new Number(`0${i.substring(f)}`);
|
|
2731
2731
|
if (isNaN(b.valueOf()))
|
|
2732
2732
|
throw new Error("Wrong input string for conversion");
|
|
2733
|
-
s = b.valueOf(), n = i.substring(0,
|
|
2733
|
+
s = b.valueOf(), n = i.substring(0, f);
|
|
2734
2734
|
} else
|
|
2735
2735
|
n = i;
|
|
2736
2736
|
switch (!0) {
|
|
2737
2737
|
case n.length === 8:
|
|
2738
|
-
if (a = /(\d{4})(\d{2})(\d{2})/ig,
|
|
2738
|
+
if (a = /(\d{4})(\d{2})(\d{2})/ig, f !== -1)
|
|
2739
2739
|
throw new Error("Wrong input string for conversion");
|
|
2740
2740
|
break;
|
|
2741
2741
|
case n.length === 10:
|
|
2742
|
-
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})/ig,
|
|
2742
|
+
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})/ig, f !== -1) {
|
|
2743
2743
|
let b = 60 * s;
|
|
2744
2744
|
this.minute = Math.floor(b), b = 60 * (b - this.minute), this.second = Math.floor(b), b = 1e3 * (b - this.second), this.millisecond = Math.floor(b);
|
|
2745
2745
|
}
|
|
2746
2746
|
break;
|
|
2747
2747
|
case n.length === 12:
|
|
2748
|
-
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,
|
|
2748
|
+
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig, f !== -1) {
|
|
2749
2749
|
let b = 60 * s;
|
|
2750
2750
|
this.second = Math.floor(b), b = 1e3 * (b - this.second), this.millisecond = Math.floor(b);
|
|
2751
2751
|
}
|
|
2752
2752
|
break;
|
|
2753
2753
|
case n.length === 14:
|
|
2754
|
-
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,
|
|
2754
|
+
if (a = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig, f !== -1) {
|
|
2755
2755
|
const b = 1e3 * s;
|
|
2756
2756
|
this.millisecond = Math.floor(b);
|
|
2757
2757
|
}
|
|
@@ -2867,8 +2867,8 @@ class ji extends tr {
|
|
|
2867
2867
|
super(i), this.value = e, this.local = t;
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
|
-
class
|
|
2871
|
-
constructor({ data: e =
|
|
2870
|
+
class td {
|
|
2871
|
+
constructor({ data: e = fn } = {}) {
|
|
2872
2872
|
this.dataView = U.toUint8Array(e);
|
|
2873
2873
|
}
|
|
2874
2874
|
get data() {
|
|
@@ -2923,17 +2923,17 @@ function qt(r, e, t) {
|
|
|
2923
2923
|
verified: !1,
|
|
2924
2924
|
result: { error: "Wrong ASN.1 schema" }
|
|
2925
2925
|
};
|
|
2926
|
-
if (!(
|
|
2926
|
+
if (!(Ff in t))
|
|
2927
2927
|
return {
|
|
2928
2928
|
verified: !1,
|
|
2929
2929
|
result: { error: "Wrong ASN.1 schema" }
|
|
2930
2930
|
};
|
|
2931
|
-
if (!(
|
|
2931
|
+
if (!(Wf in t.idBlock))
|
|
2932
2932
|
return {
|
|
2933
2933
|
verified: !1,
|
|
2934
2934
|
result: { error: "Wrong ASN.1 schema" }
|
|
2935
2935
|
};
|
|
2936
|
-
if (!(
|
|
2936
|
+
if (!(Jf in t.idBlock))
|
|
2937
2937
|
return {
|
|
2938
2938
|
verified: !1,
|
|
2939
2939
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -2949,7 +2949,7 @@ function qt(r, e, t) {
|
|
|
2949
2949
|
verified: !1,
|
|
2950
2950
|
result: { error: "Error decoding idBlock for ASN.1 schema" }
|
|
2951
2951
|
};
|
|
2952
|
-
if (t.idBlock.hasOwnProperty(
|
|
2952
|
+
if (t.idBlock.hasOwnProperty(qf) === !1)
|
|
2953
2953
|
return {
|
|
2954
2954
|
verified: !1,
|
|
2955
2955
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -2959,7 +2959,7 @@ function qt(r, e, t) {
|
|
|
2959
2959
|
verified: !1,
|
|
2960
2960
|
result: r
|
|
2961
2961
|
};
|
|
2962
|
-
if (t.idBlock.hasOwnProperty(
|
|
2962
|
+
if (t.idBlock.hasOwnProperty(zf) === !1)
|
|
2963
2963
|
return {
|
|
2964
2964
|
verified: !1,
|
|
2965
2965
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -2969,7 +2969,7 @@ function qt(r, e, t) {
|
|
|
2969
2969
|
verified: !1,
|
|
2970
2970
|
result: r
|
|
2971
2971
|
};
|
|
2972
|
-
if (t.idBlock.hasOwnProperty(
|
|
2972
|
+
if (t.idBlock.hasOwnProperty(Gf) === !1)
|
|
2973
2973
|
return {
|
|
2974
2974
|
verified: !1,
|
|
2975
2975
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -2979,7 +2979,7 @@ function qt(r, e, t) {
|
|
|
2979
2979
|
verified: !1,
|
|
2980
2980
|
result: r
|
|
2981
2981
|
};
|
|
2982
|
-
if (!(
|
|
2982
|
+
if (!(Kf in t.idBlock))
|
|
2983
2983
|
return {
|
|
2984
2984
|
verified: !1,
|
|
2985
2985
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3022,8 +3022,8 @@ function qt(r, e, t) {
|
|
|
3022
3022
|
};
|
|
3023
3023
|
if (e.valueBlock.value.length === 0 && t.valueBlock.value.length !== 0) {
|
|
3024
3024
|
let c = !0;
|
|
3025
|
-
for (let
|
|
3026
|
-
c = c && (t.valueBlock.value[
|
|
3025
|
+
for (let f = 0; f < t.valueBlock.value.length; f++)
|
|
3026
|
+
c = c && (t.valueBlock.value[f].optional || !1);
|
|
3027
3027
|
return c ? {
|
|
3028
3028
|
verified: !0,
|
|
3029
3029
|
result: r
|
|
@@ -3035,11 +3035,11 @@ function qt(r, e, t) {
|
|
|
3035
3035
|
for (let c = 0; c < u; c++)
|
|
3036
3036
|
if (c - s >= e.valueBlock.value.length) {
|
|
3037
3037
|
if (t.valueBlock.value[c].optional === !1) {
|
|
3038
|
-
const
|
|
3038
|
+
const f = {
|
|
3039
3039
|
verified: !1,
|
|
3040
3040
|
result: r
|
|
3041
3041
|
};
|
|
3042
|
-
return r.error = "Inconsistent length between ASN.1 data and schema", t.name && (t.name = t.name.replace(/^\s+|\s+$/g, Ke), t.name && (delete r[t.name],
|
|
3042
|
+
return r.error = "Inconsistent length between ASN.1 data and schema", t.name && (t.name = t.name.replace(/^\s+|\s+$/g, Ke), t.name && (delete r[t.name], f.name = t.name)), f;
|
|
3043
3043
|
}
|
|
3044
3044
|
} else if (t.valueBlock.value[0] instanceof ji) {
|
|
3045
3045
|
if (a = qt(r, e.valueBlock.value[c], t.valueBlock.value[0].value), a.verified === !1)
|
|
@@ -3048,8 +3048,8 @@ function qt(r, e, t) {
|
|
|
3048
3048
|
else
|
|
3049
3049
|
return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, Ke), t.name && delete r[t.name]), a;
|
|
3050
3050
|
if (os in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
|
|
3051
|
-
let
|
|
3052
|
-
|
|
3051
|
+
let f = {};
|
|
3052
|
+
Yf in t.valueBlock.value[0] && t.valueBlock.value[0].local ? f = e : f = r, typeof f[t.valueBlock.value[0].name] > "u" && (f[t.valueBlock.value[0].name] = []), f[t.valueBlock.value[0].name].push(e.valueBlock.value[c]);
|
|
3053
3053
|
}
|
|
3054
3054
|
} else if (a = qt(r, e.valueBlock.value[c - s], t.valueBlock.value[c]), a.verified === !1)
|
|
3055
3055
|
if (t.valueBlock.value[c].optional)
|
|
@@ -3084,7 +3084,7 @@ function qt(r, e, t) {
|
|
|
3084
3084
|
result: r
|
|
3085
3085
|
};
|
|
3086
3086
|
}
|
|
3087
|
-
function
|
|
3087
|
+
function rd(r, e) {
|
|
3088
3088
|
if (!(e instanceof Object))
|
|
3089
3089
|
return {
|
|
3090
3090
|
verified: !1,
|
|
@@ -3096,14 +3096,14 @@ function tf(r, e) {
|
|
|
3096
3096
|
result: t.result
|
|
3097
3097
|
} : qt(t.result, t.result, e);
|
|
3098
3098
|
}
|
|
3099
|
-
const
|
|
3099
|
+
const fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3100
3100
|
__proto__: null,
|
|
3101
3101
|
Any: tr,
|
|
3102
3102
|
BaseBlock: Te,
|
|
3103
3103
|
BaseStringBlock: Vo,
|
|
3104
3104
|
BitString: Wt,
|
|
3105
3105
|
BmpString: yn,
|
|
3106
|
-
Boolean:
|
|
3106
|
+
Boolean: dn,
|
|
3107
3107
|
CharacterString: xn,
|
|
3108
3108
|
Choice: zo,
|
|
3109
3109
|
Constructed: qe,
|
|
@@ -3117,14 +3117,14 @@ const du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3117
3117
|
GraphicString: kn,
|
|
3118
3118
|
HexBlock: ht,
|
|
3119
3119
|
IA5String: Sn,
|
|
3120
|
-
Integer:
|
|
3120
|
+
Integer: ft,
|
|
3121
3121
|
Null: er,
|
|
3122
3122
|
NumericString: vn,
|
|
3123
3123
|
ObjectIdentifier: hn,
|
|
3124
3124
|
OctetString: Gt,
|
|
3125
3125
|
Primitive: li,
|
|
3126
3126
|
PrintableString: mn,
|
|
3127
|
-
RawData:
|
|
3127
|
+
RawData: td,
|
|
3128
3128
|
RelativeObjectIdentifier: Do,
|
|
3129
3129
|
Repeated: ji,
|
|
3130
3130
|
Sequence: kt,
|
|
@@ -3132,7 +3132,7 @@ const du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3132
3132
|
TIME: qo,
|
|
3133
3133
|
TeletexString: bn,
|
|
3134
3134
|
TimeOfDay: Ho,
|
|
3135
|
-
UTCTime:
|
|
3135
|
+
UTCTime: fi,
|
|
3136
3136
|
UniversalString: gn,
|
|
3137
3137
|
Utf8String: Nt,
|
|
3138
3138
|
ValueBlock: De,
|
|
@@ -3141,7 +3141,7 @@ const du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3141
3141
|
VisibleString: ui,
|
|
3142
3142
|
compareSchema: qt,
|
|
3143
3143
|
fromBER: pr,
|
|
3144
|
-
verifySchema:
|
|
3144
|
+
verifySchema: rd
|
|
3145
3145
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3146
3146
|
var N;
|
|
3147
3147
|
(function(r) {
|
|
@@ -3191,7 +3191,7 @@ class Bn {
|
|
|
3191
3191
|
this.value = n.buffer;
|
|
3192
3192
|
}
|
|
3193
3193
|
}
|
|
3194
|
-
class
|
|
3194
|
+
class de {
|
|
3195
3195
|
constructor(e) {
|
|
3196
3196
|
typeof e == "number" ? this.buffer = new ArrayBuffer(e) : U.isBufferSource(e) ? this.buffer = U.toArrayBuffer(e) : Array.isArray(e) ? this.buffer = new Uint8Array(e) : this.buffer = new ArrayBuffer(0);
|
|
3197
3197
|
}
|
|
@@ -3213,7 +3213,7 @@ class fe {
|
|
|
3213
3213
|
return new Gt({ name: e });
|
|
3214
3214
|
}
|
|
3215
3215
|
}
|
|
3216
|
-
const
|
|
3216
|
+
const id = {
|
|
3217
3217
|
fromASN: (r) => r instanceof er ? null : r.valueBeforeDecodeView,
|
|
3218
3218
|
toASN: (r) => {
|
|
3219
3219
|
if (r === null)
|
|
@@ -3223,29 +3223,29 @@ const rf = {
|
|
|
3223
3223
|
throw new Error(e.result.error);
|
|
3224
3224
|
return e.result;
|
|
3225
3225
|
}
|
|
3226
|
-
},
|
|
3226
|
+
}, nd = {
|
|
3227
3227
|
fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
|
|
3228
|
-
toASN: (r) => new
|
|
3229
|
-
},
|
|
3228
|
+
toASN: (r) => new ft({ value: +r })
|
|
3229
|
+
}, sd = {
|
|
3230
3230
|
fromASN: (r) => r.valueBlock.valueDec,
|
|
3231
3231
|
toASN: (r) => new pn({ value: r })
|
|
3232
3232
|
}, Ae = {
|
|
3233
3233
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3234
|
-
toASN: (r) => new
|
|
3235
|
-
},
|
|
3234
|
+
toASN: (r) => new ft({ valueHex: r })
|
|
3235
|
+
}, od = {
|
|
3236
3236
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3237
3237
|
toASN: (r) => new Wt({ valueHex: r })
|
|
3238
|
-
},
|
|
3238
|
+
}, ad = {
|
|
3239
3239
|
fromASN: (r) => r.valueBlock.toString(),
|
|
3240
3240
|
toASN: (r) => new hn({ value: r })
|
|
3241
|
-
},
|
|
3241
|
+
}, cd = {
|
|
3242
3242
|
fromASN: (r) => r.valueBlock.value,
|
|
3243
|
-
toASN: (r) => new
|
|
3243
|
+
toASN: (r) => new dn({ value: r })
|
|
3244
3244
|
}, Pi = {
|
|
3245
3245
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3246
3246
|
toASN: (r) => new Gt({ valueHex: r })
|
|
3247
|
-
},
|
|
3248
|
-
fromASN: (r) => new
|
|
3247
|
+
}, ld = {
|
|
3248
|
+
fromASN: (r) => new de(r.getValue()),
|
|
3249
3249
|
toASN: (r) => r.toASN()
|
|
3250
3250
|
};
|
|
3251
3251
|
function it(r) {
|
|
@@ -3254,62 +3254,62 @@ function it(r) {
|
|
|
3254
3254
|
toASN: (e) => new r({ value: e })
|
|
3255
3255
|
};
|
|
3256
3256
|
}
|
|
3257
|
-
const
|
|
3257
|
+
const du = it(Nt), ud = it(yn), fd = it(gn), dd = it(vn), pd = it(mn), hd = it(bn), yd = it(wn), gd = it(Sn), vd = it(kn), md = it(ui), bd = it(An), wd = it(xn), Sd = {
|
|
3258
3258
|
fromASN: (r) => r.toDate(),
|
|
3259
|
-
toASN: (r) => new
|
|
3260
|
-
},
|
|
3259
|
+
toASN: (r) => new fi({ valueDate: r })
|
|
3260
|
+
}, kd = {
|
|
3261
3261
|
fromASN: (r) => r.toDate(),
|
|
3262
3262
|
toASN: (r) => new Cn({ valueDate: r })
|
|
3263
|
-
},
|
|
3263
|
+
}, Ad = {
|
|
3264
3264
|
fromASN: () => null,
|
|
3265
3265
|
toASN: () => new er()
|
|
3266
3266
|
};
|
|
3267
3267
|
function Go(r) {
|
|
3268
3268
|
switch (r) {
|
|
3269
3269
|
case m.Any:
|
|
3270
|
-
return
|
|
3270
|
+
return id;
|
|
3271
3271
|
case m.BitString:
|
|
3272
|
-
return
|
|
3272
|
+
return od;
|
|
3273
3273
|
case m.BmpString:
|
|
3274
|
-
return
|
|
3274
|
+
return ud;
|
|
3275
3275
|
case m.Boolean:
|
|
3276
|
-
return
|
|
3276
|
+
return cd;
|
|
3277
3277
|
case m.CharacterString:
|
|
3278
|
-
return
|
|
3278
|
+
return wd;
|
|
3279
3279
|
case m.Enumerated:
|
|
3280
|
-
return
|
|
3280
|
+
return sd;
|
|
3281
3281
|
case m.GeneralString:
|
|
3282
|
-
return
|
|
3282
|
+
return bd;
|
|
3283
3283
|
case m.GeneralizedTime:
|
|
3284
|
-
return
|
|
3284
|
+
return kd;
|
|
3285
3285
|
case m.GraphicString:
|
|
3286
|
-
return
|
|
3286
|
+
return vd;
|
|
3287
3287
|
case m.IA5String:
|
|
3288
|
-
return
|
|
3288
|
+
return gd;
|
|
3289
3289
|
case m.Integer:
|
|
3290
|
-
return
|
|
3290
|
+
return nd;
|
|
3291
3291
|
case m.Null:
|
|
3292
|
-
return
|
|
3292
|
+
return Ad;
|
|
3293
3293
|
case m.NumericString:
|
|
3294
|
-
return
|
|
3294
|
+
return dd;
|
|
3295
3295
|
case m.ObjectIdentifier:
|
|
3296
|
-
return
|
|
3296
|
+
return ad;
|
|
3297
3297
|
case m.OctetString:
|
|
3298
3298
|
return Pi;
|
|
3299
3299
|
case m.PrintableString:
|
|
3300
|
-
return
|
|
3300
|
+
return pd;
|
|
3301
3301
|
case m.TeletexString:
|
|
3302
|
-
return
|
|
3302
|
+
return hd;
|
|
3303
3303
|
case m.UTCTime:
|
|
3304
|
-
return
|
|
3304
|
+
return Sd;
|
|
3305
3305
|
case m.UniversalString:
|
|
3306
|
-
return
|
|
3306
|
+
return fd;
|
|
3307
3307
|
case m.Utf8String:
|
|
3308
|
-
return
|
|
3308
|
+
return du;
|
|
3309
3309
|
case m.VideotexString:
|
|
3310
|
-
return
|
|
3310
|
+
return yd;
|
|
3311
3311
|
case m.VisibleString:
|
|
3312
|
-
return
|
|
3312
|
+
return md;
|
|
3313
3313
|
default:
|
|
3314
3314
|
return null;
|
|
3315
3315
|
}
|
|
@@ -3325,7 +3325,7 @@ function pu(r) {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
return !1;
|
|
3327
3327
|
}
|
|
3328
|
-
function
|
|
3328
|
+
function xd(r, e) {
|
|
3329
3329
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
3330
3330
|
return !1;
|
|
3331
3331
|
const t = new Uint8Array(r), i = new Uint8Array(e);
|
|
@@ -3334,7 +3334,7 @@ function xf(r, e) {
|
|
|
3334
3334
|
return !1;
|
|
3335
3335
|
return !0;
|
|
3336
3336
|
}
|
|
3337
|
-
class
|
|
3337
|
+
class Cd {
|
|
3338
3338
|
constructor() {
|
|
3339
3339
|
this.items = /* @__PURE__ */ new WeakMap();
|
|
3340
3340
|
}
|
|
@@ -3366,13 +3366,13 @@ class Cf {
|
|
|
3366
3366
|
const a = i.items[s], u = t ? s : "";
|
|
3367
3367
|
let c;
|
|
3368
3368
|
if (typeof a.type == "number") {
|
|
3369
|
-
const p = m[a.type], b =
|
|
3369
|
+
const p = m[a.type], b = fu[p];
|
|
3370
3370
|
if (!b)
|
|
3371
3371
|
throw new Error(`Cannot get ASN1 class by name '${p}'`);
|
|
3372
3372
|
c = new b({ name: u });
|
|
3373
3373
|
} else
|
|
3374
3374
|
St(a.type) ? c = new a.type().toSchema(u) : a.optional ? this.get(a.type).type === N.Choice ? c = new tr({ name: u }) : (c = this.create(a.type, !1), c.name = u) : c = new tr({ name: u });
|
|
3375
|
-
const
|
|
3375
|
+
const f = !!a.optional || a.defaultValue !== void 0;
|
|
3376
3376
|
if (a.repeated) {
|
|
3377
3377
|
c.name = "";
|
|
3378
3378
|
const p = a.repeated === "set" ? At : kt;
|
|
@@ -3392,7 +3392,7 @@ class Cf {
|
|
|
3392
3392
|
const p = a.repeated ? qe : li;
|
|
3393
3393
|
n.push(new p({
|
|
3394
3394
|
name: u,
|
|
3395
|
-
optional:
|
|
3395
|
+
optional: f,
|
|
3396
3396
|
idBlock: {
|
|
3397
3397
|
tagClass: 3,
|
|
3398
3398
|
tagNumber: a.context
|
|
@@ -3404,7 +3404,7 @@ class Cf {
|
|
|
3404
3404
|
let b = p ? c : this.get(a.type, !0).schema;
|
|
3405
3405
|
b = "valueBlock" in b ? b.valueBlock.value : b.value, n.push(new qe({
|
|
3406
3406
|
name: p ? "" : u,
|
|
3407
|
-
optional:
|
|
3407
|
+
optional: f,
|
|
3408
3408
|
idBlock: {
|
|
3409
3409
|
tagClass: 3,
|
|
3410
3410
|
tagNumber: a.context
|
|
@@ -3414,7 +3414,7 @@ class Cf {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
else
|
|
3416
3416
|
n.push(new qe({
|
|
3417
|
-
optional:
|
|
3417
|
+
optional: f,
|
|
3418
3418
|
idBlock: {
|
|
3419
3419
|
tagClass: 3,
|
|
3420
3420
|
tagNumber: a.context
|
|
@@ -3422,7 +3422,7 @@ class Cf {
|
|
|
3422
3422
|
value: [c]
|
|
3423
3423
|
}));
|
|
3424
3424
|
else
|
|
3425
|
-
c.optional =
|
|
3425
|
+
c.optional = f, n.push(c);
|
|
3426
3426
|
}
|
|
3427
3427
|
switch (i.type) {
|
|
3428
3428
|
case N.Sequence:
|
|
@@ -3443,7 +3443,7 @@ class Cf {
|
|
|
3443
3443
|
return t ? this.items.get(t) || this.findParentSchema(t) : null;
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
|
-
const et = new
|
|
3446
|
+
const et = new Cd(), j = (r) => (e) => {
|
|
3447
3447
|
let t;
|
|
3448
3448
|
et.has(e) ? t = et.get(e) : (t = et.createDefault(e), et.set(e, t)), Object.assign(t, r);
|
|
3449
3449
|
}, l = (r) => (e, t) => {
|
|
@@ -3463,7 +3463,7 @@ class Pa extends Error {
|
|
|
3463
3463
|
super(...arguments), this.schemas = [];
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
|
-
class
|
|
3466
|
+
class Bd {
|
|
3467
3467
|
static parse(e, t) {
|
|
3468
3468
|
const i = pr(e);
|
|
3469
3469
|
if (i.result.error)
|
|
@@ -3498,16 +3498,16 @@ class Bf {
|
|
|
3498
3498
|
throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");
|
|
3499
3499
|
const c = n.itemType;
|
|
3500
3500
|
if (typeof c == "number") {
|
|
3501
|
-
const
|
|
3502
|
-
if (!
|
|
3501
|
+
const f = Go(c);
|
|
3502
|
+
if (!f)
|
|
3503
3503
|
throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);
|
|
3504
|
-
return t.from(e.valueBlock.value, (p) =>
|
|
3504
|
+
return t.from(e.valueBlock.value, (p) => f.fromASN(p));
|
|
3505
3505
|
} else
|
|
3506
|
-
return t.from(e.valueBlock.value, (
|
|
3506
|
+
return t.from(e.valueBlock.value, (f) => this.fromASN(f, c));
|
|
3507
3507
|
}
|
|
3508
3508
|
for (const c in n.items) {
|
|
3509
|
-
const
|
|
3510
|
-
if (!
|
|
3509
|
+
const f = a.result[c];
|
|
3510
|
+
if (!f)
|
|
3511
3511
|
continue;
|
|
3512
3512
|
const p = n.items[c], b = p.type;
|
|
3513
3513
|
if (typeof b == "number" || St(b)) {
|
|
@@ -3516,9 +3516,9 @@ class Bf {
|
|
|
3516
3516
|
throw new Error("Converter is empty");
|
|
3517
3517
|
if (p.repeated)
|
|
3518
3518
|
if (p.implicit) {
|
|
3519
|
-
const A = p.repeated === "sequence" ? kt : At,
|
|
3520
|
-
|
|
3521
|
-
const g = pr(
|
|
3519
|
+
const A = p.repeated === "sequence" ? kt : At, d = new A();
|
|
3520
|
+
d.valueBlock = f.valueBlock;
|
|
3521
|
+
const g = pr(d.toBER(!1));
|
|
3522
3522
|
if (g.offset === -1)
|
|
3523
3523
|
throw new Error(`Cannot parse the child item. ${g.result.error}`);
|
|
3524
3524
|
if (!("value" in g.result.valueBlock && Array.isArray(g.result.valueBlock.value)))
|
|
@@ -3526,29 +3526,29 @@ class Bf {
|
|
|
3526
3526
|
const h = g.result.valueBlock.value;
|
|
3527
3527
|
u[c] = Array.from(h, (v) => P.fromASN(v));
|
|
3528
3528
|
} else
|
|
3529
|
-
u[c] = Array.from(
|
|
3529
|
+
u[c] = Array.from(f, (A) => P.fromASN(A));
|
|
3530
3530
|
else {
|
|
3531
|
-
let A =
|
|
3531
|
+
let A = f;
|
|
3532
3532
|
if (p.implicit) {
|
|
3533
|
-
let
|
|
3533
|
+
let d;
|
|
3534
3534
|
if (St(b))
|
|
3535
|
-
|
|
3535
|
+
d = new b().toSchema("");
|
|
3536
3536
|
else {
|
|
3537
|
-
const g = m[b], h =
|
|
3537
|
+
const g = m[b], h = fu[g];
|
|
3538
3538
|
if (!h)
|
|
3539
3539
|
throw new Error(`Cannot get '${g}' class from asn1js module`);
|
|
3540
|
-
|
|
3540
|
+
d = new h();
|
|
3541
3541
|
}
|
|
3542
|
-
|
|
3542
|
+
d.valueBlock = A.valueBlock, A = pr(d.toBER(!1)).result;
|
|
3543
3543
|
}
|
|
3544
3544
|
u[c] = P.fromASN(A);
|
|
3545
3545
|
}
|
|
3546
3546
|
} else if (p.repeated) {
|
|
3547
|
-
if (!Array.isArray(
|
|
3547
|
+
if (!Array.isArray(f))
|
|
3548
3548
|
throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");
|
|
3549
|
-
u[c] = Array.from(
|
|
3549
|
+
u[c] = Array.from(f, (P) => this.fromASN(P, b));
|
|
3550
3550
|
} else
|
|
3551
|
-
u[c] = this.fromASN(
|
|
3551
|
+
u[c] = this.fromASN(f, b);
|
|
3552
3552
|
}
|
|
3553
3553
|
return u;
|
|
3554
3554
|
} catch (n) {
|
|
@@ -3581,14 +3581,14 @@ class Wo {
|
|
|
3581
3581
|
} else
|
|
3582
3582
|
for (const a in i.items) {
|
|
3583
3583
|
const u = i.items[a], c = e[a];
|
|
3584
|
-
if (c === void 0 || u.defaultValue === c || typeof u.defaultValue == "object" && typeof c == "object" &&
|
|
3584
|
+
if (c === void 0 || u.defaultValue === c || typeof u.defaultValue == "object" && typeof c == "object" && xd(this.serialize(u.defaultValue), this.serialize(c)))
|
|
3585
3585
|
continue;
|
|
3586
|
-
const
|
|
3586
|
+
const f = Wo.toAsnItem(u, a, t, c);
|
|
3587
3587
|
if (typeof u.context == "number")
|
|
3588
3588
|
if (u.implicit)
|
|
3589
3589
|
if (!u.repeated && (typeof u.type == "number" || St(u.type))) {
|
|
3590
3590
|
const p = {};
|
|
3591
|
-
p.valueHex =
|
|
3591
|
+
p.valueHex = f instanceof er ? f.valueBeforeDecodeView : f.valueBlock.toBER(), n.push(new li({
|
|
3592
3592
|
optional: u.optional,
|
|
3593
3593
|
idBlock: {
|
|
3594
3594
|
tagClass: 3,
|
|
@@ -3603,7 +3603,7 @@ class Wo {
|
|
|
3603
3603
|
tagClass: 3,
|
|
3604
3604
|
tagNumber: u.context
|
|
3605
3605
|
},
|
|
3606
|
-
value:
|
|
3606
|
+
value: f.valueBlock.value
|
|
3607
3607
|
}));
|
|
3608
3608
|
else
|
|
3609
3609
|
n.push(new qe({
|
|
@@ -3612,10 +3612,10 @@ class Wo {
|
|
|
3612
3612
|
tagClass: 3,
|
|
3613
3613
|
tagNumber: u.context
|
|
3614
3614
|
},
|
|
3615
|
-
value: [
|
|
3615
|
+
value: [f]
|
|
3616
3616
|
}));
|
|
3617
3617
|
else
|
|
3618
|
-
u.repeated ? n = n.concat(
|
|
3618
|
+
u.repeated ? n = n.concat(f) : n.push(f);
|
|
3619
3619
|
}
|
|
3620
3620
|
let s;
|
|
3621
3621
|
switch (i.type) {
|
|
@@ -3642,7 +3642,7 @@ class Wo {
|
|
|
3642
3642
|
if (e.repeated) {
|
|
3643
3643
|
if (!Array.isArray(n))
|
|
3644
3644
|
throw new TypeError("Parameter 'objProp' should be type of Array.");
|
|
3645
|
-
const u = Array.from(n, (
|
|
3645
|
+
const u = Array.from(n, (f) => a.toASN(f)), c = e.repeated === "sequence" ? kt : At;
|
|
3646
3646
|
s = new c({
|
|
3647
3647
|
value: u
|
|
3648
3648
|
});
|
|
@@ -3676,7 +3676,7 @@ class z {
|
|
|
3676
3676
|
return Wo.serialize(e);
|
|
3677
3677
|
}
|
|
3678
3678
|
static parse(e, t) {
|
|
3679
|
-
return
|
|
3679
|
+
return Bd.parse(e, t);
|
|
3680
3680
|
}
|
|
3681
3681
|
static toString(e) {
|
|
3682
3682
|
const t = U.isBufferSource(e) ? U.toArrayBuffer(e) : z.serialize(e), i = pr(t);
|
|
@@ -3708,18 +3708,18 @@ var hu = { exports: {} };
|
|
|
3708
3708
|
deprecatedTransitional: new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`, "i"),
|
|
3709
3709
|
transitional: new RegExp(`^((?:${u})|(?:::)(?:${u})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`, "i")
|
|
3710
3710
|
};
|
|
3711
|
-
function d
|
|
3712
|
-
if (
|
|
3711
|
+
function f(d, g) {
|
|
3712
|
+
if (d.indexOf("::") !== d.lastIndexOf("::"))
|
|
3713
3713
|
return null;
|
|
3714
|
-
let h = 0, v = -1, w = (
|
|
3715
|
-
for (w && (w = w.substring(1),
|
|
3714
|
+
let h = 0, v = -1, w = (d.match(c.zoneIndex) || [])[0], y, B;
|
|
3715
|
+
for (w && (w = w.substring(1), d = d.replace(/%.+$/, "")); (v = d.indexOf(":", v + 1)) >= 0; )
|
|
3716
3716
|
h++;
|
|
3717
|
-
if (
|
|
3717
|
+
if (d.substr(0, 2) === "::" && h--, d.substr(-2, 2) === "::" && h--, h > g)
|
|
3718
3718
|
return null;
|
|
3719
3719
|
for (B = g - h, y = ":"; B--; )
|
|
3720
3720
|
y += "0:";
|
|
3721
|
-
return
|
|
3722
|
-
const E =
|
|
3721
|
+
return d = d.replace("::", y), d[0] === ":" && (d = d.slice(1)), d[d.length - 1] === ":" && (d = d.slice(0, -1)), g = function() {
|
|
3722
|
+
const E = d.split(":"), I = [];
|
|
3723
3723
|
for (let T = 0; T < E.length; T++)
|
|
3724
3724
|
I.push(parseInt(E[T], 16));
|
|
3725
3725
|
return I;
|
|
@@ -3728,35 +3728,35 @@ var hu = { exports: {} };
|
|
|
3728
3728
|
zoneId: w
|
|
3729
3729
|
};
|
|
3730
3730
|
}
|
|
3731
|
-
function p(
|
|
3732
|
-
if (
|
|
3731
|
+
function p(d, g, h, v) {
|
|
3732
|
+
if (d.length !== g.length)
|
|
3733
3733
|
throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
|
|
3734
3734
|
let w = 0, y;
|
|
3735
3735
|
for (; v > 0; ) {
|
|
3736
|
-
if (y = h - v, y < 0 && (y = 0),
|
|
3736
|
+
if (y = h - v, y < 0 && (y = 0), d[w] >> y !== g[w] >> y)
|
|
3737
3737
|
return !1;
|
|
3738
3738
|
v -= h, w += 1;
|
|
3739
3739
|
}
|
|
3740
3740
|
return !0;
|
|
3741
3741
|
}
|
|
3742
|
-
function b(
|
|
3743
|
-
if (s.test(
|
|
3744
|
-
return parseInt(
|
|
3745
|
-
if (
|
|
3746
|
-
if (n.test(
|
|
3747
|
-
return parseInt(
|
|
3748
|
-
throw new Error(`ipaddr: cannot parse ${
|
|
3742
|
+
function b(d) {
|
|
3743
|
+
if (s.test(d))
|
|
3744
|
+
return parseInt(d, 16);
|
|
3745
|
+
if (d[0] === "0" && !isNaN(parseInt(d[1], 10))) {
|
|
3746
|
+
if (n.test(d))
|
|
3747
|
+
return parseInt(d, 8);
|
|
3748
|
+
throw new Error(`ipaddr: cannot parse ${d} as octal`);
|
|
3749
3749
|
}
|
|
3750
|
-
return parseInt(
|
|
3750
|
+
return parseInt(d, 10);
|
|
3751
3751
|
}
|
|
3752
|
-
function P(
|
|
3753
|
-
for (;
|
|
3754
|
-
|
|
3755
|
-
return
|
|
3752
|
+
function P(d, g) {
|
|
3753
|
+
for (; d.length < g; )
|
|
3754
|
+
d = `0${d}`;
|
|
3755
|
+
return d;
|
|
3756
3756
|
}
|
|
3757
3757
|
const A = {};
|
|
3758
3758
|
A.IPv4 = function() {
|
|
3759
|
-
function
|
|
3759
|
+
function d(g) {
|
|
3760
3760
|
if (g.length !== 4)
|
|
3761
3761
|
throw new Error("ipaddr: ipv4 octet count should be 4");
|
|
3762
3762
|
let h, v;
|
|
@@ -3765,41 +3765,41 @@ var hu = { exports: {} };
|
|
|
3765
3765
|
throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
|
|
3766
3766
|
this.octets = g;
|
|
3767
3767
|
}
|
|
3768
|
-
return
|
|
3769
|
-
unspecified: [[new
|
|
3770
|
-
broadcast: [[new
|
|
3768
|
+
return d.prototype.SpecialRanges = {
|
|
3769
|
+
unspecified: [[new d([0, 0, 0, 0]), 8]],
|
|
3770
|
+
broadcast: [[new d([255, 255, 255, 255]), 32]],
|
|
3771
3771
|
// RFC3171
|
|
3772
|
-
multicast: [[new
|
|
3772
|
+
multicast: [[new d([224, 0, 0, 0]), 4]],
|
|
3773
3773
|
// RFC3927
|
|
3774
|
-
linkLocal: [[new
|
|
3774
|
+
linkLocal: [[new d([169, 254, 0, 0]), 16]],
|
|
3775
3775
|
// RFC5735
|
|
3776
|
-
loopback: [[new
|
|
3776
|
+
loopback: [[new d([127, 0, 0, 0]), 8]],
|
|
3777
3777
|
// RFC6598
|
|
3778
|
-
carrierGradeNat: [[new
|
|
3778
|
+
carrierGradeNat: [[new d([100, 64, 0, 0]), 10]],
|
|
3779
3779
|
// RFC1918
|
|
3780
3780
|
private: [
|
|
3781
|
-
[new
|
|
3782
|
-
[new
|
|
3783
|
-
[new
|
|
3781
|
+
[new d([10, 0, 0, 0]), 8],
|
|
3782
|
+
[new d([172, 16, 0, 0]), 12],
|
|
3783
|
+
[new d([192, 168, 0, 0]), 16]
|
|
3784
3784
|
],
|
|
3785
3785
|
// Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700
|
|
3786
3786
|
reserved: [
|
|
3787
|
-
[new
|
|
3788
|
-
[new
|
|
3789
|
-
[new
|
|
3790
|
-
[new
|
|
3791
|
-
[new
|
|
3792
|
-
[new
|
|
3793
|
-
[new
|
|
3787
|
+
[new d([192, 0, 0, 0]), 24],
|
|
3788
|
+
[new d([192, 0, 2, 0]), 24],
|
|
3789
|
+
[new d([192, 88, 99, 0]), 24],
|
|
3790
|
+
[new d([198, 18, 0, 0]), 15],
|
|
3791
|
+
[new d([198, 51, 100, 0]), 24],
|
|
3792
|
+
[new d([203, 0, 113, 0]), 24],
|
|
3793
|
+
[new d([240, 0, 0, 0]), 4]
|
|
3794
3794
|
]
|
|
3795
|
-
},
|
|
3795
|
+
}, d.prototype.kind = function() {
|
|
3796
3796
|
return "ipv4";
|
|
3797
|
-
},
|
|
3797
|
+
}, d.prototype.match = function(g, h) {
|
|
3798
3798
|
let v;
|
|
3799
3799
|
if (h === void 0 && (v = g, g = v[0], h = v[1]), g.kind() !== "ipv4")
|
|
3800
3800
|
throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
|
|
3801
3801
|
return p(this.octets, g.octets, 8, h);
|
|
3802
|
-
},
|
|
3802
|
+
}, d.prototype.prefixLengthFromSubnetMask = function() {
|
|
3803
3803
|
let g = 0, h = !1;
|
|
3804
3804
|
const v = {
|
|
3805
3805
|
0: 8,
|
|
@@ -3821,20 +3821,20 @@ var hu = { exports: {} };
|
|
|
3821
3821
|
} else
|
|
3822
3822
|
return null;
|
|
3823
3823
|
return 32 - g;
|
|
3824
|
-
},
|
|
3824
|
+
}, d.prototype.range = function() {
|
|
3825
3825
|
return A.subnetMatch(this, this.SpecialRanges);
|
|
3826
|
-
},
|
|
3826
|
+
}, d.prototype.toByteArray = function() {
|
|
3827
3827
|
return this.octets.slice(0);
|
|
3828
|
-
},
|
|
3828
|
+
}, d.prototype.toIPv4MappedAddress = function() {
|
|
3829
3829
|
return A.IPv6.parse(`::ffff:${this.toString()}`);
|
|
3830
|
-
},
|
|
3830
|
+
}, d.prototype.toNormalizedString = function() {
|
|
3831
3831
|
return this.toString();
|
|
3832
|
-
},
|
|
3832
|
+
}, d.prototype.toString = function() {
|
|
3833
3833
|
return this.octets.join(".");
|
|
3834
|
-
},
|
|
3835
|
-
}(), A.IPv4.broadcastAddressFromCIDR = function(
|
|
3834
|
+
}, d;
|
|
3835
|
+
}(), A.IPv4.broadcastAddressFromCIDR = function(d) {
|
|
3836
3836
|
try {
|
|
3837
|
-
const g = this.parseCIDR(
|
|
3837
|
+
const g = this.parseCIDR(d), h = g[0].toByteArray(), v = this.subnetMaskFromPrefixLength(g[1]).toByteArray(), w = [];
|
|
3838
3838
|
let y = 0;
|
|
3839
3839
|
for (; y < 4; )
|
|
3840
3840
|
w.push(parseInt(h[y], 10) | parseInt(v[y], 10) ^ 255), y++;
|
|
@@ -3842,33 +3842,33 @@ var hu = { exports: {} };
|
|
|
3842
3842
|
} catch {
|
|
3843
3843
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
3844
3844
|
}
|
|
3845
|
-
}, A.IPv4.isIPv4 = function(
|
|
3846
|
-
return this.parser(
|
|
3847
|
-
}, A.IPv4.isValid = function(
|
|
3845
|
+
}, A.IPv4.isIPv4 = function(d) {
|
|
3846
|
+
return this.parser(d) !== null;
|
|
3847
|
+
}, A.IPv4.isValid = function(d) {
|
|
3848
3848
|
try {
|
|
3849
|
-
return new this(this.parser(
|
|
3849
|
+
return new this(this.parser(d)), !0;
|
|
3850
3850
|
} catch {
|
|
3851
3851
|
return !1;
|
|
3852
3852
|
}
|
|
3853
|
-
}, A.IPv4.isValidFourPartDecimal = function(
|
|
3854
|
-
return !!(A.IPv4.isValid(
|
|
3855
|
-
}, A.IPv4.networkAddressFromCIDR = function(
|
|
3853
|
+
}, A.IPv4.isValidFourPartDecimal = function(d) {
|
|
3854
|
+
return !!(A.IPv4.isValid(d) && d.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/));
|
|
3855
|
+
}, A.IPv4.networkAddressFromCIDR = function(d) {
|
|
3856
3856
|
let g, h, v, w, y;
|
|
3857
3857
|
try {
|
|
3858
|
-
for (g = this.parseCIDR(
|
|
3858
|
+
for (g = this.parseCIDR(d), v = g[0].toByteArray(), y = this.subnetMaskFromPrefixLength(g[1]).toByteArray(), w = [], h = 0; h < 4; )
|
|
3859
3859
|
w.push(parseInt(v[h], 10) & parseInt(y[h], 10)), h++;
|
|
3860
3860
|
return new this(w);
|
|
3861
3861
|
} catch {
|
|
3862
3862
|
throw new Error("ipaddr: the address does not have IPv4 CIDR format");
|
|
3863
3863
|
}
|
|
3864
|
-
}, A.IPv4.parse = function(
|
|
3865
|
-
const g = this.parser(
|
|
3864
|
+
}, A.IPv4.parse = function(d) {
|
|
3865
|
+
const g = this.parser(d);
|
|
3866
3866
|
if (g === null)
|
|
3867
3867
|
throw new Error("ipaddr: string is not formatted like an IPv4 Address");
|
|
3868
3868
|
return new this(g);
|
|
3869
|
-
}, A.IPv4.parseCIDR = function(
|
|
3869
|
+
}, A.IPv4.parseCIDR = function(d) {
|
|
3870
3870
|
let g;
|
|
3871
|
-
if (g =
|
|
3871
|
+
if (g = d.match(/^(.+)\/(\d+)$/)) {
|
|
3872
3872
|
const h = parseInt(g[2]);
|
|
3873
3873
|
if (h >= 0 && h <= 32) {
|
|
3874
3874
|
const v = [this.parse(g[1]), h];
|
|
@@ -3880,16 +3880,16 @@ var hu = { exports: {} };
|
|
|
3880
3880
|
}
|
|
3881
3881
|
}
|
|
3882
3882
|
throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
|
|
3883
|
-
}, A.IPv4.parser = function(
|
|
3883
|
+
}, A.IPv4.parser = function(d) {
|
|
3884
3884
|
let g, h, v;
|
|
3885
|
-
if (g =
|
|
3885
|
+
if (g = d.match(i.fourOctet))
|
|
3886
3886
|
return function() {
|
|
3887
3887
|
const w = g.slice(1, 6), y = [];
|
|
3888
3888
|
for (let B = 0; B < w.length; B++)
|
|
3889
3889
|
h = w[B], y.push(b(h));
|
|
3890
3890
|
return y;
|
|
3891
3891
|
}();
|
|
3892
|
-
if (g =
|
|
3892
|
+
if (g = d.match(i.longValue)) {
|
|
3893
3893
|
if (v = b(g[1]), v > 4294967295 || v < 0)
|
|
3894
3894
|
throw new Error("ipaddr: address outside defined range");
|
|
3895
3895
|
return function() {
|
|
@@ -3900,28 +3900,28 @@ var hu = { exports: {} };
|
|
|
3900
3900
|
return w;
|
|
3901
3901
|
}().reverse();
|
|
3902
3902
|
} else
|
|
3903
|
-
return (g =
|
|
3903
|
+
return (g = d.match(i.twoOctet)) ? function() {
|
|
3904
3904
|
const w = g.slice(1, 4), y = [];
|
|
3905
3905
|
if (v = b(w[1]), v > 16777215 || v < 0)
|
|
3906
3906
|
throw new Error("ipaddr: address outside defined range");
|
|
3907
3907
|
return y.push(b(w[0])), y.push(v >> 16 & 255), y.push(v >> 8 & 255), y.push(v & 255), y;
|
|
3908
|
-
}() : (g =
|
|
3908
|
+
}() : (g = d.match(i.threeOctet)) ? function() {
|
|
3909
3909
|
const w = g.slice(1, 5), y = [];
|
|
3910
3910
|
if (v = b(w[2]), v > 65535 || v < 0)
|
|
3911
3911
|
throw new Error("ipaddr: address outside defined range");
|
|
3912
3912
|
return y.push(b(w[0])), y.push(b(w[1])), y.push(v >> 8 & 255), y.push(v & 255), y;
|
|
3913
3913
|
}() : null;
|
|
3914
|
-
}, A.IPv4.subnetMaskFromPrefixLength = function(
|
|
3915
|
-
if (
|
|
3914
|
+
}, A.IPv4.subnetMaskFromPrefixLength = function(d) {
|
|
3915
|
+
if (d = parseInt(d), d < 0 || d > 32)
|
|
3916
3916
|
throw new Error("ipaddr: invalid IPv4 prefix length");
|
|
3917
3917
|
const g = [0, 0, 0, 0];
|
|
3918
3918
|
let h = 0;
|
|
3919
|
-
const v = Math.floor(
|
|
3919
|
+
const v = Math.floor(d / 8);
|
|
3920
3920
|
for (; h < v; )
|
|
3921
3921
|
g[h] = 255, h++;
|
|
3922
|
-
return v < 4 && (g[v] = Math.pow(2,
|
|
3922
|
+
return v < 4 && (g[v] = Math.pow(2, d % 8) - 1 << 8 - d % 8), new this(g);
|
|
3923
3923
|
}, A.IPv6 = function() {
|
|
3924
|
-
function
|
|
3924
|
+
function d(g, h) {
|
|
3925
3925
|
let v, w;
|
|
3926
3926
|
if (g.length === 16)
|
|
3927
3927
|
for (this.parts = [], v = 0; v <= 14; v += 2)
|
|
@@ -3935,39 +3935,39 @@ var hu = { exports: {} };
|
|
|
3935
3935
|
throw new Error("ipaddr: ipv6 part should fit in 16 bits");
|
|
3936
3936
|
h && (this.zoneId = h);
|
|
3937
3937
|
}
|
|
3938
|
-
return
|
|
3938
|
+
return d.prototype.SpecialRanges = {
|
|
3939
3939
|
// RFC4291, here and after
|
|
3940
|
-
unspecified: [new
|
|
3941
|
-
linkLocal: [new
|
|
3942
|
-
multicast: [new
|
|
3943
|
-
loopback: [new
|
|
3944
|
-
uniqueLocal: [new
|
|
3945
|
-
ipv4Mapped: [new
|
|
3940
|
+
unspecified: [new d([0, 0, 0, 0, 0, 0, 0, 0]), 128],
|
|
3941
|
+
linkLocal: [new d([65152, 0, 0, 0, 0, 0, 0, 0]), 10],
|
|
3942
|
+
multicast: [new d([65280, 0, 0, 0, 0, 0, 0, 0]), 8],
|
|
3943
|
+
loopback: [new d([0, 0, 0, 0, 0, 0, 0, 1]), 128],
|
|
3944
|
+
uniqueLocal: [new d([64512, 0, 0, 0, 0, 0, 0, 0]), 7],
|
|
3945
|
+
ipv4Mapped: [new d([0, 0, 0, 0, 0, 65535, 0, 0]), 96],
|
|
3946
3946
|
// RFC6145
|
|
3947
|
-
rfc6145: [new
|
|
3947
|
+
rfc6145: [new d([0, 0, 0, 0, 65535, 0, 0, 0]), 96],
|
|
3948
3948
|
// RFC6052
|
|
3949
|
-
rfc6052: [new
|
|
3949
|
+
rfc6052: [new d([100, 65435, 0, 0, 0, 0, 0, 0]), 96],
|
|
3950
3950
|
// RFC3056
|
|
3951
|
-
"6to4": [new
|
|
3951
|
+
"6to4": [new d([8194, 0, 0, 0, 0, 0, 0, 0]), 16],
|
|
3952
3952
|
// RFC6052, RFC6146
|
|
3953
|
-
teredo: [new
|
|
3953
|
+
teredo: [new d([8193, 0, 0, 0, 0, 0, 0, 0]), 32],
|
|
3954
3954
|
// RFC4291
|
|
3955
|
-
reserved: [[new
|
|
3956
|
-
benchmarking: [new
|
|
3957
|
-
amt: [new
|
|
3958
|
-
as112v6: [new
|
|
3959
|
-
deprecated: [new
|
|
3960
|
-
orchid2: [new
|
|
3961
|
-
},
|
|
3955
|
+
reserved: [[new d([8193, 3512, 0, 0, 0, 0, 0, 0]), 32]],
|
|
3956
|
+
benchmarking: [new d([8193, 2, 0, 0, 0, 0, 0, 0]), 48],
|
|
3957
|
+
amt: [new d([8193, 3, 0, 0, 0, 0, 0, 0]), 32],
|
|
3958
|
+
as112v6: [new d([8193, 4, 274, 0, 0, 0, 0, 0]), 48],
|
|
3959
|
+
deprecated: [new d([8193, 16, 0, 0, 0, 0, 0, 0]), 28],
|
|
3960
|
+
orchid2: [new d([8193, 32, 0, 0, 0, 0, 0, 0]), 28]
|
|
3961
|
+
}, d.prototype.isIPv4MappedAddress = function() {
|
|
3962
3962
|
return this.range() === "ipv4Mapped";
|
|
3963
|
-
},
|
|
3963
|
+
}, d.prototype.kind = function() {
|
|
3964
3964
|
return "ipv6";
|
|
3965
|
-
},
|
|
3965
|
+
}, d.prototype.match = function(g, h) {
|
|
3966
3966
|
let v;
|
|
3967
3967
|
if (h === void 0 && (v = g, g = v[0], h = v[1]), g.kind() !== "ipv6")
|
|
3968
3968
|
throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
|
|
3969
3969
|
return p(this.parts, g.parts, 16, h);
|
|
3970
|
-
},
|
|
3970
|
+
}, d.prototype.prefixLengthFromSubnetMask = function() {
|
|
3971
3971
|
let g = 0, h = !1;
|
|
3972
3972
|
const v = {
|
|
3973
3973
|
0: 16,
|
|
@@ -3997,15 +3997,15 @@ var hu = { exports: {} };
|
|
|
3997
3997
|
} else
|
|
3998
3998
|
return null;
|
|
3999
3999
|
return 128 - g;
|
|
4000
|
-
},
|
|
4000
|
+
}, d.prototype.range = function() {
|
|
4001
4001
|
return A.subnetMatch(this, this.SpecialRanges);
|
|
4002
|
-
},
|
|
4002
|
+
}, d.prototype.toByteArray = function() {
|
|
4003
4003
|
let g;
|
|
4004
4004
|
const h = [], v = this.parts;
|
|
4005
4005
|
for (let w = 0; w < v.length; w++)
|
|
4006
4006
|
g = v[w], h.push(g >> 8), h.push(g & 255);
|
|
4007
4007
|
return h;
|
|
4008
|
-
},
|
|
4008
|
+
}, d.prototype.toFixedLengthString = function() {
|
|
4009
4009
|
const g = (function() {
|
|
4010
4010
|
const v = [];
|
|
4011
4011
|
for (let w = 0; w < this.parts.length; w++)
|
|
@@ -4014,12 +4014,12 @@ var hu = { exports: {} };
|
|
|
4014
4014
|
}).call(this).join(":");
|
|
4015
4015
|
let h = "";
|
|
4016
4016
|
return this.zoneId && (h = `%${this.zoneId}`), g + h;
|
|
4017
|
-
},
|
|
4017
|
+
}, d.prototype.toIPv4Address = function() {
|
|
4018
4018
|
if (!this.isIPv4MappedAddress())
|
|
4019
4019
|
throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
|
|
4020
4020
|
const g = this.parts.slice(-2), h = g[0], v = g[1];
|
|
4021
4021
|
return new A.IPv4([h >> 8, h & 255, v >> 8, v & 255]);
|
|
4022
|
-
},
|
|
4022
|
+
}, d.prototype.toNormalizedString = function() {
|
|
4023
4023
|
const g = (function() {
|
|
4024
4024
|
const v = [];
|
|
4025
4025
|
for (let w = 0; w < this.parts.length; w++)
|
|
@@ -4028,18 +4028,18 @@ var hu = { exports: {} };
|
|
|
4028
4028
|
}).call(this).join(":");
|
|
4029
4029
|
let h = "";
|
|
4030
4030
|
return this.zoneId && (h = `%${this.zoneId}`), g + h;
|
|
4031
|
-
},
|
|
4031
|
+
}, d.prototype.toRFC5952String = function() {
|
|
4032
4032
|
const g = /((^|:)(0(:|$)){2,})/g, h = this.toNormalizedString();
|
|
4033
4033
|
let v = 0, w = -1, y;
|
|
4034
4034
|
for (; y = g.exec(h); )
|
|
4035
4035
|
y[0].length > w && (v = y.index, w = y[0].length);
|
|
4036
4036
|
return w < 0 ? h : `${h.substring(0, v)}::${h.substring(v + w)}`;
|
|
4037
|
-
},
|
|
4037
|
+
}, d.prototype.toString = function() {
|
|
4038
4038
|
return this.toRFC5952String();
|
|
4039
|
-
},
|
|
4040
|
-
}(), A.IPv6.broadcastAddressFromCIDR = function(
|
|
4039
|
+
}, d;
|
|
4040
|
+
}(), A.IPv6.broadcastAddressFromCIDR = function(d) {
|
|
4041
4041
|
try {
|
|
4042
|
-
const g = this.parseCIDR(
|
|
4042
|
+
const g = this.parseCIDR(d), h = g[0].toByteArray(), v = this.subnetMaskFromPrefixLength(g[1]).toByteArray(), w = [];
|
|
4043
4043
|
let y = 0;
|
|
4044
4044
|
for (; y < 16; )
|
|
4045
4045
|
w.push(parseInt(h[y], 10) | parseInt(v[y], 10) ^ 255), y++;
|
|
@@ -4047,47 +4047,47 @@ var hu = { exports: {} };
|
|
|
4047
4047
|
} catch (g) {
|
|
4048
4048
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${g})`);
|
|
4049
4049
|
}
|
|
4050
|
-
}, A.IPv6.isIPv6 = function(
|
|
4051
|
-
return this.parser(
|
|
4052
|
-
}, A.IPv6.isValid = function(
|
|
4053
|
-
if (typeof
|
|
4050
|
+
}, A.IPv6.isIPv6 = function(d) {
|
|
4051
|
+
return this.parser(d) !== null;
|
|
4052
|
+
}, A.IPv6.isValid = function(d) {
|
|
4053
|
+
if (typeof d == "string" && d.indexOf(":") === -1)
|
|
4054
4054
|
return !1;
|
|
4055
4055
|
try {
|
|
4056
|
-
const g = this.parser(
|
|
4056
|
+
const g = this.parser(d);
|
|
4057
4057
|
return new this(g.parts, g.zoneId), !0;
|
|
4058
4058
|
} catch {
|
|
4059
4059
|
return !1;
|
|
4060
4060
|
}
|
|
4061
|
-
}, A.IPv6.networkAddressFromCIDR = function(
|
|
4061
|
+
}, A.IPv6.networkAddressFromCIDR = function(d) {
|
|
4062
4062
|
let g, h, v, w, y;
|
|
4063
4063
|
try {
|
|
4064
|
-
for (g = this.parseCIDR(
|
|
4064
|
+
for (g = this.parseCIDR(d), v = g[0].toByteArray(), y = this.subnetMaskFromPrefixLength(g[1]).toByteArray(), w = [], h = 0; h < 16; )
|
|
4065
4065
|
w.push(parseInt(v[h], 10) & parseInt(y[h], 10)), h++;
|
|
4066
4066
|
return new this(w);
|
|
4067
4067
|
} catch (B) {
|
|
4068
4068
|
throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${B})`);
|
|
4069
4069
|
}
|
|
4070
|
-
}, A.IPv6.parse = function(
|
|
4071
|
-
const g = this.parser(
|
|
4070
|
+
}, A.IPv6.parse = function(d) {
|
|
4071
|
+
const g = this.parser(d);
|
|
4072
4072
|
if (g.parts === null)
|
|
4073
4073
|
throw new Error("ipaddr: string is not formatted like an IPv6 Address");
|
|
4074
4074
|
return new this(g.parts, g.zoneId);
|
|
4075
|
-
}, A.IPv6.parseCIDR = function(
|
|
4075
|
+
}, A.IPv6.parseCIDR = function(d) {
|
|
4076
4076
|
let g, h, v;
|
|
4077
|
-
if ((h =
|
|
4077
|
+
if ((h = d.match(/^(.+)\/(\d+)$/)) && (g = parseInt(h[2]), g >= 0 && g <= 128))
|
|
4078
4078
|
return v = [this.parse(h[1]), g], Object.defineProperty(v, "toString", {
|
|
4079
4079
|
value: function() {
|
|
4080
4080
|
return this.join("/");
|
|
4081
4081
|
}
|
|
4082
4082
|
}), v;
|
|
4083
4083
|
throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
|
|
4084
|
-
}, A.IPv6.parser = function(
|
|
4084
|
+
}, A.IPv6.parser = function(d) {
|
|
4085
4085
|
let g, h, v, w, y, B;
|
|
4086
|
-
if (v =
|
|
4086
|
+
if (v = d.match(c.deprecatedTransitional))
|
|
4087
4087
|
return this.parser(`::ffff:${v[1]}`);
|
|
4088
|
-
if (c.native.test(
|
|
4089
|
-
return d
|
|
4090
|
-
if ((v =
|
|
4088
|
+
if (c.native.test(d))
|
|
4089
|
+
return f(d, 8);
|
|
4090
|
+
if ((v = d.match(c.transitional)) && (B = v[6] || "", g = f(v[1].slice(0, -1) + B, 6), g.parts)) {
|
|
4091
4091
|
for (y = [
|
|
4092
4092
|
parseInt(v[2]),
|
|
4093
4093
|
parseInt(v[3]),
|
|
@@ -4102,50 +4102,50 @@ var hu = { exports: {} };
|
|
|
4102
4102
|
};
|
|
4103
4103
|
}
|
|
4104
4104
|
return null;
|
|
4105
|
-
}, A.IPv6.subnetMaskFromPrefixLength = function(
|
|
4106
|
-
if (
|
|
4105
|
+
}, A.IPv6.subnetMaskFromPrefixLength = function(d) {
|
|
4106
|
+
if (d = parseInt(d), d < 0 || d > 128)
|
|
4107
4107
|
throw new Error("ipaddr: invalid IPv6 prefix length");
|
|
4108
4108
|
const g = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
4109
4109
|
let h = 0;
|
|
4110
|
-
const v = Math.floor(
|
|
4110
|
+
const v = Math.floor(d / 8);
|
|
4111
4111
|
for (; h < v; )
|
|
4112
4112
|
g[h] = 255, h++;
|
|
4113
|
-
return v < 16 && (g[v] = Math.pow(2,
|
|
4114
|
-
}, A.fromByteArray = function(
|
|
4115
|
-
const g =
|
|
4113
|
+
return v < 16 && (g[v] = Math.pow(2, d % 8) - 1 << 8 - d % 8), new this(g);
|
|
4114
|
+
}, A.fromByteArray = function(d) {
|
|
4115
|
+
const g = d.length;
|
|
4116
4116
|
if (g === 4)
|
|
4117
|
-
return new A.IPv4(
|
|
4117
|
+
return new A.IPv4(d);
|
|
4118
4118
|
if (g === 16)
|
|
4119
|
-
return new A.IPv6(
|
|
4119
|
+
return new A.IPv6(d);
|
|
4120
4120
|
throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
|
|
4121
|
-
}, A.isValid = function(
|
|
4122
|
-
return A.IPv6.isValid(
|
|
4123
|
-
}, A.parse = function(
|
|
4124
|
-
if (A.IPv6.isValid(
|
|
4125
|
-
return A.IPv6.parse(
|
|
4126
|
-
if (A.IPv4.isValid(
|
|
4127
|
-
return A.IPv4.parse(
|
|
4121
|
+
}, A.isValid = function(d) {
|
|
4122
|
+
return A.IPv6.isValid(d) || A.IPv4.isValid(d);
|
|
4123
|
+
}, A.parse = function(d) {
|
|
4124
|
+
if (A.IPv6.isValid(d))
|
|
4125
|
+
return A.IPv6.parse(d);
|
|
4126
|
+
if (A.IPv4.isValid(d))
|
|
4127
|
+
return A.IPv4.parse(d);
|
|
4128
4128
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
|
|
4129
|
-
}, A.parseCIDR = function(
|
|
4129
|
+
}, A.parseCIDR = function(d) {
|
|
4130
4130
|
try {
|
|
4131
|
-
return A.IPv6.parseCIDR(
|
|
4131
|
+
return A.IPv6.parseCIDR(d);
|
|
4132
4132
|
} catch {
|
|
4133
4133
|
try {
|
|
4134
|
-
return A.IPv4.parseCIDR(
|
|
4134
|
+
return A.IPv4.parseCIDR(d);
|
|
4135
4135
|
} catch {
|
|
4136
4136
|
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
|
|
4137
4137
|
}
|
|
4138
4138
|
}
|
|
4139
|
-
}, A.process = function(
|
|
4140
|
-
const g = this.parse(
|
|
4139
|
+
}, A.process = function(d) {
|
|
4140
|
+
const g = this.parse(d);
|
|
4141
4141
|
return g.kind() === "ipv6" && g.isIPv4MappedAddress() ? g.toIPv4Address() : g;
|
|
4142
|
-
}, A.subnetMatch = function(
|
|
4142
|
+
}, A.subnetMatch = function(d, g, h) {
|
|
4143
4143
|
let v, w, y, B;
|
|
4144
4144
|
h == null && (h = "unicast");
|
|
4145
4145
|
for (w in g)
|
|
4146
4146
|
if (Object.prototype.hasOwnProperty.call(g, w)) {
|
|
4147
4147
|
for (y = g[w], y[0] && !(y[0] instanceof Array) && (y = [y]), v = 0; v < y.length; v++)
|
|
4148
|
-
if (B = y[v],
|
|
4148
|
+
if (B = y[v], d.kind() === B[0].kind() && d.match.apply(d, B))
|
|
4149
4149
|
return w;
|
|
4150
4150
|
}
|
|
4151
4151
|
return h;
|
|
@@ -4254,7 +4254,7 @@ let _e = ks = class extends As {
|
|
|
4254
4254
|
_e = ks = o([
|
|
4255
4255
|
j({ type: N.Sequence })
|
|
4256
4256
|
], _e);
|
|
4257
|
-
const
|
|
4257
|
+
const Id = {
|
|
4258
4258
|
fromASN: (r) => Ra.toString(Pi.fromASN(r)),
|
|
4259
4259
|
toASN: (r) => Pi.toASN(Ra.fromString(r))
|
|
4260
4260
|
};
|
|
@@ -4307,7 +4307,7 @@ o([
|
|
|
4307
4307
|
l({ type: m.IA5String, context: 6, implicit: !0 })
|
|
4308
4308
|
], se.prototype, "uniformResourceIdentifier", void 0);
|
|
4309
4309
|
o([
|
|
4310
|
-
l({ type: m.OctetString, context: 7, implicit: !0, converter:
|
|
4310
|
+
l({ type: m.OctetString, context: 7, implicit: !0, converter: Id })
|
|
4311
4311
|
], se.prototype, "iPAddress", void 0);
|
|
4312
4312
|
o([
|
|
4313
4313
|
l({ type: m.ObjectIdentifier, context: 8, implicit: !0 })
|
|
@@ -4315,7 +4315,7 @@ o([
|
|
|
4315
4315
|
se = o([
|
|
4316
4316
|
j({ type: N.Choice })
|
|
4317
4317
|
], se);
|
|
4318
|
-
const
|
|
4318
|
+
const Ed = "1.3.6.1.5.5.7", jr = `${Ed}.3`, ar = "2.5.29";
|
|
4319
4319
|
var xs;
|
|
4320
4320
|
class In {
|
|
4321
4321
|
constructor(e = {}) {
|
|
@@ -4337,7 +4337,7 @@ Va = xs = o([
|
|
|
4337
4337
|
j({ type: N.Sequence, itemType: In })
|
|
4338
4338
|
], Va);
|
|
4339
4339
|
const Cs = `${ar}.35`;
|
|
4340
|
-
class Yo extends
|
|
4340
|
+
class Yo extends de {
|
|
4341
4341
|
}
|
|
4342
4342
|
class zt {
|
|
4343
4343
|
constructor(e = {}) {
|
|
@@ -4523,27 +4523,27 @@ o([
|
|
|
4523
4523
|
br = o([
|
|
4524
4524
|
j({ type: N.Choice })
|
|
4525
4525
|
], br);
|
|
4526
|
-
class
|
|
4526
|
+
class di {
|
|
4527
4527
|
constructor(e = {}) {
|
|
4528
4528
|
Object.assign(this, e);
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
4531
|
o([
|
|
4532
4532
|
l({ type: br, context: 0, optional: !0 })
|
|
4533
|
-
],
|
|
4533
|
+
], di.prototype, "distributionPoint", void 0);
|
|
4534
4534
|
o([
|
|
4535
4535
|
l({ type: vu, context: 1, optional: !0, implicit: !0 })
|
|
4536
|
-
],
|
|
4536
|
+
], di.prototype, "reasons", void 0);
|
|
4537
4537
|
o([
|
|
4538
4538
|
l({ type: se, context: 2, optional: !0, repeated: "sequence", implicit: !0 })
|
|
4539
|
-
],
|
|
4539
|
+
], di.prototype, "cRLIssuer", void 0);
|
|
4540
4540
|
let Ns = _s = class extends ve {
|
|
4541
4541
|
constructor(e) {
|
|
4542
4542
|
super(e), Object.setPrototypeOf(this, _s.prototype);
|
|
4543
4543
|
}
|
|
4544
4544
|
};
|
|
4545
4545
|
Ns = _s = o([
|
|
4546
|
-
j({ type: N.Sequence, itemType:
|
|
4546
|
+
j({ type: N.Sequence, itemType: di })
|
|
4547
4547
|
], Ns);
|
|
4548
4548
|
var Os;
|
|
4549
4549
|
let Da = Os = class extends Ns {
|
|
@@ -4552,7 +4552,7 @@ let Da = Os = class extends Ns {
|
|
|
4552
4552
|
}
|
|
4553
4553
|
};
|
|
4554
4554
|
Da = Os = o([
|
|
4555
|
-
j({ type: N.Sequence, itemType:
|
|
4555
|
+
j({ type: N.Sequence, itemType: di })
|
|
4556
4556
|
], Da);
|
|
4557
4557
|
class Pe {
|
|
4558
4558
|
constructor(e = {}) {
|
|
@@ -4609,7 +4609,7 @@ let Mi = js = class extends ve {
|
|
|
4609
4609
|
Mi = js = o([
|
|
4610
4610
|
j({ type: N.Sequence, itemType: m.ObjectIdentifier })
|
|
4611
4611
|
], Mi);
|
|
4612
|
-
const
|
|
4612
|
+
const _d = `${jr}.1`, Nd = `${jr}.2`, Od = `${jr}.3`, Td = `${jr}.4`, jd = `${jr}.8`, Pd = `${jr}.9`;
|
|
4613
4613
|
let Ps = class {
|
|
4614
4614
|
constructor(e = new ArrayBuffer(0)) {
|
|
4615
4615
|
this.value = e;
|
|
@@ -4814,7 +4814,7 @@ class q {
|
|
|
4814
4814
|
this.algorithm = "", Object.assign(this, e);
|
|
4815
4815
|
}
|
|
4816
4816
|
isEqual(e) {
|
|
4817
|
-
return e instanceof q && e.algorithm == this.algorithm && (e.parameters && this.parameters &&
|
|
4817
|
+
return e instanceof q && e.algorithm == this.algorithm && (e.parameters && this.parameters && dl(e.parameters, this.parameters) || e.parameters === this.parameters);
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
4820
4820
|
o([
|
|
@@ -4882,7 +4882,7 @@ o([
|
|
|
4882
4882
|
var Ks;
|
|
4883
4883
|
let at = class Iu {
|
|
4884
4884
|
constructor(e = {}) {
|
|
4885
|
-
this.extnID = "", this.critical = Iu.CRITICAL, this.extnValue = new
|
|
4885
|
+
this.extnID = "", this.critical = Iu.CRITICAL, this.extnValue = new de(), Object.assign(this, e);
|
|
4886
4886
|
}
|
|
4887
4887
|
};
|
|
4888
4888
|
at.CRITICAL = !1;
|
|
@@ -4896,7 +4896,7 @@ o([
|
|
|
4896
4896
|
})
|
|
4897
4897
|
], at.prototype, "critical", void 0);
|
|
4898
4898
|
o([
|
|
4899
|
-
l({ type:
|
|
4899
|
+
l({ type: de })
|
|
4900
4900
|
], at.prototype, "extnValue", void 0);
|
|
4901
4901
|
let rr = Ks = class extends ve {
|
|
4902
4902
|
constructor(e) {
|
|
@@ -5251,7 +5251,7 @@ class Rn {
|
|
|
5251
5251
|
}
|
|
5252
5252
|
}
|
|
5253
5253
|
o([
|
|
5254
|
-
l({ type:
|
|
5254
|
+
l({ type: de })
|
|
5255
5255
|
], Rn.prototype, "cotets", void 0);
|
|
5256
5256
|
o([
|
|
5257
5257
|
l({ type: m.ObjectIdentifier })
|
|
@@ -5342,7 +5342,7 @@ o([
|
|
|
5342
5342
|
l({ type: se })
|
|
5343
5343
|
], sa.prototype, "ident", void 0);
|
|
5344
5344
|
o([
|
|
5345
|
-
l({ type:
|
|
5345
|
+
l({ type: de, optional: !0 })
|
|
5346
5346
|
], sa.prototype, "authInfo", void 0);
|
|
5347
5347
|
var Zs;
|
|
5348
5348
|
class oa {
|
|
@@ -5398,7 +5398,7 @@ let Zr = class {
|
|
|
5398
5398
|
}
|
|
5399
5399
|
};
|
|
5400
5400
|
o([
|
|
5401
|
-
l({ type:
|
|
5401
|
+
l({ type: de })
|
|
5402
5402
|
], Zr.prototype, "single", void 0);
|
|
5403
5403
|
o([
|
|
5404
5404
|
l({ type: m.Any })
|
|
@@ -5431,11 +5431,11 @@ let Fi = class extends q {
|
|
|
5431
5431
|
Fi = o([
|
|
5432
5432
|
j({ type: N.Sequence })
|
|
5433
5433
|
], Fi);
|
|
5434
|
-
let
|
|
5434
|
+
let dt = class extends q {
|
|
5435
5435
|
};
|
|
5436
|
-
|
|
5436
|
+
dt = o([
|
|
5437
5437
|
j({ type: N.Sequence })
|
|
5438
|
-
],
|
|
5438
|
+
], dt);
|
|
5439
5439
|
let qi = class extends q {
|
|
5440
5440
|
};
|
|
5441
5441
|
qi = o([
|
|
@@ -5457,10 +5457,10 @@ let Xr = class {
|
|
|
5457
5457
|
}
|
|
5458
5458
|
};
|
|
5459
5459
|
o([
|
|
5460
|
-
l({ type:
|
|
5460
|
+
l({ type: de, context: 0, implicit: !0, optional: !0 })
|
|
5461
5461
|
], Xr.prototype, "value", void 0);
|
|
5462
5462
|
o([
|
|
5463
|
-
l({ type:
|
|
5463
|
+
l({ type: de, converter: ld, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
|
|
5464
5464
|
], Xr.prototype, "constructedValue", void 0);
|
|
5465
5465
|
Xr = o([
|
|
5466
5466
|
j({ type: N.Choice })
|
|
@@ -5532,14 +5532,14 @@ Cr = o([
|
|
|
5532
5532
|
], Cr);
|
|
5533
5533
|
class aa {
|
|
5534
5534
|
constructor(e = {}) {
|
|
5535
|
-
this.rid = new Cr(), this.encryptedKey = new
|
|
5535
|
+
this.rid = new Cr(), this.encryptedKey = new de(), Object.assign(this, e);
|
|
5536
5536
|
}
|
|
5537
5537
|
}
|
|
5538
5538
|
o([
|
|
5539
5539
|
l({ type: Cr })
|
|
5540
5540
|
], aa.prototype, "rid", void 0);
|
|
5541
5541
|
o([
|
|
5542
|
-
l({ type:
|
|
5542
|
+
l({ type: de })
|
|
5543
5543
|
], aa.prototype, "encryptedKey", void 0);
|
|
5544
5544
|
let zi = Xs = class extends ve {
|
|
5545
5545
|
constructor(e) {
|
|
@@ -5579,7 +5579,7 @@ ir = o([
|
|
|
5579
5579
|
], ir);
|
|
5580
5580
|
class Vr {
|
|
5581
5581
|
constructor(e = {}) {
|
|
5582
|
-
this.version = It.v3, this.originator = new ir(), this.keyEncryptionAlgorithm = new
|
|
5582
|
+
this.version = It.v3, this.originator = new ir(), this.keyEncryptionAlgorithm = new dt(), this.recipientEncryptedKeys = new zi(), Object.assign(this, e);
|
|
5583
5583
|
}
|
|
5584
5584
|
}
|
|
5585
5585
|
o([
|
|
@@ -5589,10 +5589,10 @@ o([
|
|
|
5589
5589
|
l({ type: ir, context: 0 })
|
|
5590
5590
|
], Vr.prototype, "originator", void 0);
|
|
5591
5591
|
o([
|
|
5592
|
-
l({ type:
|
|
5592
|
+
l({ type: de, context: 1, optional: !0 })
|
|
5593
5593
|
], Vr.prototype, "ukm", void 0);
|
|
5594
5594
|
o([
|
|
5595
|
-
l({ type:
|
|
5595
|
+
l({ type: dt })
|
|
5596
5596
|
], Vr.prototype, "keyEncryptionAlgorithm", void 0);
|
|
5597
5597
|
o([
|
|
5598
5598
|
l({ type: zi })
|
|
@@ -5613,7 +5613,7 @@ Br = o([
|
|
|
5613
5613
|
], Br);
|
|
5614
5614
|
class yi {
|
|
5615
5615
|
constructor(e = {}) {
|
|
5616
|
-
this.version = It.v0, this.rid = new Br(), this.keyEncryptionAlgorithm = new
|
|
5616
|
+
this.version = It.v0, this.rid = new Br(), this.keyEncryptionAlgorithm = new dt(), this.encryptedKey = new de(), Object.assign(this, e);
|
|
5617
5617
|
}
|
|
5618
5618
|
}
|
|
5619
5619
|
o([
|
|
@@ -5623,18 +5623,18 @@ o([
|
|
|
5623
5623
|
l({ type: Br })
|
|
5624
5624
|
], yi.prototype, "rid", void 0);
|
|
5625
5625
|
o([
|
|
5626
|
-
l({ type:
|
|
5626
|
+
l({ type: dt })
|
|
5627
5627
|
], yi.prototype, "keyEncryptionAlgorithm", void 0);
|
|
5628
5628
|
o([
|
|
5629
|
-
l({ type:
|
|
5629
|
+
l({ type: de })
|
|
5630
5630
|
], yi.prototype, "encryptedKey", void 0);
|
|
5631
5631
|
class gi {
|
|
5632
5632
|
constructor(e = {}) {
|
|
5633
|
-
this.keyIdentifier = new
|
|
5633
|
+
this.keyIdentifier = new de(), Object.assign(this, e);
|
|
5634
5634
|
}
|
|
5635
5635
|
}
|
|
5636
5636
|
o([
|
|
5637
|
-
l({ type:
|
|
5637
|
+
l({ type: de })
|
|
5638
5638
|
], gi.prototype, "keyIdentifier", void 0);
|
|
5639
5639
|
o([
|
|
5640
5640
|
l({ type: m.GeneralizedTime, optional: !0 })
|
|
@@ -5644,7 +5644,7 @@ o([
|
|
|
5644
5644
|
], gi.prototype, "other", void 0);
|
|
5645
5645
|
class vi {
|
|
5646
5646
|
constructor(e = {}) {
|
|
5647
|
-
this.version = It.v4, this.kekid = new gi(), this.keyEncryptionAlgorithm = new
|
|
5647
|
+
this.version = It.v4, this.kekid = new gi(), this.keyEncryptionAlgorithm = new dt(), this.encryptedKey = new de(), Object.assign(this, e);
|
|
5648
5648
|
}
|
|
5649
5649
|
}
|
|
5650
5650
|
o([
|
|
@@ -5654,14 +5654,14 @@ o([
|
|
|
5654
5654
|
l({ type: gi })
|
|
5655
5655
|
], vi.prototype, "kekid", void 0);
|
|
5656
5656
|
o([
|
|
5657
|
-
l({ type:
|
|
5657
|
+
l({ type: dt })
|
|
5658
5658
|
], vi.prototype, "keyEncryptionAlgorithm", void 0);
|
|
5659
5659
|
o([
|
|
5660
|
-
l({ type:
|
|
5660
|
+
l({ type: de })
|
|
5661
5661
|
], vi.prototype, "encryptedKey", void 0);
|
|
5662
5662
|
class mi {
|
|
5663
5663
|
constructor(e = {}) {
|
|
5664
|
-
this.version = It.v0, this.keyEncryptionAlgorithm = new
|
|
5664
|
+
this.version = It.v0, this.keyEncryptionAlgorithm = new dt(), this.encryptedKey = new de(), Object.assign(this, e);
|
|
5665
5665
|
}
|
|
5666
5666
|
}
|
|
5667
5667
|
o([
|
|
@@ -5671,10 +5671,10 @@ o([
|
|
|
5671
5671
|
l({ type: Qs, context: 0, optional: !0 })
|
|
5672
5672
|
], mi.prototype, "keyDerivationAlgorithm", void 0);
|
|
5673
5673
|
o([
|
|
5674
|
-
l({ type:
|
|
5674
|
+
l({ type: dt })
|
|
5675
5675
|
], mi.prototype, "keyEncryptionAlgorithm", void 0);
|
|
5676
5676
|
o([
|
|
5677
|
-
l({ type:
|
|
5677
|
+
l({ type: de })
|
|
5678
5678
|
], mi.prototype, "encryptedKey", void 0);
|
|
5679
5679
|
class la {
|
|
5680
5680
|
constructor(e = {}) {
|
|
@@ -5790,7 +5790,7 @@ o([
|
|
|
5790
5790
|
o([
|
|
5791
5791
|
l({ type: no, context: 1, implicit: !0, optional: !0 })
|
|
5792
5792
|
], bi.prototype, "unprotectedAttrs", void 0);
|
|
5793
|
-
const $
|
|
5793
|
+
const $d = "1.2.840.113549.1.7.2";
|
|
5794
5794
|
let Ir = class {
|
|
5795
5795
|
constructor(e = {}) {
|
|
5796
5796
|
Object.assign(this, e);
|
|
@@ -5808,7 +5808,7 @@ Ir = o([
|
|
|
5808
5808
|
var so;
|
|
5809
5809
|
class Tt {
|
|
5810
5810
|
constructor(e = {}) {
|
|
5811
|
-
this.version = It.v0, this.sid = new Ir(), this.digestAlgorithm = new Qr(), this.signatureAlgorithm = new Fi(), this.signature = new
|
|
5811
|
+
this.version = It.v0, this.sid = new Ir(), this.digestAlgorithm = new Qr(), this.signatureAlgorithm = new Fi(), this.signature = new de(), Object.assign(this, e);
|
|
5812
5812
|
}
|
|
5813
5813
|
}
|
|
5814
5814
|
o([
|
|
@@ -5827,7 +5827,7 @@ o([
|
|
|
5827
5827
|
l({ type: Fi })
|
|
5828
5828
|
], Tt.prototype, "signatureAlgorithm", void 0);
|
|
5829
5829
|
o([
|
|
5830
|
-
l({ type:
|
|
5830
|
+
l({ type: de })
|
|
5831
5831
|
], Tt.prototype, "signature", void 0);
|
|
5832
5832
|
o([
|
|
5833
5833
|
l({ type: Pr, repeated: "set", context: 1, implicit: !0, optional: !0 })
|
|
@@ -5872,13 +5872,13 @@ o([
|
|
|
5872
5872
|
o([
|
|
5873
5873
|
l({ type: Wi })
|
|
5874
5874
|
], Ur.prototype, "signerInfos", void 0);
|
|
5875
|
-
const ti = "1.2.840.10045.2.1",
|
|
5875
|
+
const ti = "1.2.840.10045.2.1", fa = "1.2.840.10045.4.1", Nu = "1.2.840.10045.4.3.1", da = "1.2.840.10045.4.3.2", pa = "1.2.840.10045.4.3.3", ha = "1.2.840.10045.4.3.4", Ga = "1.2.840.10045.3.1.7", Wa = "1.3.132.0.34", Ja = "1.3.132.0.35";
|
|
5876
5876
|
function wi(r) {
|
|
5877
5877
|
return new q({ algorithm: r });
|
|
5878
5878
|
}
|
|
5879
|
-
const
|
|
5879
|
+
const Rd = wi(fa);
|
|
5880
5880
|
wi(Nu);
|
|
5881
|
-
const
|
|
5881
|
+
const Vd = wi(da), Ud = wi(pa), Md = wi(ha);
|
|
5882
5882
|
let Er = class {
|
|
5883
5883
|
constructor(e = {}) {
|
|
5884
5884
|
Object.assign(this, e);
|
|
@@ -5892,14 +5892,14 @@ Er = o([
|
|
|
5892
5892
|
], Er);
|
|
5893
5893
|
class Hn {
|
|
5894
5894
|
constructor(e = {}) {
|
|
5895
|
-
this.version = 1, this.privateKey = new
|
|
5895
|
+
this.version = 1, this.privateKey = new de(), Object.assign(this, e);
|
|
5896
5896
|
}
|
|
5897
5897
|
}
|
|
5898
5898
|
o([
|
|
5899
5899
|
l({ type: m.Integer })
|
|
5900
5900
|
], Hn.prototype, "version", void 0);
|
|
5901
5901
|
o([
|
|
5902
|
-
l({ type:
|
|
5902
|
+
l({ type: de })
|
|
5903
5903
|
], Hn.prototype, "privateKey", void 0);
|
|
5904
5904
|
o([
|
|
5905
5905
|
l({ type: Er, context: 0, optional: !0 })
|
|
@@ -5918,29 +5918,29 @@ o([
|
|
|
5918
5918
|
o([
|
|
5919
5919
|
l({ type: m.Integer, converter: Ae })
|
|
5920
5920
|
], Yi.prototype, "s", void 0);
|
|
5921
|
-
const Ge = "1.2.840.113549.1.1", _r = `${Ge}.1`,
|
|
5921
|
+
const Ge = "1.2.840.113549.1.1", _r = `${Ge}.1`, Dd = `${Ge}.7`, Ld = `${Ge}.9`, Hd = `${Ge}.10`, Kd = `${Ge}.2`, Fd = `${Ge}.4`, Zi = `${Ge}.5`, qd = `${Ge}.14`, ao = `${Ge}.11`, Qi = `${Ge}.12`, Xi = `${Ge}.13`, Ou = `${Ge}.15`, Tu = `${Ge}.16`, ju = "1.3.14.3.2.26", Pu = "2.16.840.1.101.3.4.2.4", $u = "2.16.840.1.101.3.4.2.1", Ru = "2.16.840.1.101.3.4.2.2", Vu = "2.16.840.1.101.3.4.2.3", zd = "2.16.840.1.101.3.4.2.5", Gd = "2.16.840.1.101.3.4.2.6", Wd = "1.2.840.113549.2.2", Jd = "1.2.840.113549.2.5", ya = `${Ge}.8`;
|
|
5922
5922
|
function Ne(r) {
|
|
5923
5923
|
return new q({ algorithm: r, parameters: null });
|
|
5924
5924
|
}
|
|
5925
|
-
Ne(
|
|
5926
|
-
Ne(
|
|
5925
|
+
Ne(Wd);
|
|
5926
|
+
Ne(Jd);
|
|
5927
5927
|
const nr = Ne(ju);
|
|
5928
5928
|
Ne(Pu);
|
|
5929
5929
|
Ne($u);
|
|
5930
5930
|
Ne(Ru);
|
|
5931
5931
|
Ne(Vu);
|
|
5932
|
-
Ne(
|
|
5933
|
-
Ne(
|
|
5932
|
+
Ne(zd);
|
|
5933
|
+
Ne(Gd);
|
|
5934
5934
|
const Uu = new q({
|
|
5935
5935
|
algorithm: ya,
|
|
5936
5936
|
parameters: z.serialize(nr)
|
|
5937
5937
|
}), Mu = new q({
|
|
5938
|
-
algorithm:
|
|
5938
|
+
algorithm: Ld,
|
|
5939
5939
|
parameters: z.serialize(Pi.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
|
|
5940
5940
|
});
|
|
5941
5941
|
Ne(_r);
|
|
5942
|
-
Ne(
|
|
5943
|
-
Ne(
|
|
5942
|
+
Ne(Kd);
|
|
5943
|
+
Ne(Fd);
|
|
5944
5944
|
Ne(Zi);
|
|
5945
5945
|
Ne(Ou);
|
|
5946
5946
|
Ne(Tu);
|
|
@@ -5966,7 +5966,7 @@ o([
|
|
|
5966
5966
|
l({ type: q, context: 2, defaultValue: Mu })
|
|
5967
5967
|
], Kn.prototype, "pSourceAlgorithm", void 0);
|
|
5968
5968
|
new q({
|
|
5969
|
-
algorithm:
|
|
5969
|
+
algorithm: Dd,
|
|
5970
5970
|
parameters: z.serialize(new Kn())
|
|
5971
5971
|
});
|
|
5972
5972
|
class Si {
|
|
@@ -5990,19 +5990,19 @@ o([
|
|
|
5990
5990
|
l({ type: m.Integer, context: 3, defaultValue: 1 })
|
|
5991
5991
|
], Si.prototype, "trailerField", void 0);
|
|
5992
5992
|
new q({
|
|
5993
|
-
algorithm:
|
|
5993
|
+
algorithm: Hd,
|
|
5994
5994
|
parameters: z.serialize(new Si())
|
|
5995
5995
|
});
|
|
5996
5996
|
class Fn {
|
|
5997
5997
|
constructor(e = {}) {
|
|
5998
|
-
this.digestAlgorithm = new q(), this.digest = new
|
|
5998
|
+
this.digestAlgorithm = new q(), this.digest = new de(), Object.assign(this, e);
|
|
5999
5999
|
}
|
|
6000
6000
|
}
|
|
6001
6001
|
o([
|
|
6002
6002
|
l({ type: q })
|
|
6003
6003
|
], Fn.prototype, "digestAlgorithm", void 0);
|
|
6004
6004
|
o([
|
|
6005
|
-
l({ type:
|
|
6005
|
+
l({ type: de })
|
|
6006
6006
|
], Fn.prototype, "digest", void 0);
|
|
6007
6007
|
var co;
|
|
6008
6008
|
class qn {
|
|
@@ -6107,7 +6107,7 @@ function va(r, e) {
|
|
|
6107
6107
|
}
|
|
6108
6108
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6109
6109
|
}
|
|
6110
|
-
function
|
|
6110
|
+
function Yd(r, e, t, i) {
|
|
6111
6111
|
function n(s) {
|
|
6112
6112
|
return s instanceof t ? s : new t(function(a) {
|
|
6113
6113
|
a(s);
|
|
@@ -6116,25 +6116,25 @@ function Yf(r, e, t, i) {
|
|
|
6116
6116
|
return new (t || (t = Promise))(function(s, a) {
|
|
6117
6117
|
function u(p) {
|
|
6118
6118
|
try {
|
|
6119
|
-
|
|
6119
|
+
f(i.next(p));
|
|
6120
6120
|
} catch (b) {
|
|
6121
6121
|
a(b);
|
|
6122
6122
|
}
|
|
6123
6123
|
}
|
|
6124
6124
|
function c(p) {
|
|
6125
6125
|
try {
|
|
6126
|
-
|
|
6126
|
+
f(i.throw(p));
|
|
6127
6127
|
} catch (b) {
|
|
6128
6128
|
a(b);
|
|
6129
6129
|
}
|
|
6130
6130
|
}
|
|
6131
|
-
function
|
|
6131
|
+
function f(p) {
|
|
6132
6132
|
p.done ? s(p.value) : n(p.value).then(u, c);
|
|
6133
6133
|
}
|
|
6134
|
-
|
|
6134
|
+
f((i = i.apply(r, e || [])).next());
|
|
6135
6135
|
});
|
|
6136
6136
|
}
|
|
6137
|
-
function
|
|
6137
|
+
function Zd(r, e) {
|
|
6138
6138
|
var t = { label: 0, sent: function() {
|
|
6139
6139
|
if (s[0] & 1)
|
|
6140
6140
|
throw s[1];
|
|
@@ -6143,60 +6143,60 @@ function Zf(r, e) {
|
|
|
6143
6143
|
return a = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
6144
6144
|
return this;
|
|
6145
6145
|
}), a;
|
|
6146
|
-
function u(
|
|
6146
|
+
function u(f) {
|
|
6147
6147
|
return function(p) {
|
|
6148
|
-
return c([
|
|
6148
|
+
return c([f, p]);
|
|
6149
6149
|
};
|
|
6150
6150
|
}
|
|
6151
|
-
function c(
|
|
6151
|
+
function c(f) {
|
|
6152
6152
|
if (i)
|
|
6153
6153
|
throw new TypeError("Generator is already executing.");
|
|
6154
6154
|
for (; t; )
|
|
6155
6155
|
try {
|
|
6156
|
-
if (i = 1, n && (s =
|
|
6156
|
+
if (i = 1, n && (s = f[0] & 2 ? n.return : f[0] ? n.throw || ((s = n.return) && s.call(n), 0) : n.next) && !(s = s.call(n, f[1])).done)
|
|
6157
6157
|
return s;
|
|
6158
|
-
switch (n = 0, s && (
|
|
6158
|
+
switch (n = 0, s && (f = [f[0] & 2, s.value]), f[0]) {
|
|
6159
6159
|
case 0:
|
|
6160
6160
|
case 1:
|
|
6161
|
-
s =
|
|
6161
|
+
s = f;
|
|
6162
6162
|
break;
|
|
6163
6163
|
case 4:
|
|
6164
|
-
return t.label++, { value:
|
|
6164
|
+
return t.label++, { value: f[1], done: !1 };
|
|
6165
6165
|
case 5:
|
|
6166
|
-
t.label++, n =
|
|
6166
|
+
t.label++, n = f[1], f = [0];
|
|
6167
6167
|
continue;
|
|
6168
6168
|
case 7:
|
|
6169
|
-
|
|
6169
|
+
f = t.ops.pop(), t.trys.pop();
|
|
6170
6170
|
continue;
|
|
6171
6171
|
default:
|
|
6172
|
-
if (s = t.trys, !(s = s.length > 0 && s[s.length - 1]) && (
|
|
6172
|
+
if (s = t.trys, !(s = s.length > 0 && s[s.length - 1]) && (f[0] === 6 || f[0] === 2)) {
|
|
6173
6173
|
t = 0;
|
|
6174
6174
|
continue;
|
|
6175
6175
|
}
|
|
6176
|
-
if (
|
|
6177
|
-
t.label =
|
|
6176
|
+
if (f[0] === 3 && (!s || f[1] > s[0] && f[1] < s[3])) {
|
|
6177
|
+
t.label = f[1];
|
|
6178
6178
|
break;
|
|
6179
6179
|
}
|
|
6180
|
-
if (
|
|
6181
|
-
t.label = s[1], s =
|
|
6180
|
+
if (f[0] === 6 && t.label < s[1]) {
|
|
6181
|
+
t.label = s[1], s = f;
|
|
6182
6182
|
break;
|
|
6183
6183
|
}
|
|
6184
6184
|
if (s && t.label < s[2]) {
|
|
6185
|
-
t.label = s[2], t.ops.push(
|
|
6185
|
+
t.label = s[2], t.ops.push(f);
|
|
6186
6186
|
break;
|
|
6187
6187
|
}
|
|
6188
6188
|
s[2] && t.ops.pop(), t.trys.pop();
|
|
6189
6189
|
continue;
|
|
6190
6190
|
}
|
|
6191
|
-
|
|
6191
|
+
f = e.call(r, t);
|
|
6192
6192
|
} catch (p) {
|
|
6193
|
-
|
|
6193
|
+
f = [6, p], n = 0;
|
|
6194
6194
|
} finally {
|
|
6195
6195
|
i = s = 0;
|
|
6196
6196
|
}
|
|
6197
|
-
if (
|
|
6198
|
-
throw
|
|
6199
|
-
return { value:
|
|
6197
|
+
if (f[0] & 5)
|
|
6198
|
+
throw f[1];
|
|
6199
|
+
return { value: f[0] ? f[1] : void 0, done: !0 };
|
|
6200
6200
|
}
|
|
6201
6201
|
}
|
|
6202
6202
|
function xi(r) {
|
|
@@ -6236,9 +6236,9 @@ function Ft() {
|
|
|
6236
6236
|
r = r.concat(en(arguments[e]));
|
|
6237
6237
|
return r;
|
|
6238
6238
|
}
|
|
6239
|
-
var
|
|
6240
|
-
function
|
|
6241
|
-
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(
|
|
6239
|
+
var Qd = "injectionTokens";
|
|
6240
|
+
function Xd(r) {
|
|
6241
|
+
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(Qd, r) || {};
|
|
6242
6242
|
return Object.keys(t).forEach(function(i) {
|
|
6243
6243
|
e[+i] = t[i];
|
|
6244
6244
|
}), e;
|
|
@@ -6283,7 +6283,7 @@ var Lu = function() {
|
|
|
6283
6283
|
return this.reflectMethods.forEach(i), t;
|
|
6284
6284
|
}, r;
|
|
6285
6285
|
}();
|
|
6286
|
-
function
|
|
6286
|
+
function dr(r) {
|
|
6287
6287
|
return typeof r == "string" || typeof r == "symbol";
|
|
6288
6288
|
}
|
|
6289
6289
|
function ep(r) {
|
|
@@ -6379,7 +6379,7 @@ var cp = function(r) {
|
|
|
6379
6379
|
this.preResolution = new cp(), this.postResolution = new lp();
|
|
6380
6380
|
}
|
|
6381
6381
|
return r;
|
|
6382
|
-
}(), Hu = /* @__PURE__ */ new Map(),
|
|
6382
|
+
}(), Hu = /* @__PURE__ */ new Map(), fp = function() {
|
|
6383
6383
|
function r(e) {
|
|
6384
6384
|
this.parent = e, this._registry = new ip(), this.interceptors = new up(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
6385
6385
|
}
|
|
@@ -6399,7 +6399,7 @@ var cp = function(r) {
|
|
|
6399
6399
|
throw new Error('Cannot use lifecycle "' + He[i.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
6400
6400
|
return this._registry.set(e, { provider: n, options: i }), this;
|
|
6401
6401
|
}, r.prototype.registerType = function(e, t) {
|
|
6402
|
-
return this.ensureNotDisposed(),
|
|
6402
|
+
return this.ensureNotDisposed(), dr(t) ? this.register(e, {
|
|
6403
6403
|
useToken: t
|
|
6404
6404
|
}) : this.register(e, {
|
|
6405
6405
|
useClass: t
|
|
@@ -6409,8 +6409,8 @@ var cp = function(r) {
|
|
|
6409
6409
|
useValue: t
|
|
6410
6410
|
});
|
|
6411
6411
|
}, r.prototype.registerSingleton = function(e, t) {
|
|
6412
|
-
if (this.ensureNotDisposed(),
|
|
6413
|
-
if (
|
|
6412
|
+
if (this.ensureNotDisposed(), dr(e)) {
|
|
6413
|
+
if (dr(t))
|
|
6414
6414
|
return this.register(e, {
|
|
6415
6415
|
useToken: t
|
|
6416
6416
|
}, { lifecycle: He.Singleton });
|
|
@@ -6421,13 +6421,13 @@ var cp = function(r) {
|
|
|
6421
6421
|
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
6422
6422
|
}
|
|
6423
6423
|
var i = e;
|
|
6424
|
-
return t && !
|
|
6424
|
+
return t && !dr(t) && (i = t), this.register(e, {
|
|
6425
6425
|
useClass: i
|
|
6426
6426
|
}, { lifecycle: He.Singleton });
|
|
6427
6427
|
}, r.prototype.resolve = function(e, t) {
|
|
6428
6428
|
t === void 0 && (t = new Za()), this.ensureNotDisposed();
|
|
6429
6429
|
var i = this.getRegistration(e);
|
|
6430
|
-
if (!i &&
|
|
6430
|
+
if (!i && dr(e))
|
|
6431
6431
|
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
6432
6432
|
if (this.executePreResolutionInterceptor(e, "Single"), i) {
|
|
6433
6433
|
var n = this.resolveRegistration(i, t);
|
|
@@ -6447,8 +6447,8 @@ var cp = function(r) {
|
|
|
6447
6447
|
var c = u.value;
|
|
6448
6448
|
c.options.frequency != "Once" && s.push(c), c.callback(e, t);
|
|
6449
6449
|
}
|
|
6450
|
-
} catch (
|
|
6451
|
-
i = { error:
|
|
6450
|
+
} catch (f) {
|
|
6451
|
+
i = { error: f };
|
|
6452
6452
|
} finally {
|
|
6453
6453
|
try {
|
|
6454
6454
|
u && !u.done && (n = a.return) && n.call(a);
|
|
@@ -6465,8 +6465,8 @@ var cp = function(r) {
|
|
|
6465
6465
|
var a = [];
|
|
6466
6466
|
try {
|
|
6467
6467
|
for (var u = xi(this.interceptors.postResolution.getAll(e)), c = u.next(); !c.done; c = u.next()) {
|
|
6468
|
-
var
|
|
6469
|
-
|
|
6468
|
+
var f = c.value;
|
|
6469
|
+
f.options.frequency != "Once" && a.push(f), f.callback(e, t, i);
|
|
6470
6470
|
}
|
|
6471
6471
|
} catch (p) {
|
|
6472
6472
|
n = { error: p };
|
|
@@ -6489,7 +6489,7 @@ var cp = function(r) {
|
|
|
6489
6489
|
var i = this;
|
|
6490
6490
|
t === void 0 && (t = new Za()), this.ensureNotDisposed();
|
|
6491
6491
|
var n = this.getAllRegistrations(e);
|
|
6492
|
-
if (!n &&
|
|
6492
|
+
if (!n && dr(e))
|
|
6493
6493
|
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
6494
6494
|
if (this.executePreResolutionInterceptor(e, "All"), n) {
|
|
6495
6495
|
var s = n.map(function(u) {
|
|
@@ -6532,18 +6532,18 @@ var cp = function(r) {
|
|
|
6532
6532
|
try {
|
|
6533
6533
|
for (var n = xi(this._registry.entries()), s = n.next(); !s.done; s = n.next()) {
|
|
6534
6534
|
var a = en(s.value, 2), u = a[0], c = a[1];
|
|
6535
|
-
c.some(function(
|
|
6536
|
-
var p =
|
|
6535
|
+
c.some(function(f) {
|
|
6536
|
+
var p = f.options;
|
|
6537
6537
|
return p.lifecycle === He.ContainerScoped;
|
|
6538
|
-
}) && i._registry.setAll(u, c.map(function(
|
|
6539
|
-
return
|
|
6540
|
-
provider:
|
|
6541
|
-
options:
|
|
6542
|
-
} :
|
|
6538
|
+
}) && i._registry.setAll(u, c.map(function(f) {
|
|
6539
|
+
return f.options.lifecycle === He.ContainerScoped ? {
|
|
6540
|
+
provider: f.provider,
|
|
6541
|
+
options: f.options
|
|
6542
|
+
} : f;
|
|
6543
6543
|
}));
|
|
6544
6544
|
}
|
|
6545
|
-
} catch (
|
|
6546
|
-
e = { error:
|
|
6545
|
+
} catch (f) {
|
|
6546
|
+
e = { error: f };
|
|
6547
6547
|
} finally {
|
|
6548
6548
|
try {
|
|
6549
6549
|
s && !s.done && (t = n.return) && t.call(n);
|
|
@@ -6564,9 +6564,9 @@ var cp = function(r) {
|
|
|
6564
6564
|
options: i
|
|
6565
6565
|
});
|
|
6566
6566
|
}, r.prototype.dispose = function() {
|
|
6567
|
-
return
|
|
6567
|
+
return Yd(this, void 0, void 0, function() {
|
|
6568
6568
|
var e;
|
|
6569
|
-
return
|
|
6569
|
+
return Zd(this, function(t) {
|
|
6570
6570
|
switch (t.label) {
|
|
6571
6571
|
case 0:
|
|
6572
6572
|
return this.disposed = !0, e = [], this.disposables.forEach(function(i) {
|
|
@@ -6605,18 +6605,18 @@ var cp = function(r) {
|
|
|
6605
6605
|
var a, u, c;
|
|
6606
6606
|
try {
|
|
6607
6607
|
return ep(n) ? Ya(n) ? n.multiple ? (a = i.resolve(n.transform)).transform.apply(a, Ft([i.resolveAll(n.token)], n.transformArgs)) : (u = i.resolve(n.transform)).transform.apply(u, Ft([i.resolve(n.token, e)], n.transformArgs)) : n.multiple ? i.resolveAll(n.token) : i.resolve(n.token, e) : Ya(n) ? (c = i.resolve(n.transform, e)).transform.apply(c, Ft([i.resolve(n.token, e)], n.transformArgs)) : i.resolve(n, e);
|
|
6608
|
-
} catch (
|
|
6609
|
-
throw new Error(op(t, s,
|
|
6608
|
+
} catch (f) {
|
|
6609
|
+
throw new Error(op(t, s, f));
|
|
6610
6610
|
}
|
|
6611
6611
|
};
|
|
6612
6612
|
}, r.prototype.ensureNotDisposed = function() {
|
|
6613
6613
|
if (this.disposed)
|
|
6614
6614
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
6615
6615
|
}, r;
|
|
6616
|
-
}(), rt = new
|
|
6616
|
+
}(), rt = new fp();
|
|
6617
6617
|
function ba() {
|
|
6618
6618
|
return function(r) {
|
|
6619
|
-
Hu.set(r,
|
|
6619
|
+
Hu.set(r, Xd(r));
|
|
6620
6620
|
};
|
|
6621
6621
|
}
|
|
6622
6622
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -6672,7 +6672,7 @@ o([
|
|
|
6672
6672
|
o([
|
|
6673
6673
|
l({ type: m.Any, context: 0 })
|
|
6674
6674
|
], Fu.prototype, "crltValue", void 0);
|
|
6675
|
-
class qu extends
|
|
6675
|
+
class qu extends de {
|
|
6676
6676
|
}
|
|
6677
6677
|
let Gn = class {
|
|
6678
6678
|
constructor(e = {}) {
|
|
@@ -6689,7 +6689,7 @@ var go, vo;
|
|
|
6689
6689
|
(function(r) {
|
|
6690
6690
|
r[r.v1 = 0] = "v1";
|
|
6691
6691
|
})(vo || (vo = {}));
|
|
6692
|
-
class zu extends
|
|
6692
|
+
class zu extends de {
|
|
6693
6693
|
}
|
|
6694
6694
|
let mo = go = class extends ve {
|
|
6695
6695
|
constructor(e) {
|
|
@@ -6739,14 +6739,14 @@ o([
|
|
|
6739
6739
|
], Gu.prototype, "secretValue", void 0);
|
|
6740
6740
|
class Ai {
|
|
6741
6741
|
constructor(e = {}) {
|
|
6742
|
-
this.mac = new Fn(), this.macSalt = new
|
|
6742
|
+
this.mac = new Fn(), this.macSalt = new de(), this.iterations = 1, Object.assign(this, e);
|
|
6743
6743
|
}
|
|
6744
6744
|
}
|
|
6745
6745
|
o([
|
|
6746
6746
|
l({ type: Fn })
|
|
6747
6747
|
], Ai.prototype, "mac", void 0);
|
|
6748
6748
|
o([
|
|
6749
|
-
l({ type:
|
|
6749
|
+
l({ type: de })
|
|
6750
6750
|
], Ai.prototype, "macSalt", void 0);
|
|
6751
6751
|
o([
|
|
6752
6752
|
l({ type: m.Integer, defaultValue: 1 })
|
|
@@ -6911,11 +6911,11 @@ o([
|
|
|
6911
6911
|
Bo = o([
|
|
6912
6912
|
j({ type: N.Choice })
|
|
6913
6913
|
], Bo);
|
|
6914
|
-
let
|
|
6914
|
+
let fc = class extends $e {
|
|
6915
6915
|
};
|
|
6916
|
-
|
|
6916
|
+
fc = o([
|
|
6917
6917
|
j({ type: N.Choice })
|
|
6918
|
-
],
|
|
6918
|
+
], fc);
|
|
6919
6919
|
let Io = class {
|
|
6920
6920
|
constructor(e = 0) {
|
|
6921
6921
|
this.value = e;
|
|
@@ -6930,11 +6930,11 @@ o([
|
|
|
6930
6930
|
Io = o([
|
|
6931
6931
|
j({ type: N.Choice })
|
|
6932
6932
|
], Io);
|
|
6933
|
-
let
|
|
6933
|
+
let dc = class extends Tt {
|
|
6934
6934
|
};
|
|
6935
|
-
|
|
6935
|
+
dc = o([
|
|
6936
6936
|
j({ type: N.Sequence })
|
|
6937
|
-
],
|
|
6937
|
+
], dc);
|
|
6938
6938
|
let nn = class extends je {
|
|
6939
6939
|
};
|
|
6940
6940
|
nn = o([
|
|
@@ -7048,7 +7048,7 @@ o([
|
|
|
7048
7048
|
*
|
|
7049
7049
|
*/
|
|
7050
7050
|
const Yn = "crypto.algorithm";
|
|
7051
|
-
class
|
|
7051
|
+
class dp {
|
|
7052
7052
|
getAlgorithms() {
|
|
7053
7053
|
return rt.resolveAll(Yn);
|
|
7054
7054
|
}
|
|
@@ -7059,7 +7059,7 @@ class fp {
|
|
|
7059
7059
|
if (i)
|
|
7060
7060
|
return i;
|
|
7061
7061
|
}
|
|
7062
|
-
if (
|
|
7062
|
+
if (/^[0-9.]+$/.test(e.name)) {
|
|
7063
7063
|
const t = new q({
|
|
7064
7064
|
algorithm: e.name
|
|
7065
7065
|
});
|
|
@@ -7084,7 +7084,7 @@ class fp {
|
|
|
7084
7084
|
}
|
|
7085
7085
|
}
|
|
7086
7086
|
const Zn = "crypto.algorithmProvider";
|
|
7087
|
-
rt.registerSingleton(Zn,
|
|
7087
|
+
rt.registerSingleton(Zn, dp);
|
|
7088
7088
|
var Ni;
|
|
7089
7089
|
const We = "1.3.36.3.3.2.8.1.1", gc = `${We}.1`, vc = `${We}.2`, mc = `${We}.3`, bc = `${We}.4`, wc = `${We}.5`, Sc = `${We}.6`, kc = `${We}.7`, Ac = `${We}.8`, xc = `${We}.9`, Cc = `${We}.10`, Bc = `${We}.11`, Ic = `${We}.12`, Ec = `${We}.13`, _c = `${We}.14`, Nc = "brainpoolP160r1", Oc = "brainpoolP160t1", Tc = "brainpoolP192r1", jc = "brainpoolP192t1", Pc = "brainpoolP224r1", $c = "brainpoolP224t1", Rc = "brainpoolP256r1", Vc = "brainpoolP256t1", Uc = "brainpoolP320r1", Mc = "brainpoolP320t1", Dc = "brainpoolP384r1", Lc = "brainpoolP384t1", Hc = "brainpoolP512r1", Kc = "brainpoolP512t1", xe = "ECDSA";
|
|
7090
7090
|
let ii = Ni = class {
|
|
@@ -7094,13 +7094,13 @@ let ii = Ni = class {
|
|
|
7094
7094
|
if ("hash" in e)
|
|
7095
7095
|
switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
|
|
7096
7096
|
case "sha-1":
|
|
7097
|
-
return
|
|
7097
|
+
return Rd;
|
|
7098
7098
|
case "sha-256":
|
|
7099
|
-
return
|
|
7099
|
+
return Vd;
|
|
7100
7100
|
case "sha-384":
|
|
7101
|
-
return
|
|
7101
|
+
return Ud;
|
|
7102
7102
|
case "sha-512":
|
|
7103
|
-
return
|
|
7103
|
+
return Md;
|
|
7104
7104
|
}
|
|
7105
7105
|
else if ("namedCurve" in e) {
|
|
7106
7106
|
let t = "";
|
|
@@ -7171,9 +7171,9 @@ let ii = Ni = class {
|
|
|
7171
7171
|
}
|
|
7172
7172
|
toWebAlgorithm(e) {
|
|
7173
7173
|
switch (e.algorithm) {
|
|
7174
|
-
case da:
|
|
7175
|
-
return { name: xe, hash: { name: "SHA-1" } };
|
|
7176
7174
|
case fa:
|
|
7175
|
+
return { name: xe, hash: { name: "SHA-1" } };
|
|
7176
|
+
case da:
|
|
7177
7177
|
return { name: xe, hash: { name: "SHA-256" } };
|
|
7178
7178
|
case pa:
|
|
7179
7179
|
return { name: xe, hash: { name: "SHA-384" } };
|
|
@@ -7270,23 +7270,23 @@ Dt.items = {
|
|
|
7270
7270
|
[Vu]: "sha512",
|
|
7271
7271
|
[_r]: "rsaEncryption",
|
|
7272
7272
|
[Zi]: "sha1WithRSAEncryption",
|
|
7273
|
-
[
|
|
7273
|
+
[qd]: "sha224WithRSAEncryption",
|
|
7274
7274
|
[ao]: "sha256WithRSAEncryption",
|
|
7275
7275
|
[Qi]: "sha384WithRSAEncryption",
|
|
7276
7276
|
[Xi]: "sha512WithRSAEncryption",
|
|
7277
7277
|
[ti]: "ecPublicKey",
|
|
7278
|
-
[
|
|
7278
|
+
[fa]: "ecdsaWithSHA1",
|
|
7279
7279
|
[Nu]: "ecdsaWithSHA224",
|
|
7280
|
-
[
|
|
7280
|
+
[da]: "ecdsaWithSHA256",
|
|
7281
7281
|
[pa]: "ecdsaWithSHA384",
|
|
7282
7282
|
[ha]: "ecdsaWithSHA512",
|
|
7283
|
-
[
|
|
7284
|
-
[
|
|
7285
|
-
[
|
|
7286
|
-
[
|
|
7287
|
-
[
|
|
7288
|
-
[
|
|
7289
|
-
[$
|
|
7283
|
+
[_d]: "TLS WWW server authentication",
|
|
7284
|
+
[Nd]: "TLS WWW client authentication",
|
|
7285
|
+
[Od]: "Code Signing",
|
|
7286
|
+
[Td]: "E-mail Protection",
|
|
7287
|
+
[jd]: "Time Stamping",
|
|
7288
|
+
[Pd]: "OCSP Signing",
|
|
7289
|
+
[$d]: "Signed Data"
|
|
7290
7290
|
};
|
|
7291
7291
|
class sr {
|
|
7292
7292
|
static serialize(e) {
|
|
@@ -7304,18 +7304,18 @@ class sr {
|
|
|
7304
7304
|
for (const u in e) {
|
|
7305
7305
|
if (typeof u == "symbol")
|
|
7306
7306
|
continue;
|
|
7307
|
-
const c = e[u],
|
|
7307
|
+
const c = e[u], f = u ? `${u}: ` : "";
|
|
7308
7308
|
if (typeof c == "string" || typeof c == "number" || typeof c == "boolean")
|
|
7309
|
-
i.push(`${n}${
|
|
7309
|
+
i.push(`${n}${f}${c}`);
|
|
7310
7310
|
else if (c instanceof Date)
|
|
7311
|
-
i.push(`${n}${
|
|
7311
|
+
i.push(`${n}${f}${c.toUTCString()}`);
|
|
7312
7312
|
else if (Array.isArray(c))
|
|
7313
7313
|
for (const p of c)
|
|
7314
7314
|
p[ge.NAME] = u, i.push(...this.serializeObj(p, t));
|
|
7315
7315
|
else if (c instanceof ge)
|
|
7316
7316
|
c[ge.NAME] = u, i.push(...this.serializeObj(c, t));
|
|
7317
7317
|
else if (U.isBufferSource(c))
|
|
7318
|
-
u ? (i.push(`${n}${
|
|
7318
|
+
u ? (i.push(`${n}${f}`), i.push(...this.serializeBufferSource(c, t + 1))) : i.push(...this.serializeBufferSource(c, t));
|
|
7319
7319
|
else if ("toTextObject" in c) {
|
|
7320
7320
|
const p = c.toTextObject();
|
|
7321
7321
|
p[ge.NAME] = u, i.push(...this.serializeObj(p, t));
|
|
@@ -7330,8 +7330,8 @@ class sr {
|
|
|
7330
7330
|
const u = [];
|
|
7331
7331
|
for (let c = 0; c < 16 && a < n.length; c++) {
|
|
7332
7332
|
c === 8 && u.push("");
|
|
7333
|
-
const
|
|
7334
|
-
u.push(
|
|
7333
|
+
const f = n[a++].toString(16).padStart(2, "0");
|
|
7334
|
+
u.push(f);
|
|
7335
7335
|
}
|
|
7336
7336
|
s.push(`${i}${u.join(" ")}`);
|
|
7337
7337
|
}
|
|
@@ -7354,7 +7354,7 @@ class Lt {
|
|
|
7354
7354
|
}
|
|
7355
7355
|
}
|
|
7356
7356
|
equal(e) {
|
|
7357
|
-
return e instanceof Lt ?
|
|
7357
|
+
return e instanceof Lt ? dl(e.rawData, this.rawData) : !1;
|
|
7358
7358
|
}
|
|
7359
7359
|
toString(e = "text") {
|
|
7360
7360
|
switch (e) {
|
|
@@ -7390,7 +7390,7 @@ class gt extends Lt {
|
|
|
7390
7390
|
U.isBufferSource(e[0]) ? t = U.toArrayBuffer(e[0]) : t = z.serialize(new at({
|
|
7391
7391
|
extnID: e[0],
|
|
7392
7392
|
critical: e[1],
|
|
7393
|
-
extnValue: new
|
|
7393
|
+
extnValue: new de(U.toArrayBuffer(e[2]))
|
|
7394
7394
|
})), super(t, at);
|
|
7395
7395
|
}
|
|
7396
7396
|
onInit(e) {
|
|
@@ -7552,7 +7552,7 @@ class Ut {
|
|
|
7552
7552
|
let [, a, u] = n;
|
|
7553
7553
|
const c = u[u.length - 1];
|
|
7554
7554
|
(c === "," || c === "+") && (u = u.slice(0, u.length - 1), n[3] = c);
|
|
7555
|
-
const
|
|
7555
|
+
const f = n[3];
|
|
7556
7556
|
if (/[\d.]+/.test(a) || (a = this.getName(a) || ""), !a)
|
|
7557
7557
|
throw new Error(`Cannot get OID for name type '${a}'`);
|
|
7558
7558
|
const p = new Jr({ type: a });
|
|
@@ -7563,7 +7563,7 @@ class Ut {
|
|
|
7563
7563
|
b && (u = b[1]), u = u.replace(/\\0a/ig, `
|
|
7564
7564
|
`).replace(/\\0d/ig, "\r").replace(/\\0g/ig, " ").replace(/\\(.)/g, "$1"), a === this.getName("E") || a === this.getName("DC") ? p.value.ia5String = u : Ut.isASCII(u) ? p.value.printableString = u : p.value.utf8String = u;
|
|
7565
7565
|
}
|
|
7566
|
-
s === "+" ? t[t.length - 1].push(p) : t.push(new mr([p])), s =
|
|
7566
|
+
s === "+" ? t[t.length - 1].push(p) : t.push(new mr([p])), s = f;
|
|
7567
7567
|
}
|
|
7568
7568
|
return t;
|
|
7569
7569
|
}
|
|
@@ -7577,29 +7577,29 @@ class Ut {
|
|
|
7577
7577
|
throw new Error(`Cannot get OID for name type '${s}'`);
|
|
7578
7578
|
const u = i[s];
|
|
7579
7579
|
for (const c of u) {
|
|
7580
|
-
const
|
|
7580
|
+
const f = new Jr({ type: a });
|
|
7581
7581
|
if (typeof c == "object")
|
|
7582
7582
|
for (const p in c)
|
|
7583
7583
|
switch (p) {
|
|
7584
7584
|
case "ia5String":
|
|
7585
|
-
|
|
7585
|
+
f.value.ia5String = c[p];
|
|
7586
7586
|
break;
|
|
7587
7587
|
case "utf8String":
|
|
7588
|
-
|
|
7588
|
+
f.value.utf8String = c[p];
|
|
7589
7589
|
break;
|
|
7590
7590
|
case "universalString":
|
|
7591
|
-
|
|
7591
|
+
f.value.universalString = c[p];
|
|
7592
7592
|
break;
|
|
7593
7593
|
case "bmpString":
|
|
7594
|
-
|
|
7594
|
+
f.value.bmpString = c[p];
|
|
7595
7595
|
break;
|
|
7596
7596
|
case "printableString":
|
|
7597
|
-
|
|
7597
|
+
f.value.printableString = c[p];
|
|
7598
7598
|
break;
|
|
7599
7599
|
}
|
|
7600
7600
|
else
|
|
7601
|
-
c[0] === "#" ?
|
|
7602
|
-
n.push(
|
|
7601
|
+
c[0] === "#" ? f.value.anyValue = H.FromHex(c.slice(1)) : a === this.getName("E") || a === this.getName("DC") ? f.value.ia5String = c : f.value.printableString = c;
|
|
7602
|
+
n.push(f);
|
|
7603
7603
|
}
|
|
7604
7604
|
}
|
|
7605
7605
|
t.push(n);
|
|
@@ -7615,7 +7615,7 @@ class Ut {
|
|
|
7615
7615
|
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (n = e[0] || n, i = e[1] || Ze.get()) : i = e[0] || Ze.get(), await i.subtle.digest(n, this.toArrayBuffer());
|
|
7616
7616
|
}
|
|
7617
7617
|
}
|
|
7618
|
-
const
|
|
7618
|
+
const ef = "Cannot initialize GeneralName from ASN.1 data.", Fc = `${ef} Unsupported string format in use.`, mp = `${ef} Value doesn't match to GUID regular expression.`, qc = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, zc = "1.3.6.1.4.1.311.25.1", Gc = "1.3.6.1.4.1.311.20.2.3", cs = "dns", ls = "dn", us = "email", fs = "ip", ds = "url", ps = "guid", hs = "upn", Ci = "id";
|
|
7619
7619
|
class Wc extends Lt {
|
|
7620
7620
|
constructor(...e) {
|
|
7621
7621
|
let t;
|
|
@@ -7640,12 +7640,12 @@ class Wc extends Lt {
|
|
|
7640
7640
|
t = new se({
|
|
7641
7641
|
otherName: new Yr({
|
|
7642
7642
|
typeId: zc,
|
|
7643
|
-
value: z.serialize(new
|
|
7643
|
+
value: z.serialize(new de(H.FromHex(n)))
|
|
7644
7644
|
})
|
|
7645
7645
|
});
|
|
7646
7646
|
break;
|
|
7647
7647
|
}
|
|
7648
|
-
case
|
|
7648
|
+
case fs:
|
|
7649
7649
|
t = new se({ iPAddress: e[1] });
|
|
7650
7650
|
break;
|
|
7651
7651
|
case Ci:
|
|
@@ -7655,12 +7655,12 @@ class Wc extends Lt {
|
|
|
7655
7655
|
t = new se({
|
|
7656
7656
|
otherName: new Yr({
|
|
7657
7657
|
typeId: Gc,
|
|
7658
|
-
value: z.serialize(
|
|
7658
|
+
value: z.serialize(du.toASN(e[1]))
|
|
7659
7659
|
})
|
|
7660
7660
|
});
|
|
7661
7661
|
break;
|
|
7662
7662
|
}
|
|
7663
|
-
case
|
|
7663
|
+
case ds:
|
|
7664
7664
|
t = new se({ uniformResourceIdentifier: e[1] });
|
|
7665
7665
|
break;
|
|
7666
7666
|
default:
|
|
@@ -7676,9 +7676,9 @@ class Wc extends Lt {
|
|
|
7676
7676
|
else if (e.rfc822Name != null)
|
|
7677
7677
|
this.type = us, this.value = e.rfc822Name;
|
|
7678
7678
|
else if (e.iPAddress != null)
|
|
7679
|
-
this.type =
|
|
7679
|
+
this.type = fs, this.value = e.iPAddress;
|
|
7680
7680
|
else if (e.uniformResourceIdentifier != null)
|
|
7681
|
-
this.type =
|
|
7681
|
+
this.type = ds, this.value = e.uniformResourceIdentifier;
|
|
7682
7682
|
else if (e.registeredID != null)
|
|
7683
7683
|
this.type = Ci, this.value = e.registeredID;
|
|
7684
7684
|
else if (e.directoryName != null)
|
|
@@ -7686,7 +7686,7 @@ class Wc extends Lt {
|
|
|
7686
7686
|
else if (e.otherName != null)
|
|
7687
7687
|
if (e.otherName.typeId === zc) {
|
|
7688
7688
|
this.type = ps;
|
|
7689
|
-
const t = z.parse(e.otherName.value,
|
|
7689
|
+
const t = z.parse(e.otherName.value, de), i = new RegExp(qc, "i").exec(H.ToHex(t));
|
|
7690
7690
|
if (!i)
|
|
7691
7691
|
throw new Error(mp);
|
|
7692
7692
|
this.value = i.slice(1).map((n, s) => s < 3 ? H.ToHex(new Uint8Array(H.FromHex(n)).reverse()) : n).join("-");
|
|
@@ -7709,10 +7709,10 @@ class Wc extends Lt {
|
|
|
7709
7709
|
case ls:
|
|
7710
7710
|
case cs:
|
|
7711
7711
|
case ps:
|
|
7712
|
-
case
|
|
7712
|
+
case fs:
|
|
7713
7713
|
case Ci:
|
|
7714
7714
|
case hs:
|
|
7715
|
-
case
|
|
7715
|
+
case ds:
|
|
7716
7716
|
e = this.type.toUpperCase();
|
|
7717
7717
|
break;
|
|
7718
7718
|
case us:
|
|
@@ -7790,17 +7790,17 @@ class Qe {
|
|
|
7790
7790
|
}, u = n[2];
|
|
7791
7791
|
if (u) {
|
|
7792
7792
|
const c = u.split(new RegExp(Nr, "g"));
|
|
7793
|
-
let
|
|
7793
|
+
let f = null;
|
|
7794
7794
|
for (const p of c) {
|
|
7795
7795
|
const [b, P] = p.split(/:(.*)/);
|
|
7796
7796
|
if (P === void 0) {
|
|
7797
|
-
if (!
|
|
7797
|
+
if (!f)
|
|
7798
7798
|
throw new Error("Cannot parse PEM string. Incorrect header value");
|
|
7799
|
-
|
|
7799
|
+
f.value += b.trim();
|
|
7800
7800
|
} else
|
|
7801
|
-
|
|
7801
|
+
f && a.headers.push(f), f = { key: b, value: P.trim() };
|
|
7802
7802
|
}
|
|
7803
|
-
|
|
7803
|
+
f && a.headers.push(f);
|
|
7804
7804
|
}
|
|
7805
7805
|
i.push(a);
|
|
7806
7806
|
}
|
|
@@ -7844,8 +7844,8 @@ class Qe {
|
|
|
7844
7844
|
var t;
|
|
7845
7845
|
const i = e.type.toLocaleUpperCase(), n = [];
|
|
7846
7846
|
if (n.push(`-----BEGIN ${i}-----`), !((t = e.headers) === null || t === void 0) && t.length) {
|
|
7847
|
-
for (const
|
|
7848
|
-
n.push(`${
|
|
7847
|
+
for (const f of e.headers)
|
|
7848
|
+
n.push(`${f.key}: ${f.value}`);
|
|
7849
7849
|
n.push("");
|
|
7850
7850
|
}
|
|
7851
7851
|
const s = H.ToBase64(e.rawData);
|
|
@@ -7996,8 +7996,8 @@ class on extends Et {
|
|
|
7996
7996
|
else if (s instanceof Yt)
|
|
7997
7997
|
i = { ...s.algorithm, ...this.signatureAlgorithm }, n = await s.export(i, ["verify"], t);
|
|
7998
7998
|
else if (U.isBufferSource(s)) {
|
|
7999
|
-
const
|
|
8000
|
-
i = { ...
|
|
7999
|
+
const f = new Yt(s);
|
|
8000
|
+
i = { ...f.algorithm, ...this.signatureAlgorithm }, n = await f.export(i, ["verify"], t);
|
|
8001
8001
|
} else
|
|
8002
8002
|
i = { ...s.algorithm, ...this.signatureAlgorithm }, n = s;
|
|
8003
8003
|
} catch {
|
|
@@ -8005,8 +8005,8 @@ class on extends Et {
|
|
|
8005
8005
|
}
|
|
8006
8006
|
const a = rt.resolveAll(Qn).reverse();
|
|
8007
8007
|
let u = null;
|
|
8008
|
-
for (const
|
|
8009
|
-
if (u =
|
|
8008
|
+
for (const f of a)
|
|
8009
|
+
if (u = f.toWebSignature(i, this.signature), u)
|
|
8010
8010
|
break;
|
|
8011
8011
|
if (!u)
|
|
8012
8012
|
throw Error("Cannot convert ASN.1 signature value to WebCrypto format");
|
|
@@ -8089,7 +8089,7 @@ class oi extends gt {
|
|
|
8089
8089
|
}
|
|
8090
8090
|
}
|
|
8091
8091
|
oi.NAME = "Authority Key Identifier";
|
|
8092
|
-
class
|
|
8092
|
+
class tf extends gt {
|
|
8093
8093
|
constructor(...e) {
|
|
8094
8094
|
if (U.isBufferSource(e[0])) {
|
|
8095
8095
|
super(e[0]);
|
|
@@ -8108,12 +8108,12 @@ class td extends gt {
|
|
|
8108
8108
|
return this.ca && (e.CA = this.ca), this.pathLength !== void 0 && (e["Path Length"] = this.pathLength), e;
|
|
8109
8109
|
}
|
|
8110
8110
|
}
|
|
8111
|
-
|
|
8111
|
+
tf.NAME = "Basic Constraints";
|
|
8112
8112
|
var Yc;
|
|
8113
8113
|
(function(r) {
|
|
8114
8114
|
r.serverAuth = "1.3.6.1.5.5.7.3.1", r.clientAuth = "1.3.6.1.5.5.7.3.2", r.codeSigning = "1.3.6.1.5.5.7.3.3", r.emailProtection = "1.3.6.1.5.5.7.3.4", r.timeStamping = "1.3.6.1.5.5.7.3.8", r.ocspSigning = "1.3.6.1.5.5.7.3.9";
|
|
8115
8115
|
})(Yc || (Yc = {}));
|
|
8116
|
-
class
|
|
8116
|
+
class rf extends gt {
|
|
8117
8117
|
constructor(...e) {
|
|
8118
8118
|
if (U.isBufferSource(e[0])) {
|
|
8119
8119
|
super(e[0]);
|
|
@@ -8129,7 +8129,7 @@ class rd extends gt {
|
|
|
8129
8129
|
return e[""] = this.usages.map((t) => Dt.toString(t)).join(", "), e;
|
|
8130
8130
|
}
|
|
8131
8131
|
}
|
|
8132
|
-
|
|
8132
|
+
rf.NAME = "Extended Key Usages";
|
|
8133
8133
|
var Oo;
|
|
8134
8134
|
(function(r) {
|
|
8135
8135
|
r[r.digitalSignature = 1] = "digitalSignature", r[r.nonRepudiation = 2] = "nonRepudiation", r[r.keyEncipherment = 4] = "keyEncipherment", r[r.dataEncipherment = 8] = "dataEncipherment", r[r.keyAgreement = 16] = "keyAgreement", r[r.keyCertSign = 32] = "keyCertSign", r[r.cRLSign = 64] = "cRLSign", r[r.encipherOnly = 128] = "encipherOnly", r[r.decipherOnly = 256] = "decipherOnly";
|
|
@@ -8191,7 +8191,7 @@ class ka extends gt {
|
|
|
8191
8191
|
}
|
|
8192
8192
|
}
|
|
8193
8193
|
ka.NAME = "Subject Alternative Name";
|
|
8194
|
-
class
|
|
8194
|
+
class nf extends gt {
|
|
8195
8195
|
constructor(...e) {
|
|
8196
8196
|
var t;
|
|
8197
8197
|
if (U.isBufferSource(e[0])) {
|
|
@@ -8210,8 +8210,8 @@ class id extends gt {
|
|
|
8210
8210
|
return e.Policy = this.policies.map((t) => new ge("", {}, Dt.toString(t))), e;
|
|
8211
8211
|
}
|
|
8212
8212
|
}
|
|
8213
|
-
|
|
8214
|
-
vt.register(gu,
|
|
8213
|
+
nf.NAME = "Certificate Policies";
|
|
8214
|
+
vt.register(gu, nf);
|
|
8215
8215
|
class Dr extends Lt {
|
|
8216
8216
|
constructor(...e) {
|
|
8217
8217
|
let t;
|
|
@@ -8236,7 +8236,7 @@ class Dr extends Lt {
|
|
|
8236
8236
|
}
|
|
8237
8237
|
}
|
|
8238
8238
|
Dr.NAME = "Attribute";
|
|
8239
|
-
class
|
|
8239
|
+
class sf extends Dr {
|
|
8240
8240
|
constructor(...e) {
|
|
8241
8241
|
var t;
|
|
8242
8242
|
if (U.isBufferSource(e[0]))
|
|
@@ -8260,7 +8260,7 @@ class nd extends Dr {
|
|
|
8260
8260
|
return e[ge.VALUE] = this.password, e;
|
|
8261
8261
|
}
|
|
8262
8262
|
}
|
|
8263
|
-
|
|
8263
|
+
sf.NAME = "Challenge Password";
|
|
8264
8264
|
class Aa extends Dr {
|
|
8265
8265
|
constructor(...e) {
|
|
8266
8266
|
var t;
|
|
@@ -8302,8 +8302,15 @@ let To = class {
|
|
|
8302
8302
|
toAsnAlgorithm(e) {
|
|
8303
8303
|
switch (e.name.toLowerCase()) {
|
|
8304
8304
|
case "rsassa-pkcs1-v1_5":
|
|
8305
|
-
if (e
|
|
8306
|
-
|
|
8305
|
+
if ("hash" in e) {
|
|
8306
|
+
let t;
|
|
8307
|
+
if (typeof e.hash == "string")
|
|
8308
|
+
t = e.hash;
|
|
8309
|
+
else if (e.hash && typeof e.hash == "object" && "name" in e.hash && typeof e.hash.name == "string")
|
|
8310
|
+
t = e.hash.name.toUpperCase();
|
|
8311
|
+
else
|
|
8312
|
+
throw new Error("Cannot get hash algorithm name");
|
|
8313
|
+
switch (t.toLowerCase()) {
|
|
8307
8314
|
case "sha-1":
|
|
8308
8315
|
return new q({ algorithm: Zi, parameters: null });
|
|
8309
8316
|
case "sha-256":
|
|
@@ -8313,7 +8320,7 @@ let To = class {
|
|
|
8313
8320
|
case "sha-512":
|
|
8314
8321
|
return new q({ algorithm: Xi, parameters: null });
|
|
8315
8322
|
}
|
|
8316
|
-
else
|
|
8323
|
+
} else
|
|
8317
8324
|
return new q({ algorithm: _r, parameters: null });
|
|
8318
8325
|
}
|
|
8319
8326
|
return null;
|
|
@@ -8366,7 +8373,7 @@ class tt {
|
|
|
8366
8373
|
toWebSignature(e, t) {
|
|
8367
8374
|
if (e.name === "ECDSA") {
|
|
8368
8375
|
const i = z.parse(t, Yi), n = e.namedCurve, s = tt.namedCurveSize.get(n) || tt.defaultNamedCurveSize, a = this.addPadding(s, this.removePadding(i.r)), u = this.addPadding(s, this.removePadding(i.s));
|
|
8369
|
-
return
|
|
8376
|
+
return Df(a, u);
|
|
8370
8377
|
}
|
|
8371
8378
|
return null;
|
|
8372
8379
|
}
|
|
@@ -8484,13 +8491,13 @@ var tl;
|
|
|
8484
8491
|
(function(r) {
|
|
8485
8492
|
r[r.unspecified = 0] = "unspecified", r[r.keyCompromise = 1] = "keyCompromise", r[r.cACompromise = 2] = "cACompromise", r[r.affiliationChanged = 3] = "affiliationChanged", r[r.superseded = 4] = "superseded", r[r.cessationOfOperation = 5] = "cessationOfOperation", r[r.certificateHold = 6] = "certificateHold", r[r.removeFromCRL = 8] = "removeFromCRL", r[r.privilegeWithdrawn = 9] = "privilegeWithdrawn", r[r.aACompromise = 10] = "aACompromise";
|
|
8486
8493
|
})(tl || (tl = {}));
|
|
8487
|
-
vt.register(yu,
|
|
8488
|
-
vt.register(mu,
|
|
8494
|
+
vt.register(yu, tf);
|
|
8495
|
+
vt.register(mu, rf);
|
|
8489
8496
|
vt.register(bu, Sa);
|
|
8490
8497
|
vt.register(Au, Xn);
|
|
8491
8498
|
vt.register(Cs, oi);
|
|
8492
8499
|
vt.register(ku, ka);
|
|
8493
|
-
es.register(Ju,
|
|
8500
|
+
es.register(Ju, sf);
|
|
8494
8501
|
es.register(wa, Aa);
|
|
8495
8502
|
rt.registerSingleton(Qn, Bp);
|
|
8496
8503
|
rt.registerSingleton(Qn, tt);
|
|
@@ -8498,7 +8505,7 @@ tt.namedCurveSize.set("P-256", 32);
|
|
|
8498
8505
|
tt.namedCurveSize.set("K-256", 32);
|
|
8499
8506
|
tt.namedCurveSize.set("P-384", 48);
|
|
8500
8507
|
tt.namedCurveSize.set("P-521", 66);
|
|
8501
|
-
function
|
|
8508
|
+
function of() {
|
|
8502
8509
|
return {
|
|
8503
8510
|
parseMetaCertificateData: (e) => {
|
|
8504
8511
|
if (/{vault:\/\/.*}/g.test(e))
|
|
@@ -8510,17 +8517,17 @@ function sd() {
|
|
|
8510
8517
|
};
|
|
8511
8518
|
for (const n of t.extensions)
|
|
8512
8519
|
if (n instanceof ka) {
|
|
8513
|
-
const s = n.names.toJSON(), u = Object.entries(s).map((c) => ({ type: c[1].type, value: c[1].value })).reduce((c,
|
|
8514
|
-
const p =
|
|
8515
|
-
return { ...c, [p]: [...b,
|
|
8520
|
+
const s = n.names.toJSON(), u = Object.entries(s).map((c) => ({ type: c[1].type, value: c[1].value })).reduce((c, f) => {
|
|
8521
|
+
const p = f.type, b = c[p] ?? [];
|
|
8522
|
+
return { ...c, [p]: [...b, f.value] };
|
|
8516
8523
|
}, {});
|
|
8517
8524
|
for (const c in u)
|
|
8518
8525
|
i.subjectAltName = `${c}=${u[c].join(", ")}`;
|
|
8519
8526
|
} else if (n instanceof Sa) {
|
|
8520
|
-
const s = Object.values(Oo), a = Array(s.length / 2).fill(null).reduce((u, c,
|
|
8521
|
-
const p = s[s.length / 2 +
|
|
8527
|
+
const s = Object.values(Oo), a = Array(s.length / 2).fill(null).reduce((u, c, f) => {
|
|
8528
|
+
const p = s[s.length / 2 + f];
|
|
8522
8529
|
if (n.usages & p) {
|
|
8523
|
-
const b = s[
|
|
8530
|
+
const b = s[f];
|
|
8524
8531
|
u.push(b);
|
|
8525
8532
|
}
|
|
8526
8533
|
return u;
|
|
@@ -8532,7 +8539,7 @@ function sd() {
|
|
|
8532
8539
|
};
|
|
8533
8540
|
}
|
|
8534
8541
|
function Ep() {
|
|
8535
|
-
const r =
|
|
8542
|
+
const r = of(), e = te({}), t = (n) => {
|
|
8536
8543
|
if (!(n.id in e.value))
|
|
8537
8544
|
try {
|
|
8538
8545
|
e.value[n.id] = r.parseMetaCertificateData(n.cert);
|
|
@@ -8734,14 +8741,14 @@ function Tp() {
|
|
|
8734
8741
|
const r = ln("en-us", Op);
|
|
8735
8742
|
return {
|
|
8736
8743
|
i18n: r,
|
|
8737
|
-
i18nT:
|
|
8744
|
+
i18nT: fl(r)
|
|
8738
8745
|
// Translation component <i18n-t>
|
|
8739
8746
|
};
|
|
8740
8747
|
}
|
|
8741
8748
|
const pt = {
|
|
8742
8749
|
useCertificate: Ep,
|
|
8743
8750
|
useI18n: Tp,
|
|
8744
|
-
useX509:
|
|
8751
|
+
useX509: of
|
|
8745
8752
|
}, zr = {
|
|
8746
8753
|
list: {
|
|
8747
8754
|
konnect: "/api/runtime_groups/{controlPlaneId}/certificates",
|
|
@@ -8814,7 +8821,7 @@ const pt = {
|
|
|
8814
8821
|
positionFixed: !0,
|
|
8815
8822
|
maxWidth: "500px",
|
|
8816
8823
|
placement: "bottomStart"
|
|
8817
|
-
} : {}), c = L(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid),
|
|
8824
|
+
} : {}), c = L(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), f = (b) => {
|
|
8818
8825
|
a.value = b, setTimeout(() => {
|
|
8819
8826
|
a.value = t.tooltip;
|
|
8820
8827
|
}, 1800);
|
|
@@ -8823,17 +8830,17 @@ const pt = {
|
|
|
8823
8830
|
typeof n == "function" && n({
|
|
8824
8831
|
type: "error",
|
|
8825
8832
|
message: i("message.fail")
|
|
8826
|
-
}), s.value ?
|
|
8833
|
+
}), s.value ? f(i("message.fail")) : e("error", t.uuid);
|
|
8827
8834
|
return;
|
|
8828
8835
|
}
|
|
8829
8836
|
const P = t.uuid.length > rl, A = t.format === "hidden" || t.format === "redacted" ? i("message.success.prefix") : `"${t.uuid.substring(0, rl) + (P ? "..." : "")}"`;
|
|
8830
8837
|
typeof n == "function" && n({
|
|
8831
8838
|
type: "success",
|
|
8832
8839
|
message: `${A}${i("message.success.content")}`
|
|
8833
|
-
}), s.value ?
|
|
8840
|
+
}), s.value ? f(t.successTooltip) : e("success", t.uuid);
|
|
8834
8841
|
};
|
|
8835
8842
|
return (b, P) => {
|
|
8836
|
-
const A = ee("KIcon"),
|
|
8843
|
+
const A = ee("KIcon"), d = ee("KClipboardProvider");
|
|
8837
8844
|
return _(), K("div", Vp, [
|
|
8838
8845
|
r.format !== "hidden" ? (_(), K("div", {
|
|
8839
8846
|
key: 0,
|
|
@@ -8848,9 +8855,9 @@ const pt = {
|
|
|
8848
8855
|
])
|
|
8849
8856
|
}, M(c.value), 3)
|
|
8850
8857
|
], 8, Up)) : Ie("", !0),
|
|
8851
|
-
(_(),
|
|
8858
|
+
(_(), fe(cn(r.tooltip ? "KTooltip" : "div"), Po(u.value, { class: "uuid-icon-wrapper" }), {
|
|
8852
8859
|
default: x(() => [
|
|
8853
|
-
$(
|
|
8860
|
+
$(d, null, {
|
|
8854
8861
|
default: x(({ copyToClipboard: g }) => [
|
|
8855
8862
|
oe("span", {
|
|
8856
8863
|
"data-testid": "copy-to-clipboard",
|
|
@@ -8885,7 +8892,7 @@ const pt = {
|
|
|
8885
8892
|
var xa = /* @__PURE__ */ ((r) => (r.GatewayService = "service", r.Route = "route", r.Consumer = "consumer", r.ConsumerGroup = "consumer group", r.Plugin = "plugin", r.Upstream = "upstream", r.Certificate = "certificate", r.CACertificate = "ca certificate", r.SNI = "SNI", r.Key = "key", r.KeySet = "key set", r.Vault = "vault", r.Application = "application", r.Developer = "developer", r.acls = "ACL Credential", r["basic-auth"] = "Basic Auth Credential", r["key-auth"] = "Key Auth Credential", r["key-auth-enc"] = "Key Auth Encrypted Credential", r.oauth2 = "OAuth 2.0 Credential", r["hmac-auth"] = "HMAC Credential", r.jwt = "JWT Credential", r.Target = "target", r))(xa || {}), Zt = /* @__PURE__ */ ((r) => (r.Edit = "edit", r.Create = "create", r))(Zt || {}), $t = /* @__PURE__ */ ((r) => (r[r.Loading = 0] = "Loading", r[r.Idle = 1] = "Idle", r[r.NoResults = 2] = "NoResults", r[r.Error = 3] = "Error", r))($t || {}), ye = /* @__PURE__ */ ((r) => (r.ID = "id", r.IdArray = "id-array", r.Text = "plain-text", r.Date = "date", r.Redacted = "redacted", r.RedactedArray = "redacted-array", r.Json = "json", r.JsonArray = "json-array", r.BadgeTag = "badge-tag", r.BadgeStatus = "badge-status", r.BadgeMethod = "badge-method", r.LinkInternal = "link-internal", r.LinkExternal = "link-external", r))(ye || {}), me = /* @__PURE__ */ ((r) => (r.Basic = "basic", r.Advanced = "advanced", r.Plugin = "plugin", r))(me || {});
|
|
8886
8893
|
function Ca(r = {}) {
|
|
8887
8894
|
return {
|
|
8888
|
-
axiosInstance:
|
|
8895
|
+
axiosInstance: Pf.create({
|
|
8889
8896
|
withCredentials: !0,
|
|
8890
8897
|
timeout: 3e4,
|
|
8891
8898
|
...r
|
|
@@ -9033,7 +9040,7 @@ function Ba() {
|
|
|
9033
9040
|
const r = ln("en-us", eh);
|
|
9034
9041
|
return {
|
|
9035
9042
|
i18n: r,
|
|
9036
|
-
i18nT:
|
|
9043
|
+
i18nT: fl(r)
|
|
9037
9044
|
// Translation component <i18n-t>
|
|
9038
9045
|
};
|
|
9039
9046
|
}
|
|
@@ -9046,16 +9053,16 @@ function th(r, e, t, i = {
|
|
|
9046
9053
|
headers: r.requestHeaders
|
|
9047
9054
|
}), { i18n: { t: s } } = Ba(), { debounce: a } = Kp(), u = a(async (w) => {
|
|
9048
9055
|
await v(w);
|
|
9049
|
-
}, 200), c = te(!1),
|
|
9050
|
-
let
|
|
9051
|
-
r.app === "konnect" ?
|
|
9056
|
+
}, 200), c = te(!1), f = te(""), p = te(""), b = te([]), P = te(void 0), A = k(e);
|
|
9057
|
+
let d = `${r.apiBaseUrl}${A}`;
|
|
9058
|
+
r.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, (r == null ? void 0 : r.controlPlaneId) || "") : r.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, r != null && r.workspace ? `/${r.workspace}` : ""));
|
|
9052
9059
|
const g = async () => {
|
|
9053
9060
|
try {
|
|
9054
9061
|
c.value = !0;
|
|
9055
|
-
const { data: w } = await n.get(`${
|
|
9062
|
+
const { data: w } = await n.get(`${d}?size=${t}`);
|
|
9056
9063
|
w != null && w.next || (P.value = i.fetchedItemsKey in w ? w[i.fetchedItemsKey] : []), b.value = i.fetchedItemsKey in w ? w[i.fetchedItemsKey] : [];
|
|
9057
9064
|
} catch {
|
|
9058
|
-
b.value = [],
|
|
9065
|
+
b.value = [], f.value = s("debouncedFilter.errors.fetch");
|
|
9059
9066
|
} finally {
|
|
9060
9067
|
c.value = !1;
|
|
9061
9068
|
}
|
|
@@ -9064,13 +9071,13 @@ function th(r, e, t, i = {
|
|
|
9064
9071
|
if (h.value !== w)
|
|
9065
9072
|
if (h.value = w || "", P.value === void 0)
|
|
9066
9073
|
try {
|
|
9067
|
-
c.value = !0,
|
|
9068
|
-
let E =
|
|
9074
|
+
c.value = !0, f.value = "", p.value = "";
|
|
9075
|
+
let E = d + "";
|
|
9069
9076
|
w && (E += `/${w}`);
|
|
9070
9077
|
const { data: I } = await n.get(`${E}?size=${t}`);
|
|
9071
9078
|
i.fetchedItemsKey in I ? b.value = I[i.fetchedItemsKey] : I != null && I.id ? b.value = [I] : b.value = [];
|
|
9072
9079
|
} catch (E) {
|
|
9073
|
-
((y = E == null ? void 0 : E.response) == null ? void 0 : y.status) === 404 ? p.value = s("debouncedFilter.errors.invalid") : (b.value = [],
|
|
9080
|
+
((y = E == null ? void 0 : E.response) == null ? void 0 : y.status) === 404 ? p.value = s("debouncedFilter.errors.invalid") : (b.value = [], f.value = s("debouncedFilter.errors.fetch"));
|
|
9074
9081
|
} finally {
|
|
9075
9082
|
c.value = !1;
|
|
9076
9083
|
}
|
|
@@ -9087,7 +9094,7 @@ function th(r, e, t, i = {
|
|
|
9087
9094
|
};
|
|
9088
9095
|
return {
|
|
9089
9096
|
loading: c,
|
|
9090
|
-
error:
|
|
9097
|
+
error: f,
|
|
9091
9098
|
validationError: p,
|
|
9092
9099
|
results: b,
|
|
9093
9100
|
allRecords: P,
|
|
@@ -9129,19 +9136,19 @@ function ih() {
|
|
|
9129
9136
|
}
|
|
9130
9137
|
};
|
|
9131
9138
|
}
|
|
9132
|
-
function
|
|
9139
|
+
function af(r, e) {
|
|
9133
9140
|
const t = te(k(r)), i = te(k(e)), n = L(
|
|
9134
9141
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
9135
9142
|
), s = L(
|
|
9136
9143
|
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
9137
9144
|
);
|
|
9138
9145
|
return (a) => {
|
|
9139
|
-
const { page: u, pageSize: c, offset:
|
|
9146
|
+
const { page: u, pageSize: c, offset: f, sortColumnKey: p, sortColumnOrder: b, query: P } = a;
|
|
9140
9147
|
try {
|
|
9141
9148
|
let A = new URL(s.value.href);
|
|
9142
|
-
return n.value && P ? (A.search = "", A = new URL(`${A.href}/${P}/`)) : (n.value || new URLSearchParams(P).forEach((
|
|
9143
|
-
A.searchParams.append(g,
|
|
9144
|
-
}), p && A.searchParams.append("sort_by", p), b === "desc" && A.searchParams.append("sort_desc", "1"), A.searchParams.append("size", String(c))),
|
|
9149
|
+
return n.value && P ? (A.search = "", A = new URL(`${A.href}/${P}/`)) : (n.value || new URLSearchParams(P).forEach((d, g) => {
|
|
9150
|
+
A.searchParams.append(g, d);
|
|
9151
|
+
}), p && A.searchParams.append("sort_by", p), b === "desc" && A.searchParams.append("sort_desc", "1"), A.searchParams.append("size", String(c))), f && u !== 1 && A.searchParams.append("offset", String(f)), A.href;
|
|
9145
9152
|
} catch (A) {
|
|
9146
9153
|
return console.error("RouteList(fetcher)", A), i.value;
|
|
9147
9154
|
}
|
|
@@ -9150,21 +9157,21 @@ function od(r, e) {
|
|
|
9150
9157
|
function nh(r, e, t = "data") {
|
|
9151
9158
|
const i = k(e), { axiosInstance: n } = Ca({
|
|
9152
9159
|
headers: r.requestHeaders
|
|
9153
|
-
}), s =
|
|
9160
|
+
}), s = af(r, i), a = te({
|
|
9154
9161
|
status: $t.Idle
|
|
9155
9162
|
});
|
|
9156
9163
|
return { fetcher: async (u) => {
|
|
9157
9164
|
try {
|
|
9158
9165
|
a.value = { status: $t.Loading };
|
|
9159
|
-
const c = s(u), { data:
|
|
9166
|
+
const c = s(u), { data: f } = await n.get(c), p = t && t.replace(/[^\w-_]/gi, "");
|
|
9160
9167
|
let b;
|
|
9161
|
-
|
|
9168
|
+
f[p] && Array.isArray(f[p]) ? b = f[p] : b = Object.keys(f).length ? [f] : [];
|
|
9162
9169
|
const P = {
|
|
9163
9170
|
data: b,
|
|
9164
9171
|
total: b.length,
|
|
9165
|
-
...
|
|
9172
|
+
...f.offset ? {
|
|
9166
9173
|
pagination: {
|
|
9167
|
-
offset:
|
|
9174
|
+
offset: f.offset
|
|
9168
9175
|
}
|
|
9169
9176
|
} : null
|
|
9170
9177
|
};
|
|
@@ -9173,19 +9180,19 @@ function nh(r, e, t = "data") {
|
|
|
9173
9180
|
response: P
|
|
9174
9181
|
}, P;
|
|
9175
9182
|
} catch (c) {
|
|
9176
|
-
const
|
|
9183
|
+
const f = {
|
|
9177
9184
|
data: [],
|
|
9178
9185
|
total: 0
|
|
9179
9186
|
};
|
|
9180
9187
|
return u.query && c.response.status === 404 ? (a.value = {
|
|
9181
9188
|
status: $t.NoResults,
|
|
9182
|
-
response:
|
|
9189
|
+
response: f,
|
|
9183
9190
|
error: c
|
|
9184
|
-
},
|
|
9191
|
+
}, f) : (a.value = {
|
|
9185
9192
|
status: $t.Error,
|
|
9186
|
-
response:
|
|
9193
|
+
response: f,
|
|
9187
9194
|
error: c
|
|
9188
|
-
},
|
|
9195
|
+
}, f);
|
|
9189
9196
|
}
|
|
9190
9197
|
}, fetcherState: a };
|
|
9191
9198
|
}
|
|
@@ -9194,10 +9201,10 @@ function sh() {
|
|
|
9194
9201
|
convertKeyToTitle: (r, e = "_") => r ? r.split(e).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
9195
9202
|
};
|
|
9196
9203
|
}
|
|
9197
|
-
const
|
|
9204
|
+
const cf = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, il = (r) => {
|
|
9198
9205
|
if (typeof r != "string")
|
|
9199
9206
|
throw new TypeError("Invalid argument expected string");
|
|
9200
|
-
const e = r.match(
|
|
9207
|
+
const e = r.match(cf);
|
|
9201
9208
|
if (!e)
|
|
9202
9209
|
throw new Error(`Invalid argument not valid semver ('${r}' received)`);
|
|
9203
9210
|
return e.shift(), e;
|
|
@@ -9222,21 +9229,21 @@ const ad = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
9222
9229
|
}, al = (r, e, t) => {
|
|
9223
9230
|
lh(t);
|
|
9224
9231
|
const i = ch(r, e);
|
|
9225
|
-
return
|
|
9226
|
-
},
|
|
9232
|
+
return lf[t].includes(i);
|
|
9233
|
+
}, lf = {
|
|
9227
9234
|
">": [1],
|
|
9228
9235
|
">=": [0, 1],
|
|
9229
9236
|
"=": [0],
|
|
9230
9237
|
"<=": [-1, 0],
|
|
9231
9238
|
"<": [-1],
|
|
9232
9239
|
"!=": [-1, 1]
|
|
9233
|
-
}, cl = Object.keys(
|
|
9240
|
+
}, cl = Object.keys(lf), lh = (r) => {
|
|
9234
9241
|
if (typeof r != "string")
|
|
9235
9242
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof r}`);
|
|
9236
9243
|
if (cl.indexOf(r) === -1)
|
|
9237
9244
|
throw new Error(`Invalid operator, expected one of ${cl.join("|")}`);
|
|
9238
|
-
}, uh = (r) => typeof r == "string" && /^[v\d]/.test(r) &&
|
|
9239
|
-
function
|
|
9245
|
+
}, uh = (r) => typeof r == "string" && /^[v\d]/.test(r) && cf.test(r);
|
|
9246
|
+
function fh(r) {
|
|
9240
9247
|
const { gatewayInfo: e, supportedRange: t } = r;
|
|
9241
9248
|
if (!e)
|
|
9242
9249
|
return !0;
|
|
@@ -9255,18 +9262,18 @@ const Re = {
|
|
|
9255
9262
|
useDeleteUrlBuilder: rh,
|
|
9256
9263
|
useErrors: ih,
|
|
9257
9264
|
useFetcher: nh,
|
|
9258
|
-
useFetchUrlBuilder:
|
|
9265
|
+
useFetchUrlBuilder: af,
|
|
9259
9266
|
useStringHelpers: sh,
|
|
9260
9267
|
useI18n: Ba,
|
|
9261
|
-
useGatewayFeatureSupported:
|
|
9262
|
-
},
|
|
9268
|
+
useGatewayFeatureSupported: fh
|
|
9269
|
+
}, dh = {
|
|
9263
9270
|
fail: "Failed to copy id to clipboard",
|
|
9264
9271
|
success: {
|
|
9265
9272
|
prefix: "Successfully",
|
|
9266
9273
|
content: " copied to clipboard"
|
|
9267
9274
|
}
|
|
9268
9275
|
}, ph = "Copy to clipboard", hh = {
|
|
9269
|
-
message:
|
|
9276
|
+
message: dh,
|
|
9270
9277
|
iconTitle: ph
|
|
9271
9278
|
}, yh = "kong-ui-copy-uuid-notify", gh = { class: "kong-ui-copy-uuid" }, vh = ["title"], mh = ["onClick"], ll = 15, bh = /* @__PURE__ */ Be({
|
|
9272
9279
|
__name: "CopyUuid",
|
|
@@ -9314,7 +9321,7 @@ const Re = {
|
|
|
9314
9321
|
positionFixed: !0,
|
|
9315
9322
|
maxWidth: "500px",
|
|
9316
9323
|
placement: "bottomStart"
|
|
9317
|
-
} : {}), c = L(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid),
|
|
9324
|
+
} : {}), c = L(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), f = (b) => {
|
|
9318
9325
|
a.value = b, setTimeout(() => {
|
|
9319
9326
|
a.value = t.tooltip;
|
|
9320
9327
|
}, 1800);
|
|
@@ -9323,17 +9330,17 @@ const Re = {
|
|
|
9323
9330
|
typeof n == "function" && n({
|
|
9324
9331
|
type: "error",
|
|
9325
9332
|
message: i("message.fail")
|
|
9326
|
-
}), s.value ?
|
|
9333
|
+
}), s.value ? f(i("message.fail")) : e("error", t.uuid);
|
|
9327
9334
|
return;
|
|
9328
9335
|
}
|
|
9329
9336
|
const P = t.uuid.length > ll, A = t.format === "hidden" || t.format === "redacted" ? i("message.success.prefix") : `"${t.uuid.substring(0, ll) + (P ? "..." : "")}"`;
|
|
9330
9337
|
typeof n == "function" && n({
|
|
9331
9338
|
type: "success",
|
|
9332
9339
|
message: `${A}${i("message.success.content")}`
|
|
9333
|
-
}), s.value ?
|
|
9340
|
+
}), s.value ? f(t.successTooltip) : e("success", t.uuid);
|
|
9334
9341
|
};
|
|
9335
9342
|
return (b, P) => {
|
|
9336
|
-
const A = ee("KIcon"),
|
|
9343
|
+
const A = ee("KIcon"), d = ee("KClipboardProvider");
|
|
9337
9344
|
return _(), K("div", gh, [
|
|
9338
9345
|
r.format !== "hidden" ? (_(), K("div", {
|
|
9339
9346
|
key: 0,
|
|
@@ -9348,9 +9355,9 @@ const Re = {
|
|
|
9348
9355
|
])
|
|
9349
9356
|
}, M(c.value), 3)
|
|
9350
9357
|
], 8, vh)) : Ie("", !0),
|
|
9351
|
-
(_(),
|
|
9358
|
+
(_(), fe(cn(r.tooltip ? "KTooltip" : "div"), Po(u.value, { class: "uuid-icon-wrapper" }), {
|
|
9352
9359
|
default: x(() => [
|
|
9353
|
-
$(
|
|
9360
|
+
$(d, null, {
|
|
9354
9361
|
default: x(({ copyToClipboard: g }) => [
|
|
9355
9362
|
oe("span", {
|
|
9356
9363
|
"data-testid": "copy-to-clipboard",
|
|
@@ -9381,7 +9388,7 @@ const Re = {
|
|
|
9381
9388
|
for (const [i, n] of e)
|
|
9382
9389
|
t[i] = n;
|
|
9383
9390
|
return t;
|
|
9384
|
-
},
|
|
9391
|
+
}, uf = /* @__PURE__ */ wh(bh, [["__scopeId", "data-v-e4ea1359"]]), Sh = {
|
|
9385
9392
|
key: 0,
|
|
9386
9393
|
class: "config-card-fieldset-title"
|
|
9387
9394
|
}, kh = /* @__PURE__ */ Be({
|
|
@@ -9408,14 +9415,14 @@ const Re = {
|
|
|
9408
9415
|
var c;
|
|
9409
9416
|
return e.isArrayItem ? (c = s.value) != null && c.name ? i(s.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: e.index }) : "";
|
|
9410
9417
|
});
|
|
9411
|
-
return (c,
|
|
9418
|
+
return (c, f) => (_(), fe(cn(r.isArrayItem ? "fieldset" : "div"), {
|
|
9412
9419
|
class: Qt(r.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
9413
9420
|
}, {
|
|
9414
9421
|
default: x(() => [
|
|
9415
9422
|
r.isArrayItem ? (_(), K("legend", Sh, [
|
|
9416
9423
|
oe("b", null, M(u.value), 1)
|
|
9417
9424
|
])) : Ie("", !0),
|
|
9418
|
-
(_(!0), K(Fe, null, Ue(Object.keys(a.value), (p, b) => (_(),
|
|
9425
|
+
(_(!0), K(Fe, null, Ue(Object.keys(a.value), (p, b) => (_(), fe(ts, {
|
|
9419
9426
|
key: `${n.value}-property-${b}`,
|
|
9420
9427
|
item: {
|
|
9421
9428
|
key: p,
|
|
@@ -9432,7 +9439,7 @@ const Re = {
|
|
|
9432
9439
|
for (const [i, n] of e)
|
|
9433
9440
|
t[i] = n;
|
|
9434
9441
|
return t;
|
|
9435
|
-
},
|
|
9442
|
+
}, ff = /* @__PURE__ */ mt(kh, [["__scopeId", "data-v-68ca83ec"]]), Ah = /* @__PURE__ */ Be({
|
|
9436
9443
|
__name: "InternalLinkItem",
|
|
9437
9444
|
props: {
|
|
9438
9445
|
item: {
|
|
@@ -9471,7 +9478,7 @@ const Re = {
|
|
|
9471
9478
|
const { i18n: { t: e } } = Re.useI18n();
|
|
9472
9479
|
return (t, i) => {
|
|
9473
9480
|
const n = ee("KBadge");
|
|
9474
|
-
return _(),
|
|
9481
|
+
return _(), fe(n, {
|
|
9475
9482
|
appearance: r.status ? "success" : "neutral"
|
|
9476
9483
|
}, {
|
|
9477
9484
|
default: x(() => [
|
|
@@ -9483,7 +9490,7 @@ const Re = {
|
|
|
9483
9490
|
}
|
|
9484
9491
|
}), Bh = "#0044f4", Ih = "#e0e4ea", Eh = "#3a3f51", _h = "1px", Nh = { class: "config-card-details-row" }, Oh = ["data-testid"], Th = ["data-testid"], jh = ["data-testid"], Ph = ["data-testid"], $h = { key: 1 }, Rh = ["data-testid"], Vh = ["data-testid"], Uh = ["data-testid"], Mh = ["data-testid"], Dh = ["title"], Lh = {
|
|
9485
9492
|
name: "ConfigCardItem",
|
|
9486
|
-
components: { CopyUuid:
|
|
9493
|
+
components: { CopyUuid: uf, JsonCardItem: ff, StatusBadge: Ch, InternalLinkItem: xh }
|
|
9487
9494
|
}, Hh = /* @__PURE__ */ Be({
|
|
9488
9495
|
...Lh,
|
|
9489
9496
|
props: {
|
|
@@ -9505,13 +9512,13 @@ const Re = {
|
|
|
9505
9512
|
emits: ["navigation-click"],
|
|
9506
9513
|
setup(r, { emit: e }) {
|
|
9507
9514
|
const t = r;
|
|
9508
|
-
|
|
9509
|
-
"2c6ac268":
|
|
9515
|
+
_f((b) => ({
|
|
9516
|
+
"2c6ac268": f.value ? "none" : `solid ${k(_h)} ${k(Ih)}`,
|
|
9510
9517
|
c7a65802: c.value && a.value ? "block" : "flex",
|
|
9511
9518
|
"778426fe": c.value && a.value ? "100%" : t.slim ? "50%" : "25%",
|
|
9512
9519
|
"777f9b48": c.value && a.value ? "100%" : t.slim ? "50%" : "75%"
|
|
9513
9520
|
}));
|
|
9514
|
-
const i = $o(), { i18n: { t: n, formatUnixTimeStamp: s } } = Re.useI18n(), a = L(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), u = L(() => !!(t.item.tooltip || i["label-tooltip"])), c = L(() => t.item.type === ye.Json || t.item.type === ye.JsonArray),
|
|
9521
|
+
const i = $o(), { i18n: { t: n, formatUnixTimeStamp: s } } = Re.useI18n(), a = L(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), u = L(() => !!(t.item.tooltip || i["label-tooltip"])), c = L(() => t.item.type === ye.Json || t.item.type === ye.JsonArray), f = L(() => t.item.type === ye.JsonArray), p = L(() => {
|
|
9515
9522
|
switch (t.item.type) {
|
|
9516
9523
|
case ye.ID:
|
|
9517
9524
|
return {
|
|
@@ -9639,7 +9646,7 @@ const Re = {
|
|
|
9639
9646
|
}
|
|
9640
9647
|
});
|
|
9641
9648
|
return (b, P) => {
|
|
9642
|
-
const A = ee("KLabel"),
|
|
9649
|
+
const A = ee("KLabel"), d = ee("KBadge"), g = ee("KMethodBadge");
|
|
9643
9650
|
return _(), K("div", Nh, [
|
|
9644
9651
|
oe("div", {
|
|
9645
9652
|
class: "config-card-details-label",
|
|
@@ -9676,13 +9683,13 @@ const Re = {
|
|
|
9676
9683
|
rowValue: r.item.value
|
|
9677
9684
|
}, () => [
|
|
9678
9685
|
a.value ? (_(), K("div", $h, [
|
|
9679
|
-
(_(),
|
|
9686
|
+
(_(), fe(cn(p.value.tag), Nf(Of(p.value.attrs)), {
|
|
9680
9687
|
default: x(() => [
|
|
9681
9688
|
p.value.additionalComponent === "KBadge" ? (_(), K("div", {
|
|
9682
9689
|
key: 0,
|
|
9683
9690
|
"data-testid": `${r.item.key}-badge-tags`
|
|
9684
9691
|
}, [
|
|
9685
|
-
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(),
|
|
9692
|
+
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(), fe(d, {
|
|
9686
9693
|
key: `${r.item.key}-badge-tag-${v}`,
|
|
9687
9694
|
class: "config-badge",
|
|
9688
9695
|
"data-testid": `${r.item.key}-badge-tag-${v}`,
|
|
@@ -9699,7 +9706,7 @@ const Re = {
|
|
|
9699
9706
|
class: "copy-uuid-array",
|
|
9700
9707
|
"data-testid": `${r.item.key}-copy-uuid-array`
|
|
9701
9708
|
}, [
|
|
9702
|
-
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(),
|
|
9709
|
+
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(), fe(k(uf), Po(p.value.childAttrs, {
|
|
9703
9710
|
key: `${r.item.key}-copy-uuid-${v}`,
|
|
9704
9711
|
"data-testid": `${r.item.key}-copy-uuid-${v}`,
|
|
9705
9712
|
uuid: h
|
|
@@ -9709,13 +9716,13 @@ const Re = {
|
|
|
9709
9716
|
class: "method-badge-array",
|
|
9710
9717
|
"data-testid": `${r.item.key}-badge-methods`
|
|
9711
9718
|
}, [
|
|
9712
|
-
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(),
|
|
9719
|
+
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(), fe(g, {
|
|
9713
9720
|
key: `${r.item.key}-badge-method-${v}`,
|
|
9714
9721
|
class: "config-badge",
|
|
9715
9722
|
"data-testid": `${r.item.key}-badge-method-${v}`,
|
|
9716
9723
|
"is-rounded": "",
|
|
9717
9724
|
label: h,
|
|
9718
|
-
method: k(
|
|
9725
|
+
method: k($f).includes(h.toLowerCase()) ? h.toLowerCase() : "custom"
|
|
9719
9726
|
}, {
|
|
9720
9727
|
default: x(() => [
|
|
9721
9728
|
ue(M(h), 1)
|
|
@@ -9727,7 +9734,7 @@ const Re = {
|
|
|
9727
9734
|
key: 3,
|
|
9728
9735
|
"data-testid": `${t.item.key}-json-array-content`
|
|
9729
9736
|
}, [
|
|
9730
|
-
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(),
|
|
9737
|
+
(_(!0), K(Fe, null, Ue(r.item.value, (h, v) => (_(), fe(ff, {
|
|
9731
9738
|
key: `json-array-item-${v}`,
|
|
9732
9739
|
index: v,
|
|
9733
9740
|
"is-array-item": "",
|
|
@@ -9814,7 +9821,7 @@ const Re = {
|
|
|
9814
9821
|
var t;
|
|
9815
9822
|
const i = r, n = $o(), { i18n: { t: s } } = Re.useI18n(), { getMessageFromError: a } = Re.useErrors(), { convertKeyToTitle: u } = Re.useStringHelpers(), { axiosInstance: c } = Re.useAxios({
|
|
9816
9823
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
9817
|
-
}),
|
|
9824
|
+
}), f = {
|
|
9818
9825
|
id: {
|
|
9819
9826
|
type: ye.ID,
|
|
9820
9827
|
label: s("baseConfigCard.commonFields.id_label"),
|
|
@@ -9848,13 +9855,13 @@ const Re = {
|
|
|
9848
9855
|
// the last property displayed
|
|
9849
9856
|
section: me.Basic
|
|
9850
9857
|
}
|
|
9851
|
-
}, p = te(!1), b = te(!1), P = te(""), A = te(),
|
|
9858
|
+
}, p = te(!1), b = te(!1), P = te(""), A = te(), d = L(() => {
|
|
9852
9859
|
var E, I, T;
|
|
9853
9860
|
if (!A.value)
|
|
9854
9861
|
return [];
|
|
9855
9862
|
const ce = [], re = Object.keys(A.value).length;
|
|
9856
9863
|
for (const R in A.value) {
|
|
9857
|
-
const F = (I = (E = i.configSchema) == null ? void 0 : E[R]) == null ? void 0 : I.order, Q = (T =
|
|
9864
|
+
const F = (I = (E = i.configSchema) == null ? void 0 : E[R]) == null ? void 0 : I.order, Q = (T = f[R]) == null ? void 0 : T.order;
|
|
9858
9865
|
let G = re;
|
|
9859
9866
|
(Q || Q === 0) && (G = Q === -1 ? re + 1 : Q), F && (G = F === -1 ? re + 1 : F), ce.push([R, G]);
|
|
9860
9867
|
}
|
|
@@ -9862,7 +9869,7 @@ const Re = {
|
|
|
9862
9869
|
return R[1] - F[1];
|
|
9863
9870
|
}), ce.map((R) => {
|
|
9864
9871
|
var F, Q;
|
|
9865
|
-
const G = R[0], ke = (F = A.value) == null ? void 0 : F[G], Le = ((Q = i.configSchema) == null ? void 0 : Q[G]) || {}, Ve =
|
|
9872
|
+
const G = R[0], ke = (F = A.value) == null ? void 0 : F[G], Le = ((Q = i.configSchema) == null ? void 0 : Q[G]) || {}, Ve = f[G];
|
|
9866
9873
|
return {
|
|
9867
9874
|
key: G,
|
|
9868
9875
|
value: ke,
|
|
@@ -9901,9 +9908,9 @@ const Re = {
|
|
|
9901
9908
|
}), h = L(() => {
|
|
9902
9909
|
var E, I, T, ce;
|
|
9903
9910
|
return {
|
|
9904
|
-
basic: (E =
|
|
9905
|
-
advanced: (I =
|
|
9906
|
-
plugin: (ce = g.value) == null ? void 0 : ce.concat((T =
|
|
9911
|
+
basic: (E = d.value) == null ? void 0 : E.filter((re) => re.section === me.Basic),
|
|
9912
|
+
advanced: (I = d.value) == null ? void 0 : I.filter((re) => re.section === me.Advanced),
|
|
9913
|
+
plugin: (ce = g.value) == null ? void 0 : ce.concat((T = d.value) == null ? void 0 : T.filter((re) => re.section === me.Plugin))
|
|
9907
9914
|
};
|
|
9908
9915
|
}), v = L(() => {
|
|
9909
9916
|
const E = [];
|
|
@@ -9939,7 +9946,7 @@ const Re = {
|
|
|
9939
9946
|
}
|
|
9940
9947
|
}), (E, I) => {
|
|
9941
9948
|
const T = ee("KButton"), ce = ee("KClipboardProvider"), re = ee("KSkeleton"), R = ee("KEmptyState"), F = ee("KCard");
|
|
9942
|
-
return _(),
|
|
9949
|
+
return _(), fe(F, {
|
|
9943
9950
|
"border-variant": "noBorder",
|
|
9944
9951
|
class: "kong-ui-entity-base-config-card"
|
|
9945
9952
|
}, yr({
|
|
@@ -9948,7 +9955,7 @@ const Re = {
|
|
|
9948
9955
|
Ce(E.$slots, "actions", {}, void 0, !0),
|
|
9949
9956
|
$(ce, null, {
|
|
9950
9957
|
default: x(({ copyToClipboard: Q }) => [
|
|
9951
|
-
!p.value && !b.value ? (_(),
|
|
9958
|
+
!p.value && !b.value ? (_(), fe(T, {
|
|
9952
9959
|
key: 0,
|
|
9953
9960
|
appearance: "btn-link",
|
|
9954
9961
|
"data-testid": "json-copy-button",
|
|
@@ -9965,12 +9972,12 @@ const Re = {
|
|
|
9965
9972
|
])
|
|
9966
9973
|
]),
|
|
9967
9974
|
body: x(() => [
|
|
9968
|
-
p.value ? (_(),
|
|
9975
|
+
p.value ? (_(), fe(re, {
|
|
9969
9976
|
key: 0,
|
|
9970
9977
|
"data-testid": "config-card-loader",
|
|
9971
9978
|
"table-columns": 2,
|
|
9972
9979
|
type: "table"
|
|
9973
|
-
})) : b.value ? (_(),
|
|
9980
|
+
})) : b.value ? (_(), fe(R, {
|
|
9974
9981
|
key: 1,
|
|
9975
9982
|
"data-testid": "config-card-fetch-error",
|
|
9976
9983
|
"is-error": ""
|
|
@@ -9987,7 +9994,7 @@ const Re = {
|
|
|
9987
9994
|
"data-testid": `config-card-details-${Q}-props`
|
|
9988
9995
|
}, [
|
|
9989
9996
|
Q !== "basic" ? (_(), K("div", Gh, M(Q === "advanced" ? k(s)("baseConfigCard.sections.advanced") : k(s)("baseConfigCard.sections.plugin")), 1)) : Ie("", !0),
|
|
9990
|
-
(_(!0), K(Fe, null, Ue(h.value[Q], (G) => (_(),
|
|
9997
|
+
(_(!0), K(Fe, null, Ue(h.value[Q], (G) => (_(), fe(ts, {
|
|
9991
9998
|
key: G.key,
|
|
9992
9999
|
item: G
|
|
9993
10000
|
}, yr({
|
|
@@ -10029,7 +10036,7 @@ const Re = {
|
|
|
10029
10036
|
]), 1024);
|
|
10030
10037
|
};
|
|
10031
10038
|
}
|
|
10032
|
-
}),
|
|
10039
|
+
}), df = /* @__PURE__ */ mt(Wh, [["__scopeId", "data-v-b72bbdde"]]), Jh = ["onReset", "onSubmit"], Yh = {
|
|
10033
10040
|
class: "form-actions",
|
|
10034
10041
|
"data-testid": "form-actions"
|
|
10035
10042
|
}, Zh = /* @__PURE__ */ Be({
|
|
@@ -10084,15 +10091,15 @@ const Re = {
|
|
|
10084
10091
|
var t;
|
|
10085
10092
|
const i = r, n = ci(), { i18n: { t: s } } = Re.useI18n(), { getMessageFromError: a } = Re.useErrors(), { axiosInstance: u } = Re.useAxios({
|
|
10086
10093
|
headers: (t = i.config) == null ? void 0 : t.requestHeaders
|
|
10087
|
-
}), c = te(!1),
|
|
10094
|
+
}), c = te(!1), f = te(!1), p = te(""), b = L(() => i.canSubmit === !1 || i.isReadonly), P = L(() => {
|
|
10088
10095
|
var h, v;
|
|
10089
10096
|
if (!i.editId)
|
|
10090
10097
|
return "";
|
|
10091
10098
|
let w = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
10092
10099
|
return i.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((h = i.config) == null ? void 0 : h.controlPlaneId) || "") : i.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (v = i.config) != null && v.workspace ? `/${i.config.workspace}` : "")), w = w.replace(/{id}/gi, i.editId), w;
|
|
10093
10100
|
}), A = () => {
|
|
10094
|
-
i.config.cancelRoute ? n.push(i.config.cancelRoute) :
|
|
10095
|
-
},
|
|
10101
|
+
i.config.cancelRoute ? n.push(i.config.cancelRoute) : d();
|
|
10102
|
+
}, d = () => {
|
|
10096
10103
|
e("cancel");
|
|
10097
10104
|
}, g = () => {
|
|
10098
10105
|
b.value || e("submit");
|
|
@@ -10102,23 +10109,23 @@ const Re = {
|
|
|
10102
10109
|
}, { immediate: !0 }), ai(async () => {
|
|
10103
10110
|
if (i.editId)
|
|
10104
10111
|
try {
|
|
10105
|
-
|
|
10112
|
+
f.value = !1, c.value = !0;
|
|
10106
10113
|
const { data: h } = await u.get(P.value);
|
|
10107
10114
|
e("fetch:success", h);
|
|
10108
10115
|
} catch (h) {
|
|
10109
10116
|
const v = a(h);
|
|
10110
|
-
p.value = v.startsWith("code") ? s("baseForm.errors.edit") : v,
|
|
10117
|
+
p.value = v.startsWith("code") ? s("baseForm.errors.edit") : v, f.value = !0, e("fetch:error", h);
|
|
10111
10118
|
} finally {
|
|
10112
10119
|
c.value = !1;
|
|
10113
10120
|
}
|
|
10114
10121
|
}), (h, v) => {
|
|
10115
10122
|
const w = ee("KSkeleton"), y = ee("KEmptyState"), B = ee("KAlert"), E = ee("KButton"), I = ee("KCard");
|
|
10116
|
-
return _(),
|
|
10123
|
+
return _(), fe(I, { class: "kong-ui-entity-base-form" }, {
|
|
10117
10124
|
body: x(() => [
|
|
10118
|
-
c.value ? (_(),
|
|
10125
|
+
c.value ? (_(), fe(w, {
|
|
10119
10126
|
key: 0,
|
|
10120
10127
|
type: "form"
|
|
10121
|
-
})) :
|
|
10128
|
+
})) : f.value ? (_(), fe(y, {
|
|
10122
10129
|
key: 1,
|
|
10123
10130
|
"cta-text": k(s)("baseForm.actions.back"),
|
|
10124
10131
|
"data-testid": "form-fetch-error",
|
|
@@ -10132,11 +10139,11 @@ const Re = {
|
|
|
10132
10139
|
}, 8, ["cta-text"])) : (_(), K("form", {
|
|
10133
10140
|
key: 2,
|
|
10134
10141
|
"data-testid": "form-content",
|
|
10135
|
-
onReset: hr(
|
|
10142
|
+
onReset: hr(d, ["prevent"]),
|
|
10136
10143
|
onSubmit: hr(g, ["prevent"])
|
|
10137
10144
|
}, [
|
|
10138
10145
|
Ce(h.$slots, "default", {}, void 0, !0),
|
|
10139
|
-
r.errorMessage ? (_(),
|
|
10146
|
+
r.errorMessage ? (_(), fe(B, {
|
|
10140
10147
|
key: 0,
|
|
10141
10148
|
"alert-message": r.errorMessage,
|
|
10142
10149
|
appearance: "danger",
|
|
@@ -10174,7 +10181,7 @@ const Re = {
|
|
|
10174
10181
|
});
|
|
10175
10182
|
};
|
|
10176
10183
|
}
|
|
10177
|
-
}),
|
|
10184
|
+
}), pf = /* @__PURE__ */ mt(Zh, [["__scopeId", "data-v-2286e5f2"]]), Qh = { key: 0 }, Xh = /* @__PURE__ */ Be({
|
|
10178
10185
|
__name: "EntityBaseTableCell",
|
|
10179
10186
|
props: {
|
|
10180
10187
|
keyName: {
|
|
@@ -10203,8 +10210,8 @@ const Re = {
|
|
|
10203
10210
|
s && (s.disconnect(), s = void 0);
|
|
10204
10211
|
}, u = () => {
|
|
10205
10212
|
var g, h, v;
|
|
10206
|
-
|
|
10207
|
-
}, c = te({}),
|
|
10213
|
+
f.value = ((g = i.value) == null ? void 0 : g.getBoundingClientRect().width) || 0, p.value = ((h = t.value) == null ? void 0 : h.clientWidth) || 0, b.value = ((v = c.value) == null ? void 0 : v.innerText) || "";
|
|
10214
|
+
}, c = te({}), f = te(0), p = te(0), b = te(""), P = L(() => [i.value, t.value]), A = Or(
|
|
10208
10215
|
P,
|
|
10209
10216
|
(g) => {
|
|
10210
10217
|
if (n.value && (a(), "ResizeObserver" in window && window)) {
|
|
@@ -10218,10 +10225,10 @@ const Re = {
|
|
|
10218
10225
|
}
|
|
10219
10226
|
},
|
|
10220
10227
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
10221
|
-
),
|
|
10222
|
-
return
|
|
10228
|
+
), d = L(() => n.value ? f.value > p.value : !1);
|
|
10229
|
+
return Tf(() => {
|
|
10223
10230
|
u();
|
|
10224
|
-
}),
|
|
10231
|
+
}), jf(() => {
|
|
10225
10232
|
A();
|
|
10226
10233
|
}), (g, h) => {
|
|
10227
10234
|
const v = ee("KTooltip");
|
|
@@ -10232,7 +10239,7 @@ const Re = {
|
|
|
10232
10239
|
}, [
|
|
10233
10240
|
n.value ? (_(), K("span", Qh, [
|
|
10234
10241
|
$(v, {
|
|
10235
|
-
disabled: !
|
|
10242
|
+
disabled: !d.value,
|
|
10236
10243
|
label: b.value,
|
|
10237
10244
|
"max-width": "300",
|
|
10238
10245
|
placement: "bottomStart"
|
|
@@ -10370,7 +10377,7 @@ const Re = {
|
|
|
10370
10377
|
"data-rowid": y.id,
|
|
10371
10378
|
"data-testid": y.name,
|
|
10372
10379
|
...t.rowAttributes(y)
|
|
10373
|
-
}), c = te({}),
|
|
10380
|
+
}), c = te({}), f = (y) => {
|
|
10374
10381
|
var B;
|
|
10375
10382
|
return (B = c.value) == null ? void 0 : B.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
10376
10383
|
}, p = (y) => {
|
|
@@ -10389,7 +10396,7 @@ const Re = {
|
|
|
10389
10396
|
e("clear-search-input");
|
|
10390
10397
|
}, A = (y, B) => {
|
|
10391
10398
|
e("click:row", B);
|
|
10392
|
-
},
|
|
10399
|
+
}, d = (y) => {
|
|
10393
10400
|
e("sort", y);
|
|
10394
10401
|
}, { setTablePreferences: g, getTablePreferences: h } = qp(), v = L(() => {
|
|
10395
10402
|
const y = h(t.preferencesStorageKey);
|
|
@@ -10402,7 +10409,7 @@ const Re = {
|
|
|
10402
10409
|
};
|
|
10403
10410
|
return (y, B) => {
|
|
10404
10411
|
const E = ee("KIcon"), I = ee("KButton"), T = ee("KDropdownMenu"), ce = ee("KTable"), re = ee("KCard");
|
|
10405
|
-
return _(),
|
|
10412
|
+
return _(), fe(re, {
|
|
10406
10413
|
class: "kong-ui-entity-base-table",
|
|
10407
10414
|
title: r.title
|
|
10408
10415
|
}, {
|
|
@@ -10435,7 +10442,7 @@ const Re = {
|
|
|
10435
10442
|
"search-input": r.query,
|
|
10436
10443
|
onKtableEmptyStateCtaClicked: b,
|
|
10437
10444
|
"onRow:click": A,
|
|
10438
|
-
onSort: B[0] || (B[0] = (R) =>
|
|
10445
|
+
onSort: B[0] || (B[0] = (R) => d(R)),
|
|
10439
10446
|
"onUpdate:tablePreferences": w
|
|
10440
10447
|
}, yr({
|
|
10441
10448
|
toolbar: x(({ state: R }) => [
|
|
@@ -10491,7 +10498,7 @@ const Re = {
|
|
|
10491
10498
|
fn: x(({ row: Q, rowKey: G, rowValue: ke }) => [
|
|
10492
10499
|
$(ey, {
|
|
10493
10500
|
"key-name": String(F),
|
|
10494
|
-
"row-el":
|
|
10501
|
+
"row-el": f(Q)
|
|
10495
10502
|
}, {
|
|
10496
10503
|
default: x(() => [
|
|
10497
10504
|
Ce(y.$slots, F, {
|
|
@@ -10512,7 +10519,7 @@ const Re = {
|
|
|
10512
10519
|
}, 8, ["title"]);
|
|
10513
10520
|
};
|
|
10514
10521
|
}
|
|
10515
|
-
}),
|
|
10522
|
+
}), hf = /* @__PURE__ */ mt(ny, [["__scopeId", "data-v-a598b1d9"]]), sy = {
|
|
10516
10523
|
key: 0,
|
|
10517
10524
|
class: "kong-ui-entity-delete-error"
|
|
10518
10525
|
}, oy = {
|
|
@@ -10563,8 +10570,8 @@ const Re = {
|
|
|
10563
10570
|
e("proceed");
|
|
10564
10571
|
};
|
|
10565
10572
|
return (u, c) => {
|
|
10566
|
-
const
|
|
10567
|
-
return _(),
|
|
10573
|
+
const f = ee("KAlert"), p = ee("KPrompt");
|
|
10574
|
+
return _(), fe(p, {
|
|
10568
10575
|
"action-button-text": "Yes, delete",
|
|
10569
10576
|
"action-pending": r.actionPending,
|
|
10570
10577
|
class: "kong-ui-entity-delete-modal",
|
|
@@ -10577,7 +10584,7 @@ const Re = {
|
|
|
10577
10584
|
}, {
|
|
10578
10585
|
"body-content": x(() => [
|
|
10579
10586
|
r.error ? (_(), K("div", sy, [
|
|
10580
|
-
$(
|
|
10587
|
+
$(f, { appearance: "danger" }, {
|
|
10581
10588
|
alertMessage: x(() => [
|
|
10582
10589
|
ue(M(r.error), 1)
|
|
10583
10590
|
]),
|
|
@@ -10612,7 +10619,7 @@ const Re = {
|
|
|
10612
10619
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
10613
10620
|
};
|
|
10614
10621
|
}
|
|
10615
|
-
}),
|
|
10622
|
+
}), yf = /* @__PURE__ */ mt(ay, [["__scopeId", "data-v-1c9a2a07"]]), cy = {
|
|
10616
10623
|
fill: "none",
|
|
10617
10624
|
height: "20",
|
|
10618
10625
|
viewBox: "0 0 20 20",
|
|
@@ -10626,7 +10633,7 @@ const Re = {
|
|
|
10626
10633
|
width: "20",
|
|
10627
10634
|
x: "0",
|
|
10628
10635
|
y: "0"
|
|
10629
|
-
}, uy = ["fill"],
|
|
10636
|
+
}, uy = ["fill"], fy = { mask: "url(#mask0_180_20349)" }, dy = ["fill"], py = /* @__PURE__ */ Be({
|
|
10630
10637
|
__name: "IconFilter",
|
|
10631
10638
|
props: {
|
|
10632
10639
|
color: {
|
|
@@ -10643,11 +10650,11 @@ const Re = {
|
|
|
10643
10650
|
width: "20"
|
|
10644
10651
|
}, null, 8, uy)
|
|
10645
10652
|
]),
|
|
10646
|
-
oe("g",
|
|
10653
|
+
oe("g", fy, [
|
|
10647
10654
|
oe("path", {
|
|
10648
10655
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
10649
10656
|
fill: r.color
|
|
10650
|
-
}, null, 8,
|
|
10657
|
+
}, null, 8, dy)
|
|
10651
10658
|
])
|
|
10652
10659
|
]));
|
|
10653
10660
|
}
|
|
@@ -10693,7 +10700,7 @@ const Re = {
|
|
|
10693
10700
|
});
|
|
10694
10701
|
const c = () => {
|
|
10695
10702
|
n.value = !n.value;
|
|
10696
|
-
},
|
|
10703
|
+
}, f = (h) => {
|
|
10697
10704
|
e("update:modelValue", h);
|
|
10698
10705
|
}, p = (h) => `filter-${h}`, b = (h) => {
|
|
10699
10706
|
var v, w;
|
|
@@ -10709,7 +10716,7 @@ const Re = {
|
|
|
10709
10716
|
...s.value,
|
|
10710
10717
|
[h]: ""
|
|
10711
10718
|
}, g();
|
|
10712
|
-
},
|
|
10719
|
+
}, d = () => {
|
|
10713
10720
|
s.value = {}, g(!0);
|
|
10714
10721
|
}, g = (h = !1) => {
|
|
10715
10722
|
const v = Object.keys(s.value).reduce((w, y) => (s.value[y] && (w[y] = `${s.value[y]}`), w), {});
|
|
@@ -10717,14 +10724,14 @@ const Re = {
|
|
|
10717
10724
|
};
|
|
10718
10725
|
return (h, v) => {
|
|
10719
10726
|
const w = ee("KInput"), y = ee("KButton"), B = ee("KSelect"), E = ee("KMenuItem"), I = ee("KMenu");
|
|
10720
|
-
return r.config.isExactMatch ? (_(),
|
|
10727
|
+
return r.config.isExactMatch ? (_(), fe(w, {
|
|
10721
10728
|
key: 0,
|
|
10722
10729
|
autocomplete: "off",
|
|
10723
10730
|
class: "kong-ui-entity-filter-input",
|
|
10724
10731
|
"data-testid": "search-input",
|
|
10725
10732
|
"model-value": r.modelValue,
|
|
10726
10733
|
placeholder: r.config.placeholder,
|
|
10727
|
-
"onUpdate:modelValue":
|
|
10734
|
+
"onUpdate:modelValue": f
|
|
10728
10735
|
}, {
|
|
10729
10736
|
icon: x(() => [
|
|
10730
10737
|
$(py)
|
|
@@ -10750,7 +10757,7 @@ const Re = {
|
|
|
10750
10757
|
]),
|
|
10751
10758
|
Bi($(I, { class: "kong-ui-entity-filter-menu" }, {
|
|
10752
10759
|
body: x(() => [
|
|
10753
|
-
(_(!0), K(Fe, null, Ue(u.value, (T, ce) => (_(),
|
|
10760
|
+
(_(!0), K(Fe, null, Ue(u.value, (T, ce) => (_(), fe(E, {
|
|
10754
10761
|
key: T.value,
|
|
10755
10762
|
"data-testid": T.value,
|
|
10756
10763
|
expandable: "",
|
|
@@ -10772,7 +10779,7 @@ const Re = {
|
|
|
10772
10779
|
class: "menu-item-label",
|
|
10773
10780
|
for: p(T.value)
|
|
10774
10781
|
}, M(k(i)("filter.fieldLabel")), 9, my),
|
|
10775
|
-
((R = (re = r.config.schema) == null ? void 0 : re[T.value]) == null ? void 0 : R.type) === "select" ? (_(),
|
|
10782
|
+
((R = (re = r.config.schema) == null ? void 0 : re[T.value]) == null ? void 0 : R.type) === "select" ? (_(), fe(B, {
|
|
10776
10783
|
key: 0,
|
|
10777
10784
|
id: p(T.value),
|
|
10778
10785
|
modelValue: s.value[T.value],
|
|
@@ -10780,7 +10787,7 @@ const Re = {
|
|
|
10780
10787
|
appearance: "select",
|
|
10781
10788
|
items: b(T.value),
|
|
10782
10789
|
placeholder: k(i)("filter.selectPlaceholder")
|
|
10783
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (_(),
|
|
10790
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (_(), fe(w, {
|
|
10784
10791
|
key: 1,
|
|
10785
10792
|
id: p(T.value),
|
|
10786
10793
|
modelValue: s.value[T.value],
|
|
@@ -10821,7 +10828,7 @@ const Re = {
|
|
|
10821
10828
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
10822
10829
|
]),
|
|
10823
10830
|
actionButton: x(() => [
|
|
10824
|
-
$(y, { onClick:
|
|
10831
|
+
$(y, { onClick: d }, {
|
|
10825
10832
|
default: x(() => [
|
|
10826
10833
|
ue(M(k(i)("filter.clearAllButtonText")), 1)
|
|
10827
10834
|
]),
|
|
@@ -10835,7 +10842,7 @@ const Re = {
|
|
|
10835
10842
|
]));
|
|
10836
10843
|
};
|
|
10837
10844
|
}
|
|
10838
|
-
}),
|
|
10845
|
+
}), gf = /* @__PURE__ */ mt(wy, [["__scopeId", "data-v-745f38c0"]]), wt = /* @__PURE__ */ Be({
|
|
10839
10846
|
__name: "PermissionsWrapper",
|
|
10840
10847
|
props: {
|
|
10841
10848
|
/**
|
|
@@ -10924,7 +10931,7 @@ const Re = {
|
|
|
10924
10931
|
])
|
|
10925
10932
|
], 2));
|
|
10926
10933
|
}
|
|
10927
|
-
}), an = /* @__PURE__ */ mt(By, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: rs, useDeleteUrlBuilder:
|
|
10934
|
+
}), an = /* @__PURE__ */ mt(By, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: rs, useDeleteUrlBuilder: vf, useErrors: mf, useFetchUrlBuilder: Yv, useFetcher: bf, useDebouncedFilter: Zv, useStringHelpers: wf, useGatewayFeatureSupported: Qv } = Re;
|
|
10928
10935
|
const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y = { key: 1 }, Ny = { key: 0 }, Oy = { key: 1 }, Ty = { key: 0 }, jy = { key: 1 }, Py = { key: 1 }, $y = { key: 1 }, Ry = /* @__PURE__ */ Be({
|
|
10929
10936
|
__name: "CertificateList",
|
|
10930
10937
|
props: {
|
|
@@ -10975,7 +10982,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
10975
10982
|
var be;
|
|
10976
10983
|
const t = r, { i18n: { t: i, formatUnixTimeStamp: n }, i18nT: s } = pt.useI18n(), a = ci(), { axiosInstance: u } = rs({
|
|
10977
10984
|
headers: (be = t.config) == null ? void 0 : be.requestHeaders
|
|
10978
|
-
}), c = te(1),
|
|
10985
|
+
}), c = te(1), f = L(() => t.config.app !== "kongManager" || !!t.config.disableSorting), b = {
|
|
10979
10986
|
subject: { label: i("certificates.list.table_headers.subject") },
|
|
10980
10987
|
expiry: { label: i("certificates.list.table_headers.expiry") },
|
|
10981
10988
|
san: { label: i("certificates.list.table_headers.san") },
|
|
@@ -10985,7 +10992,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
10985
10992
|
var ie, Ee;
|
|
10986
10993
|
let J = `${t.config.apiBaseUrl}${zr.list[t.config.app]}`;
|
|
10987
10994
|
return t.config.app === "konnect" ? J = J.replace(/{controlPlaneId}/gi, ((ie = t.config) == null ? void 0 : ie.controlPlaneId) || "") : t.config.app === "kongManager" && (J = J.replace(/\/{workspace}/gi, (Ee = t.config) != null && Ee.workspace ? `/${t.config.workspace}` : "")), J;
|
|
10988
|
-
}), A = te(""),
|
|
10995
|
+
}), A = te(""), d = L(() => {
|
|
10989
10996
|
const J = t.config.app === "konnect" || t.config.isExactMatch;
|
|
10990
10997
|
return J ? {
|
|
10991
10998
|
isExactMatch: J,
|
|
@@ -10994,7 +11001,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
10994
11001
|
isExactMatch: J,
|
|
10995
11002
|
schema: t.config.filterSchema
|
|
10996
11003
|
};
|
|
10997
|
-
}), { fetcher: g, fetcherState: h } =
|
|
11004
|
+
}), { fetcher: g, fetcherState: h } = bf(t.config, P.value), v = () => {
|
|
10998
11005
|
A.value = "";
|
|
10999
11006
|
}, w = () => {
|
|
11000
11007
|
c.value++;
|
|
@@ -11051,7 +11058,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11051
11058
|
label: i("certificates.actions.addSni"),
|
|
11052
11059
|
to: t.config.getCreateSniRoute(J)
|
|
11053
11060
|
};
|
|
11054
|
-
}, F = te(void 0), Q = te(!1), G = te(!1), ke = te(""), Le =
|
|
11061
|
+
}, F = te(void 0), Q = te(!1), G = te(!1), ke = te(""), Le = vf(t.config, P.value), { certificateDataCache: Ve, getCertificateData: bt } = pt.useCertificate(), ur = (J) => {
|
|
11055
11062
|
F.value = J, Q.value = !0;
|
|
11056
11063
|
}, jt = () => {
|
|
11057
11064
|
Q.value = !1;
|
|
@@ -11084,12 +11091,12 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11084
11091
|
return ai(async () => {
|
|
11085
11092
|
await t.canCreate() && (W.value.title = i("certificates.list.empty_state.title"), W.value.ctaText = i("certificates.actions.create"));
|
|
11086
11093
|
}), (J, ie) => {
|
|
11087
|
-
const Ee = ee("KButton"), Je = ee("KBadge"),
|
|
11094
|
+
const Ee = ee("KButton"), Je = ee("KBadge"), fr = ee("KTruncate"), ne = ee("KDropdownItem"), we = ee("KClipboardProvider");
|
|
11088
11095
|
return _(), K("div", Iy, [
|
|
11089
|
-
$(k(
|
|
11096
|
+
$(k(hf), {
|
|
11090
11097
|
"cache-identifier": r.cacheIdentifier,
|
|
11091
11098
|
"disable-pagination-page-jump": "",
|
|
11092
|
-
"disable-sorting":
|
|
11099
|
+
"disable-sorting": f.value,
|
|
11093
11100
|
"empty-state-options": W.value,
|
|
11094
11101
|
"enable-entity-actions": "",
|
|
11095
11102
|
"error-message": y.value,
|
|
@@ -11104,10 +11111,10 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11104
11111
|
onSort: w
|
|
11105
11112
|
}, {
|
|
11106
11113
|
"toolbar-filter": x(() => [
|
|
11107
|
-
$(k(
|
|
11114
|
+
$(k(gf), {
|
|
11108
11115
|
modelValue: A.value,
|
|
11109
11116
|
"onUpdate:modelValue": ie[0] || (ie[0] = (Z) => A.value = Z),
|
|
11110
|
-
config:
|
|
11117
|
+
config: d.value
|
|
11111
11118
|
}, null, 8, ["modelValue", "config"])
|
|
11112
11119
|
]),
|
|
11113
11120
|
"toolbar-button": x(() => [
|
|
@@ -11149,7 +11156,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11149
11156
|
];
|
|
11150
11157
|
}),
|
|
11151
11158
|
cert: x(({ row: Z }) => [
|
|
11152
|
-
Z != null && Z.cert ? (_(),
|
|
11159
|
+
Z != null && Z.cert ? (_(), fe(k(Hp), {
|
|
11153
11160
|
key: 0,
|
|
11154
11161
|
"data-testid": "copy-certificate-cert",
|
|
11155
11162
|
notify: (Se) => I(Se, Z),
|
|
@@ -11160,9 +11167,9 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11160
11167
|
tags: x(({ row: Z }) => {
|
|
11161
11168
|
var Se;
|
|
11162
11169
|
return [
|
|
11163
|
-
((Se = Z == null ? void 0 : Z.tags) == null ? void 0 : Se.length) > 0 ? (_(),
|
|
11170
|
+
((Se = Z == null ? void 0 : Z.tags) == null ? void 0 : Se.length) > 0 ? (_(), fe(fr, { key: 0 }, {
|
|
11164
11171
|
default: x(() => [
|
|
11165
|
-
(_(!0), K(Fe, null, Ue(Z == null ? void 0 : Z.tags, (Kt) => (_(),
|
|
11172
|
+
(_(!0), K(Fe, null, Ue(Z == null ? void 0 : Z.tags, (Kt) => (_(), fe(Je, {
|
|
11166
11173
|
key: Kt,
|
|
11167
11174
|
onClick: ie[1] || (ie[1] = hr(() => {
|
|
11168
11175
|
}, ["stop"]))
|
|
@@ -11229,7 +11236,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11229
11236
|
]),
|
|
11230
11237
|
_: 2
|
|
11231
11238
|
}, 1032, ["auth-function"]),
|
|
11232
|
-
r.config.getCreateSniRoute ? (_(),
|
|
11239
|
+
r.config.getCreateSniRoute ? (_(), fe(k(wt), {
|
|
11233
11240
|
key: 0,
|
|
11234
11241
|
"auth-function": () => r.canCreateSni()
|
|
11235
11242
|
}, {
|
|
@@ -11262,7 +11269,7 @@ const Iy = { class: "kong-ui-entities-certificates-list" }, Ey = { key: 0 }, _y
|
|
|
11262
11269
|
]),
|
|
11263
11270
|
_: 1
|
|
11264
11271
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
11265
|
-
$(k(
|
|
11272
|
+
$(k(yf), {
|
|
11266
11273
|
"action-pending": G.value,
|
|
11267
11274
|
"entity-type": k(xa).Certificate,
|
|
11268
11275
|
error: ke.value,
|
|
@@ -11313,9 +11320,9 @@ const Lr = (r, e) => {
|
|
|
11313
11320
|
emits: ["update", "error", "loading"],
|
|
11314
11321
|
setup(r, { emit: e }) {
|
|
11315
11322
|
var w;
|
|
11316
|
-
const t = r, i = ci(), { i18nT: n, i18n: { t: s } } = pt.useI18n(), { getMessageFromError: a } =
|
|
11323
|
+
const t = r, i = ci(), { i18nT: n, i18n: { t: s } } = pt.useI18n(), { getMessageFromError: a } = mf(), { axiosInstance: u } = rs({
|
|
11317
11324
|
headers: (w = t.config) == null ? void 0 : w.requestHeaders
|
|
11318
|
-
}), c = L(() => zr.form[t.config.app].edit),
|
|
11325
|
+
}), c = L(() => zr.form[t.config.app].edit), f = L(() => t.certificateId ? Zt.Edit : Zt.Create), p = Oi({
|
|
11319
11326
|
fields: {
|
|
11320
11327
|
cert: "",
|
|
11321
11328
|
key: "",
|
|
@@ -11331,10 +11338,10 @@ const Lr = (r, e) => {
|
|
|
11331
11338
|
certAlt: "",
|
|
11332
11339
|
keyAlt: "",
|
|
11333
11340
|
tags: ""
|
|
11334
|
-
}), P = L(() => (
|
|
11341
|
+
}), P = L(() => (f.value === Zt.Create || JSON.stringify(p.fields) !== JSON.stringify(b)) && !!p.fields.cert && !!p.fields.key), A = (y) => {
|
|
11335
11342
|
var B;
|
|
11336
11343
|
p.fields.cert = (y == null ? void 0 : y.cert) || "", p.fields.key = (y == null ? void 0 : y.key) || "", p.fields.certAlt = (y == null ? void 0 : y.cert_alt) || "", p.fields.keyAlt = (y == null ? void 0 : y.key_alt) || "", p.fields.tags = ((B = y == null ? void 0 : y.tags) == null ? void 0 : B.join(", ")) || "", Object.assign(b, p.fields);
|
|
11337
|
-
},
|
|
11344
|
+
}, d = () => {
|
|
11338
11345
|
i.push(t.config.cancelRoute);
|
|
11339
11346
|
}, g = L(() => {
|
|
11340
11347
|
var B, E;
|
|
@@ -11342,7 +11349,7 @@ const Lr = (r, e) => {
|
|
|
11342
11349
|
return t.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((B = t.config) == null ? void 0 : B.controlPlaneId) || "") : t.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (E = t.config) != null && E.workspace ? `/${t.config.workspace}` : "")), y = y.replace(/{id}/gi, t.certificateId), y;
|
|
11343
11350
|
}), h = L(() => {
|
|
11344
11351
|
var B, E;
|
|
11345
|
-
let y = `${t.config.apiBaseUrl}${zr.form[t.config.app][
|
|
11352
|
+
let y = `${t.config.apiBaseUrl}${zr.form[t.config.app][f.value]}`;
|
|
11346
11353
|
return t.config.app === "konnect" ? y = y.replace(/{controlPlaneId}/gi, ((B = t.config) == null ? void 0 : B.controlPlaneId) || "") : t.config.app === "kongManager" && (y = y.replace(/\/{workspace}/gi, (E = t.config) != null && E.workspace ? `/${t.config.workspace}` : "")), y = y.replace(/{id}/gi, t.certificateId), y;
|
|
11347
11354
|
}), v = async () => {
|
|
11348
11355
|
var y, B, E, I, T, ce, re, R, F;
|
|
@@ -11356,7 +11363,7 @@ const Lr = (r, e) => {
|
|
|
11356
11363
|
tags: (B = (y = p.fields.tags.split(",")) == null ? void 0 : y.map((ke) => String(ke || "").trim())) == null ? void 0 : B.filter((ke) => ke !== "")
|
|
11357
11364
|
};
|
|
11358
11365
|
let G;
|
|
11359
|
-
await u.post(g.value, Q),
|
|
11366
|
+
await u.post(g.value, Q), f.value === "create" ? G = await u.post(h.value, Q) : f.value === "edit" && (G = ((E = t.config) == null ? void 0 : E.app) === "konnect" ? await u.put(h.value, Q) : await u.patch(h.value, Q)), p.fields.cert = ((I = G == null ? void 0 : G.data) == null ? void 0 : I.cert) || "", p.fields.key = ((T = G == null ? void 0 : G.data) == null ? void 0 : T.key) || "", p.fields.certAlt = ((ce = G == null ? void 0 : G.data) == null ? void 0 : ce.cert_alt) || "", p.fields.keyAlt = ((re = G == null ? void 0 : G.data) == null ? void 0 : re.key_alt) || "", p.fields.tags = ((F = (R = G == null ? void 0 : G.data) == null ? void 0 : R.tags) == null ? void 0 : F.join(", ")) || "", Object.assign(b, p.fields), e("update", G == null ? void 0 : G.data);
|
|
11360
11367
|
} catch (Q) {
|
|
11361
11368
|
p.errorMessage = a(Q), e("error", Q);
|
|
11362
11369
|
} finally {
|
|
@@ -11366,14 +11373,14 @@ const Lr = (r, e) => {
|
|
|
11366
11373
|
return (y, B) => {
|
|
11367
11374
|
const E = ee("KTextArea"), I = ee("KInput");
|
|
11368
11375
|
return _(), K("div", Vy, [
|
|
11369
|
-
$(k(
|
|
11376
|
+
$(k(pf), {
|
|
11370
11377
|
"can-submit": P.value,
|
|
11371
11378
|
config: r.config,
|
|
11372
11379
|
"edit-id": r.certificateId,
|
|
11373
11380
|
"error-message": p.errorMessage,
|
|
11374
11381
|
"fetch-url": c.value,
|
|
11375
11382
|
"is-readonly": p.isReadonly,
|
|
11376
|
-
onCancel:
|
|
11383
|
+
onCancel: d,
|
|
11377
11384
|
"onFetch:error": B[5] || (B[5] = (T) => y.$emit("error", T)),
|
|
11378
11385
|
"onFetch:success": A,
|
|
11379
11386
|
onLoading: B[6] || (B[6] = (T) => y.$emit("loading", T)),
|
|
@@ -11520,9 +11527,9 @@ const em = /* @__PURE__ */ Lr(Uy, [["__scopeId", "data-v-ffa3e98c"]]), Gr = {
|
|
|
11520
11527
|
},
|
|
11521
11528
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
11522
11529
|
setup(r, { emit: e }) {
|
|
11523
|
-
const t = r, i = ["dns_names", "san_names", "subject"], { i18n: { t: n, formatUnixTimeStamp: s } } = pt.useI18n(), { convertKeyToTitle: a } =
|
|
11524
|
-
if (
|
|
11525
|
-
return u(
|
|
11530
|
+
const t = r, i = ["dns_names", "san_names", "subject"], { i18n: { t: n, formatUnixTimeStamp: s } } = pt.useI18n(), { convertKeyToTitle: a } = wf(), { getCertificateData: u } = pt.useCertificate(), c = L(() => Gr.form[t.config.app].edit), f = te(), p = L(() => {
|
|
11531
|
+
if (f.value)
|
|
11532
|
+
return u(f.value);
|
|
11526
11533
|
}), b = L(() => {
|
|
11527
11534
|
var h;
|
|
11528
11535
|
return ((h = p.value) == null ? void 0 : h.schemaIssuer) || "";
|
|
@@ -11532,8 +11539,8 @@ const em = /* @__PURE__ */ Lr(Uy, [["__scopeId", "data-v-ffa3e98c"]]), Gr = {
|
|
|
11532
11539
|
}), A = L(() => {
|
|
11533
11540
|
var h;
|
|
11534
11541
|
return ((h = p.value) == null ? void 0 : h.schemaKeyUsages) || [];
|
|
11535
|
-
}),
|
|
11536
|
-
|
|
11542
|
+
}), d = (h) => {
|
|
11543
|
+
f.value = h, e("fetch:success", h);
|
|
11537
11544
|
}, g = te({
|
|
11538
11545
|
id: {},
|
|
11539
11546
|
updated_at: {},
|
|
@@ -11579,14 +11586,14 @@ const em = /* @__PURE__ */ Lr(Uy, [["__scopeId", "data-v-ffa3e98c"]]), Gr = {
|
|
|
11579
11586
|
return (h, v) => {
|
|
11580
11587
|
const w = ee("KCodeBlock"), y = ee("KBadge");
|
|
11581
11588
|
return _(), K("div", My, [
|
|
11582
|
-
$(k(
|
|
11589
|
+
$(k(df), {
|
|
11583
11590
|
config: r.config,
|
|
11584
11591
|
"config-schema": g.value,
|
|
11585
11592
|
"fetch-url": c.value,
|
|
11586
11593
|
"hide-title": r.hideTitle,
|
|
11587
11594
|
"onCopy:success": v[0] || (v[0] = (B) => h.$emit("copy:success", B)),
|
|
11588
11595
|
"onFetch:error": v[1] || (v[1] = (B) => h.$emit("fetch:error", B)),
|
|
11589
|
-
"onFetch:success":
|
|
11596
|
+
"onFetch:success": d,
|
|
11590
11597
|
onLoading: v[2] || (v[2] = (B) => h.$emit("loading", B))
|
|
11591
11598
|
}, {
|
|
11592
11599
|
cert: x(({ rowValue: B }) => [
|
|
@@ -11598,7 +11605,7 @@ const em = /* @__PURE__ */ Lr(Uy, [["__scopeId", "data-v-ffa3e98c"]]), Gr = {
|
|
|
11598
11605
|
}, null, 8, ["id", "code"])
|
|
11599
11606
|
]),
|
|
11600
11607
|
metadata: x(({ rowValue: B }) => [
|
|
11601
|
-
(_(!0), K(Fe, null, Ue(Object.keys(B).filter((E) => !i.includes(E)), (E) => (_(),
|
|
11608
|
+
(_(!0), K(Fe, null, Ue(Object.keys(B).filter((E) => !i.includes(E)), (E) => (_(), fe(k(ts), {
|
|
11602
11609
|
key: E,
|
|
11603
11610
|
"data-testid": `ca-cert-metadata-${E}`,
|
|
11604
11611
|
item: {
|
|
@@ -11617,7 +11624,7 @@ const em = /* @__PURE__ */ Lr(Uy, [["__scopeId", "data-v-ffa3e98c"]]), Gr = {
|
|
|
11617
11624
|
]),
|
|
11618
11625
|
key_usages: x(() => [
|
|
11619
11626
|
A.value.length ? Ie("", !0) : (_(), K("div", Dy, M("–"))),
|
|
11620
|
-
(_(!0), K(Fe, null, Ue(A.value, (B, E) => (_(),
|
|
11627
|
+
(_(!0), K(Fe, null, Ue(A.value, (B, E) => (_(), fe(y, {
|
|
11621
11628
|
key: `key_usages-badge-tag-${E}`,
|
|
11622
11629
|
class: "config-badge",
|
|
11623
11630
|
"data-testid": `key_usages-badge-tag-${E}`,
|
|
@@ -11679,7 +11686,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11679
11686
|
var Ht;
|
|
11680
11687
|
const t = r, { i18n: { t: i, formatUnixTimeStamp: n }, i18nT: s } = pt.useI18n(), a = ci(), { axiosInstance: u } = rs({
|
|
11681
11688
|
headers: (Ht = t.config) == null ? void 0 : Ht.requestHeaders
|
|
11682
|
-
}), c = te(1),
|
|
11689
|
+
}), c = te(1), f = L(() => t.config.app !== "kongManager" || !!t.config.disableSorting), b = {
|
|
11683
11690
|
issuer: { label: i("ca-certificates.list.table_headers.issuer") },
|
|
11684
11691
|
expiry: { label: i("ca-certificates.list.table_headers.expiry") },
|
|
11685
11692
|
tags: { label: i("ca-certificates.list.table_headers.tags"), sortable: !0 }
|
|
@@ -11687,7 +11694,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11687
11694
|
var be, J;
|
|
11688
11695
|
let W = `${t.config.apiBaseUrl}${Gr.list[t.config.app]}`;
|
|
11689
11696
|
return t.config.app === "konnect" ? W = W.replace(/{controlPlaneId}/gi, ((be = t.config) == null ? void 0 : be.controlPlaneId) || "") : t.config.app === "kongManager" && (W = W.replace(/\/{workspace}/gi, (J = t.config) != null && J.workspace ? `/${t.config.workspace}` : "")), W;
|
|
11690
|
-
}), A = te(""),
|
|
11697
|
+
}), A = te(""), d = L(() => {
|
|
11691
11698
|
const W = t.config.app === "konnect" || t.config.isExactMatch;
|
|
11692
11699
|
return W ? {
|
|
11693
11700
|
isExactMatch: W,
|
|
@@ -11696,7 +11703,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11696
11703
|
isExactMatch: W,
|
|
11697
11704
|
schema: t.config.filterSchema
|
|
11698
11705
|
};
|
|
11699
|
-
}), { fetcher: g, fetcherState: h } =
|
|
11706
|
+
}), { fetcher: g, fetcherState: h } = bf(t.config, P.value), v = () => {
|
|
11700
11707
|
A.value = "";
|
|
11701
11708
|
}, w = () => {
|
|
11702
11709
|
c.value++;
|
|
@@ -11737,7 +11744,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11737
11744
|
}), ce = (W) => ({
|
|
11738
11745
|
label: i("ca-certificates.actions.edit"),
|
|
11739
11746
|
to: t.config.getEditRoute(W)
|
|
11740
|
-
}), re = te(void 0), R = te(!1), F = te(!1), Q = te(""), G =
|
|
11747
|
+
}), re = te(void 0), R = te(!1), F = te(!1), Q = te(""), G = vf(t.config, P.value), { certificateDataCache: ke, getCertificateData: Le } = pt.useCertificate(), Ve = (W) => {
|
|
11741
11748
|
re.value = W, R.value = !0;
|
|
11742
11749
|
}, bt = () => {
|
|
11743
11750
|
R.value = !1;
|
|
@@ -11770,12 +11777,12 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11770
11777
|
return ai(async () => {
|
|
11771
11778
|
await t.canCreate() && (jt.value.title = i("ca-certificates.list.empty_state.title"), jt.value.ctaText = i("ca-certificates.actions.create"));
|
|
11772
11779
|
}), (W, be) => {
|
|
11773
|
-
const J = ee("KButton"), ie = ee("KBadge"), Ee = ee("KTruncate"), Je = ee("KDropdownItem"),
|
|
11780
|
+
const J = ee("KButton"), ie = ee("KBadge"), Ee = ee("KTruncate"), Je = ee("KDropdownItem"), fr = ee("KClipboardProvider");
|
|
11774
11781
|
return _(), K("div", Hy, [
|
|
11775
|
-
$(k(
|
|
11782
|
+
$(k(hf), {
|
|
11776
11783
|
"cache-identifier": r.cacheIdentifier,
|
|
11777
11784
|
"disable-pagination-page-jump": "",
|
|
11778
|
-
"disable-sorting":
|
|
11785
|
+
"disable-sorting": f.value,
|
|
11779
11786
|
"empty-state-options": jt.value,
|
|
11780
11787
|
"enable-entity-actions": "",
|
|
11781
11788
|
"error-message": y.value,
|
|
@@ -11790,10 +11797,10 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11790
11797
|
onSort: w
|
|
11791
11798
|
}, {
|
|
11792
11799
|
"toolbar-filter": x(() => [
|
|
11793
|
-
$(k(
|
|
11800
|
+
$(k(gf), {
|
|
11794
11801
|
modelValue: A.value,
|
|
11795
11802
|
"onUpdate:modelValue": be[0] || (be[0] = (ne) => A.value = ne),
|
|
11796
|
-
config:
|
|
11803
|
+
config: d.value
|
|
11797
11804
|
}, null, 8, ["modelValue", "config"])
|
|
11798
11805
|
]),
|
|
11799
11806
|
"toolbar-button": x(() => [
|
|
@@ -11831,9 +11838,9 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11831
11838
|
tags: x(({ row: ne }) => {
|
|
11832
11839
|
var we;
|
|
11833
11840
|
return [
|
|
11834
|
-
((we = ne == null ? void 0 : ne.tags) == null ? void 0 : we.length) > 0 ? (_(),
|
|
11841
|
+
((we = ne == null ? void 0 : ne.tags) == null ? void 0 : we.length) > 0 ? (_(), fe(Ee, { key: 0 }, {
|
|
11835
11842
|
default: x(() => [
|
|
11836
|
-
(_(!0), K(Fe, null, Ue(ne == null ? void 0 : ne.tags, (Z) => (_(),
|
|
11843
|
+
(_(!0), K(Fe, null, Ue(ne == null ? void 0 : ne.tags, (Z) => (_(), fe(ie, {
|
|
11837
11844
|
key: Z,
|
|
11838
11845
|
onClick: be[1] || (be[1] = hr(() => {
|
|
11839
11846
|
}, ["stop"]))
|
|
@@ -11849,7 +11856,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11849
11856
|
];
|
|
11850
11857
|
}),
|
|
11851
11858
|
actions: x(({ row: ne }) => [
|
|
11852
|
-
$(
|
|
11859
|
+
$(fr, null, {
|
|
11853
11860
|
default: x(({ copyToClipboard: we }) => [
|
|
11854
11861
|
$(Je, {
|
|
11855
11862
|
"data-testid": "action-entity-copy-id",
|
|
@@ -11863,7 +11870,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11863
11870
|
]),
|
|
11864
11871
|
_: 2
|
|
11865
11872
|
}, 1024),
|
|
11866
|
-
$(
|
|
11873
|
+
$(fr, null, {
|
|
11867
11874
|
default: x(({ copyToClipboard: we }) => [
|
|
11868
11875
|
$(Je, {
|
|
11869
11876
|
"data-testid": "action-entity-copy-json",
|
|
@@ -11921,7 +11928,7 @@ const tm = /* @__PURE__ */ Lr(Ly, [["__scopeId", "data-v-c7364467"]]), Hy = { cl
|
|
|
11921
11928
|
]),
|
|
11922
11929
|
_: 1
|
|
11923
11930
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
11924
|
-
$(k(
|
|
11931
|
+
$(k(yf), {
|
|
11925
11932
|
"action-pending": F.value,
|
|
11926
11933
|
"entity-type": k(xa).CACertificate,
|
|
11927
11934
|
error: Q.value,
|
|
@@ -11967,9 +11974,9 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
11967
11974
|
emits: ["update", "error", "loading"],
|
|
11968
11975
|
setup(r, { emit: e }) {
|
|
11969
11976
|
var v;
|
|
11970
|
-
const t = r, i = ci(), { i18n: { t: n } } = pt.useI18n(), { getMessageFromError: s } =
|
|
11977
|
+
const t = r, i = ci(), { i18n: { t: n } } = pt.useI18n(), { getMessageFromError: s } = mf(), { axiosInstance: a } = rs({
|
|
11971
11978
|
headers: (v = t.config) == null ? void 0 : v.requestHeaders
|
|
11972
|
-
}), u = L(() => Gr.form[t.config.app].edit), c = L(() => t.certificateId ? Zt.Edit : Zt.Create),
|
|
11979
|
+
}), u = L(() => Gr.form[t.config.app].edit), c = L(() => t.certificateId ? Zt.Edit : Zt.Create), f = Oi({
|
|
11973
11980
|
fields: {
|
|
11974
11981
|
cert: "",
|
|
11975
11982
|
certDigest: "",
|
|
@@ -11981,12 +11988,12 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
11981
11988
|
cert: "",
|
|
11982
11989
|
certDigest: "",
|
|
11983
11990
|
tags: ""
|
|
11984
|
-
}), b = L(() => (c.value === Zt.Create || JSON.stringify(
|
|
11991
|
+
}), b = L(() => (c.value === Zt.Create || JSON.stringify(f.fields) !== JSON.stringify(p)) && !!f.fields.cert), P = (w) => {
|
|
11985
11992
|
var y;
|
|
11986
|
-
|
|
11993
|
+
f.fields.cert = (w == null ? void 0 : w.cert) || "", f.fields.certDigest = (w == null ? void 0 : w.cert_digest) || "", f.fields.tags = ((y = w == null ? void 0 : w.tags) == null ? void 0 : y.join(", ")) || "", Object.assign(p, f.fields);
|
|
11987
11994
|
}, A = () => {
|
|
11988
11995
|
i.push(t.config.cancelRoute);
|
|
11989
|
-
},
|
|
11996
|
+
}, d = L(() => {
|
|
11990
11997
|
var y, B;
|
|
11991
11998
|
let w = `${t.config.apiBaseUrl}${Gr.form[t.config.app].validate}`;
|
|
11992
11999
|
return t.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((y = t.config) == null ? void 0 : y.controlPlaneId) || "") : t.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (B = t.config) != null && B.workspace ? `/${t.config.workspace}` : "")), w = w.replace(/{id}/gi, t.certificateId), w;
|
|
@@ -11997,30 +12004,30 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
11997
12004
|
}), h = async () => {
|
|
11998
12005
|
var w, y, B, E, I, T, ce;
|
|
11999
12006
|
try {
|
|
12000
|
-
|
|
12007
|
+
f.isReadonly = !0;
|
|
12001
12008
|
const re = {
|
|
12002
|
-
cert:
|
|
12003
|
-
cert_digest:
|
|
12004
|
-
tags: (y = (w =
|
|
12009
|
+
cert: f.fields.cert,
|
|
12010
|
+
cert_digest: f.fields.certDigest || null,
|
|
12011
|
+
tags: (y = (w = f.fields.tags.split(",")) == null ? void 0 : w.map((F) => String(F || "").trim())) == null ? void 0 : y.filter((F) => F !== "")
|
|
12005
12012
|
};
|
|
12006
12013
|
let R;
|
|
12007
|
-
await a.post(
|
|
12014
|
+
await a.post(d.value, re), c.value === "create" ? R = await a.post(g.value, re) : c.value === "edit" && (R = ((B = t.config) == null ? void 0 : B.app) === "konnect" ? await a.put(g.value, re) : await a.patch(g.value, re)), f.fields.cert = ((E = R == null ? void 0 : R.data) == null ? void 0 : E.cert) || "", f.fields.certDigest = ((I = R == null ? void 0 : R.data) == null ? void 0 : I.cert_digest) || "", f.fields.tags = ((ce = (T = R == null ? void 0 : R.data) == null ? void 0 : T.tags) == null ? void 0 : ce.join(", ")) || "", Object.assign(p, f.fields), e("update", R == null ? void 0 : R.data);
|
|
12008
12015
|
} catch (re) {
|
|
12009
|
-
|
|
12016
|
+
f.errorMessage = s(re), e("error", re);
|
|
12010
12017
|
} finally {
|
|
12011
|
-
|
|
12018
|
+
f.isReadonly = !1;
|
|
12012
12019
|
}
|
|
12013
12020
|
};
|
|
12014
12021
|
return (w, y) => {
|
|
12015
12022
|
const B = ee("KTextArea"), E = ee("KInput");
|
|
12016
12023
|
return _(), K("div", Jy, [
|
|
12017
|
-
$(k(
|
|
12024
|
+
$(k(pf), {
|
|
12018
12025
|
"can-submit": b.value,
|
|
12019
12026
|
config: r.config,
|
|
12020
12027
|
"edit-id": r.certificateId,
|
|
12021
|
-
"error-message":
|
|
12028
|
+
"error-message": f.errorMessage,
|
|
12022
12029
|
"fetch-url": u.value,
|
|
12023
|
-
"is-readonly":
|
|
12030
|
+
"is-readonly": f.isReadonly,
|
|
12024
12031
|
onCancel: A,
|
|
12025
12032
|
"onFetch:error": y[3] || (y[3] = (I) => w.$emit("error", I)),
|
|
12026
12033
|
"onFetch:success": P,
|
|
@@ -12034,25 +12041,25 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
12034
12041
|
}, {
|
|
12035
12042
|
default: x(() => [
|
|
12036
12043
|
$(B, {
|
|
12037
|
-
modelValue:
|
|
12038
|
-
"onUpdate:modelValue": y[0] || (y[0] = (I) =>
|
|
12044
|
+
modelValue: f.fields.cert,
|
|
12045
|
+
"onUpdate:modelValue": y[0] || (y[0] = (I) => f.fields.cert = I),
|
|
12039
12046
|
modelModifiers: { trim: !0 },
|
|
12040
12047
|
class: "certificate-form-textarea",
|
|
12041
12048
|
"data-testid": "ca-certificate-form-cert",
|
|
12042
12049
|
"disable-character-limit": "",
|
|
12043
12050
|
label: k(n)("ca-certificates.form.fields.cert.label"),
|
|
12044
12051
|
"label-attributes": { info: k(n)("ca-certificates.form.fields.cert.tooltip") },
|
|
12045
|
-
readonly:
|
|
12052
|
+
readonly: f.isReadonly,
|
|
12046
12053
|
required: ""
|
|
12047
12054
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
12048
12055
|
$(E, {
|
|
12049
|
-
modelValue:
|
|
12050
|
-
"onUpdate:modelValue": y[1] || (y[1] = (I) =>
|
|
12056
|
+
modelValue: f.fields.certDigest,
|
|
12057
|
+
"onUpdate:modelValue": y[1] || (y[1] = (I) => f.fields.certDigest = I),
|
|
12051
12058
|
modelModifiers: { trim: !0 },
|
|
12052
12059
|
autocomplete: "off",
|
|
12053
12060
|
"data-testid": "ca-certificate-form-cert-digest",
|
|
12054
12061
|
label: k(n)("ca-certificates.form.fields.cert_digest.label"),
|
|
12055
|
-
readonly:
|
|
12062
|
+
readonly: f.isReadonly,
|
|
12056
12063
|
type: "text"
|
|
12057
12064
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
12058
12065
|
]),
|
|
@@ -12064,8 +12071,8 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
12064
12071
|
}, {
|
|
12065
12072
|
default: x(() => [
|
|
12066
12073
|
$(E, {
|
|
12067
|
-
modelValue:
|
|
12068
|
-
"onUpdate:modelValue": y[2] || (y[2] = (I) =>
|
|
12074
|
+
modelValue: f.fields.tags,
|
|
12075
|
+
"onUpdate:modelValue": y[2] || (y[2] = (I) => f.fields.tags = I),
|
|
12069
12076
|
modelModifiers: { trim: !0 },
|
|
12070
12077
|
autocomplete: "off",
|
|
12071
12078
|
"data-testid": "ca-certificate-form-tags",
|
|
@@ -12073,7 +12080,7 @@ const rm = /* @__PURE__ */ Lr(Wy, [["__scopeId", "data-v-a9e99180"]]), Jy = { cl
|
|
|
12073
12080
|
label: k(n)("ca-certificates.form.fields.tags.label"),
|
|
12074
12081
|
"label-attributes": { info: k(n)("ca-certificates.form.fields.tags.tooltip") },
|
|
12075
12082
|
placeholder: k(n)("ca-certificates.form.fields.tags.placeholder"),
|
|
12076
|
-
readonly:
|
|
12083
|
+
readonly: f.isReadonly,
|
|
12077
12084
|
type: "text"
|
|
12078
12085
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
12079
12086
|
]),
|
|
@@ -12105,7 +12112,7 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12105
12112
|
},
|
|
12106
12113
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
12107
12114
|
setup(r, { emit: e }) {
|
|
12108
|
-
const t = r, { i18n: { t: i, formatUnixTimeStamp: n }, i18nT: s } = pt.useI18n(), { convertKeyToTitle: a } =
|
|
12115
|
+
const t = r, { i18n: { t: i, formatUnixTimeStamp: n }, i18nT: s } = pt.useI18n(), { convertKeyToTitle: a } = wf(), { getCertificateData: u } = pt.useCertificate(), c = L(() => zr.form[t.config.app].edit), f = te(), p = te({
|
|
12109
12116
|
// basic fields
|
|
12110
12117
|
id: {},
|
|
12111
12118
|
cert: {
|
|
@@ -12164,14 +12171,14 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12164
12171
|
type: ye.Redacted
|
|
12165
12172
|
}
|
|
12166
12173
|
}), b = (I) => {
|
|
12167
|
-
|
|
12174
|
+
f.value = I, e("fetch:success", I);
|
|
12168
12175
|
}, P = L(() => {
|
|
12169
|
-
if (
|
|
12170
|
-
return u(
|
|
12176
|
+
if (f.value)
|
|
12177
|
+
return u(f.value);
|
|
12171
12178
|
}), A = L(() => {
|
|
12172
12179
|
var I, T;
|
|
12173
12180
|
return (I = P.value) != null && I.schemaExpiry ? n((T = P.value) == null ? void 0 : T.schemaExpiry) : "";
|
|
12174
|
-
}),
|
|
12181
|
+
}), d = L(() => {
|
|
12175
12182
|
var I;
|
|
12176
12183
|
return ((I = P.value) == null ? void 0 : I.schemaIssuer) || "";
|
|
12177
12184
|
}), g = L(() => {
|
|
@@ -12185,10 +12192,10 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12185
12192
|
return ((I = P.value) == null ? void 0 : I.schemaKeyUsages) || [];
|
|
12186
12193
|
}), w = L(() => {
|
|
12187
12194
|
var I, T;
|
|
12188
|
-
return ((T = (I =
|
|
12195
|
+
return ((T = (I = f == null ? void 0 : f.value) == null ? void 0 : I.snis) == null ? void 0 : T.length) > 0;
|
|
12189
12196
|
}), y = L(() => {
|
|
12190
12197
|
var I;
|
|
12191
|
-
return !!((I =
|
|
12198
|
+
return !!((I = f == null ? void 0 : f.value) != null && I.cert_alt);
|
|
12192
12199
|
}), B = (I) => {
|
|
12193
12200
|
var T, ce;
|
|
12194
12201
|
return I === "san_names" ? i("certificates.list.table_headers.san") : ((ce = (T = p.value) == null ? void 0 : T[I]) == null ? void 0 : ce.label) || a(I);
|
|
@@ -12196,7 +12203,7 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12196
12203
|
return (I, T) => {
|
|
12197
12204
|
const ce = ee("KCodeBlock"), re = ee("KBadge");
|
|
12198
12205
|
return _(), K("div", Zy, [
|
|
12199
|
-
$(k(
|
|
12206
|
+
$(k(df), {
|
|
12200
12207
|
config: r.config,
|
|
12201
12208
|
"config-schema": p.value,
|
|
12202
12209
|
"fetch-url": c.value,
|
|
@@ -12237,7 +12244,7 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12237
12244
|
})
|
|
12238
12245
|
]),
|
|
12239
12246
|
metadata: x(({ rowValue: R }) => [
|
|
12240
|
-
(_(!0), K(Fe, null, Ue(Object.keys(R), (F) => (_(),
|
|
12247
|
+
(_(!0), K(Fe, null, Ue(Object.keys(R), (F) => (_(), fe(k(ts), {
|
|
12241
12248
|
key: F,
|
|
12242
12249
|
item: {
|
|
12243
12250
|
key: F,
|
|
@@ -12251,7 +12258,7 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12251
12258
|
ue(M(A.value || "–"), 1)
|
|
12252
12259
|
]),
|
|
12253
12260
|
issuer: x(() => [
|
|
12254
|
-
ue(M(
|
|
12261
|
+
ue(M(d.value || "–"), 1)
|
|
12255
12262
|
]),
|
|
12256
12263
|
san_names: x(() => [
|
|
12257
12264
|
ue(M(g.value || "–"), 1)
|
|
@@ -12283,7 +12290,7 @@ const im = /* @__PURE__ */ Lr(Yy, [["__scopeId", "data-v-a1cf8ed1"]]), Zy = { cl
|
|
|
12283
12290
|
]),
|
|
12284
12291
|
key_usages: x(() => [
|
|
12285
12292
|
v.value.length ? Ie("", !0) : (_(), K("div", Qy, M("–"))),
|
|
12286
|
-
(_(!0), K(Fe, null, Ue(v.value, (R, F) => (_(),
|
|
12293
|
+
(_(!0), K(Fe, null, Ue(v.value, (R, F) => (_(), fe(re, {
|
|
12287
12294
|
key: `key_usages-badge-tag-${F}`,
|
|
12288
12295
|
class: "config-badge",
|
|
12289
12296
|
"data-testid": `key_usages-badge-tag-${F}`,
|