@bahmni/services 0.0.1-dev.69 → 0.0.1-dev.70

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
@@ -1,5 +1,5 @@
1
1
  import { initReactI18next as uo } from "react-i18next";
2
- import { useTranslation as ew } from "react-i18next";
2
+ import { useTranslation as rw } from "react-i18next";
3
3
  import { useRef as Un, useCallback as Yr, useEffect as lo } from "react";
4
4
  function Zs(e, t) {
5
5
  return function() {
@@ -9,11 +9,11 @@ function Zs(e, t) {
9
9
  const { toString: fo } = Object.prototype, { getPrototypeOf: On } = Object, { iterator: Cr, toStringTag: ei } = Symbol, Ir = /* @__PURE__ */ ((e) => (t) => {
10
10
  const r = fo.call(t);
11
11
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), Ne = (e) => (e = e.toLowerCase(), (t) => Ir(t) === e), kr = (e) => (t) => typeof t === e, { isArray: ft } = Array, ct = kr("undefined");
12
+ })(/* @__PURE__ */ Object.create(null)), De = (e) => (e = e.toLowerCase(), (t) => Ir(t) === e), kr = (e) => (t) => typeof t === e, { isArray: ft } = Array, ct = kr("undefined");
13
13
  function Pt(e) {
14
14
  return e !== null && !ct(e) && e.constructor !== null && !ct(e.constructor) && _e(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
16
- const ti = Ne("ArrayBuffer");
16
+ const ti = De("ArrayBuffer");
17
17
  function ho(e) {
18
18
  let t;
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ti(e.buffer), t;
@@ -31,11 +31,11 @@ const po = kr("string"), _e = kr("function"), ri = kr("number"), Tt = (e) => e !
31
31
  } catch {
32
32
  return !1;
33
33
  }
34
- }, yo = Ne("Date"), bo = Ne("File"), wo = Ne("Blob"), vo = Ne("FileList"), Eo = (e) => Tt(e) && _e(e.pipe), _o = (e) => {
34
+ }, yo = De("Date"), bo = De("File"), wo = De("Blob"), vo = De("FileList"), Eo = (e) => Tt(e) && _e(e.pipe), _o = (e) => {
35
35
  let t;
36
36
  return e && (typeof FormData == "function" && e instanceof FormData || _e(e.append) && ((t = Ir(e)) === "formdata" || // detect form-data instance
37
37
  t === "object" && _e(e.toString) && e.toString() === "[object FormData]"));
38
- }, So = Ne("URLSearchParams"), [$o, Ro, Po, To] = ["ReadableStream", "Request", "Response", "Headers"].map(Ne), Oo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
38
+ }, So = De("URLSearchParams"), [$o, Ro, Po, To] = ["ReadableStream", "Request", "Response", "Headers"].map(De), Oo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
39
39
  function Ot(e, t, { allOwnKeys: r = !1 } = {}) {
40
40
  if (e === null || typeof e > "u")
41
41
  return;
@@ -115,12 +115,12 @@ const Ao = (e, t, r, { allOwnKeys: n } = {}) => (Ot(t, (a, s) => {
115
115
  for (; (r = e.exec(t)) !== null; )
116
116
  n.push(r);
117
117
  return n;
118
- }, qo = Ne("HTMLFormElement"), jo = (e) => e.toLowerCase().replace(
118
+ }, qo = De("HTMLFormElement"), jo = (e) => e.toLowerCase().replace(
119
119
  /[-_\s]([a-z\d])(\w*)/g,
120
120
  function(r, n, a) {
121
121
  return n.toUpperCase() + a;
122
122
  }
123
- ), Fn = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Uo = Ne("RegExp"), si = (e, t) => {
123
+ ), Fn = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Uo = De("RegExp"), si = (e, t) => {
124
124
  const r = Object.getOwnPropertyDescriptors(e), n = {};
125
125
  Ot(r, (a, s) => {
126
126
  let i;
@@ -172,7 +172,7 @@ const Wo = (e) => {
172
172
  return n;
173
173
  };
174
174
  return r(e, 0);
175
- }, Go = Ne("AsyncFunction"), Ko = (e) => e && (Tt(e) || _e(e)) && _e(e.then) && _e(e.catch), ii = ((e, t) => e ? setImmediate : t ? ((r, n) => (We.addEventListener("message", ({ source: a, data: s }) => {
175
+ }, Go = De("AsyncFunction"), Ko = (e) => e && (Tt(e) || _e(e)) && _e(e.then) && _e(e.catch), ii = ((e, t) => e ? setImmediate : t ? ((r, n) => (We.addEventListener("message", ({ source: a, data: s }) => {
176
176
  a === We && s === r && n.length && n.shift()();
177
177
  }, !1), (a) => {
178
178
  n.push(a), We.postMessage(r, "*");
@@ -213,7 +213,7 @@ const Wo = (e) => {
213
213
  inherits: Do,
214
214
  toFlatObject: Co,
215
215
  kindOf: Ir,
216
- kindOfTest: Ne,
216
+ kindOfTest: De,
217
217
  endsWith: Io,
218
218
  toArray: ko,
219
219
  forEachEntry: Mo,
@@ -1735,22 +1735,22 @@ le.getAdapter = vi.getAdapter;
1735
1735
  le.HttpStatusCode = $n;
1736
1736
  le.default = le;
1737
1737
  const {
1738
- Axios: sy,
1739
- AxiosError: iy,
1740
- CanceledError: oy,
1741
- isCancel: cy,
1742
- CancelToken: uy,
1743
- VERSION: ly,
1744
- all: dy,
1745
- Cancel: fy,
1746
- isAxiosError: hy,
1747
- spread: py,
1748
- toFormData: my,
1749
- AxiosHeaders: gy,
1750
- HttpStatusCode: yy,
1751
- formToJSON: by,
1752
- getAdapter: wy,
1753
- mergeConfig: vy
1738
+ Axios: iy,
1739
+ AxiosError: oy,
1740
+ CanceledError: cy,
1741
+ isCancel: uy,
1742
+ CancelToken: ly,
1743
+ VERSION: dy,
1744
+ all: fy,
1745
+ Cancel: hy,
1746
+ isAxiosError: py,
1747
+ spread: my,
1748
+ toFormData: gy,
1749
+ AxiosHeaders: yy,
1750
+ HttpStatusCode: by,
1751
+ formToJSON: wy,
1752
+ getAdapter: vy,
1753
+ mergeConfig: Ey
1754
1754
  } = le, ut = (e) => {
1755
1755
  var n;
1756
1756
  let t = "Error", r = "An unexpected error occurred";
@@ -1946,7 +1946,7 @@ Ye.interceptors.response.use(
1946
1946
  return Promise.reject(`${t}: ${r}`);
1947
1947
  }
1948
1948
  );
1949
- const Q = async (e) => (await Ye.get(e)).data, pt = async (e, t) => (await Ye.post(e, t)).data, Ey = async (e, t) => (await Ye.put(e, t)).data, _y = async (e) => (await Ye.delete(e)).data, W = (e) => typeof e == "string", yt = () => {
1949
+ const X = async (e) => (await Ye.get(e)).data, pt = async (e, t) => (await Ye.post(e, t)).data, _y = async (e, t) => (await Ye.put(e, t)).data, Sy = async (e) => (await Ye.delete(e)).data, W = (e) => typeof e == "string", yt = () => {
1950
1950
  let e, t;
1951
1951
  const r = new Promise((n, a) => {
1952
1952
  e = n, t = a;
@@ -3648,9 +3648,9 @@ class Ai {
3648
3648
  }
3649
3649
  }
3650
3650
  Ai.type = "languageDetector";
3651
- const Du = process.env.PUBLIC_URL ?? "/", De = "/openmrs/ws/fhir2/R4", ie = "/openmrs/ws/rest/v1", Cu = "/openmrs/ws/rest/v2", Iu = "bahmni.user", Sy = "/bahmni/home/index.html", ku = ie + "/bahmnicore/whoami", Lu = ie + "/bahmniie/form/latestPublishedForms", $y = (e) => ie + `/user/${e}?v=full`, Mu = ie + "/bahmnicore/visitLocation/", xu = "en", Ni = "NG_TRANSLATE_LANG_KEY", qu = (e, t) => Du + `${e}/locales/locale_${t}.json`, ju = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(Ni) ?? xu, Ea = async (e) => {
3651
+ const Du = process.env.PUBLIC_URL ?? "/", Oe = "/openmrs/ws/fhir2/R4", ie = "/openmrs/ws/rest/v1", Cu = "/openmrs/ws/rest/v2", Iu = "bahmni.user", $y = "/bahmni/home/index.html", ku = ie + "/bahmnicore/whoami", Lu = ie + "/bahmniie/form/latestPublishedForms", Ry = (e) => ie + `/user/${e}?v=full`, Mu = ie + "/bahmnicore/visitLocation/", xu = "en", Ni = "NG_TRANSLATE_LANG_KEY", qu = (e, t) => Du + `${e}/locales/locale_${t}.json`, ju = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(Ni) ?? xu, Ea = async (e) => {
3652
3652
  try {
3653
- const t = await Q(e);
3653
+ const t = await X(e);
3654
3654
  return t || (console.error(`Invalid response from ${e}`), {});
3655
3655
  } catch (t) {
3656
3656
  return console.error(`Failed to load translations from ${e}:`, t), {};
@@ -3672,10 +3672,10 @@ const Du = process.env.PUBLIC_URL ?? "/", De = "/openmrs/ws/fhir2/R4", ie = "/op
3672
3672
  }, e !== "en" && (r.en = {
3673
3673
  [t]: await _a(t, "en")
3674
3674
  }), r;
3675
- }, Ry = (e, t) => {
3675
+ }, Py = (e, t) => {
3676
3676
  const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
3677
3677
  return `${r}_${n}`;
3678
- }, Py = async (e) => {
3678
+ }, Ty = async (e) => {
3679
3679
  const t = qr(), r = await Uu(t, e);
3680
3680
  return await se.use(Ai).use(uo).init({
3681
3681
  fallbackLng: "en",
@@ -3694,7 +3694,7 @@ const Du = process.env.PUBLIC_URL ?? "/", De = "/openmrs/ws/fhir2/R4", ie = "/op
3694
3694
  }
3695
3695
  }), se;
3696
3696
  };
3697
- function Ty() {
3697
+ function Oy() {
3698
3698
  const e = Un(null), t = Un(null), r = Yr(async () => {
3699
3699
  t.current && (t.current.getTracks().forEach((i) => i.stop()), t.current = null);
3700
3700
  const s = await navigator.mediaDevices.getUserMedia({
@@ -6429,7 +6429,7 @@ const Na = {
6429
6429
  weekStartsOn: 1,
6430
6430
  firstWeekContainsDate: 4
6431
6431
  }
6432
- }, Xf = "dd/MM/yyyy", Oy = "MMMM dd, yyyy", Ay = "do MMM, yyyy", Qf = "dd/MM/yyyy HH:mm", Ny = "yyyy-MM-dd", Dy = "d/m/Y", Pe = {
6432
+ }, Xf = "dd/MM/yyyy", Ay = "MMMM dd, yyyy", Ny = "do MMM, yyyy", Qf = "dd/MM/yyyy HH:mm", Dy = "yyyy-MM-dd", Cy = "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",
@@ -6509,13 +6509,13 @@ function Ji(e, t, r) {
6509
6509
  const a = Zf();
6510
6510
  return { formattedResult: Gl(n, t, { locale: a }) };
6511
6511
  }
6512
- function Cy(e, t) {
6512
+ function Iy(e, t) {
6513
6513
  return Ji(e, Qf, t);
6514
6514
  }
6515
6515
  function th(e, t, r = Xf) {
6516
6516
  return Ji(e, r, t);
6517
6517
  }
6518
- function Iy(e, t, r) {
6518
+ function ky(e, t, r) {
6519
6519
  if (!e || !Nt(e) || t === null || t === void 0 || !r || typeof t != "number")
6520
6520
  return;
6521
6521
  const n = new Date(e);
@@ -6530,7 +6530,7 @@ function Iy(e, t, r) {
6530
6530
  return;
6531
6531
  }
6532
6532
  }
6533
- function ky(e, t) {
6533
+ function Ly(e, t) {
6534
6534
  if (e == null)
6535
6535
  return {
6536
6536
  formattedResult: "",
@@ -6582,11 +6582,11 @@ function ky(e, t) {
6582
6582
  }
6583
6583
  return { formattedResult: c };
6584
6584
  }
6585
- const Ly = () => {
6585
+ const My = () => {
6586
6586
  const e = /* @__PURE__ */ new Date();
6587
6587
  return e.setHours(0, 0, 0, 0), e;
6588
6588
  };
6589
- function My(e, t) {
6589
+ function xy(e, t) {
6590
6590
  var l, d, m;
6591
6591
  const r = new Date(e), a = new Intl.DateTimeFormat("en-US", {
6592
6592
  day: "2-digit",
@@ -6603,11 +6603,11 @@ function My(e, t) {
6603
6603
  }
6604
6604
  return c;
6605
6605
  }
6606
- function xy(e) {
6606
+ function qy(e) {
6607
6607
  const t = new Date(e), r = /* @__PURE__ */ new Date(), n = In(r, t), a = Cn(r, t) - n * 12;
6608
6608
  return `${n} years ${a} months`;
6609
6609
  }
6610
- function qy(e, t, r = !1) {
6610
+ function jy(e, t, r = !1) {
6611
6611
  return !e || !Array.isArray(e) ? [] : e.sort((n, a) => {
6612
6612
  const s = new Date(n[t]), i = new Date(a[t]);
6613
6613
  if (isNaN(s.getTime()) && isNaN(i.getTime())) return 0;
@@ -6617,18 +6617,18 @@ function qy(e, t, r = !1) {
6617
6617
  return r ? o : -o;
6618
6618
  });
6619
6619
  }
6620
- const jy = (e, t) => {
6620
+ const Uy = (e, t) => {
6621
6621
  const r = /* @__PURE__ */ new Date(), n = new Date(r.getFullYear(), r.getMonth(), r.getDate()), a = new Date(e);
6622
6622
  return {
6623
6623
  today: () => Gu(a, n),
6624
6624
  past: () => Jl(a, n),
6625
6625
  future: () => Yl(a, n)
6626
6626
  }[t]();
6627
- }, Uy = async (e, t, r) => {
6627
+ }, Fy = async (e, t, r) => {
6628
6628
  const { exact: n = !0, refetchActiveNow: a = !0 } = r ?? {};
6629
6629
  await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), a && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
6630
6630
  }, rh = () => Math.random().toString(36).substring(2, 9);
6631
- function Fy(e, t = " -") {
6631
+ function Vy(e, t = " -") {
6632
6632
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
6633
6633
  }
6634
6634
  function Xi(e) {
@@ -6640,7 +6640,7 @@ function Xi(e) {
6640
6640
  }
6641
6641
  return "";
6642
6642
  }
6643
- const Vy = (e) => !e || e.trim().length === 0, Hy = (e, t) => {
6643
+ const Hy = (e) => !e || e.trim().length === 0, By = (e, t) => {
6644
6644
  if (!e || !t || t.length === 0)
6645
6645
  return 999;
6646
6646
  const r = t.findIndex(
@@ -6648,7 +6648,7 @@ const Vy = (e) => !e || e.trim().length === 0, Hy = (e, t) => {
6648
6648
  );
6649
6649
  return r === -1 ? 999 : r;
6650
6650
  };
6651
- function By(e, t) {
6651
+ function zy(e, t) {
6652
6652
  if (!e || e.length === 0)
6653
6653
  return [];
6654
6654
  const r = /* @__PURE__ */ new Map();
@@ -6660,7 +6660,7 @@ function By(e, t) {
6660
6660
  items: a
6661
6661
  }));
6662
6662
  }
6663
- function zy(e, t, r) {
6663
+ function Wy(e, t, r) {
6664
6664
  if (!e || e.length === 0)
6665
6665
  return [];
6666
6666
  const n = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
@@ -6681,7 +6681,7 @@ function nh(e) {
6681
6681
  s[n(i[1])] = n(i[2]);
6682
6682
  return s;
6683
6683
  }
6684
- function Wy(e, t, r) {
6684
+ function Gy(e, t, r) {
6685
6685
  const n = /{{([^}]*)}}/g, a = e.match(n);
6686
6686
  let s = e;
6687
6687
  const i = r ?? !1, o = i ? nh() : {};
@@ -6695,7 +6695,7 @@ const ah = (e) => new Promise((t, r) => {
6695
6695
  const n = new FileReader();
6696
6696
  n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
6697
6697
  }), sh = (e) => ie + `/user?username=${e}&v=custom:(username,uuid)`, ih = "bahmni.user.location";
6698
- async function Gy() {
6698
+ async function Ky() {
6699
6699
  const e = Xi(Iu);
6700
6700
  if (!e)
6701
6701
  return null;
@@ -6703,7 +6703,7 @@ async function Gy() {
6703
6703
  const t = decodeURIComponent(e).replace(
6704
6704
  /^"(.*)"$/,
6705
6705
  "$1"
6706
- ), r = await Q(sh(t));
6706
+ ), r = await X(sh(t));
6707
6707
  return !r.results || r.results.length === 0 ? null : r.results[0];
6708
6708
  } catch {
6709
6709
  throw new Error(se.t("ERROR_FETCHING_USER_DETAILS"));
@@ -6719,7 +6719,7 @@ const Qi = () => {
6719
6719
  if (!t.name || !t.uuid)
6720
6720
  throw new Error(se.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
6721
6721
  return t;
6722
- }, oh = (e) => De + `/Patient/${e}`, ch = (e, t) => ie + `/bahmni/search/patient/lucene?filterOnAllIdentifiers=false&identifier=${e}&q=${e}&loginLocationUuid=${t}&patientSearchResultsConfig=phoneNumber&patientSearchResultsConfig=alternatePhoneNumber&s=byIdOrName`, uh = (e, t, r, n, a) => {
6722
+ }, oh = (e) => Oe + `/Patient/${e}`, ch = (e, t) => ie + `/bahmni/search/patient/lucene?filterOnAllIdentifiers=false&identifier=${e}&q=${e}&loginLocationUuid=${t}&patientSearchResultsConfig=phoneNumber&patientSearchResultsConfig=alternatePhoneNumber&s=byIdOrName`, uh = (e, t, r, n, a) => {
6723
6723
  const s = e.trim(), i = new URLSearchParams({
6724
6724
  loginLocationUuid: a,
6725
6725
  startIndex: "0",
@@ -6753,12 +6753,12 @@ const Qi = () => {
6753
6753
  }, Zi = ie + "/idgen/identifiertype", lh = (e) => ie + `/bahmni/app/setting?module=${e}`, dh = "bahmni.primaryIdentifierType", fh = ie + "/bahmnicore/patientprofile", hh = (e) => ie + `/bahmnicore/patientprofile/${e}`, ph = (e) => ie + `/patientprofile/${e}?v=full`, mh = ie + "/visit", gh = (e) => ie + `/visit?includeInactive=false&patient=${e}&v=custom:(uuid,visitType,location:(uuid))`, yh = (e) => Mu + `${e}`, bh = (e, t, r = 20, n) => {
6754
6754
  let a = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
6755
6755
  return n && (a += `&parent=${n}`), a;
6756
- }, wh = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", vh = ie + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)", Eh = 20, _h = 2, Ky = 120, Yy = 50, Jy = 15, Sh = /^[a-f0-9-]{36}$/i, $h = () => ie + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Rh = (e) => Cu + `/patientImage?patientUuid=${e}`, Ph = ie + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Th = async (e) => {
6756
+ }, wh = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", vh = ie + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)", Eh = 20, _h = 2, Yy = 120, Jy = 50, Xy = 15, Sh = /^[a-f0-9-]{36}$/i, $h = () => ie + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Rh = (e) => Cu + `/patientImage?patientUuid=${e}`, Ph = ie + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", Th = async (e) => {
6757
6757
  if (!e || e.trim() === "")
6758
6758
  throw new Error("Invalid patient UUID: UUID cannot be empty");
6759
6759
  if (!Sh.test(e))
6760
6760
  throw new Error(`Invalid patient UUID format: ${e}`);
6761
- return Q(oh(e));
6761
+ return X(oh(e));
6762
6762
  }, Oh = (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) : []), Ah = (e) => {
6763
6763
  var a;
6764
6764
  if (!e.name || e.name.length === 0)
@@ -6791,22 +6791,22 @@ const Qi = () => {
6791
6791
  identifiers: a,
6792
6792
  age: s
6793
6793
  };
6794
- }, Xy = async (e) => {
6794
+ }, Qy = async (e) => {
6795
6795
  const t = await Th(e);
6796
6796
  return Ch(t);
6797
- }, Qy = async (e) => {
6797
+ }, Zy = async (e) => {
6798
6798
  const t = await fetch(Rh(e));
6799
6799
  if (!t.ok) return null;
6800
6800
  const r = await t.blob();
6801
6801
  return await ah(r);
6802
- }, Zy = async (e) => {
6802
+ }, eb = async (e) => {
6803
6803
  const t = Qi();
6804
- return await Q(
6804
+ return await X(
6805
6805
  ch(e, t.uuid)
6806
6806
  );
6807
- }, eb = async (e, t, r, n, a) => {
6807
+ }, tb = async (e, t, r, n, a) => {
6808
6808
  const s = Qi();
6809
- return await Q(
6809
+ return await X(
6810
6810
  uh(
6811
6811
  e,
6812
6812
  t,
@@ -6815,14 +6815,14 @@ const Qi = () => {
6815
6815
  s.uuid
6816
6816
  )
6817
6817
  );
6818
- }, tb = async () => Q(Zi), Ih = async () => {
6819
- const t = (await Q(lh("core"))).find(
6818
+ }, rb = async () => X(Zi), Ih = async () => {
6819
+ const t = (await X(lh("core"))).find(
6820
6820
  (r) => r.property === dh
6821
6821
  );
6822
6822
  return (t == null ? void 0 : t.value) ?? null;
6823
- }, rb = async () => {
6823
+ }, nb = async () => {
6824
6824
  const [e, t] = await Promise.all([
6825
- Q(Zi),
6825
+ X(Zi),
6826
6826
  Ih()
6827
6827
  ]), r = [], n = /* @__PURE__ */ new Map();
6828
6828
  if (!t)
@@ -6837,14 +6837,14 @@ const Qi = () => {
6837
6837
  sourcesByPrefix: n,
6838
6838
  primaryIdentifierTypeUuid: t
6839
6839
  }) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
6840
- }, nb = async (e) => pt(fh, e), ab = async (e, t) => pt(
6840
+ }, ab = async (e) => pt(fh, e), sb = async (e, t) => pt(
6841
6841
  hh(e),
6842
6842
  t
6843
- ), sb = async () => Q(Di("mrs.genders")), ib = async (e, t, r = Eh, n) => {
6843
+ ), ib = async () => X(Di("mrs.genders")), ob = async (e, t, r = Eh, n) => {
6844
6844
  if (!t || t.length < _h)
6845
6845
  return [];
6846
6846
  try {
6847
- return await Q(
6847
+ return await X(
6848
6848
  bh(e, t, r, n)
6849
6849
  );
6850
6850
  } catch (a) {
@@ -6852,9 +6852,9 @@ const Qi = () => {
6852
6852
  `Failed to fetch address hierarchy for field "${e}": ${a instanceof Error ? a.message : "Unknown error"}`
6853
6853
  );
6854
6854
  }
6855
- }, ob = async () => Q($h()), cb = async (e) => pt(mh, e), ub = async (e) => Q(gh(e)), lb = async (e) => Q(yh(e)), db = async () => Q(wh), fb = async (e) => Q(ph(e)), hb = async () => {
6855
+ }, cb = async () => X($h()), ub = async (e) => pt(mh, e), lb = async (e) => X(gh(e)), db = async (e) => X(yh(e)), fb = async () => X(wh), hb = async (e) => X(ph(e)), pb = async () => {
6856
6856
  try {
6857
- return (await Q(
6857
+ return (await X(
6858
6858
  vh
6859
6859
  )).results.map((t) => ({
6860
6860
  uuid: t.uuid,
@@ -6866,17 +6866,17 @@ const Qi = () => {
6866
6866
  `Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
6867
6867
  );
6868
6868
  }
6869
- }, pb = async () => Q(Ph);
6869
+ }, mb = async () => X(Ph);
6870
6870
  var kh = /* @__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))(kh || {}), Lh = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(Lh || {});
6871
- const mb = (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", gb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", yb = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", bb = (e) => e === "java.lang.Integer" || e === "java.lang.Float", wb = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", vb = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Mh = ie + "/appointments/search", eo = ie + "/appointments", Eb = async (e) => await pt(
6871
+ const gb = (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", yb = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", bb = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", wb = (e) => e === "java.lang.Integer" || e === "java.lang.Float", vb = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Eb = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Mh = ie + "/appointments/search", eo = ie + "/appointments", _b = async (e) => await pt(
6872
6872
  Mh,
6873
6873
  e
6874
- ), _b = async (e, t, r) => await pt(
6874
+ ), Sb = async (e, t, r) => await pt(
6875
6875
  `${eo}/${e}/status-change`,
6876
6876
  { toStatus: t, onDate: r }
6877
6877
  );
6878
- async function Sb(e) {
6879
- return await Q(`${eo}/${e}`);
6878
+ async function $b(e) {
6879
+ return await X(`${eo}/${e}`);
6880
6880
  }
6881
6881
  const xh = () => {
6882
6882
  let e = null;
@@ -6907,20 +6907,20 @@ const xh = () => {
6907
6907
  );
6908
6908
  }
6909
6909
  };
6910
- }, an = xh(), qh = (e) => De + `/ValueSet/${e}/$expand`, jh = (e) => De + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Uh = (e, t, r) => ie + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Fh = (e) => ie + `/concept/${e}`, $b = async (e, t = 20) => {
6910
+ }, an = xh(), qh = (e) => Oe + `/ValueSet/${e}/$expand`, jh = (e) => Oe + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Uh = (e, t, r) => ie + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Fh = (e) => ie + `/concept/${e}`, Rb = async (e, t = 20) => {
6911
6911
  const r = qr(), n = Uh(e, t, r);
6912
- return Q(n);
6912
+ return X(n);
6913
6913
  }, Er = async (e) => {
6914
6914
  const t = qh(e);
6915
- return Q(t);
6915
+ return X(t);
6916
6916
  }, Vh = async (e) => {
6917
6917
  const t = `${jh(e)}`;
6918
- return Q(t);
6918
+ return X(t);
6919
6919
  };
6920
- async function Rb(e) {
6921
- return await Q(Fh(e));
6920
+ async function Pb(e) {
6921
+ return await X(Fh(e));
6922
6922
  }
6923
- const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, nt = {
6923
+ const Hh = (e) => Oe + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, nt = {
6924
6924
  FOOD: {
6925
6925
  code: "162553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
6926
6926
  display: "food"
@@ -6943,7 +6943,7 @@ const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6943
6943
  var a;
6944
6944
  const r = ((a = e.expansion) == null ? void 0 : a.contains) ?? [];
6945
6945
  return zh(r).map((s) => Wh(s, t));
6946
- }, Pb = async (e, t, r) => {
6946
+ }, Tb = async (e, t, r) => {
6947
6947
  const n = e ?? nt.MEDICATION.code, a = t ?? nt.FOOD.code, s = r ?? nt.ENVIRONMENT.code, [i, o, c] = await Promise.all([
6948
6948
  Er(n),
6949
6949
  Er(a),
@@ -6963,13 +6963,13 @@ const Hh = (e) => De + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6963
6963
  nt.ENVIRONMENT.display
6964
6964
  )
6965
6965
  ];
6966
- }, Tb = async (e) => {
6966
+ }, Ob = async (e) => {
6967
6967
  var n, a;
6968
6968
  const t = e ?? Bh.code;
6969
6969
  return ((a = (n = (await Er(t)).compose) == null ? void 0 : n.include[0]) == null ? void 0 : a.concept) ?? [];
6970
6970
  };
6971
6971
  async function Gh(e) {
6972
- return await Q(`${Hh(e)}`);
6972
+ return await X(`${Hh(e)}`);
6973
6973
  }
6974
6974
  async function Kh(e) {
6975
6975
  var r;
@@ -7000,23 +7000,23 @@ function Yh(e) {
7000
7000
  };
7001
7001
  });
7002
7002
  }
7003
- async function Ob(e) {
7003
+ async function Ab(e) {
7004
7004
  const t = await Kh(e);
7005
7005
  return Yh(t);
7006
7006
  }
7007
7007
  var Jh = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(Jh || {}), Xh = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(Xh || {});
7008
- const Ab = "http://fhir.openmrs.org/code-system/encounter-type", Qh = "problem-list-item", Nb = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Zh = "encounter-diagnosis", Db = "http://terminology.hl7.org/CodeSystem/condition-clinical", Cb = "http://terminology.hl7.org/CodeSystem/condition-category", ep = (e) => De + `/Condition?category=${Qh}&patient=${e}&_count=100&_sort=-_lastUpdated`;
7008
+ const Nb = "http://fhir.openmrs.org/code-system/encounter-type", Qh = "problem-list-item", Db = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Zh = "encounter-diagnosis", Cb = "http://terminology.hl7.org/CodeSystem/condition-clinical", Ib = "http://terminology.hl7.org/CodeSystem/condition-category", ep = (e) => Oe + `/Condition?category=${Qh}&patient=${e}&_count=100&_sort=-_lastUpdated`;
7009
7009
  async function tp(e) {
7010
- return await Q(`${ep(e)}`);
7010
+ return await X(`${ep(e)}`);
7011
7011
  }
7012
- async function Ib(e) {
7012
+ async function kb(e) {
7013
7013
  var n;
7014
7014
  return ((n = (await tp(e)).entry) == null ? void 0 : n.filter((a) => {
7015
7015
  var s;
7016
7016
  return ((s = a.resource) == null ? void 0 : s.resourceType) === "Condition";
7017
7017
  }).map((a) => a.resource)) ?? [];
7018
7018
  }
7019
- const rp = (e) => De + `/Condition?category=${Zh}&patient=${e}&_count=100&_sort=-_lastUpdated`, on = [
7019
+ const rp = (e) => Oe + `/Condition?category=${Zh}&patient=${e}&_count=100&_sort=-_lastUpdated`, on = [
7020
7020
  {
7021
7021
  code: "confirmed",
7022
7022
  display: "CERTAINITY_CONFIRMED",
@@ -7030,7 +7030,7 @@ const rp = (e) => De + `/Condition?category=${Zh}&patient=${e}&_count=100&_sort=
7030
7030
  ], np = "confirmed", ap = "provisional";
7031
7031
  async function sp(e) {
7032
7032
  const t = rp(e);
7033
- return await Q(t);
7033
+ return await X(t);
7034
7034
  }
7035
7035
  const ip = (e) => {
7036
7036
  var r, n, a;
@@ -7062,12 +7062,12 @@ function cp(e) {
7062
7062
  };
7063
7063
  });
7064
7064
  }
7065
- async function kb(e) {
7065
+ async function Lb(e) {
7066
7066
  const t = await sp(e);
7067
7067
  return cp(t);
7068
7068
  }
7069
7069
  var qe = /* @__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))(qe || {});
7070
- const up = (e) => De + `/MedicationRequest?patient=${e}&_count=100&_sort=-_lastUpdated`, lp = (e) => {
7070
+ const up = (e) => Oe + `/MedicationRequest?patient=${e}&_count=100&_sort=-_lastUpdated`, lp = (e) => {
7071
7071
  switch (e.status) {
7072
7072
  case "active":
7073
7073
  return qe.Active;
@@ -7089,7 +7089,7 @@ const up = (e) => De + `/MedicationRequest?patient=${e}&_count=100&_sort=-_lastU
7089
7089
  };
7090
7090
  async function dp(e) {
7091
7091
  const t = up(e);
7092
- return await Q(t);
7092
+ return await X(t);
7093
7093
  }
7094
7094
  function fp(e) {
7095
7095
  var r, n, a;
@@ -7172,14 +7172,14 @@ const Ma = (e) => {
7172
7172
  var t, r, n, a;
7173
7173
  return e.priority === "stat" || ((a = (n = (r = (t = e.dosageInstruction) == null ? void 0 : t[0]) == null ? void 0 : r.timing) == null ? void 0 : n.code) == null ? void 0 : a.text) === "Immediately" || !1;
7174
7174
  };
7175
- async function Lb(e) {
7175
+ async function Mb(e) {
7176
7176
  const t = await dp(e);
7177
7177
  return wp(t);
7178
7178
  }
7179
- const vp = "d3561dc0-5e07-11ef-8f7c-0242ac120002", Ep = (e) => De + `/ServiceRequest?category=${vp}&patient=${e}&_count=100&_sort=-_lastUpdated&numberOfVisits=5`;
7179
+ const vp = "d3561dc0-5e07-11ef-8f7c-0242ac120002", Ep = (e) => Oe + `/ServiceRequest?category=${vp}&patient=${e}&_count=100&_sort=-_lastUpdated&numberOfVisits=5`;
7180
7180
  async function _p(e) {
7181
7181
  const t = Ep(e);
7182
- return await Q(t);
7182
+ return await X(t);
7183
7183
  }
7184
7184
  function Sp(e) {
7185
7185
  var r;
@@ -7196,11 +7196,11 @@ function Sp(e) {
7196
7196
  };
7197
7197
  });
7198
7198
  }
7199
- async function Mb(e) {
7199
+ async function xb(e) {
7200
7200
  const t = await _p(e);
7201
7201
  return Sp(t);
7202
7202
  }
7203
- const $p = "d3560b17-5e07-11ef-8f7c-0242ac120002", Rp = "http://fhir.bahmni.org/ext/lab-order-concept-type", Pp = (e) => De + `/ServiceRequest?category=${$p}&patient=${e}&numberOfVisits=5&_count=100&_sort=-_lastUpdated`;
7203
+ const $p = "d3560b17-5e07-11ef-8f7c-0242ac120002", Rp = "http://fhir.bahmni.org/ext/lab-order-concept-type", Pp = (e) => Oe + `/ServiceRequest?category=${$p}&patient=${e}&numberOfVisits=5&_count=100&_sort=-_lastUpdated`;
7204
7204
  var _r = /* @__PURE__ */ ((e) => (e.stat = "Urgent", e.routine = "Routine", e))(_r || {});
7205
7205
  const Tp = (e) => {
7206
7206
  switch (e.priority) {
@@ -7231,7 +7231,7 @@ function Op(e) {
7231
7231
  });
7232
7232
  }
7233
7233
  async function Ap(e) {
7234
- const t = await Q(
7234
+ const t = await X(
7235
7235
  `${Pp(e)}`
7236
7236
  ), r = Op(t);
7237
7237
  return {
@@ -7267,7 +7267,7 @@ function Dp(e, t) {
7267
7267
  };
7268
7268
  });
7269
7269
  }
7270
- function xb(e) {
7270
+ function qb(e) {
7271
7271
  const t = /* @__PURE__ */ new Map();
7272
7272
  return e.forEach((r) => {
7273
7273
  var a;
@@ -7281,12 +7281,12 @@ function xb(e) {
7281
7281
  (r, n) => new Date(n.rawDate).getTime() - new Date(r.rawDate).getTime()
7282
7282
  );
7283
7283
  }
7284
- async function qb(e, t) {
7284
+ async function jb(e, t) {
7285
7285
  var a;
7286
7286
  const n = ((a = (await Ap(e)).entry) == null ? void 0 : a.map((s) => s.resource).filter((s) => s !== void 0)) ?? [];
7287
7287
  return Dp(n, t);
7288
7288
  }
7289
- const Cp = "All Orderables", Ip = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", kp = "LabSet", Lp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Mp = async () => await Vh(Cp), xp = async () => await Q(Ip), qp = (e) => {
7289
+ const Cp = "All Orderables", Ip = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", kp = "LabSet", Lp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Mp = async () => await Vh(Cp), xp = async () => await X(Ip), qp = (e) => {
7290
7290
  let t = e.display ?? "Unknown investigation";
7291
7291
  return to(e) === kp && (t += ` (${se.t("INVESTIGATION_PANEL")})`), t;
7292
7292
  }, jp = (e) => {
@@ -7322,7 +7322,7 @@ const Cp = "All Orderables", Ip = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,
7322
7322
  });
7323
7323
  });
7324
7324
  }), r;
7325
- }, jb = async () => {
7325
+ }, Ub = async () => {
7326
7326
  const e = await Mp(), t = await xp();
7327
7327
  return Up(e, jp(t));
7328
7328
  };
@@ -7576,7 +7576,7 @@ function ja() {
7576
7576
  })(fn)), fn;
7577
7577
  }
7578
7578
  var Ua;
7579
- function X() {
7579
+ function Q() {
7580
7580
  return Ua || (Ua = 1, (function(e) {
7581
7581
  Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
7582
7582
  const t = Nr(), r = ja();
@@ -8141,7 +8141,7 @@ var Y = {}, Fa;
8141
8141
  function te() {
8142
8142
  if (Fa) return Y;
8143
8143
  Fa = 1, Object.defineProperty(Y, "__esModule", { value: !0 }), Y.checkStrictMode = Y.getErrorPath = Y.Type = Y.useFunc = Y.setEvaluated = Y.evaluatedPropsToName = Y.mergeEvaluated = Y.eachItem = Y.unescapeJsonPointer = Y.escapeJsonPointer = Y.escapeFragment = Y.unescapeFragment = Y.schemaRefOrVal = Y.schemaHasRulesButRef = Y.schemaHasRules = Y.checkUnknownRules = Y.alwaysValidSchema = Y.toHash = void 0;
8144
- const e = X(), t = Nr();
8144
+ const e = Q(), t = Nr();
8145
8145
  function r(_) {
8146
8146
  const E = {};
8147
8147
  for (const $ of _)
@@ -8282,7 +8282,7 @@ var Lt = {}, Va;
8282
8282
  function Fe() {
8283
8283
  if (Va) return Lt;
8284
8284
  Va = 1, Object.defineProperty(Lt, "__esModule", { value: !0 });
8285
- const e = X(), t = {
8285
+ const e = Q(), t = {
8286
8286
  // validation function arguments
8287
8287
  data: new e.Name("data"),
8288
8288
  // data passed to validation function
@@ -8317,7 +8317,7 @@ var Ha;
8317
8317
  function Fr() {
8318
8318
  return Ha || (Ha = 1, (function(e) {
8319
8319
  Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
8320
- const t = X(), r = te(), n = Fe();
8320
+ const t = Q(), r = te(), n = Fe();
8321
8321
  e.keywordError = {
8322
8322
  message: ({ keyword: f }) => (0, t.str)`must pass "${f}" keyword validation`
8323
8323
  }, e.keyword$DataError = {
@@ -8393,7 +8393,7 @@ var Ba;
8393
8393
  function Vp() {
8394
8394
  if (Ba) return Ve;
8395
8395
  Ba = 1, Object.defineProperty(Ve, "__esModule", { value: !0 }), Ve.boolOrEmptySchema = Ve.topBoolOrEmptySchema = void 0;
8396
- const e = Fr(), t = X(), r = Fe(), n = {
8396
+ const e = Fr(), t = Q(), r = Fe(), n = {
8397
8397
  message: "boolean schema is false"
8398
8398
  };
8399
8399
  function a(o) {
@@ -8470,7 +8470,7 @@ var Ga;
8470
8470
  function Dr() {
8471
8471
  if (Ga) return ge;
8472
8472
  Ga = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.reportTypeError = ge.checkDataTypes = ge.checkDataType = ge.coerceAndCheckDataType = ge.getJSONTypes = ge.getSchemaTypes = ge.DataType = void 0;
8473
- const e = ro(), t = no(), r = Fr(), n = X(), a = te();
8473
+ const e = ro(), t = no(), r = Fr(), n = Q(), a = te();
8474
8474
  var s;
8475
8475
  (function(u) {
8476
8476
  u[u.Correct = 0] = "Correct", u[u.Wrong = 1] = "Wrong";
@@ -8618,7 +8618,7 @@ var wt = {}, Ka;
8618
8618
  function Hp() {
8619
8619
  if (Ka) return wt;
8620
8620
  Ka = 1, Object.defineProperty(wt, "__esModule", { value: !0 }), wt.assignDefaults = void 0;
8621
- const e = X(), t = te();
8621
+ const e = Q(), t = te();
8622
8622
  function r(a, s) {
8623
8623
  const { properties: i, items: o } = a.schema;
8624
8624
  if (s === "object" && i)
@@ -8641,11 +8641,11 @@ function Hp() {
8641
8641
  }
8642
8642
  return wt;
8643
8643
  }
8644
- var Ae = {}, ne = {}, Ya;
8644
+ var Ne = {}, ne = {}, Ya;
8645
8645
  function Ce() {
8646
8646
  if (Ya) return ne;
8647
8647
  Ya = 1, Object.defineProperty(ne, "__esModule", { value: !0 }), ne.validateUnion = ne.validateArray = ne.usePattern = ne.callValidateCode = ne.schemaProperties = ne.allSchemaProperties = ne.noPropertyInData = ne.propertyInData = ne.isOwnProperty = ne.hasPropFunc = ne.reportMissingProp = ne.checkMissingProp = ne.checkReportMissingProp = void 0;
8648
- const e = X(), t = te(), r = Fe(), n = te();
8648
+ const e = Q(), t = te(), r = Fe(), n = te();
8649
8649
  function a(u, h) {
8650
8650
  const { gen: w, data: _, it: E } = u;
8651
8651
  w.if(d(w, _, h, E.opts.ownProperties), () => {
@@ -8752,9 +8752,9 @@ function Ce() {
8752
8752
  }
8753
8753
  var Ja;
8754
8754
  function Bp() {
8755
- if (Ja) return Ae;
8756
- Ja = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.validateKeywordUsage = Ae.validSchemaType = Ae.funcKeywordCode = Ae.macroKeywordCode = void 0;
8757
- const e = X(), t = Fe(), r = Ce(), n = Fr();
8755
+ if (Ja) return Ne;
8756
+ Ja = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.validateKeywordUsage = Ne.validSchemaType = Ne.funcKeywordCode = Ne.macroKeywordCode = void 0;
8757
+ const e = Q(), t = Fe(), r = Ce(), n = Fr();
8758
8758
  function a(b, S) {
8759
8759
  const { gen: y, keyword: g, schema: f, parentSchema: p, it: u } = b, h = S.macro.call(u.self, f, p, u), w = l(y, g, h);
8760
8760
  u.opts.validateSchema !== !1 && u.self.validateSchema(h, !0);
@@ -8767,7 +8767,7 @@ function Bp() {
8767
8767
  compositeRule: !0
8768
8768
  }, _), b.pass(_, () => b.error(!0));
8769
8769
  }
8770
- Ae.macroKeywordCode = a;
8770
+ Ne.macroKeywordCode = a;
8771
8771
  function s(b, S) {
8772
8772
  var y;
8773
8773
  const { gen: g, keyword: f, schema: p, parentSchema: u, $data: h, it: w } = b;
@@ -8799,7 +8799,7 @@ function Bp() {
8799
8799
  g.if((0, e.not)((z = S.valid) !== null && z !== void 0 ? z : $), F);
8800
8800
  }
8801
8801
  }
8802
- Ae.funcKeywordCode = s;
8802
+ Ne.funcKeywordCode = s;
8803
8803
  function i(b) {
8804
8804
  const { gen: S, data: y, it: g } = b;
8805
8805
  S.if(g.parentData, () => S.assign(y, (0, e._)`${g.parentData}[${g.parentDataProperty}]`));
@@ -8822,7 +8822,7 @@ function Bp() {
8822
8822
  function d(b, S, y = !1) {
8823
8823
  return !S.length || S.some((g) => g === "array" ? Array.isArray(b) : g === "object" ? b && typeof b == "object" && !Array.isArray(b) : typeof b == g || y && typeof b > "u");
8824
8824
  }
8825
- Ae.validSchemaType = d;
8825
+ Ne.validSchemaType = d;
8826
8826
  function m({ schema: b, opts: S, self: y, errSchemaPath: g }, f, p) {
8827
8827
  if (Array.isArray(f.keyword) ? !f.keyword.includes(p) : f.keyword !== p)
8828
8828
  throw new Error("ajv implementation error");
@@ -8837,13 +8837,13 @@ function Bp() {
8837
8837
  throw new Error(w);
8838
8838
  }
8839
8839
  }
8840
- return Ae.validateKeywordUsage = m, Ae;
8840
+ return Ne.validateKeywordUsage = m, Ne;
8841
8841
  }
8842
8842
  var xe = {}, Xa;
8843
8843
  function zp() {
8844
8844
  if (Xa) return xe;
8845
8845
  Xa = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.extendSubschemaMode = xe.extendSubschemaData = xe.getSubschema = void 0;
8846
- const e = X(), t = te();
8846
+ const e = Q(), t = te();
8847
8847
  function r(s, { keyword: i, schemaProp: o, schema: c, schemaPath: l, errSchemaPath: d, topSchemaRef: m }) {
8848
8848
  if (i !== void 0 && c !== void 0)
8849
8849
  throw new Error('both "keyword" and "schema" passed, only one allowed');
@@ -9111,7 +9111,7 @@ var ts;
9111
9111
  function Hr() {
9112
9112
  if (ts) return Le;
9113
9113
  ts = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.getData = Le.KeywordCxt = Le.validateFunctionCode = void 0;
9114
- const e = Vp(), t = Dr(), r = no(), n = Dr(), a = Hp(), s = Bp(), i = zp(), o = X(), c = Fe(), l = Vr(), d = te(), m = Fr();
9114
+ const e = Vp(), t = Dr(), r = no(), n = Dr(), a = Hp(), s = Bp(), i = zp(), o = Q(), c = Fe(), l = Vr(), d = te(), m = Fr();
9115
9115
  function b(P) {
9116
9116
  if (_(P) && ($(P), w(P))) {
9117
9117
  f(P);
@@ -9203,8 +9203,8 @@ function Hr() {
9203
9203
  if (H.$comment === !0)
9204
9204
  P.code((0, o._)`${c.default.self}.logger.log(${J})`);
9205
9205
  else if (typeof H.$comment == "function") {
9206
- const pe = (0, o.str)`${x}/$comment`, Oe = P.scopeValue("root", { ref: N.root });
9207
- P.code((0, o._)`${c.default.self}.opts.$comment(${J}, ${pe}, ${Oe}.schema)`);
9206
+ const pe = (0, o.str)`${x}/$comment`, Ae = P.scopeValue("root", { ref: N.root });
9207
+ P.code((0, o._)`${c.default.self}.opts.$comment(${J}, ${pe}, ${Ae}.schema)`);
9208
9208
  }
9209
9209
  }
9210
9210
  function z(P) {
@@ -9215,7 +9215,7 @@ function Hr() {
9215
9215
  L instanceof o.Name && P.assign((0, o._)`${N}.props`, L), x instanceof o.Name && P.assign((0, o._)`${N}.items`, x);
9216
9216
  }
9217
9217
  function he(P, N, L, x) {
9218
- const { gen: H, schema: J, data: pe, allErrors: Oe, opts: ve, self: Ee } = P, { RULES: me } = Ee;
9218
+ const { gen: H, schema: J, data: pe, allErrors: Ae, opts: ve, self: Ee } = P, { RULES: me } = Ee;
9219
9219
  if (J.$ref && (ve.ignoreKeywordsWithRef || !(0, d.schemaHasRulesButRef)(J, me))) {
9220
9220
  H.block(() => V(P, "$ref", me.all.$ref.definition));
9221
9221
  return;
@@ -9226,7 +9226,7 @@ function Hr() {
9226
9226
  Xe(me.post);
9227
9227
  });
9228
9228
  function Xe(Re) {
9229
- (0, r.shouldUseGroup)(J, Re) && (Re.type ? (H.if((0, n.checkDataType)(Re.type, pe, ve.strictNumbers)), ue(P, Re), N.length === 1 && N[0] === Re.type && L && (H.else(), (0, n.reportTypeError)(P)), H.endIf()) : ue(P, Re), Oe || H.if((0, o._)`${c.default.errors} === ${x || 0}`));
9229
+ (0, r.shouldUseGroup)(J, Re) && (Re.type ? (H.if((0, n.checkDataType)(Re.type, pe, ve.strictNumbers)), ue(P, Re), N.length === 1 && N[0] === Re.type && L && (H.else(), (0, n.reportTypeError)(P)), H.endIf()) : ue(P, Re), Ae || H.if((0, o._)`${c.default.errors} === ${x || 0}`));
9230
9230
  }
9231
9231
  }
9232
9232
  function ue(P, N) {
@@ -9346,7 +9346,7 @@ function Hr() {
9346
9346
  }
9347
9347
  invalid$data() {
9348
9348
  const { gen: N, schemaCode: L, schemaType: x, def: H, it: J } = this;
9349
- return (0, o.or)(pe(), Oe());
9349
+ return (0, o.or)(pe(), Ae());
9350
9350
  function pe() {
9351
9351
  if (x.length) {
9352
9352
  if (!(L instanceof o.Name))
@@ -9356,7 +9356,7 @@ function Hr() {
9356
9356
  }
9357
9357
  return o.nil;
9358
9358
  }
9359
- function Oe() {
9359
+ function Ae() {
9360
9360
  if (H.validateSchema) {
9361
9361
  const ve = N.scopeValue("validate$data", { ref: H.validateSchema });
9362
9362
  return (0, o._)`!${ve}(${L})`;
@@ -9410,8 +9410,8 @@ function Hr() {
9410
9410
  return J;
9411
9411
  }
9412
9412
  let pe = J;
9413
- const Oe = H.split("/");
9414
- for (const Ee of Oe)
9413
+ const Ae = H.split("/");
9414
+ for (const Ee of Ae)
9415
9415
  Ee && (J = (0, o._)`${J}${(0, o.getProperty)((0, d.unescapeJsonPointer)(Ee))}`, pe = (0, o._)`${pe} && ${J}`);
9416
9416
  return pe;
9417
9417
  function ve(Ee, me) {
@@ -9447,7 +9447,7 @@ var $e = {}, as;
9447
9447
  function Ln() {
9448
9448
  if (as) return $e;
9449
9449
  as = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.resolveSchema = $e.getCompilingSchema = $e.resolveRef = $e.compileSchema = $e.SchemaEnv = void 0;
9450
- const e = X(), t = kn(), r = Fe(), n = Vr(), a = te(), s = Hr();
9450
+ const e = Q(), t = kn(), r = Fe(), n = Vr(), a = te(), s = Hr();
9451
9451
  class i {
9452
9452
  constructor(p) {
9453
9453
  var u;
@@ -9979,7 +9979,7 @@ function sm() {
9979
9979
  Object.defineProperty(e, "KeywordCxt", { enumerable: !0, get: function() {
9980
9980
  return t.KeywordCxt;
9981
9981
  } });
9982
- var r = X();
9982
+ var r = Q();
9983
9983
  Object.defineProperty(e, "_", { enumerable: !0, get: function() {
9984
9984
  return r._;
9985
9985
  } }), Object.defineProperty(e, "str", { enumerable: !0, get: function() {
@@ -9993,7 +9993,7 @@ function sm() {
9993
9993
  } }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
9994
9994
  return r.CodeGen;
9995
9995
  } });
9996
- const n = kn(), a = Br(), s = ro(), i = Ln(), o = X(), c = Vr(), l = Dr(), d = te(), m = Zp, b = am(), S = (M, T) => new RegExp(M, T);
9996
+ const n = kn(), a = Br(), s = ro(), i = Ln(), o = Q(), c = Vr(), l = Dr(), d = te(), m = Zp, b = am(), S = (M, T) => new RegExp(M, T);
9997
9997
  S.code = "new RegExp";
9998
9998
  const y = ["removeAdditional", "useDefaults", "coerceTypes"], g = /* @__PURE__ */ new Set([
9999
9999
  "validate",
@@ -10031,7 +10031,7 @@ function sm() {
10031
10031
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
10032
10032
  }, u = 200;
10033
10033
  function h(M) {
10034
- var T, I, A, v, R, C, V, B, re, Z, P, N, L, x, H, J, pe, Oe, ve, Ee, me, Xe, Re, Wr, Gr;
10034
+ var T, I, A, v, R, C, V, B, re, Z, P, N, L, x, H, J, pe, Ae, ve, Ee, me, Xe, Re, Wr, Gr;
10035
10035
  const mt = M.strict, Kr = (T = M.code) === null || T === void 0 ? void 0 : T.optimize, qn = Kr === !0 || Kr === void 0 ? 1 : Kr || 0, jn = (A = (I = M.code) === null || I === void 0 ? void 0 : I.regExp) !== null && A !== void 0 ? A : S, co = (v = M.uriResolver) !== null && v !== void 0 ? v : b.default;
10036
10036
  return {
10037
10037
  strictSchema: (C = (R = M.strictSchema) !== null && R !== void 0 ? R : mt) !== null && C !== void 0 ? C : !0,
@@ -10043,7 +10043,7 @@ function sm() {
10043
10043
  loopRequired: (H = M.loopRequired) !== null && H !== void 0 ? H : u,
10044
10044
  loopEnum: (J = M.loopEnum) !== null && J !== void 0 ? J : u,
10045
10045
  meta: (pe = M.meta) !== null && pe !== void 0 ? pe : !0,
10046
- messages: (Oe = M.messages) !== null && Oe !== void 0 ? Oe : !0,
10046
+ messages: (Ae = M.messages) !== null && Ae !== void 0 ? Ae : !0,
10047
10047
  inlineRefs: (ve = M.inlineRefs) !== null && ve !== void 0 ? ve : !0,
10048
10048
  schemaId: (Ee = M.schemaId) !== null && Ee !== void 0 ? Ee : "$id",
10049
10049
  addUsedSchema: (me = M.addUsedSchema) !== null && me !== void 0 ? me : !0,
@@ -10430,7 +10430,7 @@ var Ue = {}, fs;
10430
10430
  function om() {
10431
10431
  if (fs) return Ue;
10432
10432
  fs = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.callRef = Ue.getValidate = void 0;
10433
- const e = Br(), t = Ce(), r = X(), n = Fe(), a = Ln(), s = te(), i = {
10433
+ const e = Br(), t = Ce(), r = Q(), n = Fe(), a = Ln(), s = te(), i = {
10434
10434
  keyword: "$ref",
10435
10435
  schemaType: "string",
10436
10436
  code(l) {
@@ -10533,7 +10533,7 @@ var Vt = {}, Ht = {}, ps;
10533
10533
  function um() {
10534
10534
  if (ps) return Ht;
10535
10535
  ps = 1, Object.defineProperty(Ht, "__esModule", { value: !0 });
10536
- const e = X(), t = e.operators, r = {
10536
+ const e = Q(), t = e.operators, r = {
10537
10537
  maximum: { okStr: "<=", ok: t.LTE, fail: t.GT },
10538
10538
  minimum: { okStr: ">=", ok: t.GTE, fail: t.LT },
10539
10539
  exclusiveMaximum: { okStr: "<", ok: t.LT, fail: t.GTE },
@@ -10558,7 +10558,7 @@ var Bt = {}, ms;
10558
10558
  function lm() {
10559
10559
  if (ms) return Bt;
10560
10560
  ms = 1, Object.defineProperty(Bt, "__esModule", { value: !0 });
10561
- const e = X(), r = {
10561
+ const e = Q(), r = {
10562
10562
  keyword: "multipleOf",
10563
10563
  type: "number",
10564
10564
  schemaType: "number",
@@ -10591,7 +10591,7 @@ var ys;
10591
10591
  function fm() {
10592
10592
  if (ys) return zt;
10593
10593
  ys = 1, Object.defineProperty(zt, "__esModule", { value: !0 });
10594
- const e = X(), t = te(), r = dm(), a = {
10594
+ const e = Q(), t = te(), r = dm(), a = {
10595
10595
  keyword: ["maxLength", "minLength"],
10596
10596
  type: "string",
10597
10597
  schemaType: "number",
@@ -10614,7 +10614,7 @@ var Gt = {}, bs;
10614
10614
  function hm() {
10615
10615
  if (bs) return Gt;
10616
10616
  bs = 1, Object.defineProperty(Gt, "__esModule", { value: !0 });
10617
- const e = Ce(), t = X(), n = {
10617
+ const e = Ce(), t = Q(), n = {
10618
10618
  keyword: "pattern",
10619
10619
  type: "string",
10620
10620
  schemaType: "string",
@@ -10634,7 +10634,7 @@ var Kt = {}, ws;
10634
10634
  function pm() {
10635
10635
  if (ws) return Kt;
10636
10636
  ws = 1, Object.defineProperty(Kt, "__esModule", { value: !0 });
10637
- const e = X(), r = {
10637
+ const e = Q(), r = {
10638
10638
  keyword: ["maxProperties", "minProperties"],
10639
10639
  type: "object",
10640
10640
  schemaType: "number",
@@ -10657,7 +10657,7 @@ var Yt = {}, vs;
10657
10657
  function mm() {
10658
10658
  if (vs) return Yt;
10659
10659
  vs = 1, Object.defineProperty(Yt, "__esModule", { value: !0 });
10660
- const e = Ce(), t = X(), r = te(), a = {
10660
+ const e = Ce(), t = Q(), r = te(), a = {
10661
10661
  keyword: "required",
10662
10662
  type: "object",
10663
10663
  schemaType: "array",
@@ -10714,7 +10714,7 @@ var Jt = {}, Es;
10714
10714
  function gm() {
10715
10715
  if (Es) return Jt;
10716
10716
  Es = 1, Object.defineProperty(Jt, "__esModule", { value: !0 });
10717
- const e = X(), r = {
10717
+ const e = Q(), r = {
10718
10718
  keyword: ["maxItems", "minItems"],
10719
10719
  type: "array",
10720
10720
  schemaType: "number",
@@ -10744,7 +10744,7 @@ var Ss;
10744
10744
  function ym() {
10745
10745
  if (Ss) return Xt;
10746
10746
  Ss = 1, Object.defineProperty(Xt, "__esModule", { value: !0 });
10747
- const e = Dr(), t = X(), r = te(), n = Mn(), s = {
10747
+ const e = Dr(), t = Q(), r = te(), n = Mn(), s = {
10748
10748
  keyword: "uniqueItems",
10749
10749
  type: "array",
10750
10750
  schemaType: "boolean",
@@ -10788,7 +10788,7 @@ var Zt = {}, $s;
10788
10788
  function bm() {
10789
10789
  if ($s) return Zt;
10790
10790
  $s = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
10791
- const e = X(), t = te(), r = Mn(), a = {
10791
+ const e = Q(), t = te(), r = Mn(), a = {
10792
10792
  keyword: "const",
10793
10793
  $data: !0,
10794
10794
  error: {
@@ -10806,7 +10806,7 @@ var er = {}, Rs;
10806
10806
  function wm() {
10807
10807
  if (Rs) return er;
10808
10808
  Rs = 1, Object.defineProperty(er, "__esModule", { value: !0 });
10809
- const e = X(), t = te(), r = Mn(), a = {
10809
+ const e = Q(), t = te(), r = Mn(), a = {
10810
10810
  keyword: "enum",
10811
10811
  schemaType: "array",
10812
10812
  $data: !0,
@@ -10871,7 +10871,7 @@ var tr = {}, at = {}, Ts;
10871
10871
  function so() {
10872
10872
  if (Ts) return at;
10873
10873
  Ts = 1, Object.defineProperty(at, "__esModule", { value: !0 }), at.validateAdditionalItems = void 0;
10874
- const e = X(), t = te(), n = {
10874
+ const e = Q(), t = te(), n = {
10875
10875
  keyword: "additionalItems",
10876
10876
  type: "array",
10877
10877
  schemaType: ["boolean", "object"],
@@ -10911,7 +10911,7 @@ var rr = {}, st = {}, Os;
10911
10911
  function io() {
10912
10912
  if (Os) return st;
10913
10913
  Os = 1, Object.defineProperty(st, "__esModule", { value: !0 }), st.validateTuple = void 0;
10914
- const e = X(), t = te(), r = Ce(), n = {
10914
+ const e = Q(), t = te(), r = Ce(), n = {
10915
10915
  keyword: "items",
10916
10916
  type: "array",
10917
10917
  schemaType: ["object", "array", "boolean"],
@@ -10961,7 +10961,7 @@ var nr = {}, Ns;
10961
10961
  function _m() {
10962
10962
  if (Ns) return nr;
10963
10963
  Ns = 1, Object.defineProperty(nr, "__esModule", { value: !0 });
10964
- const e = X(), t = te(), r = Ce(), n = so(), s = {
10964
+ const e = Q(), t = te(), r = Ce(), n = so(), s = {
10965
10965
  keyword: "items",
10966
10966
  type: "array",
10967
10967
  schemaType: ["object", "boolean"],
@@ -10981,7 +10981,7 @@ var ar = {}, Ds;
10981
10981
  function Sm() {
10982
10982
  if (Ds) return ar;
10983
10983
  Ds = 1, Object.defineProperty(ar, "__esModule", { value: !0 });
10984
- const e = X(), t = te(), n = {
10984
+ const e = Q(), t = te(), n = {
10985
10985
  keyword: "contains",
10986
10986
  type: "array",
10987
10987
  schemaType: ["object", "boolean"],
@@ -11038,7 +11038,7 @@ var bn = {}, Cs;
11038
11038
  function $m() {
11039
11039
  return Cs || (Cs = 1, (function(e) {
11040
11040
  Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
11041
- const t = X(), r = te(), n = Ce();
11041
+ const t = Q(), r = te(), n = Ce();
11042
11042
  e.error = {
11043
11043
  message: ({ params: { property: c, depsCount: l, deps: d } }) => {
11044
11044
  const m = l === 1 ? "property" : "properties";
@@ -11111,7 +11111,7 @@ var sr = {}, Is;
11111
11111
  function Rm() {
11112
11112
  if (Is) return sr;
11113
11113
  Is = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
11114
- const e = X(), t = te(), n = {
11114
+ const e = Q(), t = te(), n = {
11115
11115
  keyword: "propertyNames",
11116
11116
  type: "object",
11117
11117
  schemaType: ["object", "boolean"],
@@ -11143,7 +11143,7 @@ var ir = {}, ks;
11143
11143
  function oo() {
11144
11144
  if (ks) return ir;
11145
11145
  ks = 1, Object.defineProperty(ir, "__esModule", { value: !0 });
11146
- const e = Ce(), t = X(), r = Fe(), n = te(), s = {
11146
+ const e = Ce(), t = Q(), r = Fe(), n = te(), s = {
11147
11147
  keyword: "additionalProperties",
11148
11148
  type: ["object"],
11149
11149
  schemaType: ["boolean", "object"],
@@ -11249,7 +11249,7 @@ var cr = {}, Ms;
11249
11249
  function Tm() {
11250
11250
  if (Ms) return cr;
11251
11251
  Ms = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
11252
- const e = Ce(), t = X(), r = te(), n = te(), a = {
11252
+ const e = Ce(), t = Q(), r = te(), n = te(), a = {
11253
11253
  keyword: "patternProperties",
11254
11254
  type: "object",
11255
11255
  schemaType: "object",
@@ -11329,7 +11329,7 @@ var dr = {}, js;
11329
11329
  function Nm() {
11330
11330
  if (js) return dr;
11331
11331
  js = 1, Object.defineProperty(dr, "__esModule", { value: !0 });
11332
- const e = X(), t = te(), n = {
11332
+ const e = Q(), t = te(), n = {
11333
11333
  keyword: "oneOf",
11334
11334
  schemaType: "array",
11335
11335
  trackErrors: !0,
@@ -11387,7 +11387,7 @@ var hr = {}, Fs;
11387
11387
  function Cm() {
11388
11388
  if (Fs) return hr;
11389
11389
  Fs = 1, Object.defineProperty(hr, "__esModule", { value: !0 });
11390
- const e = X(), t = te(), n = {
11390
+ const e = Q(), t = te(), n = {
11391
11391
  keyword: "if",
11392
11392
  schemaType: ["object", "boolean"],
11393
11393
  trackErrors: !0,
@@ -11472,7 +11472,7 @@ var mr = {}, gr = {}, Bs;
11472
11472
  function Lm() {
11473
11473
  if (Bs) return gr;
11474
11474
  Bs = 1, Object.defineProperty(gr, "__esModule", { value: !0 });
11475
- const e = X(), r = {
11475
+ const e = Q(), r = {
11476
11476
  keyword: "format",
11477
11477
  type: ["number", "string"],
11478
11478
  schemaType: "string",
@@ -11587,7 +11587,7 @@ var Ys;
11587
11587
  function Um() {
11588
11588
  if (Ys) return yr;
11589
11589
  Ys = 1, Object.defineProperty(yr, "__esModule", { value: !0 });
11590
- const e = X(), t = jm(), r = Ln(), n = Br(), a = te(), i = {
11590
+ const e = Q(), t = jm(), r = Ln(), n = Br(), a = te(), i = {
11591
11591
  keyword: "discriminator",
11592
11592
  type: "object",
11593
11593
  schemaType: "object",
@@ -11693,7 +11693,7 @@ function Km() {
11693
11693
  Object.defineProperty(t, "KeywordCxt", { enumerable: !0, get: function() {
11694
11694
  return l.KeywordCxt;
11695
11695
  } });
11696
- var d = X();
11696
+ var d = Q();
11697
11697
  Object.defineProperty(t, "_", { enumerable: !0, get: function() {
11698
11698
  return d._;
11699
11699
  } }), Object.defineProperty(t, "str", { enumerable: !0, get: function() {
@@ -11755,7 +11755,7 @@ const Jm = /* @__PURE__ */ Fp(Ym), xn = "/bahmni_config/openmrs/apps/clinical/v2
11755
11755
  type: Tg,
11756
11756
  additionalProperties: Og,
11757
11757
  properties: Ag
11758
- }, Ub = async () => zr(Qm, ug), Fb = async (e) => {
11758
+ }, Fb = async () => zr(Qm, ug), Vb = async (e) => {
11759
11759
  const t = await zr(
11760
11760
  tg(e),
11761
11761
  yg
@@ -11764,10 +11764,10 @@ const Jm = /* @__PURE__ */ Fp(Ym), xn = "/bahmni_config/openmrs/apps/clinical/v2
11764
11764
  ...r,
11765
11765
  id: rh()
11766
11766
  })), t;
11767
- }, Vb = async () => zr(
11767
+ }, Hb = async () => zr(
11768
11768
  eg,
11769
11769
  Sg
11770
- ), Hb = async () => zr(
11770
+ ), Bb = async () => zr(
11771
11771
  Zm,
11772
11772
  Ng
11773
11773
  ), zr = async (e, t) => {
@@ -11786,21 +11786,21 @@ const Jm = /* @__PURE__ */ Fp(Ym), xn = "/bahmni_config/openmrs/apps/clinical/v2
11786
11786
  }
11787
11787
  }, Dg = async (e) => {
11788
11788
  try {
11789
- return await Q(e);
11789
+ return await X(e);
11790
11790
  } catch (t) {
11791
11791
  const { message: r } = ut(t);
11792
11792
  throw new Error(r);
11793
11793
  }
11794
11794
  }, Cg = async (e, t) => new Jm().compile(t)(e), Ig = (e) => ie + `/provider?user=${e}&v=custom:(uuid,display,person)`;
11795
- async function Bb(e) {
11796
- const t = await Q(
11795
+ async function zb(e) {
11796
+ const t = await X(
11797
11797
  Ig(e)
11798
11798
  );
11799
11799
  return !t.results || t.results.length === 0 ? null : t.results[0];
11800
11800
  }
11801
- const kg = (e) => De + `/Encounter?subject:Patient=${e}&_tag=visit`;
11801
+ const kg = (e) => Oe + `/Encounter?subject:Patient=${e}&_tag=visit`;
11802
11802
  async function Lg(e) {
11803
- return await Q(kg(e));
11803
+ return await X(kg(e));
11804
11804
  }
11805
11805
  async function Mg(e) {
11806
11806
  var r;
@@ -11812,7 +11812,7 @@ async function xg(e) {
11812
11812
  return !((n = r.period) != null && n.end);
11813
11813
  }) ?? null;
11814
11814
  }
11815
- const qg = De + "/Encounter", jg = ie + "/systemsetting/bahmni.encountersession.duration", Ug = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
11815
+ const qg = Oe + "/Encounter", jg = ie + "/systemsetting/bahmni.encountersession.duration", Ug = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
11816
11816
  async function Fg(e) {
11817
11817
  var a;
11818
11818
  const t = new URLSearchParams();
@@ -11820,11 +11820,11 @@ async function Fg(e) {
11820
11820
  i && t.append(s, i);
11821
11821
  });
11822
11822
  const r = `${qg}?${t.toString()}`;
11823
- return ((a = (await Q(r)).entry) == null ? void 0 : a.map((s) => s.resource).filter((s) => s !== void 0)) ?? [];
11823
+ return ((a = (await X(r)).entry) == null ? void 0 : a.map((s) => s.resource).filter((s) => s !== void 0)) ?? [];
11824
11824
  }
11825
11825
  async function Vg() {
11826
11826
  try {
11827
- const e = await Q(
11827
+ const e = await X(
11828
11828
  jg
11829
11829
  ), t = Number(e.value);
11830
11830
  return !isNaN(t) && t > 0 ? t : 60;
@@ -11845,7 +11845,7 @@ async function Hg(e, t) {
11845
11845
  return null;
11846
11846
  }
11847
11847
  }
11848
- async function zb(e, t, r) {
11848
+ async function Wb(e, t, r) {
11849
11849
  try {
11850
11850
  if (!e) return null;
11851
11851
  const n = r ?? await Vg(), s = `ge${new Date(Date.now() - n * 60 * 1e3).toISOString()}`, i = {
@@ -11861,10 +11861,29 @@ async function zb(e, t, r) {
11861
11861
  return null;
11862
11862
  }
11863
11863
  }
11864
- const Wb = (e) => {
11864
+ const Bg = (e) => Oe + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
11865
+ async function Gb(e) {
11866
+ var o, c;
11867
+ const t = e.join(","), r = await X(Bg(t));
11868
+ if (r.total === 0)
11869
+ throw new Error(
11870
+ "No episode of care found for the provided UUIDs: " + e.join(", ")
11871
+ );
11872
+ const n = ((c = (o = r.entry) == null ? void 0 : o.filter((l) => {
11873
+ var d;
11874
+ return ((d = l.resource) == null ? void 0 : d.resourceType) === "Encounter";
11875
+ })) == null ? void 0 : c.map((l) => l.resource)) ?? [], a = /* @__PURE__ */ new Set(), s = [];
11876
+ return n.forEach((l) => {
11877
+ var m, b;
11878
+ l.id && s.push(l.id);
11879
+ const d = (b = (m = l.partOf) == null ? void 0 : m.reference) == null ? void 0 : b.split("/")[1];
11880
+ d && a.add(d);
11881
+ }), { visitUuids: Array.from(a), encounterUuids: s };
11882
+ }
11883
+ const Kb = (e) => {
11865
11884
  const t = new CustomEvent("bahmni-audit-log", { detail: e });
11866
11885
  window.dispatchEvent(t);
11867
- }, Bg = (e) => {
11886
+ }, zg = (e) => {
11868
11887
  const t = (r) => {
11869
11888
  e(r.detail);
11870
11889
  };
@@ -11874,7 +11893,7 @@ const Wb = (e) => {
11874
11893
  }, it = {
11875
11894
  CLINICAL: "MODULE_LABEL_CLINICAL_KEY",
11876
11895
  REGISTRATION: "MODULE_LABEL_REGISTRATION_KEY"
11877
- }, zg = {
11896
+ }, Wg = {
11878
11897
  VIEWED_CLINICAL_DASHBOARD: {
11879
11898
  eventType: "VIEWED_CLINICAL_DASHBOARD",
11880
11899
  message: "VIEWED_CLINICAL_DASHBOARD_MESSAGE"
@@ -11908,21 +11927,21 @@ const Wb = (e) => {
11908
11927
  message: "EDIT_PATIENT_DETAILS_MESSAGE",
11909
11928
  module: it.REGISTRATION
11910
11929
  }
11911
- }, Wg = ie + "/auditlog", Gg = {
11930
+ }, Gg = ie + "/auditlog", Kg = {
11912
11931
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
11913
- }, wn = /* @__PURE__ */ new Map(), Kg = async (e) => {
11932
+ }, wn = /* @__PURE__ */ new Map(), Yg = async (e) => {
11914
11933
  if (wn.has(e))
11915
11934
  return wn.get(e) ?? null;
11916
- const t = await Q(Di(e)), r = t ? String(t) : null;
11935
+ const t = await X(Di(e)), r = t ? String(t) : null;
11917
11936
  return wn.set(e, r), r;
11918
- }, Yg = async () => await Kg(Fu) === "true", Jg = async (e, t, r, n = it.CLINICAL) => {
11919
- if (!await Yg())
11937
+ }, Jg = async () => await Yg(Fu) === "true", Xg = async (e, t, r, n = it.CLINICAL) => {
11938
+ if (!await Jg())
11920
11939
  return { logged: !1 };
11921
- const s = zg[t];
11940
+ const s = Wg[t];
11922
11941
  if (!s)
11923
11942
  return {
11924
11943
  logged: !1,
11925
- error: se.t(Gg.UNKNOWN_EVENT_TYPE, {
11944
+ error: se.t(Kg.UNKNOWN_EVENT_TYPE, {
11926
11945
  eventType: t
11927
11946
  })
11928
11947
  };
@@ -11932,22 +11951,22 @@ const Wb = (e) => {
11932
11951
  message: r ? `${s.message}~${JSON.stringify(r)}` : s.message,
11933
11952
  module: n
11934
11953
  };
11935
- return await pt(Wg, i), { logged: !0 };
11936
- }, Gb = () => Bg(async (t) => {
11937
- await Jg(
11954
+ return await pt(Gg, i), { logged: !0 };
11955
+ }, Yb = () => zg(async (t) => {
11956
+ await Xg(
11938
11957
  t.patientUuid,
11939
11958
  t.eventType,
11940
11959
  t.messageParams,
11941
11960
  t.module
11942
11961
  );
11943
- }), Kb = async () => {
11962
+ }), Jb = async () => {
11944
11963
  try {
11945
- return await Q(ku);
11964
+ return await X(ku);
11946
11965
  } catch (e) {
11947
11966
  const { message: t } = ut(e);
11948
11967
  throw new Error(t);
11949
11968
  }
11950
- }, Yb = (e, t) => !e || e.length === 0 ? !1 : e.some((r) => r.name === t), Xg = async () => {
11969
+ }, Xb = (e, t) => !e || e.length === 0 ? !1 : e.some((r) => r.name === t), Qg = async () => {
11951
11970
  const e = await fetch(Lu);
11952
11971
  if (!e.ok)
11953
11972
  throw new Error(
@@ -11955,7 +11974,7 @@ const Wb = (e) => {
11955
11974
  );
11956
11975
  const t = await e.json();
11957
11976
  return Array.isArray(t) ? t : [];
11958
- }, Qg = (e, t) => {
11977
+ }, Zg = (e, t) => {
11959
11978
  const r = JSON.parse(e.nameTranslation);
11960
11979
  if (Array.isArray(r) && r.length > 0) {
11961
11980
  const n = r.find(
@@ -11965,8 +11984,8 @@ const Wb = (e) => {
11965
11984
  return n.display;
11966
11985
  }
11967
11986
  return e.name;
11968
- }, Zg = (e, t) => {
11969
- const r = Qg(e, t);
11987
+ }, ey = (e, t) => {
11988
+ const r = Zg(e, t);
11970
11989
  return {
11971
11990
  uuid: e.uuid,
11972
11991
  name: r,
@@ -11976,12 +11995,12 @@ const Wb = (e) => {
11976
11995
  editable: n.editable
11977
11996
  }))
11978
11997
  };
11979
- }, Jb = async () => {
11980
- const e = await Xg(), t = qr();
11998
+ }, Qb = async () => {
11999
+ const e = await Qg(), t = qr();
11981
12000
  return e.map(
11982
- (r) => Zg(r, t)
12001
+ (r) => ey(r, t)
11983
12002
  );
11984
- }, ey = ie + "/bahmnicore/diseaseSummaryData?", Xb = async (e, t, r, n) => {
12003
+ }, ty = ie + "/bahmnicore/diseaseSummaryData?", Zb = async (e, t, r, n) => {
11985
12004
  const a = new URLSearchParams({
11986
12005
  groupBy: n,
11987
12006
  latestCount: t.toString(),
@@ -11990,127 +12009,128 @@ const Wb = (e) => {
11990
12009
  r.forEach((i) => {
11991
12010
  a.append("obsConcepts", i);
11992
12011
  });
11993
- const s = ey + a.toString();
11994
- return Q(s);
12012
+ const s = ty + a.toString();
12013
+ return X(s);
11995
12014
  };
11996
12015
  export {
11997
- zg as AUDIT_LOG_EVENT_DETAILS,
12016
+ Wg as AUDIT_LOG_EVENT_DETAILS,
11998
12017
  Xh as AllergySeverity,
11999
12018
  Jh as AllergyStatus,
12000
12019
  kh as AttributeFormat,
12001
12020
  Lh as AttributeInputType,
12002
- Sy as BAHMNI_HOME_PATH,
12021
+ $y as BAHMNI_HOME_PATH,
12003
12022
  Xf as DATE_FORMAT,
12004
- Dy as DATE_PICKER_INPUT_FORMAT,
12023
+ Cy as DATE_PICKER_INPUT_FORMAT,
12005
12024
  Qf as DATE_TIME_FORMAT,
12006
- Ab as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
12007
- Oy as FULL_MONTH_DATE_FORMAT,
12008
- Cb as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
12025
+ Nb as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
12026
+ Ay as FULL_MONTH_DATE_FORMAT,
12027
+ Ib as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
12009
12028
  Qh as HL7_CONDITION_CATEGORY_CONDITION_CODE,
12010
12029
  Zh as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
12011
- Db as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
12012
- Nb as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
12013
- Ny as ISO_DATE_FORMAT,
12030
+ Cb as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
12031
+ Db as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
12032
+ Dy as ISO_DATE_FORMAT,
12014
12033
  _r as LabTestPriority,
12015
- Yy as MAX_NAME_LENGTH,
12016
- Ky as MAX_PATIENT_AGE_YEARS,
12017
- Jy as MAX_PHONE_NUMBER_LENGTH,
12034
+ Jy as MAX_NAME_LENGTH,
12035
+ Yy as MAX_PATIENT_AGE_YEARS,
12036
+ Xy as MAX_PHONE_NUMBER_LENGTH,
12018
12037
  qe as MedicationStatus,
12019
- De as OPENMRS_FHIR_R4,
12038
+ Oe as OPENMRS_FHIR_R4,
12020
12039
  ie as OPENMRS_REST_V1,
12021
- Ay as REGISTRATION_DATE_FORMAT,
12022
- $y as USER_PINNED_PREFERENCE_URL,
12040
+ Ny as REGISTRATION_DATE_FORMAT,
12041
+ Ry as USER_PINNED_PREFERENCE_URL,
12023
12042
  eh as calculateAge,
12024
- xy as calculateAgeinYearsAndMonths,
12025
- Iy as calculateOnsetDate,
12026
- Fy as capitalize,
12027
- nb as createPatient,
12028
- cb as createVisit,
12029
- jy as dateComparator,
12030
- _y as del,
12031
- Wb as dispatchAuditEvent,
12032
- Pb as fetchAndFormatAllergenConcepts,
12033
- Jb as fetchObservationForms,
12034
- Tb as fetchReactionConcepts,
12035
- zy as filterReplacementEntries,
12036
- zb as findActiveEncounterInSession,
12043
+ qy as calculateAgeinYearsAndMonths,
12044
+ ky as calculateOnsetDate,
12045
+ Vy as capitalize,
12046
+ ab as createPatient,
12047
+ ub as createVisit,
12048
+ Uy as dateComparator,
12049
+ Sy as del,
12050
+ Kb as dispatchAuditEvent,
12051
+ Tb as fetchAndFormatAllergenConcepts,
12052
+ Qb as fetchObservationForms,
12053
+ Ob as fetchReactionConcepts,
12054
+ Wy as filterReplacementEntries,
12055
+ Wb as findActiveEncounterInSession,
12037
12056
  th as formatDate,
12038
- My as formatDateAndTime,
12039
- ky as formatDateDistance,
12040
- Cy as formatDateTime,
12041
- Wy as formatUrl,
12057
+ xy as formatDateAndTime,
12058
+ Ly as formatDateDistance,
12059
+ Iy as formatDateTime,
12060
+ Gy as formatUrl,
12042
12061
  rh as generateId,
12043
- Q as get,
12062
+ X as get,
12044
12063
  xg as getActiveVisit,
12045
- ub as getActiveVisitByPatient,
12046
- ib as getAddressHierarchyEntries,
12064
+ lb as getActiveVisitByPatient,
12065
+ ob as getAddressHierarchyEntries,
12047
12066
  Kh as getAllergies,
12048
- Sb as getAppointmentById,
12049
- Ub as getClinicalConfig,
12050
- Rb as getConceptById,
12051
- Ib as getConditions,
12067
+ $b as getAppointmentById,
12068
+ Fb as getClinicalConfig,
12069
+ Pb as getConceptById,
12070
+ kb as getConditions,
12052
12071
  Xi as getCookieByName,
12053
- Bb as getCurrentProvider,
12054
- Gy as getCurrentUser,
12055
- Kb as getCurrentUserPrivileges,
12056
- Fb as getDashboardConfig,
12057
- jb as getFlattenedInvestigations,
12058
- Ob as getFormattedAllergies,
12072
+ zb as getCurrentProvider,
12073
+ Ky as getCurrentUser,
12074
+ Jb as getCurrentUserPrivileges,
12075
+ Vb as getDashboardConfig,
12076
+ Gb as getEncountersAndVisitsForEOC,
12077
+ Ub as getFlattenedInvestigations,
12078
+ Ab as getFormattedAllergies,
12059
12079
  ut as getFormattedError,
12060
- Xy as getFormattedPatientById,
12061
- sb as getGenders,
12062
- rb as getIdentifierData,
12063
- tb as getIdentifierTypes,
12064
- mb as getInputTypeForFormat,
12065
- Vb as getMedicationConfig,
12066
- db as getOrderedAddressHierarchyLevels,
12080
+ Qy as getFormattedPatientById,
12081
+ ib as getGenders,
12082
+ nb as getIdentifierData,
12083
+ rb as getIdentifierTypes,
12084
+ gb as getInputTypeForFormat,
12085
+ Hb as getMedicationConfig,
12086
+ fb as getOrderedAddressHierarchyLevels,
12067
12087
  Th as getPatientById,
12068
- kb as getPatientDiagnoses,
12069
- Qy as getPatientImageAsDataUrl,
12070
- qb as getPatientLabInvestigations,
12088
+ Lb as getPatientDiagnoses,
12089
+ Zy as getPatientImageAsDataUrl,
12090
+ jb as getPatientLabInvestigations,
12071
12091
  Ap as getPatientLabTestsBundle,
12072
12092
  dp as getPatientMedicationBundle,
12073
- Lb as getPatientMedications,
12074
- fb as getPatientProfile,
12093
+ Mb as getPatientMedications,
12094
+ hb as getPatientProfile,
12075
12095
  _p as getPatientRadiologyInvestigationBundle,
12076
- Mb as getPatientRadiologyInvestigations,
12077
- pb as getPersonAttributeTypes,
12096
+ xb as getPatientRadiologyInvestigations,
12097
+ mb as getPersonAttributeTypes,
12078
12098
  Ih as getPrimaryIdentifierType,
12079
- Hy as getPriorityByOrder,
12080
- Hb as getRegistrationConfig,
12081
- hb as getRelationshipTypes,
12082
- Ly as getTodayDate,
12099
+ By as getPriorityByOrder,
12100
+ Bb as getRegistrationConfig,
12101
+ pb as getRelationshipTypes,
12102
+ My as getTodayDate,
12083
12103
  Qi as getUserLoginLocation,
12084
- lb as getVisitLocationUUID,
12085
- ob as getVisitTypes,
12086
- Xb as getVitalFlowSheetData,
12087
- By as groupByDate,
12088
- xb as groupLabTestsByDate,
12089
- Yb as hasPrivilege,
12090
- Py as initAppI18n,
12091
- Gb as initializeAuditListener,
12092
- gb as isBooleanFormat,
12093
- yb as isConceptFormat,
12094
- wb as isDateFormat,
12095
- bb as isNumberFormat,
12096
- Vy as isStringEmpty,
12097
- vb as isTextFormat,
12098
- Jg as logAuditEvent,
12099
- Ry as normalizeTranslationKey,
12104
+ db as getVisitLocationUUID,
12105
+ cb as getVisitTypes,
12106
+ Zb as getVitalFlowSheetData,
12107
+ zy as groupByDate,
12108
+ qb as groupLabTestsByDate,
12109
+ Xb as hasPrivilege,
12110
+ Ty as initAppI18n,
12111
+ Yb as initializeAuditListener,
12112
+ yb as isBooleanFormat,
12113
+ bb as isConceptFormat,
12114
+ vb as isDateFormat,
12115
+ wb as isNumberFormat,
12116
+ Hy as isStringEmpty,
12117
+ Eb as isTextFormat,
12118
+ Xg as logAuditEvent,
12119
+ Py as normalizeTranslationKey,
12100
12120
  an as notificationService,
12101
12121
  nh as parseQueryParams,
12102
12122
  pt as post,
12103
- Ey as put,
12104
- Uy as refreshQueries,
12105
- Eb as searchAppointmentsByAttribute,
12106
- $b as searchConcepts,
12123
+ _y as put,
12124
+ Fy as refreshQueries,
12125
+ _b as searchAppointmentsByAttribute,
12126
+ Rb as searchConcepts,
12107
12127
  Er as searchFHIRConcepts,
12108
12128
  Vh as searchFHIRConceptsByName,
12109
- eb as searchPatientByCustomAttribute,
12110
- Zy as searchPatientByNameOrId,
12111
- qy as sortByDate,
12112
- _b as updateAppointmentStatus,
12113
- ab as updatePatient,
12114
- Ty as useCamera,
12115
- ew as useTranslation
12129
+ tb as searchPatientByCustomAttribute,
12130
+ eb as searchPatientByNameOrId,
12131
+ jy as sortByDate,
12132
+ Sb as updateAppointmentStatus,
12133
+ sb as updatePatient,
12134
+ Oy as useCamera,
12135
+ rw as useTranslation
12116
12136
  };