@bahmni/services 0.0.1-dev.297 → 0.0.1-dev.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auditLogService/constants.d.ts +4 -0
- package/dist/auditLogService/constants.d.ts.map +1 -1
- package/dist/auditLogService/models.d.ts +1 -1
- package/dist/auditLogService/models.d.ts.map +1 -1
- package/dist/encounterSessionService/encounterSessionStore.d.ts.map +1 -1
- package/dist/encounterSessionService/index.d.ts +0 -1
- package/dist/encounterSessionService/index.d.ts.map +1 -1
- package/dist/index.js +731 -720
- package/dist/medicationRequestService/medicationRequestService.d.ts.map +1 -1
- package/dist/medicationRequestService/models.d.ts +2 -0
- package/dist/medicationRequestService/models.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,12 +43,12 @@ const As = yc(), Ns = typeof As.FormData < "u" ? As.FormData : void 0, wc = (t)
|
|
|
43
43
|
const r = Kr(t);
|
|
44
44
|
return r === "formdata" || // detect form-data instance
|
|
45
45
|
r === "object" && Ne(t.toString) && t.toString() === "[object FormData]";
|
|
46
|
-
}, Ec = xe("URLSearchParams"), [bc, _c, vc,
|
|
46
|
+
}, Ec = xe("URLSearchParams"), [bc, _c, vc, Tc] = [
|
|
47
47
|
"ReadableStream",
|
|
48
48
|
"Request",
|
|
49
49
|
"Response",
|
|
50
50
|
"Headers"
|
|
51
|
-
].map(xe),
|
|
51
|
+
].map(xe), Rc = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
52
52
|
function Ft(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
53
53
|
if (t === null || typeof t > "u")
|
|
54
54
|
return;
|
|
@@ -88,7 +88,7 @@ function Mn(...t) {
|
|
|
88
88
|
t[o] && Ft(t[o], s);
|
|
89
89
|
return n;
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const Sc = (t, e, r, { allOwnKeys: n } = {}) => (Ft(
|
|
92
92
|
e,
|
|
93
93
|
(s, o) => {
|
|
94
94
|
r && Ne(s) ? Object.defineProperty(t, o, {
|
|
@@ -232,7 +232,7 @@ const Vc = (t) => {
|
|
|
232
232
|
isReadableStream: bc,
|
|
233
233
|
isRequest: _c,
|
|
234
234
|
isResponse: vc,
|
|
235
|
-
isHeaders:
|
|
235
|
+
isHeaders: Tc,
|
|
236
236
|
isUndefined: mt,
|
|
237
237
|
isDate: lc,
|
|
238
238
|
isFile: dc,
|
|
@@ -247,8 +247,8 @@ const Vc = (t) => {
|
|
|
247
247
|
isFileList: mc,
|
|
248
248
|
forEach: Ft,
|
|
249
249
|
merge: Mn,
|
|
250
|
-
extend:
|
|
251
|
-
trim:
|
|
250
|
+
extend: Sc,
|
|
251
|
+
trim: Rc,
|
|
252
252
|
stripBOM: Oc,
|
|
253
253
|
inherits: Ac,
|
|
254
254
|
toFlatObject: Nc,
|
|
@@ -320,7 +320,7 @@ function Jc(t) {
|
|
|
320
320
|
}
|
|
321
321
|
return e === 0 && r === t.length ? t : t.slice(e, r);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Rt(t) {
|
|
324
324
|
return t && String(t).trim().toLowerCase();
|
|
325
325
|
}
|
|
326
326
|
function Qc(t) {
|
|
@@ -364,14 +364,14 @@ function tu(t, e) {
|
|
|
364
364
|
});
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
let
|
|
367
|
+
let Se = class {
|
|
368
368
|
constructor(e) {
|
|
369
369
|
e && this.set(e);
|
|
370
370
|
}
|
|
371
371
|
set(e, r, n) {
|
|
372
372
|
const s = this;
|
|
373
373
|
function o(i, c, u) {
|
|
374
|
-
const l =
|
|
374
|
+
const l = Rt(c);
|
|
375
375
|
if (!l)
|
|
376
376
|
throw new Error("header name must be a non-empty string");
|
|
377
377
|
const h = $.findKey(s, l);
|
|
@@ -395,7 +395,7 @@ let Te = class {
|
|
|
395
395
|
return this;
|
|
396
396
|
}
|
|
397
397
|
get(e, r) {
|
|
398
|
-
if (e =
|
|
398
|
+
if (e = Rt(e), e) {
|
|
399
399
|
const n = $.findKey(this, e);
|
|
400
400
|
if (n) {
|
|
401
401
|
const s = this[n];
|
|
@@ -412,7 +412,7 @@ let Te = class {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
has(e, r) {
|
|
415
|
-
if (e =
|
|
415
|
+
if (e = Rt(e), e) {
|
|
416
416
|
const n = $.findKey(this, e);
|
|
417
417
|
return !!(n && this[n] !== void 0 && (!r || pn(this, this[n], n, r)));
|
|
418
418
|
}
|
|
@@ -422,7 +422,7 @@ let Te = class {
|
|
|
422
422
|
const n = this;
|
|
423
423
|
let s = !1;
|
|
424
424
|
function o(a) {
|
|
425
|
-
if (a =
|
|
425
|
+
if (a = Rt(a), a) {
|
|
426
426
|
const i = $.findKey(n, a);
|
|
427
427
|
i && (!r || pn(n, n[i], i, r)) && (delete n[i], s = !0);
|
|
428
428
|
}
|
|
@@ -484,13 +484,13 @@ let Te = class {
|
|
|
484
484
|
accessors: {}
|
|
485
485
|
}).accessors, s = this.prototype;
|
|
486
486
|
function o(a) {
|
|
487
|
-
const i =
|
|
487
|
+
const i = Rt(a);
|
|
488
488
|
n[i] || (tu(s, a), n[i] = !0);
|
|
489
489
|
}
|
|
490
490
|
return $.isArray(e) ? e.forEach(o) : o(e), this;
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
|
-
|
|
493
|
+
Se.accessor([
|
|
494
494
|
"Content-Type",
|
|
495
495
|
"Content-Length",
|
|
496
496
|
"Accept",
|
|
@@ -498,7 +498,7 @@ Te.accessor([
|
|
|
498
498
|
"User-Agent",
|
|
499
499
|
"Authorization"
|
|
500
500
|
]);
|
|
501
|
-
$.reduceDescriptors(
|
|
501
|
+
$.reduceDescriptors(Se.prototype, ({ value: t }, e) => {
|
|
502
502
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
503
503
|
return {
|
|
504
504
|
get: () => t,
|
|
@@ -507,7 +507,7 @@ $.reduceDescriptors(Te.prototype, ({ value: t }, e) => {
|
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
$.freezeMethods(
|
|
510
|
+
$.freezeMethods(Se);
|
|
511
511
|
const ru = "[REDACTED ****]";
|
|
512
512
|
function nu(t) {
|
|
513
513
|
if ($.hasOwnProp(t, "toJSON"))
|
|
@@ -524,7 +524,7 @@ function su(t, e) {
|
|
|
524
524
|
const r = new Set(e.map((o) => String(o).toLowerCase())), n = [], s = (o) => {
|
|
525
525
|
if (o === null || typeof o != "object" || $.isBuffer(o)) return o;
|
|
526
526
|
if (n.indexOf(o) !== -1) return;
|
|
527
|
-
o instanceof
|
|
527
|
+
o instanceof Se && (o = o.toJSON()), n.push(o);
|
|
528
528
|
let a;
|
|
529
529
|
if ($.isArray(o))
|
|
530
530
|
a = [], o.forEach((i, c) => {
|
|
@@ -660,11 +660,11 @@ function Jr(t, e, r) {
|
|
|
660
660
|
if ($.endsWith(f, "{}"))
|
|
661
661
|
f = n ? f : f.slice(0, -2), _ = JSON.stringify(_);
|
|
662
662
|
else if ($.isArray(_) && au(_) || ($.isFileList(_) || $.endsWith(f, "[]")) && (p = $.toArray(_)))
|
|
663
|
-
return f = ja(f), p.forEach(function(
|
|
664
|
-
!($.isUndefined(
|
|
663
|
+
return f = ja(f), p.forEach(function(S, d) {
|
|
664
|
+
!($.isUndefined(S) || S === null) && e.append(
|
|
665
665
|
// eslint-disable-next-line no-nested-ternary
|
|
666
666
|
a === !0 ? hn([f], d, o) : a === null ? f : f + "[]",
|
|
667
|
-
l(
|
|
667
|
+
l(S)
|
|
668
668
|
);
|
|
669
669
|
}), !1;
|
|
670
670
|
}
|
|
@@ -675,7 +675,7 @@ function Jr(t, e, r) {
|
|
|
675
675
|
convertValue: l,
|
|
676
676
|
isVisitable: qn
|
|
677
677
|
});
|
|
678
|
-
function
|
|
678
|
+
function R(_, f, g = 0) {
|
|
679
679
|
if (!$.isUndefined(_)) {
|
|
680
680
|
if (g > c)
|
|
681
681
|
throw new Y(
|
|
@@ -684,14 +684,14 @@ function Jr(t, e, r) {
|
|
|
684
684
|
);
|
|
685
685
|
if (y.indexOf(_) !== -1)
|
|
686
686
|
throw Error("Circular reference detected in " + f.join("."));
|
|
687
|
-
y.push(_), $.forEach(_, function(b,
|
|
688
|
-
(!($.isUndefined(b) || b === null) && s.call(e, b, $.isString(
|
|
687
|
+
y.push(_), $.forEach(_, function(b, S) {
|
|
688
|
+
(!($.isUndefined(b) || b === null) && s.call(e, b, $.isString(S) ? S.trim() : S, f, v)) === !0 && R(b, f ? f.concat(S) : [S], g + 1);
|
|
689
689
|
}), y.pop();
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
if (!$.isObject(t))
|
|
693
693
|
throw new TypeError("data must be an object");
|
|
694
|
-
return
|
|
694
|
+
return R(t), e;
|
|
695
695
|
}
|
|
696
696
|
function Is(t) {
|
|
697
697
|
const e = {
|
|
@@ -813,14 +813,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", mu
|
|
|
813
813
|
hasStandardBrowserWebWorkerEnv: hu,
|
|
814
814
|
navigator: Fn,
|
|
815
815
|
origin: mu
|
|
816
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
816
|
+
}, Symbol.toStringTag, { value: "Module" })), Te = {
|
|
817
817
|
...gu,
|
|
818
818
|
...fu
|
|
819
819
|
};
|
|
820
820
|
function yu(t, e) {
|
|
821
|
-
return Jr(t, new
|
|
821
|
+
return Jr(t, new Te.classes.URLSearchParams(), {
|
|
822
822
|
visitor: function(r, n, s, o) {
|
|
823
|
-
return
|
|
823
|
+
return Te.isNode && $.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
824
824
|
},
|
|
825
825
|
...e
|
|
826
826
|
});
|
|
@@ -921,8 +921,8 @@ const jt = {
|
|
|
921
921
|
maxContentLength: -1,
|
|
922
922
|
maxBodyLength: -1,
|
|
923
923
|
env: {
|
|
924
|
-
FormData:
|
|
925
|
-
Blob:
|
|
924
|
+
FormData: Te.classes.FormData,
|
|
925
|
+
Blob: Te.classes.Blob
|
|
926
926
|
},
|
|
927
927
|
validateStatus: function(e) {
|
|
928
928
|
return e >= 200 && e < 300;
|
|
@@ -938,7 +938,7 @@ $.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (t) => {
|
|
|
938
938
|
jt.headers[t] = {};
|
|
939
939
|
});
|
|
940
940
|
function mn(t, e) {
|
|
941
|
-
const r = this || jt, n = e || r, s =
|
|
941
|
+
const r = this || jt, n = e || r, s = Se.from(n.headers);
|
|
942
942
|
let o = n.data;
|
|
943
943
|
return $.forEach(t, function(i) {
|
|
944
944
|
o = i.call(r, o, s.normalize(), e ? e.status : void 0);
|
|
@@ -991,7 +991,7 @@ function vu(t, e) {
|
|
|
991
991
|
return v ? Math.round(y * 1e3 / v) : void 0;
|
|
992
992
|
};
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Tu(t, e) {
|
|
995
995
|
let r = 0, n = 1e3 / e, s, o;
|
|
996
996
|
const a = (u, l = Date.now()) => {
|
|
997
997
|
r = l, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
@@ -1006,7 +1006,7 @@ function Ru(t, e) {
|
|
|
1006
1006
|
const kr = (t, e, r = 3) => {
|
|
1007
1007
|
let n = 0;
|
|
1008
1008
|
const s = vu(50, 250);
|
|
1009
|
-
return
|
|
1009
|
+
return Tu((o) => {
|
|
1010
1010
|
const a = o.loaded, i = o.lengthComputable ? o.total : void 0, c = i != null ? Math.min(a, i) : a, u = Math.max(0, c - n), l = s(u);
|
|
1011
1011
|
n = Math.max(n, c);
|
|
1012
1012
|
const h = {
|
|
@@ -1032,10 +1032,10 @@ const kr = (t, e, r = 3) => {
|
|
|
1032
1032
|
}),
|
|
1033
1033
|
e[1]
|
|
1034
1034
|
];
|
|
1035
|
-
}, Cs = (t) => (...e) => $.asap(() => t(...e)),
|
|
1036
|
-
new URL(
|
|
1037
|
-
|
|
1038
|
-
) : () => !0,
|
|
1035
|
+
}, Cs = (t) => (...e) => $.asap(() => t(...e)), Ru = Te.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, Te.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1036
|
+
new URL(Te.origin),
|
|
1037
|
+
Te.navigator && /(msie|trident)/i.test(Te.navigator.userAgent)
|
|
1038
|
+
) : () => !0, Su = Te.hasStandardBrowserEnv ? (
|
|
1039
1039
|
// Standard browser envs support document.cookie
|
|
1040
1040
|
{
|
|
1041
1041
|
write(t, e, r, n, s, o, a) {
|
|
@@ -1079,7 +1079,7 @@ function Ga(t, e, r) {
|
|
|
1079
1079
|
let n = !Ou(e);
|
|
1080
1080
|
return t && (n || r === !1) ? Au(t, e) : e;
|
|
1081
1081
|
}
|
|
1082
|
-
const Ls = (t) => t instanceof
|
|
1082
|
+
const Ls = (t) => t instanceof Se ? { ...t } : t;
|
|
1083
1083
|
function nt(t, e) {
|
|
1084
1084
|
e = e || {};
|
|
1085
1085
|
const r = /* @__PURE__ */ Object.create(null);
|
|
@@ -1151,8 +1151,8 @@ function nt(t, e) {
|
|
|
1151
1151
|
};
|
|
1152
1152
|
return $.forEach(Object.keys({ ...t, ...e }), function(l) {
|
|
1153
1153
|
if (l === "__proto__" || l === "constructor" || l === "prototype") return;
|
|
1154
|
-
const h = $.hasOwnProp(c, l) ? c[l] : s, y = $.hasOwnProp(t, l) ? t[l] : void 0, v = $.hasOwnProp(e, l) ? e[l] : void 0,
|
|
1155
|
-
$.isUndefined(
|
|
1154
|
+
const h = $.hasOwnProp(c, l) ? c[l] : s, y = $.hasOwnProp(t, l) ? t[l] : void 0, v = $.hasOwnProp(e, l) ? e[l] : void 0, R = h(y, v, l);
|
|
1155
|
+
$.isUndefined(R) && h !== i || (r[l] = R);
|
|
1156
1156
|
}), r;
|
|
1157
1157
|
}
|
|
1158
1158
|
const Nu = ["content-type", "content-length"];
|
|
@@ -1174,15 +1174,15 @@ const Iu = (t) => encodeURIComponent(t).replace(
|
|
|
1174
1174
|
const o = r("xsrfHeaderName"), a = r("xsrfCookieName");
|
|
1175
1175
|
let i = r("headers");
|
|
1176
1176
|
const c = r("auth"), u = r("baseURL"), l = r("allowAbsoluteUrls"), h = r("url");
|
|
1177
|
-
if (e.headers = i =
|
|
1177
|
+
if (e.headers = i = Se.from(i), e.url = Ha(
|
|
1178
1178
|
Ga(u, h, l),
|
|
1179
1179
|
t.params,
|
|
1180
1180
|
t.paramsSerializer
|
|
1181
1181
|
), c && i.set(
|
|
1182
1182
|
"Authorization",
|
|
1183
1183
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? Iu(c.password) : ""))
|
|
1184
|
-
), $.isFormData(n) && (
|
|
1185
|
-
const v = o && a &&
|
|
1184
|
+
), $.isFormData(n) && (Te.hasStandardBrowserEnv || Te.hasStandardBrowserWebWorkerEnv ? i.setContentType(void 0) : $.isFunction(n.getHeaders) && Pu(i, n.getHeaders(), r("formDataHeaderPolicy"))), Te.hasStandardBrowserEnv && ($.isFunction(s) && (s = s(e)), s === !0 || s == null && Ru(e.url))) {
|
|
1185
|
+
const v = o && a && Su.read(a);
|
|
1186
1186
|
v && i.set(o, v);
|
|
1187
1187
|
}
|
|
1188
1188
|
return e;
|
|
@@ -1190,17 +1190,17 @@ const Iu = (t) => encodeURIComponent(t).replace(
|
|
|
1190
1190
|
return new Promise(function(r, n) {
|
|
1191
1191
|
const s = Ka(t);
|
|
1192
1192
|
let o = s.data;
|
|
1193
|
-
const a =
|
|
1194
|
-
let { responseType: i, onUploadProgress: c, onDownloadProgress: u } = s, l, h, y, v,
|
|
1193
|
+
const a = Se.from(s.headers).normalize();
|
|
1194
|
+
let { responseType: i, onUploadProgress: c, onDownloadProgress: u } = s, l, h, y, v, R;
|
|
1195
1195
|
function _() {
|
|
1196
|
-
v && v(),
|
|
1196
|
+
v && v(), R && R(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1197
1197
|
}
|
|
1198
1198
|
let f = new XMLHttpRequest();
|
|
1199
1199
|
f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
|
|
1200
1200
|
function g() {
|
|
1201
1201
|
if (!f)
|
|
1202
1202
|
return;
|
|
1203
|
-
const b =
|
|
1203
|
+
const b = Se.from(
|
|
1204
1204
|
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1205
1205
|
), d = {
|
|
1206
1206
|
data: !i || i === "text" || i === "json" ? f.responseText : f.response,
|
|
@@ -1224,27 +1224,27 @@ const Iu = (t) => encodeURIComponent(t).replace(
|
|
|
1224
1224
|
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.startsWith("file:")) || setTimeout(g);
|
|
1225
1225
|
}, f.onabort = function() {
|
|
1226
1226
|
f && (n(new Y("Request aborted", Y.ECONNABORTED, t, f)), _(), f = null);
|
|
1227
|
-
}, f.onerror = function(
|
|
1228
|
-
const d =
|
|
1229
|
-
m.event =
|
|
1227
|
+
}, f.onerror = function(S) {
|
|
1228
|
+
const d = S && S.message ? S.message : "Network Error", m = new Y(d, Y.ERR_NETWORK, t, f);
|
|
1229
|
+
m.event = S || null, n(m), _(), f = null;
|
|
1230
1230
|
}, f.ontimeout = function() {
|
|
1231
|
-
let
|
|
1231
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1232
1232
|
const d = s.transitional || es;
|
|
1233
|
-
s.timeoutErrorMessage && (
|
|
1233
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), n(
|
|
1234
1234
|
new Y(
|
|
1235
|
-
|
|
1235
|
+
S,
|
|
1236
1236
|
d.clarifyTimeoutError ? Y.ETIMEDOUT : Y.ECONNABORTED,
|
|
1237
1237
|
t,
|
|
1238
1238
|
f
|
|
1239
1239
|
)
|
|
1240
1240
|
), _(), f = null;
|
|
1241
|
-
}, o === void 0 && a.setContentType(null), "setRequestHeader" in f && $.forEach(a.toJSON(), function(
|
|
1242
|
-
f.setRequestHeader(d,
|
|
1243
|
-
}), $.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), i && i !== "json" && (f.responseType = s.responseType), u && ([y,
|
|
1241
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in f && $.forEach(a.toJSON(), function(S, d) {
|
|
1242
|
+
f.setRequestHeader(d, S);
|
|
1243
|
+
}), $.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), i && i !== "json" && (f.responseType = s.responseType), u && ([y, R] = kr(u, !0), f.addEventListener("progress", y)), c && f.upload && ([h, v] = kr(c), f.upload.addEventListener("progress", h), f.upload.addEventListener("loadend", v)), (s.cancelToken || s.signal) && (l = (b) => {
|
|
1244
1244
|
f && (n(!b || b.type ? new Vt(null, t, f) : b), f.abort(), _(), f = null);
|
|
1245
1245
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1246
1246
|
const p = _u(s.url);
|
|
1247
|
-
if (p && !
|
|
1247
|
+
if (p && !Te.protocols.includes(p)) {
|
|
1248
1248
|
n(
|
|
1249
1249
|
new Y(
|
|
1250
1250
|
"Unsupported protocol " + p + ":",
|
|
@@ -1352,8 +1352,8 @@ function Mu(t) {
|
|
|
1352
1352
|
const i = n.length;
|
|
1353
1353
|
for (let v = 0; v < i; v++)
|
|
1354
1354
|
if (n.charCodeAt(v) === 37 && v + 2 < i) {
|
|
1355
|
-
const
|
|
1356
|
-
(
|
|
1355
|
+
const R = n.charCodeAt(v + 1), _ = n.charCodeAt(v + 2);
|
|
1356
|
+
(R >= 48 && R <= 57 || R >= 65 && R <= 70 || R >= 97 && R <= 102) && (_ >= 48 && _ <= 57 || _ >= 65 && _ <= 70 || _ >= 97 && _ <= 102) && (a -= 2, v += 2);
|
|
1357
1357
|
}
|
|
1358
1358
|
let c = 0, u = i - 1;
|
|
1359
1359
|
const l = (v) => v >= 2 && n.charCodeAt(v - 2) === 37 && // '%'
|
|
@@ -1403,7 +1403,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1403
1403
|
return !1;
|
|
1404
1404
|
const l = i && Bt(r), h = i && (typeof n == "function" ? /* @__PURE__ */ ((g) => (p) => g.encode(p))(new n()) : async (g) => new Uint8Array(await new o(g).arrayBuffer())), y = c && l && Ms(() => {
|
|
1405
1405
|
let g = !1;
|
|
1406
|
-
const p = new o(
|
|
1406
|
+
const p = new o(Te.origin, {
|
|
1407
1407
|
body: new r(),
|
|
1408
1408
|
method: "POST",
|
|
1409
1409
|
get duplex() {
|
|
@@ -1411,14 +1411,14 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
}), b = p.headers.has("Content-Type");
|
|
1413
1413
|
return p.body != null && p.body.cancel(), g && !b;
|
|
1414
|
-
}), v = u && l && Ms(() => $.isReadableStream(new a("").body)),
|
|
1414
|
+
}), v = u && l && Ms(() => $.isReadableStream(new a("").body)), R = {
|
|
1415
1415
|
stream: v && ((g) => g.body)
|
|
1416
1416
|
};
|
|
1417
1417
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((g) => {
|
|
1418
|
-
!
|
|
1419
|
-
let
|
|
1420
|
-
if (
|
|
1421
|
-
return
|
|
1418
|
+
!R[g] && (R[g] = (p, b) => {
|
|
1419
|
+
let S = p && p[g];
|
|
1420
|
+
if (S)
|
|
1421
|
+
return S.call(p);
|
|
1422
1422
|
throw new Y(
|
|
1423
1423
|
`Response type '${g}' is not supported`,
|
|
1424
1424
|
Y.ERR_NOT_SUPPORT,
|
|
@@ -1432,7 +1432,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1432
1432
|
if ($.isBlob(g))
|
|
1433
1433
|
return g.size;
|
|
1434
1434
|
if ($.isSpecCompliantForm(g))
|
|
1435
|
-
return (await new o(
|
|
1435
|
+
return (await new o(Te.origin, {
|
|
1436
1436
|
method: "POST",
|
|
1437
1437
|
body: g
|
|
1438
1438
|
}).arrayBuffer()).byteLength;
|
|
@@ -1448,11 +1448,11 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1448
1448
|
let {
|
|
1449
1449
|
url: p,
|
|
1450
1450
|
method: b,
|
|
1451
|
-
data:
|
|
1451
|
+
data: S,
|
|
1452
1452
|
signal: d,
|
|
1453
1453
|
cancelToken: m,
|
|
1454
1454
|
timeout: w,
|
|
1455
|
-
onDownloadProgress:
|
|
1455
|
+
onDownloadProgress: T,
|
|
1456
1456
|
onUploadProgress: I,
|
|
1457
1457
|
responseType: L,
|
|
1458
1458
|
headers: N,
|
|
@@ -1481,7 +1481,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1481
1481
|
q
|
|
1482
1482
|
);
|
|
1483
1483
|
if (we && b !== "get" && b !== "head") {
|
|
1484
|
-
const j = await f(N,
|
|
1484
|
+
const j = await f(N, S);
|
|
1485
1485
|
if (typeof j == "number" && isFinite(j) && j > J)
|
|
1486
1486
|
throw new Y(
|
|
1487
1487
|
"Request body larger than maxBodyLength limit",
|
|
@@ -1490,23 +1490,23 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1490
1490
|
q
|
|
1491
1491
|
);
|
|
1492
1492
|
}
|
|
1493
|
-
if (I && y && b !== "get" && b !== "head" && (U = await f(N,
|
|
1493
|
+
if (I && y && b !== "get" && b !== "head" && (U = await f(N, S)) !== 0) {
|
|
1494
1494
|
let j = new o(p, {
|
|
1495
1495
|
method: "POST",
|
|
1496
|
-
body:
|
|
1496
|
+
body: S,
|
|
1497
1497
|
duplex: "half"
|
|
1498
1498
|
}), Z;
|
|
1499
|
-
if ($.isFormData(
|
|
1499
|
+
if ($.isFormData(S) && (Z = j.headers.get("content-type")) && N.setContentType(Z), j.body) {
|
|
1500
1500
|
const [Q, A] = Ds(
|
|
1501
1501
|
U,
|
|
1502
1502
|
kr(Cs(I))
|
|
1503
1503
|
);
|
|
1504
|
-
|
|
1504
|
+
S = xs(j.body, ks, Q, A);
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
$.isString(k) || (k = k ? "include" : "omit");
|
|
1508
1508
|
const D = c && "credentials" in o.prototype;
|
|
1509
|
-
if ($.isFormData(
|
|
1509
|
+
if ($.isFormData(S)) {
|
|
1510
1510
|
const j = N.getContentType();
|
|
1511
1511
|
j && /^multipart\/form-data/i.test(j) && !/boundary=/i.test(j) && N.delete("content-type");
|
|
1512
1512
|
}
|
|
@@ -1516,7 +1516,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1516
1516
|
signal: oe,
|
|
1517
1517
|
method: b.toUpperCase(),
|
|
1518
1518
|
headers: N.normalize().toJSON(),
|
|
1519
|
-
body:
|
|
1519
|
+
body: S,
|
|
1520
1520
|
duplex: "half",
|
|
1521
1521
|
credentials: D ? k : void 0
|
|
1522
1522
|
};
|
|
@@ -1533,14 +1533,14 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1533
1533
|
);
|
|
1534
1534
|
}
|
|
1535
1535
|
const x = v && (L === "stream" || L === "response");
|
|
1536
|
-
if (v && O.body && (
|
|
1536
|
+
if (v && O.body && (T || ne || x && P)) {
|
|
1537
1537
|
const j = {};
|
|
1538
1538
|
["status", "statusText", "headers"].forEach((F) => {
|
|
1539
1539
|
j[F] = O[F];
|
|
1540
1540
|
});
|
|
1541
|
-
const Z = $.toFiniteNumber(O.headers.get("content-length")), [Q, A] =
|
|
1541
|
+
const Z = $.toFiniteNumber(O.headers.get("content-length")), [Q, A] = T && Ds(
|
|
1542
1542
|
Z,
|
|
1543
|
-
kr(Cs(
|
|
1543
|
+
kr(Cs(T), !0)
|
|
1544
1544
|
) || [];
|
|
1545
1545
|
let C = 0;
|
|
1546
1546
|
const M = (F) => {
|
|
@@ -1561,7 +1561,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1561
1561
|
);
|
|
1562
1562
|
}
|
|
1563
1563
|
L = L || "text";
|
|
1564
|
-
let z = await
|
|
1564
|
+
let z = await R[$.findKey(R, L) || "text"](
|
|
1565
1565
|
O,
|
|
1566
1566
|
g
|
|
1567
1567
|
);
|
|
@@ -1578,7 +1578,7 @@ const rs = "1.16.0", ks = 64 * 1024, { isFunction: Bt } = $, Ms = (t, ...e) => {
|
|
|
1578
1578
|
return !x && P && P(), await new Promise((j, Z) => {
|
|
1579
1579
|
Ya(j, Z, {
|
|
1580
1580
|
data: z,
|
|
1581
|
-
headers:
|
|
1581
|
+
headers: Se.from(O.headers),
|
|
1582
1582
|
status: O.status,
|
|
1583
1583
|
statusText: O.statusText,
|
|
1584
1584
|
config: g,
|
|
@@ -1675,7 +1675,7 @@ function gn(t) {
|
|
|
1675
1675
|
throw new Vt(null, t);
|
|
1676
1676
|
}
|
|
1677
1677
|
function qs(t) {
|
|
1678
|
-
return gn(t), t.headers =
|
|
1678
|
+
return gn(t), t.headers = Se.from(t.headers), t.data = mn.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ja.getAdapter(t.adapter || jt.adapter, t)(t).then(
|
|
1679
1679
|
function(n) {
|
|
1680
1680
|
gn(t), t.response = n;
|
|
1681
1681
|
try {
|
|
@@ -1683,7 +1683,7 @@ function qs(t) {
|
|
|
1683
1683
|
} finally {
|
|
1684
1684
|
delete t.response;
|
|
1685
1685
|
}
|
|
1686
|
-
return n.headers =
|
|
1686
|
+
return n.headers = Se.from(n.headers), n;
|
|
1687
1687
|
},
|
|
1688
1688
|
function(n) {
|
|
1689
1689
|
if (!za(n) && (gn(t), n && n.response)) {
|
|
@@ -1697,7 +1697,7 @@ function qs(t) {
|
|
|
1697
1697
|
} finally {
|
|
1698
1698
|
delete t.response;
|
|
1699
1699
|
}
|
|
1700
|
-
n.response.headers =
|
|
1700
|
+
n.response.headers = Se.from(n.response.headers);
|
|
1701
1701
|
}
|
|
1702
1702
|
return Promise.reject(n);
|
|
1703
1703
|
}
|
|
@@ -1830,9 +1830,9 @@ let tt = class {
|
|
|
1830
1830
|
!0
|
|
1831
1831
|
), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1832
1832
|
let a = o && $.merge(o.common, o[r.method]);
|
|
1833
|
-
o && $.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (
|
|
1834
|
-
delete o[
|
|
1835
|
-
}), r.headers =
|
|
1833
|
+
o && $.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (R) => {
|
|
1834
|
+
delete o[R];
|
|
1835
|
+
}), r.headers = Se.concat(a, o);
|
|
1836
1836
|
const i = [];
|
|
1837
1837
|
let c = !0;
|
|
1838
1838
|
this.interceptors.request.forEach(function(_) {
|
|
@@ -1848,17 +1848,17 @@ let tt = class {
|
|
|
1848
1848
|
});
|
|
1849
1849
|
let l, h = 0, y;
|
|
1850
1850
|
if (!c) {
|
|
1851
|
-
const
|
|
1852
|
-
for (
|
|
1853
|
-
l = l.then(
|
|
1851
|
+
const R = [qs.bind(this), void 0];
|
|
1852
|
+
for (R.unshift(...i), R.push(...u), y = R.length, l = Promise.resolve(r); h < y; )
|
|
1853
|
+
l = l.then(R[h++], R[h++]);
|
|
1854
1854
|
return l;
|
|
1855
1855
|
}
|
|
1856
1856
|
y = i.length;
|
|
1857
1857
|
let v = r;
|
|
1858
1858
|
for (; h < y; ) {
|
|
1859
|
-
const
|
|
1859
|
+
const R = i[h++], _ = i[h++];
|
|
1860
1860
|
try {
|
|
1861
|
-
v =
|
|
1861
|
+
v = R(v);
|
|
1862
1862
|
} catch (f) {
|
|
1863
1863
|
_.call(this, f);
|
|
1864
1864
|
break;
|
|
@@ -1866,8 +1866,8 @@ let tt = class {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
try {
|
|
1868
1868
|
l = qs.call(this, v);
|
|
1869
|
-
} catch (
|
|
1870
|
-
return Promise.reject(
|
|
1869
|
+
} catch (R) {
|
|
1870
|
+
return Promise.reject(R);
|
|
1871
1871
|
}
|
|
1872
1872
|
for (h = 0, y = u.length; h < y; )
|
|
1873
1873
|
l = l.then(u[h++], u[h++]);
|
|
@@ -2083,7 +2083,7 @@ pe.all = function(e) {
|
|
|
2083
2083
|
pe.spread = Bu;
|
|
2084
2084
|
pe.isAxiosError = zu;
|
|
2085
2085
|
pe.mergeConfig = nt;
|
|
2086
|
-
pe.AxiosHeaders =
|
|
2086
|
+
pe.AxiosHeaders = Se;
|
|
2087
2087
|
pe.formToJSON = (t) => Ba($.isHTMLForm(t) ? new FormData(t) : t);
|
|
2088
2088
|
pe.getAdapter = Ja.getAdapter;
|
|
2089
2089
|
pe.HttpStatusCode = jn;
|
|
@@ -2310,7 +2310,7 @@ Ge.interceptors.response.use(
|
|
|
2310
2310
|
return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${e}: ${r}`);
|
|
2311
2311
|
}
|
|
2312
2312
|
);
|
|
2313
|
-
const H = async (t, e) => (await Ge.get(t, e)).data, ve = async (t, e) => (await Ge.post(t, e)).data, is = async (t, e) => (await Ge.put(t, e)).data, hw = async (t, e) => (await Ge.patch(t, e)).data, ti = async (t) => (await Ge.delete(t)).data, W = (t) => typeof t == "string",
|
|
2313
|
+
const H = async (t, e) => (await Ge.get(t, e)).data, ve = async (t, e) => (await Ge.post(t, e)).data, is = async (t, e) => (await Ge.put(t, e)).data, hw = async (t, e) => (await Ge.patch(t, e)).data, ti = async (t) => (await Ge.delete(t)).data, W = (t) => typeof t == "string", St = () => {
|
|
2314
2314
|
let t, e;
|
|
2315
2315
|
const r = new Promise((n, s) => {
|
|
2316
2316
|
t = n, e = s;
|
|
@@ -2663,25 +2663,25 @@ class jr extends Xr {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
const h = this.resolve(e, r);
|
|
2665
2665
|
let y = h?.res;
|
|
2666
|
-
const v = h?.usedKey || a,
|
|
2666
|
+
const v = h?.usedKey || a, R = h?.exactUsedKey || a, _ = ["[object Number]", "[object Function]", "[object RegExp]"], f = r.joinArrays !== void 0 ? r.joinArrays : this.options.joinArrays, g = !this.i18nFormat || this.i18nFormat.handleAsObject, p = r.count !== void 0 && !W(r.count), b = jr.hasDefaultValue(r), S = p ? this.pluralResolver.getSuffix(u, r.count, r) : "", d = r.ordinal && p ? this.pluralResolver.getSuffix(u, r.count, {
|
|
2667
2667
|
ordinal: !1
|
|
2668
|
-
}) : "", m = p && !r.ordinal && r.count === 0, w = m && r[`defaultValue${this.options.pluralSeparator}zero`] || r[`defaultValue${
|
|
2669
|
-
let
|
|
2670
|
-
g && !y && b && (
|
|
2671
|
-
const I = Ks(
|
|
2672
|
-
if (g &&
|
|
2668
|
+
}) : "", m = p && !r.ordinal && r.count === 0, w = m && r[`defaultValue${this.options.pluralSeparator}zero`] || r[`defaultValue${S}`] || r[`defaultValue${d}`] || r.defaultValue;
|
|
2669
|
+
let T = y;
|
|
2670
|
+
g && !y && b && (T = w);
|
|
2671
|
+
const I = Ks(T), L = Object.prototype.toString.apply(T);
|
|
2672
|
+
if (g && T && I && _.indexOf(L) < 0 && !(W(f) && Array.isArray(T))) {
|
|
2673
2673
|
if (!r.returnObjects && !this.options.returnObjects) {
|
|
2674
2674
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2675
|
-
const N = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v,
|
|
2675
|
+
const N = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, T, {
|
|
2676
2676
|
...r,
|
|
2677
2677
|
ns: i
|
|
2678
2678
|
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
2679
2679
|
return s ? (h.res = N, h.usedParams = this.getUsedParamsDetails(r), h) : N;
|
|
2680
2680
|
}
|
|
2681
2681
|
if (o) {
|
|
2682
|
-
const N = Array.isArray(
|
|
2683
|
-
for (const V in
|
|
2684
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
2682
|
+
const N = Array.isArray(T), k = N ? [] : {}, B = N ? R : v;
|
|
2683
|
+
for (const V in T)
|
|
2684
|
+
if (Object.prototype.hasOwnProperty.call(T, V)) {
|
|
2685
2685
|
const J = `${B}${o}${V}`;
|
|
2686
2686
|
b && !y ? k[V] = this.translate(J, {
|
|
2687
2687
|
...r,
|
|
@@ -2692,7 +2692,7 @@ class jr extends Xr {
|
|
|
2692
2692
|
...r,
|
|
2693
2693
|
joinArrays: !1,
|
|
2694
2694
|
ns: i
|
|
2695
|
-
}), k[V] === J && (k[V] =
|
|
2695
|
+
}), k[V] === J && (k[V] = T[V]);
|
|
2696
2696
|
}
|
|
2697
2697
|
y = k;
|
|
2698
2698
|
}
|
|
@@ -2763,8 +2763,8 @@ class jr extends Xr {
|
|
|
2763
2763
|
l < v && (n.nest = !1);
|
|
2764
2764
|
}
|
|
2765
2765
|
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
2766
|
-
for (var y = arguments.length, v = new Array(y),
|
|
2767
|
-
v[
|
|
2766
|
+
for (var y = arguments.length, v = new Array(y), R = 0; R < y; R++)
|
|
2767
|
+
v[R] = arguments[R];
|
|
2768
2768
|
return o?.[0] === v[0] && !n.context ? (a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${r[0]}`), null) : a.translate(...v, r);
|
|
2769
2769
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
2770
2770
|
}
|
|
@@ -2785,7 +2785,7 @@ class jr extends Xr {
|
|
|
2785
2785
|
s = l;
|
|
2786
2786
|
let h = u.namespaces;
|
|
2787
2787
|
this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
|
|
2788
|
-
const y = r.count !== void 0 && !W(r.count), v = y && !r.ordinal && r.count === 0,
|
|
2788
|
+
const y = r.count !== void 0 && !W(r.count), v = y && !r.ordinal && r.count === 0, R = r.context !== void 0 && (W(r.context) || typeof r.context == "number") && r.context !== "", _ = r.lngs ? r.lngs : this.languageUtils.toResolveHierarchy(r.lng || this.language, r.fallbackLng);
|
|
2789
2789
|
h.forEach((f) => {
|
|
2790
2790
|
this.isValidLookup(n) || (i = f, !Gs[`${_[0]}-${f}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(i) && (Gs[`${_[0]}-${f}`] = !0, this.logger.warn(`key "${s}" for languages "${_.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), _.forEach((g) => {
|
|
2791
2791
|
if (this.isValidLookup(n)) return;
|
|
@@ -2794,12 +2794,12 @@ class jr extends Xr {
|
|
|
2794
2794
|
if (this.i18nFormat?.addLookupKeys)
|
|
2795
2795
|
this.i18nFormat.addLookupKeys(p, l, g, f, r);
|
|
2796
2796
|
else {
|
|
2797
|
-
let
|
|
2798
|
-
y && (
|
|
2797
|
+
let S;
|
|
2798
|
+
y && (S = this.pluralResolver.getSuffix(g, r.count, r));
|
|
2799
2799
|
const d = `${this.options.pluralSeparator}zero`, m = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2800
|
-
if (y && (p.push(l +
|
|
2800
|
+
if (y && (p.push(l + S), r.ordinal && S.indexOf(m) === 0 && p.push(l + S.replace(m, this.options.pluralSeparator)), v && p.push(l + d)), R) {
|
|
2801
2801
|
const w = `${l}${this.options.contextSeparator}${r.context}`;
|
|
2802
|
-
p.push(w), y && (p.push(w +
|
|
2802
|
+
p.push(w), y && (p.push(w + S), r.ordinal && S.indexOf(m) === 0 && p.push(w + S.replace(m, this.options.pluralSeparator)), v && p.push(w + d));
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
2805
|
let b;
|
|
@@ -2976,7 +2976,7 @@ const Xs = function(t, e, r) {
|
|
|
2976
2976
|
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = hl(t, e, r);
|
|
2977
2977
|
return !o && s && W(r) && (o = Hn(t, r, n), o === void 0 && (o = Hn(e, r, n))), o;
|
|
2978
2978
|
}, bn = (t) => t.replace(/\$/g, "$$$$");
|
|
2979
|
-
class
|
|
2979
|
+
class Tl {
|
|
2980
2980
|
constructor() {
|
|
2981
2981
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2982
2982
|
this.logger = qe.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((r) => r), this.init(e);
|
|
@@ -2999,13 +2999,13 @@ class Rl {
|
|
|
2999
2999
|
unescapePrefix: h,
|
|
3000
3000
|
nestingPrefix: y,
|
|
3001
3001
|
nestingPrefixEscaped: v,
|
|
3002
|
-
nestingSuffix:
|
|
3002
|
+
nestingSuffix: R,
|
|
3003
3003
|
nestingSuffixEscaped: _,
|
|
3004
3004
|
nestingOptionsSeparator: f,
|
|
3005
3005
|
maxReplaces: g,
|
|
3006
3006
|
alwaysFormat: p
|
|
3007
3007
|
} = e.interpolation;
|
|
3008
|
-
this.escape = r !== void 0 ? r : gl, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? at(o) : a || "{{", this.suffix = i ? at(i) : c || "}}", this.formatSeparator = u || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? at(y) : v || at("$t("), this.nestingSuffix =
|
|
3008
|
+
this.escape = r !== void 0 ? r : gl, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? at(o) : a || "{{", this.suffix = i ? at(i) : c || "}}", this.formatSeparator = u || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? at(y) : v || at("$t("), this.nestingSuffix = R ? at(R) : _ || at(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = p !== void 0 ? p : !1, this.resetRegExp();
|
|
3009
3009
|
}
|
|
3010
3010
|
reset() {
|
|
3011
3011
|
this.options && this.init(this.options);
|
|
@@ -3025,7 +3025,7 @@ class Rl {
|
|
|
3025
3025
|
interpolationkey: v
|
|
3026
3026
|
}) : g;
|
|
3027
3027
|
}
|
|
3028
|
-
const
|
|
3028
|
+
const R = v.split(this.formatSeparator), _ = R.shift().trim(), f = R.join(this.formatSeparator).trim();
|
|
3029
3029
|
return this.format(Xs(r, c, _, this.options.keySeparator, this.options.ignoreJSONStructure), f, n, {
|
|
3030
3030
|
...s,
|
|
3031
3031
|
...r,
|
|
@@ -3042,18 +3042,18 @@ class Rl {
|
|
|
3042
3042
|
safeValue: (v) => this.escapeValue ? bn(this.escape(v)) : bn(v)
|
|
3043
3043
|
}].forEach((v) => {
|
|
3044
3044
|
for (i = 0; o = v.regex.exec(e); ) {
|
|
3045
|
-
const
|
|
3046
|
-
if (a = u(
|
|
3045
|
+
const R = o[1].trim();
|
|
3046
|
+
if (a = u(R), a === void 0)
|
|
3047
3047
|
if (typeof l == "function") {
|
|
3048
3048
|
const f = l(e, o, s);
|
|
3049
3049
|
a = W(f) ? f : "";
|
|
3050
|
-
} else if (s && Object.prototype.hasOwnProperty.call(s,
|
|
3050
|
+
} else if (s && Object.prototype.hasOwnProperty.call(s, R))
|
|
3051
3051
|
a = "";
|
|
3052
3052
|
else if (h) {
|
|
3053
3053
|
a = o[0];
|
|
3054
3054
|
continue;
|
|
3055
3055
|
} else
|
|
3056
|
-
this.logger.warn(`missed to pass in variable ${
|
|
3056
|
+
this.logger.warn(`missed to pass in variable ${R} for interpolating ${e}`), a = "";
|
|
3057
3057
|
else !W(a) && !this.useRawValueToEscape && (a = Vs(a));
|
|
3058
3058
|
const _ = v.safeValue(a);
|
|
3059
3059
|
if (e = e.replace(o[0], _), h ? (v.regex.lastIndex += a.length, v.regex.lastIndex -= o[0].length) : v.regex.lastIndex = 0, i++, i >= this.maxReplaces)
|
|
@@ -3069,8 +3069,8 @@ class Rl {
|
|
|
3069
3069
|
const h = c.split(new RegExp(`${l}[ ]*{`));
|
|
3070
3070
|
let y = `{${h[1]}`;
|
|
3071
3071
|
c = h[0], y = this.interpolate(y, a);
|
|
3072
|
-
const v = y.match(/'/g),
|
|
3073
|
-
((v?.length ?? 0) % 2 === 0 && !
|
|
3072
|
+
const v = y.match(/'/g), R = y.match(/"/g);
|
|
3073
|
+
((v?.length ?? 0) % 2 === 0 && !R || R.length % 2 !== 0) && (y = y.replace(/'/g, '"'));
|
|
3074
3074
|
try {
|
|
3075
3075
|
a = JSON.parse(y), u && (a = {
|
|
3076
3076
|
...u,
|
|
@@ -3100,7 +3100,7 @@ class Rl {
|
|
|
3100
3100
|
return e;
|
|
3101
3101
|
}
|
|
3102
3102
|
}
|
|
3103
|
-
const
|
|
3103
|
+
const Rl = (t) => {
|
|
3104
3104
|
let e = t.toLowerCase().trim();
|
|
3105
3105
|
const r = {};
|
|
3106
3106
|
if (t.indexOf("(") > -1) {
|
|
@@ -3131,7 +3131,7 @@ const Sl = (t) => {
|
|
|
3131
3131
|
return i || (i = t(qr(n), s), e[a] = i), i(r);
|
|
3132
3132
|
};
|
|
3133
3133
|
};
|
|
3134
|
-
class
|
|
3134
|
+
class Sl {
|
|
3135
3135
|
constructor() {
|
|
3136
3136
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3137
3137
|
this.logger = qe.create("formatter"), this.options = e, this.formats = {
|
|
@@ -3191,7 +3191,7 @@ class Tl {
|
|
|
3191
3191
|
const {
|
|
3192
3192
|
formatName: u,
|
|
3193
3193
|
formatOptions: l
|
|
3194
|
-
} =
|
|
3194
|
+
} = Rl(c);
|
|
3195
3195
|
if (this.formats[u]) {
|
|
3196
3196
|
let h = i;
|
|
3197
3197
|
try {
|
|
@@ -3441,21 +3441,21 @@ class kt extends Xr {
|
|
|
3441
3441
|
if (!this.options.isClone) {
|
|
3442
3442
|
this.modules.logger ? qe.init(o(this.modules.logger), this.options) : qe.init(null, this.options);
|
|
3443
3443
|
let l;
|
|
3444
|
-
this.modules.formatter ? l = this.modules.formatter : l =
|
|
3444
|
+
this.modules.formatter ? l = this.modules.formatter : l = Sl;
|
|
3445
3445
|
const h = new Ws(this.options);
|
|
3446
3446
|
this.store = new Ys(this.options.resources, this.options);
|
|
3447
3447
|
const y = this.services;
|
|
3448
3448
|
y.logger = qe, y.resourceStore = this.store, y.languageUtils = h, y.pluralResolver = new vl(h, {
|
|
3449
3449
|
prepend: this.options.pluralSeparator,
|
|
3450
3450
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3451
|
-
}), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (y.formatter = o(l), y.formatter.init(y, this.options), this.options.interpolation.format = y.formatter.format.bind(y.formatter)), y.interpolator = new
|
|
3451
|
+
}), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (y.formatter = o(l), y.formatter.init(y, this.options), this.options.interpolation.format = y.formatter.format.bind(y.formatter)), y.interpolator = new Tl(this.options), y.utils = {
|
|
3452
3452
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
3453
3453
|
}, y.backendConnector = new Al(o(this.modules.backend), y.resourceStore, y, this.options), y.backendConnector.on("*", function(v) {
|
|
3454
|
-
for (var
|
|
3454
|
+
for (var R = arguments.length, _ = new Array(R > 1 ? R - 1 : 0), f = 1; f < R; f++)
|
|
3455
3455
|
_[f - 1] = arguments[f];
|
|
3456
3456
|
e.emit(v, ..._);
|
|
3457
3457
|
}), this.modules.languageDetector && (y.languageDetector = o(this.modules.languageDetector), y.languageDetector.init && y.languageDetector.init(y, this.options.detection, this.options)), this.modules.i18nFormat && (y.i18nFormat = o(this.modules.i18nFormat), y.i18nFormat.init && y.i18nFormat.init(this)), this.translator = new jr(this.services, this.options), this.translator.on("*", function(v) {
|
|
3458
|
-
for (var
|
|
3458
|
+
for (var R = arguments.length, _ = new Array(R > 1 ? R - 1 : 0), f = 1; f < R; f++)
|
|
3459
3459
|
_[f - 1] = arguments[f];
|
|
3460
3460
|
e.emit(v, ..._);
|
|
3461
3461
|
}), this.modules.external.forEach((v) => {
|
|
@@ -3475,7 +3475,7 @@ class kt extends Xr {
|
|
|
3475
3475
|
return e.store[l](...arguments), e;
|
|
3476
3476
|
};
|
|
3477
3477
|
});
|
|
3478
|
-
const c =
|
|
3478
|
+
const c = St(), u = () => {
|
|
3479
3479
|
const l = (h, y) => {
|
|
3480
3480
|
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), c.resolve(y), n(h, y);
|
|
3481
3481
|
};
|
|
@@ -3502,7 +3502,7 @@ class kt extends Xr {
|
|
|
3502
3502
|
n(null);
|
|
3503
3503
|
}
|
|
3504
3504
|
reloadResources(e, r, n) {
|
|
3505
|
-
const s =
|
|
3505
|
+
const s = St();
|
|
3506
3506
|
return typeof e == "function" && (n = e, e = void 0), typeof r == "function" && (n = r, r = void 0), e || (e = this.languages), r || (r = this.options.ns), n || (n = zt), this.services.backendConnector.reload(e, r, (o) => {
|
|
3507
3507
|
s.resolve(), n(o);
|
|
3508
3508
|
}), s;
|
|
@@ -3525,7 +3525,7 @@ class kt extends Xr {
|
|
|
3525
3525
|
changeLanguage(e, r) {
|
|
3526
3526
|
var n = this;
|
|
3527
3527
|
this.isLanguageChangingTo = e;
|
|
3528
|
-
const s =
|
|
3528
|
+
const s = St();
|
|
3529
3529
|
this.emit("languageChanging", e);
|
|
3530
3530
|
const o = (c) => {
|
|
3531
3531
|
this.language = c, this.languages = this.services.languageUtils.toResolveHierarchy(c), this.resolvedLanguage = void 0, this.setResolvedLanguage(c);
|
|
@@ -3559,7 +3559,7 @@ class kt extends Xr {
|
|
|
3559
3559
|
c.lng = c.lng || o.lng, c.lngs = c.lngs || o.lngs, c.ns = c.ns || o.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || n || o.keyPrefix);
|
|
3560
3560
|
const y = s.options.keySeparator || ".";
|
|
3561
3561
|
let v;
|
|
3562
|
-
return c.keyPrefix && Array.isArray(a) ? v = a.map((
|
|
3562
|
+
return c.keyPrefix && Array.isArray(a) ? v = a.map((R) => `${c.keyPrefix}${y}${R}`) : v = c.keyPrefix ? `${c.keyPrefix}${y}${a}` : a, s.t(v, c);
|
|
3563
3563
|
};
|
|
3564
3564
|
return W(e) ? o.lng = e : o.lngs = e, o.ns = r, o.keyPrefix = n, o;
|
|
3565
3565
|
}
|
|
@@ -3595,7 +3595,7 @@ class kt extends Xr {
|
|
|
3595
3595
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!s || a(o, e)));
|
|
3596
3596
|
}
|
|
3597
3597
|
loadNamespaces(e, r) {
|
|
3598
|
-
const n =
|
|
3598
|
+
const n = St();
|
|
3599
3599
|
return this.options.ns ? (W(e) && (e = [e]), e.forEach((s) => {
|
|
3600
3600
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
3601
3601
|
}), this.loadResources((s) => {
|
|
@@ -3603,7 +3603,7 @@ class kt extends Xr {
|
|
|
3603
3603
|
}), n) : (r && r(), Promise.resolve());
|
|
3604
3604
|
}
|
|
3605
3605
|
loadLanguages(e, r) {
|
|
3606
|
-
const n =
|
|
3606
|
+
const n = St();
|
|
3607
3607
|
W(e) && (e = [e]);
|
|
3608
3608
|
const s = this.options.preload || [], o = e.filter((a) => s.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
|
|
3609
3609
|
return o.length ? (this.options.preload = s.concat(o), this.loadResources((a) => {
|
|
@@ -4066,9 +4066,9 @@ function yw() {
|
|
|
4066
4066
|
const h = document.createElement("canvas"), y = h.getContext("2d");
|
|
4067
4067
|
if (y) {
|
|
4068
4068
|
if (o && a) {
|
|
4069
|
-
const v = o / a,
|
|
4069
|
+
const v = o / a, R = u / l;
|
|
4070
4070
|
let _ = 0, f = 0, g = u, p = l;
|
|
4071
|
-
|
|
4071
|
+
R > v ? (g = Math.round(l * v), _ = Math.round((u - g) / 2)) : (p = Math.round(u / v), f = Math.round((l - p) / 2)), h.width = o, h.height = a, y.drawImage(
|
|
4072
4072
|
c,
|
|
4073
4073
|
_,
|
|
4074
4074
|
f,
|
|
@@ -4121,7 +4121,7 @@ function Ql(t) {
|
|
|
4121
4121
|
function _w(t, e) {
|
|
4122
4122
|
document.cookie = `${t}=${e}; path=/;`;
|
|
4123
4123
|
}
|
|
4124
|
-
const vw = (t) => !t || t.trim().length === 0,
|
|
4124
|
+
const vw = (t) => !t || t.trim().length === 0, Tw = (t, e) => {
|
|
4125
4125
|
if (!t || !e || e.length === 0)
|
|
4126
4126
|
return 999;
|
|
4127
4127
|
const r = e.findIndex(
|
|
@@ -4129,7 +4129,7 @@ const vw = (t) => !t || t.trim().length === 0, Rw = (t, e) => {
|
|
|
4129
4129
|
);
|
|
4130
4130
|
return r === -1 ? 999 : r;
|
|
4131
4131
|
};
|
|
4132
|
-
function
|
|
4132
|
+
function Rw(t, e) {
|
|
4133
4133
|
if (!t || t.length === 0)
|
|
4134
4134
|
return [];
|
|
4135
4135
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -4141,7 +4141,7 @@ function Sw(t, e) {
|
|
|
4141
4141
|
items: s
|
|
4142
4142
|
}));
|
|
4143
4143
|
}
|
|
4144
|
-
function
|
|
4144
|
+
function Sw(t, e, r) {
|
|
4145
4145
|
if (!t || t.length === 0)
|
|
4146
4146
|
return [];
|
|
4147
4147
|
const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
@@ -4288,10 +4288,10 @@ const cs = () => {
|
|
|
4288
4288
|
}, fi = K + "/idgen/identifiertype", fd = (t) => K + `/bahmni/app/setting?module=${t}`, pd = "bahmni.primaryIdentifierType", hd = K + "/bahmnicore/patientprofile", md = (t) => K + `/bahmnicore/patientprofile/${t}`, gd = ae + "/Patient", yd = (t) => K + `/idgen/identifiersource/${t}/identifier`, wd = (t) => K + `/patientprofile/${t}?v=full`, Ed = (t, e, r = 20, n) => {
|
|
4289
4289
|
let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${t}&limit=${r}&searchString=${encodeURIComponent(e)}`;
|
|
4290
4290
|
return n && (s += `&parent=${n}`), s;
|
|
4291
|
-
}, bd = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", _d = K + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", vd = 20,
|
|
4291
|
+
}, bd = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", _d = K + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", vd = 20, Td = 2, Mw = 120, Uw = 50, qw = 15, Rd = /^[a-f0-9-]{36}$/i, Sd = K + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Od = async (t) => {
|
|
4292
4292
|
if (!t || t.trim() === "")
|
|
4293
4293
|
throw new Error("Invalid patient UUID: UUID cannot be empty");
|
|
4294
|
-
if (!
|
|
4294
|
+
if (!Rd.test(t))
|
|
4295
4295
|
throw new Error(`Invalid patient UUID format: ${t}`);
|
|
4296
4296
|
return H(di(t));
|
|
4297
4297
|
}, Ad = (t) => !t.extension || !Array.isArray(t.extension) ? [] : t.extension.flatMap((e) => e.extension && Array.isArray(e.extension) ? e.extension.filter((r) => r.valueString).map((r) => r.valueString) : []), Nd = (t) => {
|
|
@@ -4382,7 +4382,7 @@ const cs = () => {
|
|
|
4382
4382
|
md(t),
|
|
4383
4383
|
e
|
|
4384
4384
|
), Kw = (t) => ve(gd, t), Ww = (t) => ve(yd(t), {}), Jw = (t, e) => is(di(t), e), Qw = async () => H(ci("mrs.genders")), Xw = async (t, e, r = vd, n) => {
|
|
4385
|
-
if (!e || e.length <
|
|
4385
|
+
if (!e || e.length < Td)
|
|
4386
4386
|
return [];
|
|
4387
4387
|
try {
|
|
4388
4388
|
return await H(
|
|
@@ -4407,7 +4407,7 @@ const cs = () => {
|
|
|
4407
4407
|
`Failed to fetch relationship types: ${t instanceof Error ? t.message : "Unknown error"}`
|
|
4408
4408
|
);
|
|
4409
4409
|
}
|
|
4410
|
-
}, rE = async () => H(
|
|
4410
|
+
}, rE = async () => H(Sd);
|
|
4411
4411
|
var Cd = /* @__PURE__ */ ((t) => (t.BOOLEAN = "java.lang.Boolean", t.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", t.CONCEPT = "org.openmrs.Concept", t.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", t.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", t.STRING = "java.lang.String", t.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", t.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", t.INTEGER = "java.lang.Integer", t.FLOAT = "java.lang.Float", t.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", t.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", t))(Cd || {}), Ld = /* @__PURE__ */ ((t) => (t.CHECKBOX = "checkbox", t.DROPDOWN = "dropdown", t.TEXT = "text", t.NUMBER = "number", t.DATE = "date", t))(Ld || {});
|
|
4412
4412
|
const nE = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : t === "java.lang.Integer" || t === "java.lang.Float" ? "number" : t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", sE = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype.datatype.BooleanDatatype", oE = (t) => t === "org.openmrs.Concept" || t === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || t === "org.openmrs.customdatatype.datatype.ConceptDatatype", aE = (t) => t === "java.lang.Integer" || t === "java.lang.Float", iE = (t) => t === "org.openmrs.util.AttributableDate" || t === "org.openmrs.customdatatype.datatype.DateDatatype", cE = (t) => t === "java.lang.String" || t === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || t === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", xd = (t) => {
|
|
4413
4413
|
const e = new CustomEvent("bahmni-audit-log", { detail: t });
|
|
@@ -4460,6 +4460,10 @@ const nE = (t) => t === "java.lang.Boolean" || t === "org.openmrs.customdatatype
|
|
|
4460
4460
|
eventType: "VIEWED_RADIOLOGY_RESULTS",
|
|
4461
4461
|
message: "VIEWED_RADIOLOGY_RESULTS_MESSAGE"
|
|
4462
4462
|
},
|
|
4463
|
+
STOP_MEDICATION: {
|
|
4464
|
+
eventType: "STOP_MEDICATION",
|
|
4465
|
+
message: "STOP_MEDICATION_MESSAGE"
|
|
4466
|
+
},
|
|
4463
4467
|
CREATE_ENCOUNTER: {
|
|
4464
4468
|
eventType: "CREATE_ENCOUNTER",
|
|
4465
4469
|
message: "CREATE_ENCOUNTER_MESSAGE",
|
|
@@ -4959,7 +4963,7 @@ function vf(t, e) {
|
|
|
4959
4963
|
if (e(t[r]))
|
|
4960
4964
|
return r;
|
|
4961
4965
|
}
|
|
4962
|
-
function
|
|
4966
|
+
function Tf(t) {
|
|
4963
4967
|
return (e, r = {}) => {
|
|
4964
4968
|
const n = e.match(t.matchPattern);
|
|
4965
4969
|
if (!n) return null;
|
|
@@ -4971,7 +4975,7 @@ function Rf(t) {
|
|
|
4971
4975
|
return { value: a, rest: i };
|
|
4972
4976
|
};
|
|
4973
4977
|
}
|
|
4974
|
-
const
|
|
4978
|
+
const Rf = /^(\d+)(th|st|nd|rd)?/i, Sf = /\d+/i, Of = {
|
|
4975
4979
|
narrow: /^(b|a)/i,
|
|
4976
4980
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
4977
4981
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
@@ -5039,9 +5043,9 @@ const Sf = /^(\d+)(th|st|nd|rd)?/i, Tf = /\d+/i, Of = {
|
|
|
5039
5043
|
night: /night/i
|
|
5040
5044
|
}
|
|
5041
5045
|
}, kf = {
|
|
5042
|
-
ordinalNumber:
|
|
5043
|
-
matchPattern:
|
|
5044
|
-
parsePattern:
|
|
5046
|
+
ordinalNumber: Tf({
|
|
5047
|
+
matchPattern: Rf,
|
|
5048
|
+
parsePattern: Sf,
|
|
5045
5049
|
valueCallback: (t) => parseInt(t, 10)
|
|
5046
5050
|
}),
|
|
5047
5051
|
era: At({
|
|
@@ -5830,13 +5834,13 @@ function Zf(t) {
|
|
|
5830
5834
|
return typeof t == "function" && t.prototype?.constructor === t;
|
|
5831
5835
|
}
|
|
5832
5836
|
const ep = 10;
|
|
5833
|
-
class
|
|
5837
|
+
class Ti {
|
|
5834
5838
|
subPriority = 0;
|
|
5835
5839
|
validate(e, r) {
|
|
5836
5840
|
return !0;
|
|
5837
5841
|
}
|
|
5838
5842
|
}
|
|
5839
|
-
class tp extends
|
|
5843
|
+
class tp extends Ti {
|
|
5840
5844
|
constructor(e, r, n, s, o) {
|
|
5841
5845
|
super(), this.value = e, this.validateValue = r, this.setValue = n, this.priority = s, o && (this.subPriority = o);
|
|
5842
5846
|
}
|
|
@@ -5847,7 +5851,7 @@ class tp extends Ri {
|
|
|
5847
5851
|
return this.setValue(e, r, this.value, n);
|
|
5848
5852
|
}
|
|
5849
5853
|
}
|
|
5850
|
-
class rp extends
|
|
5854
|
+
class rp extends Ti {
|
|
5851
5855
|
priority = ep;
|
|
5852
5856
|
subPriority = -1;
|
|
5853
5857
|
constructor(e, r) {
|
|
@@ -5969,7 +5973,7 @@ function Ue(t, e) {
|
|
|
5969
5973
|
rest: e.slice(r[0].length)
|
|
5970
5974
|
};
|
|
5971
5975
|
}
|
|
5972
|
-
function
|
|
5976
|
+
function Ri(t) {
|
|
5973
5977
|
return fe(me.anyDigitsSigned, t);
|
|
5974
5978
|
}
|
|
5975
5979
|
function he(t, e) {
|
|
@@ -6014,7 +6018,7 @@ function ms(t) {
|
|
|
6014
6018
|
return 0;
|
|
6015
6019
|
}
|
|
6016
6020
|
}
|
|
6017
|
-
function
|
|
6021
|
+
function Si(t, e) {
|
|
6018
6022
|
const r = e > 0, n = r ? e : 1 - e;
|
|
6019
6023
|
let s;
|
|
6020
6024
|
if (n <= 50)
|
|
@@ -6056,7 +6060,7 @@ class sp extends ie {
|
|
|
6056
6060
|
set(e, r, n) {
|
|
6057
6061
|
const s = e.getFullYear();
|
|
6058
6062
|
if (n.isTwoDigitYear) {
|
|
6059
|
-
const a =
|
|
6063
|
+
const a = Si(
|
|
6060
6064
|
n.year,
|
|
6061
6065
|
s
|
|
6062
6066
|
);
|
|
@@ -6093,7 +6097,7 @@ class op extends ie {
|
|
|
6093
6097
|
set(e, r, n, s) {
|
|
6094
6098
|
const o = hs(e, s);
|
|
6095
6099
|
if (n.isTwoDigitYear) {
|
|
6096
|
-
const i =
|
|
6100
|
+
const i = Si(
|
|
6097
6101
|
n.year,
|
|
6098
6102
|
o
|
|
6099
6103
|
);
|
|
@@ -6746,11 +6750,11 @@ class vp extends ie {
|
|
|
6746
6750
|
"T"
|
|
6747
6751
|
];
|
|
6748
6752
|
}
|
|
6749
|
-
function
|
|
6753
|
+
function Tp(t, e, r) {
|
|
6750
6754
|
const n = de(t, r?.in), s = Qf(n, r), o = e - s;
|
|
6751
6755
|
return tn(n, o, r);
|
|
6752
6756
|
}
|
|
6753
|
-
class
|
|
6757
|
+
class Rp extends ie {
|
|
6754
6758
|
priority = 90;
|
|
6755
6759
|
parse(e, r, n) {
|
|
6756
6760
|
const s = (o) => o === 0 ? 7 : o;
|
|
@@ -6821,7 +6825,7 @@ class Sp extends ie {
|
|
|
6821
6825
|
return r >= 1 && r <= 7;
|
|
6822
6826
|
}
|
|
6823
6827
|
set(e, r, n) {
|
|
6824
|
-
return e =
|
|
6828
|
+
return e = Tp(e, n), e.setHours(0, 0, 0, 0), e;
|
|
6825
6829
|
}
|
|
6826
6830
|
incompatibleTokens = [
|
|
6827
6831
|
"y",
|
|
@@ -6841,7 +6845,7 @@ class Sp extends ie {
|
|
|
6841
6845
|
"T"
|
|
6842
6846
|
];
|
|
6843
6847
|
}
|
|
6844
|
-
class
|
|
6848
|
+
class Sp extends ie {
|
|
6845
6849
|
priority = 80;
|
|
6846
6850
|
parse(e, r, n) {
|
|
6847
6851
|
switch (r) {
|
|
@@ -7154,7 +7158,7 @@ class kp extends ie {
|
|
|
7154
7158
|
class Mp extends ie {
|
|
7155
7159
|
priority = 40;
|
|
7156
7160
|
parse(e) {
|
|
7157
|
-
return
|
|
7161
|
+
return Ri(e);
|
|
7158
7162
|
}
|
|
7159
7163
|
set(e, r, n) {
|
|
7160
7164
|
return [ye(e, n * 1e3), { timestampIsSet: !0 }];
|
|
@@ -7164,7 +7168,7 @@ class Mp extends ie {
|
|
|
7164
7168
|
class Up extends ie {
|
|
7165
7169
|
priority = 20;
|
|
7166
7170
|
parse(e) {
|
|
7167
|
-
return
|
|
7171
|
+
return Ri(e);
|
|
7168
7172
|
}
|
|
7169
7173
|
set(e, r, n) {
|
|
7170
7174
|
return [ye(e, n), { timestampIsSet: !0 }];
|
|
@@ -7188,8 +7192,8 @@ const qp = {
|
|
|
7188
7192
|
E: new bp(),
|
|
7189
7193
|
e: new _p(),
|
|
7190
7194
|
c: new vp(),
|
|
7191
|
-
i: new
|
|
7192
|
-
a: new
|
|
7195
|
+
i: new Rp(),
|
|
7196
|
+
a: new Sp(),
|
|
7193
7197
|
b: new Op(),
|
|
7194
7198
|
B: new Ap(),
|
|
7195
7199
|
h: new Np(),
|
|
@@ -7235,15 +7239,15 @@ function Yp(t, e, r, n) {
|
|
|
7235
7239
|
`The format string mustn't contain \`${f}\` and any other token at the same time`
|
|
7236
7240
|
);
|
|
7237
7241
|
y.push({ token: g, fullToken: f });
|
|
7238
|
-
const
|
|
7242
|
+
const S = p.run(
|
|
7239
7243
|
t,
|
|
7240
7244
|
f,
|
|
7241
7245
|
a.match,
|
|
7242
7246
|
u
|
|
7243
7247
|
);
|
|
7244
|
-
if (!
|
|
7248
|
+
if (!S)
|
|
7245
7249
|
return s();
|
|
7246
|
-
l.push(
|
|
7250
|
+
l.push(S.setter), t = S.rest;
|
|
7247
7251
|
} else {
|
|
7248
7252
|
if (g.match(zp))
|
|
7249
7253
|
throw new RangeError(
|
|
@@ -7260,16 +7264,16 @@ function Yp(t, e, r, n) {
|
|
|
7260
7264
|
const v = l.map((f) => f.priority).sort((f, g) => g - f).filter((f, g, p) => p.indexOf(f) === g).map(
|
|
7261
7265
|
(f) => l.filter((g) => g.priority === f).sort((g, p) => p.subPriority - g.subPriority)
|
|
7262
7266
|
).map((f) => f[0]);
|
|
7263
|
-
let
|
|
7264
|
-
if (isNaN(+
|
|
7267
|
+
let R = de(r, n?.in);
|
|
7268
|
+
if (isNaN(+R)) return s();
|
|
7265
7269
|
const _ = {};
|
|
7266
7270
|
for (const f of v) {
|
|
7267
|
-
if (!f.validate(
|
|
7271
|
+
if (!f.validate(R, u))
|
|
7268
7272
|
return s();
|
|
7269
|
-
const g = f.set(
|
|
7270
|
-
Array.isArray(g) ? (
|
|
7273
|
+
const g = f.set(R, _, u);
|
|
7274
|
+
Array.isArray(g) ? (R = g[0], Object.assign(_, g[1])) : R = g;
|
|
7271
7275
|
}
|
|
7272
|
-
return
|
|
7276
|
+
return R;
|
|
7273
7277
|
}
|
|
7274
7278
|
function Gp(t) {
|
|
7275
7279
|
return t.match(Vp)[1].replace(Hp, "'");
|
|
@@ -7447,9 +7451,9 @@ async function vE(t, e = 10, r = 1) {
|
|
|
7447
7451
|
);
|
|
7448
7452
|
return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
|
|
7449
7453
|
}
|
|
7450
|
-
const
|
|
7454
|
+
const TE = async () => await H(Pi), RE = async (t) => {
|
|
7451
7455
|
await ve(Pi, t);
|
|
7452
|
-
}, Ii = "dd/MM/yyyy", vh = "default_dateFormat",
|
|
7456
|
+
}, Ii = "dd/MM/yyyy", vh = "default_dateFormat", Th = "h:mm a", SE = "yyyy-MM-dd", De = {
|
|
7453
7457
|
PARSE_ERROR: "DATE_ERROR_PARSE",
|
|
7454
7458
|
FORMAT_ERROR: "DATE_ERROR_FORMAT",
|
|
7455
7459
|
EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
|
|
@@ -7484,7 +7488,7 @@ function $i(t, e) {
|
|
|
7484
7488
|
}
|
|
7485
7489
|
};
|
|
7486
7490
|
}
|
|
7487
|
-
function
|
|
7491
|
+
function Rh(t, e, r) {
|
|
7488
7492
|
if (t == null)
|
|
7489
7493
|
return {
|
|
7490
7494
|
formattedResult: "",
|
|
@@ -7512,7 +7516,7 @@ function Sh(t, e, r) {
|
|
|
7512
7516
|
}
|
|
7513
7517
|
} : { formattedResult: vi(n, e) };
|
|
7514
7518
|
}
|
|
7515
|
-
function
|
|
7519
|
+
function Sh() {
|
|
7516
7520
|
try {
|
|
7517
7521
|
const t = new Intl.DateTimeFormat().formatToParts(/* @__PURE__ */ new Date()), e = {
|
|
7518
7522
|
day: "dd",
|
|
@@ -7528,11 +7532,11 @@ function AE(t, e, r = !1, n) {
|
|
|
7528
7532
|
const s = e ?? ((a) => a);
|
|
7529
7533
|
let o;
|
|
7530
7534
|
try {
|
|
7531
|
-
o = n ?? localStorage.getItem(vh) ??
|
|
7535
|
+
o = n ?? localStorage.getItem(vh) ?? Sh();
|
|
7532
7536
|
} catch {
|
|
7533
7537
|
o = Ii;
|
|
7534
7538
|
}
|
|
7535
|
-
return r && !n && (o = `${o} ${
|
|
7539
|
+
return r && !n && (o = `${o} ${Th}`), Rh(t, o, s);
|
|
7536
7540
|
}
|
|
7537
7541
|
function NE(t, e, r) {
|
|
7538
7542
|
if (!t || !vt(t) || e === null || e === void 0 || !r || typeof e != "number")
|
|
@@ -7616,8 +7620,8 @@ function $E(t, e) {
|
|
|
7616
7620
|
days: " days"
|
|
7617
7621
|
}, h = zn(n, r);
|
|
7618
7622
|
if (h <= 90) {
|
|
7619
|
-
const
|
|
7620
|
-
return `${h}${
|
|
7623
|
+
const R = e ? e(u.days, { count: h }) : l.days;
|
|
7624
|
+
return `${h}${R}`;
|
|
7621
7625
|
}
|
|
7622
7626
|
return (s >= 1 ? [
|
|
7623
7627
|
[s, u.years, l.years],
|
|
@@ -7626,9 +7630,9 @@ function $E(t, e) {
|
|
|
7626
7630
|
] : [
|
|
7627
7631
|
[a, u.months, l.months],
|
|
7628
7632
|
[c, u.days, l.days]
|
|
7629
|
-
]).map(([
|
|
7630
|
-
const g = e ? e(_, { count:
|
|
7631
|
-
return `${
|
|
7633
|
+
]).map(([R, _, f]) => {
|
|
7634
|
+
const g = e ? e(_, { count: R }) : f;
|
|
7635
|
+
return `${R}${g}`;
|
|
7632
7636
|
}).join(" ");
|
|
7633
7637
|
}
|
|
7634
7638
|
const Oh = {
|
|
@@ -7742,7 +7746,7 @@ const Uh = (t) => ae + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
|
|
|
7742
7746
|
uuid: t.code ?? "",
|
|
7743
7747
|
display: t.display ?? "",
|
|
7744
7748
|
type: e
|
|
7745
|
-
}),
|
|
7749
|
+
}), Tn = (t, e) => {
|
|
7746
7750
|
const r = t.expansion?.contains ?? [];
|
|
7747
7751
|
return Fh(r).map((s) => jh(s, e));
|
|
7748
7752
|
}, FE = async (t, e, r) => {
|
|
@@ -7752,15 +7756,15 @@ const Uh = (t) => ae + `/AllergyIntolerance?patient=${t}&_count=100&_sort=-_last
|
|
|
7752
7756
|
Lr(o)
|
|
7753
7757
|
]);
|
|
7754
7758
|
return [
|
|
7755
|
-
...
|
|
7759
|
+
...Tn(
|
|
7756
7760
|
a,
|
|
7757
7761
|
dt.MEDICATION.display
|
|
7758
7762
|
),
|
|
7759
|
-
...
|
|
7763
|
+
...Tn(
|
|
7760
7764
|
i,
|
|
7761
7765
|
dt.FOOD.display
|
|
7762
7766
|
),
|
|
7763
|
-
...
|
|
7767
|
+
...Tn(
|
|
7764
7768
|
c,
|
|
7765
7769
|
dt.ENVIRONMENT.display
|
|
7766
7770
|
)
|
|
@@ -7867,7 +7871,7 @@ async function ib(t) {
|
|
|
7867
7871
|
e
|
|
7868
7872
|
);
|
|
7869
7873
|
}
|
|
7870
|
-
const Zh = (t) => ae + `/Condition?category=${Ci}&patient=${t}&_count=100&_sort=-_lastUpdated`, em = (t, e = 10, r = 0) => ae + `/Condition?category=${Ci}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`,
|
|
7874
|
+
const Zh = (t) => ae + `/Condition?category=${Ci}&patient=${t}&_count=100&_sort=-_lastUpdated`, em = (t, e = 10, r = 0) => ae + `/Condition?category=${Ci}&patient=${t}&_count=${e}&_getpagesoffset=${r}&_sort=-_lastUpdated`, Rn = [
|
|
7871
7875
|
{
|
|
7872
7876
|
code: "confirmed",
|
|
7873
7877
|
display: "CERTAINITY_CONFIRMED",
|
|
@@ -7890,11 +7894,11 @@ async function sm(t, e, r) {
|
|
|
7890
7894
|
const om = (t) => {
|
|
7891
7895
|
switch (t.verificationStatus?.coding?.[0]?.code) {
|
|
7892
7896
|
case tm:
|
|
7893
|
-
return
|
|
7897
|
+
return Rn[0];
|
|
7894
7898
|
case rm:
|
|
7895
|
-
return
|
|
7899
|
+
return Rn[1];
|
|
7896
7900
|
default:
|
|
7897
|
-
return
|
|
7901
|
+
return Rn[1];
|
|
7898
7902
|
}
|
|
7899
7903
|
}, am = (t) => !!(t.id && t.code && t.recordedDate);
|
|
7900
7904
|
function Li(t) {
|
|
@@ -8029,7 +8033,7 @@ function _m(t) {
|
|
|
8029
8033
|
function vm(t) {
|
|
8030
8034
|
return !t || t.length === 0 ? "" : t.map((e) => e.text).filter(Boolean).join(" ");
|
|
8031
8035
|
}
|
|
8032
|
-
function
|
|
8036
|
+
function Tm(t, e, r) {
|
|
8033
8037
|
if (t?.display)
|
|
8034
8038
|
return t.display;
|
|
8035
8039
|
if (t?.reference) {
|
|
@@ -8045,7 +8049,7 @@ function Rm(t, e, r) {
|
|
|
8045
8049
|
);
|
|
8046
8050
|
return n?.code?.text ? n.code.text : t?.reference ? t.reference : "Medication";
|
|
8047
8051
|
}
|
|
8048
|
-
function
|
|
8052
|
+
function Rm(t, e, r) {
|
|
8049
8053
|
if (t?.reference) {
|
|
8050
8054
|
const s = t.reference.split("/").pop();
|
|
8051
8055
|
if (s) {
|
|
@@ -8059,7 +8063,7 @@ function Sm(t, e, r) {
|
|
|
8059
8063
|
);
|
|
8060
8064
|
return n?.form ? n.form.text ?? n.form.coding?.[0]?.display ?? "" : "";
|
|
8061
8065
|
}
|
|
8062
|
-
function
|
|
8066
|
+
function Sm(t) {
|
|
8063
8067
|
const e = t.entry?.filter((n) => {
|
|
8064
8068
|
const s = n.resource;
|
|
8065
8069
|
return s?.resourceType === "MedicationRequest" && !!s?.id;
|
|
@@ -8068,11 +8072,11 @@ function Tm(t) {
|
|
|
8068
8072
|
const s = n.resource;
|
|
8069
8073
|
s.resourceType === "Medication" && r.set(s.id, s);
|
|
8070
8074
|
}), e.map((n) => {
|
|
8071
|
-
const s = n.medicationReference, o = n.requester, a = pm(n), i =
|
|
8075
|
+
const s = n.medicationReference, o = n.requester, a = pm(n), i = Tm(
|
|
8072
8076
|
s,
|
|
8073
8077
|
n,
|
|
8074
8078
|
r
|
|
8075
|
-
), c =
|
|
8079
|
+
), c = Rm(
|
|
8076
8080
|
s,
|
|
8077
8081
|
n,
|
|
8078
8082
|
r
|
|
@@ -8098,6 +8102,14 @@ function Tm(t) {
|
|
|
8098
8102
|
),
|
|
8099
8103
|
note: vm(n.note),
|
|
8100
8104
|
doseForm: c,
|
|
8105
|
+
statusReason: n.statusReason?.text ?? n.statusReason?.coding?.[0]?.display ?? void 0,
|
|
8106
|
+
dateStopped: (() => {
|
|
8107
|
+
const u = n.extension?.find(
|
|
8108
|
+
(l) => l.url === "http://fhir.bahmni.org/ext/medicationRequest/dateStopped"
|
|
8109
|
+
// NOSONAR
|
|
8110
|
+
);
|
|
8111
|
+
return u?.valueDateTime ?? u?.valueDate;
|
|
8112
|
+
})(),
|
|
8101
8113
|
fhirResource: n
|
|
8102
8114
|
};
|
|
8103
8115
|
});
|
|
@@ -8110,7 +8122,7 @@ async function db(t, e, r, n = !1) {
|
|
|
8110
8122
|
r,
|
|
8111
8123
|
n
|
|
8112
8124
|
);
|
|
8113
|
-
return
|
|
8125
|
+
return Sm(s);
|
|
8114
8126
|
}
|
|
8115
8127
|
async function fb() {
|
|
8116
8128
|
return await H(
|
|
@@ -8194,17 +8206,17 @@ async function vb(t) {
|
|
|
8194
8206
|
const e = $m(t);
|
|
8195
8207
|
return await H(e);
|
|
8196
8208
|
}
|
|
8197
|
-
async function
|
|
8209
|
+
async function Tb(t, e) {
|
|
8198
8210
|
const r = Dm(t);
|
|
8199
8211
|
return await ve(r, e);
|
|
8200
8212
|
}
|
|
8201
|
-
const
|
|
8213
|
+
const Rb = [
|
|
8202
8214
|
"preliminary",
|
|
8203
8215
|
"final",
|
|
8204
8216
|
"amended",
|
|
8205
8217
|
"corrected",
|
|
8206
8218
|
"appended"
|
|
8207
|
-
],
|
|
8219
|
+
], Sb = [
|
|
8208
8220
|
"registered",
|
|
8209
8221
|
"unknown",
|
|
8210
8222
|
"partial"
|
|
@@ -8268,7 +8280,7 @@ const Sb = [
|
|
|
8268
8280
|
function jm(t) {
|
|
8269
8281
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
8270
8282
|
}
|
|
8271
|
-
var Gt = { exports: {} },
|
|
8283
|
+
var Gt = { exports: {} }, Sn = {}, Fe = {}, We = {}, On = {}, An = {}, Nn = {}, go;
|
|
8272
8284
|
function Br() {
|
|
8273
8285
|
return go || (go = 1, (function(t) {
|
|
8274
8286
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.regexpCode = t.getEsmExportName = t.getProperty = t.safeStringify = t.stringify = t.strConcat = t.addCodeArg = t.str = t._ = t.nil = t._Code = t.Name = t.IDENTIFIER = t._CodeOrName = void 0;
|
|
@@ -8307,28 +8319,28 @@ function Br() {
|
|
|
8307
8319
|
}
|
|
8308
8320
|
get str() {
|
|
8309
8321
|
var p;
|
|
8310
|
-
return (p = this._str) !== null && p !== void 0 ? p : this._str = this._items.reduce((b,
|
|
8322
|
+
return (p = this._str) !== null && p !== void 0 ? p : this._str = this._items.reduce((b, S) => `${b}${S}`, "");
|
|
8311
8323
|
}
|
|
8312
8324
|
get names() {
|
|
8313
8325
|
var p;
|
|
8314
|
-
return (p = this._names) !== null && p !== void 0 ? p : this._names = this._items.reduce((b,
|
|
8326
|
+
return (p = this._names) !== null && p !== void 0 ? p : this._names = this._items.reduce((b, S) => (S instanceof r && (b[S.str] = (b[S.str] || 0) + 1), b), {});
|
|
8315
8327
|
}
|
|
8316
8328
|
}
|
|
8317
8329
|
t._Code = n, t.nil = new n("");
|
|
8318
8330
|
function s(g, ...p) {
|
|
8319
8331
|
const b = [g[0]];
|
|
8320
|
-
let
|
|
8321
|
-
for (;
|
|
8322
|
-
i(b, p[
|
|
8332
|
+
let S = 0;
|
|
8333
|
+
for (; S < p.length; )
|
|
8334
|
+
i(b, p[S]), b.push(g[++S]);
|
|
8323
8335
|
return new n(b);
|
|
8324
8336
|
}
|
|
8325
8337
|
t._ = s;
|
|
8326
8338
|
const o = new n("+");
|
|
8327
8339
|
function a(g, ...p) {
|
|
8328
8340
|
const b = [v(g[0])];
|
|
8329
|
-
let
|
|
8330
|
-
for (;
|
|
8331
|
-
b.push(o), i(b, p[
|
|
8341
|
+
let S = 0;
|
|
8342
|
+
for (; S < p.length; )
|
|
8343
|
+
b.push(o), i(b, p[S]), b.push(o, v(g[++S]));
|
|
8332
8344
|
return c(b), new n(b);
|
|
8333
8345
|
}
|
|
8334
8346
|
t.str = a;
|
|
@@ -8375,10 +8387,10 @@ function Br() {
|
|
|
8375
8387
|
return JSON.stringify(g).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
8376
8388
|
}
|
|
8377
8389
|
t.safeStringify = v;
|
|
8378
|
-
function
|
|
8390
|
+
function R(g) {
|
|
8379
8391
|
return typeof g == "string" && t.IDENTIFIER.test(g) ? new n(`.${g}`) : s`[${g}]`;
|
|
8380
8392
|
}
|
|
8381
|
-
t.getProperty =
|
|
8393
|
+
t.getProperty = R;
|
|
8382
8394
|
function _(g) {
|
|
8383
8395
|
if (typeof g == "string" && t.IDENTIFIER.test(g))
|
|
8384
8396
|
return new n(`${g}`);
|
|
@@ -8455,15 +8467,15 @@ function wo() {
|
|
|
8455
8467
|
var h;
|
|
8456
8468
|
if (l.ref === void 0)
|
|
8457
8469
|
throw new Error("CodeGen: ref must be passed in value");
|
|
8458
|
-
const y = this.toName(u), { prefix: v } = y,
|
|
8470
|
+
const y = this.toName(u), { prefix: v } = y, R = (h = l.key) !== null && h !== void 0 ? h : l.ref;
|
|
8459
8471
|
let _ = this._values[v];
|
|
8460
8472
|
if (_) {
|
|
8461
|
-
const p = _.get(
|
|
8473
|
+
const p = _.get(R);
|
|
8462
8474
|
if (p)
|
|
8463
8475
|
return p;
|
|
8464
8476
|
} else
|
|
8465
8477
|
_ = this._values[v] = /* @__PURE__ */ new Map();
|
|
8466
|
-
_.set(
|
|
8478
|
+
_.set(R, y);
|
|
8467
8479
|
const f = this._scope[v] || (this._scope[v] = []), g = f.length;
|
|
8468
8480
|
return f[g] = l.ref, y.setValue(l, { property: v, itemIndex: g }), y;
|
|
8469
8481
|
}
|
|
@@ -8488,11 +8500,11 @@ function wo() {
|
|
|
8488
8500
|
}
|
|
8489
8501
|
_reduceValues(u, l, h = {}, y) {
|
|
8490
8502
|
let v = e.nil;
|
|
8491
|
-
for (const
|
|
8492
|
-
const _ = u[
|
|
8503
|
+
for (const R in u) {
|
|
8504
|
+
const _ = u[R];
|
|
8493
8505
|
if (!_)
|
|
8494
8506
|
continue;
|
|
8495
|
-
const f = h[
|
|
8507
|
+
const f = h[R] = h[R] || /* @__PURE__ */ new Map();
|
|
8496
8508
|
_.forEach((g) => {
|
|
8497
8509
|
if (f.has(g))
|
|
8498
8510
|
return;
|
|
@@ -8679,17 +8691,17 @@ function te() {
|
|
|
8679
8691
|
return this.nodes.reduce((E, O) => k(E, O.names), {});
|
|
8680
8692
|
}
|
|
8681
8693
|
}
|
|
8682
|
-
class
|
|
8694
|
+
class R extends v {
|
|
8683
8695
|
render(E) {
|
|
8684
8696
|
return "{" + E._n + super.render(E) + "}" + E._n;
|
|
8685
8697
|
}
|
|
8686
8698
|
}
|
|
8687
8699
|
class _ extends v {
|
|
8688
8700
|
}
|
|
8689
|
-
class f extends
|
|
8701
|
+
class f extends R {
|
|
8690
8702
|
}
|
|
8691
8703
|
f.kind = "else";
|
|
8692
|
-
class g extends
|
|
8704
|
+
class g extends R {
|
|
8693
8705
|
constructor(E, O) {
|
|
8694
8706
|
super(O), this.condition = E;
|
|
8695
8707
|
}
|
|
@@ -8723,7 +8735,7 @@ function te() {
|
|
|
8723
8735
|
}
|
|
8724
8736
|
}
|
|
8725
8737
|
g.kind = "if";
|
|
8726
|
-
class p extends
|
|
8738
|
+
class p extends R {
|
|
8727
8739
|
}
|
|
8728
8740
|
p.kind = "for";
|
|
8729
8741
|
class b extends p {
|
|
@@ -8741,7 +8753,7 @@ function te() {
|
|
|
8741
8753
|
return k(super.names, this.iteration.names);
|
|
8742
8754
|
}
|
|
8743
8755
|
}
|
|
8744
|
-
class
|
|
8756
|
+
class S extends p {
|
|
8745
8757
|
constructor(E, O, x, z) {
|
|
8746
8758
|
super(), this.varKind = E, this.name = O, this.from = x, this.to = z;
|
|
8747
8759
|
}
|
|
@@ -8769,7 +8781,7 @@ function te() {
|
|
|
8769
8781
|
return k(super.names, this.iterable.names);
|
|
8770
8782
|
}
|
|
8771
8783
|
}
|
|
8772
|
-
class m extends
|
|
8784
|
+
class m extends R {
|
|
8773
8785
|
constructor(E, O, x) {
|
|
8774
8786
|
super(), this.name = E, this.args = O, this.async = x;
|
|
8775
8787
|
}
|
|
@@ -8784,7 +8796,7 @@ function te() {
|
|
|
8784
8796
|
}
|
|
8785
8797
|
}
|
|
8786
8798
|
w.kind = "return";
|
|
8787
|
-
class
|
|
8799
|
+
class T extends R {
|
|
8788
8800
|
render(E) {
|
|
8789
8801
|
let O = "try" + super.render(E);
|
|
8790
8802
|
return this.catch && (O += this.catch.render(E)), this.finally && (O += this.finally.render(E)), O;
|
|
@@ -8802,7 +8814,7 @@ function te() {
|
|
|
8802
8814
|
return this.catch && k(E, this.catch.names), this.finally && k(E, this.finally.names), E;
|
|
8803
8815
|
}
|
|
8804
8816
|
}
|
|
8805
|
-
class I extends
|
|
8817
|
+
class I extends R {
|
|
8806
8818
|
constructor(E) {
|
|
8807
8819
|
super(), this.error = E;
|
|
8808
8820
|
}
|
|
@@ -8811,7 +8823,7 @@ function te() {
|
|
|
8811
8823
|
}
|
|
8812
8824
|
}
|
|
8813
8825
|
I.kind = "catch";
|
|
8814
|
-
class L extends
|
|
8826
|
+
class L extends R {
|
|
8815
8827
|
render(E) {
|
|
8816
8828
|
return "finally" + super.render(E);
|
|
8817
8829
|
}
|
|
@@ -8916,7 +8928,7 @@ function te() {
|
|
|
8916
8928
|
// `for` statement for a range of values
|
|
8917
8929
|
forRange(E, O, x, z, j = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
8918
8930
|
const Z = this._scope.toName(E);
|
|
8919
|
-
return this._for(new
|
|
8931
|
+
return this._for(new S(j, Z, O, x), () => z(Z));
|
|
8920
8932
|
}
|
|
8921
8933
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
8922
8934
|
forOf(E, O, x, z = r.varKinds.const) {
|
|
@@ -8960,7 +8972,7 @@ function te() {
|
|
|
8960
8972
|
try(E, O, x) {
|
|
8961
8973
|
if (!O && !x)
|
|
8962
8974
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
8963
|
-
const z = new
|
|
8975
|
+
const z = new T();
|
|
8964
8976
|
if (this._blockNode(z), this.code(E), O) {
|
|
8965
8977
|
const j = this.name("e");
|
|
8966
8978
|
this._currNode = z.catch = new I(j), O(j);
|
|
@@ -9093,12 +9105,12 @@ function se() {
|
|
|
9093
9105
|
}
|
|
9094
9106
|
X.alwaysValidSchema = n;
|
|
9095
9107
|
function s(d, m = d.schema) {
|
|
9096
|
-
const { opts: w, self:
|
|
9108
|
+
const { opts: w, self: T } = d;
|
|
9097
9109
|
if (!w.strictSchema || typeof m == "boolean")
|
|
9098
9110
|
return;
|
|
9099
|
-
const I =
|
|
9111
|
+
const I = T.RULES.keywords;
|
|
9100
9112
|
for (const L in m)
|
|
9101
|
-
I[L] ||
|
|
9113
|
+
I[L] || S(d, `unknown keyword: "${L}"`);
|
|
9102
9114
|
}
|
|
9103
9115
|
X.checkUnknownRules = s;
|
|
9104
9116
|
function o(d, m) {
|
|
@@ -9119,14 +9131,14 @@ function se() {
|
|
|
9119
9131
|
return !1;
|
|
9120
9132
|
}
|
|
9121
9133
|
X.schemaHasRulesButRef = a;
|
|
9122
|
-
function i({ topSchemaRef: d, schemaPath: m }, w,
|
|
9134
|
+
function i({ topSchemaRef: d, schemaPath: m }, w, T, I) {
|
|
9123
9135
|
if (!I) {
|
|
9124
9136
|
if (typeof w == "number" || typeof w == "boolean")
|
|
9125
9137
|
return w;
|
|
9126
9138
|
if (typeof w == "string")
|
|
9127
9139
|
return (0, t._)`${w}`;
|
|
9128
9140
|
}
|
|
9129
|
-
return (0, t._)`${d}${m}${(0, t.getProperty)(
|
|
9141
|
+
return (0, t._)`${d}${m}${(0, t.getProperty)(T)}`;
|
|
9130
9142
|
}
|
|
9131
9143
|
X.schemaRefOrVal = i;
|
|
9132
9144
|
function c(d) {
|
|
@@ -9153,10 +9165,10 @@ function se() {
|
|
|
9153
9165
|
m(d);
|
|
9154
9166
|
}
|
|
9155
9167
|
X.eachItem = y;
|
|
9156
|
-
function v({ mergeNames: d, mergeToName: m, mergeValues: w, resultToName:
|
|
9168
|
+
function v({ mergeNames: d, mergeToName: m, mergeValues: w, resultToName: T }) {
|
|
9157
9169
|
return (I, L, N, k) => {
|
|
9158
9170
|
const B = N === void 0 ? L : N instanceof t.Name ? (L instanceof t.Name ? d(I, L, N) : m(I, L, N), N) : L instanceof t.Name ? (m(I, N, L), L) : w(L, N);
|
|
9159
|
-
return k === t.Name && !(B instanceof t.Name) ?
|
|
9171
|
+
return k === t.Name && !(B instanceof t.Name) ? T(I, B) : B;
|
|
9160
9172
|
};
|
|
9161
9173
|
}
|
|
9162
9174
|
X.mergeEvaluated = {
|
|
@@ -9168,7 +9180,7 @@ function se() {
|
|
|
9168
9180
|
m === !0 ? d.assign(w, !0) : (d.assign(w, (0, t._)`${w} || {}`), _(d, w, m));
|
|
9169
9181
|
}),
|
|
9170
9182
|
mergeValues: (d, m) => d === !0 ? !0 : { ...d, ...m },
|
|
9171
|
-
resultToName:
|
|
9183
|
+
resultToName: R
|
|
9172
9184
|
}),
|
|
9173
9185
|
items: v({
|
|
9174
9186
|
mergeNames: (d, m, w) => d.if((0, t._)`${w} !== true && ${m} !== undefined`, () => d.assign(w, (0, t._)`${m} === true ? true : ${w} > ${m} ? ${w} : ${m}`)),
|
|
@@ -9177,15 +9189,15 @@ function se() {
|
|
|
9177
9189
|
resultToName: (d, m) => d.var("items", m)
|
|
9178
9190
|
})
|
|
9179
9191
|
};
|
|
9180
|
-
function
|
|
9192
|
+
function R(d, m) {
|
|
9181
9193
|
if (m === !0)
|
|
9182
9194
|
return d.var("props", !0);
|
|
9183
9195
|
const w = d.var("props", (0, t._)`{}`);
|
|
9184
9196
|
return m !== void 0 && _(d, w, m), w;
|
|
9185
9197
|
}
|
|
9186
|
-
X.evaluatedPropsToName =
|
|
9198
|
+
X.evaluatedPropsToName = R;
|
|
9187
9199
|
function _(d, m, w) {
|
|
9188
|
-
Object.keys(w).forEach((
|
|
9200
|
+
Object.keys(w).forEach((T) => d.assign((0, t._)`${m}${(0, t.getProperty)(T)}`, !0));
|
|
9189
9201
|
}
|
|
9190
9202
|
X.setEvaluated = _;
|
|
9191
9203
|
const f = {};
|
|
@@ -9202,20 +9214,20 @@ function se() {
|
|
|
9202
9214
|
})(p || (X.Type = p = {}));
|
|
9203
9215
|
function b(d, m, w) {
|
|
9204
9216
|
if (d instanceof t.Name) {
|
|
9205
|
-
const
|
|
9206
|
-
return w ?
|
|
9217
|
+
const T = m === p.Num;
|
|
9218
|
+
return w ? T ? (0, t._)`"[" + ${d} + "]"` : (0, t._)`"['" + ${d} + "']"` : T ? (0, t._)`"/" + ${d}` : (0, t._)`"/" + ${d}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
9207
9219
|
}
|
|
9208
9220
|
return w ? (0, t.getProperty)(d).toString() : "/" + l(d);
|
|
9209
9221
|
}
|
|
9210
9222
|
X.getErrorPath = b;
|
|
9211
|
-
function
|
|
9223
|
+
function S(d, m, w = d.opts.strictSchema) {
|
|
9212
9224
|
if (w) {
|
|
9213
9225
|
if (m = `strict mode: ${m}`, w === !0)
|
|
9214
9226
|
throw new Error(m);
|
|
9215
9227
|
d.self.logger.warn(m);
|
|
9216
9228
|
}
|
|
9217
9229
|
}
|
|
9218
|
-
return X.checkStrictMode =
|
|
9230
|
+
return X.checkStrictMode = S, X;
|
|
9219
9231
|
}
|
|
9220
9232
|
var Kt = {}, _o;
|
|
9221
9233
|
function Ke() {
|
|
@@ -9263,24 +9275,24 @@ function sn() {
|
|
|
9263
9275
|
message: ({ keyword: f, schemaType: g }) => g ? (0, e.str)`"${f}" keyword must be ${g} ($data)` : (0, e.str)`"${f}" keyword is invalid ($data)`
|
|
9264
9276
|
};
|
|
9265
9277
|
function s(f, g = t.keywordError, p, b) {
|
|
9266
|
-
const { it:
|
|
9267
|
-
b ?? (m || w) ? c(d,
|
|
9278
|
+
const { it: S } = f, { gen: d, compositeRule: m, allErrors: w } = S, T = h(f, g, p);
|
|
9279
|
+
b ?? (m || w) ? c(d, T) : u(S, (0, e._)`[${T}]`);
|
|
9268
9280
|
}
|
|
9269
9281
|
t.reportError = s;
|
|
9270
9282
|
function o(f, g = t.keywordError, p) {
|
|
9271
|
-
const { it: b } = f, { gen:
|
|
9272
|
-
c(
|
|
9283
|
+
const { it: b } = f, { gen: S, compositeRule: d, allErrors: m } = b, w = h(f, g, p);
|
|
9284
|
+
c(S, w), d || m || u(b, n.default.vErrors);
|
|
9273
9285
|
}
|
|
9274
9286
|
t.reportExtraError = o;
|
|
9275
9287
|
function a(f, g) {
|
|
9276
9288
|
f.assign(n.default.errors, g), f.if((0, e._)`${n.default.vErrors} !== null`, () => f.if(g, () => f.assign((0, e._)`${n.default.vErrors}.length`, g), () => f.assign(n.default.vErrors, null)));
|
|
9277
9289
|
}
|
|
9278
9290
|
t.resetErrorsCount = a;
|
|
9279
|
-
function i({ gen: f, keyword: g, schemaValue: p, data: b, errsCount:
|
|
9280
|
-
if (
|
|
9291
|
+
function i({ gen: f, keyword: g, schemaValue: p, data: b, errsCount: S, it: d }) {
|
|
9292
|
+
if (S === void 0)
|
|
9281
9293
|
throw new Error("ajv implementation error");
|
|
9282
9294
|
const m = f.name("err");
|
|
9283
|
-
f.forRange("i",
|
|
9295
|
+
f.forRange("i", S, n.default.errors, (w) => {
|
|
9284
9296
|
f.const(m, (0, e._)`${n.default.vErrors}[${w}]`), f.if((0, e._)`${m}.instancePath === undefined`, () => f.assign((0, e._)`${m}.instancePath`, (0, e.strConcat)(n.default.instancePath, d.errorPath))), f.assign((0, e._)`${m}.schemaPath`, (0, e.str)`${d.errSchemaPath}/${g}`), d.opts.verbose && (f.assign((0, e._)`${m}.schema`, p), f.assign((0, e._)`${m}.data`, b));
|
|
9285
9297
|
});
|
|
9286
9298
|
}
|
|
@@ -9290,8 +9302,8 @@ function sn() {
|
|
|
9290
9302
|
f.if((0, e._)`${n.default.vErrors} === null`, () => f.assign(n.default.vErrors, (0, e._)`[${p}]`), (0, e._)`${n.default.vErrors}.push(${p})`), f.code((0, e._)`${n.default.errors}++`);
|
|
9291
9303
|
}
|
|
9292
9304
|
function u(f, g) {
|
|
9293
|
-
const { gen: p, validateName: b, schemaEnv:
|
|
9294
|
-
|
|
9305
|
+
const { gen: p, validateName: b, schemaEnv: S } = f;
|
|
9306
|
+
S.$async ? p.throw((0, e._)`new ${f.ValidationError}(${g})`) : (p.assign((0, e._)`${b}.errors`, g), p.return(!1));
|
|
9295
9307
|
}
|
|
9296
9308
|
const l = {
|
|
9297
9309
|
keyword: new e.Name("keyword"),
|
|
@@ -9308,9 +9320,9 @@ function sn() {
|
|
|
9308
9320
|
return b === !1 ? (0, e._)`{}` : y(f, g, p);
|
|
9309
9321
|
}
|
|
9310
9322
|
function y(f, g, p = {}) {
|
|
9311
|
-
const { gen: b, it:
|
|
9312
|
-
v(
|
|
9313
|
-
|
|
9323
|
+
const { gen: b, it: S } = f, d = [
|
|
9324
|
+
v(S, p),
|
|
9325
|
+
R(f, p)
|
|
9314
9326
|
];
|
|
9315
9327
|
return _(f, g, d), b.object(...d);
|
|
9316
9328
|
}
|
|
@@ -9318,20 +9330,20 @@ function sn() {
|
|
|
9318
9330
|
const p = g ? (0, e.str)`${f}${(0, r.getErrorPath)(g, r.Type.Str)}` : f;
|
|
9319
9331
|
return [n.default.instancePath, (0, e.strConcat)(n.default.instancePath, p)];
|
|
9320
9332
|
}
|
|
9321
|
-
function
|
|
9322
|
-
let
|
|
9323
|
-
return p && (
|
|
9333
|
+
function R({ keyword: f, it: { errSchemaPath: g } }, { schemaPath: p, parentSchema: b }) {
|
|
9334
|
+
let S = b ? g : (0, e.str)`${g}/${f}`;
|
|
9335
|
+
return p && (S = (0, e.str)`${S}${(0, r.getErrorPath)(p, r.Type.Str)}`), [l.schemaPath, S];
|
|
9324
9336
|
}
|
|
9325
9337
|
function _(f, { params: g, message: p }, b) {
|
|
9326
|
-
const { keyword:
|
|
9327
|
-
b.push([l.keyword,
|
|
9338
|
+
const { keyword: S, data: d, schemaValue: m, it: w } = f, { opts: T, propertyName: I, topSchemaRef: L, schemaPath: N } = w;
|
|
9339
|
+
b.push([l.keyword, S], [l.params, typeof g == "function" ? g(f) : g || (0, e._)`{}`]), T.messages && b.push([l.message, typeof p == "function" ? p(f) : p]), T.verbose && b.push([l.schema, m], [l.parentSchema, (0, e._)`${L}${N}`], [n.default.data, d]), I && b.push([l.propertyName, I]);
|
|
9328
9340
|
}
|
|
9329
9341
|
})(On)), On;
|
|
9330
9342
|
}
|
|
9331
|
-
var
|
|
9343
|
+
var To;
|
|
9332
9344
|
function Vm() {
|
|
9333
|
-
if (
|
|
9334
|
-
|
|
9345
|
+
if (To) return We;
|
|
9346
|
+
To = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.boolOrEmptySchema = We.topBoolOrEmptySchema = void 0;
|
|
9335
9347
|
const t = sn(), e = te(), r = Ke(), n = {
|
|
9336
9348
|
message: "boolean schema is false"
|
|
9337
9349
|
};
|
|
@@ -9360,10 +9372,10 @@ function Vm() {
|
|
|
9360
9372
|
}
|
|
9361
9373
|
return We;
|
|
9362
9374
|
}
|
|
9363
|
-
var _e = {}, Je = {},
|
|
9375
|
+
var _e = {}, Je = {}, Ro;
|
|
9364
9376
|
function ki() {
|
|
9365
|
-
if (
|
|
9366
|
-
|
|
9377
|
+
if (Ro) return Je;
|
|
9378
|
+
Ro = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.getRules = Je.isJSONType = void 0;
|
|
9367
9379
|
const t = ["string", "number", "integer", "boolean", "null", "object", "array"], e = new Set(t);
|
|
9368
9380
|
function r(s) {
|
|
9369
9381
|
return typeof s == "string" && e.has(s);
|
|
@@ -9386,10 +9398,10 @@ function ki() {
|
|
|
9386
9398
|
}
|
|
9387
9399
|
return Je.getRules = n, Je;
|
|
9388
9400
|
}
|
|
9389
|
-
var je = {},
|
|
9401
|
+
var je = {}, So;
|
|
9390
9402
|
function Mi() {
|
|
9391
|
-
if (
|
|
9392
|
-
|
|
9403
|
+
if (So) return je;
|
|
9404
|
+
So = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.shouldUseRule = je.shouldUseGroup = je.schemaHasRulesForType = void 0;
|
|
9393
9405
|
function t({ schema: n, self: s }, o) {
|
|
9394
9406
|
const a = s.RULES.types[o];
|
|
9395
9407
|
return a && a !== !0 && e(n, a);
|
|
@@ -9435,24 +9447,24 @@ function zr() {
|
|
|
9435
9447
|
}
|
|
9436
9448
|
_e.getJSONTypes = i;
|
|
9437
9449
|
function c(p, b) {
|
|
9438
|
-
const { gen:
|
|
9439
|
-
if (
|
|
9440
|
-
const I =
|
|
9441
|
-
|
|
9450
|
+
const { gen: S, data: d, opts: m } = p, w = l(b, m.coerceTypes), T = b.length > 0 && !(w.length === 0 && b.length === 1 && (0, e.schemaHasRulesForType)(p, b[0]));
|
|
9451
|
+
if (T) {
|
|
9452
|
+
const I = R(b, d, m.strictNumbers, o.Wrong);
|
|
9453
|
+
S.if(I, () => {
|
|
9442
9454
|
w.length ? h(p, b, w) : f(p);
|
|
9443
9455
|
});
|
|
9444
9456
|
}
|
|
9445
|
-
return
|
|
9457
|
+
return T;
|
|
9446
9458
|
}
|
|
9447
9459
|
_e.coerceAndCheckDataType = c;
|
|
9448
9460
|
const u = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
9449
9461
|
function l(p, b) {
|
|
9450
|
-
return b ? p.filter((
|
|
9462
|
+
return b ? p.filter((S) => u.has(S) || b === "array" && S === "array") : [];
|
|
9451
9463
|
}
|
|
9452
|
-
function h(p, b,
|
|
9453
|
-
const { gen: d, data: m, opts: w } = p,
|
|
9454
|
-
w.coerceTypes === "array" && d.if((0, n._)`${
|
|
9455
|
-
for (const N of
|
|
9464
|
+
function h(p, b, S) {
|
|
9465
|
+
const { gen: d, data: m, opts: w } = p, T = d.let("dataType", (0, n._)`typeof ${m}`), I = d.let("coerced", (0, n._)`undefined`);
|
|
9466
|
+
w.coerceTypes === "array" && d.if((0, n._)`${T} == 'object' && Array.isArray(${m}) && ${m}.length == 1`, () => d.assign(m, (0, n._)`${m}[0]`).assign(T, (0, n._)`typeof ${m}`).if(R(b, m, w.strictNumbers), () => d.assign(I, m))), d.if((0, n._)`${I} !== undefined`);
|
|
9467
|
+
for (const N of S)
|
|
9456
9468
|
(u.has(N) || N === "array" && w.coerceTypes === "array") && L(N);
|
|
9457
9469
|
d.else(), f(p), d.endIf(), d.if((0, n._)`${I} !== undefined`, () => {
|
|
9458
9470
|
d.assign(m, I), y(p, I);
|
|
@@ -9460,15 +9472,15 @@ function zr() {
|
|
|
9460
9472
|
function L(N) {
|
|
9461
9473
|
switch (N) {
|
|
9462
9474
|
case "string":
|
|
9463
|
-
d.elseIf((0, n._)`${
|
|
9475
|
+
d.elseIf((0, n._)`${T} == "number" || ${T} == "boolean"`).assign(I, (0, n._)`"" + ${m}`).elseIf((0, n._)`${m} === null`).assign(I, (0, n._)`""`);
|
|
9464
9476
|
return;
|
|
9465
9477
|
case "number":
|
|
9466
|
-
d.elseIf((0, n._)`${
|
|
9467
|
-
|| (${
|
|
9478
|
+
d.elseIf((0, n._)`${T} == "boolean" || ${m} === null
|
|
9479
|
+
|| (${T} == "string" && ${m} && ${m} == +${m})`).assign(I, (0, n._)`+${m}`);
|
|
9468
9480
|
return;
|
|
9469
9481
|
case "integer":
|
|
9470
|
-
d.elseIf((0, n._)`${
|
|
9471
|
-
|| (${
|
|
9482
|
+
d.elseIf((0, n._)`${T} === "boolean" || ${m} === null
|
|
9483
|
+
|| (${T} === "string" && ${m} && ${m} == +${m} && !(${m} % 1))`).assign(I, (0, n._)`+${m}`);
|
|
9472
9484
|
return;
|
|
9473
9485
|
case "boolean":
|
|
9474
9486
|
d.elseIf((0, n._)`${m} === "false" || ${m} === 0 || ${m} === null`).assign(I, !1).elseIf((0, n._)`${m} === "true" || ${m} === 1`).assign(I, !0);
|
|
@@ -9477,15 +9489,15 @@ function zr() {
|
|
|
9477
9489
|
d.elseIf((0, n._)`${m} === "" || ${m} === 0 || ${m} === false`), d.assign(I, null);
|
|
9478
9490
|
return;
|
|
9479
9491
|
case "array":
|
|
9480
|
-
d.elseIf((0, n._)`${
|
|
9481
|
-
|| ${
|
|
9492
|
+
d.elseIf((0, n._)`${T} === "string" || ${T} === "number"
|
|
9493
|
+
|| ${T} === "boolean" || ${m} === null`).assign(I, (0, n._)`[${m}]`);
|
|
9482
9494
|
}
|
|
9483
9495
|
}
|
|
9484
9496
|
}
|
|
9485
|
-
function y({ gen: p, parentData: b, parentDataProperty:
|
|
9486
|
-
p.if((0, n._)`${b} !== undefined`, () => p.assign((0, n._)`${b}[${
|
|
9497
|
+
function y({ gen: p, parentData: b, parentDataProperty: S }, d) {
|
|
9498
|
+
p.if((0, n._)`${b} !== undefined`, () => p.assign((0, n._)`${b}[${S}]`, d));
|
|
9487
9499
|
}
|
|
9488
|
-
function v(p, b,
|
|
9500
|
+
function v(p, b, S, d = o.Correct) {
|
|
9489
9501
|
const m = d === o.Correct ? n.operators.EQ : n.operators.NEQ;
|
|
9490
9502
|
let w;
|
|
9491
9503
|
switch (p) {
|
|
@@ -9498,36 +9510,36 @@ function zr() {
|
|
|
9498
9510
|
w = (0, n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;
|
|
9499
9511
|
break;
|
|
9500
9512
|
case "integer":
|
|
9501
|
-
w =
|
|
9513
|
+
w = T((0, n._)`!(${b} % 1) && !isNaN(${b})`);
|
|
9502
9514
|
break;
|
|
9503
9515
|
case "number":
|
|
9504
|
-
w =
|
|
9516
|
+
w = T();
|
|
9505
9517
|
break;
|
|
9506
9518
|
default:
|
|
9507
9519
|
return (0, n._)`typeof ${b} ${m} ${p}`;
|
|
9508
9520
|
}
|
|
9509
9521
|
return d === o.Correct ? w : (0, n.not)(w);
|
|
9510
|
-
function
|
|
9511
|
-
return (0, n.and)((0, n._)`typeof ${b} == "number"`, I,
|
|
9522
|
+
function T(I = n.nil) {
|
|
9523
|
+
return (0, n.and)((0, n._)`typeof ${b} == "number"`, I, S ? (0, n._)`isFinite(${b})` : n.nil);
|
|
9512
9524
|
}
|
|
9513
9525
|
}
|
|
9514
9526
|
_e.checkDataType = v;
|
|
9515
|
-
function
|
|
9527
|
+
function R(p, b, S, d) {
|
|
9516
9528
|
if (p.length === 1)
|
|
9517
|
-
return v(p[0], b,
|
|
9529
|
+
return v(p[0], b, S, d);
|
|
9518
9530
|
let m;
|
|
9519
9531
|
const w = (0, s.toHash)(p);
|
|
9520
9532
|
if (w.array && w.object) {
|
|
9521
|
-
const
|
|
9522
|
-
m = w.null ?
|
|
9533
|
+
const T = (0, n._)`typeof ${b} != "object"`;
|
|
9534
|
+
m = w.null ? T : (0, n._)`!${b} || ${T}`, delete w.null, delete w.array, delete w.object;
|
|
9523
9535
|
} else
|
|
9524
9536
|
m = n.nil;
|
|
9525
9537
|
w.number && delete w.integer;
|
|
9526
|
-
for (const
|
|
9527
|
-
m = (0, n.and)(m, v(
|
|
9538
|
+
for (const T in w)
|
|
9539
|
+
m = (0, n.and)(m, v(T, b, S, d));
|
|
9528
9540
|
return m;
|
|
9529
9541
|
}
|
|
9530
|
-
_e.checkDataTypes =
|
|
9542
|
+
_e.checkDataTypes = R;
|
|
9531
9543
|
const _ = {
|
|
9532
9544
|
message: ({ schema: p }) => `must be ${p}`,
|
|
9533
9545
|
params: ({ schema: p, schemaValue: b }) => typeof p == "string" ? (0, n._)`{type: ${p}}` : (0, n._)`{type: ${b}}`
|
|
@@ -9538,11 +9550,11 @@ function zr() {
|
|
|
9538
9550
|
}
|
|
9539
9551
|
_e.reportTypeError = f;
|
|
9540
9552
|
function g(p) {
|
|
9541
|
-
const { gen: b, data:
|
|
9553
|
+
const { gen: b, data: S, schema: d } = p, m = (0, s.schemaRefOrVal)(p, d, "type");
|
|
9542
9554
|
return {
|
|
9543
9555
|
gen: b,
|
|
9544
9556
|
keyword: "type",
|
|
9545
|
-
data:
|
|
9557
|
+
data: S,
|
|
9546
9558
|
schema: d.type,
|
|
9547
9559
|
schemaCode: m,
|
|
9548
9560
|
schemaValue: m,
|
|
@@ -9586,14 +9598,14 @@ function ke() {
|
|
|
9586
9598
|
No = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.validateUnion = ce.validateArray = ce.usePattern = ce.callValidateCode = ce.schemaProperties = ce.allSchemaProperties = ce.noPropertyInData = ce.propertyInData = ce.isOwnProperty = ce.hasPropFunc = ce.reportMissingProp = ce.checkMissingProp = ce.checkReportMissingProp = void 0;
|
|
9587
9599
|
const t = te(), e = se(), r = Ke(), n = se();
|
|
9588
9600
|
function s(p, b) {
|
|
9589
|
-
const { gen:
|
|
9590
|
-
|
|
9601
|
+
const { gen: S, data: d, it: m } = p;
|
|
9602
|
+
S.if(l(S, d, b, m.opts.ownProperties), () => {
|
|
9591
9603
|
p.setParams({ missingProperty: (0, t._)`${b}` }, !0), p.error();
|
|
9592
9604
|
});
|
|
9593
9605
|
}
|
|
9594
9606
|
ce.checkReportMissingProp = s;
|
|
9595
|
-
function o({ gen: p, data: b, it: { opts:
|
|
9596
|
-
return (0, t.or)(...d.map((w) => (0, t.and)(l(p, b, w,
|
|
9607
|
+
function o({ gen: p, data: b, it: { opts: S } }, d, m) {
|
|
9608
|
+
return (0, t.or)(...d.map((w) => (0, t.and)(l(p, b, w, S.ownProperties), (0, t._)`${m} = ${w}`)));
|
|
9597
9609
|
}
|
|
9598
9610
|
ce.checkMissingProp = o;
|
|
9599
9611
|
function a(p, b) {
|
|
@@ -9608,18 +9620,18 @@ function ke() {
|
|
|
9608
9620
|
});
|
|
9609
9621
|
}
|
|
9610
9622
|
ce.hasPropFunc = i;
|
|
9611
|
-
function c(p, b,
|
|
9612
|
-
return (0, t._)`${i(p)}.call(${b}, ${
|
|
9623
|
+
function c(p, b, S) {
|
|
9624
|
+
return (0, t._)`${i(p)}.call(${b}, ${S})`;
|
|
9613
9625
|
}
|
|
9614
9626
|
ce.isOwnProperty = c;
|
|
9615
|
-
function u(p, b,
|
|
9616
|
-
const m = (0, t._)`${b}${(0, t.getProperty)(
|
|
9617
|
-
return d ? (0, t._)`${m} && ${c(p, b,
|
|
9627
|
+
function u(p, b, S, d) {
|
|
9628
|
+
const m = (0, t._)`${b}${(0, t.getProperty)(S)} !== undefined`;
|
|
9629
|
+
return d ? (0, t._)`${m} && ${c(p, b, S)}` : m;
|
|
9618
9630
|
}
|
|
9619
9631
|
ce.propertyInData = u;
|
|
9620
|
-
function l(p, b,
|
|
9621
|
-
const m = (0, t._)`${b}${(0, t.getProperty)(
|
|
9622
|
-
return d ? (0, t.or)(m, (0, t.not)(c(p, b,
|
|
9632
|
+
function l(p, b, S, d) {
|
|
9633
|
+
const m = (0, t._)`${b}${(0, t.getProperty)(S)} === undefined`;
|
|
9634
|
+
return d ? (0, t.or)(m, (0, t.not)(c(p, b, S))) : m;
|
|
9623
9635
|
}
|
|
9624
9636
|
ce.noPropertyInData = l;
|
|
9625
9637
|
function h(p) {
|
|
@@ -9627,40 +9639,40 @@ function ke() {
|
|
|
9627
9639
|
}
|
|
9628
9640
|
ce.allSchemaProperties = h;
|
|
9629
9641
|
function y(p, b) {
|
|
9630
|
-
return h(b).filter((
|
|
9642
|
+
return h(b).filter((S) => !(0, e.alwaysValidSchema)(p, b[S]));
|
|
9631
9643
|
}
|
|
9632
9644
|
ce.schemaProperties = y;
|
|
9633
|
-
function v({ schemaCode: p, data: b, it: { gen:
|
|
9645
|
+
function v({ schemaCode: p, data: b, it: { gen: S, topSchemaRef: d, schemaPath: m, errorPath: w }, it: T }, I, L, N) {
|
|
9634
9646
|
const k = N ? (0, t._)`${p}, ${b}, ${d}${m}` : b, B = [
|
|
9635
9647
|
[r.default.instancePath, (0, t.strConcat)(r.default.instancePath, w)],
|
|
9636
|
-
[r.default.parentData,
|
|
9637
|
-
[r.default.parentDataProperty,
|
|
9648
|
+
[r.default.parentData, T.parentData],
|
|
9649
|
+
[r.default.parentDataProperty, T.parentDataProperty],
|
|
9638
9650
|
[r.default.rootData, r.default.rootData]
|
|
9639
9651
|
];
|
|
9640
|
-
|
|
9641
|
-
const V = (0, t._)`${k}, ${
|
|
9652
|
+
T.opts.dynamicRef && B.push([r.default.dynamicAnchors, r.default.dynamicAnchors]);
|
|
9653
|
+
const V = (0, t._)`${k}, ${S.object(...B)}`;
|
|
9642
9654
|
return L !== t.nil ? (0, t._)`${I}.call(${L}, ${V})` : (0, t._)`${I}(${V})`;
|
|
9643
9655
|
}
|
|
9644
9656
|
ce.callValidateCode = v;
|
|
9645
|
-
const
|
|
9646
|
-
function _({ gen: p, it: { opts: b } },
|
|
9647
|
-
const d = b.unicodeRegExp ? "u" : "", { regExp: m } = b.code, w = m(
|
|
9657
|
+
const R = (0, t._)`new RegExp`;
|
|
9658
|
+
function _({ gen: p, it: { opts: b } }, S) {
|
|
9659
|
+
const d = b.unicodeRegExp ? "u" : "", { regExp: m } = b.code, w = m(S, d);
|
|
9648
9660
|
return p.scopeValue("pattern", {
|
|
9649
9661
|
key: w.toString(),
|
|
9650
9662
|
ref: w,
|
|
9651
|
-
code: (0, t._)`${m.code === "new RegExp" ?
|
|
9663
|
+
code: (0, t._)`${m.code === "new RegExp" ? R : (0, n.useFunc)(p, m)}(${S}, ${d})`
|
|
9652
9664
|
});
|
|
9653
9665
|
}
|
|
9654
9666
|
ce.usePattern = _;
|
|
9655
9667
|
function f(p) {
|
|
9656
|
-
const { gen: b, data:
|
|
9668
|
+
const { gen: b, data: S, keyword: d, it: m } = p, w = b.name("valid");
|
|
9657
9669
|
if (m.allErrors) {
|
|
9658
9670
|
const I = b.let("valid", !0);
|
|
9659
|
-
return
|
|
9671
|
+
return T(() => b.assign(I, !1)), I;
|
|
9660
9672
|
}
|
|
9661
|
-
return b.var(w, !0),
|
|
9662
|
-
function
|
|
9663
|
-
const L = b.const("len", (0, t._)`${
|
|
9673
|
+
return b.var(w, !0), T(() => b.break()), w;
|
|
9674
|
+
function T(I) {
|
|
9675
|
+
const L = b.const("len", (0, t._)`${S}.length`);
|
|
9664
9676
|
b.forRange("i", 0, L, (N) => {
|
|
9665
9677
|
p.subschema({
|
|
9666
9678
|
keyword: d,
|
|
@@ -9672,20 +9684,20 @@ function ke() {
|
|
|
9672
9684
|
}
|
|
9673
9685
|
ce.validateArray = f;
|
|
9674
9686
|
function g(p) {
|
|
9675
|
-
const { gen: b, schema:
|
|
9676
|
-
if (!Array.isArray(
|
|
9687
|
+
const { gen: b, schema: S, keyword: d, it: m } = p;
|
|
9688
|
+
if (!Array.isArray(S))
|
|
9677
9689
|
throw new Error("ajv implementation error");
|
|
9678
|
-
if (
|
|
9690
|
+
if (S.some((L) => (0, e.alwaysValidSchema)(m, L)) && !m.opts.unevaluated)
|
|
9679
9691
|
return;
|
|
9680
|
-
const
|
|
9681
|
-
b.block(() =>
|
|
9692
|
+
const T = b.let("valid", !1), I = b.name("_valid");
|
|
9693
|
+
b.block(() => S.forEach((L, N) => {
|
|
9682
9694
|
const k = p.subschema({
|
|
9683
9695
|
keyword: d,
|
|
9684
9696
|
schemaProp: N,
|
|
9685
9697
|
compositeRule: !0
|
|
9686
9698
|
}, I);
|
|
9687
|
-
b.assign(
|
|
9688
|
-
})), p.result(
|
|
9699
|
+
b.assign(T, (0, t._)`${T} || ${I}`), p.mergeValidEvaluated(k, I) || b.if((0, t.not)(T));
|
|
9700
|
+
})), p.result(T, () => p.reset(), () => p.error(!0));
|
|
9689
9701
|
}
|
|
9690
9702
|
return ce.validateUnion = g, ce;
|
|
9691
9703
|
}
|
|
@@ -9695,25 +9707,25 @@ function Bm() {
|
|
|
9695
9707
|
Po = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.validateKeywordUsage = Le.validSchemaType = Le.funcKeywordCode = Le.macroKeywordCode = void 0;
|
|
9696
9708
|
const t = te(), e = Ke(), r = ke(), n = sn();
|
|
9697
9709
|
function s(y, v) {
|
|
9698
|
-
const { gen:
|
|
9710
|
+
const { gen: R, keyword: _, schema: f, parentSchema: g, it: p } = y, b = v.macro.call(p.self, f, g, p), S = u(R, _, b);
|
|
9699
9711
|
p.opts.validateSchema !== !1 && p.self.validateSchema(b, !0);
|
|
9700
|
-
const d =
|
|
9712
|
+
const d = R.name("valid");
|
|
9701
9713
|
y.subschema({
|
|
9702
9714
|
schema: b,
|
|
9703
9715
|
schemaPath: t.nil,
|
|
9704
9716
|
errSchemaPath: `${p.errSchemaPath}/${_}`,
|
|
9705
|
-
topSchemaRef:
|
|
9717
|
+
topSchemaRef: S,
|
|
9706
9718
|
compositeRule: !0
|
|
9707
9719
|
}, d), y.pass(d, () => y.error(!0));
|
|
9708
9720
|
}
|
|
9709
9721
|
Le.macroKeywordCode = s;
|
|
9710
9722
|
function o(y, v) {
|
|
9711
|
-
var
|
|
9712
|
-
const { gen: _, keyword: f, schema: g, parentSchema: p, $data: b, it:
|
|
9713
|
-
c(
|
|
9714
|
-
const d = !b && v.compile ? v.compile.call(
|
|
9715
|
-
y.block$data(w,
|
|
9716
|
-
function
|
|
9723
|
+
var R;
|
|
9724
|
+
const { gen: _, keyword: f, schema: g, parentSchema: p, $data: b, it: S } = y;
|
|
9725
|
+
c(S, v);
|
|
9726
|
+
const d = !b && v.compile ? v.compile.call(S.self, g, p, S) : v.validate, m = u(_, f, d), w = _.let("valid");
|
|
9727
|
+
y.block$data(w, T), y.ok((R = v.valid) !== null && R !== void 0 ? R : w);
|
|
9728
|
+
function T() {
|
|
9717
9729
|
if (v.errors === !1)
|
|
9718
9730
|
N(), v.modifying && a(y), k(() => y.error());
|
|
9719
9731
|
else {
|
|
@@ -9723,14 +9735,14 @@ function Bm() {
|
|
|
9723
9735
|
}
|
|
9724
9736
|
function I() {
|
|
9725
9737
|
const B = _.let("ruleErrs", null);
|
|
9726
|
-
return _.try(() => N((0, t._)`await `), (V) => _.assign(w, !1).if((0, t._)`${V} instanceof ${
|
|
9738
|
+
return _.try(() => N((0, t._)`await `), (V) => _.assign(w, !1).if((0, t._)`${V} instanceof ${S.ValidationError}`, () => _.assign(B, (0, t._)`${V}.errors`), () => _.throw(V))), B;
|
|
9727
9739
|
}
|
|
9728
9740
|
function L() {
|
|
9729
9741
|
const B = (0, t._)`${m}.errors`;
|
|
9730
9742
|
return _.assign(B, null), N(t.nil), B;
|
|
9731
9743
|
}
|
|
9732
9744
|
function N(B = v.async ? (0, t._)`await ` : t.nil) {
|
|
9733
|
-
const V =
|
|
9745
|
+
const V = S.opts.passContext ? e.default.this : e.default.self, J = !("compile" in v && !b || v.schema === !1);
|
|
9734
9746
|
_.assign(w, (0, t._)`${B}${(0, r.callValidateCode)(y, m, V, J)}`, v.modifying);
|
|
9735
9747
|
}
|
|
9736
9748
|
function k(B) {
|
|
@@ -9740,40 +9752,40 @@ function Bm() {
|
|
|
9740
9752
|
}
|
|
9741
9753
|
Le.funcKeywordCode = o;
|
|
9742
9754
|
function a(y) {
|
|
9743
|
-
const { gen: v, data:
|
|
9744
|
-
v.if(_.parentData, () => v.assign(
|
|
9755
|
+
const { gen: v, data: R, it: _ } = y;
|
|
9756
|
+
v.if(_.parentData, () => v.assign(R, (0, t._)`${_.parentData}[${_.parentDataProperty}]`));
|
|
9745
9757
|
}
|
|
9746
9758
|
function i(y, v) {
|
|
9747
|
-
const { gen:
|
|
9748
|
-
|
|
9749
|
-
|
|
9759
|
+
const { gen: R } = y;
|
|
9760
|
+
R.if((0, t._)`Array.isArray(${v})`, () => {
|
|
9761
|
+
R.assign(e.default.vErrors, (0, t._)`${e.default.vErrors} === null ? ${v} : ${e.default.vErrors}.concat(${v})`).assign(e.default.errors, (0, t._)`${e.default.vErrors}.length`), (0, n.extendErrors)(y);
|
|
9750
9762
|
}, () => y.error());
|
|
9751
9763
|
}
|
|
9752
9764
|
function c({ schemaEnv: y }, v) {
|
|
9753
9765
|
if (v.async && !y.$async)
|
|
9754
9766
|
throw new Error("async keyword in sync schema");
|
|
9755
9767
|
}
|
|
9756
|
-
function u(y, v,
|
|
9757
|
-
if (
|
|
9768
|
+
function u(y, v, R) {
|
|
9769
|
+
if (R === void 0)
|
|
9758
9770
|
throw new Error(`keyword "${v}" failed to compile`);
|
|
9759
|
-
return y.scopeValue("keyword", typeof
|
|
9771
|
+
return y.scopeValue("keyword", typeof R == "function" ? { ref: R } : { ref: R, code: (0, t.stringify)(R) });
|
|
9760
9772
|
}
|
|
9761
|
-
function l(y, v,
|
|
9762
|
-
return !v.length || v.some((_) => _ === "array" ? Array.isArray(y) : _ === "object" ? y && typeof y == "object" && !Array.isArray(y) : typeof y == _ ||
|
|
9773
|
+
function l(y, v, R = !1) {
|
|
9774
|
+
return !v.length || v.some((_) => _ === "array" ? Array.isArray(y) : _ === "object" ? y && typeof y == "object" && !Array.isArray(y) : typeof y == _ || R && typeof y > "u");
|
|
9763
9775
|
}
|
|
9764
9776
|
Le.validSchemaType = l;
|
|
9765
|
-
function h({ schema: y, opts: v, self:
|
|
9777
|
+
function h({ schema: y, opts: v, self: R, errSchemaPath: _ }, f, g) {
|
|
9766
9778
|
if (Array.isArray(f.keyword) ? !f.keyword.includes(g) : f.keyword !== g)
|
|
9767
9779
|
throw new Error("ajv implementation error");
|
|
9768
9780
|
const p = f.dependencies;
|
|
9769
9781
|
if (p?.some((b) => !Object.prototype.hasOwnProperty.call(y, b)))
|
|
9770
9782
|
throw new Error(`parent schema must have dependencies of ${g}: ${p.join(",")}`);
|
|
9771
9783
|
if (f.validateSchema && !f.validateSchema(y[g])) {
|
|
9772
|
-
const
|
|
9784
|
+
const S = `keyword "${g}" value is invalid at path "${_}": ` + R.errorsText(f.validateSchema.errors);
|
|
9773
9785
|
if (v.validateSchema === "log")
|
|
9774
|
-
|
|
9786
|
+
R.logger.error(S);
|
|
9775
9787
|
else
|
|
9776
|
-
throw new Error(
|
|
9788
|
+
throw new Error(S);
|
|
9777
9789
|
}
|
|
9778
9790
|
}
|
|
9779
9791
|
return Le.validateKeywordUsage = h, Le;
|
|
@@ -9816,16 +9828,16 @@ function zm() {
|
|
|
9816
9828
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
9817
9829
|
const { gen: y } = a;
|
|
9818
9830
|
if (i !== void 0) {
|
|
9819
|
-
const { errorPath:
|
|
9820
|
-
v(g), o.errorPath = (0, t.str)`${
|
|
9831
|
+
const { errorPath: R, dataPathArr: _, opts: f } = a, g = y.let("data", (0, t._)`${a.data}${(0, t.getProperty)(i)}`, !0);
|
|
9832
|
+
v(g), o.errorPath = (0, t.str)`${R}${(0, e.getErrorPath)(i, c, f.jsPropertySyntax)}`, o.parentDataProperty = (0, t._)`${i}`, o.dataPathArr = [..._, o.parentDataProperty];
|
|
9821
9833
|
}
|
|
9822
9834
|
if (u !== void 0) {
|
|
9823
|
-
const
|
|
9824
|
-
v(
|
|
9835
|
+
const R = u instanceof t.Name ? u : y.let("data", u, !0);
|
|
9836
|
+
v(R), h !== void 0 && (o.propertyName = h);
|
|
9825
9837
|
}
|
|
9826
9838
|
l && (o.dataTypes = l);
|
|
9827
|
-
function v(
|
|
9828
|
-
o.data =
|
|
9839
|
+
function v(R) {
|
|
9840
|
+
o.data = R, o.dataLevel = a.dataLevel + 1, o.dataTypes = [], a.definedProperties = /* @__PURE__ */ new Set(), o.parentData = a.data, o.dataNames = [...a.dataNames, R];
|
|
9829
9841
|
}
|
|
9830
9842
|
}
|
|
9831
9843
|
Ve.extendSubschemaData = n;
|
|
@@ -9834,7 +9846,7 @@ function zm() {
|
|
|
9834
9846
|
}
|
|
9835
9847
|
return Ve.extendSubschemaMode = s, Ve;
|
|
9836
9848
|
}
|
|
9837
|
-
var
|
|
9849
|
+
var Re = {}, In, $o;
|
|
9838
9850
|
function Ui() {
|
|
9839
9851
|
return $o || ($o = 1, In = function t(e, r) {
|
|
9840
9852
|
if (e === r) return !0;
|
|
@@ -9918,16 +9930,16 @@ function Ym() {
|
|
|
9918
9930
|
if (a && typeof a == "object" && !Array.isArray(a)) {
|
|
9919
9931
|
s(a, i, c, u, l, h, y);
|
|
9920
9932
|
for (var v in a) {
|
|
9921
|
-
var
|
|
9922
|
-
if (Array.isArray(
|
|
9933
|
+
var R = a[v];
|
|
9934
|
+
if (Array.isArray(R)) {
|
|
9923
9935
|
if (v in t.arrayKeywords)
|
|
9924
|
-
for (var _ = 0; _ <
|
|
9925
|
-
e(n, s, o,
|
|
9936
|
+
for (var _ = 0; _ < R.length; _++)
|
|
9937
|
+
e(n, s, o, R[_], i + "/" + v + "/" + _, c, i, v, a, _);
|
|
9926
9938
|
} else if (v in t.propsKeywords) {
|
|
9927
|
-
if (
|
|
9928
|
-
for (var f in
|
|
9929
|
-
e(n, s, o,
|
|
9930
|
-
} else (v in t.keywords || n.allKeys && !(v in t.skipKeywords)) && e(n, s, o,
|
|
9939
|
+
if (R && typeof R == "object")
|
|
9940
|
+
for (var f in R)
|
|
9941
|
+
e(n, s, o, R[f], i + "/" + v + "/" + r(f), c, i, v, a, f);
|
|
9942
|
+
} else (v in t.keywords || n.allKeys && !(v in t.skipKeywords)) && e(n, s, o, R, i + "/" + v, c, i, v, a);
|
|
9931
9943
|
}
|
|
9932
9944
|
o(a, i, c, u, l, h, y);
|
|
9933
9945
|
}
|
|
@@ -9939,8 +9951,8 @@ function Ym() {
|
|
|
9939
9951
|
}
|
|
9940
9952
|
var Co;
|
|
9941
9953
|
function on() {
|
|
9942
|
-
if (Co) return
|
|
9943
|
-
Co = 1, Object.defineProperty(
|
|
9954
|
+
if (Co) return Re;
|
|
9955
|
+
Co = 1, Object.defineProperty(Re, "__esModule", { value: !0 }), Re.getSchemaRefs = Re.resolveUrl = Re.normalizeId = Re._getFullPath = Re.getFullPath = Re.inlineRef = void 0;
|
|
9944
9956
|
const t = se(), e = Ui(), r = Ym(), n = /* @__PURE__ */ new Set([
|
|
9945
9957
|
"type",
|
|
9946
9958
|
"format",
|
|
@@ -9962,7 +9974,7 @@ function on() {
|
|
|
9962
9974
|
function s(_, f = !0) {
|
|
9963
9975
|
return typeof _ == "boolean" ? !0 : f === !0 ? !a(_) : f ? i(_) <= f : !1;
|
|
9964
9976
|
}
|
|
9965
|
-
|
|
9977
|
+
Re.inlineRef = s;
|
|
9966
9978
|
const o = /* @__PURE__ */ new Set([
|
|
9967
9979
|
"$ref",
|
|
9968
9980
|
"$recursiveRef",
|
|
@@ -9995,38 +10007,38 @@ function on() {
|
|
|
9995
10007
|
const p = _.parse(f);
|
|
9996
10008
|
return u(_, p);
|
|
9997
10009
|
}
|
|
9998
|
-
|
|
10010
|
+
Re.getFullPath = c;
|
|
9999
10011
|
function u(_, f) {
|
|
10000
10012
|
return _.serialize(f).split("#")[0] + "#";
|
|
10001
10013
|
}
|
|
10002
|
-
|
|
10014
|
+
Re._getFullPath = u;
|
|
10003
10015
|
const l = /#\/?$/;
|
|
10004
10016
|
function h(_) {
|
|
10005
10017
|
return _ ? _.replace(l, "") : "";
|
|
10006
10018
|
}
|
|
10007
|
-
|
|
10019
|
+
Re.normalizeId = h;
|
|
10008
10020
|
function y(_, f, g) {
|
|
10009
10021
|
return g = h(g), _.resolve(f, g);
|
|
10010
10022
|
}
|
|
10011
|
-
|
|
10023
|
+
Re.resolveUrl = y;
|
|
10012
10024
|
const v = /^[a-z_][-a-z0-9._]*$/i;
|
|
10013
|
-
function
|
|
10025
|
+
function R(_, f) {
|
|
10014
10026
|
if (typeof _ == "boolean")
|
|
10015
10027
|
return {};
|
|
10016
|
-
const { schemaId: g, uriResolver: p } = this.opts, b = h(_[g] || f),
|
|
10028
|
+
const { schemaId: g, uriResolver: p } = this.opts, b = h(_[g] || f), S = { "": b }, d = c(p, b, !1), m = {}, w = /* @__PURE__ */ new Set();
|
|
10017
10029
|
return r(_, { allKeys: !0 }, (L, N, k, B) => {
|
|
10018
10030
|
if (B === void 0)
|
|
10019
10031
|
return;
|
|
10020
10032
|
const V = d + N;
|
|
10021
|
-
let J =
|
|
10022
|
-
typeof L[g] == "string" && (J = ne.call(this, L[g])), we.call(this, L.$anchor), we.call(this, L.$dynamicAnchor),
|
|
10033
|
+
let J = S[B];
|
|
10034
|
+
typeof L[g] == "string" && (J = ne.call(this, L[g])), we.call(this, L.$anchor), we.call(this, L.$dynamicAnchor), S[N] = J;
|
|
10023
10035
|
function ne(re) {
|
|
10024
10036
|
const oe = this.opts.uriResolver.resolve;
|
|
10025
10037
|
if (re = h(J ? oe(J, re) : re), w.has(re))
|
|
10026
10038
|
throw I(re);
|
|
10027
10039
|
w.add(re);
|
|
10028
10040
|
let q = this.refs[re];
|
|
10029
|
-
return typeof q == "string" && (q = this.refs[q]), typeof q == "object" ?
|
|
10041
|
+
return typeof q == "string" && (q = this.refs[q]), typeof q == "object" ? T(L, q.schema, re) : re !== h(V) && (re[0] === "#" ? (T(L, m[re], re), m[re] = L) : this.refs[re] = V), re;
|
|
10030
10042
|
}
|
|
10031
10043
|
function we(re) {
|
|
10032
10044
|
if (typeof re == "string") {
|
|
@@ -10036,7 +10048,7 @@ function on() {
|
|
|
10036
10048
|
}
|
|
10037
10049
|
}
|
|
10038
10050
|
}), m;
|
|
10039
|
-
function
|
|
10051
|
+
function T(L, N, k) {
|
|
10040
10052
|
if (N !== void 0 && !e(L, N))
|
|
10041
10053
|
throw I(k);
|
|
10042
10054
|
}
|
|
@@ -10044,7 +10056,7 @@ function on() {
|
|
|
10044
10056
|
return new Error(`reference "${L}" resolves to more than one schema`);
|
|
10045
10057
|
}
|
|
10046
10058
|
}
|
|
10047
|
-
return
|
|
10059
|
+
return Re.getSchemaRefs = R, Re;
|
|
10048
10060
|
}
|
|
10049
10061
|
var Lo;
|
|
10050
10062
|
function an() {
|
|
@@ -10052,7 +10064,7 @@ function an() {
|
|
|
10052
10064
|
Lo = 1, Object.defineProperty(Fe, "__esModule", { value: !0 }), Fe.getData = Fe.KeywordCxt = Fe.validateFunctionCode = void 0;
|
|
10053
10065
|
const t = Vm(), e = zr(), r = Mi(), n = zr(), s = Hm(), o = Bm(), a = zm(), i = te(), c = Ke(), u = on(), l = se(), h = sn();
|
|
10054
10066
|
function y(A) {
|
|
10055
|
-
if (d(A) && (w(A),
|
|
10067
|
+
if (d(A) && (w(A), S(A))) {
|
|
10056
10068
|
f(A);
|
|
10057
10069
|
return;
|
|
10058
10070
|
}
|
|
@@ -10062,9 +10074,9 @@ function an() {
|
|
|
10062
10074
|
function v({ gen: A, validateName: C, schema: M, schemaEnv: F, opts: G }, ee) {
|
|
10063
10075
|
G.code.es5 ? A.func(C, (0, i._)`${c.default.data}, ${c.default.valCxt}`, F.$async, () => {
|
|
10064
10076
|
A.code((0, i._)`"use strict"; ${p(M, G)}`), _(A, G), A.code(ee);
|
|
10065
|
-
}) : A.func(C, (0, i._)`${c.default.data}, ${
|
|
10077
|
+
}) : A.func(C, (0, i._)`${c.default.data}, ${R(G)}`, F.$async, () => A.code(p(M, G)).code(ee));
|
|
10066
10078
|
}
|
|
10067
|
-
function
|
|
10079
|
+
function R(A) {
|
|
10068
10080
|
return (0, i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef ? (0, i._)`, ${c.default.dynamicAnchors}={}` : i.nil}}={}`;
|
|
10069
10081
|
}
|
|
10070
10082
|
function _(A, C) {
|
|
@@ -10077,7 +10089,7 @@ function an() {
|
|
|
10077
10089
|
function f(A) {
|
|
10078
10090
|
const { schema: C, opts: M, gen: F } = A;
|
|
10079
10091
|
v(A, () => {
|
|
10080
|
-
M.$comment && C.$comment && B(A), L(A), F.let(c.default.vErrors, null), F.let(c.default.errors, 0), M.unevaluated && g(A),
|
|
10092
|
+
M.$comment && C.$comment && B(A), L(A), F.let(c.default.vErrors, null), F.let(c.default.errors, 0), M.unevaluated && g(A), T(A), V(A);
|
|
10081
10093
|
});
|
|
10082
10094
|
}
|
|
10083
10095
|
function g(A) {
|
|
@@ -10089,13 +10101,13 @@ function an() {
|
|
|
10089
10101
|
return M && (C.code.source || C.code.process) ? (0, i._)`/*# sourceURL=${M} */` : i.nil;
|
|
10090
10102
|
}
|
|
10091
10103
|
function b(A, C) {
|
|
10092
|
-
if (d(A) && (w(A),
|
|
10104
|
+
if (d(A) && (w(A), S(A))) {
|
|
10093
10105
|
m(A, C);
|
|
10094
10106
|
return;
|
|
10095
10107
|
}
|
|
10096
10108
|
(0, t.boolOrEmptySchema)(A, C);
|
|
10097
10109
|
}
|
|
10098
|
-
function
|
|
10110
|
+
function S({ schema: A, self: C }) {
|
|
10099
10111
|
if (typeof A == "boolean")
|
|
10100
10112
|
return !A;
|
|
10101
10113
|
for (const M in A)
|
|
@@ -10110,12 +10122,12 @@ function an() {
|
|
|
10110
10122
|
const { schema: M, gen: F, opts: G } = A;
|
|
10111
10123
|
G.$comment && M.$comment && B(A), N(A), k(A);
|
|
10112
10124
|
const ee = F.const("_errs", c.default.errors);
|
|
10113
|
-
|
|
10125
|
+
T(A, ee), F.var(C, (0, i._)`${ee} === ${c.default.errors}`);
|
|
10114
10126
|
}
|
|
10115
10127
|
function w(A) {
|
|
10116
10128
|
(0, l.checkUnknownRules)(A), I(A);
|
|
10117
10129
|
}
|
|
10118
|
-
function
|
|
10130
|
+
function T(A, C) {
|
|
10119
10131
|
if (A.opts.jtd)
|
|
10120
10132
|
return ne(A, [], !1, C);
|
|
10121
10133
|
const M = (0, e.getSchemaTypes)(A.schema), F = (0, e.coerceAndCheckDataType)(A, M);
|
|
@@ -10400,14 +10412,14 @@ function bs() {
|
|
|
10400
10412
|
const g = l.call(this, f);
|
|
10401
10413
|
if (g)
|
|
10402
10414
|
return g;
|
|
10403
|
-
const p = (0, n.getFullPath)(this.opts.uriResolver, f.root.baseId), { es5: b, lines:
|
|
10415
|
+
const p = (0, n.getFullPath)(this.opts.uriResolver, f.root.baseId), { es5: b, lines: S } = this.opts.code, { ownProperties: d } = this.opts, m = new t.CodeGen(this.scope, { es5: b, lines: S, ownProperties: d });
|
|
10404
10416
|
let w;
|
|
10405
10417
|
f.$async && (w = m.scopeValue("Error", {
|
|
10406
10418
|
ref: e.default,
|
|
10407
10419
|
code: (0, t._)`require("ajv/dist/runtime/validation_error").default`
|
|
10408
10420
|
}));
|
|
10409
|
-
const
|
|
10410
|
-
f.validateName =
|
|
10421
|
+
const T = m.scopeName("validate");
|
|
10422
|
+
f.validateName = T;
|
|
10411
10423
|
const I = {
|
|
10412
10424
|
gen: m,
|
|
10413
10425
|
allErrors: this.opts.allErrors,
|
|
@@ -10421,7 +10433,7 @@ function bs() {
|
|
|
10421
10433
|
dataTypes: [],
|
|
10422
10434
|
definedProperties: /* @__PURE__ */ new Set(),
|
|
10423
10435
|
topSchemaRef: m.scopeValue("schema", this.opts.code.source === !0 ? { ref: f.schema, code: (0, t.stringify)(f.schema) } : { ref: f.schema }),
|
|
10424
|
-
validateName:
|
|
10436
|
+
validateName: T,
|
|
10425
10437
|
ValidationError: w,
|
|
10426
10438
|
schema: f.schema,
|
|
10427
10439
|
schemaEnv: f,
|
|
@@ -10439,7 +10451,7 @@ function bs() {
|
|
|
10439
10451
|
const N = m.toString();
|
|
10440
10452
|
L = `${m.scopeRefs(r.default.scope)}return ${N}`, this.opts.code.process && (L = this.opts.code.process(L, f));
|
|
10441
10453
|
const B = new Function(`${r.default.self}`, `${r.default.scope}`, L)(this, this.scope.get());
|
|
10442
|
-
if (this.scope.value(
|
|
10454
|
+
if (this.scope.value(T, { ref: B }), B.errors = null, B.schema = f.schema, B.schemaEnv = f, f.$async && (B.$async = !0), this.opts.code.source === !0 && (B.source = { validateName: T, validateCode: N, scopeValues: m._values }), this.opts.unevaluated) {
|
|
10443
10455
|
const { props: V, items: J } = I;
|
|
10444
10456
|
B.evaluated = {
|
|
10445
10457
|
props: V instanceof t.Name ? void 0 : V,
|
|
@@ -10459,9 +10471,9 @@ function bs() {
|
|
|
10459
10471
|
function c(f, g, p) {
|
|
10460
10472
|
var b;
|
|
10461
10473
|
p = (0, n.resolveUrl)(this.opts.uriResolver, g, p);
|
|
10462
|
-
const
|
|
10463
|
-
if (
|
|
10464
|
-
return
|
|
10474
|
+
const S = f.refs[p];
|
|
10475
|
+
if (S)
|
|
10476
|
+
return S;
|
|
10465
10477
|
let d = y.call(this, f, p);
|
|
10466
10478
|
if (d === void 0) {
|
|
10467
10479
|
const m = (b = f.localRefs) === null || b === void 0 ? void 0 : b[p], { schemaId: w } = this.opts;
|
|
@@ -10491,8 +10503,8 @@ function bs() {
|
|
|
10491
10503
|
}
|
|
10492
10504
|
function v(f, g) {
|
|
10493
10505
|
const p = this.opts.uriResolver.parse(g), b = (0, n._getFullPath)(this.opts.uriResolver, p);
|
|
10494
|
-
let
|
|
10495
|
-
if (Object.keys(f.schema).length > 0 && b ===
|
|
10506
|
+
let S = (0, n.getFullPath)(this.opts.uriResolver, f.baseId, void 0);
|
|
10507
|
+
if (Object.keys(f.schema).length > 0 && b === S)
|
|
10496
10508
|
return _.call(this, p, f);
|
|
10497
10509
|
const d = (0, n.normalizeId)(b), m = this.refs[d] || this.schemas[d];
|
|
10498
10510
|
if (typeof m == "string") {
|
|
@@ -10501,14 +10513,14 @@ function bs() {
|
|
|
10501
10513
|
}
|
|
10502
10514
|
if (typeof m?.schema == "object") {
|
|
10503
10515
|
if (m.validate || i.call(this, m), d === (0, n.normalizeId)(g)) {
|
|
10504
|
-
const { schema: w } = m, { schemaId:
|
|
10505
|
-
return I && (
|
|
10516
|
+
const { schema: w } = m, { schemaId: T } = this.opts, I = w[T];
|
|
10517
|
+
return I && (S = (0, n.resolveUrl)(this.opts.uriResolver, S, I)), new a({ schema: w, schemaId: T, root: f, baseId: S });
|
|
10506
10518
|
}
|
|
10507
10519
|
return _.call(this, p, m);
|
|
10508
10520
|
}
|
|
10509
10521
|
}
|
|
10510
10522
|
Pe.resolveSchema = v;
|
|
10511
|
-
const
|
|
10523
|
+
const R = /* @__PURE__ */ new Set([
|
|
10512
10524
|
"properties",
|
|
10513
10525
|
"patternProperties",
|
|
10514
10526
|
"enum",
|
|
@@ -10516,18 +10528,18 @@ function bs() {
|
|
|
10516
10528
|
"definitions"
|
|
10517
10529
|
]);
|
|
10518
10530
|
function _(f, { baseId: g, schema: p, root: b }) {
|
|
10519
|
-
var
|
|
10520
|
-
if (((
|
|
10531
|
+
var S;
|
|
10532
|
+
if (((S = f.fragment) === null || S === void 0 ? void 0 : S[0]) !== "/")
|
|
10521
10533
|
return;
|
|
10522
10534
|
for (const w of f.fragment.slice(1).split("/")) {
|
|
10523
10535
|
if (typeof p == "boolean")
|
|
10524
10536
|
return;
|
|
10525
|
-
const
|
|
10526
|
-
if (
|
|
10537
|
+
const T = p[(0, s.unescapeFragment)(w)];
|
|
10538
|
+
if (T === void 0)
|
|
10527
10539
|
return;
|
|
10528
|
-
p =
|
|
10540
|
+
p = T;
|
|
10529
10541
|
const I = typeof p == "object" && p[this.opts.schemaId];
|
|
10530
|
-
!
|
|
10542
|
+
!R.has(w) && I && (g = (0, n.resolveUrl)(this.opts.uriResolver, g, I));
|
|
10531
10543
|
}
|
|
10532
10544
|
let d;
|
|
10533
10545
|
if (typeof p != "boolean" && p.$ref && !(0, s.schemaHasRulesButRef)(p, this.RULES)) {
|
|
@@ -10554,18 +10566,18 @@ function qi() {
|
|
|
10554
10566
|
Uo = 1;
|
|
10555
10567
|
const t = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), e = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u), r = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu), n = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu), s = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
10556
10568
|
function o(d) {
|
|
10557
|
-
let m = "", w = 0,
|
|
10558
|
-
for (
|
|
10559
|
-
if (w = d[
|
|
10569
|
+
let m = "", w = 0, T = 0;
|
|
10570
|
+
for (T = 0; T < d.length; T++)
|
|
10571
|
+
if (w = d[T].charCodeAt(0), w !== 48) {
|
|
10560
10572
|
if (!(w >= 48 && w <= 57 || w >= 65 && w <= 70 || w >= 97 && w <= 102))
|
|
10561
10573
|
return "";
|
|
10562
|
-
m += d[
|
|
10574
|
+
m += d[T];
|
|
10563
10575
|
break;
|
|
10564
10576
|
}
|
|
10565
|
-
for (
|
|
10566
|
-
if (w = d[
|
|
10577
|
+
for (T += 1; T < d.length; T++) {
|
|
10578
|
+
if (w = d[T].charCodeAt(0), !(w >= 48 && w <= 57 || w >= 65 && w <= 70 || w >= 97 && w <= 102))
|
|
10567
10579
|
return "";
|
|
10568
|
-
m += d[
|
|
10580
|
+
m += d[T];
|
|
10569
10581
|
}
|
|
10570
10582
|
return m;
|
|
10571
10583
|
}
|
|
@@ -10575,9 +10587,9 @@ function qi() {
|
|
|
10575
10587
|
}
|
|
10576
10588
|
function c(d, m, w) {
|
|
10577
10589
|
if (d.length) {
|
|
10578
|
-
const
|
|
10579
|
-
if (
|
|
10580
|
-
m.push(
|
|
10590
|
+
const T = o(d);
|
|
10591
|
+
if (T !== "")
|
|
10592
|
+
m.push(T);
|
|
10581
10593
|
else
|
|
10582
10594
|
return w.error = !0, !1;
|
|
10583
10595
|
d.length = 0;
|
|
@@ -10586,22 +10598,22 @@ function qi() {
|
|
|
10586
10598
|
}
|
|
10587
10599
|
function u(d) {
|
|
10588
10600
|
let m = 0;
|
|
10589
|
-
const w = { error: !1, address: "", zone: "" },
|
|
10601
|
+
const w = { error: !1, address: "", zone: "" }, T = [], I = [];
|
|
10590
10602
|
let L = !1, N = !1, k = c;
|
|
10591
10603
|
for (let B = 0; B < d.length; B++) {
|
|
10592
10604
|
const V = d[B];
|
|
10593
10605
|
if (!(V === "[" || V === "]"))
|
|
10594
10606
|
if (V === ":") {
|
|
10595
|
-
if (L === !0 && (N = !0), !k(I,
|
|
10607
|
+
if (L === !0 && (N = !0), !k(I, T, w))
|
|
10596
10608
|
break;
|
|
10597
10609
|
if (++m > 7) {
|
|
10598
10610
|
w.error = !0;
|
|
10599
10611
|
break;
|
|
10600
10612
|
}
|
|
10601
|
-
B > 0 && d[B - 1] === ":" && (L = !0),
|
|
10613
|
+
B > 0 && d[B - 1] === ":" && (L = !0), T.push(":");
|
|
10602
10614
|
continue;
|
|
10603
10615
|
} else if (V === "%") {
|
|
10604
|
-
if (!k(I,
|
|
10616
|
+
if (!k(I, T, w))
|
|
10605
10617
|
break;
|
|
10606
10618
|
k = i;
|
|
10607
10619
|
} else {
|
|
@@ -10609,7 +10621,7 @@ function qi() {
|
|
|
10609
10621
|
continue;
|
|
10610
10622
|
}
|
|
10611
10623
|
}
|
|
10612
|
-
return I.length && (k === i ? w.zone = I.join("") : N ?
|
|
10624
|
+
return I.length && (k === i ? w.zone = I.join("") : N ? T.push(I.join("")) : T.push(o(I))), w.address = T.join(""), w;
|
|
10613
10625
|
}
|
|
10614
10626
|
function l(d) {
|
|
10615
10627
|
if (h(d, ":") < 2)
|
|
@@ -10618,20 +10630,20 @@ function qi() {
|
|
|
10618
10630
|
if (m.error)
|
|
10619
10631
|
return { host: d, isIPV6: !1 };
|
|
10620
10632
|
{
|
|
10621
|
-
let w = m.address,
|
|
10622
|
-
return m.zone && (w += "%" + m.zone,
|
|
10633
|
+
let w = m.address, T = m.address;
|
|
10634
|
+
return m.zone && (w += "%" + m.zone, T += "%25" + m.zone), { host: w, isIPV6: !0, escapedHost: T };
|
|
10623
10635
|
}
|
|
10624
10636
|
}
|
|
10625
10637
|
function h(d, m) {
|
|
10626
10638
|
let w = 0;
|
|
10627
|
-
for (let
|
|
10628
|
-
d[
|
|
10639
|
+
for (let T = 0; T < d.length; T++)
|
|
10640
|
+
d[T] === m && w++;
|
|
10629
10641
|
return w;
|
|
10630
10642
|
}
|
|
10631
10643
|
function y(d) {
|
|
10632
10644
|
let m = d;
|
|
10633
10645
|
const w = [];
|
|
10634
|
-
let
|
|
10646
|
+
let T = -1, I = 0;
|
|
10635
10647
|
for (; I = m.length; ) {
|
|
10636
10648
|
if (I === 1) {
|
|
10637
10649
|
if (m === ".")
|
|
@@ -10678,33 +10690,33 @@ function qi() {
|
|
|
10678
10690
|
continue;
|
|
10679
10691
|
}
|
|
10680
10692
|
}
|
|
10681
|
-
if ((
|
|
10693
|
+
if ((T = m.indexOf("/", 1)) === -1) {
|
|
10682
10694
|
w.push(m);
|
|
10683
10695
|
break;
|
|
10684
10696
|
} else
|
|
10685
|
-
w.push(m.slice(0,
|
|
10697
|
+
w.push(m.slice(0, T)), m = m.slice(T);
|
|
10686
10698
|
}
|
|
10687
10699
|
return w.join("");
|
|
10688
10700
|
}
|
|
10689
|
-
const v = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" },
|
|
10701
|
+
const v = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" }, R = /[@/?#:]/g, _ = /[@/?#]/g;
|
|
10690
10702
|
function f(d, m) {
|
|
10691
|
-
const w = m ? _ :
|
|
10692
|
-
return w.lastIndex = 0, d.replace(w, (
|
|
10703
|
+
const w = m ? _ : R;
|
|
10704
|
+
return w.lastIndex = 0, d.replace(w, (T) => v[T]);
|
|
10693
10705
|
}
|
|
10694
10706
|
function g(d, m = !1) {
|
|
10695
10707
|
if (d.indexOf("%") === -1)
|
|
10696
10708
|
return d;
|
|
10697
10709
|
let w = "";
|
|
10698
|
-
for (let
|
|
10699
|
-
if (d[
|
|
10700
|
-
const I = d.slice(
|
|
10710
|
+
for (let T = 0; T < d.length; T++) {
|
|
10711
|
+
if (d[T] === "%" && T + 2 < d.length) {
|
|
10712
|
+
const I = d.slice(T + 1, T + 3);
|
|
10701
10713
|
if (r(I)) {
|
|
10702
10714
|
const L = I.toUpperCase(), N = String.fromCharCode(parseInt(L, 16));
|
|
10703
|
-
m && n(N) ? w += N : w += "%" + L,
|
|
10715
|
+
m && n(N) ? w += N : w += "%" + L, T += 2;
|
|
10704
10716
|
continue;
|
|
10705
10717
|
}
|
|
10706
10718
|
}
|
|
10707
|
-
w += d[
|
|
10719
|
+
w += d[T];
|
|
10708
10720
|
}
|
|
10709
10721
|
return w;
|
|
10710
10722
|
}
|
|
@@ -10712,9 +10724,9 @@ function qi() {
|
|
|
10712
10724
|
let m = "";
|
|
10713
10725
|
for (let w = 0; w < d.length; w++) {
|
|
10714
10726
|
if (d[w] === "%" && w + 2 < d.length) {
|
|
10715
|
-
const
|
|
10716
|
-
if (r(
|
|
10717
|
-
const I =
|
|
10727
|
+
const T = d.slice(w + 1, w + 3);
|
|
10728
|
+
if (r(T)) {
|
|
10729
|
+
const I = T.toUpperCase(), L = String.fromCharCode(parseInt(I, 16));
|
|
10718
10730
|
L !== "." && n(L) ? m += L : m += "%" + I, w += 2;
|
|
10719
10731
|
continue;
|
|
10720
10732
|
}
|
|
@@ -10727,9 +10739,9 @@ function qi() {
|
|
|
10727
10739
|
let m = "";
|
|
10728
10740
|
for (let w = 0; w < d.length; w++) {
|
|
10729
10741
|
if (d[w] === "%" && w + 2 < d.length) {
|
|
10730
|
-
const
|
|
10731
|
-
if (r(
|
|
10732
|
-
m += "%" +
|
|
10742
|
+
const T = d.slice(w + 1, w + 3);
|
|
10743
|
+
if (r(T)) {
|
|
10744
|
+
m += "%" + T.toUpperCase(), w += 2;
|
|
10733
10745
|
continue;
|
|
10734
10746
|
}
|
|
10735
10747
|
}
|
|
@@ -10737,13 +10749,13 @@ function qi() {
|
|
|
10737
10749
|
}
|
|
10738
10750
|
return m;
|
|
10739
10751
|
}
|
|
10740
|
-
function
|
|
10752
|
+
function S(d) {
|
|
10741
10753
|
const m = [];
|
|
10742
10754
|
if (d.userinfo !== void 0 && (m.push(d.userinfo), m.push("@")), d.host !== void 0) {
|
|
10743
10755
|
let w = unescape(d.host);
|
|
10744
10756
|
if (!e(w)) {
|
|
10745
|
-
const
|
|
10746
|
-
|
|
10757
|
+
const T = l(w);
|
|
10758
|
+
T.isIPV6 === !0 ? w = `[${T.escapedHost}]` : w = f(w, !1);
|
|
10747
10759
|
}
|
|
10748
10760
|
m.push(w);
|
|
10749
10761
|
}
|
|
@@ -10751,7 +10763,7 @@ function qi() {
|
|
|
10751
10763
|
}
|
|
10752
10764
|
return Dn = {
|
|
10753
10765
|
nonSimpleDomain: a,
|
|
10754
|
-
recomposeAuthority:
|
|
10766
|
+
recomposeAuthority: S,
|
|
10755
10767
|
reescapeHostDelimiters: f,
|
|
10756
10768
|
normalizePercentEncoding: g,
|
|
10757
10769
|
normalizePathEncoding: p,
|
|
@@ -10809,9 +10821,9 @@ function eg() {
|
|
|
10809
10821
|
return d.error = "URN can not be parsed", d;
|
|
10810
10822
|
const w = d.path.match(e);
|
|
10811
10823
|
if (w) {
|
|
10812
|
-
const
|
|
10824
|
+
const T = m.scheme || d.scheme || "urn";
|
|
10813
10825
|
d.nid = w[1].toLowerCase(), d.nss = w[2];
|
|
10814
|
-
const I = `${
|
|
10826
|
+
const I = `${T}:${m.nid || d.nid}`, L = S(I);
|
|
10815
10827
|
d.path = void 0, L && (d = L.parse(d, m));
|
|
10816
10828
|
} else
|
|
10817
10829
|
d.error = d.error || "URN can not be parsed.";
|
|
@@ -10820,10 +10832,10 @@ function eg() {
|
|
|
10820
10832
|
function l(d, m) {
|
|
10821
10833
|
if (d.nid === void 0)
|
|
10822
10834
|
throw new Error("URN without nid cannot be serialized");
|
|
10823
|
-
const w = m.scheme || d.scheme || "urn",
|
|
10835
|
+
const w = m.scheme || d.scheme || "urn", T = d.nid.toLowerCase(), I = `${w}:${m.nid || T}`, L = S(I);
|
|
10824
10836
|
L && (d = L.serialize(d, m));
|
|
10825
10837
|
const N = d, k = d.nss;
|
|
10826
|
-
return N.path = `${
|
|
10838
|
+
return N.path = `${T || m.nid}:${k}`, m.skipEscape = !0, N;
|
|
10827
10839
|
}
|
|
10828
10840
|
function h(d, m) {
|
|
10829
10841
|
const w = d;
|
|
@@ -10841,7 +10853,7 @@ function eg() {
|
|
|
10841
10853
|
parse: o,
|
|
10842
10854
|
serialize: a
|
|
10843
10855
|
}
|
|
10844
|
-
),
|
|
10856
|
+
), R = (
|
|
10845
10857
|
/** @type {SchemeHandler} */
|
|
10846
10858
|
{
|
|
10847
10859
|
scheme: "https",
|
|
@@ -10869,7 +10881,7 @@ function eg() {
|
|
|
10869
10881
|
/** @type {Record<SchemeName, SchemeHandler>} */
|
|
10870
10882
|
{
|
|
10871
10883
|
http: v,
|
|
10872
|
-
https:
|
|
10884
|
+
https: R,
|
|
10873
10885
|
ws: _,
|
|
10874
10886
|
wss: f,
|
|
10875
10887
|
urn: (
|
|
@@ -10893,7 +10905,7 @@ function eg() {
|
|
|
10893
10905
|
}
|
|
10894
10906
|
);
|
|
10895
10907
|
Object.setPrototypeOf(b, null);
|
|
10896
|
-
function
|
|
10908
|
+
function S(d) {
|
|
10897
10909
|
return d && (b[
|
|
10898
10910
|
/** @type {SchemeName} */
|
|
10899
10911
|
d
|
|
@@ -10906,7 +10918,7 @@ function eg() {
|
|
|
10906
10918
|
wsIsSecure: s,
|
|
10907
10919
|
SCHEMES: b,
|
|
10908
10920
|
isValidSchemeName: n,
|
|
10909
|
-
getSchemeHandler:
|
|
10921
|
+
getSchemeHandler: S
|
|
10910
10922
|
}, Cn;
|
|
10911
10923
|
}
|
|
10912
10924
|
var Fo;
|
|
@@ -10914,38 +10926,38 @@ function tg() {
|
|
|
10914
10926
|
if (Fo) return It.exports;
|
|
10915
10927
|
Fo = 1;
|
|
10916
10928
|
const { normalizeIPv6: t, removeDotSegments: e, recomposeAuthority: r, normalizePercentEncoding: n, normalizePathEncoding: s, escapePreservingEscapes: o, reescapeHostDelimiters: a, isIPv4: i, nonSimpleDomain: c } = qi(), { SCHEMES: u, getSchemeHandler: l } = eg();
|
|
10917
|
-
function h(
|
|
10918
|
-
return typeof
|
|
10919
|
-
T
|
|
10920
|
-
b(_(
|
|
10929
|
+
function h(T, I) {
|
|
10930
|
+
return typeof T == "string" ? T = /** @type {T} */
|
|
10931
|
+
S(T, I) : typeof T == "object" && (T = /** @type {T} */
|
|
10932
|
+
b(_(T, I), I)), T;
|
|
10921
10933
|
}
|
|
10922
|
-
function y(
|
|
10923
|
-
const N = L ? Object.assign({ scheme: "null" }, L) : { scheme: "null" }, k = v(b(
|
|
10934
|
+
function y(T, I, L) {
|
|
10935
|
+
const N = L ? Object.assign({ scheme: "null" }, L) : { scheme: "null" }, k = v(b(T, N), b(I, N), N, !0);
|
|
10924
10936
|
return N.skipEscape = !0, _(k, N);
|
|
10925
10937
|
}
|
|
10926
|
-
function v(
|
|
10938
|
+
function v(T, I, L, N) {
|
|
10927
10939
|
const k = {};
|
|
10928
|
-
return N || (
|
|
10940
|
+
return N || (T = b(_(T, L), L), I = b(_(I, L), L)), L = L || {}, !L.tolerant && I.scheme ? (k.scheme = I.scheme, k.userinfo = I.userinfo, k.host = I.host, k.port = I.port, k.path = e(I.path || ""), k.query = I.query) : (I.userinfo !== void 0 || I.host !== void 0 || I.port !== void 0 ? (k.userinfo = I.userinfo, k.host = I.host, k.port = I.port, k.path = e(I.path || ""), k.query = I.query) : (I.path ? (I.path[0] === "/" ? k.path = e(I.path) : ((T.userinfo !== void 0 || T.host !== void 0 || T.port !== void 0) && !T.path ? k.path = "/" + I.path : T.path ? k.path = T.path.slice(0, T.path.lastIndexOf("/") + 1) + I.path : k.path = I.path, k.path = e(k.path)), k.query = I.query) : (k.path = T.path, I.query !== void 0 ? k.query = I.query : k.query = T.query), k.userinfo = T.userinfo, k.host = T.host, k.port = T.port), k.scheme = T.scheme), k.fragment = I.fragment, k;
|
|
10929
10941
|
}
|
|
10930
|
-
function
|
|
10931
|
-
const N = m(
|
|
10942
|
+
function R(T, I, L) {
|
|
10943
|
+
const N = m(T, L), k = m(I, L);
|
|
10932
10944
|
return N !== void 0 && k !== void 0 && N.toLowerCase() === k.toLowerCase();
|
|
10933
10945
|
}
|
|
10934
|
-
function _(
|
|
10946
|
+
function _(T, I) {
|
|
10935
10947
|
const L = {
|
|
10936
|
-
host:
|
|
10937
|
-
scheme:
|
|
10938
|
-
userinfo:
|
|
10939
|
-
port:
|
|
10940
|
-
path:
|
|
10941
|
-
query:
|
|
10942
|
-
nid:
|
|
10943
|
-
nss:
|
|
10944
|
-
uuid:
|
|
10945
|
-
fragment:
|
|
10946
|
-
reference:
|
|
10947
|
-
resourceName:
|
|
10948
|
-
secure:
|
|
10948
|
+
host: T.host,
|
|
10949
|
+
scheme: T.scheme,
|
|
10950
|
+
userinfo: T.userinfo,
|
|
10951
|
+
port: T.port,
|
|
10952
|
+
path: T.path,
|
|
10953
|
+
query: T.query,
|
|
10954
|
+
nid: T.nid,
|
|
10955
|
+
nss: T.nss,
|
|
10956
|
+
uuid: T.uuid,
|
|
10957
|
+
fragment: T.fragment,
|
|
10958
|
+
reference: T.reference,
|
|
10959
|
+
resourceName: T.resourceName,
|
|
10960
|
+
secure: T.secure,
|
|
10949
10961
|
error: ""
|
|
10950
10962
|
}, N = Object.assign({}, I), k = [], B = l(N.scheme || L.scheme);
|
|
10951
10963
|
B && B.serialize && B.serialize(L, N), L.path !== void 0 && (N.skipEscape ? L.path = n(L.path) : (L.path = o(L.path), L.scheme !== void 0 && (L.path = L.path.split("%3A").join(":")))), N.reference !== "suffix" && L.scheme && k.push(L.scheme, ":");
|
|
@@ -10957,13 +10969,13 @@ function tg() {
|
|
|
10957
10969
|
return L.query !== void 0 && k.push("?", L.query), L.fragment !== void 0 && k.push("#", L.fragment), k.join("");
|
|
10958
10970
|
}
|
|
10959
10971
|
const f = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
10960
|
-
function g(
|
|
10961
|
-
if (I[2] !== void 0 &&
|
|
10972
|
+
function g(T, I) {
|
|
10973
|
+
if (I[2] !== void 0 && T.path && T.path[0] !== "/")
|
|
10962
10974
|
return 'URI path must start with "/" when authority is present.';
|
|
10963
|
-
if (typeof
|
|
10975
|
+
if (typeof T.port == "number" && (T.port < 0 || T.port > 65535))
|
|
10964
10976
|
return "URI port is malformed.";
|
|
10965
10977
|
}
|
|
10966
|
-
function p(
|
|
10978
|
+
function p(T, I) {
|
|
10967
10979
|
const L = Object.assign({}, I), N = {
|
|
10968
10980
|
scheme: void 0,
|
|
10969
10981
|
userinfo: void 0,
|
|
@@ -10974,8 +10986,8 @@ function tg() {
|
|
|
10974
10986
|
fragment: void 0
|
|
10975
10987
|
};
|
|
10976
10988
|
let k = !1, B = !1;
|
|
10977
|
-
L.reference === "suffix" && (L.scheme ?
|
|
10978
|
-
const V =
|
|
10989
|
+
L.reference === "suffix" && (L.scheme ? T = L.scheme + ":" + T : T = "//" + T);
|
|
10990
|
+
const V = T.match(f);
|
|
10979
10991
|
if (V) {
|
|
10980
10992
|
N.scheme = V[1], N.userinfo = V[3], N.host = V[4], N.port = parseInt(V[5], 10), N.path = V[6] || "", N.query = V[7], N.fragment = V[8], isNaN(N.port) && (N.port = V[5]);
|
|
10981
10993
|
const J = g(N, V);
|
|
@@ -10993,7 +11005,7 @@ function tg() {
|
|
|
10993
11005
|
} catch (we) {
|
|
10994
11006
|
N.error = N.error || "Host's domain name can not be converted to ASCII: " + we;
|
|
10995
11007
|
}
|
|
10996
|
-
if ((!ne || ne && !ne.skipNormalize) && (
|
|
11008
|
+
if ((!ne || ne && !ne.skipNormalize) && (T.indexOf("%") !== -1 && (N.scheme !== void 0 && (N.scheme = unescape(N.scheme)), N.host !== void 0 && (N.host = a(unescape(N.host), B))), N.path && (N.path = s(N.path)), N.fragment))
|
|
10997
11009
|
try {
|
|
10998
11010
|
N.fragment = encodeURI(decodeURIComponent(N.fragment));
|
|
10999
11011
|
} catch {
|
|
@@ -11004,33 +11016,33 @@ function tg() {
|
|
|
11004
11016
|
N.error = N.error || "URI can not be parsed.";
|
|
11005
11017
|
return { parsed: N, malformedAuthorityOrPort: k };
|
|
11006
11018
|
}
|
|
11007
|
-
function b(
|
|
11008
|
-
return p(
|
|
11019
|
+
function b(T, I) {
|
|
11020
|
+
return p(T, I).parsed;
|
|
11009
11021
|
}
|
|
11010
|
-
function T
|
|
11011
|
-
return d(
|
|
11022
|
+
function S(T, I) {
|
|
11023
|
+
return d(T, I).normalized;
|
|
11012
11024
|
}
|
|
11013
|
-
function d(
|
|
11014
|
-
const { parsed: L, malformedAuthorityOrPort: N } = p(
|
|
11025
|
+
function d(T, I) {
|
|
11026
|
+
const { parsed: L, malformedAuthorityOrPort: N } = p(T, I);
|
|
11015
11027
|
return {
|
|
11016
|
-
normalized: N ?
|
|
11028
|
+
normalized: N ? T : _(L, I),
|
|
11017
11029
|
malformedAuthorityOrPort: N
|
|
11018
11030
|
};
|
|
11019
11031
|
}
|
|
11020
|
-
function m(
|
|
11021
|
-
if (typeof
|
|
11022
|
-
const { normalized: L, malformedAuthorityOrPort: N } = d(
|
|
11032
|
+
function m(T, I) {
|
|
11033
|
+
if (typeof T == "string") {
|
|
11034
|
+
const { normalized: L, malformedAuthorityOrPort: N } = d(T, I);
|
|
11023
11035
|
return N ? void 0 : L;
|
|
11024
11036
|
}
|
|
11025
|
-
if (typeof
|
|
11026
|
-
return _(
|
|
11037
|
+
if (typeof T == "object")
|
|
11038
|
+
return _(T, I);
|
|
11027
11039
|
}
|
|
11028
11040
|
const w = {
|
|
11029
11041
|
SCHEMES: u,
|
|
11030
11042
|
normalize: h,
|
|
11031
11043
|
resolve: y,
|
|
11032
11044
|
resolveComponent: v,
|
|
11033
|
-
equal:
|
|
11045
|
+
equal: R,
|
|
11034
11046
|
serialize: _,
|
|
11035
11047
|
parse: b
|
|
11036
11048
|
};
|
|
@@ -11067,7 +11079,7 @@ function ng() {
|
|
|
11067
11079
|
} });
|
|
11068
11080
|
const n = Es(), s = cn(), o = ki(), a = bs(), i = te(), c = on(), u = zr(), l = se(), h = Zm, y = rg(), v = (q, P) => new RegExp(q, P);
|
|
11069
11081
|
v.code = "new RegExp";
|
|
11070
|
-
const
|
|
11082
|
+
const R = ["removeAdditional", "useDefaults", "coerceTypes"], _ = /* @__PURE__ */ new Set([
|
|
11071
11083
|
"validate",
|
|
11072
11084
|
"serialize",
|
|
11073
11085
|
"parse",
|
|
@@ -11104,14 +11116,14 @@ function ng() {
|
|
|
11104
11116
|
}, p = 200;
|
|
11105
11117
|
function b(q) {
|
|
11106
11118
|
var P, U, D, E, O, x, z, j, Z, Q, A, C, M, F, G, ee, Ee, Ce, Oe, Ae, be, st, Ie, un, ln;
|
|
11107
|
-
const
|
|
11119
|
+
const Tt = q.strict, dn = (P = q.code) === null || P === void 0 ? void 0 : P.optimize, Ss = dn === !0 || dn === void 0 ? 1 : dn || 0, Os = (D = (U = q.code) === null || U === void 0 ? void 0 : U.regExp) !== null && D !== void 0 ? D : v, rc = (E = q.uriResolver) !== null && E !== void 0 ? E : y.default;
|
|
11108
11120
|
return {
|
|
11109
|
-
strictSchema: (x = (O = q.strictSchema) !== null && O !== void 0 ? O :
|
|
11110
|
-
strictNumbers: (j = (z = q.strictNumbers) !== null && z !== void 0 ? z :
|
|
11111
|
-
strictTypes: (Q = (Z = q.strictTypes) !== null && Z !== void 0 ? Z :
|
|
11112
|
-
strictTuples: (C = (A = q.strictTuples) !== null && A !== void 0 ? A :
|
|
11113
|
-
strictRequired: (F = (M = q.strictRequired) !== null && M !== void 0 ? M :
|
|
11114
|
-
code: q.code ? { ...q.code, optimize:
|
|
11121
|
+
strictSchema: (x = (O = q.strictSchema) !== null && O !== void 0 ? O : Tt) !== null && x !== void 0 ? x : !0,
|
|
11122
|
+
strictNumbers: (j = (z = q.strictNumbers) !== null && z !== void 0 ? z : Tt) !== null && j !== void 0 ? j : !0,
|
|
11123
|
+
strictTypes: (Q = (Z = q.strictTypes) !== null && Z !== void 0 ? Z : Tt) !== null && Q !== void 0 ? Q : "log",
|
|
11124
|
+
strictTuples: (C = (A = q.strictTuples) !== null && A !== void 0 ? A : Tt) !== null && C !== void 0 ? C : "log",
|
|
11125
|
+
strictRequired: (F = (M = q.strictRequired) !== null && M !== void 0 ? M : Tt) !== null && F !== void 0 ? F : !1,
|
|
11126
|
+
code: q.code ? { ...q.code, optimize: Ss, regExp: Os } : { optimize: Ss, regExp: Os },
|
|
11115
11127
|
loopRequired: (G = q.loopRequired) !== null && G !== void 0 ? G : p,
|
|
11116
11128
|
loopEnum: (ee = q.loopEnum) !== null && ee !== void 0 ? ee : p,
|
|
11117
11129
|
meta: (Ee = q.meta) !== null && Ee !== void 0 ? Ee : !0,
|
|
@@ -11126,13 +11138,13 @@ function ng() {
|
|
|
11126
11138
|
uriResolver: rc
|
|
11127
11139
|
};
|
|
11128
11140
|
}
|
|
11129
|
-
class
|
|
11141
|
+
class S {
|
|
11130
11142
|
constructor(P = {}) {
|
|
11131
11143
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), P = this.opts = { ...P, ...b(P) };
|
|
11132
11144
|
const { es5: U, lines: D } = this.opts.code;
|
|
11133
11145
|
this.scope = new i.ValueScope({ scope: {}, prefixes: _, es5: U, lines: D }), this.logger = k(P.logger);
|
|
11134
11146
|
const E = P.validateFormats;
|
|
11135
|
-
P.validateFormats = !1, this.RULES = (0, o.getRules)(), d.call(this, f, P, "NOT SUPPORTED"), d.call(this, g, P, "DEPRECATED", "warn"), this._metaOpts = L.call(this), P.formats &&
|
|
11147
|
+
P.validateFormats = !1, this.RULES = (0, o.getRules)(), d.call(this, f, P, "NOT SUPPORTED"), d.call(this, g, P, "DEPRECATED", "warn"), this._metaOpts = L.call(this), P.formats && T.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), P.keywords && I.call(this, P.keywords), typeof P.meta == "object" && this.addMetaSchema(P.meta), w.call(this), P.validateFormats = E;
|
|
11136
11148
|
}
|
|
11137
11149
|
_addVocabularies() {
|
|
11138
11150
|
this.addKeyword("$async");
|
|
@@ -11385,7 +11397,7 @@ function ng() {
|
|
|
11385
11397
|
}
|
|
11386
11398
|
}
|
|
11387
11399
|
}
|
|
11388
|
-
|
|
11400
|
+
S.ValidationError = n.default, S.MissingRefError = s.default, t.default = S;
|
|
11389
11401
|
function d(q, P, U, D = "error") {
|
|
11390
11402
|
for (const E in q) {
|
|
11391
11403
|
const O = E;
|
|
@@ -11404,7 +11416,7 @@ function ng() {
|
|
|
11404
11416
|
for (const P in q)
|
|
11405
11417
|
this.addSchema(q[P], P);
|
|
11406
11418
|
}
|
|
11407
|
-
function
|
|
11419
|
+
function T() {
|
|
11408
11420
|
for (const q in this.opts.formats) {
|
|
11409
11421
|
const P = this.opts.formats[q];
|
|
11410
11422
|
P && this.addFormat(q, P);
|
|
@@ -11423,7 +11435,7 @@ function ng() {
|
|
|
11423
11435
|
}
|
|
11424
11436
|
function L() {
|
|
11425
11437
|
const q = { ...this.opts };
|
|
11426
|
-
for (const P of
|
|
11438
|
+
for (const P of R)
|
|
11427
11439
|
delete q[P];
|
|
11428
11440
|
return q;
|
|
11429
11441
|
}
|
|
@@ -11484,7 +11496,7 @@ function ng() {
|
|
|
11484
11496
|
function oe(q) {
|
|
11485
11497
|
return { anyOf: [q, re] };
|
|
11486
11498
|
}
|
|
11487
|
-
})(
|
|
11499
|
+
})(Sn)), Sn;
|
|
11488
11500
|
}
|
|
11489
11501
|
var Xt = {}, Zt = {}, er = {}, Ho;
|
|
11490
11502
|
function sg() {
|
|
@@ -11506,31 +11518,31 @@ function og() {
|
|
|
11506
11518
|
keyword: "$ref",
|
|
11507
11519
|
schemaType: "string",
|
|
11508
11520
|
code(u) {
|
|
11509
|
-
const { gen: l, schema: h, it: y } = u, { baseId: v, schemaEnv:
|
|
11521
|
+
const { gen: l, schema: h, it: y } = u, { baseId: v, schemaEnv: R, validateName: _, opts: f, self: g } = y, { root: p } = R;
|
|
11510
11522
|
if ((h === "#" || h === "#/") && v === p.baseId)
|
|
11511
|
-
return
|
|
11523
|
+
return S();
|
|
11512
11524
|
const b = s.resolveRef.call(g, p, v, h);
|
|
11513
11525
|
if (b === void 0)
|
|
11514
11526
|
throw new t.default(y.opts.uriResolver, v, h);
|
|
11515
11527
|
if (b instanceof s.SchemaEnv)
|
|
11516
11528
|
return d(b);
|
|
11517
11529
|
return m(b);
|
|
11518
|
-
function
|
|
11519
|
-
if (
|
|
11520
|
-
return c(u, _,
|
|
11530
|
+
function S() {
|
|
11531
|
+
if (R === p)
|
|
11532
|
+
return c(u, _, R, R.$async);
|
|
11521
11533
|
const w = l.scopeValue("root", { ref: p });
|
|
11522
11534
|
return c(u, (0, r._)`${w}.validate`, p, p.$async);
|
|
11523
11535
|
}
|
|
11524
11536
|
function d(w) {
|
|
11525
|
-
const
|
|
11526
|
-
c(u,
|
|
11537
|
+
const T = i(u, w);
|
|
11538
|
+
c(u, T, w, w.$async);
|
|
11527
11539
|
}
|
|
11528
11540
|
function m(w) {
|
|
11529
|
-
const
|
|
11541
|
+
const T = l.scopeValue("schema", f.code.source === !0 ? { ref: w, code: (0, r.stringify)(w) } : { ref: w }), I = l.name("valid"), L = u.subschema({
|
|
11530
11542
|
schema: w,
|
|
11531
11543
|
dataTypes: [],
|
|
11532
11544
|
schemaPath: r.nil,
|
|
11533
|
-
topSchemaRef:
|
|
11545
|
+
topSchemaRef: T,
|
|
11534
11546
|
errSchemaPath: h
|
|
11535
11547
|
}, I);
|
|
11536
11548
|
u.mergeEvaluated(L), u.ok(I);
|
|
@@ -11543,43 +11555,43 @@ function og() {
|
|
|
11543
11555
|
}
|
|
11544
11556
|
ze.getValidate = i;
|
|
11545
11557
|
function c(u, l, h, y) {
|
|
11546
|
-
const { gen: v, it:
|
|
11547
|
-
y ? b() :
|
|
11558
|
+
const { gen: v, it: R } = u, { allErrors: _, schemaEnv: f, opts: g } = R, p = g.passContext ? n.default.this : r.nil;
|
|
11559
|
+
y ? b() : S();
|
|
11548
11560
|
function b() {
|
|
11549
11561
|
if (!f.$async)
|
|
11550
11562
|
throw new Error("async schema referenced by sync schema");
|
|
11551
11563
|
const w = v.let("valid");
|
|
11552
11564
|
v.try(() => {
|
|
11553
11565
|
v.code((0, r._)`await ${(0, e.callValidateCode)(u, l, p)}`), m(l), _ || v.assign(w, !0);
|
|
11554
|
-
}, (
|
|
11555
|
-
v.if((0, r._)`!(${
|
|
11566
|
+
}, (T) => {
|
|
11567
|
+
v.if((0, r._)`!(${T} instanceof ${R.ValidationError})`, () => v.throw(T)), d(T), _ || v.assign(w, !1);
|
|
11556
11568
|
}), u.ok(w);
|
|
11557
11569
|
}
|
|
11558
|
-
function
|
|
11570
|
+
function S() {
|
|
11559
11571
|
u.result((0, e.callValidateCode)(u, l, p), () => m(l), () => d(l));
|
|
11560
11572
|
}
|
|
11561
11573
|
function d(w) {
|
|
11562
|
-
const
|
|
11563
|
-
v.assign(n.default.vErrors, (0, r._)`${n.default.vErrors} === null ? ${
|
|
11574
|
+
const T = (0, r._)`${w}.errors`;
|
|
11575
|
+
v.assign(n.default.vErrors, (0, r._)`${n.default.vErrors} === null ? ${T} : ${n.default.vErrors}.concat(${T})`), v.assign(n.default.errors, (0, r._)`${n.default.vErrors}.length`);
|
|
11564
11576
|
}
|
|
11565
11577
|
function m(w) {
|
|
11566
|
-
var
|
|
11567
|
-
if (!
|
|
11578
|
+
var T;
|
|
11579
|
+
if (!R.opts.unevaluated)
|
|
11568
11580
|
return;
|
|
11569
|
-
const I = (
|
|
11570
|
-
if (
|
|
11581
|
+
const I = (T = h?.validate) === null || T === void 0 ? void 0 : T.evaluated;
|
|
11582
|
+
if (R.props !== !0)
|
|
11571
11583
|
if (I && !I.dynamicProps)
|
|
11572
|
-
I.props !== void 0 && (
|
|
11584
|
+
I.props !== void 0 && (R.props = o.mergeEvaluated.props(v, I.props, R.props));
|
|
11573
11585
|
else {
|
|
11574
11586
|
const L = v.var("props", (0, r._)`${w}.evaluated.props`);
|
|
11575
|
-
|
|
11587
|
+
R.props = o.mergeEvaluated.props(v, L, R.props, r.Name);
|
|
11576
11588
|
}
|
|
11577
|
-
if (
|
|
11589
|
+
if (R.items !== !0)
|
|
11578
11590
|
if (I && !I.dynamicItems)
|
|
11579
|
-
I.items !== void 0 && (
|
|
11591
|
+
I.items !== void 0 && (R.items = o.mergeEvaluated.items(v, I.items, R.items));
|
|
11580
11592
|
else {
|
|
11581
11593
|
const L = v.var("items", (0, r._)`${w}.evaluated.items`);
|
|
11582
|
-
|
|
11594
|
+
R.items = o.mergeEvaluated.items(v, L, R.items, r.Name);
|
|
11583
11595
|
}
|
|
11584
11596
|
}
|
|
11585
11597
|
}
|
|
@@ -11743,15 +11755,15 @@ function pg() {
|
|
|
11743
11755
|
if (!l && i.length === 0)
|
|
11744
11756
|
return;
|
|
11745
11757
|
const v = i.length >= y.loopRequired;
|
|
11746
|
-
if (h.allErrors ?
|
|
11758
|
+
if (h.allErrors ? R() : _(), y.strictRequired) {
|
|
11747
11759
|
const p = o.parentSchema.properties, { definedProperties: b } = o.it;
|
|
11748
|
-
for (const
|
|
11749
|
-
if (p?.[
|
|
11750
|
-
const d = h.schemaEnv.baseId + h.errSchemaPath, m = `required property "${
|
|
11760
|
+
for (const S of i)
|
|
11761
|
+
if (p?.[S] === void 0 && !b.has(S)) {
|
|
11762
|
+
const d = h.schemaEnv.baseId + h.errSchemaPath, m = `required property "${S}" is not defined at "${d}" (strictRequired)`;
|
|
11751
11763
|
(0, r.checkStrictMode)(h, m, h.opts.strictRequired);
|
|
11752
11764
|
}
|
|
11753
11765
|
}
|
|
11754
|
-
function
|
|
11766
|
+
function R() {
|
|
11755
11767
|
if (v || l)
|
|
11756
11768
|
o.block$data(e.nil, f);
|
|
11757
11769
|
else
|
|
@@ -11829,27 +11841,27 @@ function mg() {
|
|
|
11829
11841
|
const { gen: i, data: c, $data: u, schema: l, parentSchema: h, schemaCode: y, it: v } = a;
|
|
11830
11842
|
if (!u && !l)
|
|
11831
11843
|
return;
|
|
11832
|
-
const
|
|
11833
|
-
a.block$data(
|
|
11844
|
+
const R = i.let("valid"), _ = h.items ? (0, t.getSchemaTypes)(h.items) : [];
|
|
11845
|
+
a.block$data(R, f, (0, e._)`${y} === false`), a.ok(R);
|
|
11834
11846
|
function f() {
|
|
11835
|
-
const
|
|
11836
|
-
a.setParams({ i:
|
|
11847
|
+
const S = i.let("i", (0, e._)`${c}.length`), d = i.let("j");
|
|
11848
|
+
a.setParams({ i: S, j: d }), i.assign(R, !0), i.if((0, e._)`${S} > 1`, () => (g() ? p : b)(S, d));
|
|
11837
11849
|
}
|
|
11838
11850
|
function g() {
|
|
11839
|
-
return _.length > 0 && !_.some((
|
|
11840
|
-
}
|
|
11841
|
-
function p(
|
|
11842
|
-
const m = i.name("item"), w = (0, t.checkDataTypes)(_, m, v.opts.strictNumbers, t.DataType.Wrong),
|
|
11843
|
-
i.for((0, e._)`;${
|
|
11844
|
-
i.let(m, (0, e._)`${c}[${
|
|
11845
|
-
i.assign(d, (0, e._)`${
|
|
11846
|
-
}).code((0, e._)`${
|
|
11851
|
+
return _.length > 0 && !_.some((S) => S === "object" || S === "array");
|
|
11852
|
+
}
|
|
11853
|
+
function p(S, d) {
|
|
11854
|
+
const m = i.name("item"), w = (0, t.checkDataTypes)(_, m, v.opts.strictNumbers, t.DataType.Wrong), T = i.const("indices", (0, e._)`{}`);
|
|
11855
|
+
i.for((0, e._)`;${S}--;`, () => {
|
|
11856
|
+
i.let(m, (0, e._)`${c}[${S}]`), i.if(w, (0, e._)`continue`), _.length > 1 && i.if((0, e._)`typeof ${m} == "string"`, (0, e._)`${m} += "_"`), i.if((0, e._)`typeof ${T}[${m}] == "number"`, () => {
|
|
11857
|
+
i.assign(d, (0, e._)`${T}[${m}]`), a.error(), i.assign(R, !1).break();
|
|
11858
|
+
}).code((0, e._)`${T}[${m}] = ${S}`);
|
|
11847
11859
|
});
|
|
11848
11860
|
}
|
|
11849
|
-
function b(
|
|
11861
|
+
function b(S, d) {
|
|
11850
11862
|
const m = (0, r.useFunc)(i, n.default), w = i.name("outer");
|
|
11851
|
-
i.label(w).for((0, e._)`;${
|
|
11852
|
-
a.error(), i.assign(
|
|
11863
|
+
i.label(w).for((0, e._)`;${S}--;`, () => i.for((0, e._)`${d} = ${S}; ${d}--;`, () => i.if((0, e._)`${m}(${c}[${S}], ${c}[${d}])`, () => {
|
|
11864
|
+
a.error(), i.assign(R, !1).break(w);
|
|
11853
11865
|
})));
|
|
11854
11866
|
}
|
|
11855
11867
|
}
|
|
@@ -11892,7 +11904,7 @@ function yg() {
|
|
|
11892
11904
|
throw new Error("enum must have non-empty array");
|
|
11893
11905
|
const y = u.length >= h.opts.loopEnum;
|
|
11894
11906
|
let v;
|
|
11895
|
-
const
|
|
11907
|
+
const R = () => v ?? (v = (0, e.useFunc)(a, r.default));
|
|
11896
11908
|
let _;
|
|
11897
11909
|
if (y || c)
|
|
11898
11910
|
_ = a.let("valid"), o.block$data(_, f);
|
|
@@ -11900,15 +11912,15 @@ function yg() {
|
|
|
11900
11912
|
if (!Array.isArray(u))
|
|
11901
11913
|
throw new Error("ajv implementation error");
|
|
11902
11914
|
const p = a.const("vSchema", l);
|
|
11903
|
-
_ = (0, t.or)(...u.map((b,
|
|
11915
|
+
_ = (0, t.or)(...u.map((b, S) => g(p, S)));
|
|
11904
11916
|
}
|
|
11905
11917
|
o.pass(_);
|
|
11906
11918
|
function f() {
|
|
11907
|
-
a.assign(_, !1), a.forOf("v", l, (p) => a.if((0, t._)`${
|
|
11919
|
+
a.assign(_, !1), a.forOf("v", l, (p) => a.if((0, t._)`${R()}(${i}, ${p})`, () => a.assign(_, !0).break()));
|
|
11908
11920
|
}
|
|
11909
11921
|
function g(p, b) {
|
|
11910
|
-
const
|
|
11911
|
-
return typeof
|
|
11922
|
+
const S = u[b];
|
|
11923
|
+
return typeof S == "object" && S !== null ? (0, t._)`${R()}(${i}, ${p}[${b}])` : (0, t._)`${i} === ${S}`;
|
|
11912
11924
|
}
|
|
11913
11925
|
}
|
|
11914
11926
|
};
|
|
@@ -11968,12 +11980,12 @@ function Fi() {
|
|
|
11968
11980
|
if (c === !1)
|
|
11969
11981
|
o.setParams({ len: a.length }), o.pass((0, t._)`${y} <= ${a.length}`);
|
|
11970
11982
|
else if (typeof c == "object" && !(0, e.alwaysValidSchema)(h, c)) {
|
|
11971
|
-
const
|
|
11972
|
-
i.if((0, t.not)(
|
|
11983
|
+
const R = i.var("valid", (0, t._)`${y} <= ${a.length}`);
|
|
11984
|
+
i.if((0, t.not)(R), () => v(R)), o.ok(R);
|
|
11973
11985
|
}
|
|
11974
|
-
function v(
|
|
11986
|
+
function v(R) {
|
|
11975
11987
|
i.forRange("i", a.length, y, (_) => {
|
|
11976
|
-
o.subschema({ keyword: l, dataProp: _, dataPropType: e.Type.Num },
|
|
11988
|
+
o.subschema({ keyword: l, dataProp: _, dataPropType: e.Type.Num }, R), h.allErrors || i.if((0, t.not)(R), () => i.break());
|
|
11977
11989
|
});
|
|
11978
11990
|
}
|
|
11979
11991
|
}
|
|
@@ -11998,17 +12010,17 @@ function ji() {
|
|
|
11998
12010
|
function s(o, a, i = o.schema) {
|
|
11999
12011
|
const { gen: c, parentSchema: u, data: l, keyword: h, it: y } = o;
|
|
12000
12012
|
_(u), y.opts.unevaluated && i.length && y.items !== !0 && (y.items = e.mergeEvaluated.items(c, i.length, y.items));
|
|
12001
|
-
const v = c.name("valid"),
|
|
12013
|
+
const v = c.name("valid"), R = c.const("len", (0, t._)`${l}.length`);
|
|
12002
12014
|
i.forEach((f, g) => {
|
|
12003
|
-
(0, e.alwaysValidSchema)(y, f) || (c.if((0, t._)`${
|
|
12015
|
+
(0, e.alwaysValidSchema)(y, f) || (c.if((0, t._)`${R} > ${g}`, () => o.subschema({
|
|
12004
12016
|
keyword: h,
|
|
12005
12017
|
schemaProp: g,
|
|
12006
12018
|
dataProp: g
|
|
12007
12019
|
}, v)), o.ok(v));
|
|
12008
12020
|
});
|
|
12009
12021
|
function _(f) {
|
|
12010
|
-
const { opts: g, errSchemaPath: p } = y, b = i.length,
|
|
12011
|
-
if (g.strictTuples && !
|
|
12022
|
+
const { opts: g, errSchemaPath: p } = y, b = i.length, S = b === f.minItems && (b === f.maxItems || f[a] === !1);
|
|
12023
|
+
if (g.strictTuples && !S) {
|
|
12012
12024
|
const d = `"${h}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${p}"`;
|
|
12013
12025
|
(0, e.checkStrictMode)(y, d, g.strictTuples);
|
|
12014
12026
|
}
|
|
@@ -12068,7 +12080,7 @@ function _g() {
|
|
|
12068
12080
|
let l, h;
|
|
12069
12081
|
const { minContains: y, maxContains: v } = i;
|
|
12070
12082
|
u.opts.next ? (l = y === void 0 ? 1 : y, h = v) : l = 1;
|
|
12071
|
-
const
|
|
12083
|
+
const R = o.const("len", (0, t._)`${c}.length`);
|
|
12072
12084
|
if (s.setParams({ min: l, max: h }), h === void 0 && l === 0) {
|
|
12073
12085
|
(0, e.checkStrictMode)(u, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
|
|
12074
12086
|
return;
|
|
@@ -12078,25 +12090,25 @@ function _g() {
|
|
|
12078
12090
|
return;
|
|
12079
12091
|
}
|
|
12080
12092
|
if ((0, e.alwaysValidSchema)(u, a)) {
|
|
12081
|
-
let b = (0, t._)`${
|
|
12082
|
-
h !== void 0 && (b = (0, t._)`${b} && ${
|
|
12093
|
+
let b = (0, t._)`${R} >= ${l}`;
|
|
12094
|
+
h !== void 0 && (b = (0, t._)`${b} && ${R} <= ${h}`), s.pass(b);
|
|
12083
12095
|
return;
|
|
12084
12096
|
}
|
|
12085
12097
|
u.items = !0;
|
|
12086
12098
|
const _ = o.name("valid");
|
|
12087
12099
|
h === void 0 && l === 1 ? g(_, () => o.if(_, () => o.break())) : l === 0 ? (o.let(_, !0), h !== void 0 && o.if((0, t._)`${c}.length > 0`, f)) : (o.let(_, !1), f()), s.result(_, () => s.reset());
|
|
12088
12100
|
function f() {
|
|
12089
|
-
const b = o.name("_valid"),
|
|
12090
|
-
g(b, () => o.if(b, () => p(
|
|
12101
|
+
const b = o.name("_valid"), S = o.let("count", 0);
|
|
12102
|
+
g(b, () => o.if(b, () => p(S)));
|
|
12091
12103
|
}
|
|
12092
|
-
function g(b,
|
|
12093
|
-
o.forRange("i", 0,
|
|
12104
|
+
function g(b, S) {
|
|
12105
|
+
o.forRange("i", 0, R, (d) => {
|
|
12094
12106
|
s.subschema({
|
|
12095
12107
|
keyword: "contains",
|
|
12096
12108
|
dataProp: d,
|
|
12097
12109
|
dataPropType: e.Type.Num,
|
|
12098
12110
|
compositeRule: !0
|
|
12099
|
-
}, b),
|
|
12111
|
+
}, b), S();
|
|
12100
12112
|
});
|
|
12101
12113
|
}
|
|
12102
12114
|
function p(b) {
|
|
@@ -12147,13 +12159,13 @@ function vg() {
|
|
|
12147
12159
|
if (Object.keys(u).length === 0)
|
|
12148
12160
|
return;
|
|
12149
12161
|
const v = l.let("missing");
|
|
12150
|
-
for (const
|
|
12151
|
-
const _ = u[
|
|
12162
|
+
for (const R in u) {
|
|
12163
|
+
const _ = u[R];
|
|
12152
12164
|
if (_.length === 0)
|
|
12153
12165
|
continue;
|
|
12154
|
-
const f = (0, n.propertyInData)(l, h,
|
|
12166
|
+
const f = (0, n.propertyInData)(l, h, R, y.opts.ownProperties);
|
|
12155
12167
|
c.setParams({
|
|
12156
|
-
property:
|
|
12168
|
+
property: R,
|
|
12157
12169
|
depsCount: _.length,
|
|
12158
12170
|
deps: _.join(", ")
|
|
12159
12171
|
}), y.allErrors ? l.if(f, () => {
|
|
@@ -12164,23 +12176,23 @@ function vg() {
|
|
|
12164
12176
|
}
|
|
12165
12177
|
t.validatePropertyDeps = a;
|
|
12166
12178
|
function i(c, u = c.schema) {
|
|
12167
|
-
const { gen: l, data: h, keyword: y, it: v } = c,
|
|
12179
|
+
const { gen: l, data: h, keyword: y, it: v } = c, R = l.name("valid");
|
|
12168
12180
|
for (const _ in u)
|
|
12169
12181
|
(0, r.alwaysValidSchema)(v, u[_]) || (l.if(
|
|
12170
12182
|
(0, n.propertyInData)(l, h, _, v.opts.ownProperties),
|
|
12171
12183
|
() => {
|
|
12172
|
-
const f = c.subschema({ keyword: y, schemaProp: _ },
|
|
12173
|
-
c.mergeValidEvaluated(f,
|
|
12184
|
+
const f = c.subschema({ keyword: y, schemaProp: _ }, R);
|
|
12185
|
+
c.mergeValidEvaluated(f, R);
|
|
12174
12186
|
},
|
|
12175
|
-
() => l.var(
|
|
12187
|
+
() => l.var(R, !0)
|
|
12176
12188
|
// TODO var
|
|
12177
|
-
), c.ok(
|
|
12189
|
+
), c.ok(R));
|
|
12178
12190
|
}
|
|
12179
12191
|
t.validateSchemaDeps = i, t.default = s;
|
|
12180
12192
|
})(Ln)), Ln;
|
|
12181
12193
|
}
|
|
12182
12194
|
var wr = {}, da;
|
|
12183
|
-
function
|
|
12195
|
+
function Tg() {
|
|
12184
12196
|
if (da) return wr;
|
|
12185
12197
|
da = 1, Object.defineProperty(wr, "__esModule", { value: !0 });
|
|
12186
12198
|
const t = te(), e = se(), n = {
|
|
@@ -12229,29 +12241,29 @@ function Vi() {
|
|
|
12229
12241
|
const { gen: i, schema: c, parentSchema: u, data: l, errsCount: h, it: y } = a;
|
|
12230
12242
|
if (!h)
|
|
12231
12243
|
throw new Error("ajv implementation error");
|
|
12232
|
-
const { allErrors: v, opts:
|
|
12233
|
-
if (y.props = !0,
|
|
12244
|
+
const { allErrors: v, opts: R } = y;
|
|
12245
|
+
if (y.props = !0, R.removeAdditional !== "all" && (0, n.alwaysValidSchema)(y, c))
|
|
12234
12246
|
return;
|
|
12235
12247
|
const _ = (0, t.allSchemaProperties)(u.properties), f = (0, t.allSchemaProperties)(u.patternProperties);
|
|
12236
12248
|
g(), a.ok((0, e._)`${h} === ${r.default.errors}`);
|
|
12237
12249
|
function g() {
|
|
12238
12250
|
i.forIn("key", l, (m) => {
|
|
12239
|
-
!_.length && !f.length ?
|
|
12251
|
+
!_.length && !f.length ? S(m) : i.if(p(m), () => S(m));
|
|
12240
12252
|
});
|
|
12241
12253
|
}
|
|
12242
12254
|
function p(m) {
|
|
12243
12255
|
let w;
|
|
12244
12256
|
if (_.length > 8) {
|
|
12245
|
-
const
|
|
12246
|
-
w = (0, t.isOwnProperty)(i,
|
|
12247
|
-
} else _.length ? w = (0, e.or)(..._.map((
|
|
12248
|
-
return f.length && (w = (0, e.or)(w, ...f.map((
|
|
12257
|
+
const T = (0, n.schemaRefOrVal)(y, u.properties, "properties");
|
|
12258
|
+
w = (0, t.isOwnProperty)(i, T, m);
|
|
12259
|
+
} else _.length ? w = (0, e.or)(..._.map((T) => (0, e._)`${m} === ${T}`)) : w = e.nil;
|
|
12260
|
+
return f.length && (w = (0, e.or)(w, ...f.map((T) => (0, e._)`${(0, t.usePattern)(a, T)}.test(${m})`))), (0, e.not)(w);
|
|
12249
12261
|
}
|
|
12250
12262
|
function b(m) {
|
|
12251
12263
|
i.code((0, e._)`delete ${l}[${m}]`);
|
|
12252
12264
|
}
|
|
12253
|
-
function
|
|
12254
|
-
if (
|
|
12265
|
+
function S(m) {
|
|
12266
|
+
if (R.removeAdditional === "all" || R.removeAdditional && c === !1) {
|
|
12255
12267
|
b(m);
|
|
12256
12268
|
return;
|
|
12257
12269
|
}
|
|
@@ -12261,18 +12273,18 @@ function Vi() {
|
|
|
12261
12273
|
}
|
|
12262
12274
|
if (typeof c == "object" && !(0, n.alwaysValidSchema)(y, c)) {
|
|
12263
12275
|
const w = i.name("valid");
|
|
12264
|
-
|
|
12276
|
+
R.removeAdditional === "failing" ? (d(m, w, !1), i.if((0, e.not)(w), () => {
|
|
12265
12277
|
a.reset(), b(m);
|
|
12266
12278
|
})) : (d(m, w), v || i.if((0, e.not)(w), () => i.break()));
|
|
12267
12279
|
}
|
|
12268
12280
|
}
|
|
12269
|
-
function d(m, w,
|
|
12281
|
+
function d(m, w, T) {
|
|
12270
12282
|
const I = {
|
|
12271
12283
|
keyword: "additionalProperties",
|
|
12272
12284
|
dataProp: m,
|
|
12273
12285
|
dataPropType: n.Type.Str
|
|
12274
12286
|
};
|
|
12275
|
-
|
|
12287
|
+
T === !1 && Object.assign(I, {
|
|
12276
12288
|
compositeRule: !0,
|
|
12277
12289
|
createErrors: !1,
|
|
12278
12290
|
allErrors: !1
|
|
@@ -12283,7 +12295,7 @@ function Vi() {
|
|
|
12283
12295
|
return Er.default = o, Er;
|
|
12284
12296
|
}
|
|
12285
12297
|
var br = {}, pa;
|
|
12286
|
-
function
|
|
12298
|
+
function Rg() {
|
|
12287
12299
|
if (pa) return br;
|
|
12288
12300
|
pa = 1, Object.defineProperty(br, "__esModule", { value: !0 });
|
|
12289
12301
|
const t = an(), e = ke(), r = se(), n = Vi(), s = {
|
|
@@ -12302,8 +12314,8 @@ function Sg() {
|
|
|
12302
12314
|
return;
|
|
12303
12315
|
const v = a.name("valid");
|
|
12304
12316
|
for (const f of y)
|
|
12305
|
-
|
|
12306
|
-
function
|
|
12317
|
+
R(f) ? _(f) : (a.if((0, e.propertyInData)(a, u, f, l.opts.ownProperties)), _(f), l.allErrors || a.else().var(v, !0), a.endIf()), o.it.definedProperties.add(f), o.ok(v);
|
|
12318
|
+
function R(f) {
|
|
12307
12319
|
return l.opts.useDefaults && !l.compositeRule && i[f].default !== void 0;
|
|
12308
12320
|
}
|
|
12309
12321
|
function _(f) {
|
|
@@ -12318,7 +12330,7 @@ function Sg() {
|
|
|
12318
12330
|
return br.default = s, br;
|
|
12319
12331
|
}
|
|
12320
12332
|
var _r = {}, ha;
|
|
12321
|
-
function
|
|
12333
|
+
function Sg() {
|
|
12322
12334
|
if (ha) return _r;
|
|
12323
12335
|
ha = 1, Object.defineProperty(_r, "__esModule", { value: !0 });
|
|
12324
12336
|
const t = ke(), e = te(), r = se(), n = se(), s = {
|
|
@@ -12326,28 +12338,28 @@ function Tg() {
|
|
|
12326
12338
|
type: "object",
|
|
12327
12339
|
schemaType: "object",
|
|
12328
12340
|
code(o) {
|
|
12329
|
-
const { gen: a, schema: i, data: c, parentSchema: u, it: l } = o, { opts: h } = l, y = (0, t.allSchemaProperties)(i), v = y.filter((
|
|
12341
|
+
const { gen: a, schema: i, data: c, parentSchema: u, it: l } = o, { opts: h } = l, y = (0, t.allSchemaProperties)(i), v = y.filter((S) => (0, r.alwaysValidSchema)(l, i[S]));
|
|
12330
12342
|
if (y.length === 0 || v.length === y.length && (!l.opts.unevaluated || l.props === !0))
|
|
12331
12343
|
return;
|
|
12332
|
-
const
|
|
12344
|
+
const R = h.strictSchema && !h.allowMatchingProperties && u.properties, _ = a.name("valid");
|
|
12333
12345
|
l.props !== !0 && !(l.props instanceof e.Name) && (l.props = (0, n.evaluatedPropsToName)(a, l.props));
|
|
12334
12346
|
const { props: f } = l;
|
|
12335
12347
|
g();
|
|
12336
12348
|
function g() {
|
|
12337
|
-
for (const
|
|
12338
|
-
|
|
12349
|
+
for (const S of y)
|
|
12350
|
+
R && p(S), l.allErrors ? b(S) : (a.var(_, !0), b(S), a.if(_));
|
|
12339
12351
|
}
|
|
12340
|
-
function p(
|
|
12341
|
-
for (const d in
|
|
12342
|
-
new RegExp(
|
|
12352
|
+
function p(S) {
|
|
12353
|
+
for (const d in R)
|
|
12354
|
+
new RegExp(S).test(d) && (0, r.checkStrictMode)(l, `property ${d} matches pattern ${S} (use allowMatchingProperties)`);
|
|
12343
12355
|
}
|
|
12344
|
-
function b(
|
|
12356
|
+
function b(S) {
|
|
12345
12357
|
a.forIn("key", c, (d) => {
|
|
12346
|
-
a.if((0, e._)`${(0, t.usePattern)(o,
|
|
12347
|
-
const m = v.includes(
|
|
12358
|
+
a.if((0, e._)`${(0, t.usePattern)(o, S)}.test(${d})`, () => {
|
|
12359
|
+
const m = v.includes(S);
|
|
12348
12360
|
m || o.subschema({
|
|
12349
12361
|
keyword: "patternProperties",
|
|
12350
|
-
schemaProp:
|
|
12362
|
+
schemaProp: S,
|
|
12351
12363
|
dataProp: d,
|
|
12352
12364
|
dataPropType: n.Type.Str
|
|
12353
12365
|
}, _), l.opts.unevaluated && f !== !0 ? a.assign((0, e._)`${f}[${d}]`, !0) : !m && !l.allErrors && a.if((0, e.not)(_), () => a.break());
|
|
@@ -12384,10 +12396,10 @@ function Og() {
|
|
|
12384
12396
|
};
|
|
12385
12397
|
return vr.default = e, vr;
|
|
12386
12398
|
}
|
|
12387
|
-
var
|
|
12399
|
+
var Tr = {}, ga;
|
|
12388
12400
|
function Ag() {
|
|
12389
|
-
if (ga) return
|
|
12390
|
-
ga = 1, Object.defineProperty(
|
|
12401
|
+
if (ga) return Tr;
|
|
12402
|
+
ga = 1, Object.defineProperty(Tr, "__esModule", { value: !0 });
|
|
12391
12403
|
const e = {
|
|
12392
12404
|
keyword: "anyOf",
|
|
12393
12405
|
schemaType: "array",
|
|
@@ -12395,12 +12407,12 @@ function Ag() {
|
|
|
12395
12407
|
code: ke().validateUnion,
|
|
12396
12408
|
error: { message: "must match a schema in anyOf" }
|
|
12397
12409
|
};
|
|
12398
|
-
return
|
|
12410
|
+
return Tr.default = e, Tr;
|
|
12399
12411
|
}
|
|
12400
|
-
var
|
|
12412
|
+
var Rr = {}, ya;
|
|
12401
12413
|
function Ng() {
|
|
12402
|
-
if (ya) return
|
|
12403
|
-
ya = 1, Object.defineProperty(
|
|
12414
|
+
if (ya) return Rr;
|
|
12415
|
+
ya = 1, Object.defineProperty(Rr, "__esModule", { value: !0 });
|
|
12404
12416
|
const t = te(), e = se(), n = {
|
|
12405
12417
|
keyword: "oneOf",
|
|
12406
12418
|
schemaType: "array",
|
|
@@ -12418,9 +12430,9 @@ function Ng() {
|
|
|
12418
12430
|
const u = a, l = o.let("valid", !1), h = o.let("passing", null), y = o.name("_valid");
|
|
12419
12431
|
s.setParams({ passing: h }), o.block(v), s.result(l, () => s.reset(), () => s.error(!0));
|
|
12420
12432
|
function v() {
|
|
12421
|
-
u.forEach((
|
|
12433
|
+
u.forEach((R, _) => {
|
|
12422
12434
|
let f;
|
|
12423
|
-
(0, e.alwaysValidSchema)(c,
|
|
12435
|
+
(0, e.alwaysValidSchema)(c, R) ? o.var(y, !0) : f = s.subschema({
|
|
12424
12436
|
keyword: "oneOf",
|
|
12425
12437
|
schemaProp: _,
|
|
12426
12438
|
compositeRule: !0
|
|
@@ -12431,12 +12443,12 @@ function Ng() {
|
|
|
12431
12443
|
}
|
|
12432
12444
|
}
|
|
12433
12445
|
};
|
|
12434
|
-
return
|
|
12446
|
+
return Rr.default = n, Rr;
|
|
12435
12447
|
}
|
|
12436
|
-
var
|
|
12448
|
+
var Sr = {}, wa;
|
|
12437
12449
|
function Pg() {
|
|
12438
|
-
if (wa) return
|
|
12439
|
-
wa = 1, Object.defineProperty(
|
|
12450
|
+
if (wa) return Sr;
|
|
12451
|
+
wa = 1, Object.defineProperty(Sr, "__esModule", { value: !0 });
|
|
12440
12452
|
const t = se(), e = {
|
|
12441
12453
|
keyword: "allOf",
|
|
12442
12454
|
schemaType: "array",
|
|
@@ -12453,7 +12465,7 @@ function Pg() {
|
|
|
12453
12465
|
});
|
|
12454
12466
|
}
|
|
12455
12467
|
};
|
|
12456
|
-
return
|
|
12468
|
+
return Sr.default = e, Sr;
|
|
12457
12469
|
}
|
|
12458
12470
|
var Or = {}, Ea;
|
|
12459
12471
|
function Ig() {
|
|
@@ -12476,8 +12488,8 @@ function Ig() {
|
|
|
12476
12488
|
const h = a.let("valid", !0), y = a.name("_valid");
|
|
12477
12489
|
if (v(), o.reset(), u && l) {
|
|
12478
12490
|
const _ = a.let("ifClause");
|
|
12479
|
-
o.setParams({ ifClause: _ }), a.if(y,
|
|
12480
|
-
} else u ? a.if(y,
|
|
12491
|
+
o.setParams({ ifClause: _ }), a.if(y, R("then", _), R("else", _));
|
|
12492
|
+
} else u ? a.if(y, R("then")) : a.if((0, t.not)(y), R("else"));
|
|
12481
12493
|
o.pass(h, () => o.error(!0));
|
|
12482
12494
|
function v() {
|
|
12483
12495
|
const _ = o.subschema({
|
|
@@ -12488,7 +12500,7 @@ function Ig() {
|
|
|
12488
12500
|
}, y);
|
|
12489
12501
|
o.mergeEvaluated(_);
|
|
12490
12502
|
}
|
|
12491
|
-
function
|
|
12503
|
+
function R(_, f) {
|
|
12492
12504
|
return () => {
|
|
12493
12505
|
const g = o.subschema({ keyword: _ }, y);
|
|
12494
12506
|
a.assign(h, y), o.mergeValidEvaluated(g, h), f ? a.assign(f, (0, t._)`${_}`) : o.setParams({ ifClause: _ });
|
|
@@ -12519,7 +12531,7 @@ var _a;
|
|
|
12519
12531
|
function Dg() {
|
|
12520
12532
|
if (_a) return hr;
|
|
12521
12533
|
_a = 1, Object.defineProperty(hr, "__esModule", { value: !0 });
|
|
12522
|
-
const t = Fi(), e = Eg(), r = ji(), n = bg(), s = _g(), o = vg(), a =
|
|
12534
|
+
const t = Fi(), e = Eg(), r = ji(), n = bg(), s = _g(), o = vg(), a = Tg(), i = Vi(), c = Rg(), u = Sg(), l = Og(), h = Ag(), y = Ng(), v = Pg(), R = Ig(), _ = $g();
|
|
12523
12535
|
function f(g = !1) {
|
|
12524
12536
|
const p = [
|
|
12525
12537
|
// any
|
|
@@ -12527,7 +12539,7 @@ function Dg() {
|
|
|
12527
12539
|
h.default,
|
|
12528
12540
|
y.default,
|
|
12529
12541
|
v.default,
|
|
12530
|
-
|
|
12542
|
+
R.default,
|
|
12531
12543
|
_.default,
|
|
12532
12544
|
// object
|
|
12533
12545
|
a.default,
|
|
@@ -12554,71 +12566,71 @@ function Cg() {
|
|
|
12554
12566
|
params: ({ schemaCode: n }) => (0, t._)`{format: ${n}}`
|
|
12555
12567
|
},
|
|
12556
12568
|
code(n, s) {
|
|
12557
|
-
const { gen: o, data: a, $data: i, schema: c, schemaCode: u, it: l } = n, { opts: h, errSchemaPath: y, schemaEnv: v, self:
|
|
12569
|
+
const { gen: o, data: a, $data: i, schema: c, schemaCode: u, it: l } = n, { opts: h, errSchemaPath: y, schemaEnv: v, self: R } = l;
|
|
12558
12570
|
if (!h.validateFormats)
|
|
12559
12571
|
return;
|
|
12560
12572
|
i ? _() : f();
|
|
12561
12573
|
function _() {
|
|
12562
12574
|
const g = o.scopeValue("formats", {
|
|
12563
|
-
ref:
|
|
12575
|
+
ref: R.formats,
|
|
12564
12576
|
code: h.code.formats
|
|
12565
|
-
}), p = o.const("fDef", (0, t._)`${g}[${u}]`), b = o.let("fType"),
|
|
12566
|
-
o.if((0, t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`, () => o.assign(b, (0, t._)`${p}.type || "string"`).assign(
|
|
12577
|
+
}), p = o.const("fDef", (0, t._)`${g}[${u}]`), b = o.let("fType"), S = o.let("format");
|
|
12578
|
+
o.if((0, t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`, () => o.assign(b, (0, t._)`${p}.type || "string"`).assign(S, (0, t._)`${p}.validate`), () => o.assign(b, (0, t._)`"string"`).assign(S, p)), n.fail$data((0, t.or)(d(), m()));
|
|
12567
12579
|
function d() {
|
|
12568
|
-
return h.strictSchema === !1 ? t.nil : (0, t._)`${u} && !${
|
|
12580
|
+
return h.strictSchema === !1 ? t.nil : (0, t._)`${u} && !${S}`;
|
|
12569
12581
|
}
|
|
12570
12582
|
function m() {
|
|
12571
|
-
const w = v.$async ? (0, t._)`(${p}.async ? await ${
|
|
12572
|
-
return (0, t._)`${
|
|
12583
|
+
const w = v.$async ? (0, t._)`(${p}.async ? await ${S}(${a}) : ${S}(${a}))` : (0, t._)`${S}(${a})`, T = (0, t._)`(typeof ${S} == "function" ? ${w} : ${S}.test(${a}))`;
|
|
12584
|
+
return (0, t._)`${S} && ${S} !== true && ${b} === ${s} && !${T}`;
|
|
12573
12585
|
}
|
|
12574
12586
|
}
|
|
12575
12587
|
function f() {
|
|
12576
|
-
const g =
|
|
12588
|
+
const g = R.formats[c];
|
|
12577
12589
|
if (!g) {
|
|
12578
12590
|
d();
|
|
12579
12591
|
return;
|
|
12580
12592
|
}
|
|
12581
12593
|
if (g === !0)
|
|
12582
12594
|
return;
|
|
12583
|
-
const [p, b,
|
|
12595
|
+
const [p, b, S] = m(g);
|
|
12584
12596
|
p === s && n.pass(w());
|
|
12585
12597
|
function d() {
|
|
12586
12598
|
if (h.strictSchema === !1) {
|
|
12587
|
-
|
|
12599
|
+
R.logger.warn(T());
|
|
12588
12600
|
return;
|
|
12589
12601
|
}
|
|
12590
|
-
throw new Error(
|
|
12591
|
-
function
|
|
12602
|
+
throw new Error(T());
|
|
12603
|
+
function T() {
|
|
12592
12604
|
return `unknown format "${c}" ignored in schema at path "${y}"`;
|
|
12593
12605
|
}
|
|
12594
12606
|
}
|
|
12595
|
-
function m(
|
|
12596
|
-
const I =
|
|
12597
|
-
return typeof
|
|
12607
|
+
function m(T) {
|
|
12608
|
+
const I = T instanceof RegExp ? (0, t.regexpCode)(T) : h.code.formats ? (0, t._)`${h.code.formats}${(0, t.getProperty)(c)}` : void 0, L = o.scopeValue("formats", { key: c, ref: T, code: I });
|
|
12609
|
+
return typeof T == "object" && !(T instanceof RegExp) ? [T.type || "string", T.validate, (0, t._)`${L}.validate`] : ["string", T, L];
|
|
12598
12610
|
}
|
|
12599
12611
|
function w() {
|
|
12600
12612
|
if (typeof g == "object" && !(g instanceof RegExp) && g.async) {
|
|
12601
12613
|
if (!v.$async)
|
|
12602
12614
|
throw new Error("async format in sync schema");
|
|
12603
|
-
return (0, t._)`await ${
|
|
12615
|
+
return (0, t._)`await ${S}(${a})`;
|
|
12604
12616
|
}
|
|
12605
|
-
return typeof b == "function" ? (0, t._)`${
|
|
12617
|
+
return typeof b == "function" ? (0, t._)`${S}(${a})` : (0, t._)`${S}.test(${a})`;
|
|
12606
12618
|
}
|
|
12607
12619
|
}
|
|
12608
12620
|
}
|
|
12609
12621
|
};
|
|
12610
12622
|
return Pr.default = r, Pr;
|
|
12611
12623
|
}
|
|
12612
|
-
var
|
|
12624
|
+
var Ta;
|
|
12613
12625
|
function Lg() {
|
|
12614
|
-
if (
|
|
12615
|
-
|
|
12626
|
+
if (Ta) return Nr;
|
|
12627
|
+
Ta = 1, Object.defineProperty(Nr, "__esModule", { value: !0 });
|
|
12616
12628
|
const e = [Cg().default];
|
|
12617
12629
|
return Nr.default = e, Nr;
|
|
12618
12630
|
}
|
|
12619
|
-
var Qe = {},
|
|
12631
|
+
var Qe = {}, Ra;
|
|
12620
12632
|
function xg() {
|
|
12621
|
-
return
|
|
12633
|
+
return Ra || (Ra = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.contentVocabulary = Qe.metadataVocabulary = void 0, Qe.metadataVocabulary = [
|
|
12622
12634
|
"title",
|
|
12623
12635
|
"description",
|
|
12624
12636
|
"default",
|
|
@@ -12632,10 +12644,10 @@ function xg() {
|
|
|
12632
12644
|
"contentSchema"
|
|
12633
12645
|
]), Qe;
|
|
12634
12646
|
}
|
|
12635
|
-
var
|
|
12647
|
+
var Sa;
|
|
12636
12648
|
function kg() {
|
|
12637
|
-
if (
|
|
12638
|
-
|
|
12649
|
+
if (Sa) return Xt;
|
|
12650
|
+
Sa = 1, Object.defineProperty(Xt, "__esModule", { value: !0 });
|
|
12639
12651
|
const t = ag(), e = wg(), r = Dg(), n = Lg(), s = xg(), o = [
|
|
12640
12652
|
t.default,
|
|
12641
12653
|
e.default,
|
|
@@ -12671,29 +12683,29 @@ function Ug() {
|
|
|
12671
12683
|
const { gen: c, data: u, schema: l, parentSchema: h, it: y } = i, { oneOf: v } = h;
|
|
12672
12684
|
if (!y.opts.discriminator)
|
|
12673
12685
|
throw new Error("discriminator: requires discriminator option");
|
|
12674
|
-
const
|
|
12675
|
-
if (typeof
|
|
12686
|
+
const R = l.propertyName;
|
|
12687
|
+
if (typeof R != "string")
|
|
12676
12688
|
throw new Error("discriminator: requires propertyName");
|
|
12677
12689
|
if (l.mapping)
|
|
12678
12690
|
throw new Error("discriminator: mapping is not supported");
|
|
12679
12691
|
if (!v)
|
|
12680
12692
|
throw new Error("discriminator: requires oneOf keyword");
|
|
12681
|
-
const _ = c.let("valid", !1), f = c.const("tag", (0, t._)`${u}${(0, t.getProperty)(
|
|
12682
|
-
c.if((0, t._)`typeof ${f} == "string"`, () => g(), () => i.error(!1, { discrError: e.DiscrError.Tag, tag: f, tagName:
|
|
12693
|
+
const _ = c.let("valid", !1), f = c.const("tag", (0, t._)`${u}${(0, t.getProperty)(R)}`);
|
|
12694
|
+
c.if((0, t._)`typeof ${f} == "string"`, () => g(), () => i.error(!1, { discrError: e.DiscrError.Tag, tag: f, tagName: R })), i.ok(_);
|
|
12683
12695
|
function g() {
|
|
12684
|
-
const
|
|
12696
|
+
const S = b();
|
|
12685
12697
|
c.if(!1);
|
|
12686
|
-
for (const d in
|
|
12687
|
-
c.elseIf((0, t._)`${f} === ${d}`), c.assign(_, p(
|
|
12688
|
-
c.else(), i.error(!1, { discrError: e.DiscrError.Mapping, tag: f, tagName:
|
|
12698
|
+
for (const d in S)
|
|
12699
|
+
c.elseIf((0, t._)`${f} === ${d}`), c.assign(_, p(S[d]));
|
|
12700
|
+
c.else(), i.error(!1, { discrError: e.DiscrError.Mapping, tag: f, tagName: R }), c.endIf();
|
|
12689
12701
|
}
|
|
12690
|
-
function p(
|
|
12691
|
-
const d = c.name("valid"), m = i.subschema({ keyword: "oneOf", schemaProp:
|
|
12702
|
+
function p(S) {
|
|
12703
|
+
const d = c.name("valid"), m = i.subschema({ keyword: "oneOf", schemaProp: S }, d);
|
|
12692
12704
|
return i.mergeEvaluated(m, t.Name), d;
|
|
12693
12705
|
}
|
|
12694
12706
|
function b() {
|
|
12695
|
-
var
|
|
12696
|
-
const d = {}, m =
|
|
12707
|
+
var S;
|
|
12708
|
+
const d = {}, m = T(h);
|
|
12697
12709
|
let w = !0;
|
|
12698
12710
|
for (let N = 0; N < v.length; N++) {
|
|
12699
12711
|
let k = v[N];
|
|
@@ -12702,16 +12714,16 @@ function Ug() {
|
|
|
12702
12714
|
if (k = r.resolveRef.call(y.self, y.schemaEnv.root, y.baseId, V), k instanceof r.SchemaEnv && (k = k.schema), k === void 0)
|
|
12703
12715
|
throw new n.default(y.opts.uriResolver, y.baseId, V);
|
|
12704
12716
|
}
|
|
12705
|
-
const B = (
|
|
12717
|
+
const B = (S = k?.properties) === null || S === void 0 ? void 0 : S[R];
|
|
12706
12718
|
if (typeof B != "object")
|
|
12707
|
-
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${
|
|
12708
|
-
w = w && (m ||
|
|
12719
|
+
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${R}"`);
|
|
12720
|
+
w = w && (m || T(k)), I(B, N);
|
|
12709
12721
|
}
|
|
12710
12722
|
if (!w)
|
|
12711
|
-
throw new Error(`discriminator: "${
|
|
12723
|
+
throw new Error(`discriminator: "${R}" must be required`);
|
|
12712
12724
|
return d;
|
|
12713
|
-
function
|
|
12714
|
-
return Array.isArray(N) && N.includes(
|
|
12725
|
+
function T({ required: N }) {
|
|
12726
|
+
return Array.isArray(N) && N.includes(R);
|
|
12715
12727
|
}
|
|
12716
12728
|
function I(N, k) {
|
|
12717
12729
|
if (N.const)
|
|
@@ -12720,11 +12732,11 @@ function Ug() {
|
|
|
12720
12732
|
for (const B of N.enum)
|
|
12721
12733
|
L(B, k);
|
|
12722
12734
|
else
|
|
12723
|
-
throw new Error(`discriminator: "properties/${
|
|
12735
|
+
throw new Error(`discriminator: "properties/${R}" must have "const" or "enum"`);
|
|
12724
12736
|
}
|
|
12725
12737
|
function L(N, k) {
|
|
12726
12738
|
if (typeof N != "string" || N in d)
|
|
12727
|
-
throw new Error(`discriminator: "${
|
|
12739
|
+
throw new Error(`discriminator: "${R}" values must be unique strings`);
|
|
12728
12740
|
d[N] = k;
|
|
12729
12741
|
}
|
|
12730
12742
|
}
|
|
@@ -12748,13 +12760,13 @@ function Yg() {
|
|
|
12748
12760
|
const r = ng(), n = kg(), s = Ug(), o = zg, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
|
|
12749
12761
|
class c extends r.default {
|
|
12750
12762
|
_addVocabularies() {
|
|
12751
|
-
super._addVocabularies(), n.default.forEach((
|
|
12763
|
+
super._addVocabularies(), n.default.forEach((R) => this.addVocabulary(R)), this.opts.discriminator && this.addKeyword(s.default);
|
|
12752
12764
|
}
|
|
12753
12765
|
_addDefaultMetaSchema() {
|
|
12754
12766
|
if (super._addDefaultMetaSchema(), !this.opts.meta)
|
|
12755
12767
|
return;
|
|
12756
|
-
const
|
|
12757
|
-
this.addMetaSchema(
|
|
12768
|
+
const R = this.opts.$data ? this.$dataMetaSchema(o, a) : o;
|
|
12769
|
+
this.addMetaSchema(R, i, !1), this.refs["http://json-schema.org/schema"] = i;
|
|
12758
12770
|
}
|
|
12759
12771
|
defaultMeta() {
|
|
12760
12772
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(i) ? i : void 0);
|
|
@@ -12989,7 +13001,7 @@ async function zb(t, e, r, n) {
|
|
|
12989
13001
|
l.filter(
|
|
12990
13002
|
(g) => y(g, e)
|
|
12991
13003
|
)
|
|
12992
|
-
),
|
|
13004
|
+
), R = xn(
|
|
12993
13005
|
l.filter(
|
|
12994
13006
|
(g) => !y(g, e)
|
|
12995
13007
|
)
|
|
@@ -13000,7 +13012,7 @@ async function zb(t, e, r, n) {
|
|
|
13000
13012
|
}
|
|
13001
13013
|
const _ = [];
|
|
13002
13014
|
let f = null;
|
|
13003
|
-
return
|
|
13015
|
+
return R.length > 0 && (_.push("PROVIDER_MISMATCH"), f = R[0]), h.length > 0 && (_.push("SESSION_EXPIRED"), f ??= h[0]), f && !Ia(f, r) && _.push("LOCATION_MISMATCH"), _.length === 0 ? {
|
|
13004
13016
|
matched: !1,
|
|
13005
13017
|
encounter: null,
|
|
13006
13018
|
reasons: ["NO_ACTIVE_ENCOUNTER"]
|
|
@@ -13026,13 +13038,12 @@ const Gi = {
|
|
|
13026
13038
|
isLoading: !1
|
|
13027
13039
|
}, fy = [
|
|
13028
13040
|
"MATCHED",
|
|
13029
|
-
"SESSION_EXPIRED",
|
|
13030
13041
|
"LOCATION_MISMATCH",
|
|
13031
13042
|
"PROVIDER_MISMATCH"
|
|
13032
13043
|
];
|
|
13033
13044
|
let Mt = { ...Gi };
|
|
13034
13045
|
const Wn = /* @__PURE__ */ new Set();
|
|
13035
|
-
function
|
|
13046
|
+
function Ts() {
|
|
13036
13047
|
Wn.forEach((t) => t());
|
|
13037
13048
|
}
|
|
13038
13049
|
function py(t) {
|
|
@@ -13052,13 +13063,13 @@ function Gb(t) {
|
|
|
13052
13063
|
activeEncounter: t.encounter,
|
|
13053
13064
|
canEditOrCreate: e,
|
|
13054
13065
|
isLoading: !1
|
|
13055
|
-
},
|
|
13066
|
+
}, Ts();
|
|
13056
13067
|
}
|
|
13057
13068
|
function Kb(t) {
|
|
13058
|
-
Mt = { ...Mt, isLoading: t },
|
|
13069
|
+
Mt = { ...Mt, isLoading: t }, Ts();
|
|
13059
13070
|
}
|
|
13060
13071
|
function Wb() {
|
|
13061
|
-
Mt = { ...Gi },
|
|
13072
|
+
Mt = { ...Gi }, Ts();
|
|
13062
13073
|
}
|
|
13063
13074
|
function Jb() {
|
|
13064
13075
|
return sc(
|
|
@@ -13385,15 +13396,15 @@ const vy = K + "/bahmnicore/diseaseSummaryData?", u_ = async (t, e, r, n) => {
|
|
|
13385
13396
|
});
|
|
13386
13397
|
const o = vy + s.toString();
|
|
13387
13398
|
return H(o);
|
|
13388
|
-
},
|
|
13399
|
+
}, Rs = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Ty = (t) => `${K}/bahmniprogramenrollment?patient=${t}&v=${Rs}`, Ry = (t, e = 15, r = 0) => `${K}/bahmniprogramenrollment?patient=${t}&v=${Rs}&limit=${e}&startIndex=${r}&totalCount=true`, Xi = (t) => `${K}/bahmniprogramenrollment/${t}`, Sy = (t) => `${Xi(t)}?v=${Rs}`, l_ = async (t) => await H(Ty(t)), d_ = async (t, e = 15, r = 1) => {
|
|
13389
13400
|
const n = (r - 1) * e, s = await H(
|
|
13390
|
-
|
|
13401
|
+
Ry(t, e, n)
|
|
13391
13402
|
);
|
|
13392
13403
|
return {
|
|
13393
13404
|
programs: s.results,
|
|
13394
13405
|
total: s.totalCount
|
|
13395
13406
|
};
|
|
13396
|
-
}, f_ = async (t) => await H(
|
|
13407
|
+
}, f_ = async (t) => await H(Sy(t)), p_ = async (t, e) => {
|
|
13397
13408
|
const r = {
|
|
13398
13409
|
uuid: t,
|
|
13399
13410
|
states: [
|
|
@@ -13518,7 +13529,7 @@ async function v_(t, e) {
|
|
|
13518
13529
|
);
|
|
13519
13530
|
return ec(n);
|
|
13520
13531
|
}
|
|
13521
|
-
async function
|
|
13532
|
+
async function T_(t, e, r = 10, n = 1) {
|
|
13522
13533
|
const s = (n - 1) * r, o = Zi(
|
|
13523
13534
|
t,
|
|
13524
13535
|
e,
|
|
@@ -13533,10 +13544,10 @@ async function R_(t, e, r = 10, n = 1) {
|
|
|
13533
13544
|
};
|
|
13534
13545
|
}
|
|
13535
13546
|
const Ay = (t) => `${K}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(t)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`, Ny = (t) => `${ae}/Location?_tag=${encodeURIComponent(t)}`;
|
|
13536
|
-
async function
|
|
13547
|
+
async function R_(t) {
|
|
13537
13548
|
return (await H(Ay(t))).results ?? [];
|
|
13538
13549
|
}
|
|
13539
|
-
async function
|
|
13550
|
+
async function S_(t) {
|
|
13540
13551
|
return await H(Ny(t));
|
|
13541
13552
|
}
|
|
13542
13553
|
const Py = ae + "/Immunization", Iy = (t, e) => {
|
|
@@ -13698,7 +13709,7 @@ export {
|
|
|
13698
13709
|
nb as DATE_REGEX_PATTERN,
|
|
13699
13710
|
Ii as DEFAULT_DATE_FORMAT,
|
|
13700
13711
|
vh as DEFAULT_DATE_FORMAT_STORAGE_KEY,
|
|
13701
|
-
|
|
13712
|
+
Th as DEFAULT_TIME_FORMAT,
|
|
13702
13713
|
Oh as DURATION_UNIT_TO_DAYS,
|
|
13703
13714
|
zE as FHIR_ENCOUNTER_CLASS_CODE_SYSTEM,
|
|
13704
13715
|
YE as FHIR_ENCOUNTER_TAG_SYSTEM,
|
|
@@ -13715,7 +13726,7 @@ export {
|
|
|
13715
13726
|
Gh as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
|
|
13716
13727
|
GE as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
|
|
13717
13728
|
sb as INTERPRETATION_TO_CODE,
|
|
13718
|
-
|
|
13729
|
+
SE as ISO_DATE_FORMAT,
|
|
13719
13730
|
Ku as LOGIN_PATH,
|
|
13720
13731
|
Hb as MATCH_REASON_MESSAGES,
|
|
13721
13732
|
Uw as MAX_NAME_LENGTH,
|
|
@@ -13726,8 +13737,8 @@ export {
|
|
|
13726
13737
|
ae as OPENMRS_FHIR_R4,
|
|
13727
13738
|
K as OPENMRS_REST_V1,
|
|
13728
13739
|
Ob as ORDER_TYPE_QUERY_KEY,
|
|
13729
|
-
|
|
13730
|
-
|
|
13740
|
+
Sb as PENDING_REPORT_STATUSES,
|
|
13741
|
+
Rb as PROCESSED_REPORT_STATUSES,
|
|
13731
13742
|
Db as USER_PINNED_PREFERENCE_URL,
|
|
13732
13743
|
OE as calculateAge,
|
|
13733
13744
|
DE as calculateEndDate,
|
|
@@ -13739,7 +13750,7 @@ export {
|
|
|
13739
13750
|
i_ as convertImmutableToPlainObject,
|
|
13740
13751
|
Ah as convertTo24HourFormat,
|
|
13741
13752
|
Iw as convertToSentenceCase,
|
|
13742
|
-
|
|
13753
|
+
RE as createAppointmentUnavailability,
|
|
13743
13754
|
Fb as createFhirEncounter,
|
|
13744
13755
|
Kw as createFhirPatient,
|
|
13745
13756
|
Yw as createPatient,
|
|
@@ -13766,7 +13777,7 @@ export {
|
|
|
13766
13777
|
Fy as filterByOnlineStatus,
|
|
13767
13778
|
qy as filterByPrivilege,
|
|
13768
13779
|
$_ as filterCdsCardsForItems,
|
|
13769
|
-
|
|
13780
|
+
Sw as filterReplacementEntries,
|
|
13770
13781
|
Bb as findActiveEncounterInSession,
|
|
13771
13782
|
PE as formatDateDistance,
|
|
13772
13783
|
AE as formatDateTime,
|
|
@@ -13781,7 +13792,7 @@ export {
|
|
|
13781
13792
|
EE as getAllAppointmentServices,
|
|
13782
13793
|
Hh as getAllergies,
|
|
13783
13794
|
wE as getAppointmentById,
|
|
13784
|
-
|
|
13795
|
+
TE as getAppointmentUnavailabilities,
|
|
13785
13796
|
Cw as getAvailableLocations,
|
|
13786
13797
|
P_ as getAvailableStocks,
|
|
13787
13798
|
Nb as getCategoryUuidFromOrderTypes,
|
|
@@ -13798,7 +13809,7 @@ export {
|
|
|
13798
13809
|
ub as getDiagnosesPage,
|
|
13799
13810
|
vb as getDiagnosticReportBundle,
|
|
13800
13811
|
_b as getDiagnosticReports,
|
|
13801
|
-
|
|
13812
|
+
T_ as getDocumentReferencePage,
|
|
13802
13813
|
Oy as getDocumentReferences,
|
|
13803
13814
|
Ub as getEncounterByUuid,
|
|
13804
13815
|
Yi as getEncounterSessionDuration,
|
|
@@ -13806,7 +13817,7 @@ export {
|
|
|
13806
13817
|
Qb as getEncountersAndVisitsForEOC,
|
|
13807
13818
|
Ib as getExistingServiceRequestsForAllCategories,
|
|
13808
13819
|
Uy as getExtensionsByPoint,
|
|
13809
|
-
|
|
13820
|
+
S_ as getFHIRLocationsByTag,
|
|
13810
13821
|
Ab as getFlattenedInvestigations,
|
|
13811
13822
|
$E as getFormattedAge,
|
|
13812
13823
|
VE as getFormattedAllergies,
|
|
@@ -13818,7 +13829,7 @@ export {
|
|
|
13818
13829
|
Bw as getIdentifierTypes,
|
|
13819
13830
|
nE as getInputTypeForFormat,
|
|
13820
13831
|
bb as getLabInvestigationsBundle,
|
|
13821
|
-
|
|
13832
|
+
R_ as getLocationByTag,
|
|
13822
13833
|
mb as getMedicationByUuid,
|
|
13823
13834
|
qb as getObservationsBundleByEncounterUuid,
|
|
13824
13835
|
Pb as getOrderTypeNames,
|
|
@@ -13843,7 +13854,7 @@ export {
|
|
|
13843
13854
|
wb as getPatientRadiologyInvestigations,
|
|
13844
13855
|
rE as getPersonAttributeTypes,
|
|
13845
13856
|
Dd as getPrimaryIdentifierType,
|
|
13846
|
-
|
|
13857
|
+
Tw as getPriorityByOrder,
|
|
13847
13858
|
f_ as getProgramByUUID,
|
|
13848
13859
|
Mb as getProviderLoginLocations,
|
|
13849
13860
|
tE as getRelationshipTypes,
|
|
@@ -13861,7 +13872,7 @@ export {
|
|
|
13861
13872
|
uE as getVisitTypes,
|
|
13862
13873
|
cy as getVisits,
|
|
13863
13874
|
u_ as getVitalFlowSheetData,
|
|
13864
|
-
|
|
13875
|
+
Rw as groupByDate,
|
|
13865
13876
|
e_ as hasPrivilege,
|
|
13866
13877
|
gw as initAppI18n,
|
|
13867
13878
|
Xb as initializeAuditListener,
|
|
@@ -13908,7 +13919,7 @@ export {
|
|
|
13908
13919
|
s_ as transformFormDataToObservations,
|
|
13909
13920
|
o_ as transformObservationsToFormData,
|
|
13910
13921
|
yE as updateAppointmentStatus,
|
|
13911
|
-
|
|
13922
|
+
Tb as updateDiagnosticReportBundle,
|
|
13912
13923
|
jb as updateFhirEncounter,
|
|
13913
13924
|
Jw as updateFhirPatient,
|
|
13914
13925
|
Gw as updatePatient,
|