@bahmni/services 0.0.1-dev.140 → 0.0.1-dev.141
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/index.js
CHANGED
|
@@ -13,12 +13,12 @@ const { toString: Ei } = Object.prototype, { getPrototypeOf: Cn } = Object, { it
|
|
|
13
13
|
function Tt(e) {
|
|
14
14
|
return e !== null && !it(e) && e.constructor !== null && !it(e.constructor) && Se(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const po = Ie("ArrayBuffer");
|
|
17
17
|
function _i(e) {
|
|
18
18
|
let t;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && po(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const Si = Lr("string"), Se = Lr("function"),
|
|
21
|
+
const Si = Lr("string"), Se = Lr("function"), ho = Lr("number"), At = (e) => e !== null && typeof e == "object", Ri = (e) => e === !0 || e === !1, wr = (e) => {
|
|
22
22
|
if (kr(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = Cn(e);
|
|
@@ -126,7 +126,7 @@ const ji = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
|
|
|
126
126
|
if (!e) return null;
|
|
127
127
|
if (dt(e)) return e;
|
|
128
128
|
let t = e.length;
|
|
129
|
-
if (!
|
|
129
|
+
if (!ho(t)) return null;
|
|
130
130
|
const r = new Array(t);
|
|
131
131
|
for (; t-- > 0; )
|
|
132
132
|
r[t] = e[t];
|
|
@@ -208,12 +208,12 @@ const tc = (e) => {
|
|
|
208
208
|
n.push(s), Ge.postMessage(r, "*");
|
|
209
209
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Se(Ge.postMessage)), sc = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ge) : typeof process < "u" && process.nextTick || vo, ac = (e) => e != null && Se(e[Cr]), D = {
|
|
210
210
|
isArray: dt,
|
|
211
|
-
isArrayBuffer:
|
|
211
|
+
isArrayBuffer: po,
|
|
212
212
|
isBuffer: Tt,
|
|
213
213
|
isFormData: Di,
|
|
214
214
|
isArrayBufferView: _i,
|
|
215
215
|
isString: Si,
|
|
216
|
-
isNumber:
|
|
216
|
+
isNumber: ho,
|
|
217
217
|
isBoolean: Ri,
|
|
218
218
|
isObject: At,
|
|
219
219
|
isPlainObject: wr,
|
|
@@ -359,16 +359,16 @@ function Mr(e, t, r) {
|
|
|
359
359
|
return D.isArrayBuffer(v) || D.isTypedArray(v) ? c && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
|
|
360
360
|
}
|
|
361
361
|
function d(v, g, f) {
|
|
362
|
-
let
|
|
362
|
+
let p = v;
|
|
363
363
|
if (v && !f && typeof v == "object") {
|
|
364
364
|
if (D.endsWith(g, "{}"))
|
|
365
365
|
g = n ? g : g.slice(0, -2), v = JSON.stringify(v);
|
|
366
|
-
else if (D.isArray(v) && ic(v) || (D.isFileList(v) || D.endsWith(g, "[]")) && (
|
|
367
|
-
return g = wo(g),
|
|
368
|
-
!(D.isUndefined(
|
|
366
|
+
else if (D.isArray(v) && ic(v) || (D.isFileList(v) || D.endsWith(g, "[]")) && (p = D.toArray(v)))
|
|
367
|
+
return g = wo(g), p.forEach(function(h, w) {
|
|
368
|
+
!(D.isUndefined(h) || h === null) && t.append(
|
|
369
369
|
// eslint-disable-next-line no-nested-ternary
|
|
370
370
|
o === !0 ? Qn([g], w, a) : o === null ? g : g + "[]",
|
|
371
|
-
l(
|
|
371
|
+
l(h)
|
|
372
372
|
);
|
|
373
373
|
}), !1;
|
|
374
374
|
}
|
|
@@ -383,14 +383,14 @@ function Mr(e, t, r) {
|
|
|
383
383
|
if (!D.isUndefined(v)) {
|
|
384
384
|
if (m.indexOf(v) !== -1)
|
|
385
385
|
throw Error("Circular reference detected in " + g.join("."));
|
|
386
|
-
m.push(v), D.forEach(v, function(
|
|
387
|
-
(!(D.isUndefined(
|
|
386
|
+
m.push(v), D.forEach(v, function(p, u) {
|
|
387
|
+
(!(D.isUndefined(p) || p === null) && s.call(
|
|
388
388
|
t,
|
|
389
|
-
|
|
389
|
+
p,
|
|
390
390
|
D.isString(u) ? u.trim() : u,
|
|
391
391
|
g,
|
|
392
392
|
y
|
|
393
|
-
)) === !0 && S(
|
|
393
|
+
)) === !0 && S(p, g ? g.concat(u) : [u]);
|
|
394
394
|
}), m.pop();
|
|
395
395
|
}
|
|
396
396
|
}
|
|
@@ -503,7 +503,7 @@ const Ln = {
|
|
|
503
503
|
forcedJSONParsing: !0,
|
|
504
504
|
clarifyTimeoutError: !1,
|
|
505
505
|
legacyInterceptorReqResOrdering: !0
|
|
506
|
-
}, lc = typeof URLSearchParams < "u" ? URLSearchParams : kn, dc = typeof FormData < "u" ? FormData : null, fc = typeof Blob < "u" ? Blob : null,
|
|
506
|
+
}, lc = typeof URLSearchParams < "u" ? URLSearchParams : kn, dc = typeof FormData < "u" ? FormData : null, fc = typeof Blob < "u" ? Blob : null, pc = {
|
|
507
507
|
isBrowser: !0,
|
|
508
508
|
classes: {
|
|
509
509
|
URLSearchParams: lc,
|
|
@@ -511,17 +511,17 @@ const Ln = {
|
|
|
511
511
|
Blob: fc
|
|
512
512
|
},
|
|
513
513
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
514
|
-
}, Mn = typeof window < "u" && typeof document < "u", Tn = typeof navigator == "object" && navigator || void 0,
|
|
514
|
+
}, Mn = typeof window < "u" && typeof document < "u", Tn = typeof navigator == "object" && navigator || void 0, hc = Mn && (!Tn || ["ReactNative", "NativeScript", "NS"].indexOf(Tn.product) < 0), mc = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
515
515
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", gc = Mn && window.location.href || "http://localhost", yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
516
516
|
__proto__: null,
|
|
517
517
|
hasBrowserEnv: Mn,
|
|
518
|
-
hasStandardBrowserEnv:
|
|
518
|
+
hasStandardBrowserEnv: hc,
|
|
519
519
|
hasStandardBrowserWebWorkerEnv: mc,
|
|
520
520
|
navigator: Tn,
|
|
521
521
|
origin: gc
|
|
522
522
|
}, Symbol.toStringTag, { value: "Module" })), ve = {
|
|
523
523
|
...yc,
|
|
524
|
-
...
|
|
524
|
+
...pc
|
|
525
525
|
};
|
|
526
526
|
function vc(e, t) {
|
|
527
527
|
return Mr(e, new ve.classes.URLSearchParams(), {
|
|
@@ -1074,16 +1074,16 @@ const Oo = (e) => {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
let f = new XMLHttpRequest();
|
|
1076
1076
|
f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
|
|
1077
|
-
function
|
|
1077
|
+
function p() {
|
|
1078
1078
|
if (!f)
|
|
1079
1079
|
return;
|
|
1080
|
-
const
|
|
1080
|
+
const h = Re.from(
|
|
1081
1081
|
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1082
1082
|
), _ = {
|
|
1083
1083
|
data: !i || i === "text" || i === "json" ? f.responseText : f.response,
|
|
1084
1084
|
status: f.status,
|
|
1085
1085
|
statusText: f.statusText,
|
|
1086
|
-
headers:
|
|
1086
|
+
headers: h,
|
|
1087
1087
|
config: e,
|
|
1088
1088
|
request: f
|
|
1089
1089
|
};
|
|
@@ -1093,8 +1093,8 @@ const Oo = (e) => {
|
|
|
1093
1093
|
n(R), g();
|
|
1094
1094
|
}, _), f = null;
|
|
1095
1095
|
}
|
|
1096
|
-
"onloadend" in f ? f.onloadend =
|
|
1097
|
-
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1096
|
+
"onloadend" in f ? f.onloadend = p : f.onreadystatechange = function() {
|
|
1097
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(p);
|
|
1098
1098
|
}, f.onabort = function() {
|
|
1099
1099
|
f && (n(new G("Request aborted", G.ECONNABORTED, e, f)), f = null);
|
|
1100
1100
|
}, f.onerror = function(w) {
|
|
@@ -1111,8 +1111,8 @@ const Oo = (e) => {
|
|
|
1111
1111
|
)), f = null;
|
|
1112
1112
|
}, a === void 0 && o.setContentType(null), "setRequestHeader" in f && D.forEach(o.toJSON(), function(w, _) {
|
|
1113
1113
|
f.setRequestHeader(_, w);
|
|
1114
|
-
}), D.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), i && i !== "json" && (f.responseType = s.responseType), l && ([y, v] = Tr(l, !0), f.addEventListener("progress", y)), c && f.upload && ([m, S] = Tr(c), f.upload.addEventListener("progress", m), f.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (d = (
|
|
1115
|
-
f && (n(!
|
|
1114
|
+
}), D.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), i && i !== "json" && (f.responseType = s.responseType), l && ([y, v] = Tr(l, !0), f.addEventListener("progress", y)), c && f.upload && ([m, S] = Tr(c), f.upload.addEventListener("progress", m), f.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (d = (h) => {
|
|
1115
|
+
f && (n(!h || h.type ? new $t(null, e, f) : h), f.abort(), f = null);
|
|
1116
1116
|
}, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
|
|
1117
1117
|
const u = Pc(s.url);
|
|
1118
1118
|
if (u && ve.protocols.indexOf(u) === -1) {
|
|
@@ -1235,9 +1235,9 @@ const Oo = (e) => {
|
|
|
1235
1235
|
};
|
|
1236
1236
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((v) => {
|
|
1237
1237
|
!m[v] && (m[v] = (g, f) => {
|
|
1238
|
-
let
|
|
1239
|
-
if (
|
|
1240
|
-
return
|
|
1238
|
+
let p = g && g[v];
|
|
1239
|
+
if (p)
|
|
1240
|
+
return p.call(g);
|
|
1241
1241
|
throw new G(`Response type '${v}' is not supported`, G.ERR_NOT_SUPPORT, f);
|
|
1242
1242
|
});
|
|
1243
1243
|
});
|
|
@@ -1263,9 +1263,9 @@ const Oo = (e) => {
|
|
|
1263
1263
|
let {
|
|
1264
1264
|
url: g,
|
|
1265
1265
|
method: f,
|
|
1266
|
-
data:
|
|
1266
|
+
data: p,
|
|
1267
1267
|
signal: u,
|
|
1268
|
-
cancelToken:
|
|
1268
|
+
cancelToken: h,
|
|
1269
1269
|
timeout: w,
|
|
1270
1270
|
onDownloadProgress: _,
|
|
1271
1271
|
onUploadProgress: E,
|
|
@@ -1275,38 +1275,38 @@ const Oo = (e) => {
|
|
|
1275
1275
|
fetchOptions: q
|
|
1276
1276
|
} = Oo(v), j = t || fetch;
|
|
1277
1277
|
R = R ? (R + "").toLowerCase() : "text";
|
|
1278
|
-
let U = xc([u,
|
|
1278
|
+
let U = xc([u, h && h.toAbortSignal()], w), V = null;
|
|
1279
1279
|
const W = U && U.unsubscribe && (() => {
|
|
1280
1280
|
U.unsubscribe();
|
|
1281
1281
|
});
|
|
1282
1282
|
let re;
|
|
1283
1283
|
try {
|
|
1284
|
-
if (E && l && f !== "get" && f !== "head" && (re = await S(P,
|
|
1284
|
+
if (E && l && f !== "get" && f !== "head" && (re = await S(P, p)) !== 0) {
|
|
1285
1285
|
let O = new r(g, {
|
|
1286
1286
|
method: "POST",
|
|
1287
|
-
body:
|
|
1287
|
+
body: p,
|
|
1288
1288
|
duplex: "half"
|
|
1289
1289
|
}), C;
|
|
1290
|
-
if (D.isFormData(
|
|
1290
|
+
if (D.isFormData(p) && (C = O.headers.get("content-type")) && P.setContentType(C), O.body) {
|
|
1291
1291
|
const [N, b] = rs(
|
|
1292
1292
|
re,
|
|
1293
1293
|
Tr(ns(E))
|
|
1294
1294
|
);
|
|
1295
|
-
|
|
1295
|
+
p = as(O.body, os, N, b);
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
D.isString(L) || (L = L ? "include" : "omit");
|
|
1299
|
-
const ne = a && "credentials" in r.prototype,
|
|
1299
|
+
const ne = a && "credentials" in r.prototype, pe = {
|
|
1300
1300
|
...q,
|
|
1301
1301
|
signal: U,
|
|
1302
1302
|
method: f.toUpperCase(),
|
|
1303
1303
|
headers: P.normalize().toJSON(),
|
|
1304
|
-
body:
|
|
1304
|
+
body: p,
|
|
1305
1305
|
duplex: "half",
|
|
1306
1306
|
credentials: ne ? L : void 0
|
|
1307
1307
|
};
|
|
1308
|
-
V = a && new r(g,
|
|
1309
|
-
let J = await (a ? j(V, q) : j(g,
|
|
1308
|
+
V = a && new r(g, pe);
|
|
1309
|
+
let J = await (a ? j(V, q) : j(g, pe));
|
|
1310
1310
|
const ce = d && (R === "stream" || R === "response");
|
|
1311
1311
|
if (d && (_ || ce && W)) {
|
|
1312
1312
|
const O = {};
|
|
@@ -1934,7 +1934,7 @@ var tu = {
|
|
|
1934
1934
|
}, nu = lt(lt({}, ut), { all: ut.html5 }), su = {
|
|
1935
1935
|
scope: "body",
|
|
1936
1936
|
level: "all"
|
|
1937
|
-
}, tn = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g, rn = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,
|
|
1937
|
+
}, tn = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g, rn = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g, ps = {
|
|
1938
1938
|
xml: {
|
|
1939
1939
|
strict: tn,
|
|
1940
1940
|
attribute: rn,
|
|
@@ -1950,7 +1950,7 @@ var tu = {
|
|
|
1950
1950
|
attribute: rn,
|
|
1951
1951
|
body: en.html5
|
|
1952
1952
|
}
|
|
1953
|
-
}, au = lt(lt({},
|
|
1953
|
+
}, au = lt(lt({}, ps), { all: ps.html5 }), Co = String.fromCharCode, ou = Co(65533);
|
|
1954
1954
|
function iu(e, t, r, n) {
|
|
1955
1955
|
var s = e, a = e[e.length - 1];
|
|
1956
1956
|
if (r && a === "=")
|
|
@@ -2023,7 +2023,7 @@ const z = async (e) => (await Fe.get(e)).data, ft = async (e, t) => (await Fe.po
|
|
|
2023
2023
|
e = n, t = s;
|
|
2024
2024
|
});
|
|
2025
2025
|
return r.resolve = e, r.reject = t, r;
|
|
2026
|
-
},
|
|
2026
|
+
}, hs = (e) => e == null ? "" : "" + e, du = (e, t, r) => {
|
|
2027
2027
|
e.forEach((n) => {
|
|
2028
2028
|
t[n] && (r[n] = t[n]);
|
|
2029
2029
|
});
|
|
@@ -2052,7 +2052,7 @@ const z = async (e) => (await Fe.get(e)).data, ft = async (e, t) => (await Fe.po
|
|
|
2052
2052
|
for (; i.obj === void 0 && o.length; )
|
|
2053
2053
|
a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), i = Et(e, o, Object), i?.obj && typeof i.obj[`${i.k}.${a}`] < "u" && (i.obj = void 0);
|
|
2054
2054
|
i.obj[`${i.k}.${a}`] = r;
|
|
2055
|
-
},
|
|
2055
|
+
}, pu = (e, t, r, n) => {
|
|
2056
2056
|
const {
|
|
2057
2057
|
obj: s,
|
|
2058
2058
|
k: a
|
|
@@ -2065,7 +2065,7 @@ const z = async (e) => (await Fe.get(e)).data, ft = async (e, t) => (await Fe.po
|
|
|
2065
2065
|
} = Et(e, t);
|
|
2066
2066
|
if (r && Object.prototype.hasOwnProperty.call(r, n))
|
|
2067
2067
|
return r[n];
|
|
2068
|
-
},
|
|
2068
|
+
}, hu = (e, t, r) => {
|
|
2069
2069
|
const n = Ar(e, r);
|
|
2070
2070
|
return n !== void 0 ? n : Ar(t, r);
|
|
2071
2071
|
}, ko = (e, t, r) => {
|
|
@@ -2370,13 +2370,13 @@ class $r extends jr {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
const m = this.resolve(t, r);
|
|
2372
2372
|
let y = m?.res;
|
|
2373
|
-
const S = m?.usedKey || o, v = m?.exactUsedKey || o, g = ["[object Number]", "[object Function]", "[object RegExp]"], f = r.joinArrays !== void 0 ? r.joinArrays : this.options.joinArrays,
|
|
2373
|
+
const S = m?.usedKey || o, v = m?.exactUsedKey || o, g = ["[object Number]", "[object Function]", "[object RegExp]"], f = r.joinArrays !== void 0 ? r.joinArrays : this.options.joinArrays, p = !this.i18nFormat || this.i18nFormat.handleAsObject, u = r.count !== void 0 && !K(r.count), h = $r.hasDefaultValue(r), w = u ? this.pluralResolver.getSuffix(l, r.count, r) : "", _ = r.ordinal && u ? this.pluralResolver.getSuffix(l, r.count, {
|
|
2374
2374
|
ordinal: !1
|
|
2375
2375
|
}) : "", E = u && !r.ordinal && r.count === 0, R = E && r[`defaultValue${this.options.pluralSeparator}zero`] || r[`defaultValue${w}`] || r[`defaultValue${_}`] || r.defaultValue;
|
|
2376
2376
|
let P = y;
|
|
2377
|
-
|
|
2377
|
+
p && !y && h && (P = R);
|
|
2378
2378
|
const L = ws(P), q = Object.prototype.toString.apply(P);
|
|
2379
|
-
if (
|
|
2379
|
+
if (p && P && L && g.indexOf(q) < 0 && !(K(f) && Array.isArray(P))) {
|
|
2380
2380
|
if (!r.returnObjects && !this.options.returnObjects) {
|
|
2381
2381
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2382
2382
|
const j = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, P, {
|
|
@@ -2390,7 +2390,7 @@ class $r extends jr {
|
|
|
2390
2390
|
for (const W in P)
|
|
2391
2391
|
if (Object.prototype.hasOwnProperty.call(P, W)) {
|
|
2392
2392
|
const re = `${V}${a}${W}`;
|
|
2393
|
-
|
|
2393
|
+
h && !y ? U[W] = this.translate(re, {
|
|
2394
2394
|
...r,
|
|
2395
2395
|
defaultValue: ws(R) ? R[W] : void 0,
|
|
2396
2396
|
joinArrays: !1,
|
|
@@ -2403,12 +2403,12 @@ class $r extends jr {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
y = U;
|
|
2405
2405
|
}
|
|
2406
|
-
} else if (
|
|
2406
|
+
} else if (p && K(f) && Array.isArray(y))
|
|
2407
2407
|
y = y.join(f), y && (y = this.extendTranslation(y, t, r, n));
|
|
2408
2408
|
else {
|
|
2409
2409
|
let j = !1, U = !1;
|
|
2410
|
-
!this.isValidLookup(y) &&
|
|
2411
|
-
const W = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && U ? void 0 : y, re =
|
|
2410
|
+
!this.isValidLookup(y) && h && (j = !0, y = R), this.isValidLookup(y) || (U = !0, y = o);
|
|
2411
|
+
const W = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && U ? void 0 : y, re = h && R !== y && this.options.updateMissing;
|
|
2412
2412
|
if (U || j || re) {
|
|
2413
2413
|
if (this.logger.log(re ? "updateKey" : "missingKey", l, c, o, re ? R : y), a) {
|
|
2414
2414
|
const ce = this.resolve(o, {
|
|
@@ -2418,13 +2418,13 @@ class $r extends jr {
|
|
|
2418
2418
|
ce && ce.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
2419
2419
|
}
|
|
2420
2420
|
let ne = [];
|
|
2421
|
-
const
|
|
2422
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
2423
|
-
for (let ce = 0; ce <
|
|
2424
|
-
ne.push(
|
|
2421
|
+
const pe = this.languageUtils.getFallbackCodes(this.options.fallbackLng, r.lng || this.language);
|
|
2422
|
+
if (this.options.saveMissingTo === "fallback" && pe && pe[0])
|
|
2423
|
+
for (let ce = 0; ce < pe.length; ce++)
|
|
2424
|
+
ne.push(pe[ce]);
|
|
2425
2425
|
else this.options.saveMissingTo === "all" ? ne = this.languageUtils.toResolveHierarchy(r.lng || this.language) : ne.push(r.lng || this.language);
|
|
2426
2426
|
const J = (ce, M, O) => {
|
|
2427
|
-
const C =
|
|
2427
|
+
const C = h && O !== y ? O : W;
|
|
2428
2428
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(ce, c, M, C, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ce, c, M, C, re, r), this.emit("missingKey", ce, c, M, y);
|
|
2429
2429
|
};
|
|
2430
2430
|
this.options.saveMissing && (this.options.saveMissingPlurals && u ? ne.forEach((ce) => {
|
|
@@ -2494,24 +2494,24 @@ class $r extends jr {
|
|
|
2494
2494
|
this.options.fallbackNS && (m = m.concat(this.options.fallbackNS));
|
|
2495
2495
|
const y = r.count !== void 0 && !K(r.count), S = y && !r.ordinal && r.count === 0, v = r.context !== void 0 && (K(r.context) || typeof r.context == "number") && r.context !== "", g = r.lngs ? r.lngs : this.languageUtils.toResolveHierarchy(r.lng || this.language, r.fallbackLng);
|
|
2496
2496
|
m.forEach((f) => {
|
|
2497
|
-
this.isValidLookup(n) || (i = f, !bs[`${g[0]}-${f}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(i) && (bs[`${g[0]}-${f}`] = !0, this.logger.warn(`key "${s}" for languages "${g.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!!!")), g.forEach((
|
|
2497
|
+
this.isValidLookup(n) || (i = f, !bs[`${g[0]}-${f}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(i) && (bs[`${g[0]}-${f}`] = !0, this.logger.warn(`key "${s}" for languages "${g.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!!!")), g.forEach((p) => {
|
|
2498
2498
|
if (this.isValidLookup(n)) return;
|
|
2499
|
-
o =
|
|
2499
|
+
o = p;
|
|
2500
2500
|
const u = [d];
|
|
2501
2501
|
if (this.i18nFormat?.addLookupKeys)
|
|
2502
|
-
this.i18nFormat.addLookupKeys(u, d,
|
|
2502
|
+
this.i18nFormat.addLookupKeys(u, d, p, f, r);
|
|
2503
2503
|
else {
|
|
2504
2504
|
let w;
|
|
2505
|
-
y && (w = this.pluralResolver.getSuffix(
|
|
2505
|
+
y && (w = this.pluralResolver.getSuffix(p, r.count, r));
|
|
2506
2506
|
const _ = `${this.options.pluralSeparator}zero`, E = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2507
2507
|
if (y && (u.push(d + w), r.ordinal && w.indexOf(E) === 0 && u.push(d + w.replace(E, this.options.pluralSeparator)), S && u.push(d + _)), v) {
|
|
2508
2508
|
const R = `${d}${this.options.contextSeparator}${r.context}`;
|
|
2509
2509
|
u.push(R), y && (u.push(R + w), r.ordinal && w.indexOf(E) === 0 && u.push(R + w.replace(E, this.options.pluralSeparator)), S && u.push(R + _));
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
|
-
let
|
|
2513
|
-
for (;
|
|
2514
|
-
this.isValidLookup(n) || (a =
|
|
2512
|
+
let h;
|
|
2513
|
+
for (; h = u.pop(); )
|
|
2514
|
+
this.isValidLookup(n) || (a = h, n = this.getResource(p, f, h, r));
|
|
2515
2515
|
}));
|
|
2516
2516
|
});
|
|
2517
2517
|
}), {
|
|
@@ -2680,7 +2680,7 @@ class _u {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
2682
|
const Rs = function(e, t, r) {
|
|
2683
|
-
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a =
|
|
2683
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = hu(e, t, r);
|
|
2684
2684
|
return !a && s && K(r) && (a = Pn(e, r, n), a === void 0 && (a = Pn(t, r, n))), a;
|
|
2685
2685
|
}, nn = (e) => e.replace(/\$/g, "$$$$");
|
|
2686
2686
|
class Su {
|
|
@@ -2709,10 +2709,10 @@ class Su {
|
|
|
2709
2709
|
nestingSuffix: v,
|
|
2710
2710
|
nestingSuffixEscaped: g,
|
|
2711
2711
|
nestingOptionsSeparator: f,
|
|
2712
|
-
maxReplaces:
|
|
2712
|
+
maxReplaces: p,
|
|
2713
2713
|
alwaysFormat: u
|
|
2714
2714
|
} = t.interpolation;
|
|
2715
|
-
this.escape = r !== void 0 ? r : gu, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Xe(a) : o || "{{", this.suffix = i ? Xe(i) : c || "}}", this.formatSeparator = l || ",", this.unescapePrefix = d ? "" : m || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = y ? Xe(y) : S || Xe("$t("), this.nestingSuffix = v ? Xe(v) : g || Xe(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces =
|
|
2715
|
+
this.escape = r !== void 0 ? r : gu, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Xe(a) : o || "{{", this.suffix = i ? Xe(i) : c || "}}", this.formatSeparator = l || ",", this.unescapePrefix = d ? "" : m || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = y ? Xe(y) : S || Xe("$t("), this.nestingSuffix = v ? Xe(v) : g || Xe(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = p || 1e3, this.alwaysFormat = u !== void 0 ? u : !1, this.resetRegExp();
|
|
2716
2716
|
}
|
|
2717
2717
|
reset() {
|
|
2718
2718
|
this.options && this.init(this.options);
|
|
@@ -2725,12 +2725,12 @@ class Su {
|
|
|
2725
2725
|
let a, o, i;
|
|
2726
2726
|
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (S) => {
|
|
2727
2727
|
if (S.indexOf(this.formatSeparator) < 0) {
|
|
2728
|
-
const
|
|
2729
|
-
return this.alwaysFormat ? this.format(
|
|
2728
|
+
const p = Rs(r, c, S, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
2729
|
+
return this.alwaysFormat ? this.format(p, void 0, n, {
|
|
2730
2730
|
...s,
|
|
2731
2731
|
...r,
|
|
2732
2732
|
interpolationkey: S
|
|
2733
|
-
}) :
|
|
2733
|
+
}) : p;
|
|
2734
2734
|
}
|
|
2735
2735
|
const v = S.split(this.formatSeparator), g = v.shift().trim(), f = v.join(this.formatSeparator).trim();
|
|
2736
2736
|
return this.format(Rs(r, c, g, this.options.keySeparator, this.options.ignoreJSONStructure), f, n, {
|
|
@@ -2761,7 +2761,7 @@ class Su {
|
|
|
2761
2761
|
continue;
|
|
2762
2762
|
} else
|
|
2763
2763
|
this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`), o = "";
|
|
2764
|
-
else !K(o) && !this.useRawValueToEscape && (o =
|
|
2764
|
+
else !K(o) && !this.useRawValueToEscape && (o = hs(o));
|
|
2765
2765
|
const g = S.safeValue(o);
|
|
2766
2766
|
if (t = t.replace(a[0], g), m ? (S.regex.lastIndex += o.length, S.regex.lastIndex -= a[0].length) : S.regex.lastIndex = 0, i++, i >= this.maxReplaces)
|
|
2767
2767
|
break;
|
|
@@ -2799,7 +2799,7 @@ class Su {
|
|
|
2799
2799
|
s[1] = d.shift(), c = d, l = !0;
|
|
2800
2800
|
}
|
|
2801
2801
|
if (a = r(i.call(this, s[1].trim(), o), o), a && s[0] === t && !K(a)) return a;
|
|
2802
|
-
K(a) || (a =
|
|
2802
|
+
K(a) || (a = hs(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`), a = ""), l && (a = c.reduce((d, m) => this.format(d, m, n.lng, {
|
|
2803
2803
|
...n,
|
|
2804
2804
|
interpolationkey: s[1].trim()
|
|
2805
2805
|
}), a.trim())), t = t.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
@@ -2954,7 +2954,7 @@ class Ou extends jr {
|
|
|
2954
2954
|
}), this.state[t] = r ? -1 : 2, r && n && (this.state[t] = 0);
|
|
2955
2955
|
const i = {};
|
|
2956
2956
|
this.queue.forEach((c) => {
|
|
2957
|
-
|
|
2957
|
+
pu(c.loaded, [a], o), Au(c, t), r && c.errors.push(r), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((l) => {
|
|
2958
2958
|
i[l] || (i[l] = {});
|
|
2959
2959
|
const d = c.loaded[l];
|
|
2960
2960
|
d.length && d.forEach((m) => {
|
|
@@ -3832,7 +3832,7 @@ function ks(e) {
|
|
|
3832
3832
|
);
|
|
3833
3833
|
return r.setUTCFullYear(t.getFullYear()), +e - +r;
|
|
3834
3834
|
}
|
|
3835
|
-
function
|
|
3835
|
+
function pt(e, ...t) {
|
|
3836
3836
|
const r = $e.bind(
|
|
3837
3837
|
null,
|
|
3838
3838
|
t.find((n) => typeof n == "object")
|
|
@@ -3844,7 +3844,7 @@ function Ls(e, t) {
|
|
|
3844
3844
|
return r.setHours(0, 0, 0, 0), r;
|
|
3845
3845
|
}
|
|
3846
3846
|
function zo(e, t, r) {
|
|
3847
|
-
const [n, s] =
|
|
3847
|
+
const [n, s] = pt(
|
|
3848
3848
|
r?.in,
|
|
3849
3849
|
e,
|
|
3850
3850
|
t
|
|
@@ -3869,7 +3869,7 @@ function Dt(e) {
|
|
|
3869
3869
|
return !(!sl(e) && typeof e != "number" || isNaN(+fe(e)));
|
|
3870
3870
|
}
|
|
3871
3871
|
function al(e, t, r) {
|
|
3872
|
-
const [n, s] =
|
|
3872
|
+
const [n, s] = pt(
|
|
3873
3873
|
r?.in,
|
|
3874
3874
|
e,
|
|
3875
3875
|
t
|
|
@@ -3877,7 +3877,7 @@ function al(e, t, r) {
|
|
|
3877
3877
|
return a * 12 + o;
|
|
3878
3878
|
}
|
|
3879
3879
|
function ol(e, t, r) {
|
|
3880
|
-
const [n, s] =
|
|
3880
|
+
const [n, s] = pt(
|
|
3881
3881
|
r?.in,
|
|
3882
3882
|
e,
|
|
3883
3883
|
t
|
|
@@ -3885,7 +3885,7 @@ function ol(e, t, r) {
|
|
|
3885
3885
|
return n.getFullYear() - s.getFullYear();
|
|
3886
3886
|
}
|
|
3887
3887
|
function $n(e, t, r) {
|
|
3888
|
-
const [n, s] =
|
|
3888
|
+
const [n, s] = pt(
|
|
3889
3889
|
r?.in,
|
|
3890
3890
|
e,
|
|
3891
3891
|
t
|
|
@@ -3913,7 +3913,7 @@ function ul(e, t) {
|
|
|
3913
3913
|
return +il(r, t) == +cl(r, t);
|
|
3914
3914
|
}
|
|
3915
3915
|
function Un(e, t, r) {
|
|
3916
|
-
const [n, s, a] =
|
|
3916
|
+
const [n, s, a] = pt(
|
|
3917
3917
|
r?.in,
|
|
3918
3918
|
e,
|
|
3919
3919
|
e,
|
|
@@ -3929,7 +3929,7 @@ function Un(e, t, r) {
|
|
|
3929
3929
|
return l === 0 ? 0 : l;
|
|
3930
3930
|
}
|
|
3931
3931
|
function Fn(e, t, r) {
|
|
3932
|
-
const [n, s] =
|
|
3932
|
+
const [n, s] = pt(
|
|
3933
3933
|
r?.in,
|
|
3934
3934
|
e,
|
|
3935
3935
|
t
|
|
@@ -4020,12 +4020,12 @@ const fl = {
|
|
|
4020
4020
|
long: "MMMM do, y",
|
|
4021
4021
|
medium: "MMM d, y",
|
|
4022
4022
|
short: "MM/dd/yyyy"
|
|
4023
|
-
},
|
|
4023
|
+
}, pl = {
|
|
4024
4024
|
full: "h:mm:ss a zzzz",
|
|
4025
4025
|
long: "h:mm:ss a z",
|
|
4026
4026
|
medium: "h:mm:ss a",
|
|
4027
4027
|
short: "h:mm a"
|
|
4028
|
-
},
|
|
4028
|
+
}, hl = {
|
|
4029
4029
|
full: "{{date}} 'at' {{time}}",
|
|
4030
4030
|
long: "{{date}} 'at' {{time}}",
|
|
4031
4031
|
medium: "{{date}}, {{time}}",
|
|
@@ -4036,11 +4036,11 @@ const fl = {
|
|
|
4036
4036
|
defaultWidth: "full"
|
|
4037
4037
|
}),
|
|
4038
4038
|
time: we({
|
|
4039
|
-
formats:
|
|
4039
|
+
formats: pl,
|
|
4040
4040
|
defaultWidth: "full"
|
|
4041
4041
|
}),
|
|
4042
4042
|
dateTime: we({
|
|
4043
|
-
formats:
|
|
4043
|
+
formats: hl,
|
|
4044
4044
|
defaultWidth: "full"
|
|
4045
4045
|
})
|
|
4046
4046
|
}, gl = {
|
|
@@ -5164,7 +5164,7 @@ function ld(e, t) {
|
|
|
5164
5164
|
if (!r) return /* @__PURE__ */ new Date(NaN);
|
|
5165
5165
|
const n = !!r[4], s = yt(r[1]), a = yt(r[2]) - 1, o = yt(r[3]), i = yt(r[4]), c = yt(r[5]) - 1;
|
|
5166
5166
|
if (n)
|
|
5167
|
-
return yd(t, i, c) ?
|
|
5167
|
+
return yd(t, i, c) ? pd(t, i, c) : /* @__PURE__ */ new Date(NaN);
|
|
5168
5168
|
{
|
|
5169
5169
|
const l = /* @__PURE__ */ new Date(0);
|
|
5170
5170
|
return !md(t, a, o) || !gd(t, s) ? /* @__PURE__ */ new Date(NaN) : (l.setUTCFullYear(t, a, Math.max(s, o)), l);
|
|
@@ -5189,18 +5189,18 @@ function fd(e) {
|
|
|
5189
5189
|
const r = t[1] === "+" ? -1 : 1, n = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
|
|
5190
5190
|
return bd(n, s) ? r * (n * Bo + s * Ho) : NaN;
|
|
5191
5191
|
}
|
|
5192
|
-
function
|
|
5192
|
+
function pd(e, t, r) {
|
|
5193
5193
|
const n = /* @__PURE__ */ new Date(0);
|
|
5194
5194
|
n.setUTCFullYear(e, 0, 4);
|
|
5195
5195
|
const s = n.getUTCDay() || 7, a = (t - 1) * 7 + r + 1 - s;
|
|
5196
5196
|
return n.setUTCDate(n.getUTCDate() + a), n;
|
|
5197
5197
|
}
|
|
5198
|
-
const
|
|
5198
|
+
const hd = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
5199
5199
|
function ti(e) {
|
|
5200
5200
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
5201
5201
|
}
|
|
5202
5202
|
function md(e, t, r) {
|
|
5203
|
-
return t >= 0 && t <= 11 && r >= 1 && r <= (
|
|
5203
|
+
return t >= 0 && t <= 11 && r >= 1 && r <= (hd[t] || (ti(e) ? 29 : 28));
|
|
5204
5204
|
}
|
|
5205
5205
|
function gd(e, t) {
|
|
5206
5206
|
return t >= 1 && t <= (ti(e) ? 366 : 365);
|
|
@@ -5876,7 +5876,7 @@ const Fs = {
|
|
|
5876
5876
|
"noviembre",
|
|
5877
5877
|
"diciembre"
|
|
5878
5878
|
]
|
|
5879
|
-
},
|
|
5879
|
+
}, pf = {
|
|
5880
5880
|
narrow: ["d", "l", "m", "m", "j", "v", "s"],
|
|
5881
5881
|
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
|
|
5882
5882
|
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
|
|
@@ -5889,7 +5889,7 @@ const Fs = {
|
|
|
5889
5889
|
"viernes",
|
|
5890
5890
|
"sábado"
|
|
5891
5891
|
]
|
|
5892
|
-
},
|
|
5892
|
+
}, hf = {
|
|
5893
5893
|
narrow: {
|
|
5894
5894
|
am: "a",
|
|
5895
5895
|
pm: "p",
|
|
@@ -5967,11 +5967,11 @@ const Fs = {
|
|
|
5967
5967
|
defaultWidth: "wide"
|
|
5968
5968
|
}),
|
|
5969
5969
|
day: le({
|
|
5970
|
-
values:
|
|
5970
|
+
values: pf,
|
|
5971
5971
|
defaultWidth: "wide"
|
|
5972
5972
|
}),
|
|
5973
5973
|
dayPeriod: le({
|
|
5974
|
-
values:
|
|
5974
|
+
values: hf,
|
|
5975
5975
|
defaultWidth: "wide",
|
|
5976
5976
|
formattingValues: mf,
|
|
5977
5977
|
defaultFormattingWidth: "wide"
|
|
@@ -6330,7 +6330,7 @@ const Fs = {
|
|
|
6330
6330
|
narrow: /^[jfmasond]/i,
|
|
6331
6331
|
abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
6332
6332
|
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
|
|
6333
|
-
},
|
|
6333
|
+
}, ep = {
|
|
6334
6334
|
narrow: [
|
|
6335
6335
|
/^j/i,
|
|
6336
6336
|
/^f/i,
|
|
@@ -6359,18 +6359,18 @@ const Fs = {
|
|
|
6359
6359
|
/^n/i,
|
|
6360
6360
|
/^d/i
|
|
6361
6361
|
]
|
|
6362
|
-
},
|
|
6362
|
+
}, tp = {
|
|
6363
6363
|
narrow: /^[lmjvsd]/i,
|
|
6364
6364
|
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
6365
6365
|
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
6366
6366
|
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
|
|
6367
|
-
},
|
|
6367
|
+
}, rp = {
|
|
6368
6368
|
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
6369
6369
|
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
|
|
6370
|
-
},
|
|
6370
|
+
}, np = {
|
|
6371
6371
|
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
6372
6372
|
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
|
|
6373
|
-
},
|
|
6373
|
+
}, sp = {
|
|
6374
6374
|
any: {
|
|
6375
6375
|
am: /^a/i,
|
|
6376
6376
|
pm: /^p/i,
|
|
@@ -6381,7 +6381,7 @@ const Fs = {
|
|
|
6381
6381
|
evening: /soir/i,
|
|
6382
6382
|
night: /nuit/i
|
|
6383
6383
|
}
|
|
6384
|
-
},
|
|
6384
|
+
}, ap = {
|
|
6385
6385
|
ordinalNumber: Fr({
|
|
6386
6386
|
matchPattern: Gf,
|
|
6387
6387
|
parsePattern: Kf,
|
|
@@ -6403,19 +6403,19 @@ const Fs = {
|
|
|
6403
6403
|
month: de({
|
|
6404
6404
|
matchPatterns: Zf,
|
|
6405
6405
|
defaultMatchWidth: "wide",
|
|
6406
|
-
parsePatterns:
|
|
6406
|
+
parsePatterns: ep,
|
|
6407
6407
|
defaultParseWidth: "any"
|
|
6408
6408
|
}),
|
|
6409
6409
|
day: de({
|
|
6410
|
-
matchPatterns:
|
|
6410
|
+
matchPatterns: tp,
|
|
6411
6411
|
defaultMatchWidth: "wide",
|
|
6412
|
-
parsePatterns:
|
|
6412
|
+
parsePatterns: rp,
|
|
6413
6413
|
defaultParseWidth: "any"
|
|
6414
6414
|
}),
|
|
6415
6415
|
dayPeriod: de({
|
|
6416
|
-
matchPatterns:
|
|
6416
|
+
matchPatterns: np,
|
|
6417
6417
|
defaultMatchWidth: "any",
|
|
6418
|
-
parsePatterns:
|
|
6418
|
+
parsePatterns: sp,
|
|
6419
6419
|
defaultParseWidth: "any"
|
|
6420
6420
|
})
|
|
6421
6421
|
}, Ws = {
|
|
@@ -6424,12 +6424,12 @@ const Fs = {
|
|
|
6424
6424
|
formatLong: Mf,
|
|
6425
6425
|
formatRelative: jf,
|
|
6426
6426
|
localize: zf,
|
|
6427
|
-
match:
|
|
6427
|
+
match: ap,
|
|
6428
6428
|
options: {
|
|
6429
6429
|
weekStartsOn: 1,
|
|
6430
6430
|
firstWeekContainsDate: 4
|
|
6431
6431
|
}
|
|
6432
|
-
},
|
|
6432
|
+
}, op = "dd/MM/yyyy", tv = "MMMM dd, yyyy", rv = "do MMM, yyyy", ip = "dd/MM/yyyy HH:mm", nv = "yyyy-MM-dd", sv = "d/m/Y", Pe = {
|
|
6433
6433
|
PARSE_ERROR: "DATE_ERROR_PARSE",
|
|
6434
6434
|
FORMAT_ERROR: "DATE_ERROR_FORMAT",
|
|
6435
6435
|
EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
|
|
@@ -6446,11 +6446,11 @@ const Fs = {
|
|
|
6446
6446
|
de: Vs,
|
|
6447
6447
|
"de-DE": Vs
|
|
6448
6448
|
};
|
|
6449
|
-
function
|
|
6449
|
+
function cp() {
|
|
6450
6450
|
const e = Nt();
|
|
6451
6451
|
return zs[e] || zs.en;
|
|
6452
6452
|
}
|
|
6453
|
-
function
|
|
6453
|
+
function up(e) {
|
|
6454
6454
|
if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e))
|
|
6455
6455
|
return null;
|
|
6456
6456
|
const t = ei(e);
|
|
@@ -6506,13 +6506,13 @@ function ni(e, t, r) {
|
|
|
6506
6506
|
message: r(Pe.INVALID_FORMAT)
|
|
6507
6507
|
}
|
|
6508
6508
|
};
|
|
6509
|
-
const s =
|
|
6509
|
+
const s = cp();
|
|
6510
6510
|
return { formattedResult: rd(n, t, { locale: s }) };
|
|
6511
6511
|
}
|
|
6512
6512
|
function av(e, t) {
|
|
6513
|
-
return ni(e,
|
|
6513
|
+
return ni(e, ip, t);
|
|
6514
6514
|
}
|
|
6515
|
-
function ov(e, t, r =
|
|
6515
|
+
function ov(e, t, r = op) {
|
|
6516
6516
|
return ni(e, r, t);
|
|
6517
6517
|
}
|
|
6518
6518
|
function iv(e, t, r) {
|
|
@@ -6627,11 +6627,11 @@ function fv(e, t, r = !1) {
|
|
|
6627
6627
|
return r ? i : -i;
|
|
6628
6628
|
});
|
|
6629
6629
|
}
|
|
6630
|
-
const
|
|
6630
|
+
const pv = async (e, t, r) => {
|
|
6631
6631
|
const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
|
|
6632
6632
|
await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), s && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
|
|
6633
|
-
},
|
|
6634
|
-
function
|
|
6633
|
+
}, lp = () => Math.random().toString(36).substring(2, 9);
|
|
6634
|
+
function hv(e, t = " -") {
|
|
6635
6635
|
return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
|
|
6636
6636
|
}
|
|
6637
6637
|
function si(e) {
|
|
@@ -6677,7 +6677,7 @@ function vv(e, t, r) {
|
|
|
6677
6677
|
return !i && !c;
|
|
6678
6678
|
});
|
|
6679
6679
|
}
|
|
6680
|
-
function
|
|
6680
|
+
function dp(e) {
|
|
6681
6681
|
const t = /\+/g, r = /([^&=]+)=?([^&]*)/g, n = (i) => decodeURIComponent(i.replace(t, " ")), s = e ?? window.location.search.substring(1), a = {};
|
|
6682
6682
|
let o;
|
|
6683
6683
|
for (; (o = r.exec(s)) !== null; )
|
|
@@ -6687,14 +6687,14 @@ function dh(e) {
|
|
|
6687
6687
|
function bv(e, t, r) {
|
|
6688
6688
|
const n = /{{([^}]*)}}/g, s = e.match(n);
|
|
6689
6689
|
let a = e;
|
|
6690
|
-
const o = r ?? !1, i = o ?
|
|
6690
|
+
const o = r ?? !1, i = o ? dp() : {};
|
|
6691
6691
|
return s && s.forEach((c) => {
|
|
6692
6692
|
const l = c.replace("{{", "").replace("}}", "");
|
|
6693
6693
|
let d = t[l];
|
|
6694
6694
|
!d && o && (d = i[l] || ""), a = a.replace(c, d);
|
|
6695
6695
|
}), a.trim();
|
|
6696
6696
|
}
|
|
6697
|
-
const
|
|
6697
|
+
const fp = (e) => new Promise((t, r) => {
|
|
6698
6698
|
const n = new FileReader();
|
|
6699
6699
|
n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
|
|
6700
6700
|
}), wv = (e) => {
|
|
@@ -6708,7 +6708,7 @@ const fh = (e) => new Promise((t, r) => {
|
|
|
6708
6708
|
function Ev(e) {
|
|
6709
6709
|
return e.replace(/\s+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
|
|
6710
6710
|
}
|
|
6711
|
-
const
|
|
6711
|
+
const pp = (e) => Z + `/user?username=${e}&v=custom:(username,uuid)`, hp = "bahmni.user.location";
|
|
6712
6712
|
async function _v() {
|
|
6713
6713
|
const e = si(zu);
|
|
6714
6714
|
if (!e)
|
|
@@ -6717,14 +6717,14 @@ async function _v() {
|
|
|
6717
6717
|
const t = decodeURIComponent(e).replace(
|
|
6718
6718
|
/^"(.*)"$/,
|
|
6719
6719
|
"$1"
|
|
6720
|
-
), r = await z(
|
|
6720
|
+
), r = await z(pp(t));
|
|
6721
6721
|
return !r.results || r.results.length === 0 ? null : r.results[0];
|
|
6722
6722
|
} catch {
|
|
6723
6723
|
throw new Error(ie.t("ERROR_FETCHING_USER_DETAILS"));
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
6726
|
const Vn = () => {
|
|
6727
|
-
const e = si(
|
|
6727
|
+
const e = si(hp) ?? null;
|
|
6728
6728
|
if (!e)
|
|
6729
6729
|
throw new Error(ie.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
|
|
6730
6730
|
const t = JSON.parse(
|
|
@@ -6744,14 +6744,14 @@ const Vn = () => {
|
|
|
6744
6744
|
searchFieldParam: "addressFieldName",
|
|
6745
6745
|
resultParam: "addressSearchResultsConfig"
|
|
6746
6746
|
}
|
|
6747
|
-
},
|
|
6747
|
+
}, mp = (e, t) => {
|
|
6748
6748
|
t.forEach((r) => {
|
|
6749
6749
|
const n = Hn[r.type];
|
|
6750
6750
|
n && r.fields.forEach((s) => {
|
|
6751
6751
|
e.append(n.resultParam, s);
|
|
6752
6752
|
});
|
|
6753
6753
|
});
|
|
6754
|
-
},
|
|
6754
|
+
}, gp = (e) => ye + `/Patient/${e}`, yp = (e, t, r) => {
|
|
6755
6755
|
const n = new URLSearchParams({
|
|
6756
6756
|
filterOnAllIdentifiers: "false",
|
|
6757
6757
|
identifier: e,
|
|
@@ -6766,7 +6766,7 @@ const Vn = () => {
|
|
|
6766
6766
|
n.append(a.searchFieldParam, o), n.append(a.resultParam, o);
|
|
6767
6767
|
});
|
|
6768
6768
|
}), `${Z}/bahmni/search/patient/lucene?${n.toString()}`;
|
|
6769
|
-
},
|
|
6769
|
+
}, vp = (e, t, r, n, s) => {
|
|
6770
6770
|
const a = e.trim(), o = new URLSearchParams({
|
|
6771
6771
|
loginLocationUuid: s,
|
|
6772
6772
|
startIndex: "0",
|
|
@@ -6775,39 +6775,39 @@ const Vn = () => {
|
|
|
6775
6775
|
}), i = Hn[t];
|
|
6776
6776
|
return i && (o.set(i.searchParam, a), r.forEach((c) => {
|
|
6777
6777
|
o.append(i.searchFieldParam, c);
|
|
6778
|
-
})),
|
|
6779
|
-
}, ai = Z + "/idgen/identifiertype",
|
|
6778
|
+
})), mp(o, n), Z + `/bahmni/search/patient?${o.toString()}`;
|
|
6779
|
+
}, ai = Z + "/idgen/identifiertype", bp = (e) => Z + `/bahmni/app/setting?module=${e}`, wp = "bahmni.primaryIdentifierType", Ep = Z + "/bahmnicore/patientprofile", _p = (e) => Z + `/bahmnicore/patientprofile/${e}`, Sp = (e) => Z + `/patientprofile/${e}?v=full`, Rp = (e, t, r = 20, n) => {
|
|
6780
6780
|
let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
|
|
6781
6781
|
return n && (s += `&parent=${n}`), s;
|
|
6782
|
-
},
|
|
6782
|
+
}, Tp = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", Ap = Z + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", Op = 20, Pp = 2, Sv = 120, Rv = 50, Tv = 15, $p = /^[a-f0-9-]{36}$/i, Np = (e) => Wu + `/patientImage?patientUuid=${e}`, Dp = Z + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Ip = async (e) => {
|
|
6783
6783
|
if (!e || e.trim() === "")
|
|
6784
6784
|
throw new Error("Invalid patient UUID: UUID cannot be empty");
|
|
6785
|
-
if (!$
|
|
6785
|
+
if (!$p.test(e))
|
|
6786
6786
|
throw new Error(`Invalid patient UUID format: ${e}`);
|
|
6787
|
-
return z(
|
|
6788
|
-
},
|
|
6787
|
+
return z(gp(e));
|
|
6788
|
+
}, Cp = (e) => !e.extension || !Array.isArray(e.extension) ? [] : e.extension.flatMap((t) => t.extension && Array.isArray(t.extension) ? t.extension.filter((r) => r.valueString).map((r) => r.valueString) : []), kp = (e) => {
|
|
6789
6789
|
if (!e.name || e.name.length === 0)
|
|
6790
6790
|
return null;
|
|
6791
6791
|
const t = e.name[0], r = t.given?.join(" ") ?? "", n = t.family ?? "";
|
|
6792
6792
|
return !r && !n ? null : `${r} ${n}`.trim();
|
|
6793
|
-
},
|
|
6793
|
+
}, Lp = (e) => {
|
|
6794
6794
|
if (!e) return null;
|
|
6795
6795
|
const t = [
|
|
6796
6796
|
...e.line ?? [],
|
|
6797
6797
|
// Standard address lines
|
|
6798
|
-
...
|
|
6798
|
+
...Cp(e)
|
|
6799
6799
|
// Extracted address extensions
|
|
6800
6800
|
], r = e.city ?? "", n = e.state ?? "", s = e.postalCode ?? "", a = t.filter(Boolean);
|
|
6801
6801
|
return r && a.push(r), n && s ? a.push(`${n} ${s}`) : n ? a.push(n) : s && a.push(s), a.length > 0 ? a.join(", ").trim() : null;
|
|
6802
|
-
},
|
|
6803
|
-
const t = e.address && e.address.length > 0 ?
|
|
6802
|
+
}, Mp = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, xp = (e) => {
|
|
6803
|
+
const t = e.address && e.address.length > 0 ? Lp(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? Mp(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
|
|
6804
6804
|
n.length > 0 && n.forEach((o) => {
|
|
6805
6805
|
!o.type?.text || !o.value || s.set(o.type.text, o.value);
|
|
6806
6806
|
});
|
|
6807
|
-
const a = e.birthDate ?
|
|
6807
|
+
const a = e.birthDate ? up(e.birthDate) : null;
|
|
6808
6808
|
return {
|
|
6809
6809
|
id: e.id ?? "",
|
|
6810
|
-
fullName:
|
|
6810
|
+
fullName: kp(e),
|
|
6811
6811
|
gender: e.gender ?? null,
|
|
6812
6812
|
birthDate: e.birthDate ?? null,
|
|
6813
6813
|
formattedAddress: t,
|
|
@@ -6816,22 +6816,22 @@ const Vn = () => {
|
|
|
6816
6816
|
age: a
|
|
6817
6817
|
};
|
|
6818
6818
|
}, Av = async (e) => {
|
|
6819
|
-
const t = await
|
|
6820
|
-
return
|
|
6819
|
+
const t = await Ip(e);
|
|
6820
|
+
return xp(t);
|
|
6821
6821
|
}, Ov = async (e) => {
|
|
6822
|
-
const t = await fetch(
|
|
6822
|
+
const t = await fetch(Np(e));
|
|
6823
6823
|
if (!t.ok) return null;
|
|
6824
6824
|
const r = await t.blob();
|
|
6825
|
-
return await
|
|
6825
|
+
return await fp(r);
|
|
6826
6826
|
}, Pv = async (e, t) => {
|
|
6827
6827
|
const r = Vn();
|
|
6828
6828
|
return await z(
|
|
6829
|
-
|
|
6829
|
+
yp(e, r.uuid, t)
|
|
6830
6830
|
);
|
|
6831
6831
|
}, $v = async (e, t, r, n, s) => {
|
|
6832
6832
|
const a = Vn();
|
|
6833
6833
|
return await z(
|
|
6834
|
-
|
|
6834
|
+
vp(
|
|
6835
6835
|
e,
|
|
6836
6836
|
t,
|
|
6837
6837
|
r,
|
|
@@ -6839,12 +6839,12 @@ const Vn = () => {
|
|
|
6839
6839
|
a.uuid
|
|
6840
6840
|
)
|
|
6841
6841
|
);
|
|
6842
|
-
}, Nv = async () => z(ai),
|
|
6843
|
-
(r) => r.property ===
|
|
6842
|
+
}, Nv = async () => z(ai), jp = async () => (await z(bp("core"))).find(
|
|
6843
|
+
(r) => r.property === wp
|
|
6844
6844
|
)?.value ?? null, Dv = async () => {
|
|
6845
6845
|
const [e, t] = await Promise.all([
|
|
6846
6846
|
z(ai),
|
|
6847
|
-
|
|
6847
|
+
jp()
|
|
6848
6848
|
]), r = [], n = /* @__PURE__ */ new Map();
|
|
6849
6849
|
if (!t)
|
|
6850
6850
|
return { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: null };
|
|
@@ -6858,25 +6858,25 @@ const Vn = () => {
|
|
|
6858
6858
|
sourcesByPrefix: n,
|
|
6859
6859
|
primaryIdentifierTypeUuid: t
|
|
6860
6860
|
}) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
|
|
6861
|
-
}, Iv = async (e) => ft(
|
|
6862
|
-
|
|
6861
|
+
}, Iv = async (e) => ft(Ep, e), Cv = async (e, t) => ft(
|
|
6862
|
+
_p(e),
|
|
6863
6863
|
t
|
|
6864
|
-
), kv = async () => z(Fo("mrs.genders")), Lv = async (e, t, r =
|
|
6865
|
-
if (!t || t.length <
|
|
6864
|
+
), kv = async () => z(Fo("mrs.genders")), Lv = async (e, t, r = Op, n) => {
|
|
6865
|
+
if (!t || t.length < Pp)
|
|
6866
6866
|
return [];
|
|
6867
6867
|
try {
|
|
6868
6868
|
return await z(
|
|
6869
|
-
|
|
6869
|
+
Rp(e, t, r, n)
|
|
6870
6870
|
);
|
|
6871
6871
|
} catch (s) {
|
|
6872
6872
|
throw new Error(
|
|
6873
6873
|
`Failed to fetch address hierarchy for field "${e}": ${s instanceof Error ? s.message : "Unknown error"}`
|
|
6874
6874
|
);
|
|
6875
6875
|
}
|
|
6876
|
-
}, Mv = async () => z(
|
|
6876
|
+
}, Mv = async () => z(Tp), xv = async (e) => z(Sp(e)), jv = async () => {
|
|
6877
6877
|
try {
|
|
6878
6878
|
return (await z(
|
|
6879
|
-
|
|
6879
|
+
Ap
|
|
6880
6880
|
)).results.map((t) => ({
|
|
6881
6881
|
uuid: t.uuid,
|
|
6882
6882
|
aIsToB: t.aIsToB,
|
|
@@ -6887,12 +6887,12 @@ const Vn = () => {
|
|
|
6887
6887
|
`Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
6888
6888
|
);
|
|
6889
6889
|
}
|
|
6890
|
-
}, qv = async () => z(
|
|
6891
|
-
var
|
|
6892
|
-
const Uv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", Fv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", Vv = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", Hv = (e) => e === "java.lang.Integer" || e === "java.lang.Float", Bv = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Wv = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype",
|
|
6890
|
+
}, qv = async () => z(Dp);
|
|
6891
|
+
var qp = /* @__PURE__ */ ((e) => (e.BOOLEAN = "java.lang.Boolean", e.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", e.CONCEPT = "org.openmrs.Concept", e.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", e.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", e.STRING = "java.lang.String", e.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", e.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", e.INTEGER = "java.lang.Integer", e.FLOAT = "java.lang.Float", e.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", e.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", e))(qp || {}), Up = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(Up || {});
|
|
6892
|
+
const Uv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", Fv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", Vv = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", Hv = (e) => e === "java.lang.Integer" || e === "java.lang.Float", Bv = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Wv = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Fp = (e) => {
|
|
6893
6893
|
const t = new CustomEvent("bahmni-audit-log", { detail: e });
|
|
6894
6894
|
window.dispatchEvent(t);
|
|
6895
|
-
},
|
|
6895
|
+
}, Vp = (e) => {
|
|
6896
6896
|
const t = (r) => {
|
|
6897
6897
|
e(r.detail);
|
|
6898
6898
|
};
|
|
@@ -6940,27 +6940,27 @@ const Uv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
|
|
|
6940
6940
|
eventType: "VIEWED_RADIOLOGY_RESULTS",
|
|
6941
6941
|
message: "VIEWED_RADIOLOGY_RESULTS_MESSAGE"
|
|
6942
6942
|
}
|
|
6943
|
-
},
|
|
6943
|
+
}, Hp = Z + "/auditlog", Bp = {
|
|
6944
6944
|
UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
|
|
6945
|
-
},
|
|
6946
|
-
const t = await
|
|
6945
|
+
}, Wp = () => Z + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", zp = Z + "/visit", Gp = (e) => Z + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, Kp = (e) => Z + `/bahmnicore/visitLocation/${e}`, zv = async () => z(Wp()), Yp = async (e) => z(Gp(e)), Jp = async (e) => z(Kp(e)), Xp = async (e) => ft(zp, e), Gv = async (e) => {
|
|
6946
|
+
const t = await Yp(e);
|
|
6947
6947
|
return t?.results && t.results.length > 0;
|
|
6948
6948
|
}, Kv = async (e, t) => {
|
|
6949
|
-
const r = await
|
|
6949
|
+
const r = await Jp(
|
|
6950
6950
|
Vn().uuid
|
|
6951
6951
|
), n = {
|
|
6952
6952
|
patient: e,
|
|
6953
6953
|
visitType: t.uuid,
|
|
6954
6954
|
location: r.uuid
|
|
6955
|
-
}, s = await
|
|
6956
|
-
return
|
|
6955
|
+
}, s = await Xp(n);
|
|
6956
|
+
return Fp({
|
|
6957
6957
|
eventType: Dn.OPEN_VISIT.eventType,
|
|
6958
6958
|
patientUuid: e,
|
|
6959
6959
|
messageParams: { visitType: t.name },
|
|
6960
6960
|
module: Dn.OPEN_VISIT.module
|
|
6961
6961
|
}), s;
|
|
6962
|
-
},
|
|
6963
|
-
|
|
6962
|
+
}, Qp = Z + "/appointments/search", oi = Z + "/appointments", Zp = "bahmni.sqlGet.upComingAppointments", eh = "bahmni.sqlGet.pastAppointments", th = (e) => `${oi}/${e}`, rh = (e) => `${qo}?patientUuid=${e}&q=${Zp}&v=full`, nh = (e) => `${qo}?patientUuid=${e}&q=${eh}&v=full`, sh = (e) => `${oi}/${e}/status-change`, Yv = async (e) => await ft(
|
|
6963
|
+
Qp,
|
|
6964
6964
|
e
|
|
6965
6965
|
), ii = (e) => {
|
|
6966
6966
|
const t = e.DASHBOARD_APPOINTMENTS_REASON_KEY ?? "", r = t ? [{ conceptUuid: "", name: t }] : [];
|
|
@@ -7018,17 +7018,17 @@ const Uv = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
|
|
|
7018
7018
|
}
|
|
7019
7019
|
};
|
|
7020
7020
|
}, Jv = async (e) => (await z(
|
|
7021
|
-
|
|
7021
|
+
rh(e)
|
|
7022
7022
|
) || []).map(ii), Xv = async (e) => (await z(
|
|
7023
|
-
|
|
7023
|
+
nh(e)
|
|
7024
7024
|
) || []).map(ii), Qv = async (e, t, r) => await ft(
|
|
7025
|
-
|
|
7025
|
+
sh(e),
|
|
7026
7026
|
{ toStatus: t, onDate: r }
|
|
7027
7027
|
);
|
|
7028
7028
|
async function Zv(e) {
|
|
7029
|
-
return await z(
|
|
7029
|
+
return await z(th(e));
|
|
7030
7030
|
}
|
|
7031
|
-
const
|
|
7031
|
+
const ah = () => {
|
|
7032
7032
|
let e = null;
|
|
7033
7033
|
return {
|
|
7034
7034
|
// Method to register the callback
|
|
@@ -7057,24 +7057,24 @@ const ap = () => {
|
|
|
7057
7057
|
);
|
|
7058
7058
|
}
|
|
7059
7059
|
};
|
|
7060
|
-
}, an =
|
|
7061
|
-
const r = Nt(), n =
|
|
7060
|
+
}, an = ah(), oh = (e) => ye + `/ValueSet/${e}/$expand`, ih = (e) => ye + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, ch = (e, t, r) => Z + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, uh = (e) => Z + `/concept/${e}`, lh = (e) => `${Z}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, eb = async (e, t = 20) => {
|
|
7061
|
+
const r = Nt(), n = ch(e, t, r);
|
|
7062
7062
|
return z(n);
|
|
7063
7063
|
}, Sr = async (e) => {
|
|
7064
|
-
const t =
|
|
7064
|
+
const t = oh(e);
|
|
7065
7065
|
return z(t);
|
|
7066
|
-
},
|
|
7067
|
-
const t = `${
|
|
7066
|
+
}, dh = async (e) => {
|
|
7067
|
+
const t = `${ih(e)}`;
|
|
7068
7068
|
return z(t);
|
|
7069
7069
|
};
|
|
7070
7070
|
async function tb(e) {
|
|
7071
|
-
return await z(
|
|
7071
|
+
return await z(uh(e));
|
|
7072
7072
|
}
|
|
7073
7073
|
async function rb(e) {
|
|
7074
|
-
const t =
|
|
7074
|
+
const t = lh(e), r = await z(t);
|
|
7075
7075
|
return !r.results || r.results.length === 0 ? null : r.results[0];
|
|
7076
7076
|
}
|
|
7077
|
-
const
|
|
7077
|
+
const fh = (e) => ye + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, rt = {
|
|
7078
7078
|
FOOD: {
|
|
7079
7079
|
code: "162553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
7080
7080
|
display: "food"
|
|
@@ -7087,15 +7087,15 @@ const fp = (e) => ye + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
|
|
|
7087
7087
|
code: "162554AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
7088
7088
|
display: "environment"
|
|
7089
7089
|
}
|
|
7090
|
-
},
|
|
7090
|
+
}, ph = {
|
|
7091
7091
|
code: "162555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
|
7092
|
-
},
|
|
7092
|
+
}, hh = (e) => e.filter((t) => t.inactive !== !0), mh = (e, t) => ({
|
|
7093
7093
|
uuid: e.code ?? "",
|
|
7094
7094
|
display: e.display ?? "",
|
|
7095
7095
|
type: t
|
|
7096
7096
|
}), on = (e, t) => {
|
|
7097
7097
|
const r = e.expansion?.contains ?? [];
|
|
7098
|
-
return
|
|
7098
|
+
return hh(r).map((s) => mh(s, t));
|
|
7099
7099
|
}, nb = async (e, t, r) => {
|
|
7100
7100
|
const n = e ?? rt.MEDICATION.code, s = t ?? rt.FOOD.code, a = r ?? rt.ENVIRONMENT.code, [o, i, c] = await Promise.all([
|
|
7101
7101
|
Sr(n),
|
|
@@ -7117,18 +7117,18 @@ const fp = (e) => ye + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
|
|
|
7117
7117
|
)
|
|
7118
7118
|
];
|
|
7119
7119
|
}, sb = async (e) => {
|
|
7120
|
-
const t = e ??
|
|
7120
|
+
const t = e ?? ph.code;
|
|
7121
7121
|
return (await Sr(t)).compose?.include[0]?.concept ?? [];
|
|
7122
7122
|
};
|
|
7123
|
-
async function
|
|
7124
|
-
return await z(`${
|
|
7123
|
+
async function gh(e) {
|
|
7124
|
+
return await z(`${fh(e)}`);
|
|
7125
7125
|
}
|
|
7126
|
-
async function
|
|
7127
|
-
return (await
|
|
7126
|
+
async function yh(e) {
|
|
7127
|
+
return (await gh(e)).entry?.map(
|
|
7128
7128
|
(r) => r.resource
|
|
7129
7129
|
) ?? [];
|
|
7130
7130
|
}
|
|
7131
|
-
function
|
|
7131
|
+
function vh(e) {
|
|
7132
7132
|
return e.map((t) => {
|
|
7133
7133
|
const r = t.clinicalStatus?.coding?.[0]?.display ?? "Unknown", n = t.reaction?.[0]?.severity ?? "Unknown";
|
|
7134
7134
|
return {
|
|
@@ -7151,21 +7151,21 @@ function vp(e) {
|
|
|
7151
7151
|
});
|
|
7152
7152
|
}
|
|
7153
7153
|
async function ab(e) {
|
|
7154
|
-
const t = await
|
|
7155
|
-
return
|
|
7154
|
+
const t = await yh(e);
|
|
7155
|
+
return vh(t);
|
|
7156
7156
|
}
|
|
7157
|
-
var
|
|
7158
|
-
const ob = "http://fhir.openmrs.org/code-system/encounter-type",
|
|
7157
|
+
var bh = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(bh || {}), wh = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(wh || {});
|
|
7158
|
+
const ob = "http://fhir.openmrs.org/code-system/encounter-type", Eh = "problem-list-item", ib = "http://terminology.hl7.org/CodeSystem/condition-ver-status", _h = "encounter-diagnosis", cb = "http://terminology.hl7.org/CodeSystem/condition-clinical", ub = "http://terminology.hl7.org/CodeSystem/condition-category", lb = "http://fhir.bahmni.org/ext/lab-order-concept-type", db = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", fb = "http://fhir.bahmni.org/ext/observation/form-namespace-path", pb = "http://fhir.bahmni.org/ext/observation/complex-data", hb = "Numeric", mb = "Complex", gb = "final", yb = "Observation", vb = /^\d{4}-\d{2}-\d{2}/, Sh = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, bb = {
|
|
7159
7159
|
ABNORMAL: { code: "A", display: "Abnormal" },
|
|
7160
7160
|
NORMAL: { code: "N", display: "Normal" }
|
|
7161
|
-
},
|
|
7162
|
-
async function
|
|
7163
|
-
return await z(`${
|
|
7161
|
+
}, Rh = (e) => ye + `/Condition?category=${Eh}&patient=${e}&_count=100&_sort=-_lastUpdated`;
|
|
7162
|
+
async function Th(e) {
|
|
7163
|
+
return await z(`${Rh(e)}`);
|
|
7164
7164
|
}
|
|
7165
7165
|
async function wb(e) {
|
|
7166
|
-
return (await
|
|
7166
|
+
return (await Th(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
|
|
7167
7167
|
}
|
|
7168
|
-
const
|
|
7168
|
+
const Ah = (e) => ye + `/Condition?category=${_h}&patient=${e}&_count=100&_sort=-_lastUpdated`, cn = [
|
|
7169
7169
|
{
|
|
7170
7170
|
code: "confirmed",
|
|
7171
7171
|
display: "CERTAINITY_CONFIRMED",
|
|
@@ -7176,26 +7176,26 @@ const Ap = (e) => ye + `/Condition?category=${_p}&patient=${e}&_count=100&_sort=
|
|
|
7176
7176
|
display: "CERTAINITY_PROVISIONAL",
|
|
7177
7177
|
system: "http://terminology.hl7.org/CodeSystem/condition-ver-status"
|
|
7178
7178
|
}
|
|
7179
|
-
],
|
|
7180
|
-
async function $
|
|
7181
|
-
const t =
|
|
7179
|
+
], Oh = "confirmed", Ph = "provisional";
|
|
7180
|
+
async function $h(e) {
|
|
7181
|
+
const t = Ah(e);
|
|
7182
7182
|
return await z(t);
|
|
7183
7183
|
}
|
|
7184
|
-
const
|
|
7184
|
+
const Nh = (e) => {
|
|
7185
7185
|
switch (e.verificationStatus?.coding?.[0]?.code) {
|
|
7186
|
-
case
|
|
7186
|
+
case Oh:
|
|
7187
7187
|
return cn[0];
|
|
7188
|
-
case
|
|
7188
|
+
case Ph:
|
|
7189
7189
|
return cn[1];
|
|
7190
7190
|
default:
|
|
7191
7191
|
return cn[1];
|
|
7192
7192
|
}
|
|
7193
|
-
},
|
|
7194
|
-
function
|
|
7193
|
+
}, Dh = (e) => !!(e.id && e.code && e.recordedDate);
|
|
7194
|
+
function Ih(e) {
|
|
7195
7195
|
return (e.entry?.filter((r) => r.resource?.resourceType === "Condition").map((r) => r.resource) ?? []).map((r) => {
|
|
7196
|
-
if (!
|
|
7196
|
+
if (!Dh(r))
|
|
7197
7197
|
throw new Error("Incomplete diagnosis data");
|
|
7198
|
-
const n =
|
|
7198
|
+
const n = Nh(r), s = r.recordedDate;
|
|
7199
7199
|
return {
|
|
7200
7200
|
id: r.id,
|
|
7201
7201
|
display: r.code?.text ?? "",
|
|
@@ -7205,7 +7205,7 @@ function Ip(e) {
|
|
|
7205
7205
|
};
|
|
7206
7206
|
});
|
|
7207
7207
|
}
|
|
7208
|
-
function
|
|
7208
|
+
function Ch(e) {
|
|
7209
7209
|
const t = /* @__PURE__ */ new Map();
|
|
7210
7210
|
for (const r of e) {
|
|
7211
7211
|
const n = r.display.toLowerCase().trim(), s = t.get(n);
|
|
@@ -7219,14 +7219,14 @@ function Cp(e) {
|
|
|
7219
7219
|
return Array.from(t.values());
|
|
7220
7220
|
}
|
|
7221
7221
|
async function Eb(e) {
|
|
7222
|
-
const t = await $
|
|
7223
|
-
return
|
|
7222
|
+
const t = await $h(e), r = Ih(t);
|
|
7223
|
+
return Ch(r);
|
|
7224
7224
|
}
|
|
7225
7225
|
var je = /* @__PURE__ */ ((e) => (e.Active = "active", e.OnHold = "on-hold", e.Completed = "completed", e.Stopped = "stopped", e.Cancelled = "cancelled", e.EnteredInError = "entered-in-error", e.Draft = "draft", e.Unknown = "unknown", e))(je || {});
|
|
7226
|
-
const
|
|
7226
|
+
const kh = (e, t, r) => {
|
|
7227
7227
|
let s = `${ye + "/MedicationRequest?_sort=-_lastUpdated&_count=100"}&patient=${e}`;
|
|
7228
7228
|
return t && (s += `&code=${t}`), r && (s += `&encounter=${r}`), s;
|
|
7229
|
-
},
|
|
7229
|
+
}, Lh = Z + "/bahmnicore/config/drugOrders", Mh = (e, t) => ye + `/Medication?name=${encodeURIComponent(e)}&_count=${t}`, xh = ye + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", jh = (e) => {
|
|
7230
7230
|
switch (e.status) {
|
|
7231
7231
|
case "active":
|
|
7232
7232
|
return je.Active;
|
|
@@ -7246,40 +7246,40 @@ const kp = (e, t, r) => {
|
|
|
7246
7246
|
return je.Unknown;
|
|
7247
7247
|
}
|
|
7248
7248
|
};
|
|
7249
|
-
async function
|
|
7249
|
+
async function qh(e, t, r) {
|
|
7250
7250
|
let n;
|
|
7251
7251
|
r && r.length > 0 && (n = r.join(","));
|
|
7252
7252
|
let s;
|
|
7253
7253
|
t && t.length > 0 && (s = t.join(","));
|
|
7254
|
-
const a =
|
|
7254
|
+
const a = kh(
|
|
7255
7255
|
e,
|
|
7256
7256
|
s,
|
|
7257
7257
|
n
|
|
7258
7258
|
);
|
|
7259
7259
|
return await z(a);
|
|
7260
7260
|
}
|
|
7261
|
-
function
|
|
7261
|
+
function Uh(e) {
|
|
7262
7262
|
const t = e?.[0]?.doseAndRate?.[0]?.doseQuantity;
|
|
7263
7263
|
return {
|
|
7264
7264
|
value: t?.value ?? 0,
|
|
7265
7265
|
unit: t?.unit ?? ""
|
|
7266
7266
|
};
|
|
7267
7267
|
}
|
|
7268
|
-
function
|
|
7268
|
+
function Fh(e) {
|
|
7269
7269
|
return e?.[0]?.timing?.code?.coding?.[0]?.display ?? "";
|
|
7270
7270
|
}
|
|
7271
|
-
function
|
|
7271
|
+
function Vh(e) {
|
|
7272
7272
|
const t = e?.[0]?.route;
|
|
7273
7273
|
return t && Array.isArray(t.coding) && t.coding[0]?.display ? t.coding[0].display : "";
|
|
7274
7274
|
}
|
|
7275
|
-
function
|
|
7275
|
+
function Hh(e) {
|
|
7276
7276
|
const t = e?.[0]?.timing?.repeat, r = t?.durationUnit;
|
|
7277
7277
|
return {
|
|
7278
7278
|
duration: t?.duration ?? 0,
|
|
7279
7279
|
durationUnit: r ?? ""
|
|
7280
7280
|
};
|
|
7281
7281
|
}
|
|
7282
|
-
function
|
|
7282
|
+
function Bh(e) {
|
|
7283
7283
|
try {
|
|
7284
7284
|
const t = e?.[0]?.text;
|
|
7285
7285
|
return t ? JSON.parse(t).additionalInstructions ?? "" : "";
|
|
@@ -7287,7 +7287,7 @@ function Bp(e) {
|
|
|
7287
7287
|
return "";
|
|
7288
7288
|
}
|
|
7289
7289
|
}
|
|
7290
|
-
function
|
|
7290
|
+
function Wh(e) {
|
|
7291
7291
|
try {
|
|
7292
7292
|
const t = e?.[0]?.text;
|
|
7293
7293
|
return t ? JSON.parse(t).instructions ?? "" : "";
|
|
@@ -7295,72 +7295,72 @@ function Wp(e) {
|
|
|
7295
7295
|
return "";
|
|
7296
7296
|
}
|
|
7297
7297
|
}
|
|
7298
|
-
function
|
|
7298
|
+
function zh(e) {
|
|
7299
7299
|
const t = e?.quantity;
|
|
7300
7300
|
return {
|
|
7301
7301
|
value: t?.value ?? 0,
|
|
7302
7302
|
unit: t?.unit ?? ""
|
|
7303
7303
|
};
|
|
7304
7304
|
}
|
|
7305
|
-
function
|
|
7305
|
+
function Gh(e) {
|
|
7306
7306
|
return !e || e.length === 0 ? "" : e.map((t) => t.text).filter(Boolean).join(" ");
|
|
7307
7307
|
}
|
|
7308
|
-
function
|
|
7308
|
+
function Kh(e) {
|
|
7309
7309
|
return (e.entry?.map((r) => r.resource) ?? []).map((r) => {
|
|
7310
|
-
const n = r.medicationReference, s = r.requester, a =
|
|
7310
|
+
const n = r.medicationReference, s = r.requester, a = jh(r);
|
|
7311
7311
|
return {
|
|
7312
7312
|
id: r.id,
|
|
7313
7313
|
name: n.display,
|
|
7314
|
-
dose:
|
|
7314
|
+
dose: Uh(r.dosageInstruction),
|
|
7315
7315
|
asNeeded: r.dosageInstruction?.[0]?.asNeededBoolean ?? !1,
|
|
7316
|
-
frequency:
|
|
7317
|
-
route:
|
|
7318
|
-
duration:
|
|
7316
|
+
frequency: Fh(r.dosageInstruction),
|
|
7317
|
+
route: Vh(r.dosageInstruction),
|
|
7318
|
+
duration: Hh(r.dosageInstruction),
|
|
7319
7319
|
status: a,
|
|
7320
7320
|
priority: r.priority ?? "",
|
|
7321
7321
|
isImmediate: Gs(r),
|
|
7322
|
-
quantity:
|
|
7322
|
+
quantity: zh(r.dispenseRequest),
|
|
7323
7323
|
startDate: Gs(r) ? r.authoredOn : r.dosageInstruction?.[0]?.timing?.event?.[0] ?? "",
|
|
7324
7324
|
orderDate: r.authoredOn,
|
|
7325
7325
|
orderedBy: s.display,
|
|
7326
|
-
instructions:
|
|
7327
|
-
additionalInstructions:
|
|
7326
|
+
instructions: Wh(r.dosageInstruction),
|
|
7327
|
+
additionalInstructions: Bh(
|
|
7328
7328
|
r.dosageInstruction
|
|
7329
7329
|
),
|
|
7330
|
-
note:
|
|
7330
|
+
note: Gh(r.note)
|
|
7331
7331
|
};
|
|
7332
7332
|
});
|
|
7333
7333
|
}
|
|
7334
7334
|
const Gs = (e) => e.priority === "stat" || e.dosageInstruction?.[0]?.timing?.code?.text === "Immediately" || !1;
|
|
7335
7335
|
async function _b(e, t, r) {
|
|
7336
|
-
const n = await
|
|
7336
|
+
const n = await qh(
|
|
7337
7337
|
e,
|
|
7338
7338
|
t,
|
|
7339
7339
|
r
|
|
7340
7340
|
);
|
|
7341
|
-
return
|
|
7341
|
+
return Kh(n);
|
|
7342
7342
|
}
|
|
7343
7343
|
async function Sb() {
|
|
7344
7344
|
return await z(
|
|
7345
|
-
|
|
7345
|
+
Lh
|
|
7346
7346
|
);
|
|
7347
7347
|
}
|
|
7348
7348
|
async function Rb(e, t = 20) {
|
|
7349
7349
|
return await z(
|
|
7350
|
-
|
|
7350
|
+
Mh(e, t)
|
|
7351
7351
|
);
|
|
7352
7352
|
}
|
|
7353
7353
|
async function Tb() {
|
|
7354
|
-
return await z(
|
|
7354
|
+
return await z(xh);
|
|
7355
7355
|
}
|
|
7356
|
-
const
|
|
7356
|
+
const Yh = (e, t, r, n, s) => {
|
|
7357
7357
|
let o = `${ye + "/ServiceRequest?_sort=-_lastUpdated"}&category=${e}&patient=${t}`;
|
|
7358
7358
|
return s && (o += `&_revinclude=${s}`), r ? o += `&encounter=${r}` : n && (o += `&numberOfVisits=${n}`), o;
|
|
7359
7359
|
};
|
|
7360
7360
|
async function It(e, t, r, n, s) {
|
|
7361
7361
|
let a;
|
|
7362
7362
|
return r && r.length > 0 && (a = r.join(",")), await z(
|
|
7363
|
-
|
|
7363
|
+
Yh(
|
|
7364
7364
|
e,
|
|
7365
7365
|
t,
|
|
7366
7366
|
a,
|
|
@@ -7402,16 +7402,16 @@ async function $b(e, t, r, n) {
|
|
|
7402
7402
|
n
|
|
7403
7403
|
);
|
|
7404
7404
|
}
|
|
7405
|
-
const
|
|
7405
|
+
const Jh = (e, t) => {
|
|
7406
7406
|
const r = `${ye}/DiagnosticReport?patient=${e}`;
|
|
7407
7407
|
return t ? `${r}&based-on=${t}` : r;
|
|
7408
|
-
},
|
|
7408
|
+
}, Xh = (e) => `${ye}/DiagnosticReportBundle/${e}`;
|
|
7409
7409
|
async function Nb(e, t = []) {
|
|
7410
|
-
const r = t.length > 0 ? t.join(",") : void 0, n =
|
|
7410
|
+
const r = t.length > 0 ? t.join(",") : void 0, n = Jh(e, r);
|
|
7411
7411
|
return await z(n);
|
|
7412
7412
|
}
|
|
7413
7413
|
async function Db(e) {
|
|
7414
|
-
const t =
|
|
7414
|
+
const t = Xh(e);
|
|
7415
7415
|
return await z(t);
|
|
7416
7416
|
}
|
|
7417
7417
|
const Ib = [
|
|
@@ -7424,7 +7424,7 @@ const Ib = [
|
|
|
7424
7424
|
"registered",
|
|
7425
7425
|
"unknown",
|
|
7426
7426
|
"partial"
|
|
7427
|
-
],
|
|
7427
|
+
], Qh = "All Orderables", Zh = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", em = "LabSet", tm = "http://fhir.bahmni.org/ext/ValueSet/concept-class", kb = ["orderTypes"], rm = async () => await dh(Qh), Bn = async () => await z(Zh), nm = (e) => {
|
|
7428
7428
|
let t = e.display ?? "Unknown investigation";
|
|
7429
7429
|
return ci(e) === em && (t += ` (${ie.t("INVESTIGATION_PANEL")})`), t;
|
|
7430
7430
|
}, sm = (e) => {
|
|
@@ -7523,91 +7523,91 @@ function Dr() {
|
|
|
7523
7523
|
}
|
|
7524
7524
|
get str() {
|
|
7525
7525
|
var u;
|
|
7526
|
-
return (u = this._str) !== null && u !== void 0 ? u : this._str = this._items.reduce((
|
|
7526
|
+
return (u = this._str) !== null && u !== void 0 ? u : this._str = this._items.reduce((h, w) => `${h}${w}`, "");
|
|
7527
7527
|
}
|
|
7528
7528
|
get names() {
|
|
7529
7529
|
var u;
|
|
7530
|
-
return (u = this._names) !== null && u !== void 0 ? u : this._names = this._items.reduce((
|
|
7530
|
+
return (u = this._names) !== null && u !== void 0 ? u : this._names = this._items.reduce((h, w) => (w instanceof r && (h[w.str] = (h[w.str] || 0) + 1), h), {});
|
|
7531
7531
|
}
|
|
7532
7532
|
}
|
|
7533
7533
|
e._Code = n, e.nil = new n("");
|
|
7534
|
-
function s(
|
|
7535
|
-
const
|
|
7534
|
+
function s(p, ...u) {
|
|
7535
|
+
const h = [p[0]];
|
|
7536
7536
|
let w = 0;
|
|
7537
7537
|
for (; w < u.length; )
|
|
7538
|
-
i(
|
|
7539
|
-
return new n(
|
|
7538
|
+
i(h, u[w]), h.push(p[++w]);
|
|
7539
|
+
return new n(h);
|
|
7540
7540
|
}
|
|
7541
7541
|
e._ = s;
|
|
7542
7542
|
const a = new n("+");
|
|
7543
|
-
function o(
|
|
7544
|
-
const
|
|
7543
|
+
function o(p, ...u) {
|
|
7544
|
+
const h = [S(p[0])];
|
|
7545
7545
|
let w = 0;
|
|
7546
7546
|
for (; w < u.length; )
|
|
7547
|
-
|
|
7548
|
-
return c(
|
|
7547
|
+
h.push(a), i(h, u[w]), h.push(a, S(p[++w]));
|
|
7548
|
+
return c(h), new n(h);
|
|
7549
7549
|
}
|
|
7550
7550
|
e.str = o;
|
|
7551
|
-
function i(
|
|
7552
|
-
u instanceof n ?
|
|
7551
|
+
function i(p, u) {
|
|
7552
|
+
u instanceof n ? p.push(...u._items) : u instanceof r ? p.push(u) : p.push(m(u));
|
|
7553
7553
|
}
|
|
7554
7554
|
e.addCodeArg = i;
|
|
7555
|
-
function c(
|
|
7555
|
+
function c(p) {
|
|
7556
7556
|
let u = 1;
|
|
7557
|
-
for (; u <
|
|
7558
|
-
if (
|
|
7559
|
-
const
|
|
7560
|
-
if (
|
|
7561
|
-
|
|
7557
|
+
for (; u < p.length - 1; ) {
|
|
7558
|
+
if (p[u] === a) {
|
|
7559
|
+
const h = l(p[u - 1], p[u + 1]);
|
|
7560
|
+
if (h !== void 0) {
|
|
7561
|
+
p.splice(u - 1, 3, h);
|
|
7562
7562
|
continue;
|
|
7563
7563
|
}
|
|
7564
|
-
|
|
7564
|
+
p[u++] = "+";
|
|
7565
7565
|
}
|
|
7566
7566
|
u++;
|
|
7567
7567
|
}
|
|
7568
7568
|
}
|
|
7569
|
-
function l(
|
|
7569
|
+
function l(p, u) {
|
|
7570
7570
|
if (u === '""')
|
|
7571
|
-
return
|
|
7572
|
-
if (
|
|
7571
|
+
return p;
|
|
7572
|
+
if (p === '""')
|
|
7573
7573
|
return u;
|
|
7574
|
-
if (typeof
|
|
7575
|
-
return u instanceof r ||
|
|
7576
|
-
if (typeof u == "string" && u[0] === '"' && !(
|
|
7577
|
-
return `"${
|
|
7574
|
+
if (typeof p == "string")
|
|
7575
|
+
return u instanceof r || p[p.length - 1] !== '"' ? void 0 : typeof u != "string" ? `${p.slice(0, -1)}${u}"` : u[0] === '"' ? p.slice(0, -1) + u.slice(1) : void 0;
|
|
7576
|
+
if (typeof u == "string" && u[0] === '"' && !(p instanceof r))
|
|
7577
|
+
return `"${p}${u.slice(1)}`;
|
|
7578
7578
|
}
|
|
7579
|
-
function d(
|
|
7580
|
-
return u.emptyStr() ?
|
|
7579
|
+
function d(p, u) {
|
|
7580
|
+
return u.emptyStr() ? p : p.emptyStr() ? u : o`${p}${u}`;
|
|
7581
7581
|
}
|
|
7582
7582
|
e.strConcat = d;
|
|
7583
|
-
function m(
|
|
7584
|
-
return typeof
|
|
7583
|
+
function m(p) {
|
|
7584
|
+
return typeof p == "number" || typeof p == "boolean" || p === null ? p : S(Array.isArray(p) ? p.join(",") : p);
|
|
7585
7585
|
}
|
|
7586
|
-
function y(
|
|
7587
|
-
return new n(S(
|
|
7586
|
+
function y(p) {
|
|
7587
|
+
return new n(S(p));
|
|
7588
7588
|
}
|
|
7589
7589
|
e.stringify = y;
|
|
7590
|
-
function S(
|
|
7591
|
-
return JSON.stringify(
|
|
7590
|
+
function S(p) {
|
|
7591
|
+
return JSON.stringify(p).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
7592
7592
|
}
|
|
7593
7593
|
e.safeStringify = S;
|
|
7594
|
-
function v(
|
|
7595
|
-
return typeof
|
|
7594
|
+
function v(p) {
|
|
7595
|
+
return typeof p == "string" && e.IDENTIFIER.test(p) ? new n(`.${p}`) : s`[${p}]`;
|
|
7596
7596
|
}
|
|
7597
7597
|
e.getProperty = v;
|
|
7598
|
-
function g(
|
|
7599
|
-
if (typeof
|
|
7600
|
-
return new n(`${
|
|
7601
|
-
throw new Error(`CodeGen: invalid export name: ${
|
|
7598
|
+
function g(p) {
|
|
7599
|
+
if (typeof p == "string" && e.IDENTIFIER.test(p))
|
|
7600
|
+
return new n(`${p}`);
|
|
7601
|
+
throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`);
|
|
7602
7602
|
}
|
|
7603
7603
|
e.getEsmExportName = g;
|
|
7604
|
-
function f(
|
|
7605
|
-
return new n(
|
|
7604
|
+
function f(p) {
|
|
7605
|
+
return new n(p.toString());
|
|
7606
7606
|
}
|
|
7607
7607
|
e.regexpCode = f;
|
|
7608
7608
|
})(fn)), fn;
|
|
7609
7609
|
}
|
|
7610
|
-
var
|
|
7610
|
+
var pn = {}, Ys;
|
|
7611
7611
|
function Js() {
|
|
7612
7612
|
return Ys || (Ys = 1, (function(e) {
|
|
7613
7613
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
@@ -7680,8 +7680,8 @@ function Js() {
|
|
|
7680
7680
|
} else
|
|
7681
7681
|
g = this._values[S] = /* @__PURE__ */ new Map();
|
|
7682
7682
|
g.set(v, y);
|
|
7683
|
-
const f = this._scope[S] || (this._scope[S] = []),
|
|
7684
|
-
return f[
|
|
7683
|
+
const f = this._scope[S] || (this._scope[S] = []), p = f.length;
|
|
7684
|
+
return f[p] = d.ref, y.setValue(d, { property: S, itemIndex: p }), y;
|
|
7685
7685
|
}
|
|
7686
7686
|
getValue(l, d) {
|
|
7687
7687
|
const m = this._values[l];
|
|
@@ -7709,26 +7709,26 @@ function Js() {
|
|
|
7709
7709
|
if (!g)
|
|
7710
7710
|
continue;
|
|
7711
7711
|
const f = m[v] = m[v] || /* @__PURE__ */ new Map();
|
|
7712
|
-
g.forEach((
|
|
7713
|
-
if (f.has(
|
|
7712
|
+
g.forEach((p) => {
|
|
7713
|
+
if (f.has(p))
|
|
7714
7714
|
return;
|
|
7715
|
-
f.set(
|
|
7716
|
-
let u = d(
|
|
7715
|
+
f.set(p, n.Started);
|
|
7716
|
+
let u = d(p);
|
|
7717
7717
|
if (u) {
|
|
7718
|
-
const
|
|
7719
|
-
S = (0, t._)`${S}${
|
|
7720
|
-
} else if (u = y?.(
|
|
7718
|
+
const h = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
|
|
7719
|
+
S = (0, t._)`${S}${h} ${p} = ${u};${this.opts._n}`;
|
|
7720
|
+
} else if (u = y?.(p))
|
|
7721
7721
|
S = (0, t._)`${S}${u}${this.opts._n}`;
|
|
7722
7722
|
else
|
|
7723
|
-
throw new r(
|
|
7724
|
-
f.set(
|
|
7723
|
+
throw new r(p);
|
|
7724
|
+
f.set(p, n.Completed);
|
|
7725
7725
|
});
|
|
7726
7726
|
}
|
|
7727
7727
|
return S;
|
|
7728
7728
|
}
|
|
7729
7729
|
}
|
|
7730
7730
|
e.ValueScope = i;
|
|
7731
|
-
})(
|
|
7731
|
+
})(pn)), pn;
|
|
7732
7732
|
}
|
|
7733
7733
|
var Xs;
|
|
7734
7734
|
function Q() {
|
|
@@ -7905,7 +7905,7 @@ function Q() {
|
|
|
7905
7905
|
class f extends v {
|
|
7906
7906
|
}
|
|
7907
7907
|
f.kind = "else";
|
|
7908
|
-
class
|
|
7908
|
+
class p extends v {
|
|
7909
7909
|
constructor(b, T) {
|
|
7910
7910
|
super(T), this.condition = b;
|
|
7911
7911
|
}
|
|
@@ -7924,7 +7924,7 @@ function Q() {
|
|
|
7924
7924
|
T = this.else = Array.isArray(I) ? new f(I) : I;
|
|
7925
7925
|
}
|
|
7926
7926
|
if (T)
|
|
7927
|
-
return b === !1 ? T instanceof
|
|
7927
|
+
return b === !1 ? T instanceof p ? T : T.nodes : this.nodes.length ? this : new p(ne(b), T instanceof p ? [T] : T.nodes);
|
|
7928
7928
|
if (!(b === !1 || !this.nodes.length))
|
|
7929
7929
|
return this;
|
|
7930
7930
|
}
|
|
@@ -7938,11 +7938,11 @@ function Q() {
|
|
|
7938
7938
|
return V(b, this.condition), this.else && U(b, this.else.names), b;
|
|
7939
7939
|
}
|
|
7940
7940
|
}
|
|
7941
|
-
|
|
7941
|
+
p.kind = "if";
|
|
7942
7942
|
class u extends v {
|
|
7943
7943
|
}
|
|
7944
7944
|
u.kind = "for";
|
|
7945
|
-
class
|
|
7945
|
+
class h extends u {
|
|
7946
7946
|
constructor(b) {
|
|
7947
7947
|
super(), this.iteration = b;
|
|
7948
7948
|
}
|
|
@@ -8102,7 +8102,7 @@ function Q() {
|
|
|
8102
8102
|
}
|
|
8103
8103
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
8104
8104
|
if(b, T, I) {
|
|
8105
|
-
if (this._blockNode(new
|
|
8105
|
+
if (this._blockNode(new p(b)), T && I)
|
|
8106
8106
|
this.code(T).else().code(I).endIf();
|
|
8107
8107
|
else if (T)
|
|
8108
8108
|
this.code(T).endIf();
|
|
@@ -8112,7 +8112,7 @@ function Q() {
|
|
|
8112
8112
|
}
|
|
8113
8113
|
// `else if` clause - invalid without `if` or after `else` clauses
|
|
8114
8114
|
elseIf(b) {
|
|
8115
|
-
return this._elseNode(new
|
|
8115
|
+
return this._elseNode(new p(b));
|
|
8116
8116
|
}
|
|
8117
8117
|
// `else` clause - only valid after `if` or `else if` clauses
|
|
8118
8118
|
else() {
|
|
@@ -8120,14 +8120,14 @@ function Q() {
|
|
|
8120
8120
|
}
|
|
8121
8121
|
// end `if` statement (needed if gen.if was used only with condition)
|
|
8122
8122
|
endIf() {
|
|
8123
|
-
return this._endBlockNode(
|
|
8123
|
+
return this._endBlockNode(p, f);
|
|
8124
8124
|
}
|
|
8125
8125
|
_for(b, T) {
|
|
8126
8126
|
return this._blockNode(b), T && this.code(T).endFor(), this;
|
|
8127
8127
|
}
|
|
8128
8128
|
// a generic `for` clause (or statement if `forBody` is passed)
|
|
8129
8129
|
for(b, T) {
|
|
8130
|
-
return this._for(new
|
|
8130
|
+
return this._for(new h(b), T);
|
|
8131
8131
|
}
|
|
8132
8132
|
// `for` statement for a range of values
|
|
8133
8133
|
forRange(b, T, I, F, B = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
|
|
@@ -8227,7 +8227,7 @@ function Q() {
|
|
|
8227
8227
|
}
|
|
8228
8228
|
_elseNode(b) {
|
|
8229
8229
|
const T = this._currNode;
|
|
8230
|
-
if (!(T instanceof
|
|
8230
|
+
if (!(T instanceof p))
|
|
8231
8231
|
throw new Error('CodeGen: "else" without "if"');
|
|
8232
8232
|
return this._currNode = T.else = b, this;
|
|
8233
8233
|
}
|
|
@@ -8274,9 +8274,9 @@ function Q() {
|
|
|
8274
8274
|
return typeof N == "boolean" || typeof N == "number" || N === null ? !N : (0, t._)`!${C(N)}`;
|
|
8275
8275
|
}
|
|
8276
8276
|
e.not = ne;
|
|
8277
|
-
const
|
|
8277
|
+
const pe = O(e.operators.AND);
|
|
8278
8278
|
function J(...N) {
|
|
8279
|
-
return N.reduce(
|
|
8279
|
+
return N.reduce(pe);
|
|
8280
8280
|
}
|
|
8281
8281
|
e.and = J;
|
|
8282
8282
|
const ce = O(e.operators.OR);
|
|
@@ -8405,25 +8405,25 @@ function te() {
|
|
|
8405
8405
|
}
|
|
8406
8406
|
Y.setEvaluated = g;
|
|
8407
8407
|
const f = {};
|
|
8408
|
-
function
|
|
8408
|
+
function p(_, E) {
|
|
8409
8409
|
return _.scopeValue("func", {
|
|
8410
8410
|
ref: E,
|
|
8411
8411
|
code: f[E.code] || (f[E.code] = new t._Code(E.code))
|
|
8412
8412
|
});
|
|
8413
8413
|
}
|
|
8414
|
-
Y.useFunc =
|
|
8414
|
+
Y.useFunc = p;
|
|
8415
8415
|
var u;
|
|
8416
8416
|
(function(_) {
|
|
8417
8417
|
_[_.Num = 0] = "Num", _[_.Str = 1] = "Str";
|
|
8418
8418
|
})(u || (Y.Type = u = {}));
|
|
8419
|
-
function
|
|
8419
|
+
function h(_, E, R) {
|
|
8420
8420
|
if (_ instanceof e.Name) {
|
|
8421
8421
|
const P = E === u.Num;
|
|
8422
8422
|
return R ? P ? (0, e._)`"[" + ${_} + "]"` : (0, e._)`"['" + ${_} + "']"` : P ? (0, e._)`"/" + ${_}` : (0, e._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
|
|
8423
8423
|
}
|
|
8424
8424
|
return R ? (0, e.getProperty)(_).toString() : "/" + d(_);
|
|
8425
8425
|
}
|
|
8426
|
-
Y.getErrorPath =
|
|
8426
|
+
Y.getErrorPath = h;
|
|
8427
8427
|
function w(_, E, R = _.opts.strictSchema) {
|
|
8428
8428
|
if (R) {
|
|
8429
8429
|
if (E = `strict mode: ${E}`, R === !0)
|
|
@@ -8476,38 +8476,38 @@ function Vr() {
|
|
|
8476
8476
|
e.keywordError = {
|
|
8477
8477
|
message: ({ keyword: f }) => (0, t.str)`must pass "${f}" keyword validation`
|
|
8478
8478
|
}, e.keyword$DataError = {
|
|
8479
|
-
message: ({ keyword: f, schemaType:
|
|
8479
|
+
message: ({ keyword: f, schemaType: p }) => p ? (0, t.str)`"${f}" keyword must be ${p} ($data)` : (0, t.str)`"${f}" keyword is invalid ($data)`
|
|
8480
8480
|
};
|
|
8481
|
-
function s(f,
|
|
8482
|
-
const { it: w } = f, { gen: _, compositeRule: E, allErrors: R } = w, P = m(f,
|
|
8483
|
-
|
|
8481
|
+
function s(f, p = e.keywordError, u, h) {
|
|
8482
|
+
const { it: w } = f, { gen: _, compositeRule: E, allErrors: R } = w, P = m(f, p, u);
|
|
8483
|
+
h ?? (E || R) ? c(_, P) : l(w, (0, t._)`[${P}]`);
|
|
8484
8484
|
}
|
|
8485
8485
|
e.reportError = s;
|
|
8486
|
-
function a(f,
|
|
8487
|
-
const { it:
|
|
8488
|
-
c(w, R), _ || E || l(
|
|
8486
|
+
function a(f, p = e.keywordError, u) {
|
|
8487
|
+
const { it: h } = f, { gen: w, compositeRule: _, allErrors: E } = h, R = m(f, p, u);
|
|
8488
|
+
c(w, R), _ || E || l(h, n.default.vErrors);
|
|
8489
8489
|
}
|
|
8490
8490
|
e.reportExtraError = a;
|
|
8491
|
-
function o(f,
|
|
8492
|
-
f.assign(n.default.errors,
|
|
8491
|
+
function o(f, p) {
|
|
8492
|
+
f.assign(n.default.errors, p), f.if((0, t._)`${n.default.vErrors} !== null`, () => f.if(p, () => f.assign((0, t._)`${n.default.vErrors}.length`, p), () => f.assign(n.default.vErrors, null)));
|
|
8493
8493
|
}
|
|
8494
8494
|
e.resetErrorsCount = o;
|
|
8495
|
-
function i({ gen: f, keyword:
|
|
8495
|
+
function i({ gen: f, keyword: p, schemaValue: u, data: h, errsCount: w, it: _ }) {
|
|
8496
8496
|
if (w === void 0)
|
|
8497
8497
|
throw new Error("ajv implementation error");
|
|
8498
8498
|
const E = f.name("err");
|
|
8499
8499
|
f.forRange("i", w, n.default.errors, (R) => {
|
|
8500
|
-
f.const(E, (0, t._)`${n.default.vErrors}[${R}]`), f.if((0, t._)`${E}.instancePath === undefined`, () => f.assign((0, t._)`${E}.instancePath`, (0, t.strConcat)(n.default.instancePath, _.errorPath))), f.assign((0, t._)`${E}.schemaPath`, (0, t.str)`${_.errSchemaPath}/${
|
|
8500
|
+
f.const(E, (0, t._)`${n.default.vErrors}[${R}]`), f.if((0, t._)`${E}.instancePath === undefined`, () => f.assign((0, t._)`${E}.instancePath`, (0, t.strConcat)(n.default.instancePath, _.errorPath))), f.assign((0, t._)`${E}.schemaPath`, (0, t.str)`${_.errSchemaPath}/${p}`), _.opts.verbose && (f.assign((0, t._)`${E}.schema`, u), f.assign((0, t._)`${E}.data`, h));
|
|
8501
8501
|
});
|
|
8502
8502
|
}
|
|
8503
8503
|
e.extendErrors = i;
|
|
8504
|
-
function c(f,
|
|
8505
|
-
const u = f.const("err",
|
|
8504
|
+
function c(f, p) {
|
|
8505
|
+
const u = f.const("err", p);
|
|
8506
8506
|
f.if((0, t._)`${n.default.vErrors} === null`, () => f.assign(n.default.vErrors, (0, t._)`[${u}]`), (0, t._)`${n.default.vErrors}.push(${u})`), f.code((0, t._)`${n.default.errors}++`);
|
|
8507
8507
|
}
|
|
8508
|
-
function l(f,
|
|
8509
|
-
const { gen: u, validateName:
|
|
8510
|
-
w.$async ? u.throw((0, t._)`new ${f.ValidationError}(${
|
|
8508
|
+
function l(f, p) {
|
|
8509
|
+
const { gen: u, validateName: h, schemaEnv: w } = f;
|
|
8510
|
+
w.$async ? u.throw((0, t._)`new ${f.ValidationError}(${p})`) : (u.assign((0, t._)`${h}.errors`, p), u.return(!1));
|
|
8511
8511
|
}
|
|
8512
8512
|
const d = {
|
|
8513
8513
|
keyword: new t.Name("keyword"),
|
|
@@ -8519,28 +8519,28 @@ function Vr() {
|
|
|
8519
8519
|
schema: new t.Name("schema"),
|
|
8520
8520
|
parentSchema: new t.Name("parentSchema")
|
|
8521
8521
|
};
|
|
8522
|
-
function m(f,
|
|
8523
|
-
const { createErrors:
|
|
8524
|
-
return
|
|
8522
|
+
function m(f, p, u) {
|
|
8523
|
+
const { createErrors: h } = f.it;
|
|
8524
|
+
return h === !1 ? (0, t._)`{}` : y(f, p, u);
|
|
8525
8525
|
}
|
|
8526
|
-
function y(f,
|
|
8527
|
-
const { gen:
|
|
8526
|
+
function y(f, p, u = {}) {
|
|
8527
|
+
const { gen: h, it: w } = f, _ = [
|
|
8528
8528
|
S(w, u),
|
|
8529
8529
|
v(f, u)
|
|
8530
8530
|
];
|
|
8531
|
-
return g(f,
|
|
8531
|
+
return g(f, p, _), h.object(..._);
|
|
8532
8532
|
}
|
|
8533
|
-
function S({ errorPath: f }, { instancePath:
|
|
8534
|
-
const u =
|
|
8533
|
+
function S({ errorPath: f }, { instancePath: p }) {
|
|
8534
|
+
const u = p ? (0, t.str)`${f}${(0, r.getErrorPath)(p, r.Type.Str)}` : f;
|
|
8535
8535
|
return [n.default.instancePath, (0, t.strConcat)(n.default.instancePath, u)];
|
|
8536
8536
|
}
|
|
8537
|
-
function v({ keyword: f, it: { errSchemaPath:
|
|
8538
|
-
let w =
|
|
8537
|
+
function v({ keyword: f, it: { errSchemaPath: p } }, { schemaPath: u, parentSchema: h }) {
|
|
8538
|
+
let w = h ? p : (0, t.str)`${p}/${f}`;
|
|
8539
8539
|
return u && (w = (0, t.str)`${w}${(0, r.getErrorPath)(u, r.Type.Str)}`), [d.schemaPath, w];
|
|
8540
8540
|
}
|
|
8541
|
-
function g(f, { params:
|
|
8541
|
+
function g(f, { params: p, message: u }, h) {
|
|
8542
8542
|
const { keyword: w, data: _, schemaValue: E, it: R } = f, { opts: P, propertyName: L, topSchemaRef: q, schemaPath: j } = R;
|
|
8543
|
-
|
|
8543
|
+
h.push([d.keyword, w], [d.params, typeof p == "function" ? p(f) : p || (0, t._)`{}`]), P.messages && h.push([d.message, typeof u == "function" ? u(f) : u]), P.verbose && h.push([d.schema, E], [d.parentSchema, (0, t._)`${q}${j}`], [n.default.data, _]), L && h.push([d.propertyName, L]);
|
|
8544
8544
|
}
|
|
8545
8545
|
})(ln)), ln;
|
|
8546
8546
|
}
|
|
@@ -8631,43 +8631,43 @@ function Ir() {
|
|
|
8631
8631
|
u[u.Correct = 0] = "Correct", u[u.Wrong = 1] = "Wrong";
|
|
8632
8632
|
})(a || (ge.DataType = a = {}));
|
|
8633
8633
|
function o(u) {
|
|
8634
|
-
const
|
|
8635
|
-
if (
|
|
8634
|
+
const h = i(u.type);
|
|
8635
|
+
if (h.includes("null")) {
|
|
8636
8636
|
if (u.nullable === !1)
|
|
8637
8637
|
throw new Error("type: null contradicts nullable: false");
|
|
8638
8638
|
} else {
|
|
8639
|
-
if (!
|
|
8639
|
+
if (!h.length && u.nullable !== void 0)
|
|
8640
8640
|
throw new Error('"nullable" cannot be used without "type"');
|
|
8641
|
-
u.nullable === !0 &&
|
|
8641
|
+
u.nullable === !0 && h.push("null");
|
|
8642
8642
|
}
|
|
8643
|
-
return
|
|
8643
|
+
return h;
|
|
8644
8644
|
}
|
|
8645
8645
|
ge.getSchemaTypes = o;
|
|
8646
8646
|
function i(u) {
|
|
8647
|
-
const
|
|
8648
|
-
if (
|
|
8649
|
-
return
|
|
8650
|
-
throw new Error("type must be JSONType or JSONType[]: " +
|
|
8647
|
+
const h = Array.isArray(u) ? u : u ? [u] : [];
|
|
8648
|
+
if (h.every(e.isJSONType))
|
|
8649
|
+
return h;
|
|
8650
|
+
throw new Error("type must be JSONType or JSONType[]: " + h.join(","));
|
|
8651
8651
|
}
|
|
8652
8652
|
ge.getJSONTypes = i;
|
|
8653
|
-
function c(u,
|
|
8654
|
-
const { gen: w, data: _, opts: E } = u, R = d(
|
|
8653
|
+
function c(u, h) {
|
|
8654
|
+
const { gen: w, data: _, opts: E } = u, R = d(h, E.coerceTypes), P = h.length > 0 && !(R.length === 0 && h.length === 1 && (0, t.schemaHasRulesForType)(u, h[0]));
|
|
8655
8655
|
if (P) {
|
|
8656
|
-
const L = v(
|
|
8656
|
+
const L = v(h, _, E.strictNumbers, a.Wrong);
|
|
8657
8657
|
w.if(L, () => {
|
|
8658
|
-
R.length ? m(u,
|
|
8658
|
+
R.length ? m(u, h, R) : f(u);
|
|
8659
8659
|
});
|
|
8660
8660
|
}
|
|
8661
8661
|
return P;
|
|
8662
8662
|
}
|
|
8663
8663
|
ge.coerceAndCheckDataType = c;
|
|
8664
8664
|
const l = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
8665
|
-
function d(u,
|
|
8666
|
-
return
|
|
8665
|
+
function d(u, h) {
|
|
8666
|
+
return h ? u.filter((w) => l.has(w) || h === "array" && w === "array") : [];
|
|
8667
8667
|
}
|
|
8668
|
-
function m(u,
|
|
8668
|
+
function m(u, h, w) {
|
|
8669
8669
|
const { gen: _, data: E, opts: R } = u, P = _.let("dataType", (0, n._)`typeof ${E}`), L = _.let("coerced", (0, n._)`undefined`);
|
|
8670
|
-
R.coerceTypes === "array" && _.if((0, n._)`${P} == 'object' && Array.isArray(${E}) && ${E}.length == 1`, () => _.assign(E, (0, n._)`${E}[0]`).assign(P, (0, n._)`typeof ${E}`).if(v(
|
|
8670
|
+
R.coerceTypes === "array" && _.if((0, n._)`${P} == 'object' && Array.isArray(${E}) && ${E}.length == 1`, () => _.assign(E, (0, n._)`${E}[0]`).assign(P, (0, n._)`typeof ${E}`).if(v(h, E, R.strictNumbers), () => _.assign(L, E))), _.if((0, n._)`${L} !== undefined`);
|
|
8671
8671
|
for (const j of w)
|
|
8672
8672
|
(l.has(j) || j === "array" && R.coerceTypes === "array") && q(j);
|
|
8673
8673
|
_.else(), f(u), _.endIf(), _.if((0, n._)`${L} !== undefined`, () => {
|
|
@@ -8698,65 +8698,65 @@ function Ir() {
|
|
|
8698
8698
|
}
|
|
8699
8699
|
}
|
|
8700
8700
|
}
|
|
8701
|
-
function y({ gen: u, parentData:
|
|
8702
|
-
u.if((0, n._)`${
|
|
8701
|
+
function y({ gen: u, parentData: h, parentDataProperty: w }, _) {
|
|
8702
|
+
u.if((0, n._)`${h} !== undefined`, () => u.assign((0, n._)`${h}[${w}]`, _));
|
|
8703
8703
|
}
|
|
8704
|
-
function S(u,
|
|
8704
|
+
function S(u, h, w, _ = a.Correct) {
|
|
8705
8705
|
const E = _ === a.Correct ? n.operators.EQ : n.operators.NEQ;
|
|
8706
8706
|
let R;
|
|
8707
8707
|
switch (u) {
|
|
8708
8708
|
case "null":
|
|
8709
|
-
return (0, n._)`${
|
|
8709
|
+
return (0, n._)`${h} ${E} null`;
|
|
8710
8710
|
case "array":
|
|
8711
|
-
R = (0, n._)`Array.isArray(${
|
|
8711
|
+
R = (0, n._)`Array.isArray(${h})`;
|
|
8712
8712
|
break;
|
|
8713
8713
|
case "object":
|
|
8714
|
-
R = (0, n._)`${
|
|
8714
|
+
R = (0, n._)`${h} && typeof ${h} == "object" && !Array.isArray(${h})`;
|
|
8715
8715
|
break;
|
|
8716
8716
|
case "integer":
|
|
8717
|
-
R = P((0, n._)`!(${
|
|
8717
|
+
R = P((0, n._)`!(${h} % 1) && !isNaN(${h})`);
|
|
8718
8718
|
break;
|
|
8719
8719
|
case "number":
|
|
8720
8720
|
R = P();
|
|
8721
8721
|
break;
|
|
8722
8722
|
default:
|
|
8723
|
-
return (0, n._)`typeof ${
|
|
8723
|
+
return (0, n._)`typeof ${h} ${E} ${u}`;
|
|
8724
8724
|
}
|
|
8725
8725
|
return _ === a.Correct ? R : (0, n.not)(R);
|
|
8726
8726
|
function P(L = n.nil) {
|
|
8727
|
-
return (0, n.and)((0, n._)`typeof ${
|
|
8727
|
+
return (0, n.and)((0, n._)`typeof ${h} == "number"`, L, w ? (0, n._)`isFinite(${h})` : n.nil);
|
|
8728
8728
|
}
|
|
8729
8729
|
}
|
|
8730
8730
|
ge.checkDataType = S;
|
|
8731
|
-
function v(u,
|
|
8731
|
+
function v(u, h, w, _) {
|
|
8732
8732
|
if (u.length === 1)
|
|
8733
|
-
return S(u[0],
|
|
8733
|
+
return S(u[0], h, w, _);
|
|
8734
8734
|
let E;
|
|
8735
8735
|
const R = (0, s.toHash)(u);
|
|
8736
8736
|
if (R.array && R.object) {
|
|
8737
|
-
const P = (0, n._)`typeof ${
|
|
8738
|
-
E = R.null ? P : (0, n._)`!${
|
|
8737
|
+
const P = (0, n._)`typeof ${h} != "object"`;
|
|
8738
|
+
E = R.null ? P : (0, n._)`!${h} || ${P}`, delete R.null, delete R.array, delete R.object;
|
|
8739
8739
|
} else
|
|
8740
8740
|
E = n.nil;
|
|
8741
8741
|
R.number && delete R.integer;
|
|
8742
8742
|
for (const P in R)
|
|
8743
|
-
E = (0, n.and)(E, S(P,
|
|
8743
|
+
E = (0, n.and)(E, S(P, h, w, _));
|
|
8744
8744
|
return E;
|
|
8745
8745
|
}
|
|
8746
8746
|
ge.checkDataTypes = v;
|
|
8747
8747
|
const g = {
|
|
8748
8748
|
message: ({ schema: u }) => `must be ${u}`,
|
|
8749
|
-
params: ({ schema: u, schemaValue:
|
|
8749
|
+
params: ({ schema: u, schemaValue: h }) => typeof u == "string" ? (0, n._)`{type: ${u}}` : (0, n._)`{type: ${h}}`
|
|
8750
8750
|
};
|
|
8751
8751
|
function f(u) {
|
|
8752
|
-
const
|
|
8753
|
-
(0, r.reportError)(
|
|
8752
|
+
const h = p(u);
|
|
8753
|
+
(0, r.reportError)(h, g);
|
|
8754
8754
|
}
|
|
8755
8755
|
ge.reportTypeError = f;
|
|
8756
|
-
function
|
|
8757
|
-
const { gen:
|
|
8756
|
+
function p(u) {
|
|
8757
|
+
const { gen: h, data: w, schema: _ } = u, E = (0, s.schemaRefOrVal)(u, _, "type");
|
|
8758
8758
|
return {
|
|
8759
|
-
gen:
|
|
8759
|
+
gen: h,
|
|
8760
8760
|
keyword: "type",
|
|
8761
8761
|
data: w,
|
|
8762
8762
|
schema: _.type,
|
|
@@ -8801,19 +8801,19 @@ function Ce() {
|
|
|
8801
8801
|
if (oa) return ae;
|
|
8802
8802
|
oa = 1, Object.defineProperty(ae, "__esModule", { value: !0 }), ae.validateUnion = ae.validateArray = ae.usePattern = ae.callValidateCode = ae.schemaProperties = ae.allSchemaProperties = ae.noPropertyInData = ae.propertyInData = ae.isOwnProperty = ae.hasPropFunc = ae.reportMissingProp = ae.checkMissingProp = ae.checkReportMissingProp = void 0;
|
|
8803
8803
|
const e = Q(), t = te(), r = Ve(), n = te();
|
|
8804
|
-
function s(u,
|
|
8804
|
+
function s(u, h) {
|
|
8805
8805
|
const { gen: w, data: _, it: E } = u;
|
|
8806
|
-
w.if(d(w, _,
|
|
8807
|
-
u.setParams({ missingProperty: (0, e._)`${
|
|
8806
|
+
w.if(d(w, _, h, E.opts.ownProperties), () => {
|
|
8807
|
+
u.setParams({ missingProperty: (0, e._)`${h}` }, !0), u.error();
|
|
8808
8808
|
});
|
|
8809
8809
|
}
|
|
8810
8810
|
ae.checkReportMissingProp = s;
|
|
8811
|
-
function a({ gen: u, data:
|
|
8812
|
-
return (0, e.or)(..._.map((R) => (0, e.and)(d(u,
|
|
8811
|
+
function a({ gen: u, data: h, it: { opts: w } }, _, E) {
|
|
8812
|
+
return (0, e.or)(..._.map((R) => (0, e.and)(d(u, h, R, w.ownProperties), (0, e._)`${E} = ${R}`)));
|
|
8813
8813
|
}
|
|
8814
8814
|
ae.checkMissingProp = a;
|
|
8815
|
-
function o(u,
|
|
8816
|
-
u.setParams({ missingProperty:
|
|
8815
|
+
function o(u, h) {
|
|
8816
|
+
u.setParams({ missingProperty: h }, !0), u.error();
|
|
8817
8817
|
}
|
|
8818
8818
|
ae.reportMissingProp = o;
|
|
8819
8819
|
function i(u) {
|
|
@@ -8824,30 +8824,30 @@ function Ce() {
|
|
|
8824
8824
|
});
|
|
8825
8825
|
}
|
|
8826
8826
|
ae.hasPropFunc = i;
|
|
8827
|
-
function c(u,
|
|
8828
|
-
return (0, e._)`${i(u)}.call(${
|
|
8827
|
+
function c(u, h, w) {
|
|
8828
|
+
return (0, e._)`${i(u)}.call(${h}, ${w})`;
|
|
8829
8829
|
}
|
|
8830
8830
|
ae.isOwnProperty = c;
|
|
8831
|
-
function l(u,
|
|
8832
|
-
const E = (0, e._)`${
|
|
8833
|
-
return _ ? (0, e._)`${E} && ${c(u,
|
|
8831
|
+
function l(u, h, w, _) {
|
|
8832
|
+
const E = (0, e._)`${h}${(0, e.getProperty)(w)} !== undefined`;
|
|
8833
|
+
return _ ? (0, e._)`${E} && ${c(u, h, w)}` : E;
|
|
8834
8834
|
}
|
|
8835
8835
|
ae.propertyInData = l;
|
|
8836
|
-
function d(u,
|
|
8837
|
-
const E = (0, e._)`${
|
|
8838
|
-
return _ ? (0, e.or)(E, (0, e.not)(c(u,
|
|
8836
|
+
function d(u, h, w, _) {
|
|
8837
|
+
const E = (0, e._)`${h}${(0, e.getProperty)(w)} === undefined`;
|
|
8838
|
+
return _ ? (0, e.or)(E, (0, e.not)(c(u, h, w))) : E;
|
|
8839
8839
|
}
|
|
8840
8840
|
ae.noPropertyInData = d;
|
|
8841
8841
|
function m(u) {
|
|
8842
|
-
return u ? Object.keys(u).filter((
|
|
8842
|
+
return u ? Object.keys(u).filter((h) => h !== "__proto__") : [];
|
|
8843
8843
|
}
|
|
8844
8844
|
ae.allSchemaProperties = m;
|
|
8845
|
-
function y(u,
|
|
8846
|
-
return m(
|
|
8845
|
+
function y(u, h) {
|
|
8846
|
+
return m(h).filter((w) => !(0, t.alwaysValidSchema)(u, h[w]));
|
|
8847
8847
|
}
|
|
8848
8848
|
ae.schemaProperties = y;
|
|
8849
|
-
function S({ schemaCode: u, data:
|
|
8850
|
-
const U = j ? (0, e._)`${u}, ${
|
|
8849
|
+
function S({ schemaCode: u, data: h, it: { gen: w, topSchemaRef: _, schemaPath: E, errorPath: R }, it: P }, L, q, j) {
|
|
8850
|
+
const U = j ? (0, e._)`${u}, ${h}, ${_}${E}` : h, V = [
|
|
8851
8851
|
[r.default.instancePath, (0, e.strConcat)(r.default.instancePath, R)],
|
|
8852
8852
|
[r.default.parentData, P.parentData],
|
|
8853
8853
|
[r.default.parentDataProperty, P.parentDataProperty],
|
|
@@ -8859,8 +8859,8 @@ function Ce() {
|
|
|
8859
8859
|
}
|
|
8860
8860
|
ae.callValidateCode = S;
|
|
8861
8861
|
const v = (0, e._)`new RegExp`;
|
|
8862
|
-
function g({ gen: u, it: { opts:
|
|
8863
|
-
const _ =
|
|
8862
|
+
function g({ gen: u, it: { opts: h } }, w) {
|
|
8863
|
+
const _ = h.unicodeRegExp ? "u" : "", { regExp: E } = h.code, R = E(w, _);
|
|
8864
8864
|
return u.scopeValue("pattern", {
|
|
8865
8865
|
key: R.toString(),
|
|
8866
8866
|
ref: R,
|
|
@@ -8869,41 +8869,41 @@ function Ce() {
|
|
|
8869
8869
|
}
|
|
8870
8870
|
ae.usePattern = g;
|
|
8871
8871
|
function f(u) {
|
|
8872
|
-
const { gen:
|
|
8872
|
+
const { gen: h, data: w, keyword: _, it: E } = u, R = h.name("valid");
|
|
8873
8873
|
if (E.allErrors) {
|
|
8874
|
-
const L =
|
|
8875
|
-
return P(() =>
|
|
8874
|
+
const L = h.let("valid", !0);
|
|
8875
|
+
return P(() => h.assign(L, !1)), L;
|
|
8876
8876
|
}
|
|
8877
|
-
return
|
|
8877
|
+
return h.var(R, !0), P(() => h.break()), R;
|
|
8878
8878
|
function P(L) {
|
|
8879
|
-
const q =
|
|
8880
|
-
|
|
8879
|
+
const q = h.const("len", (0, e._)`${w}.length`);
|
|
8880
|
+
h.forRange("i", 0, q, (j) => {
|
|
8881
8881
|
u.subschema({
|
|
8882
8882
|
keyword: _,
|
|
8883
8883
|
dataProp: j,
|
|
8884
8884
|
dataPropType: t.Type.Num
|
|
8885
|
-
}, R),
|
|
8885
|
+
}, R), h.if((0, e.not)(R), L);
|
|
8886
8886
|
});
|
|
8887
8887
|
}
|
|
8888
8888
|
}
|
|
8889
8889
|
ae.validateArray = f;
|
|
8890
|
-
function
|
|
8891
|
-
const { gen:
|
|
8890
|
+
function p(u) {
|
|
8891
|
+
const { gen: h, schema: w, keyword: _, it: E } = u;
|
|
8892
8892
|
if (!Array.isArray(w))
|
|
8893
8893
|
throw new Error("ajv implementation error");
|
|
8894
8894
|
if (w.some((q) => (0, t.alwaysValidSchema)(E, q)) && !E.opts.unevaluated)
|
|
8895
8895
|
return;
|
|
8896
|
-
const P =
|
|
8897
|
-
|
|
8896
|
+
const P = h.let("valid", !1), L = h.name("_valid");
|
|
8897
|
+
h.block(() => w.forEach((q, j) => {
|
|
8898
8898
|
const U = u.subschema({
|
|
8899
8899
|
keyword: _,
|
|
8900
8900
|
schemaProp: j,
|
|
8901
8901
|
compositeRule: !0
|
|
8902
8902
|
}, L);
|
|
8903
|
-
|
|
8903
|
+
h.assign(P, (0, e._)`${P} || ${L}`), u.mergeValidEvaluated(U, L) || h.if((0, e.not)(P));
|
|
8904
8904
|
})), u.result(P, () => u.reset(), () => u.error(!0));
|
|
8905
8905
|
}
|
|
8906
|
-
return ae.validateUnion =
|
|
8906
|
+
return ae.validateUnion = p, ae;
|
|
8907
8907
|
}
|
|
8908
8908
|
var ia;
|
|
8909
8909
|
function um() {
|
|
@@ -8911,11 +8911,11 @@ function um() {
|
|
|
8911
8911
|
ia = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.validateKeywordUsage = De.validSchemaType = De.funcKeywordCode = De.macroKeywordCode = void 0;
|
|
8912
8912
|
const e = Q(), t = Ve(), r = Ce(), n = Vr();
|
|
8913
8913
|
function s(y, S) {
|
|
8914
|
-
const { gen: v, keyword: g, schema: f, parentSchema:
|
|
8915
|
-
u.opts.validateSchema !== !1 && u.self.validateSchema(
|
|
8914
|
+
const { gen: v, keyword: g, schema: f, parentSchema: p, it: u } = y, h = S.macro.call(u.self, f, p, u), w = l(v, g, h);
|
|
8915
|
+
u.opts.validateSchema !== !1 && u.self.validateSchema(h, !0);
|
|
8916
8916
|
const _ = v.name("valid");
|
|
8917
8917
|
y.subschema({
|
|
8918
|
-
schema:
|
|
8918
|
+
schema: h,
|
|
8919
8919
|
schemaPath: e.nil,
|
|
8920
8920
|
errSchemaPath: `${u.errSchemaPath}/${g}`,
|
|
8921
8921
|
topSchemaRef: w,
|
|
@@ -8925,9 +8925,9 @@ function um() {
|
|
|
8925
8925
|
De.macroKeywordCode = s;
|
|
8926
8926
|
function a(y, S) {
|
|
8927
8927
|
var v;
|
|
8928
|
-
const { gen: g, keyword: f, schema:
|
|
8928
|
+
const { gen: g, keyword: f, schema: p, parentSchema: u, $data: h, it: w } = y;
|
|
8929
8929
|
c(w, S);
|
|
8930
|
-
const _ = !
|
|
8930
|
+
const _ = !h && S.compile ? S.compile.call(w.self, p, u, w) : S.validate, E = l(g, f, _), R = g.let("valid");
|
|
8931
8931
|
y.block$data(R, P), y.ok((v = S.valid) !== null && v !== void 0 ? v : R);
|
|
8932
8932
|
function P() {
|
|
8933
8933
|
if (S.errors === !1)
|
|
@@ -8946,7 +8946,7 @@ function um() {
|
|
|
8946
8946
|
return g.assign(V, null), j(e.nil), V;
|
|
8947
8947
|
}
|
|
8948
8948
|
function j(V = S.async ? (0, e._)`await ` : e.nil) {
|
|
8949
|
-
const W = w.opts.passContext ? t.default.this : t.default.self, re = !("compile" in S && !
|
|
8949
|
+
const W = w.opts.passContext ? t.default.this : t.default.self, re = !("compile" in S && !h || S.schema === !1);
|
|
8950
8950
|
g.assign(R, (0, e._)`${V}${(0, r.callValidateCode)(y, E, W, re)}`, S.modifying);
|
|
8951
8951
|
}
|
|
8952
8952
|
function U(V) {
|
|
@@ -8978,14 +8978,14 @@ function um() {
|
|
|
8978
8978
|
return !S.length || S.some((g) => g === "array" ? Array.isArray(y) : g === "object" ? y && typeof y == "object" && !Array.isArray(y) : typeof y == g || v && typeof y > "u");
|
|
8979
8979
|
}
|
|
8980
8980
|
De.validSchemaType = d;
|
|
8981
|
-
function m({ schema: y, opts: S, self: v, errSchemaPath: g }, f,
|
|
8982
|
-
if (Array.isArray(f.keyword) ? !f.keyword.includes(
|
|
8981
|
+
function m({ schema: y, opts: S, self: v, errSchemaPath: g }, f, p) {
|
|
8982
|
+
if (Array.isArray(f.keyword) ? !f.keyword.includes(p) : f.keyword !== p)
|
|
8983
8983
|
throw new Error("ajv implementation error");
|
|
8984
8984
|
const u = f.dependencies;
|
|
8985
|
-
if (u?.some((
|
|
8986
|
-
throw new Error(`parent schema must have dependencies of ${
|
|
8987
|
-
if (f.validateSchema && !f.validateSchema(y[
|
|
8988
|
-
const w = `keyword "${
|
|
8985
|
+
if (u?.some((h) => !Object.prototype.hasOwnProperty.call(y, h)))
|
|
8986
|
+
throw new Error(`parent schema must have dependencies of ${p}: ${u.join(",")}`);
|
|
8987
|
+
if (f.validateSchema && !f.validateSchema(y[p])) {
|
|
8988
|
+
const w = `keyword "${p}" value is invalid at path "${g}": ` + v.errorsText(f.validateSchema.errors);
|
|
8989
8989
|
if (S.validateSchema === "log")
|
|
8990
8990
|
v.logger.error(w);
|
|
8991
8991
|
else
|
|
@@ -9032,8 +9032,8 @@ function lm() {
|
|
|
9032
9032
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
9033
9033
|
const { gen: y } = o;
|
|
9034
9034
|
if (i !== void 0) {
|
|
9035
|
-
const { errorPath: v, dataPathArr: g, opts: f } = o,
|
|
9036
|
-
S(
|
|
9035
|
+
const { errorPath: v, dataPathArr: g, opts: f } = o, p = y.let("data", (0, e._)`${o.data}${(0, e.getProperty)(i)}`, !0);
|
|
9036
|
+
S(p), a.errorPath = (0, e.str)`${v}${(0, t.getErrorPath)(i, c, f.jsPropertySyntax)}`, a.parentDataProperty = (0, e._)`${i}`, a.dataPathArr = [...g, a.parentDataProperty];
|
|
9037
9037
|
}
|
|
9038
9038
|
if (l !== void 0) {
|
|
9039
9039
|
const v = l instanceof e.Name ? l : y.let("data", l, !0);
|
|
@@ -9050,9 +9050,9 @@ function lm() {
|
|
|
9050
9050
|
}
|
|
9051
9051
|
return xe.extendSubschemaMode = s, xe;
|
|
9052
9052
|
}
|
|
9053
|
-
var be = {},
|
|
9053
|
+
var be = {}, hn, ua;
|
|
9054
9054
|
function di() {
|
|
9055
|
-
return ua || (ua = 1,
|
|
9055
|
+
return ua || (ua = 1, hn = function e(t, r) {
|
|
9056
9056
|
if (t === r) return !0;
|
|
9057
9057
|
if (t && r && typeof t == "object" && typeof r == "object") {
|
|
9058
9058
|
if (t.constructor !== r.constructor) return !1;
|
|
@@ -9076,7 +9076,7 @@ function di() {
|
|
|
9076
9076
|
return !0;
|
|
9077
9077
|
}
|
|
9078
9078
|
return t !== t && r !== r;
|
|
9079
|
-
}),
|
|
9079
|
+
}), hn;
|
|
9080
9080
|
}
|
|
9081
9081
|
var mn = { exports: {} }, la;
|
|
9082
9082
|
function dm() {
|
|
@@ -9190,24 +9190,24 @@ function Hr() {
|
|
|
9190
9190
|
for (const f in g) {
|
|
9191
9191
|
if (a.has(f))
|
|
9192
9192
|
return !0;
|
|
9193
|
-
const
|
|
9194
|
-
if (Array.isArray(
|
|
9193
|
+
const p = g[f];
|
|
9194
|
+
if (Array.isArray(p) && p.some(o) || typeof p == "object" && o(p))
|
|
9195
9195
|
return !0;
|
|
9196
9196
|
}
|
|
9197
9197
|
return !1;
|
|
9198
9198
|
}
|
|
9199
9199
|
function i(g) {
|
|
9200
9200
|
let f = 0;
|
|
9201
|
-
for (const
|
|
9202
|
-
if (
|
|
9201
|
+
for (const p in g) {
|
|
9202
|
+
if (p === "$ref")
|
|
9203
9203
|
return 1 / 0;
|
|
9204
|
-
if (f++, !n.has(
|
|
9204
|
+
if (f++, !n.has(p) && (typeof g[p] == "object" && (0, e.eachItem)(g[p], (u) => f += i(u)), f === 1 / 0))
|
|
9205
9205
|
return 1 / 0;
|
|
9206
9206
|
}
|
|
9207
9207
|
return f;
|
|
9208
9208
|
}
|
|
9209
|
-
function c(g, f = "",
|
|
9210
|
-
|
|
9209
|
+
function c(g, f = "", p) {
|
|
9210
|
+
p !== !1 && (f = m(f));
|
|
9211
9211
|
const u = g.parse(f);
|
|
9212
9212
|
return l(g, u);
|
|
9213
9213
|
}
|
|
@@ -9221,21 +9221,21 @@ function Hr() {
|
|
|
9221
9221
|
return g ? g.replace(d, "") : "";
|
|
9222
9222
|
}
|
|
9223
9223
|
be.normalizeId = m;
|
|
9224
|
-
function y(g, f,
|
|
9225
|
-
return
|
|
9224
|
+
function y(g, f, p) {
|
|
9225
|
+
return p = m(p), g.resolve(f, p);
|
|
9226
9226
|
}
|
|
9227
9227
|
be.resolveUrl = y;
|
|
9228
9228
|
const S = /^[a-z_][-a-z0-9._]*$/i;
|
|
9229
9229
|
function v(g, f) {
|
|
9230
9230
|
if (typeof g == "boolean")
|
|
9231
9231
|
return {};
|
|
9232
|
-
const { schemaId:
|
|
9232
|
+
const { schemaId: p, uriResolver: u } = this.opts, h = m(g[p] || f), w = { "": h }, _ = c(u, h, !1), E = {}, R = /* @__PURE__ */ new Set();
|
|
9233
9233
|
return r(g, { allKeys: !0 }, (q, j, U, V) => {
|
|
9234
9234
|
if (V === void 0)
|
|
9235
9235
|
return;
|
|
9236
9236
|
const W = _ + j;
|
|
9237
9237
|
let re = w[V];
|
|
9238
|
-
typeof q[
|
|
9238
|
+
typeof q[p] == "string" && (re = ne.call(this, q[p])), pe.call(this, q.$anchor), pe.call(this, q.$dynamicAnchor), w[j] = re;
|
|
9239
9239
|
function ne(J) {
|
|
9240
9240
|
const ce = this.opts.uriResolver.resolve;
|
|
9241
9241
|
if (J = m(re ? ce(re, J) : J), R.has(J))
|
|
@@ -9244,7 +9244,7 @@ function Hr() {
|
|
|
9244
9244
|
let M = this.refs[J];
|
|
9245
9245
|
return typeof M == "string" && (M = this.refs[M]), typeof M == "object" ? P(q, M.schema, J) : J !== m(W) && (J[0] === "#" ? (P(q, E[J], J), E[J] = q) : this.refs[J] = W), J;
|
|
9246
9246
|
}
|
|
9247
|
-
function
|
|
9247
|
+
function pe(J) {
|
|
9248
9248
|
if (typeof J == "string") {
|
|
9249
9249
|
if (!S.test(J))
|
|
9250
9250
|
throw new Error(`invalid anchor "${J}"`);
|
|
@@ -9293,10 +9293,10 @@ function Br() {
|
|
|
9293
9293
|
function f(A) {
|
|
9294
9294
|
const { schema: $, opts: k, gen: x } = A;
|
|
9295
9295
|
S(A, () => {
|
|
9296
|
-
k.$comment && $.$comment && V(A), q(A), x.let(c.default.vErrors, null), x.let(c.default.errors, 0), k.unevaluated &&
|
|
9296
|
+
k.$comment && $.$comment && V(A), q(A), x.let(c.default.vErrors, null), x.let(c.default.errors, 0), k.unevaluated && p(A), P(A), W(A);
|
|
9297
9297
|
});
|
|
9298
9298
|
}
|
|
9299
|
-
function
|
|
9299
|
+
function p(A) {
|
|
9300
9300
|
const { gen: $, validateName: k } = A;
|
|
9301
9301
|
A.evaluated = $.const("evaluated", (0, i._)`${k}.evaluated`), $.if((0, i._)`${A.evaluated}.dynamicProps`, () => $.assign((0, i._)`${A.evaluated}.props`, (0, i._)`undefined`)), $.if((0, i._)`${A.evaluated}.dynamicItems`, () => $.assign((0, i._)`${A.evaluated}.items`, (0, i._)`undefined`));
|
|
9302
9302
|
}
|
|
@@ -9304,7 +9304,7 @@ function Br() {
|
|
|
9304
9304
|
const k = typeof A == "object" && A[$.schemaId];
|
|
9305
9305
|
return k && ($.code.source || $.code.process) ? (0, i._)`/*# sourceURL=${k} */` : i.nil;
|
|
9306
9306
|
}
|
|
9307
|
-
function
|
|
9307
|
+
function h(A, $) {
|
|
9308
9308
|
if (_(A) && (R(A), w(A))) {
|
|
9309
9309
|
E(A, $);
|
|
9310
9310
|
return;
|
|
@@ -9358,8 +9358,8 @@ function Br() {
|
|
|
9358
9358
|
if (H.$comment === !0)
|
|
9359
9359
|
A.code((0, i._)`${c.default.self}.logger.log(${X})`);
|
|
9360
9360
|
else if (typeof H.$comment == "function") {
|
|
9361
|
-
const
|
|
9362
|
-
A.code((0, i._)`${c.default.self}.opts.$comment(${X}, ${
|
|
9361
|
+
const he = (0, i.str)`${x}/$comment`, Ne = A.scopeValue("root", { ref: $.root });
|
|
9362
|
+
A.code((0, i._)`${c.default.self}.opts.$comment(${X}, ${he}, ${Ne}.schema)`);
|
|
9363
9363
|
}
|
|
9364
9364
|
}
|
|
9365
9365
|
function W(A) {
|
|
@@ -9370,7 +9370,7 @@ function Br() {
|
|
|
9370
9370
|
k instanceof i.Name && A.assign((0, i._)`${$}.props`, k), x instanceof i.Name && A.assign((0, i._)`${$}.items`, x);
|
|
9371
9371
|
}
|
|
9372
9372
|
function ne(A, $, k, x) {
|
|
9373
|
-
const { gen: H, schema: X, data:
|
|
9373
|
+
const { gen: H, schema: X, data: he, allErrors: Ne, opts: Ee, self: _e } = A, { RULES: me } = _e;
|
|
9374
9374
|
if (X.$ref && (Ee.ignoreKeywordsWithRef || !(0, d.schemaHasRulesButRef)(X, me))) {
|
|
9375
9375
|
H.block(() => F(A, "$ref", me.all.$ref.definition));
|
|
9376
9376
|
return;
|
|
@@ -9381,10 +9381,10 @@ function Br() {
|
|
|
9381
9381
|
Je(me.post);
|
|
9382
9382
|
});
|
|
9383
9383
|
function Je(Ae) {
|
|
9384
|
-
(0, r.shouldUseGroup)(X, Ae) && (Ae.type ? (H.if((0, n.checkDataType)(Ae.type,
|
|
9384
|
+
(0, r.shouldUseGroup)(X, Ae) && (Ae.type ? (H.if((0, n.checkDataType)(Ae.type, he, Ee.strictNumbers)), pe(A, Ae), $.length === 1 && $[0] === Ae.type && k && (H.else(), (0, n.reportTypeError)(A)), H.endIf()) : pe(A, Ae), Ne || H.if((0, i._)`${c.default.errors} === ${x || 0}`));
|
|
9385
9385
|
}
|
|
9386
9386
|
}
|
|
9387
|
-
function
|
|
9387
|
+
function pe(A, $) {
|
|
9388
9388
|
const { gen: k, schema: x, opts: { useDefaults: H } } = A;
|
|
9389
9389
|
H && (0, s.assignDefaults)(A, $.type), k.block(() => {
|
|
9390
9390
|
for (const X of $.rules)
|
|
@@ -9414,7 +9414,7 @@ function Br() {
|
|
|
9414
9414
|
const H = k[x];
|
|
9415
9415
|
if (typeof H == "object" && (0, r.shouldUseRule)(A.schema, H)) {
|
|
9416
9416
|
const { type: X } = H.definition;
|
|
9417
|
-
X.length && !X.some((
|
|
9417
|
+
X.length && !X.some((he) => C($, he)) && T(A, `missing type "${X.join(",")}" for keyword "${x}"`);
|
|
9418
9418
|
}
|
|
9419
9419
|
}
|
|
9420
9420
|
}
|
|
@@ -9496,13 +9496,13 @@ function Br() {
|
|
|
9496
9496
|
check$data($ = i.nil, k = i.nil) {
|
|
9497
9497
|
if (!this.$data)
|
|
9498
9498
|
return;
|
|
9499
|
-
const { gen: x, schemaCode: H, schemaType: X, def:
|
|
9500
|
-
x.if((0, i.or)((0, i._)`${H} === undefined`, k)), $ !== i.nil && x.assign($, !0), (X.length ||
|
|
9499
|
+
const { gen: x, schemaCode: H, schemaType: X, def: he } = this;
|
|
9500
|
+
x.if((0, i.or)((0, i._)`${H} === undefined`, k)), $ !== i.nil && x.assign($, !0), (X.length || he.validateSchema) && (x.elseIf(this.invalid$data()), this.$dataError(), $ !== i.nil && x.assign($, !1)), x.else();
|
|
9501
9501
|
}
|
|
9502
9502
|
invalid$data() {
|
|
9503
9503
|
const { gen: $, schemaCode: k, schemaType: x, def: H, it: X } = this;
|
|
9504
|
-
return (0, i.or)(
|
|
9505
|
-
function
|
|
9504
|
+
return (0, i.or)(he(), Ne());
|
|
9505
|
+
function he() {
|
|
9506
9506
|
if (x.length) {
|
|
9507
9507
|
if (!(k instanceof i.Name))
|
|
9508
9508
|
throw new Error("ajv implementation error");
|
|
@@ -9523,7 +9523,7 @@ function Br() {
|
|
|
9523
9523
|
const x = (0, o.getSubschema)(this.it, $);
|
|
9524
9524
|
(0, o.extendSubschemaData)(x, this.it, $), (0, o.extendSubschemaMode)(x, $);
|
|
9525
9525
|
const H = { ...this.it, ...x, items: void 0, props: void 0 };
|
|
9526
|
-
return
|
|
9526
|
+
return h(H, k), H;
|
|
9527
9527
|
}
|
|
9528
9528
|
mergeEvaluated($, k) {
|
|
9529
9529
|
const { it: x, gen: H } = this;
|
|
@@ -9564,21 +9564,21 @@ function Br() {
|
|
|
9564
9564
|
if (X = k[$ - me], !H)
|
|
9565
9565
|
return X;
|
|
9566
9566
|
}
|
|
9567
|
-
let
|
|
9567
|
+
let he = X;
|
|
9568
9568
|
const Ne = H.split("/");
|
|
9569
9569
|
for (const _e of Ne)
|
|
9570
|
-
_e && (X = (0, i._)`${X}${(0, i.getProperty)((0, d.unescapeJsonPointer)(_e))}`,
|
|
9571
|
-
return
|
|
9570
|
+
_e && (X = (0, i._)`${X}${(0, i.getProperty)((0, d.unescapeJsonPointer)(_e))}`, he = (0, i._)`${he} && ${X}`);
|
|
9571
|
+
return he;
|
|
9572
9572
|
function Ee(_e, me) {
|
|
9573
9573
|
return `Cannot access ${_e} ${me} levels up, current level is ${$}`;
|
|
9574
9574
|
}
|
|
9575
9575
|
}
|
|
9576
9576
|
return Le.getData = ee, Le;
|
|
9577
9577
|
}
|
|
9578
|
-
var jt = {},
|
|
9578
|
+
var jt = {}, pa;
|
|
9579
9579
|
function Wn() {
|
|
9580
|
-
if (
|
|
9581
|
-
|
|
9580
|
+
if (pa) return jt;
|
|
9581
|
+
pa = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
|
|
9582
9582
|
class e extends Error {
|
|
9583
9583
|
constructor(r) {
|
|
9584
9584
|
super("validation failed"), this.errors = r, this.ajv = this.validation = !0;
|
|
@@ -9586,10 +9586,10 @@ function Wn() {
|
|
|
9586
9586
|
}
|
|
9587
9587
|
return jt.default = e, jt;
|
|
9588
9588
|
}
|
|
9589
|
-
var qt = {},
|
|
9589
|
+
var qt = {}, ha;
|
|
9590
9590
|
function Wr() {
|
|
9591
|
-
if (
|
|
9592
|
-
|
|
9591
|
+
if (ha) return qt;
|
|
9592
|
+
ha = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
9593
9593
|
const e = Hr();
|
|
9594
9594
|
class t extends Error {
|
|
9595
9595
|
constructor(n, s, a, o) {
|
|
@@ -9604,19 +9604,19 @@ function zn() {
|
|
|
9604
9604
|
ma = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.resolveSchema = Te.getCompilingSchema = Te.resolveRef = Te.compileSchema = Te.SchemaEnv = void 0;
|
|
9605
9605
|
const e = Q(), t = Wn(), r = Ve(), n = Hr(), s = te(), a = Br();
|
|
9606
9606
|
class o {
|
|
9607
|
-
constructor(
|
|
9607
|
+
constructor(p) {
|
|
9608
9608
|
var u;
|
|
9609
9609
|
this.refs = {}, this.dynamicAnchors = {};
|
|
9610
|
-
let
|
|
9611
|
-
typeof
|
|
9610
|
+
let h;
|
|
9611
|
+
typeof p.schema == "object" && (h = p.schema), this.schema = p.schema, this.schemaId = p.schemaId, this.root = p.root || this, this.baseId = (u = p.baseId) !== null && u !== void 0 ? u : (0, n.normalizeId)(h?.[p.schemaId || "$id"]), this.schemaPath = p.schemaPath, this.localRefs = p.localRefs, this.meta = p.meta, this.$async = h?.$async, this.refs = {};
|
|
9612
9612
|
}
|
|
9613
9613
|
}
|
|
9614
9614
|
Te.SchemaEnv = o;
|
|
9615
9615
|
function i(f) {
|
|
9616
|
-
const
|
|
9617
|
-
if (
|
|
9618
|
-
return
|
|
9619
|
-
const u = (0, n.getFullPath)(this.opts.uriResolver, f.root.baseId), { es5:
|
|
9616
|
+
const p = d.call(this, f);
|
|
9617
|
+
if (p)
|
|
9618
|
+
return p;
|
|
9619
|
+
const u = (0, n.getFullPath)(this.opts.uriResolver, f.root.baseId), { es5: h, lines: w } = this.opts.code, { ownProperties: _ } = this.opts, E = new e.CodeGen(this.scope, { es5: h, lines: w, ownProperties: _ });
|
|
9620
9620
|
let R;
|
|
9621
9621
|
f.$async && (R = E.scopeValue("Error", {
|
|
9622
9622
|
ref: t.default,
|
|
@@ -9672,16 +9672,16 @@ function zn() {
|
|
|
9672
9672
|
}
|
|
9673
9673
|
}
|
|
9674
9674
|
Te.compileSchema = i;
|
|
9675
|
-
function c(f,
|
|
9676
|
-
var
|
|
9677
|
-
u = (0, n.resolveUrl)(this.opts.uriResolver,
|
|
9675
|
+
function c(f, p, u) {
|
|
9676
|
+
var h;
|
|
9677
|
+
u = (0, n.resolveUrl)(this.opts.uriResolver, p, u);
|
|
9678
9678
|
const w = f.refs[u];
|
|
9679
9679
|
if (w)
|
|
9680
9680
|
return w;
|
|
9681
9681
|
let _ = y.call(this, f, u);
|
|
9682
9682
|
if (_ === void 0) {
|
|
9683
|
-
const E = (
|
|
9684
|
-
E && (_ = new o({ schema: E, schemaId: R, root: f, baseId:
|
|
9683
|
+
const E = (h = f.localRefs) === null || h === void 0 ? void 0 : h[u], { schemaId: R } = this.opts;
|
|
9684
|
+
E && (_ = new o({ schema: E, schemaId: R, root: f, baseId: p }));
|
|
9685
9685
|
}
|
|
9686
9686
|
if (_ !== void 0)
|
|
9687
9687
|
return f.refs[u] = l.call(this, _);
|
|
@@ -9691,32 +9691,32 @@ function zn() {
|
|
|
9691
9691
|
return (0, n.inlineRef)(f.schema, this.opts.inlineRefs) ? f.schema : f.validate ? f : i.call(this, f);
|
|
9692
9692
|
}
|
|
9693
9693
|
function d(f) {
|
|
9694
|
-
for (const
|
|
9695
|
-
if (m(
|
|
9696
|
-
return
|
|
9694
|
+
for (const p of this._compilations)
|
|
9695
|
+
if (m(p, f))
|
|
9696
|
+
return p;
|
|
9697
9697
|
}
|
|
9698
9698
|
Te.getCompilingSchema = d;
|
|
9699
|
-
function m(f,
|
|
9700
|
-
return f.schema ===
|
|
9699
|
+
function m(f, p) {
|
|
9700
|
+
return f.schema === p.schema && f.root === p.root && f.baseId === p.baseId;
|
|
9701
9701
|
}
|
|
9702
|
-
function y(f,
|
|
9702
|
+
function y(f, p) {
|
|
9703
9703
|
let u;
|
|
9704
|
-
for (; typeof (u = this.refs[
|
|
9705
|
-
|
|
9706
|
-
return u || this.schemas[
|
|
9704
|
+
for (; typeof (u = this.refs[p]) == "string"; )
|
|
9705
|
+
p = u;
|
|
9706
|
+
return u || this.schemas[p] || S.call(this, f, p);
|
|
9707
9707
|
}
|
|
9708
|
-
function S(f,
|
|
9709
|
-
const u = this.opts.uriResolver.parse(
|
|
9708
|
+
function S(f, p) {
|
|
9709
|
+
const u = this.opts.uriResolver.parse(p), h = (0, n._getFullPath)(this.opts.uriResolver, u);
|
|
9710
9710
|
let w = (0, n.getFullPath)(this.opts.uriResolver, f.baseId, void 0);
|
|
9711
|
-
if (Object.keys(f.schema).length > 0 &&
|
|
9711
|
+
if (Object.keys(f.schema).length > 0 && h === w)
|
|
9712
9712
|
return g.call(this, u, f);
|
|
9713
|
-
const _ = (0, n.normalizeId)(
|
|
9713
|
+
const _ = (0, n.normalizeId)(h), E = this.refs[_] || this.schemas[_];
|
|
9714
9714
|
if (typeof E == "string") {
|
|
9715
9715
|
const R = S.call(this, f, E);
|
|
9716
9716
|
return typeof R?.schema != "object" ? void 0 : g.call(this, u, R);
|
|
9717
9717
|
}
|
|
9718
9718
|
if (typeof E?.schema == "object") {
|
|
9719
|
-
if (E.validate || i.call(this, E), _ === (0, n.normalizeId)(
|
|
9719
|
+
if (E.validate || i.call(this, E), _ === (0, n.normalizeId)(p)) {
|
|
9720
9720
|
const { schema: R } = E, { schemaId: P } = this.opts, L = R[P];
|
|
9721
9721
|
return L && (w = (0, n.resolveUrl)(this.opts.uriResolver, w, L)), new o({ schema: R, schemaId: P, root: f, baseId: w });
|
|
9722
9722
|
}
|
|
@@ -9731,7 +9731,7 @@ function zn() {
|
|
|
9731
9731
|
"dependencies",
|
|
9732
9732
|
"definitions"
|
|
9733
9733
|
]);
|
|
9734
|
-
function g(f, { baseId:
|
|
9734
|
+
function g(f, { baseId: p, schema: u, root: h }) {
|
|
9735
9735
|
var w;
|
|
9736
9736
|
if (((w = f.fragment) === null || w === void 0 ? void 0 : w[0]) !== "/")
|
|
9737
9737
|
return;
|
|
@@ -9743,23 +9743,23 @@ function zn() {
|
|
|
9743
9743
|
return;
|
|
9744
9744
|
u = P;
|
|
9745
9745
|
const L = typeof u == "object" && u[this.opts.schemaId];
|
|
9746
|
-
!v.has(R) && L && (
|
|
9746
|
+
!v.has(R) && L && (p = (0, n.resolveUrl)(this.opts.uriResolver, p, L));
|
|
9747
9747
|
}
|
|
9748
9748
|
let _;
|
|
9749
9749
|
if (typeof u != "boolean" && u.$ref && !(0, s.schemaHasRulesButRef)(u, this.RULES)) {
|
|
9750
|
-
const R = (0, n.resolveUrl)(this.opts.uriResolver,
|
|
9751
|
-
_ = S.call(this,
|
|
9750
|
+
const R = (0, n.resolveUrl)(this.opts.uriResolver, p, u.$ref);
|
|
9751
|
+
_ = S.call(this, h, R);
|
|
9752
9752
|
}
|
|
9753
9753
|
const { schemaId: E } = this.opts;
|
|
9754
|
-
if (_ = _ || new o({ schema: u, schemaId: E, root:
|
|
9754
|
+
if (_ = _ || new o({ schema: u, schemaId: E, root: h, baseId: p }), _.schema !== _.root.schema)
|
|
9755
9755
|
return _;
|
|
9756
9756
|
}
|
|
9757
9757
|
return Te;
|
|
9758
9758
|
}
|
|
9759
|
-
const fm = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
9759
|
+
const fm = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", pm = "Meta-schema for $data reference (JSON AnySchema extension proposal)", hm = "object", mm = ["$data"], gm = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, ym = !1, vm = {
|
|
9760
9760
|
$id: fm,
|
|
9761
|
-
description:
|
|
9762
|
-
type:
|
|
9761
|
+
description: pm,
|
|
9762
|
+
type: hm,
|
|
9763
9763
|
required: mm,
|
|
9764
9764
|
properties: gm,
|
|
9765
9765
|
additionalProperties: ym
|
|
@@ -9801,31 +9801,31 @@ function wm() {
|
|
|
9801
9801
|
function r(g) {
|
|
9802
9802
|
if (i(g, ".") < 3)
|
|
9803
9803
|
return { host: g, isIPV4: !1 };
|
|
9804
|
-
const f = g.match(t) || [], [
|
|
9805
|
-
return
|
|
9804
|
+
const f = g.match(t) || [], [p] = f;
|
|
9805
|
+
return p ? { host: o(p, "."), isIPV4: !0 } : { host: g, isIPV4: !1 };
|
|
9806
9806
|
}
|
|
9807
9807
|
function n(g, f = !1) {
|
|
9808
|
-
let
|
|
9809
|
-
for (const
|
|
9810
|
-
if (e[
|
|
9811
|
-
|
|
9808
|
+
let p = "", u = !0;
|
|
9809
|
+
for (const h of g) {
|
|
9810
|
+
if (e[h] === void 0) return;
|
|
9811
|
+
h !== "0" && u === !0 && (u = !1), u || (p += h);
|
|
9812
9812
|
}
|
|
9813
|
-
return f &&
|
|
9813
|
+
return f && p.length === 0 && (p = "0"), p;
|
|
9814
9814
|
}
|
|
9815
9815
|
function s(g) {
|
|
9816
9816
|
let f = 0;
|
|
9817
|
-
const
|
|
9817
|
+
const p = { error: !1, address: "", zone: "" }, u = [], h = [];
|
|
9818
9818
|
let w = !1, _ = !1, E = !1;
|
|
9819
9819
|
function R() {
|
|
9820
|
-
if (
|
|
9820
|
+
if (h.length) {
|
|
9821
9821
|
if (w === !1) {
|
|
9822
|
-
const P = n(
|
|
9822
|
+
const P = n(h);
|
|
9823
9823
|
if (P !== void 0)
|
|
9824
9824
|
u.push(P);
|
|
9825
9825
|
else
|
|
9826
|
-
return
|
|
9826
|
+
return p.error = !0, !1;
|
|
9827
9827
|
}
|
|
9828
|
-
|
|
9828
|
+
h.length = 0;
|
|
9829
9829
|
}
|
|
9830
9830
|
return !0;
|
|
9831
9831
|
}
|
|
@@ -9836,7 +9836,7 @@ function wm() {
|
|
|
9836
9836
|
if (_ === !0 && (E = !0), !R())
|
|
9837
9837
|
break;
|
|
9838
9838
|
if (f++, u.push(":"), f > 7) {
|
|
9839
|
-
|
|
9839
|
+
p.error = !0;
|
|
9840
9840
|
break;
|
|
9841
9841
|
}
|
|
9842
9842
|
P - 1 >= 0 && g[P - 1] === ":" && (_ = !0);
|
|
@@ -9846,11 +9846,11 @@ function wm() {
|
|
|
9846
9846
|
break;
|
|
9847
9847
|
w = !0;
|
|
9848
9848
|
} else {
|
|
9849
|
-
|
|
9849
|
+
h.push(L);
|
|
9850
9850
|
continue;
|
|
9851
9851
|
}
|
|
9852
9852
|
}
|
|
9853
|
-
return
|
|
9853
|
+
return h.length && (w ? p.zone = h.join("") : E ? u.push(h.join("")) : u.push(n(h))), p.address = u.join(""), p;
|
|
9854
9854
|
}
|
|
9855
9855
|
function a(g) {
|
|
9856
9856
|
if (i(g, ":") < 2)
|
|
@@ -9859,24 +9859,24 @@ function wm() {
|
|
|
9859
9859
|
if (f.error)
|
|
9860
9860
|
return { host: g, isIPV6: !1 };
|
|
9861
9861
|
{
|
|
9862
|
-
let
|
|
9863
|
-
return f.zone && (
|
|
9862
|
+
let p = f.address, u = f.address;
|
|
9863
|
+
return f.zone && (p += "%" + f.zone, u += "%25" + f.zone), { host: p, escapedHost: u, isIPV6: !0 };
|
|
9864
9864
|
}
|
|
9865
9865
|
}
|
|
9866
9866
|
function o(g, f) {
|
|
9867
|
-
let
|
|
9868
|
-
const
|
|
9869
|
-
for (let w = 0; w <
|
|
9867
|
+
let p = "", u = !0;
|
|
9868
|
+
const h = g.length;
|
|
9869
|
+
for (let w = 0; w < h; w++) {
|
|
9870
9870
|
const _ = g[w];
|
|
9871
|
-
_ === "0" && u ? (w + 1 <=
|
|
9871
|
+
_ === "0" && u ? (w + 1 <= h && g[w + 1] === f || w + 1 === h) && (p += _, u = !1) : (_ === f ? u = !0 : u = !1, p += _);
|
|
9872
9872
|
}
|
|
9873
|
-
return
|
|
9873
|
+
return p;
|
|
9874
9874
|
}
|
|
9875
9875
|
function i(g, f) {
|
|
9876
|
-
let
|
|
9876
|
+
let p = 0;
|
|
9877
9877
|
for (let u = 0; u < g.length; u++)
|
|
9878
|
-
g[u] === f &&
|
|
9879
|
-
return
|
|
9878
|
+
g[u] === f && p++;
|
|
9879
|
+
return p;
|
|
9880
9880
|
}
|
|
9881
9881
|
const c = /^\.\.?\//u, l = /^\/\.(?:\/|$)/u, d = /^\/\.\.(?:\/|$)/u, m = /^\/?(?:.|\n)*?(?=\/|$)/u;
|
|
9882
9882
|
function y(g) {
|
|
@@ -9891,9 +9891,9 @@ function wm() {
|
|
|
9891
9891
|
else if (g === "." || g === "..")
|
|
9892
9892
|
g = "";
|
|
9893
9893
|
else {
|
|
9894
|
-
const
|
|
9895
|
-
if (
|
|
9896
|
-
const u =
|
|
9894
|
+
const p = g.match(m);
|
|
9895
|
+
if (p) {
|
|
9896
|
+
const u = p[0];
|
|
9897
9897
|
g = g.slice(u.length), f.push(u);
|
|
9898
9898
|
} else
|
|
9899
9899
|
throw new Error("Unexpected dot segment condition");
|
|
@@ -9901,21 +9901,21 @@ function wm() {
|
|
|
9901
9901
|
return f.join("");
|
|
9902
9902
|
}
|
|
9903
9903
|
function S(g, f) {
|
|
9904
|
-
const
|
|
9905
|
-
return g.scheme !== void 0 && (g.scheme =
|
|
9904
|
+
const p = f !== !0 ? escape : unescape;
|
|
9905
|
+
return g.scheme !== void 0 && (g.scheme = p(g.scheme)), g.userinfo !== void 0 && (g.userinfo = p(g.userinfo)), g.host !== void 0 && (g.host = p(g.host)), g.path !== void 0 && (g.path = p(g.path)), g.query !== void 0 && (g.query = p(g.query)), g.fragment !== void 0 && (g.fragment = p(g.fragment)), g;
|
|
9906
9906
|
}
|
|
9907
9907
|
function v(g) {
|
|
9908
9908
|
const f = [];
|
|
9909
9909
|
if (g.userinfo !== void 0 && (f.push(g.userinfo), f.push("@")), g.host !== void 0) {
|
|
9910
|
-
let
|
|
9911
|
-
const u = r(
|
|
9910
|
+
let p = unescape(g.host);
|
|
9911
|
+
const u = r(p);
|
|
9912
9912
|
if (u.isIPV4)
|
|
9913
|
-
|
|
9913
|
+
p = u.host;
|
|
9914
9914
|
else {
|
|
9915
|
-
const
|
|
9916
|
-
|
|
9915
|
+
const h = a(u.host);
|
|
9916
|
+
h.isIPV6 === !0 ? p = `[${h.escapedHost}]` : p = g.host;
|
|
9917
9917
|
}
|
|
9918
|
-
f.push(
|
|
9918
|
+
f.push(p);
|
|
9919
9919
|
}
|
|
9920
9920
|
return (typeof g.port == "number" || typeof g.port == "string") && (f.push(":"), f.push(String(g.port))), f.length ? f.join("") : void 0;
|
|
9921
9921
|
}
|
|
@@ -9940,45 +9940,45 @@ function Em() {
|
|
|
9940
9940
|
return u.host || (u.error = u.error || "HTTP URIs must have a host."), u;
|
|
9941
9941
|
}
|
|
9942
9942
|
function s(u) {
|
|
9943
|
-
const
|
|
9944
|
-
return (u.port === (
|
|
9943
|
+
const h = String(u.scheme).toLowerCase() === "https";
|
|
9944
|
+
return (u.port === (h ? 443 : 80) || u.port === "") && (u.port = void 0), u.path || (u.path = "/"), u;
|
|
9945
9945
|
}
|
|
9946
9946
|
function a(u) {
|
|
9947
9947
|
return u.secure = r(u), u.resourceName = (u.path || "/") + (u.query ? "?" + u.query : ""), u.path = void 0, u.query = void 0, u;
|
|
9948
9948
|
}
|
|
9949
9949
|
function o(u) {
|
|
9950
9950
|
if ((u.port === (r(u) ? 443 : 80) || u.port === "") && (u.port = void 0), typeof u.secure == "boolean" && (u.scheme = u.secure ? "wss" : "ws", u.secure = void 0), u.resourceName) {
|
|
9951
|
-
const [
|
|
9952
|
-
u.path =
|
|
9951
|
+
const [h, w] = u.resourceName.split("?");
|
|
9952
|
+
u.path = h && h !== "/" ? h : void 0, u.query = w, u.resourceName = void 0;
|
|
9953
9953
|
}
|
|
9954
9954
|
return u.fragment = void 0, u;
|
|
9955
9955
|
}
|
|
9956
|
-
function i(u,
|
|
9956
|
+
function i(u, h) {
|
|
9957
9957
|
if (!u.path)
|
|
9958
9958
|
return u.error = "URN can not be parsed", u;
|
|
9959
9959
|
const w = u.path.match(t);
|
|
9960
9960
|
if (w) {
|
|
9961
|
-
const _ =
|
|
9961
|
+
const _ = h.scheme || u.scheme || "urn";
|
|
9962
9962
|
u.nid = w[1].toLowerCase(), u.nss = w[2];
|
|
9963
|
-
const E = `${_}:${
|
|
9964
|
-
u.path = void 0, R && (u = R.parse(u,
|
|
9963
|
+
const E = `${_}:${h.nid || u.nid}`, R = p[E];
|
|
9964
|
+
u.path = void 0, R && (u = R.parse(u, h));
|
|
9965
9965
|
} else
|
|
9966
9966
|
u.error = u.error || "URN can not be parsed.";
|
|
9967
9967
|
return u;
|
|
9968
9968
|
}
|
|
9969
|
-
function c(u,
|
|
9970
|
-
const w =
|
|
9971
|
-
R && (u = R.serialize(u,
|
|
9969
|
+
function c(u, h) {
|
|
9970
|
+
const w = h.scheme || u.scheme || "urn", _ = u.nid.toLowerCase(), E = `${w}:${h.nid || _}`, R = p[E];
|
|
9971
|
+
R && (u = R.serialize(u, h));
|
|
9972
9972
|
const P = u, L = u.nss;
|
|
9973
|
-
return P.path = `${_ ||
|
|
9973
|
+
return P.path = `${_ || h.nid}:${L}`, h.skipEscape = !0, P;
|
|
9974
9974
|
}
|
|
9975
|
-
function l(u,
|
|
9975
|
+
function l(u, h) {
|
|
9976
9976
|
const w = u;
|
|
9977
|
-
return w.uuid = w.nss, w.nss = void 0, !
|
|
9977
|
+
return w.uuid = w.nss, w.nss = void 0, !h.tolerant && (!w.uuid || !e.test(w.uuid)) && (w.error = w.error || "UUID is not valid."), w;
|
|
9978
9978
|
}
|
|
9979
9979
|
function d(u) {
|
|
9980
|
-
const
|
|
9981
|
-
return
|
|
9980
|
+
const h = u;
|
|
9981
|
+
return h.nss = (u.uuid || "").toLowerCase(), h;
|
|
9982
9982
|
}
|
|
9983
9983
|
const m = {
|
|
9984
9984
|
scheme: "http",
|
|
@@ -10000,7 +10000,7 @@ function Em() {
|
|
|
10000
10000
|
domainHost: S.domainHost,
|
|
10001
10001
|
parse: S.parse,
|
|
10002
10002
|
serialize: S.serialize
|
|
10003
|
-
},
|
|
10003
|
+
}, p = {
|
|
10004
10004
|
http: m,
|
|
10005
10005
|
https: y,
|
|
10006
10006
|
ws: S,
|
|
@@ -10018,28 +10018,28 @@ function Em() {
|
|
|
10018
10018
|
skipNormalize: !0
|
|
10019
10019
|
}
|
|
10020
10020
|
};
|
|
10021
|
-
return vn =
|
|
10021
|
+
return vn = p, vn;
|
|
10022
10022
|
}
|
|
10023
10023
|
var ba;
|
|
10024
10024
|
function _m() {
|
|
10025
10025
|
if (ba) return bt.exports;
|
|
10026
10026
|
ba = 1;
|
|
10027
10027
|
const { normalizeIPv6: e, normalizeIPv4: t, removeDotSegments: r, recomposeAuthority: n, normalizeComponentEncoding: s } = wm(), a = Em();
|
|
10028
|
-
function o(f,
|
|
10029
|
-
return typeof f == "string" ? f = d(v(f,
|
|
10028
|
+
function o(f, p) {
|
|
10029
|
+
return typeof f == "string" ? f = d(v(f, p), p) : typeof f == "object" && (f = v(d(f, p), p)), f;
|
|
10030
10030
|
}
|
|
10031
|
-
function i(f,
|
|
10032
|
-
const
|
|
10033
|
-
return d(w, { ...
|
|
10031
|
+
function i(f, p, u) {
|
|
10032
|
+
const h = Object.assign({ scheme: "null" }, u), w = c(v(f, h), v(p, h), h, !0);
|
|
10033
|
+
return d(w, { ...h, skipEscape: !0 });
|
|
10034
10034
|
}
|
|
10035
|
-
function c(f,
|
|
10035
|
+
function c(f, p, u, h) {
|
|
10036
10036
|
const w = {};
|
|
10037
|
-
return
|
|
10037
|
+
return h || (f = v(d(f, u), u), p = v(d(p, u), u)), u = u || {}, !u.tolerant && p.scheme ? (w.scheme = p.scheme, w.userinfo = p.userinfo, w.host = p.host, w.port = p.port, w.path = r(p.path || ""), w.query = p.query) : (p.userinfo !== void 0 || p.host !== void 0 || p.port !== void 0 ? (w.userinfo = p.userinfo, w.host = p.host, w.port = p.port, w.path = r(p.path || ""), w.query = p.query) : (p.path ? (p.path.charAt(0) === "/" ? w.path = r(p.path) : ((f.userinfo !== void 0 || f.host !== void 0 || f.port !== void 0) && !f.path ? w.path = "/" + p.path : f.path ? w.path = f.path.slice(0, f.path.lastIndexOf("/") + 1) + p.path : w.path = p.path, w.path = r(w.path)), w.query = p.query) : (w.path = f.path, p.query !== void 0 ? w.query = p.query : w.query = f.query), w.userinfo = f.userinfo, w.host = f.host, w.port = f.port), w.scheme = f.scheme), w.fragment = p.fragment, w;
|
|
10038
10038
|
}
|
|
10039
|
-
function l(f,
|
|
10040
|
-
return typeof f == "string" ? (f = unescape(f), f = d(s(v(f, u), !0), { ...u, skipEscape: !0 })) : typeof f == "object" && (f = d(s(f, !0), { ...u, skipEscape: !0 })), typeof
|
|
10039
|
+
function l(f, p, u) {
|
|
10040
|
+
return typeof f == "string" ? (f = unescape(f), f = d(s(v(f, u), !0), { ...u, skipEscape: !0 })) : typeof f == "object" && (f = d(s(f, !0), { ...u, skipEscape: !0 })), typeof p == "string" ? (p = unescape(p), p = d(s(v(p, u), !0), { ...u, skipEscape: !0 })) : typeof p == "object" && (p = d(s(p, !0), { ...u, skipEscape: !0 })), f.toLowerCase() === p.toLowerCase();
|
|
10041
10041
|
}
|
|
10042
|
-
function d(f,
|
|
10042
|
+
function d(f, p) {
|
|
10043
10043
|
const u = {
|
|
10044
10044
|
host: f.host,
|
|
10045
10045
|
scheme: f.scheme,
|
|
@@ -10055,26 +10055,26 @@ function _m() {
|
|
|
10055
10055
|
resourceName: f.resourceName,
|
|
10056
10056
|
secure: f.secure,
|
|
10057
10057
|
error: ""
|
|
10058
|
-
},
|
|
10059
|
-
_ && _.serialize && _.serialize(u,
|
|
10058
|
+
}, h = Object.assign({}, p), w = [], _ = a[(h.scheme || u.scheme || "").toLowerCase()];
|
|
10059
|
+
_ && _.serialize && _.serialize(u, h), u.path !== void 0 && (h.skipEscape ? u.path = unescape(u.path) : (u.path = escape(u.path), u.scheme !== void 0 && (u.path = u.path.split("%3A").join(":")))), h.reference !== "suffix" && u.scheme && w.push(u.scheme, ":");
|
|
10060
10060
|
const E = n(u);
|
|
10061
|
-
if (E !== void 0 && (
|
|
10061
|
+
if (E !== void 0 && (h.reference !== "suffix" && w.push("//"), w.push(E), u.path && u.path.charAt(0) !== "/" && w.push("/")), u.path !== void 0) {
|
|
10062
10062
|
let R = u.path;
|
|
10063
|
-
!
|
|
10063
|
+
!h.absolutePath && (!_ || !_.absolutePath) && (R = r(R)), E === void 0 && (R = R.replace(/^\/\//u, "/%2F")), w.push(R);
|
|
10064
10064
|
}
|
|
10065
10065
|
return u.query !== void 0 && w.push("?", u.query), u.fragment !== void 0 && w.push("#", u.fragment), w.join("");
|
|
10066
10066
|
}
|
|
10067
|
-
const m = Array.from({ length: 127 }, (f,
|
|
10067
|
+
const m = Array.from({ length: 127 }, (f, p) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(p)));
|
|
10068
10068
|
function y(f) {
|
|
10069
|
-
let
|
|
10070
|
-
for (let u = 0,
|
|
10071
|
-
if (
|
|
10069
|
+
let p = 0;
|
|
10070
|
+
for (let u = 0, h = f.length; u < h; ++u)
|
|
10071
|
+
if (p = f.charCodeAt(u), p > 126 || m[p])
|
|
10072
10072
|
return !0;
|
|
10073
10073
|
return !1;
|
|
10074
10074
|
}
|
|
10075
10075
|
const S = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
10076
|
-
function v(f,
|
|
10077
|
-
const u = Object.assign({},
|
|
10076
|
+
function v(f, p) {
|
|
10077
|
+
const u = Object.assign({}, p), h = {
|
|
10078
10078
|
scheme: void 0,
|
|
10079
10079
|
userinfo: void 0,
|
|
10080
10080
|
host: "",
|
|
@@ -10087,26 +10087,26 @@ function _m() {
|
|
|
10087
10087
|
u.reference === "suffix" && (f = (u.scheme ? u.scheme + ":" : "") + "//" + f);
|
|
10088
10088
|
const E = f.match(S);
|
|
10089
10089
|
if (E) {
|
|
10090
|
-
if (
|
|
10091
|
-
const P = t(
|
|
10090
|
+
if (h.scheme = E[1], h.userinfo = E[3], h.host = E[4], h.port = parseInt(E[5], 10), h.path = E[6] || "", h.query = E[7], h.fragment = E[8], isNaN(h.port) && (h.port = E[5]), h.host) {
|
|
10091
|
+
const P = t(h.host);
|
|
10092
10092
|
if (P.isIPV4 === !1) {
|
|
10093
10093
|
const L = e(P.host);
|
|
10094
|
-
|
|
10094
|
+
h.host = L.host.toLowerCase(), _ = L.isIPV6;
|
|
10095
10095
|
} else
|
|
10096
|
-
|
|
10096
|
+
h.host = P.host, _ = !0;
|
|
10097
10097
|
}
|
|
10098
|
-
|
|
10099
|
-
const R = a[(u.scheme ||
|
|
10100
|
-
if (!u.unicodeSupport && (!R || !R.unicodeSupport) &&
|
|
10098
|
+
h.scheme === void 0 && h.userinfo === void 0 && h.host === void 0 && h.port === void 0 && h.query === void 0 && !h.path ? h.reference = "same-document" : h.scheme === void 0 ? h.reference = "relative" : h.fragment === void 0 ? h.reference = "absolute" : h.reference = "uri", u.reference && u.reference !== "suffix" && u.reference !== h.reference && (h.error = h.error || "URI is not a " + u.reference + " reference.");
|
|
10099
|
+
const R = a[(u.scheme || h.scheme || "").toLowerCase()];
|
|
10100
|
+
if (!u.unicodeSupport && (!R || !R.unicodeSupport) && h.host && (u.domainHost || R && R.domainHost) && _ === !1 && y(h.host))
|
|
10101
10101
|
try {
|
|
10102
|
-
|
|
10102
|
+
h.host = URL.domainToASCII(h.host.toLowerCase());
|
|
10103
10103
|
} catch (P) {
|
|
10104
|
-
|
|
10104
|
+
h.error = h.error || "Host's domain name can not be converted to ASCII: " + P;
|
|
10105
10105
|
}
|
|
10106
|
-
(!R || R && !R.skipNormalize) && (w &&
|
|
10106
|
+
(!R || R && !R.skipNormalize) && (w && h.scheme !== void 0 && (h.scheme = unescape(h.scheme)), w && h.host !== void 0 && (h.host = unescape(h.host)), h.path && (h.path = escape(unescape(h.path))), h.fragment && (h.fragment = encodeURI(decodeURIComponent(h.fragment)))), R && R.parse && R.parse(h, u);
|
|
10107
10107
|
} else
|
|
10108
|
-
|
|
10109
|
-
return
|
|
10108
|
+
h.error = h.error || "URI can not be parsed.";
|
|
10109
|
+
return h;
|
|
10110
10110
|
}
|
|
10111
10111
|
const g = {
|
|
10112
10112
|
SCHEMES: a,
|
|
@@ -10180,24 +10180,24 @@ function Rm() {
|
|
|
10180
10180
|
cache: "Map is used as cache, schema object as key.",
|
|
10181
10181
|
serialize: "Map is used as cache, schema object as key.",
|
|
10182
10182
|
ajvErrors: "It is default now."
|
|
10183
|
-
},
|
|
10183
|
+
}, p = {
|
|
10184
10184
|
ignoreKeywordsWithRef: "",
|
|
10185
10185
|
jsPropertySyntax: "",
|
|
10186
10186
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
10187
10187
|
}, u = 200;
|
|
10188
|
-
function
|
|
10189
|
-
var O, C, N, b, T, I, F, B, se, ee, A, $, k, x, H, X,
|
|
10190
|
-
const
|
|
10188
|
+
function h(M) {
|
|
10189
|
+
var O, C, N, b, T, I, F, B, se, ee, A, $, k, x, H, X, he, Ne, Ee, _e, me, Je, Ae, Gr, Kr;
|
|
10190
|
+
const ht = M.strict, Yr = (O = M.code) === null || O === void 0 ? void 0 : O.optimize, Yn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Jn = (N = (C = M.code) === null || C === void 0 ? void 0 : C.regExp) !== null && N !== void 0 ? N : S, bi = (b = M.uriResolver) !== null && b !== void 0 ? b : y.default;
|
|
10191
10191
|
return {
|
|
10192
|
-
strictSchema: (I = (T = M.strictSchema) !== null && T !== void 0 ? T :
|
|
10193
|
-
strictNumbers: (B = (F = M.strictNumbers) !== null && F !== void 0 ? F :
|
|
10194
|
-
strictTypes: (ee = (se = M.strictTypes) !== null && se !== void 0 ? se :
|
|
10195
|
-
strictTuples: ($ = (A = M.strictTuples) !== null && A !== void 0 ? A :
|
|
10196
|
-
strictRequired: (x = (k = M.strictRequired) !== null && k !== void 0 ? k :
|
|
10192
|
+
strictSchema: (I = (T = M.strictSchema) !== null && T !== void 0 ? T : ht) !== null && I !== void 0 ? I : !0,
|
|
10193
|
+
strictNumbers: (B = (F = M.strictNumbers) !== null && F !== void 0 ? F : ht) !== null && B !== void 0 ? B : !0,
|
|
10194
|
+
strictTypes: (ee = (se = M.strictTypes) !== null && se !== void 0 ? se : ht) !== null && ee !== void 0 ? ee : "log",
|
|
10195
|
+
strictTuples: ($ = (A = M.strictTuples) !== null && A !== void 0 ? A : ht) !== null && $ !== void 0 ? $ : "log",
|
|
10196
|
+
strictRequired: (x = (k = M.strictRequired) !== null && k !== void 0 ? k : ht) !== null && x !== void 0 ? x : !1,
|
|
10197
10197
|
code: M.code ? { ...M.code, optimize: Yn, regExp: Jn } : { optimize: Yn, regExp: Jn },
|
|
10198
10198
|
loopRequired: (H = M.loopRequired) !== null && H !== void 0 ? H : u,
|
|
10199
10199
|
loopEnum: (X = M.loopEnum) !== null && X !== void 0 ? X : u,
|
|
10200
|
-
meta: (
|
|
10200
|
+
meta: (he = M.meta) !== null && he !== void 0 ? he : !0,
|
|
10201
10201
|
messages: (Ne = M.messages) !== null && Ne !== void 0 ? Ne : !0,
|
|
10202
10202
|
inlineRefs: (Ee = M.inlineRefs) !== null && Ee !== void 0 ? Ee : !0,
|
|
10203
10203
|
schemaId: (_e = M.schemaId) !== null && _e !== void 0 ? _e : "$id",
|
|
@@ -10211,11 +10211,11 @@ function Rm() {
|
|
|
10211
10211
|
}
|
|
10212
10212
|
class w {
|
|
10213
10213
|
constructor(O = {}) {
|
|
10214
|
-
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), O = this.opts = { ...O, ...
|
|
10214
|
+
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), O = this.opts = { ...O, ...h(O) };
|
|
10215
10215
|
const { es5: C, lines: N } = this.opts.code;
|
|
10216
10216
|
this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: C, lines: N }), this.logger = U(O.logger);
|
|
10217
10217
|
const b = O.validateFormats;
|
|
10218
|
-
O.validateFormats = !1, this.RULES = (0, a.getRules)(), _.call(this, f, O, "NOT SUPPORTED"), _.call(this,
|
|
10218
|
+
O.validateFormats = !1, this.RULES = (0, a.getRules)(), _.call(this, f, O, "NOT SUPPORTED"), _.call(this, p, O, "DEPRECATED", "warn"), this._metaOpts = q.call(this), O.formats && P.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), O.keywords && L.call(this, O.keywords), typeof O.meta == "object" && this.addMetaSchema(O.meta), R.call(this), O.validateFormats = b;
|
|
10219
10219
|
}
|
|
10220
10220
|
_addVocabularies() {
|
|
10221
10221
|
this.addKeyword("$async");
|
|
@@ -10378,7 +10378,7 @@ function Rm() {
|
|
|
10378
10378
|
throw new Error("invalid addKeywords parameters");
|
|
10379
10379
|
if (W.call(this, N, C), !C)
|
|
10380
10380
|
return (0, d.eachItem)(N, (T) => re.call(this, T)), this;
|
|
10381
|
-
|
|
10381
|
+
pe.call(this, C);
|
|
10382
10382
|
const b = {
|
|
10383
10383
|
...C,
|
|
10384
10384
|
type: (0, l.getJSONTypes)(C.type),
|
|
@@ -10557,7 +10557,7 @@ function Rm() {
|
|
|
10557
10557
|
const N = M.rules.findIndex((b) => b.keyword === C);
|
|
10558
10558
|
N >= 0 ? M.rules.splice(N, 0, O) : (M.rules.push(O), this.logger.warn(`rule ${C} is not defined`));
|
|
10559
10559
|
}
|
|
10560
|
-
function
|
|
10560
|
+
function pe(M) {
|
|
10561
10561
|
let { metaSchema: O } = M;
|
|
10562
10562
|
O !== void 0 && (M.$data && this.opts.$data && (O = ce(O)), M.validateSchema = this.compile(O, !0));
|
|
10563
10563
|
}
|
|
@@ -10589,15 +10589,15 @@ function Am() {
|
|
|
10589
10589
|
keyword: "$ref",
|
|
10590
10590
|
schemaType: "string",
|
|
10591
10591
|
code(l) {
|
|
10592
|
-
const { gen: d, schema: m, it: y } = l, { baseId: S, schemaEnv: v, validateName: g, opts: f, self:
|
|
10592
|
+
const { gen: d, schema: m, it: y } = l, { baseId: S, schemaEnv: v, validateName: g, opts: f, self: p } = y, { root: u } = v;
|
|
10593
10593
|
if ((m === "#" || m === "#/") && S === u.baseId)
|
|
10594
10594
|
return w();
|
|
10595
|
-
const
|
|
10596
|
-
if (
|
|
10595
|
+
const h = s.resolveRef.call(p, u, S, m);
|
|
10596
|
+
if (h === void 0)
|
|
10597
10597
|
throw new e.default(y.opts.uriResolver, S, m);
|
|
10598
|
-
if (
|
|
10599
|
-
return _(
|
|
10600
|
-
return E(
|
|
10598
|
+
if (h instanceof s.SchemaEnv)
|
|
10599
|
+
return _(h);
|
|
10600
|
+
return E(h);
|
|
10601
10601
|
function w() {
|
|
10602
10602
|
if (v === u)
|
|
10603
10603
|
return c(l, g, v, v.$async);
|
|
@@ -10626,9 +10626,9 @@ function Am() {
|
|
|
10626
10626
|
}
|
|
10627
10627
|
Ue.getValidate = i;
|
|
10628
10628
|
function c(l, d, m, y) {
|
|
10629
|
-
const { gen: S, it: v } = l, { allErrors: g, schemaEnv: f, opts:
|
|
10630
|
-
y ?
|
|
10631
|
-
function
|
|
10629
|
+
const { gen: S, it: v } = l, { allErrors: g, schemaEnv: f, opts: p } = v, u = p.passContext ? n.default.this : r.nil;
|
|
10630
|
+
y ? h() : w();
|
|
10631
|
+
function h() {
|
|
10632
10632
|
if (!f.$async)
|
|
10633
10633
|
throw new Error("async schema referenced by sync schema");
|
|
10634
10634
|
const R = S.let("valid");
|
|
@@ -10827,9 +10827,9 @@ function km() {
|
|
|
10827
10827
|
return;
|
|
10828
10828
|
const S = i.length >= y.loopRequired;
|
|
10829
10829
|
if (m.allErrors ? v() : g(), y.strictRequired) {
|
|
10830
|
-
const u = a.parentSchema.properties, { definedProperties:
|
|
10830
|
+
const u = a.parentSchema.properties, { definedProperties: h } = a.it;
|
|
10831
10831
|
for (const w of i)
|
|
10832
|
-
if (u?.[w] === void 0 && !
|
|
10832
|
+
if (u?.[w] === void 0 && !h.has(w)) {
|
|
10833
10833
|
const _ = m.schemaEnv.baseId + m.errSchemaPath, E = `required property "${w}" is not defined at "${_}" (strictRequired)`;
|
|
10834
10834
|
(0, r.checkStrictMode)(m, E, m.opts.strictRequired);
|
|
10835
10835
|
}
|
|
@@ -10844,8 +10844,8 @@ function km() {
|
|
|
10844
10844
|
function g() {
|
|
10845
10845
|
const u = o.let("missing");
|
|
10846
10846
|
if (S || d) {
|
|
10847
|
-
const
|
|
10848
|
-
a.block$data(
|
|
10847
|
+
const h = o.let("valid", !0);
|
|
10848
|
+
a.block$data(h, () => p(u, h)), a.ok(h);
|
|
10849
10849
|
} else
|
|
10850
10850
|
o.if((0, e.checkMissingProp)(a, i, u)), (0, e.reportMissingProp)(a, u), o.else();
|
|
10851
10851
|
}
|
|
@@ -10854,9 +10854,9 @@ function km() {
|
|
|
10854
10854
|
a.setParams({ missingProperty: u }), o.if((0, e.noPropertyInData)(o, l, u, y.ownProperties), () => a.error());
|
|
10855
10855
|
});
|
|
10856
10856
|
}
|
|
10857
|
-
function
|
|
10857
|
+
function p(u, h) {
|
|
10858
10858
|
a.setParams({ missingProperty: u }), o.forOf(u, c, () => {
|
|
10859
|
-
o.assign(
|
|
10859
|
+
o.assign(h, (0, e.propertyInData)(o, l, u, y.ownProperties)), o.if((0, t.not)(h), () => {
|
|
10860
10860
|
a.error(), o.break();
|
|
10861
10861
|
});
|
|
10862
10862
|
}, t.nil);
|
|
@@ -10916,9 +10916,9 @@ function Mm() {
|
|
|
10916
10916
|
o.block$data(v, f, (0, t._)`${y} === false`), o.ok(v);
|
|
10917
10917
|
function f() {
|
|
10918
10918
|
const w = i.let("i", (0, t._)`${c}.length`), _ = i.let("j");
|
|
10919
|
-
o.setParams({ i: w, j: _ }), i.assign(v, !0), i.if((0, t._)`${w} > 1`, () => (
|
|
10919
|
+
o.setParams({ i: w, j: _ }), i.assign(v, !0), i.if((0, t._)`${w} > 1`, () => (p() ? u : h)(w, _));
|
|
10920
10920
|
}
|
|
10921
|
-
function
|
|
10921
|
+
function p() {
|
|
10922
10922
|
return g.length > 0 && !g.some((w) => w === "object" || w === "array");
|
|
10923
10923
|
}
|
|
10924
10924
|
function u(w, _) {
|
|
@@ -10929,7 +10929,7 @@ function Mm() {
|
|
|
10929
10929
|
}).code((0, t._)`${P}[${E}] = ${w}`);
|
|
10930
10930
|
});
|
|
10931
10931
|
}
|
|
10932
|
-
function
|
|
10932
|
+
function h(w, _) {
|
|
10933
10933
|
const E = (0, r.useFunc)(i, n.default), R = i.name("outer");
|
|
10934
10934
|
i.label(R).for((0, t._)`;${w}--;`, () => i.for((0, t._)`${_} = ${w}; ${_}--;`, () => i.if((0, t._)`${E}(${c}[${w}], ${c}[${_}])`, () => {
|
|
10935
10935
|
o.error(), i.assign(v, !1).break(R);
|
|
@@ -10983,15 +10983,15 @@ function jm() {
|
|
|
10983
10983
|
if (!Array.isArray(l))
|
|
10984
10984
|
throw new Error("ajv implementation error");
|
|
10985
10985
|
const u = o.const("vSchema", d);
|
|
10986
|
-
g = (0, e.or)(...l.map((
|
|
10986
|
+
g = (0, e.or)(...l.map((h, w) => p(u, w)));
|
|
10987
10987
|
}
|
|
10988
10988
|
a.pass(g);
|
|
10989
10989
|
function f() {
|
|
10990
10990
|
o.assign(g, !1), o.forOf("v", d, (u) => o.if((0, e._)`${v()}(${i}, ${u})`, () => o.assign(g, !0).break()));
|
|
10991
10991
|
}
|
|
10992
|
-
function
|
|
10993
|
-
const w = l[
|
|
10994
|
-
return typeof w == "object" && w !== null ? (0, e._)`${v()}(${i}, ${u}[${
|
|
10992
|
+
function p(u, h) {
|
|
10993
|
+
const w = l[h];
|
|
10994
|
+
return typeof w == "object" && w !== null ? (0, e._)`${v()}(${i}, ${u}[${h}])` : (0, e._)`${i} === ${w}`;
|
|
10995
10995
|
}
|
|
10996
10996
|
}
|
|
10997
10997
|
};
|
|
@@ -11063,7 +11063,7 @@ function fi() {
|
|
|
11063
11063
|
return nt.validateAdditionalItems = s, nt.default = n, nt;
|
|
11064
11064
|
}
|
|
11065
11065
|
var sr = {}, st = {}, qa;
|
|
11066
|
-
function
|
|
11066
|
+
function pi() {
|
|
11067
11067
|
if (qa) return st;
|
|
11068
11068
|
qa = 1, Object.defineProperty(st, "__esModule", { value: !0 }), st.validateTuple = void 0;
|
|
11069
11069
|
const e = Q(), t = te(), r = Ce(), n = {
|
|
@@ -11082,18 +11082,18 @@ function hi() {
|
|
|
11082
11082
|
const { gen: c, parentSchema: l, data: d, keyword: m, it: y } = a;
|
|
11083
11083
|
g(l), y.opts.unevaluated && i.length && y.items !== !0 && (y.items = t.mergeEvaluated.items(c, i.length, y.items));
|
|
11084
11084
|
const S = c.name("valid"), v = c.const("len", (0, e._)`${d}.length`);
|
|
11085
|
-
i.forEach((f,
|
|
11086
|
-
(0, t.alwaysValidSchema)(y, f) || (c.if((0, e._)`${v} > ${
|
|
11085
|
+
i.forEach((f, p) => {
|
|
11086
|
+
(0, t.alwaysValidSchema)(y, f) || (c.if((0, e._)`${v} > ${p}`, () => a.subschema({
|
|
11087
11087
|
keyword: m,
|
|
11088
|
-
schemaProp:
|
|
11089
|
-
dataProp:
|
|
11088
|
+
schemaProp: p,
|
|
11089
|
+
dataProp: p
|
|
11090
11090
|
}, S)), a.ok(S));
|
|
11091
11091
|
});
|
|
11092
11092
|
function g(f) {
|
|
11093
|
-
const { opts:
|
|
11094
|
-
if (
|
|
11095
|
-
const _ = `"${m}" is ${
|
|
11096
|
-
(0, t.checkStrictMode)(y, _,
|
|
11093
|
+
const { opts: p, errSchemaPath: u } = y, h = i.length, w = h === f.minItems && (h === f.maxItems || f[o] === !1);
|
|
11094
|
+
if (p.strictTuples && !w) {
|
|
11095
|
+
const _ = `"${m}" is ${h}-tuple, but minItems or maxItems/${o} are not specified or different at path "${u}"`;
|
|
11096
|
+
(0, t.checkStrictMode)(y, _, p.strictTuples);
|
|
11097
11097
|
}
|
|
11098
11098
|
}
|
|
11099
11099
|
}
|
|
@@ -11103,7 +11103,7 @@ var Ua;
|
|
|
11103
11103
|
function Um() {
|
|
11104
11104
|
if (Ua) return sr;
|
|
11105
11105
|
Ua = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
|
|
11106
|
-
const e =
|
|
11106
|
+
const e = pi(), t = {
|
|
11107
11107
|
keyword: "prefixItems",
|
|
11108
11108
|
type: "array",
|
|
11109
11109
|
schemaType: ["array"],
|
|
@@ -11161,29 +11161,29 @@ function Vm() {
|
|
|
11161
11161
|
return;
|
|
11162
11162
|
}
|
|
11163
11163
|
if ((0, t.alwaysValidSchema)(l, o)) {
|
|
11164
|
-
let
|
|
11165
|
-
m !== void 0 && (
|
|
11164
|
+
let h = (0, e._)`${v} >= ${d}`;
|
|
11165
|
+
m !== void 0 && (h = (0, e._)`${h} && ${v} <= ${m}`), s.pass(h);
|
|
11166
11166
|
return;
|
|
11167
11167
|
}
|
|
11168
11168
|
l.items = !0;
|
|
11169
11169
|
const g = a.name("valid");
|
|
11170
|
-
m === void 0 && d === 1 ?
|
|
11170
|
+
m === void 0 && d === 1 ? p(g, () => a.if(g, () => a.break())) : d === 0 ? (a.let(g, !0), m !== void 0 && a.if((0, e._)`${c}.length > 0`, f)) : (a.let(g, !1), f()), s.result(g, () => s.reset());
|
|
11171
11171
|
function f() {
|
|
11172
|
-
const
|
|
11173
|
-
h
|
|
11172
|
+
const h = a.name("_valid"), w = a.let("count", 0);
|
|
11173
|
+
p(h, () => a.if(h, () => u(w)));
|
|
11174
11174
|
}
|
|
11175
|
-
function h
|
|
11175
|
+
function p(h, w) {
|
|
11176
11176
|
a.forRange("i", 0, v, (_) => {
|
|
11177
11177
|
s.subschema({
|
|
11178
11178
|
keyword: "contains",
|
|
11179
11179
|
dataProp: _,
|
|
11180
11180
|
dataPropType: t.Type.Num,
|
|
11181
11181
|
compositeRule: !0
|
|
11182
|
-
},
|
|
11182
|
+
}, h), w();
|
|
11183
11183
|
});
|
|
11184
11184
|
}
|
|
11185
|
-
function u(
|
|
11186
|
-
a.code((0, e._)`${
|
|
11185
|
+
function u(h) {
|
|
11186
|
+
a.code((0, e._)`${h}++`), m === void 0 ? a.if((0, e._)`${h} >= ${d}`, () => a.assign(g, !0).break()) : (a.if((0, e._)`${h} > ${m}`, () => a.assign(g, !1).break()), d === 1 ? a.assign(g, !0) : a.if((0, e._)`${h} >= ${d}`, () => a.assign(g, !0)));
|
|
11187
11187
|
}
|
|
11188
11188
|
}
|
|
11189
11189
|
};
|
|
@@ -11240,8 +11240,8 @@ function Hm() {
|
|
|
11240
11240
|
depsCount: g.length,
|
|
11241
11241
|
deps: g.join(", ")
|
|
11242
11242
|
}), y.allErrors ? d.if(f, () => {
|
|
11243
|
-
for (const
|
|
11244
|
-
(0, n.checkReportMissingProp)(c,
|
|
11243
|
+
for (const p of g)
|
|
11244
|
+
(0, n.checkReportMissingProp)(c, p);
|
|
11245
11245
|
}) : (d.if((0, t._)`${f} && (${(0, n.checkMissingProp)(c, g, S)})`), (0, n.reportMissingProp)(c, S), d.else());
|
|
11246
11246
|
}
|
|
11247
11247
|
}
|
|
@@ -11295,7 +11295,7 @@ function Bm() {
|
|
|
11295
11295
|
return ir.default = n, ir;
|
|
11296
11296
|
}
|
|
11297
11297
|
var cr = {}, Wa;
|
|
11298
|
-
function
|
|
11298
|
+
function hi() {
|
|
11299
11299
|
if (Wa) return cr;
|
|
11300
11300
|
Wa = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
|
|
11301
11301
|
const e = Ce(), t = Q(), r = Ve(), n = te(), a = {
|
|
@@ -11316,8 +11316,8 @@ function pi() {
|
|
|
11316
11316
|
if (y.props = !0, v.removeAdditional !== "all" && (0, n.alwaysValidSchema)(y, c))
|
|
11317
11317
|
return;
|
|
11318
11318
|
const g = (0, e.allSchemaProperties)(l.properties), f = (0, e.allSchemaProperties)(l.patternProperties);
|
|
11319
|
-
|
|
11320
|
-
function
|
|
11319
|
+
p(), o.ok((0, t._)`${m} === ${r.default.errors}`);
|
|
11320
|
+
function p() {
|
|
11321
11321
|
i.forIn("key", d, (E) => {
|
|
11322
11322
|
!g.length && !f.length ? w(E) : i.if(u(E), () => w(E));
|
|
11323
11323
|
});
|
|
@@ -11330,12 +11330,12 @@ function pi() {
|
|
|
11330
11330
|
} else g.length ? R = (0, t.or)(...g.map((P) => (0, t._)`${E} === ${P}`)) : R = t.nil;
|
|
11331
11331
|
return f.length && (R = (0, t.or)(R, ...f.map((P) => (0, t._)`${(0, e.usePattern)(o, P)}.test(${E})`))), (0, t.not)(R);
|
|
11332
11332
|
}
|
|
11333
|
-
function
|
|
11333
|
+
function h(E) {
|
|
11334
11334
|
i.code((0, t._)`delete ${d}[${E}]`);
|
|
11335
11335
|
}
|
|
11336
11336
|
function w(E) {
|
|
11337
11337
|
if (v.removeAdditional === "all" || v.removeAdditional && c === !1) {
|
|
11338
|
-
|
|
11338
|
+
h(E);
|
|
11339
11339
|
return;
|
|
11340
11340
|
}
|
|
11341
11341
|
if (c === !1) {
|
|
@@ -11345,7 +11345,7 @@ function pi() {
|
|
|
11345
11345
|
if (typeof c == "object" && !(0, n.alwaysValidSchema)(y, c)) {
|
|
11346
11346
|
const R = i.name("valid");
|
|
11347
11347
|
v.removeAdditional === "failing" ? (_(E, R, !1), i.if((0, t.not)(R), () => {
|
|
11348
|
-
o.reset(),
|
|
11348
|
+
o.reset(), h(E);
|
|
11349
11349
|
})) : (_(E, R), S || i.if((0, t.not)(R), () => i.break()));
|
|
11350
11350
|
}
|
|
11351
11351
|
}
|
|
@@ -11369,7 +11369,7 @@ var ur = {}, za;
|
|
|
11369
11369
|
function Wm() {
|
|
11370
11370
|
if (za) return ur;
|
|
11371
11371
|
za = 1, Object.defineProperty(ur, "__esModule", { value: !0 });
|
|
11372
|
-
const e = Br(), t = Ce(), r = te(), n =
|
|
11372
|
+
const e = Br(), t = Ce(), r = te(), n = hi(), s = {
|
|
11373
11373
|
keyword: "properties",
|
|
11374
11374
|
type: "object",
|
|
11375
11375
|
schemaType: "object",
|
|
@@ -11415,16 +11415,16 @@ function zm() {
|
|
|
11415
11415
|
const v = m.strictSchema && !m.allowMatchingProperties && l.properties, g = o.name("valid");
|
|
11416
11416
|
d.props !== !0 && !(d.props instanceof t.Name) && (d.props = (0, n.evaluatedPropsToName)(o, d.props));
|
|
11417
11417
|
const { props: f } = d;
|
|
11418
|
-
|
|
11419
|
-
function
|
|
11418
|
+
p();
|
|
11419
|
+
function p() {
|
|
11420
11420
|
for (const w of y)
|
|
11421
|
-
v && u(w), d.allErrors ?
|
|
11421
|
+
v && u(w), d.allErrors ? h(w) : (o.var(g, !0), h(w), o.if(g));
|
|
11422
11422
|
}
|
|
11423
11423
|
function u(w) {
|
|
11424
11424
|
for (const _ in v)
|
|
11425
11425
|
new RegExp(w).test(_) && (0, r.checkStrictMode)(d, `property ${_} matches pattern ${w} (use allowMatchingProperties)`);
|
|
11426
11426
|
}
|
|
11427
|
-
function
|
|
11427
|
+
function h(w) {
|
|
11428
11428
|
o.forIn("key", c, (_) => {
|
|
11429
11429
|
o.if((0, t._)`${(0, e.usePattern)(a, w)}.test(${_})`, () => {
|
|
11430
11430
|
const E = S.includes(w);
|
|
@@ -11480,10 +11480,10 @@ function Km() {
|
|
|
11480
11480
|
};
|
|
11481
11481
|
return fr.default = t, fr;
|
|
11482
11482
|
}
|
|
11483
|
-
var
|
|
11483
|
+
var pr = {}, Ja;
|
|
11484
11484
|
function Ym() {
|
|
11485
|
-
if (Ja) return
|
|
11486
|
-
Ja = 1, Object.defineProperty(
|
|
11485
|
+
if (Ja) return pr;
|
|
11486
|
+
Ja = 1, Object.defineProperty(pr, "__esModule", { value: !0 });
|
|
11487
11487
|
const e = Q(), t = te(), n = {
|
|
11488
11488
|
keyword: "oneOf",
|
|
11489
11489
|
schemaType: "array",
|
|
@@ -11514,12 +11514,12 @@ function Ym() {
|
|
|
11514
11514
|
}
|
|
11515
11515
|
}
|
|
11516
11516
|
};
|
|
11517
|
-
return
|
|
11517
|
+
return pr.default = n, pr;
|
|
11518
11518
|
}
|
|
11519
|
-
var
|
|
11519
|
+
var hr = {}, Xa;
|
|
11520
11520
|
function Jm() {
|
|
11521
|
-
if (Xa) return
|
|
11522
|
-
Xa = 1, Object.defineProperty(
|
|
11521
|
+
if (Xa) return hr;
|
|
11522
|
+
Xa = 1, Object.defineProperty(hr, "__esModule", { value: !0 });
|
|
11523
11523
|
const e = te(), t = {
|
|
11524
11524
|
keyword: "allOf",
|
|
11525
11525
|
schemaType: "array",
|
|
@@ -11536,7 +11536,7 @@ function Jm() {
|
|
|
11536
11536
|
});
|
|
11537
11537
|
}
|
|
11538
11538
|
};
|
|
11539
|
-
return
|
|
11539
|
+
return hr.default = t, hr;
|
|
11540
11540
|
}
|
|
11541
11541
|
var mr = {}, Qa;
|
|
11542
11542
|
function Xm() {
|
|
@@ -11573,8 +11573,8 @@ function Xm() {
|
|
|
11573
11573
|
}
|
|
11574
11574
|
function v(g, f) {
|
|
11575
11575
|
return () => {
|
|
11576
|
-
const
|
|
11577
|
-
o.assign(m, y), a.mergeValidEvaluated(
|
|
11576
|
+
const p = a.subschema({ keyword: g }, y);
|
|
11577
|
+
o.assign(m, y), a.mergeValidEvaluated(p, m), f ? o.assign(f, (0, e._)`${g}`) : a.setParams({ ifClause: g });
|
|
11578
11578
|
};
|
|
11579
11579
|
}
|
|
11580
11580
|
}
|
|
@@ -11602,8 +11602,8 @@ var eo;
|
|
|
11602
11602
|
function Zm() {
|
|
11603
11603
|
if (eo) return nr;
|
|
11604
11604
|
eo = 1, Object.defineProperty(nr, "__esModule", { value: !0 });
|
|
11605
|
-
const e = fi(), t = Um(), r =
|
|
11606
|
-
function f(
|
|
11605
|
+
const e = fi(), t = Um(), r = pi(), n = Fm(), s = Vm(), a = Hm(), o = Bm(), i = hi(), c = Wm(), l = zm(), d = Gm(), m = Km(), y = Ym(), S = Jm(), v = Xm(), g = Qm();
|
|
11606
|
+
function f(p = !1) {
|
|
11607
11607
|
const u = [
|
|
11608
11608
|
// any
|
|
11609
11609
|
d.default,
|
|
@@ -11619,7 +11619,7 @@ function Zm() {
|
|
|
11619
11619
|
c.default,
|
|
11620
11620
|
l.default
|
|
11621
11621
|
];
|
|
11622
|
-
return
|
|
11622
|
+
return p ? u.push(t.default, n.default) : u.push(e.default, r.default), u.push(s.default), u;
|
|
11623
11623
|
}
|
|
11624
11624
|
return nr.default = f, nr;
|
|
11625
11625
|
}
|
|
@@ -11642,28 +11642,28 @@ function eg() {
|
|
|
11642
11642
|
return;
|
|
11643
11643
|
i ? g() : f();
|
|
11644
11644
|
function g() {
|
|
11645
|
-
const
|
|
11645
|
+
const p = a.scopeValue("formats", {
|
|
11646
11646
|
ref: v.formats,
|
|
11647
11647
|
code: m.code.formats
|
|
11648
|
-
}), u = a.const("fDef", (0, e._)`${
|
|
11649
|
-
a.if((0, e._)`typeof ${u} == "object" && !(${u} instanceof RegExp)`, () => a.assign(
|
|
11648
|
+
}), u = a.const("fDef", (0, e._)`${p}[${l}]`), h = a.let("fType"), w = a.let("format");
|
|
11649
|
+
a.if((0, e._)`typeof ${u} == "object" && !(${u} instanceof RegExp)`, () => a.assign(h, (0, e._)`${u}.type || "string"`).assign(w, (0, e._)`${u}.validate`), () => a.assign(h, (0, e._)`"string"`).assign(w, u)), n.fail$data((0, e.or)(_(), E()));
|
|
11650
11650
|
function _() {
|
|
11651
11651
|
return m.strictSchema === !1 ? e.nil : (0, e._)`${l} && !${w}`;
|
|
11652
11652
|
}
|
|
11653
11653
|
function E() {
|
|
11654
11654
|
const R = S.$async ? (0, e._)`(${u}.async ? await ${w}(${o}) : ${w}(${o}))` : (0, e._)`${w}(${o})`, P = (0, e._)`(typeof ${w} == "function" ? ${R} : ${w}.test(${o}))`;
|
|
11655
|
-
return (0, e._)`${w} && ${w} !== true && ${
|
|
11655
|
+
return (0, e._)`${w} && ${w} !== true && ${h} === ${s} && !${P}`;
|
|
11656
11656
|
}
|
|
11657
11657
|
}
|
|
11658
11658
|
function f() {
|
|
11659
|
-
const
|
|
11660
|
-
if (!
|
|
11659
|
+
const p = v.formats[c];
|
|
11660
|
+
if (!p) {
|
|
11661
11661
|
_();
|
|
11662
11662
|
return;
|
|
11663
11663
|
}
|
|
11664
|
-
if (
|
|
11664
|
+
if (p === !0)
|
|
11665
11665
|
return;
|
|
11666
|
-
const [u,
|
|
11666
|
+
const [u, h, w] = E(p);
|
|
11667
11667
|
u === s && n.pass(R());
|
|
11668
11668
|
function _() {
|
|
11669
11669
|
if (m.strictSchema === !1) {
|
|
@@ -11680,12 +11680,12 @@ function eg() {
|
|
|
11680
11680
|
return typeof P == "object" && !(P instanceof RegExp) ? [P.type || "string", P.validate, (0, e._)`${q}.validate`] : ["string", P, q];
|
|
11681
11681
|
}
|
|
11682
11682
|
function R() {
|
|
11683
|
-
if (typeof
|
|
11683
|
+
if (typeof p == "object" && !(p instanceof RegExp) && p.async) {
|
|
11684
11684
|
if (!S.$async)
|
|
11685
11685
|
throw new Error("async format in sync schema");
|
|
11686
11686
|
return (0, e._)`await ${w}(${o})`;
|
|
11687
11687
|
}
|
|
11688
|
-
return typeof
|
|
11688
|
+
return typeof h == "function" ? (0, e._)`${w}(${o})` : (0, e._)`${w}.test(${o})`;
|
|
11689
11689
|
}
|
|
11690
11690
|
}
|
|
11691
11691
|
}
|
|
@@ -11762,9 +11762,9 @@ function ag() {
|
|
|
11762
11762
|
if (!S)
|
|
11763
11763
|
throw new Error("discriminator: requires oneOf keyword");
|
|
11764
11764
|
const g = c.let("valid", !1), f = c.const("tag", (0, e._)`${l}${(0, e.getProperty)(v)}`);
|
|
11765
|
-
c.if((0, e._)`typeof ${f} == "string"`, () =>
|
|
11766
|
-
function
|
|
11767
|
-
const w =
|
|
11765
|
+
c.if((0, e._)`typeof ${f} == "string"`, () => p(), () => i.error(!1, { discrError: t.DiscrError.Tag, tag: f, tagName: v })), i.ok(g);
|
|
11766
|
+
function p() {
|
|
11767
|
+
const w = h();
|
|
11768
11768
|
c.if(!1);
|
|
11769
11769
|
for (const _ in w)
|
|
11770
11770
|
c.elseIf((0, e._)`${f} === ${_}`), c.assign(g, u(w[_]));
|
|
@@ -11774,7 +11774,7 @@ function ag() {
|
|
|
11774
11774
|
const _ = c.name("valid"), E = i.subschema({ keyword: "oneOf", schemaProp: w }, _);
|
|
11775
11775
|
return i.mergeEvaluated(E, e.Name), _;
|
|
11776
11776
|
}
|
|
11777
|
-
function
|
|
11777
|
+
function h() {
|
|
11778
11778
|
var w;
|
|
11779
11779
|
const _ = {}, E = P(m);
|
|
11780
11780
|
let R = !0;
|
|
@@ -11825,7 +11825,7 @@ const og = "http://json-schema.org/draft-07/schema#", ig = "http://json-schema.o
|
|
|
11825
11825
|
default: !0
|
|
11826
11826
|
};
|
|
11827
11827
|
var io;
|
|
11828
|
-
function
|
|
11828
|
+
function pg() {
|
|
11829
11829
|
return io || (io = 1, (function(e, t) {
|
|
11830
11830
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv = void 0;
|
|
11831
11831
|
const r = Rm(), n = ng(), s = ag(), a = fg, o = ["/properties"], i = "http://json-schema.org/draft-07/schema";
|
|
@@ -11872,8 +11872,8 @@ function hg() {
|
|
|
11872
11872
|
} });
|
|
11873
11873
|
})(Mt, Mt.exports)), Mt.exports;
|
|
11874
11874
|
}
|
|
11875
|
-
var
|
|
11876
|
-
const mg = /* @__PURE__ */ om(
|
|
11875
|
+
var hg = pg();
|
|
11876
|
+
const mg = /* @__PURE__ */ om(hg), Kn = "/bahmni_config/openmrs/apps/clinical/v2", gg = "/bahmni_config/openmrs/apps/registration/v2", yg = Kn + "/app.json", vg = gg + "/app.json", bg = Kn + "/medication.json", wg = (e) => `${Kn}/dashboards/${e}`, co = {
|
|
11877
11877
|
CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
|
|
11878
11878
|
VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED",
|
|
11879
11879
|
SCHEMA_VALIDATION_FAILED: "CONFIG_ERROR_SCHEMA_VALIDATION_FAILED"
|
|
@@ -11917,7 +11917,7 @@ const mg = /* @__PURE__ */ om(pg), Kn = "/bahmni_config/openmrs/apps/clinical/v2
|
|
|
11917
11917
|
);
|
|
11918
11918
|
return t && t.sections && t.sections.length > 0 && (t.sections = t.sections.map((r) => r.id ? r : {
|
|
11919
11919
|
...r,
|
|
11920
|
-
id:
|
|
11920
|
+
id: lp()
|
|
11921
11921
|
})), t;
|
|
11922
11922
|
}, Fb = async () => zr(
|
|
11923
11923
|
bg,
|
|
@@ -11992,8 +11992,8 @@ async function Gb(e, t = !1) {
|
|
|
11992
11992
|
iy(e, t)
|
|
11993
11993
|
);
|
|
11994
11994
|
}
|
|
11995
|
-
const Kb = (e, t) => e?.length === 0 ? !1 : t?.length === 0, dy = ye + "/Encounter", fy = Z + "/systemsetting/bahmni.encountersession.duration",
|
|
11996
|
-
async function
|
|
11995
|
+
const Kb = (e, t) => e?.length === 0 ? !1 : t?.length === 0, dy = ye + "/Encounter", fy = Z + "/systemsetting/bahmni.encountersession.duration", py = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
|
|
11996
|
+
async function hy(e) {
|
|
11997
11997
|
const t = new URLSearchParams();
|
|
11998
11998
|
Object.entries(e).forEach(([s, a]) => {
|
|
11999
11999
|
a && t.append(s, a);
|
|
@@ -12030,10 +12030,10 @@ async function Yb(e, t, r) {
|
|
|
12030
12030
|
patient: e,
|
|
12031
12031
|
_tag: "encounter",
|
|
12032
12032
|
_lastUpdated: a,
|
|
12033
|
-
type:
|
|
12033
|
+
type: py
|
|
12034
12034
|
};
|
|
12035
12035
|
t && (o.participant = t);
|
|
12036
|
-
const i = await
|
|
12036
|
+
const i = await hy(o);
|
|
12037
12037
|
return i.length === 0 ? null : await gy(i, e);
|
|
12038
12038
|
} catch {
|
|
12039
12039
|
return null;
|
|
@@ -12065,7 +12065,7 @@ const wn = /* @__PURE__ */ new Map(), vy = async (e) => {
|
|
|
12065
12065
|
if (!a)
|
|
12066
12066
|
return {
|
|
12067
12067
|
logged: !1,
|
|
12068
|
-
error: ie.t(
|
|
12068
|
+
error: ie.t(Bp.UNKNOWN_EVENT_TYPE, {
|
|
12069
12069
|
eventType: t
|
|
12070
12070
|
})
|
|
12071
12071
|
};
|
|
@@ -12075,8 +12075,8 @@ const wn = /* @__PURE__ */ new Map(), vy = async (e) => {
|
|
|
12075
12075
|
message: r ? `${a.message}~${JSON.stringify(r)}` : a.message,
|
|
12076
12076
|
module: n
|
|
12077
12077
|
};
|
|
12078
|
-
return await ft(
|
|
12079
|
-
}, Xb = () =>
|
|
12078
|
+
return await ft(Hp, o), { logged: !0 };
|
|
12079
|
+
}, Xb = () => Vp(async (t) => {
|
|
12080
12080
|
await wy(
|
|
12081
12081
|
t.patientUuid,
|
|
12082
12082
|
t.eventType,
|
|
@@ -12266,7 +12266,7 @@ function sw(e, t) {
|
|
|
12266
12266
|
), a.type = "multiselect";
|
|
12267
12267
|
} else {
|
|
12268
12268
|
let a = n.value;
|
|
12269
|
-
if (typeof n.value == "string" &&
|
|
12269
|
+
if (typeof n.value == "string" && Sh.test(n.value)) {
|
|
12270
12270
|
const i = new Date(n.value);
|
|
12271
12271
|
isNaN(i.getTime()) || (a = i);
|
|
12272
12272
|
}
|
|
@@ -12295,7 +12295,11 @@ function aw(e) {
|
|
|
12295
12295
|
formNamespace: typeof n.formNamespace == "string" ? n.formNamespace : "Bahmni",
|
|
12296
12296
|
formFieldPath: typeof n.formFieldPath == "string" ? n.formFieldPath : void 0
|
|
12297
12297
|
};
|
|
12298
|
-
|
|
12298
|
+
if (n.comment && typeof n.comment == "string" && (c.comment = n.comment), n.interpretation && typeof n.interpretation == "string" && (c.interpretation = n.interpretation), n.groupMembers && Array.isArray(n.groupMembers)) {
|
|
12299
|
+
const l = n.groupMembers.filter((d) => !(d.voided ?? (d.value && typeof d.value == "string" && d.value.endsWith("voided"))));
|
|
12300
|
+
c.groupMembers = l.map(t);
|
|
12301
|
+
}
|
|
12302
|
+
return c;
|
|
12299
12303
|
};
|
|
12300
12304
|
return (e?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(t);
|
|
12301
12305
|
}
|
|
@@ -12373,14 +12377,14 @@ function fw(e, t) {
|
|
|
12373
12377
|
}
|
|
12374
12378
|
return r;
|
|
12375
12379
|
}
|
|
12376
|
-
const In = "consultation:saved",
|
|
12380
|
+
const In = "consultation:saved", pw = (e) => {
|
|
12377
12381
|
setTimeout(() => {
|
|
12378
12382
|
const t = new CustomEvent(In, {
|
|
12379
12383
|
detail: e
|
|
12380
12384
|
});
|
|
12381
12385
|
window.dispatchEvent(t);
|
|
12382
12386
|
}, 0);
|
|
12383
|
-
},
|
|
12387
|
+
}, hw = (e, t = []) => {
|
|
12384
12388
|
const r = En(e);
|
|
12385
12389
|
_n(() => {
|
|
12386
12390
|
r.current = e;
|
|
@@ -12396,30 +12400,30 @@ const In = "consultation:saved", hw = (e) => {
|
|
|
12396
12400
|
};
|
|
12397
12401
|
export {
|
|
12398
12402
|
Dn as AUDIT_LOG_EVENT_DETAILS,
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
+
wh as AllergySeverity,
|
|
12404
|
+
bh as AllergyStatus,
|
|
12405
|
+
qp as AttributeFormat,
|
|
12406
|
+
Up as AttributeInputType,
|
|
12403
12407
|
Xy as BAHMNI_HOME_PATH,
|
|
12404
12408
|
mb as CONCEPT_DATATYPE_COMPLEX,
|
|
12405
|
-
|
|
12409
|
+
hb as CONCEPT_DATATYPE_NUMERIC,
|
|
12406
12410
|
In as CONSULTATION_SAVED_EVENT,
|
|
12407
|
-
|
|
12408
|
-
|
|
12411
|
+
Sh as DATETIME_REGEX_PATTERN,
|
|
12412
|
+
op as DATE_FORMAT,
|
|
12409
12413
|
sv as DATE_PICKER_INPUT_FORMAT,
|
|
12410
12414
|
vb as DATE_REGEX_PATTERN,
|
|
12411
|
-
|
|
12415
|
+
ip as DATE_TIME_FORMAT,
|
|
12412
12416
|
ob as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
|
|
12413
12417
|
lb as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
|
|
12414
|
-
|
|
12418
|
+
pb as FHIR_OBSERVATION_COMPLEX_DATA_URL,
|
|
12415
12419
|
fb as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
|
|
12416
12420
|
db as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
|
|
12417
12421
|
gb as FHIR_OBSERVATION_STATUS_FINAL,
|
|
12418
12422
|
yb as FHIR_RESOURCE_TYPE_OBSERVATION,
|
|
12419
12423
|
tv as FULL_MONTH_DATE_FORMAT,
|
|
12420
12424
|
ub as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
|
|
12421
|
-
|
|
12422
|
-
|
|
12425
|
+
Eh as HL7_CONDITION_CATEGORY_CONDITION_CODE,
|
|
12426
|
+
_h as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
|
|
12423
12427
|
cb as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
|
|
12424
12428
|
ib as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
|
|
12425
12429
|
bb as INTERPRETATION_TO_CODE,
|
|
@@ -12435,18 +12439,18 @@ export {
|
|
|
12435
12439
|
Ib as PROCESSED_REPORT_STATUSES,
|
|
12436
12440
|
rv as REGISTRATION_DATE_FORMAT,
|
|
12437
12441
|
Hb as USER_PINNED_PREFERENCE_URL,
|
|
12438
|
-
|
|
12442
|
+
up as calculateAge,
|
|
12439
12443
|
dv as calculateAgeinYearsAndMonths,
|
|
12440
12444
|
iv as calculateOnsetDate,
|
|
12441
12445
|
Ev as camelToScreamingSnakeCase,
|
|
12442
|
-
|
|
12446
|
+
hv as capitalize,
|
|
12443
12447
|
Gv as checkIfActiveVisitExists,
|
|
12444
12448
|
ow as convertImmutableToPlainObject,
|
|
12445
12449
|
Iv as createPatient,
|
|
12446
12450
|
Kv as createVisitForPatient,
|
|
12447
12451
|
Jy as del,
|
|
12448
|
-
|
|
12449
|
-
|
|
12452
|
+
Fp as dispatchAuditEvent,
|
|
12453
|
+
pw as dispatchConsultationSaved,
|
|
12450
12454
|
fw as extractAttributes,
|
|
12451
12455
|
iw as extractNotesFromFormData,
|
|
12452
12456
|
nb as fetchAndFormatAllergenConcepts,
|
|
@@ -12461,12 +12465,12 @@ export {
|
|
|
12461
12465
|
cv as formatDateDistance,
|
|
12462
12466
|
av as formatDateTime,
|
|
12463
12467
|
bv as formatUrl,
|
|
12464
|
-
|
|
12468
|
+
lp as generateId,
|
|
12465
12469
|
z as get,
|
|
12466
12470
|
ly as getActiveVisit,
|
|
12467
|
-
|
|
12471
|
+
Yp as getActiveVisitByPatient,
|
|
12468
12472
|
Lv as getAddressHierarchyEntries,
|
|
12469
|
-
|
|
12473
|
+
yh as getAllergies,
|
|
12470
12474
|
Zv as getAppointmentById,
|
|
12471
12475
|
Mb as getCategoryUuidFromOrderTypes,
|
|
12472
12476
|
qb as getClinicalConfig,
|
|
@@ -12497,11 +12501,11 @@ export {
|
|
|
12497
12501
|
Bn as getOrderTypes,
|
|
12498
12502
|
Mv as getOrderedAddressHierarchyLevels,
|
|
12499
12503
|
Xv as getPastAppointments,
|
|
12500
|
-
|
|
12504
|
+
Ip as getPatientById,
|
|
12501
12505
|
Eb as getPatientDiagnoses,
|
|
12502
12506
|
rw as getPatientFormData,
|
|
12503
12507
|
Ov as getPatientImageAsDataUrl,
|
|
12504
|
-
|
|
12508
|
+
qh as getPatientMedicationBundle,
|
|
12505
12509
|
_b as getPatientMedications,
|
|
12506
12510
|
Wb as getPatientObservations,
|
|
12507
12511
|
sy as getPatientObservationsBundle,
|
|
@@ -12512,7 +12516,7 @@ export {
|
|
|
12512
12516
|
Ob as getPatientRadiologyInvestigationBundleWithImagingStudy,
|
|
12513
12517
|
Pb as getPatientRadiologyInvestigations,
|
|
12514
12518
|
qv as getPersonAttributeTypes,
|
|
12515
|
-
|
|
12519
|
+
jp as getPrimaryIdentifierType,
|
|
12516
12520
|
gv as getPriorityByOrder,
|
|
12517
12521
|
lw as getProgramByUUID,
|
|
12518
12522
|
Vb as getRegistrationConfig,
|
|
@@ -12539,16 +12543,16 @@ export {
|
|
|
12539
12543
|
wy as logAuditEvent,
|
|
12540
12544
|
Qy as normalizeTranslationKey,
|
|
12541
12545
|
an as notificationService,
|
|
12542
|
-
|
|
12546
|
+
dp as parseQueryParams,
|
|
12543
12547
|
Yy as patch,
|
|
12544
12548
|
ft as post,
|
|
12545
12549
|
Ky as put,
|
|
12546
|
-
|
|
12550
|
+
pv as refreshQueries,
|
|
12547
12551
|
Yv as searchAppointmentsByAttribute,
|
|
12548
12552
|
rb as searchConceptByName,
|
|
12549
12553
|
eb as searchConcepts,
|
|
12550
12554
|
Sr as searchFHIRConcepts,
|
|
12551
|
-
|
|
12555
|
+
dh as searchFHIRConceptsByName,
|
|
12552
12556
|
Rb as searchMedications,
|
|
12553
12557
|
$v as searchPatientByCustomAttribute,
|
|
12554
12558
|
Pv as searchPatientByNameOrId,
|
|
@@ -12560,6 +12564,6 @@ export {
|
|
|
12560
12564
|
Qv as updateAppointmentStatus,
|
|
12561
12565
|
Cv as updatePatient,
|
|
12562
12566
|
ev as useCamera,
|
|
12563
|
-
|
|
12567
|
+
hw as useSubscribeConsultationSaved,
|
|
12564
12568
|
yw as useTranslation
|
|
12565
12569
|
};
|