@realtek/core-theme-live 0.0.388 → 0.0.390

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.
@@ -1047,8 +1047,46 @@ async function Ln(e) {
1047
1047
  return a(s, `${Nn}/${e}`, { method: "DELETE" });
1048
1048
  }
1049
1049
  //#endregion
1050
+ //#region src/components/detailViewMode.js
1051
+ var Rn = [
1052
+ {
1053
+ value: "self",
1054
+ label: "Same page"
1055
+ },
1056
+ {
1057
+ value: "newTab",
1058
+ label: "New tab"
1059
+ },
1060
+ {
1061
+ value: "popup",
1062
+ label: "Popup"
1063
+ }
1064
+ ], zn = Rn.map((e) => e.value);
1065
+ function Bn(e) {
1066
+ return {
1067
+ self: "self",
1068
+ newtab: "newTab",
1069
+ popup: "popup"
1070
+ }[String(e ?? "").trim().toLowerCase()] || "popup";
1071
+ }
1072
+ var Vn = "/popup/candidate-detail";
1073
+ function Hn(e, { href: t, navigate: n, location: r } = {}) {
1074
+ if (!t) return !1;
1075
+ let i = Bn(e);
1076
+ if (i === "self") return !1;
1077
+ if (i === "newTab") return window.open(t, "_blank", "noopener"), !0;
1078
+ let a = String(t), o = (a.split("/detailview/")[1] ?? a.split("/detail-view/")[1])?.split(/[/?#]/)[0];
1079
+ if (!o || typeof n != "function") return !1;
1080
+ let s = r || (typeof window < "u" ? {
1081
+ pathname: window.location.pathname,
1082
+ search: window.location.search,
1083
+ hash: window.location.hash
1084
+ } : void 0);
1085
+ return n(`${Vn}/${o}`, { state: { background: s } }), !0;
1086
+ }
1087
+ //#endregion
1050
1088
  //#region src/services/detailDefaults.js
1051
- var Rn = Object.freeze({
1089
+ var Un = Object.freeze({
1052
1090
  s3BaseUrl: "https://zinnext-devlopment-ap-south-1.s3.ap-south-1.amazonaws.com".replace(/\/+$/, ""),
1053
1091
  dateFormat: "DD MMM YYYY",
1054
1092
  dateTimeFormat: "MMM DD, YYYY | hh:mm A",
@@ -1069,12 +1107,13 @@ var Rn = Object.freeze({
1069
1107
  "uniqueName"
1070
1108
  ],
1071
1109
  phoneFormat: "3-3-4",
1072
- phoneCountryCode: ""
1073
- }), M = { ...Rn }, zn = null;
1110
+ phoneCountryCode: "",
1111
+ candidateDetailViewMode: "popup"
1112
+ }), M = { ...Un }, Wn = null;
1074
1113
  function N() {
1075
1114
  return M;
1076
1115
  }
1077
- function Bn(e) {
1116
+ function Gn(e) {
1078
1117
  if (!e || typeof e != "object") return {};
1079
1118
  let t = {};
1080
1119
  if (e.s3BaseUrl && (t.s3BaseUrl = String(e.s3BaseUrl).replace(/\/+$/, "")), e.dateFormat && (t.dateFormat = e.dateFormat), e.dateTimeFormat && (t.dateTimeFormat = e.dateTimeFormat), typeof e.showTimeZoneLabel == "boolean" && (t.showTimeZoneLabel = e.showTimeZoneLabel), typeof e.timeZone == "string" && (t.timeZone = e.timeZone.trim()), typeof e.region == "string" && (t.region = e.region.trim()), e.timeZoneAliases && typeof e.timeZoneAliases == "object" && !Array.isArray(e.timeZoneAliases) && (t.timeZoneAliases = {
@@ -1089,9 +1128,9 @@ function Bn(e) {
1089
1128
  ...n
1090
1129
  });
1091
1130
  }
1092
- return typeof e.separator == "string" && e.separator !== "" && (t.separator = e.separator), typeof e.phoneFormat == "string" && e.phoneFormat.trim() !== "" && (t.phoneFormat = e.phoneFormat.trim()), typeof e.phoneCountryCode == "string" && (t.phoneCountryCode = e.phoneCountryCode.trim()), typeof e.phoneCountryCode == "string" && (t.phoneCountryCode = e.phoneCountryCode.trim()), Array.isArray(e.documentNameOrder) && e.documentNameOrder.length && (t.documentNameOrder = e.documentNameOrder), t;
1131
+ return typeof e.separator == "string" && e.separator !== "" && (t.separator = e.separator), typeof e.phoneFormat == "string" && e.phoneFormat.trim() !== "" && (t.phoneFormat = e.phoneFormat.trim()), typeof e.phoneCountryCode == "string" && (t.phoneCountryCode = e.phoneCountryCode.trim()), typeof e.phoneCountryCode == "string" && (t.phoneCountryCode = e.phoneCountryCode.trim()), Array.isArray(e.documentNameOrder) && e.documentNameOrder.length && (t.documentNameOrder = e.documentNameOrder), zn.includes(e.candidateDetailViewMode) && (t.candidateDetailViewMode = e.candidateDetailViewMode), t;
1093
1132
  }
1094
- function Vn(e = Hn()) {
1133
+ function Kn(e = qn()) {
1095
1134
  let t = (String(e).match(/\d+/g) ?? [
1096
1135
  "3",
1097
1136
  "3",
@@ -1107,18 +1146,18 @@ function Vn(e = Hn()) {
1107
1146
  total: r.reduce((e, t) => e + t, 0)
1108
1147
  };
1109
1148
  }
1110
- function Hn() {
1111
- return M.phoneFormat || Rn.phoneFormat;
1149
+ function qn() {
1150
+ return M.phoneFormat || Un.phoneFormat;
1112
1151
  }
1113
- function Un() {
1114
- return M.phoneCountryCode ?? Rn.phoneCountryCode;
1152
+ function Jn() {
1153
+ return M.phoneCountryCode ?? Un.phoneCountryCode;
1115
1154
  }
1116
- function Wn(e, t = Hn()) {
1117
- let { total: n } = Vn(t);
1155
+ function Yn(e, t = qn()) {
1156
+ let { total: n } = Kn(t);
1118
1157
  return String(e ?? "").replace(/\D/g, "").slice(0, n);
1119
1158
  }
1120
- function Gn(e, t = Hn()) {
1121
- let { groups: n, sep: r } = Vn(t), i = Wn(e, t);
1159
+ function Xn(e, t = qn()) {
1160
+ let { groups: n, sep: r } = Kn(t), i = Yn(e, t);
1122
1161
  if (!i) return "";
1123
1162
  let a = [], o = 0;
1124
1163
  for (let e of n) {
@@ -1127,26 +1166,26 @@ function Gn(e, t = Hn()) {
1127
1166
  }
1128
1167
  return a.join(r);
1129
1168
  }
1130
- function Kn(e) {
1169
+ function Zn(e) {
1131
1170
  return M = {
1132
1171
  ...M,
1133
- ...Bn(e)
1172
+ ...Gn(e)
1134
1173
  }, M;
1135
1174
  }
1136
- function qn(e = !1) {
1137
- return zn && !e || (zn = ct().then((e) => Kn(e)).catch(() => M)), zn;
1175
+ function Qn(e = !1) {
1176
+ return Wn && !e || (Wn = Promise.resolve().then(() => ct()).then((e) => Zn(e)).catch(() => M)), Wn;
1138
1177
  }
1139
1178
  T.extend(_e), T.extend(ve);
1140
- var Jn = null;
1141
- function Yn() {
1142
- if (Jn === null) try {
1143
- Jn = T.tz.guess() || "UTC";
1179
+ var $n = null;
1180
+ function er() {
1181
+ if ($n === null) try {
1182
+ $n = T.tz.guess() || "UTC";
1144
1183
  } catch {
1145
- Jn = "UTC";
1184
+ $n = "UTC";
1146
1185
  }
1147
- return Jn;
1186
+ return $n;
1148
1187
  }
1149
- function Xn(e) {
1188
+ function tr(e) {
1150
1189
  let t = String(e ?? "").trim();
1151
1190
  if (!t || t !== "UTC" && !t.includes("/")) return !1;
1152
1191
  try {
@@ -1157,28 +1196,28 @@ function Xn(e) {
1157
1196
  }
1158
1197
  function P(e = N()) {
1159
1198
  let t = String(e?.timeZone ?? "").trim();
1160
- return Xn(t) ? t : Yn();
1199
+ return tr(t) ? t : er();
1161
1200
  }
1162
- function Zn(e) {
1201
+ function nr(e) {
1163
1202
  return T().tz(P(e));
1164
1203
  }
1165
- function Qn(e, t) {
1204
+ function rr(e, t) {
1166
1205
  let n = T(e?.$date ?? e);
1167
1206
  return n.isValid() ? n.tz(P(t)) : n;
1168
1207
  }
1169
- function $n(e, t, n = N()) {
1170
- let r = Qn(e, n);
1208
+ function ir(e, t, n = N()) {
1209
+ let r = rr(e, n);
1171
1210
  return r.isValid() ? r.format(t || n?.dateFormat || "DD MMM YYYY") : "";
1172
1211
  }
1173
- function er(e = N(), t) {
1174
- let n = P(e), r = cr(n, e);
1212
+ function ar(e = N(), t) {
1213
+ let n = P(e), r = pr(n, e);
1175
1214
  if (r && r.includes("/")) {
1176
- let e = tr(n, t);
1215
+ let e = or(n, t);
1177
1216
  if (e) return r.split("/").map((e) => e.trim()).find((t) => t.toUpperCase() === e.toUpperCase()) || e;
1178
1217
  }
1179
- return r || tr(n, t) || n;
1218
+ return r || or(n, t) || n;
1180
1219
  }
1181
- function tr(e, t) {
1220
+ function or(e, t) {
1182
1221
  try {
1183
1222
  let n = t === void 0 ? /* @__PURE__ */ new Date() : new Date(T(t?.$date ?? t).valueOf());
1184
1223
  if (Number.isNaN(n.valueOf())) return "";
@@ -1191,28 +1230,28 @@ function tr(e, t) {
1191
1230
  return "";
1192
1231
  }
1193
1232
  }
1194
- function nr(e, t = N()) {
1195
- let n = $n(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
1233
+ function sr(e, t = N()) {
1234
+ let n = ir(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
1196
1235
  if (!n) return "";
1197
1236
  if (t?.showTimeZoneLabel === !1) return n;
1198
- let r = er(t, e);
1237
+ let r = ar(t, e);
1199
1238
  return r ? `${n} ${r}` : n;
1200
1239
  }
1201
- function rr(e) {
1240
+ function cr(e) {
1202
1241
  if (!e) return !1;
1203
1242
  if (e.tzAware === !0) return !0;
1204
1243
  if (e.tzAware === !1) return !1;
1205
1244
  let t = String(e.type ?? "").toLowerCase();
1206
1245
  return t === "datetime" || t === "time" || t === "datetime-local";
1207
1246
  }
1208
- function ir(e, t) {
1247
+ function lr(e, t) {
1209
1248
  if (e == null || e === "") return null;
1210
1249
  let n = T(e);
1211
1250
  if (!n.isValid()) return null;
1212
1251
  let r = P(t);
1213
1252
  return T.tz(n.format("YYYY-MM-DDTHH:mm:ss"), r);
1214
1253
  }
1215
- function ar(e = P()) {
1254
+ function ur(e = P()) {
1216
1255
  try {
1217
1256
  let t = T().tz(e).utcOffset(), n = t < 0 ? "-" : "+", r = Math.abs(t);
1218
1257
  return `UTC${n}${String(Math.floor(r / 60)).padStart(2, "0")}:${String(r % 60).padStart(2, "0")}`;
@@ -1220,11 +1259,11 @@ function ar(e = P()) {
1220
1259
  return "";
1221
1260
  }
1222
1261
  }
1223
- function or(e = N()) {
1262
+ function dr(e = N()) {
1224
1263
  let t = P(e);
1225
- return `${cr(t, e) || t} (${ar(t)})`;
1264
+ return `${pr(t, e) || t} (${ur(t)})`;
1226
1265
  }
1227
- var sr = Object.freeze({
1266
+ var fr = Object.freeze({
1228
1267
  UTC: "UTC",
1229
1268
  "Asia/Kolkata": "IST",
1230
1269
  "Asia/Calcutta": "IST",
@@ -1239,10 +1278,10 @@ var sr = Object.freeze({
1239
1278
  "Asia/Tokyo": "JST",
1240
1279
  "Australia/Sydney": "AEST/AEDT"
1241
1280
  });
1242
- function cr(e, t = N()) {
1243
- return (t?.timeZoneAliases ?? {})[e] ?? sr[e] ?? "";
1281
+ function pr(e, t = N()) {
1282
+ return (t?.timeZoneAliases ?? {})[e] ?? fr[e] ?? "";
1244
1283
  }
1245
- function lr(e = N()) {
1284
+ function mr(e = N()) {
1246
1285
  let t = [];
1247
1286
  try {
1248
1287
  t = Intl.supportedValuesOf("timeZone") ?? [];
@@ -1251,17 +1290,17 @@ function lr(e = N()) {
1251
1290
  }
1252
1291
  let n = [
1253
1292
  "UTC",
1254
- ...Object.keys(sr),
1293
+ ...Object.keys(fr),
1255
1294
  ...Object.keys(e?.timeZoneAliases ?? {})
1256
1295
  ];
1257
- return [.../* @__PURE__ */ new Set([...n, ...t])].filter(Xn).map((t) => {
1296
+ return [.../* @__PURE__ */ new Set([...n, ...t])].filter(tr).map((t) => {
1258
1297
  let n = 0;
1259
1298
  try {
1260
1299
  n = T().tz(t).utcOffset();
1261
1300
  } catch {
1262
1301
  return null;
1263
1302
  }
1264
- let r = cr(t, e), i = ar(t);
1303
+ let r = pr(t, e), i = ur(t);
1265
1304
  return {
1266
1305
  value: t,
1267
1306
  alias: r,
@@ -1419,7 +1458,7 @@ var I = {
1419
1458
  avatarPurpleBg: "var(--color-avatar-purple-bg)",
1420
1459
  avatarMoreBg: "var(--color-avatar-more-bg)",
1421
1460
  avatarMoreText: "var(--color-avatar-more-text)"
1422
- }, { Text: ur, Title: dr, Paragraph: fr, Link: pr } = ie, mr = {
1461
+ }, { Text: hr, Title: gr, Paragraph: _r, Link: vr } = ie, yr = {
1423
1462
  display: "h1",
1424
1463
  h1: "h1",
1425
1464
  h2: "h2",
@@ -1437,7 +1476,7 @@ var I = {
1437
1476
  metric: "span",
1438
1477
  helper: "span",
1439
1478
  link: "a"
1440
- }, hr = {
1479
+ }, br = {
1441
1480
  xs: "var(--font-size-xs)",
1442
1481
  sm: "var(--font-size-sm)",
1443
1482
  md: "var(--font-size-md)",
@@ -1446,18 +1485,18 @@ var I = {
1446
1485
  "2xl": "var(--font-size-2xl)",
1447
1486
  "3xl": "var(--font-size-3xl)",
1448
1487
  "4xl": "var(--font-size-4xl)"
1449
- }, gr = {
1488
+ }, xr = {
1450
1489
  regular: "var(--font-weight-regular)",
1451
1490
  medium: "var(--font-weight-medium)",
1452
1491
  semibold: "var(--font-weight-semibold)",
1453
1492
  bold: "var(--font-weight-bold)",
1454
1493
  extrabold: "var(--font-weight-extrabold)"
1455
- }, _r = {
1494
+ }, Sr = {
1456
1495
  tight: "var(--line-height-tight)",
1457
1496
  snug: "var(--line-height-snug)",
1458
1497
  normal: "var(--line-height-normal)",
1459
1498
  relaxed: "var(--line-height-relaxed)"
1460
- }, vr = {
1499
+ }, Cr = {
1461
1500
  primary: I.textPrimary,
1462
1501
  secondary: I.textSecondary,
1463
1502
  muted: I.textMuted,
@@ -1467,37 +1506,37 @@ var I = {
1467
1506
  danger: I.danger,
1468
1507
  success: I.success
1469
1508
  };
1470
- function yr(...e) {
1509
+ function wr(...e) {
1471
1510
  return e.filter(Boolean).join(" ");
1472
1511
  }
1473
- function br(e, t) {
1512
+ function Tr(e, t) {
1474
1513
  if (e != null) return t[e] || e;
1475
1514
  }
1476
- function xr(e, t) {
1477
- return t === "link" || e === "a" ? pr : e === "p" ? fr : [
1515
+ function Er(e, t) {
1516
+ return t === "link" || e === "a" ? vr : e === "p" ? _r : [
1478
1517
  "h1",
1479
1518
  "h2",
1480
1519
  "h3",
1481
1520
  "h4",
1482
1521
  "h5"
1483
- ].includes(e) ? dr : ur;
1522
+ ].includes(e) ? gr : hr;
1484
1523
  }
1485
- function Sr(e, t) {
1486
- let n = e || mr[t];
1524
+ function Dr(e, t) {
1525
+ let n = e || yr[t];
1487
1526
  if (n?.startsWith("h")) return Number(n.slice(1));
1488
1527
  }
1489
- function Cr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a, lineHeight: o, align: s, truncate: c = !1, display: l, className: u, style: d, children: f, ...p }) {
1490
- let m = t || e || mr[n] || "span", h = xr(m, n), g = Sr(m, n), _ = {
1491
- color: br(r, vr),
1492
- fontSize: br(i, hr),
1493
- fontWeight: br(a, gr),
1494
- lineHeight: br(o, _r),
1528
+ function Or({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a, lineHeight: o, align: s, truncate: c = !1, display: l, className: u, style: d, children: f, ...p }) {
1529
+ let m = t || e || yr[n] || "span", h = Er(m, n), g = Dr(m, n), _ = {
1530
+ color: Tr(r, Cr),
1531
+ fontSize: Tr(i, br),
1532
+ fontWeight: Tr(a, xr),
1533
+ lineHeight: Tr(o, Sr),
1495
1534
  display: l,
1496
1535
  ...d
1497
1536
  };
1498
1537
  return /* @__PURE__ */ C(h, {
1499
1538
  ...g ? { level: g } : {},
1500
- className: yr("app-typography", `app-typography--${n}`, r && vr[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
1539
+ className: wr("app-typography", `app-typography--${n}`, r && Cr[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
1501
1540
  style: _,
1502
1541
  ...p,
1503
1542
  children: f
@@ -1505,13 +1544,13 @@ function Cr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a,
1505
1544
  }
1506
1545
  //#endregion
1507
1546
  //#region src/components/TipTapEditor.jsx
1508
- var wr = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?)__$/s, "$1"), Tr = (e = []) => e.length > 0 && e.every((e) => /^:?-{3,}:?$/.test(String(e).trim())), Er = (e = "") => {
1547
+ var kr = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?)__$/s, "$1"), Ar = (e = []) => e.length > 0 && e.every((e) => /^:?-{3,}:?$/.test(String(e).trim())), jr = (e = "") => {
1509
1548
  let t = String(e || "").replace(/\r\n?/g, "\n").trim();
1510
1549
  if (!t) return null;
1511
1550
  let n = t.split("\n").filter((e) => e.trim().length > 0);
1512
1551
  if (n.length < 2) return null;
1513
1552
  if (n.some((e) => e.includes(" "))) {
1514
- let e = n.map((e) => e.split(" ").map(wr)), t = Math.max(...e.map((e) => e.length));
1553
+ let e = n.map((e) => e.split(" ").map(kr)), t = Math.max(...e.map((e) => e.length));
1515
1554
  return t < 2 ? null : {
1516
1555
  rows: e.map((e) => [...e, ...Array(t - e.length).fill("")]),
1517
1556
  hasHeaderRow: !0
@@ -1519,15 +1558,15 @@ var wr = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?
1519
1558
  }
1520
1559
  let r = n.filter((e) => e.includes("|")).map((e) => {
1521
1560
  let t = e.trim();
1522
- return t.startsWith("|") && (t = t.slice(1)), t.endsWith("|") && (t = t.slice(0, -1)), t.split("|").map(wr);
1561
+ return t.startsWith("|") && (t = t.slice(1)), t.endsWith("|") && (t = t.slice(0, -1)), t.split("|").map(kr);
1523
1562
  });
1524
1563
  if (r.length < 2) return null;
1525
- let i = r.findIndex(Tr), a = r.filter((e, t) => t !== i), o = Math.max(...a.map((e) => e.length));
1564
+ let i = r.findIndex(Ar), a = r.filter((e, t) => t !== i), o = Math.max(...a.map((e) => e.length));
1526
1565
  return a.length < 2 || o < 2 ? null : {
1527
1566
  rows: a.map((e) => [...e, ...Array(o - e.length).fill("")]),
1528
1567
  hasHeaderRow: i === 1
1529
1568
  };
1530
- }, Dr = (e, t, n) => {
1569
+ }, Mr = (e, t, n) => {
1531
1570
  let { table: r, tableRow: i, tableHeader: a, tableCell: o, paragraph: s } = e.nodes;
1532
1571
  if (!r || !i || !o || !s) return null;
1533
1572
  let c = t.map((t, r) => {
@@ -1551,7 +1590,7 @@ function L({ onClick: e, active: t, disabled: n, title: r, children: i }) {
1551
1590
  children: i
1552
1591
  });
1553
1592
  }
1554
- function Or({ editor: e, disabled: t }) {
1593
+ function Nr({ editor: e, disabled: t }) {
1555
1594
  return e ? /* @__PURE__ */ w("div", {
1556
1595
  className: `tte-toolbar${t ? " tte-toolbar--disabled" : ""}`,
1557
1596
  children: [
@@ -1691,7 +1730,7 @@ function Or({ editor: e, disabled: t }) {
1691
1730
  ]
1692
1731
  }) : null;
1693
1732
  }
1694
- function kr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
1733
+ function Pr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
1695
1734
  let i = h(e ?? ""), a = xe({
1696
1735
  extensions: [
1697
1736
  Se,
@@ -1713,9 +1752,9 @@ function kr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1713
1752
  editorProps: {
1714
1753
  attributes: { class: "tte-content" },
1715
1754
  handlePaste: (e, t) => {
1716
- let n = Er(t.clipboardData?.getData("text/plain") || "");
1755
+ let n = jr(t.clipboardData?.getData("text/plain") || "");
1717
1756
  if (!n) return !1;
1718
- let r = Dr(e.state.schema, n.rows, n.hasHeaderRow);
1757
+ let r = Mr(e.state.schema, n.rows, n.hasHeaderRow);
1719
1758
  if (!r) return !1;
1720
1759
  t.preventDefault();
1721
1760
  let i = e.state.tr.replaceSelectionWith(r, !1).scrollIntoView();
@@ -1736,7 +1775,7 @@ function kr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1736
1775
  }, [n, a]), /* @__PURE__ */ w("div", {
1737
1776
  className: `tte-wrapper${n ? " tte-wrapper--disabled" : ""}`,
1738
1777
  children: [
1739
- /* @__PURE__ */ C(Or, {
1778
+ /* @__PURE__ */ C(Nr, {
1740
1779
  editor: a,
1741
1780
  disabled: n
1742
1781
  }),
@@ -1750,7 +1789,7 @@ function kr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1750
1789
  }
1751
1790
  //#endregion
1752
1791
  //#region src/utils/modulePath.js
1753
- function Ar(e) {
1792
+ function Fr(e) {
1754
1793
  let t = String(e ?? "").trim();
1755
1794
  if (!t) return {
1756
1795
  baseModule: "",
@@ -1762,35 +1801,35 @@ function Ar(e) {
1762
1801
  nestedPath: r.map((e) => e.trim()).filter(Boolean).join(".")
1763
1802
  };
1764
1803
  }
1765
- function jr(e) {
1766
- return Ar(e).baseModule;
1804
+ function Ir(e) {
1805
+ return Fr(e).baseModule;
1767
1806
  }
1768
1807
  //#endregion
1769
1808
  //#region src/services/moduleDataApi.js
1770
- var Mr = "test-flows", Nr = "lms-flows";
1771
- function Pr(e) {
1809
+ var Lr = "test-flows", Rr = "lms-flows";
1810
+ function zr(e) {
1772
1811
  let t = (Array.isArray(e) ? e : [e]).flat().map((e) => e && typeof e == "object" ? e.value ?? e.label ?? e.name ?? "" : e).map((e) => String(e ?? "").trim().toLowerCase()).filter(Boolean);
1773
1812
  return t.includes("dice") ? "dice" : t.includes("internal") ? "internal" : t[0] || "";
1774
1813
  }
1775
- function Fr(...e) {
1814
+ function Br(...e) {
1776
1815
  for (let t of e) {
1777
1816
  let e = Number(t);
1778
1817
  if (Number.isFinite(e)) return e;
1779
1818
  }
1780
1819
  }
1781
- function Ir(e, t, n, r = "") {
1820
+ function Vr(e, t, n, r = "") {
1782
1821
  let i = e?.count, a = t?.count, o = String(r ?? "").trim().toLowerCase();
1783
1822
  if (i && typeof i == "object") {
1784
- let e = Fr(o ? i[o] : void 0, i.total, i.searchCount, i.count);
1823
+ let e = Br(o ? i[o] : void 0, i.total, i.searchCount, i.count);
1785
1824
  if (e !== void 0) return e;
1786
1825
  }
1787
1826
  if (a && typeof a == "object") {
1788
- let e = Fr(o ? a[o] : void 0, a.total, a.searchCount, a.count);
1827
+ let e = Br(o ? a[o] : void 0, a.total, a.searchCount, a.count);
1789
1828
  if (e !== void 0) return e;
1790
1829
  }
1791
- return Fr(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
1830
+ return Br(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
1792
1831
  }
1793
- function Lr(e, t) {
1832
+ function Hr(e, t) {
1794
1833
  let n = {};
1795
1834
  return [e?.count, t?.count].forEach((e) => {
1796
1835
  !e || typeof e != "object" || Object.entries(e).forEach(([e, t]) => {
@@ -1799,9 +1838,9 @@ function Lr(e, t) {
1799
1838
  });
1800
1839
  }), n;
1801
1840
  }
1802
- async function Rr(e, t, n = "", r = 50, i = 0, a = {}) {
1841
+ async function Ur(e, t, n = "", r = 50, i = 0, a = {}) {
1803
1842
  let c = new URLSearchParams({
1804
- module: jr(e),
1843
+ module: Ir(e),
1805
1844
  field: t,
1806
1845
  value: n,
1807
1846
  limit: String(r),
@@ -1809,9 +1848,9 @@ async function Rr(e, t, n = "", r = 50, i = 0, a = {}) {
1809
1848
  });
1810
1849
  return a.dataSource && c.set("dataSource", a.dataSource), a.masterName && c.set("masterName", a.masterName), a.groupName && c.set("groupName", a.groupName), o(s, `/filter-dropdown-values?${c}`);
1811
1850
  }
1812
- async function zr(e, t = 10, n = 0, r = {}) {
1851
+ async function Wr(e, t = 10, n = 0, r = {}) {
1813
1852
  let { scope: i = "", sort: o = "", sortDir: c = "", filters: l = [] } = r;
1814
- if (e === Mr) {
1853
+ if (e === Lr) {
1815
1854
  let { getTestFlows: e } = await import("./index.js").then((e) => e.t), r = await e({
1816
1855
  limit: t,
1817
1856
  offset: n
@@ -1828,7 +1867,7 @@ async function zr(e, t = 10, n = 0, r = {}) {
1828
1867
  }]
1829
1868
  };
1830
1869
  }
1831
- if (e === Nr) {
1870
+ if (e === Rr) {
1832
1871
  let { getLmsFlows: e } = await import("./index.js").then((e) => e.t), r = await e({
1833
1872
  limit: t,
1834
1873
  offset: n
@@ -1846,13 +1885,13 @@ async function zr(e, t = 10, n = 0, r = {}) {
1846
1885
  };
1847
1886
  }
1848
1887
  let u = new URLSearchParams({
1849
- module: jr(e),
1888
+ module: Ir(e),
1850
1889
  limit: String(t),
1851
1890
  offset: String(n)
1852
1891
  }), d = String(i ?? "").trim();
1853
1892
  return d && u.set("scope", d), o && u.set("sort", o), c && u.set("sortDir", c), Array.isArray(l) && l.some((e) => e?.field) && u.set("filters", JSON.stringify(l)), a(s, `/module-data-list?${u.toString()}`);
1854
1893
  }
1855
- async function Br(e, t) {
1894
+ async function Gr(e, t) {
1856
1895
  if (!e || !t) return null;
1857
1896
  try {
1858
1897
  let n = await a(s, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`), r = n?.data?.data ?? n?.data ?? n, i = Array.isArray(r) ? r[0] : r;
@@ -1861,14 +1900,14 @@ async function Br(e, t) {
1861
1900
  return null;
1862
1901
  }
1863
1902
  }
1864
- async function Vr(e, t = {}, n = {}, r = {}) {
1865
- let { limit: i = 10, offset: o = 0 } = n, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = r, f = Pr(u || String(t.selectedSource ?? "").split(",")), p = new URLSearchParams();
1866
- p.append("module", jr(e)), p.append("limit", String(i)), p.append("offset", String(o)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(t).forEach(([e, t]) => {
1903
+ async function Kr(e, t = {}, n = {}, r = {}) {
1904
+ let { limit: i = 10, offset: o = 0 } = n, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = r, f = zr(u || String(t.selectedSource ?? "").split(",")), p = new URLSearchParams();
1905
+ p.append("module", Ir(e)), p.append("limit", String(i)), p.append("offset", String(o)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(t).forEach(([e, t]) => {
1867
1906
  if (t == null || t === "") return;
1868
1907
  let n = t;
1869
1908
  n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), p.append(e, n);
1870
1909
  });
1871
- let m = await a(s, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Ir(m, h, g, f), v = Lr(m, h);
1910
+ let m = await a(s, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Vr(m, h, g, f), v = Hr(m, h);
1872
1911
  f && v[f] === void 0 && Number.isFinite(_) && (v[f] = _);
1873
1912
  let y = g.some((e) => [
1874
1913
  e?.sourceType,
@@ -1881,9 +1920,9 @@ async function Vr(e, t = {}, n = {}, r = {}) {
1881
1920
  let { transformDiceResponseToInternalFormat: e } = await import("./diceCandidateMapper-DqBO4EhL.js").then((e) => e.t);
1882
1921
  b = e(m, m)?.data?.data ?? g;
1883
1922
  } catch (e) {
1884
- console.error("[searchModuleData] Dice transformation failed:", e), b = g.map(Wr);
1923
+ console.error("[searchModuleData] Dice transformation failed:", e), b = g.map(Yr);
1885
1924
  }
1886
- else b = Array.isArray(g) ? g.map(Wr) : [];
1925
+ else b = Array.isArray(g) ? g.map(Yr) : [];
1887
1926
  return {
1888
1927
  rows: b,
1889
1928
  total: Number(_) || 0,
@@ -1896,10 +1935,10 @@ async function Vr(e, t = {}, n = {}, r = {}) {
1896
1935
  columnActions: h?.columnActions ?? []
1897
1936
  };
1898
1937
  }
1899
- function Hr(e, t) {
1938
+ function qr(e, t) {
1900
1939
  return String(t).split(".").reduce((e, t) => e?.[t], e);
1901
1940
  }
1902
- function Ur(e, t, n) {
1941
+ function Jr(e, t, n) {
1903
1942
  let r = String(t).split(".").filter(Boolean);
1904
1943
  if (!r.length) return e;
1905
1944
  let i = { ...e }, a = i, o = e;
@@ -1908,7 +1947,7 @@ function Ur(e, t, n) {
1908
1947
  a[e] = n, a = n, o = t;
1909
1948
  }), a[r[r.length - 1]] = n, i;
1910
1949
  }
1911
- function Wr(e) {
1950
+ function Yr(e) {
1912
1951
  if (!e || typeof e != "object") return e;
1913
1952
  let t = [
1914
1953
  "skills",
@@ -1918,11 +1957,11 @@ function Wr(e) {
1918
1957
  "customFields.diceProfileData.skills"
1919
1958
  ], n = e, r = null;
1920
1959
  if (t.forEach((e) => {
1921
- let t = Hr(n, e);
1960
+ let t = qr(n, e);
1922
1961
  if (t == null) return;
1923
1962
  let i = c(t);
1924
- i.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= i, n = Ur(n, e, i));
1925
- }), r && Hr(n, "skills") === void 0 && (n = Ur(n, "skills", r)), [
1963
+ i.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= i, n = Jr(n, e, i));
1964
+ }), r && qr(n, "skills") === void 0 && (n = Jr(n, "skills", r)), [
1926
1965
  n?.sourceType,
1927
1966
  n?.profileSource,
1928
1967
  n?.selectedSource,
@@ -1941,10 +1980,10 @@ function Wr(e) {
1941
1980
  }
1942
1981
  //#endregion
1943
1982
  //#region src/services/documentApi.js
1944
- function Gr(e) {
1983
+ function Xr(e) {
1945
1984
  return String(e ?? "").replace(/^__mw__.*?__/, "").replace(/\[\d+\]$/, "").trim() || "file";
1946
1985
  }
1947
- async function Kr(e, t, n = [], i = {}) {
1986
+ async function Zr(e, t, n = [], i = {}) {
1948
1987
  if (!e) throw Error("moduleName is required to upload documents");
1949
1988
  if (!t) throw Error("refId (created record id) is required to upload documents");
1950
1989
  if (!n.length) return {
@@ -1954,7 +1993,7 @@ async function Kr(e, t, n = [], i = {}) {
1954
1993
  let a = await r(), o = new FormData();
1955
1994
  n.forEach(({ formKey: e, file: t }) => {
1956
1995
  let n = t?.name ?? void 0;
1957
- o.append(Gr(e), t, n);
1996
+ o.append(Xr(e), t, n);
1958
1997
  }), i && Object.keys(i).length > 0 && o.append("metadata", JSON.stringify(i));
1959
1998
  let c = new URLSearchParams({
1960
1999
  module: e,
@@ -1970,7 +2009,7 @@ async function Kr(e, t, n = [], i = {}) {
1970
2009
  }
1971
2010
  return u?.data ?? u;
1972
2011
  }
1973
- async function qr(e, t, n = "") {
2012
+ async function Qr(e, t, n = "") {
1974
2013
  if (!e) throw Error("moduleName is required to fetch documents");
1975
2014
  if (!t) throw Error("refId is required to fetch documents");
1976
2015
  let r = new URLSearchParams({
@@ -1984,7 +2023,7 @@ async function qr(e, t, n = "") {
1984
2023
  total: o?.total ?? 0
1985
2024
  };
1986
2025
  }
1987
- async function Jr(e) {
2026
+ async function $r(e) {
1988
2027
  if (!e) return !1;
1989
2028
  try {
1990
2029
  return await a(s, `/documents/${encodeURIComponent(String(e))}`, { method: "DELETE" }), !0;
@@ -1994,36 +2033,36 @@ async function Jr(e) {
1994
2033
  }
1995
2034
  //#endregion
1996
2035
  //#region src/services/detailedViewApi.js
1997
- var Yr = {
2036
+ var ei = {
1998
2037
  job: { fetchUrl: (e) => `${n}/edit/detailed-view/${encodeURIComponent(e)}` },
1999
2038
  candidate: { fetchUrl: (e) => `${t}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
2000
2039
  candidates: { fetchUrl: (e) => `${t}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
2001
2040
  submission: { fetchUrl: (t) => `${e}/edit/detailed-view?_id=${encodeURIComponent(t)}` }
2002
2041
  };
2003
- async function Xr(e, t) {
2042
+ async function ti(e, t) {
2004
2043
  let n = String(e ?? "").trim().toLowerCase();
2005
2044
  if (n === "job" || n === "jobs") {
2006
2045
  let { getJobDetailView: e } = await import("./index.js").then((e) => e.r);
2007
2046
  return e(t);
2008
2047
  }
2009
- if (n === "candidate" || n === "candidates") return Qr(n === "candidate" ? "candidate" : "candidates", t);
2048
+ if (n === "candidate" || n === "candidates") return ri(n === "candidate" ? "candidate" : "candidates", t);
2010
2049
  let r = new URLSearchParams({
2011
2050
  module: String(e ?? ""),
2012
2051
  id: String(t)
2013
2052
  });
2014
2053
  return a(s, `/module-data-detail?${r.toString()}`);
2015
2054
  }
2016
- async function Zr(e) {
2055
+ async function ni(e) {
2017
2056
  let t = await a(s, `/module-actions?module=${encodeURIComponent(e)}`), n = t?.data ?? t ?? {};
2018
2057
  return {
2019
2058
  actions: Array.isArray(n.actions) ? n.actions : [],
2020
2059
  actionRules: Array.isArray(n.actionRules) ? n.actionRules : []
2021
2060
  };
2022
2061
  }
2023
- async function Qr(e, t) {
2062
+ async function ri(e, t) {
2024
2063
  if (!e) throw Error("module is required");
2025
2064
  if (!t) throw Error("id is required");
2026
- let n = Yr[e];
2065
+ let n = ei[e];
2027
2066
  if (!n) throw Error(`No edit config for module: ${e}`);
2028
2067
  let i = await r(), a = await fetch(n.fetchUrl(t), {
2029
2068
  method: "GET",
@@ -2036,7 +2075,7 @@ async function Qr(e, t) {
2036
2075
  let o = await a.json();
2037
2076
  return o.data ?? o;
2038
2077
  }
2039
- async function $r(e, t, n, i = []) {
2078
+ async function ii(e, t, n, i = []) {
2040
2079
  if (!e) throw Error("module is required");
2041
2080
  if (!t) throw Error("id is required");
2042
2081
  let a = await r(), o = new FormData();
@@ -2049,15 +2088,15 @@ async function $r(e, t, n, i = []) {
2049
2088
  if (!c.ok) {
2050
2089
  let e = await c.text();
2051
2090
  console.error("[updateRecord] Error response:", e);
2052
- let t = Error(ti(e) || `API ${c.status}: ${c.statusText}`);
2053
- throw t.status = c.status, t.response = ei(e), t;
2091
+ let t = Error(oi(e) || `API ${c.status}: ${c.statusText}`);
2092
+ throw t.status = c.status, t.response = ai(e), t;
2054
2093
  }
2055
2094
  let { invalidateFormGroupsCache: l } = await import("./formGroupsCache-JeC59oNe.js").then((e) => e.n);
2056
2095
  l();
2057
2096
  let u = await c.json();
2058
2097
  return u.data ?? u;
2059
2098
  }
2060
- function ei(e) {
2099
+ function ai(e) {
2061
2100
  let t = String(e ?? "").trim();
2062
2101
  if (!t.startsWith("{")) return null;
2063
2102
  try {
@@ -2066,7 +2105,7 @@ function ei(e) {
2066
2105
  return null;
2067
2106
  }
2068
2107
  }
2069
- function ti(e) {
2108
+ function oi(e) {
2070
2109
  let t = String(e ?? "").trim();
2071
2110
  if (!t.startsWith("{")) return t;
2072
2111
  try {
@@ -2076,22 +2115,22 @@ function ti(e) {
2076
2115
  return t;
2077
2116
  }
2078
2117
  }
2079
- var ni = (e) => e?.data ?? e;
2080
- async function ri(e, t) {
2118
+ var si = (e) => e?.data ?? e;
2119
+ async function ci(e, t) {
2081
2120
  if (!e || !t) return [];
2082
2121
  let n = new URLSearchParams({
2083
2122
  module: e,
2084
2123
  id: String(t)
2085
- }), r = ni(await a(s, `/module-activity?${n.toString()}`));
2124
+ }), r = si(await a(s, `/module-activity?${n.toString()}`));
2086
2125
  return Array.isArray(r) ? r : [];
2087
2126
  }
2088
- async function ii(e) {
2127
+ async function li(e) {
2089
2128
  if (!e) return [];
2090
- let t = ni(await a(s, `/notes?relatedId=${encodeURIComponent(e)}`));
2129
+ let t = si(await a(s, `/notes?relatedId=${encodeURIComponent(e)}`));
2091
2130
  return Array.isArray(t) ? t : [];
2092
2131
  }
2093
- async function ai({ relatedId: e, notes: t, title: n, notesFor: r }) {
2094
- return ni(await a(s, "/notes", {
2132
+ async function ui({ relatedId: e, notes: t, title: n, notesFor: r }) {
2133
+ return si(await a(s, "/notes", {
2095
2134
  method: "POST",
2096
2135
  body: JSON.stringify({
2097
2136
  relatedId: e,
@@ -2103,19 +2142,19 @@ async function ai({ relatedId: e, notes: t, title: n, notesFor: r }) {
2103
2142
  }
2104
2143
  //#endregion
2105
2144
  //#region src/utils/roleFormPermissionGate.js
2106
- function oi(e, t) {
2145
+ function di(e, t) {
2107
2146
  if (!e) return !0;
2108
2147
  let n = e.find((e) => e.name === t);
2109
2148
  return !n || n.enabled !== !1;
2110
2149
  }
2111
- function si(e, t, n) {
2150
+ function fi(e, t, n) {
2112
2151
  if (!e) return !0;
2113
2152
  let r = e.find((e) => e.name === t);
2114
2153
  if (!r) return !0;
2115
2154
  let i = r.fields?.find((e) => e.field === n);
2116
2155
  return !i || i.locked ? !0 : i.enabled !== !1;
2117
2156
  }
2118
- function ci(e, t, n) {
2157
+ function pi(e, t, n) {
2119
2158
  if (!e) return !0;
2120
2159
  let r = e.find((e) => e.name === t);
2121
2160
  if (!r) return !0;
@@ -2125,7 +2164,7 @@ function ci(e, t, n) {
2125
2164
  }
2126
2165
  //#endregion
2127
2166
  //#region src/components/form/inputSecurity.js
2128
- var li = [
2167
+ var mi = [
2129
2168
  "p",
2130
2169
  "br",
2131
2170
  "strong",
@@ -2147,12 +2186,12 @@ var li = [
2147
2186
  "a",
2148
2187
  "code",
2149
2188
  "pre"
2150
- ], ui = [
2189
+ ], hi = [
2151
2190
  "href",
2152
2191
  "title",
2153
2192
  "target",
2154
2193
  "rel"
2155
- ], di = /[\u200B-\u200D\u2060\uFEFF]/g, fi = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, pi = /^[\p{L}\p{M}\p{N} .'-]+$/u, mi = /^\+?[0-9 ()-]+$/, hi = /^-?(?:\d+|\d*\.\d+)$/, gi = [
2194
+ ], gi = /[\u200B-\u200D\u2060\uFEFF]/g, _i = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, vi = /^[\p{L}\p{M}\p{N} .'-]+$/u, yi = /^\+?[0-9 ()-]+$/, bi = /^-?(?:\d+|\d*\.\d+)$/, xi = [
2156
2195
  {
2157
2196
  re: /<\s*\/?\s*(?:script|iframe|object|embed|svg|img|form|input|style|link|meta|base|applet|frame|frameset)\b/i,
2158
2197
  message: "HTML/script content is not allowed"
@@ -2179,12 +2218,12 @@ var li = [
2179
2218
  plainOnly: !0
2180
2219
  }
2181
2220
  ];
2182
- function _i(e) {
2221
+ function Si(e) {
2183
2222
  if (typeof document > "u") return e;
2184
2223
  let t = document.createElement("textarea");
2185
2224
  return t.innerHTML = e, t.value;
2186
2225
  }
2187
- function vi(e) {
2226
+ function Ci(e) {
2188
2227
  let t = String(e ?? "");
2189
2228
  for (let e = 0; e < 2; e += 1) try {
2190
2229
  let e = decodeURIComponent(t);
@@ -2193,12 +2232,12 @@ function vi(e) {
2193
2232
  } catch {
2194
2233
  break;
2195
2234
  }
2196
- return t = _i(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
2235
+ return t = Si(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
2197
2236
  }
2198
- function yi(e) {
2237
+ function wi(e) {
2199
2238
  return ke.sanitize(String(e ?? ""), {
2200
- ALLOWED_TAGS: li,
2201
- ALLOWED_ATTR: ui,
2239
+ ALLOWED_TAGS: mi,
2240
+ ALLOWED_ATTR: hi,
2202
2241
  ALLOW_DATA_ATTR: !1,
2203
2242
  FORBID_TAGS: [
2204
2243
  "script",
@@ -2218,35 +2257,35 @@ function yi(e) {
2218
2257
  ]
2219
2258
  });
2220
2259
  }
2221
- function bi(e) {
2260
+ function Ti(e) {
2222
2261
  let t = (e.validations ?? []).find((e) => e?.type === "max"), n = Number(e.validator?.maxLength ?? t?.value ?? e.maxLength);
2223
2262
  return Number.isFinite(n) && n > 0 ? n : e.type === "email" || e.formatter === "email" ? 255 : e.formatter === "phone" || e.formatter === "digits" ? 32 : e.formatter === "name" ? 100 : e.type === "text-editor" ? 5e4 : (e.type, 5e3);
2224
2263
  }
2225
- function xi(e) {
2264
+ function Ei(e) {
2226
2265
  return e.type === "textarea" || e.type === "text-editor";
2227
2266
  }
2228
- function Si(e, t = {}) {
2267
+ function Di(e, t = {}) {
2229
2268
  if (typeof e != "string") return e;
2230
- if (t.type === "text-editor") return yi(e.normalize("NFC"));
2231
- let n = e.normalize("NFC").replace(di, "").replace(/\u00A0/g, " ").replace(fi, "");
2232
- return n = xi(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
2269
+ if (t.type === "text-editor") return wi(e.normalize("NFC"));
2270
+ let n = e.normalize("NFC").replace(gi, "").replace(/\u00A0/g, " ").replace(_i, "");
2271
+ return n = Ei(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
2233
2272
  }
2234
- function Ci(e, t = {}) {
2273
+ function Oi(e, t = {}) {
2235
2274
  if (typeof e != "string" || e === "") return null;
2236
- let n = t.label || t.field || "Field", r = vi(e);
2275
+ let n = t.label || t.field || "Field", r = Ci(e);
2237
2276
  if (r.includes("\0") || r.includes("\0")) return `${n} contains a null byte`;
2238
- let i = t.type === "text-editor", a = gi.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
2277
+ let i = t.type === "text-editor", a = xi.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
2239
2278
  if (a) return `${n}: ${a.message}`;
2240
- let o = Si(e, t);
2241
- return [...o].length > bi(t) ? `${n} is too long` : t.formatter === "name" && o && !pi.test(o) ? `${n} allows only letters, numbers, spaces, apostrophes, hyphens and periods` : (t.formatter === "phone" || t.formatter === "digits") && o && !mi.test(o) ? `${n} contains invalid phone characters` : t.type === "number" && o && !hi.test(o) ? `${n} must contain only a valid number` : (t.type === "url" || t.formatter === "url") && o && !/^https?:\/\//i.test(o) ? `${n} must use http:// or https://` : null;
2279
+ let o = Di(e, t);
2280
+ return [...o].length > Ti(t) ? `${n} is too long` : t.formatter === "name" && o && !vi.test(o) ? `${n} allows only letters, numbers, spaces, apostrophes, hyphens and periods` : (t.formatter === "phone" || t.formatter === "digits") && o && !yi.test(o) ? `${n} contains invalid phone characters` : t.type === "number" && o && !bi.test(o) ? `${n} must contain only a valid number` : (t.type === "url" || t.formatter === "url") && o && !/^https?:\/\//i.test(o) ? `${n} must use http:// or https://` : null;
2242
2281
  }
2243
- function wi(e) {
2282
+ function ki(e) {
2244
2283
  return { validator: (t, n) => {
2245
- let r = (Array.isArray(n) ? n : [n]).map((t) => Ci(t, e)).find(Boolean);
2284
+ let r = (Array.isArray(n) ? n : [n]).map((t) => Oi(t, e)).find(Boolean);
2246
2285
  return r ? Promise.reject(Error(r)) : Promise.resolve();
2247
2286
  } };
2248
2287
  }
2249
- function Ti(e = []) {
2288
+ function Ai(e = []) {
2250
2289
  let t = /* @__PURE__ */ new Map();
2251
2290
  return e.forEach((e) => {
2252
2291
  (e.fields ?? []).forEach((n) => {
@@ -2258,12 +2297,12 @@ function Ti(e = []) {
2258
2297
  });
2259
2298
  }), t;
2260
2299
  }
2261
- function Ei(e, t = []) {
2262
- let n = Ti(t), r = (e, t = "") => {
2300
+ function ji(e, t = []) {
2301
+ let n = Ai(t), r = (e, t = "") => {
2263
2302
  if (typeof e == "string") {
2264
- let r = n.get(t) ?? {}, i = Ci(e, r);
2303
+ let r = n.get(t) ?? {}, i = Oi(e, r);
2265
2304
  if (i) throw Error(i);
2266
- return Si(e, r);
2305
+ return Di(e, r);
2267
2306
  }
2268
2307
  return Array.isArray(e) ? e.map((e) => r(e, `${t}[]`)) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, n]) => {
2269
2308
  if (e.startsWith("$") || e.includes(".") || e.includes("\0")) throw Error(`Unsafe object key: ${e}`);
@@ -2275,23 +2314,23 @@ function Ei(e, t = []) {
2275
2314
  }
2276
2315
  //#endregion
2277
2316
  //#region src/components/form/validationOverride.js
2278
- var Di = (e) => e === !0 || e === 1 || e === "1" || e === "true";
2279
- function Oi(e) {
2317
+ var Mi = (e) => e === !0 || e === 1 || e === "1" || e === "true";
2318
+ function Ni(e) {
2280
2319
  let t = e?.overrideCheckbox;
2281
- return !t || typeof t != "object" ? null : Ai(e).size > 0 ? t : null;
2320
+ return !t || typeof t != "object" ? null : Fi(e).size > 0 ? t : null;
2282
2321
  }
2283
- function ki(e) {
2322
+ function Pi(e) {
2284
2323
  return String(e?.overrideCheckbox?.field ?? "").trim() || `${String(e?.field ?? "").replace(/\./g, "_")}__override`;
2285
2324
  }
2286
- function Ai(e) {
2325
+ function Fi(e) {
2287
2326
  let t = e?.overrideCheckbox?.skipValidations, n = Array.isArray(t) ? t : String(t ?? "").split(",");
2288
2327
  return new Set(n.map((e) => String(e ?? "").trim()).filter(Boolean));
2289
2328
  }
2290
- function ji(e) {
2329
+ function Ii(e) {
2291
2330
  return e?.overrideCheckbox?.store !== !1;
2292
2331
  }
2293
- function Mi(e, t, n) {
2294
- let r = ki(e);
2332
+ function Li(e, t, n) {
2333
+ let r = Pi(e);
2295
2334
  if (typeof n == "function") {
2296
2335
  let e = n(r);
2297
2336
  if (Array.isArray(e) && e.length) return [...e, r];
@@ -2302,27 +2341,27 @@ function Mi(e, t, n) {
2302
2341
  r
2303
2342
  ] : [r];
2304
2343
  }
2305
- function Ni(e, t) {
2344
+ function Ri(e, t) {
2306
2345
  return (n) => {
2307
2346
  let r = !1;
2308
2347
  try {
2309
- r = Di(n?.getFieldValue?.(t));
2348
+ r = Mi(n?.getFieldValue?.(t));
2310
2349
  } catch {
2311
2350
  r = !1;
2312
2351
  }
2313
2352
  return r ? {} : e;
2314
2353
  };
2315
2354
  }
2316
- function Pi(e, t, n, r) {
2317
- if (!Oi(e)) return r;
2318
- let i = Ai(e), a = Mi(e, t, n);
2355
+ function zi(e, t, n, r) {
2356
+ if (!Ni(e)) return r;
2357
+ let i = Fi(e), a = Li(e, t, n);
2319
2358
  return (e) => {
2320
2359
  let t = r(e), n = typeof e == "string" ? e : e?.type;
2321
- return i.has(n) ? Ni(t, a) : t;
2360
+ return i.has(n) ? Ri(t, a) : t;
2322
2361
  };
2323
2362
  }
2324
- function Fi(e) {
2325
- let t = Oi(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
2363
+ function Bi(e) {
2364
+ let t = Ni(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
2326
2365
  return {
2327
2366
  tone: t.tone ?? "overwrite",
2328
2367
  title: t.confirmTitle || "Remove the validation on this field?",
@@ -2333,12 +2372,12 @@ function Fi(e) {
2333
2372
  }
2334
2373
  //#endregion
2335
2374
  //#region src/components/form/optionMatching.js
2336
- function Ii(e) {
2375
+ function Vi(e) {
2337
2376
  return String(e ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "");
2338
2377
  }
2339
- function Li(e) {
2378
+ function Hi(e) {
2340
2379
  let t = /* @__PURE__ */ new Map(), n = (e, n) => {
2341
- let r = Ii(e);
2380
+ let r = Vi(e);
2342
2381
  r && !t.has(r) && t.set(r, n);
2343
2382
  };
2344
2383
  return (Array.isArray(e?.options) ? e.options : []).forEach((e) => {
@@ -2346,37 +2385,37 @@ function Li(e) {
2346
2385
  let t = typeof e == "object" ? e.value : e;
2347
2386
  t != null && t !== "" && (n(t, t), typeof e == "object" && e.label !== void 0 && n(e.label, t));
2348
2387
  }), Object.entries(e?.optionAliases ?? {}).forEach(([e, r]) => {
2349
- let i = t.get(Ii(r));
2388
+ let i = t.get(Vi(r));
2350
2389
  i !== void 0 && n(e, i);
2351
2390
  }), t;
2352
2391
  }
2353
- var Ri = (e) => Array.isArray(e?.options) && e.options.length > 0;
2354
- function zi(e, t) {
2392
+ var Ui = (e) => Array.isArray(e?.options) && e.options.length > 0;
2393
+ function Wi(e, t) {
2355
2394
  if (t == null || t === "" || typeof t == "object") return t;
2356
- let n = e.get(Ii(t));
2395
+ let n = e.get(Vi(t));
2357
2396
  return n === void 0 ? t : n;
2358
2397
  }
2359
- function Bi(e, t) {
2360
- if (!Ri(e)) return t;
2361
- let n = Li(e);
2362
- return n.size === 0 ? t : Array.isArray(t) ? t.map((e) => zi(n, e)) : zi(n, t);
2398
+ function Gi(e, t) {
2399
+ if (!Ui(e)) return t;
2400
+ let n = Hi(e);
2401
+ return n.size === 0 ? t : Array.isArray(t) ? t.map((e) => Wi(n, e)) : Wi(n, t);
2363
2402
  }
2364
2403
  //#endregion
2365
2404
  //#region src/components/form/payloadTransformer.js
2366
- var R = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Vi = (e) => e === !0 || e === 1 || e === "1", z = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !Hi(e);
2367
- function Hi(e) {
2405
+ var R = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Ki = (e) => e === !0 || e === 1 || e === "1", z = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !qi(e);
2406
+ function qi(e) {
2368
2407
  return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
2369
2408
  }
2370
- function Ui(e) {
2371
- return Hi(e) || e instanceof Date;
2409
+ function Ji(e) {
2410
+ return qi(e) || e instanceof Date;
2372
2411
  }
2373
- function Wi(e) {
2374
- return e instanceof Date ? e.toISOString() : Hi(e) ? e.isValid() ? e.toISOString() : null : e;
2412
+ function Yi(e) {
2413
+ return e instanceof Date ? e.toISOString() : qi(e) ? e.isValid() ? e.toISOString() : null : e;
2375
2414
  }
2376
- function Gi(e, t) {
2377
- if (!rr(t)) return Wi(e);
2378
- let n = ir(e);
2379
- return n ? n.toISOString() : Wi(e);
2415
+ function Xi(e, t) {
2416
+ if (!cr(t)) return Yi(e);
2417
+ let n = lr(e);
2418
+ return n ? n.toISOString() : Yi(e);
2380
2419
  }
2381
2420
  function B(e, t) {
2382
2421
  if (!t) return;
@@ -2401,7 +2440,7 @@ function U(e, t, n) {
2401
2440
  }
2402
2441
  return i[r[r.length - 1]] = n, e;
2403
2442
  }
2404
- function Ki(e, t, n) {
2443
+ function Zi(e, t, n) {
2405
2444
  let r = String(t).split("."), i = e;
2406
2445
  for (let e = 0; e < r.length - 1; e += 1) {
2407
2446
  let t = r[e];
@@ -2413,24 +2452,24 @@ function Ki(e, t, n) {
2413
2452
  ...i[a]
2414
2453
  } : n, e;
2415
2454
  }
2416
- function qi(e) {
2455
+ function Qi(e) {
2417
2456
  let t = Array.isArray(e) ? e : e == null ? [] : [e];
2418
2457
  if (!t.length || t.some((e) => e?.originFileObj)) return;
2419
2458
  let n = t.map((e) => e?.stored).filter((e) => e != null);
2420
2459
  if (n.length) return n.length === 1 && t.length === 1 ? n[0] : n;
2421
2460
  }
2422
- function Ji(e, t) {
2461
+ function $i(e, t) {
2423
2462
  return Object.entries(t ?? {}).forEach(([t, n]) => {
2424
- z(n) && z(e[t]) ? Ji(e[t], n) : e[t] = n;
2463
+ z(n) && z(e[t]) ? $i(e[t], n) : e[t] = n;
2425
2464
  }), e;
2426
2465
  }
2427
- function Yi(e, t) {
2466
+ function ea(e, t) {
2428
2467
  let n = e.options ?? e.values ?? [];
2429
2468
  for (let e of n) if (typeof e == "string") {
2430
2469
  if (e === t) return e;
2431
2470
  } else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
2432
2471
  }
2433
- function Xi(e, t) {
2472
+ function ta(e, t) {
2434
2473
  if (z(e)) {
2435
2474
  let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
2436
2475
  return {
@@ -2440,10 +2479,10 @@ function Xi(e, t) {
2440
2479
  }
2441
2480
  return {
2442
2481
  value: e,
2443
- label: Yi(t, e) ?? e
2482
+ label: ea(t, e) ?? e
2444
2483
  };
2445
2484
  }
2446
- function Zi(e = {}) {
2485
+ function na(e = {}) {
2447
2486
  if (e.dataType && e.dataType !== "auto") return e.dataType;
2448
2487
  if (e.multiSelect || e.mode === "multiple" || e.addRow) return "array";
2449
2488
  switch (e.type) {
@@ -2454,13 +2493,13 @@ function Zi(e = {}) {
2454
2493
  }
2455
2494
  }
2456
2495
  function W(e, t, n = {}) {
2457
- if (Ui(e)) {
2458
- if (t === "string") return Gi(e, n);
2496
+ if (Ji(e)) {
2497
+ if (t === "string") return Xi(e, n);
2459
2498
  if (t === "number") {
2460
- let t = Hi(e) ? e.valueOf() : e.getTime();
2499
+ let t = qi(e) ? e.valueOf() : e.getTime();
2461
2500
  return Number.isNaN(t) ? null : t;
2462
2501
  }
2463
- if (t === "date" || t === "auto" || !t) return Gi(e, n);
2502
+ if (t === "date" || t === "auto" || !t) return Xi(e, n);
2464
2503
  }
2465
2504
  switch (t) {
2466
2505
  case "string": return e == null ? "" : String(e);
@@ -2475,14 +2514,14 @@ function W(e, t, n = {}) {
2475
2514
  return t = Array.isArray(e) ? e : R(e) ? [] : typeof e == "string" && e.includes(",") ? e.split(",").map((e) => e.trim()).filter(Boolean) : [e], n.elementType ? t.map((e) => W(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
2476
2515
  }
2477
2516
  case "object": return z(e), e;
2478
- case "date": return Gi(e, n);
2517
+ case "date": return Xi(e, n);
2479
2518
  case "custom":
2480
2519
  case "auto":
2481
2520
  case void 0:
2482
2521
  default: return e;
2483
2522
  }
2484
2523
  }
2485
- var Qi = {
2524
+ var ra = {
2486
2525
  firstChecked: (e) => Array.isArray(e) ? e[0] : e,
2487
2526
  csvToArray: (e) => typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : e,
2488
2527
  arrayToCsv: (e) => Array.isArray(e) ? e.join(",") : e,
@@ -2490,11 +2529,11 @@ var Qi = {
2490
2529
  upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
2491
2530
  lower: (e) => typeof e == "string" ? e.toLowerCase() : e
2492
2531
  };
2493
- function $i(e, t) {
2532
+ function ia(e, t) {
2494
2533
  if (!t) return e;
2495
2534
  let n = t;
2496
2535
  if (typeof n == "string") {
2497
- if (Qi[n]) return Qi[n](e);
2536
+ if (ra[n]) return ra[n](e);
2498
2537
  try {
2499
2538
  n = JSON.parse(n);
2500
2539
  } catch {
@@ -2502,14 +2541,14 @@ function $i(e, t) {
2502
2541
  }
2503
2542
  }
2504
2543
  let r = e;
2505
- if (n.name && Qi[n.name] && (r = Qi[n.name](r)), n.map && typeof n.map == "object") {
2544
+ if (n.name && ra[n.name] && (r = ra[n.name](r)), n.map && typeof n.map == "object") {
2506
2545
  let e = String(Array.isArray(r) ? r[0] : r);
2507
2546
  Object.prototype.hasOwnProperty.call(n.map, e) ? r = n.map[e] : n.default !== void 0 && (r = n.default);
2508
2547
  }
2509
2548
  return r;
2510
2549
  }
2511
- var ea = /\{\{\s*([\w.]+)\s*\}\}/g;
2512
- function ta(e, t) {
2550
+ var aa = /\{\{\s*([\w.]+)\s*\}\}/g;
2551
+ function oa(e, t) {
2513
2552
  let [n, ...r] = e.split("."), i;
2514
2553
  if (n === "value") i = t.value;
2515
2554
  else if (n === "label") i = t.label;
@@ -2517,24 +2556,24 @@ function ta(e, t) {
2517
2556
  else return;
2518
2557
  return r.length ? B(i, r.join(".")) : i;
2519
2558
  }
2520
- function na(e, t) {
2559
+ function sa(e, t) {
2521
2560
  if (typeof e == "string") {
2522
2561
  let n = e.match(/^\{\{\s*([\w.]+)\s*\}\}$/);
2523
- return n ? ta(n[1], t) : e.replace(ea, (e, n) => {
2524
- let r = ta(n, t);
2562
+ return n ? oa(n[1], t) : e.replace(aa, (e, n) => {
2563
+ let r = oa(n, t);
2525
2564
  return r == null ? "" : String(r);
2526
2565
  });
2527
2566
  }
2528
- if (Array.isArray(e)) return e.map((e) => na(e, t));
2567
+ if (Array.isArray(e)) return e.map((e) => sa(e, t));
2529
2568
  if (z(e)) {
2530
2569
  let n = {};
2531
2570
  return Object.entries(e).forEach(([e, r]) => {
2532
- n[e] = na(r, t);
2571
+ n[e] = sa(r, t);
2533
2572
  }), n;
2534
2573
  }
2535
2574
  return e;
2536
2575
  }
2537
- function ra(e) {
2576
+ function ca(e) {
2538
2577
  if (!e) return null;
2539
2578
  if (typeof e == "string") try {
2540
2579
  return JSON.parse(e);
@@ -2543,8 +2582,8 @@ function ra(e) {
2543
2582
  }
2544
2583
  return e;
2545
2584
  }
2546
- function ia(e, t) {
2547
- let n = e.payloadMode || "auto", r = Zi(e), { value: i, label: a } = Xi(t, e);
2585
+ function la(e, t) {
2586
+ let n = e.payloadMode || "auto", r = na(e), { value: i, label: a } = ta(t, e);
2548
2587
  switch (n) {
2549
2588
  case "value": return {
2550
2589
  kind: "scalar",
@@ -2566,12 +2605,12 @@ function ia(e, t) {
2566
2605
  }
2567
2606
  case "custom":
2568
2607
  case "template": {
2569
- let n = ra(e.payloadTemplate);
2608
+ let n = ca(e.payloadTemplate);
2570
2609
  if (!n) return {
2571
2610
  kind: "scalar",
2572
2611
  out: W(i, r, e)
2573
2612
  };
2574
- let o = na(n, {
2613
+ let o = sa(n, {
2575
2614
  value: W(i, e.elementType || "auto", {}),
2576
2615
  label: a,
2577
2616
  raw: t
@@ -2587,15 +2626,15 @@ function ia(e, t) {
2587
2626
  };
2588
2627
  }
2589
2628
  }
2590
- function aa(e, t) {
2629
+ function ua(e, t) {
2591
2630
  if (e.payloadMode === "skip") return { kind: "skip" };
2592
2631
  let n = t;
2593
- return R(n) && e.defaultValue !== void 0 && e.defaultValue !== "" && (n = e.defaultValue), n = $i(n, e.transformRule), R(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (Zi(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
2632
+ return R(n) && e.defaultValue !== void 0 && e.defaultValue !== "" && (n = e.defaultValue), n = ia(n, e.transformRule), R(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (na(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
2594
2633
  kind: "scalar",
2595
- out: n.map((t) => ia(e, t).out)
2596
- } : ia(e, n);
2634
+ out: n.map((t) => la(e, t).out)
2635
+ } : la(e, n);
2597
2636
  }
2598
- function oa(e = {}) {
2637
+ function da(e = {}) {
2599
2638
  return !!e.richValue || [
2600
2639
  "label",
2601
2640
  "object",
@@ -2603,8 +2642,8 @@ function oa(e = {}) {
2603
2642
  "template"
2604
2643
  ].includes(e.payloadMode);
2605
2644
  }
2606
- function sa(e, t, n = []) {
2607
- if (!oa(e) || t == null) return t;
2645
+ function fa(e, t, n = []) {
2646
+ if (!da(e) || t == null) return t;
2608
2647
  let r = (e) => {
2609
2648
  if (z(e) && e.value !== void 0) return e;
2610
2649
  let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
@@ -2615,7 +2654,7 @@ function sa(e, t, n = []) {
2615
2654
  };
2616
2655
  return Array.isArray(t) ? t.map(r) : r(t);
2617
2656
  }
2618
- function ca(e, t, n) {
2657
+ function pa(e, t, n) {
2619
2658
  if (!e?.field) return !0;
2620
2659
  let r = H(t, e.field) ? V(t, e.field) : V(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
2621
2660
  switch (e.operator) {
@@ -2629,45 +2668,45 @@ function ca(e, t, n) {
2629
2668
  default: return !0;
2630
2669
  }
2631
2670
  }
2632
- function la(e) {
2671
+ function ma(e) {
2633
2672
  let t = [];
2634
2673
  return e?.field && t.push(e.field), Array.isArray(e?.conditions) && e.conditions.forEach((e) => {
2635
2674
  e?.field && t.push(e.field);
2636
2675
  }), t;
2637
2676
  }
2638
- function ua(e, t, n) {
2677
+ function ha(e, t, n) {
2639
2678
  if (!e) return !0;
2640
2679
  let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
2641
2680
  if (r.length) {
2642
- let i = r.map((e) => ca(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
2681
+ let i = r.map((e) => pa(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
2643
2682
  if (e.field) {
2644
- let r = ca(e, t, n);
2683
+ let r = pa(e, t, n);
2645
2684
  o = a ? o || r : o && r;
2646
2685
  }
2647
2686
  return o;
2648
2687
  }
2649
- return ca(e, t, n);
2688
+ return pa(e, t, n);
2650
2689
  }
2651
- function da(e, t, n, r, i = /* @__PURE__ */ new Set()) {
2652
- let a = la(e?.showIf);
2653
- return !a.length || i.has(e.field) ? !0 : (i.add(e.field), ua(e.showIf, t, n) ? a.every((e) => {
2690
+ function ga(e, t, n, r, i = /* @__PURE__ */ new Set()) {
2691
+ let a = ma(e?.showIf);
2692
+ return !a.length || i.has(e.field) ? !0 : (i.add(e.field), ha(e.showIf, t, n) ? a.every((e) => {
2654
2693
  let a = r?.get?.(e);
2655
- return !a || da(a, t, n, r, i);
2694
+ return !a || ga(a, t, n, r, i);
2656
2695
  }) : !1);
2657
2696
  }
2658
- function fa(e = []) {
2697
+ function _a(e = []) {
2659
2698
  let t = /* @__PURE__ */ new Map();
2660
2699
  return e.forEach((e) => (e.fields ?? []).forEach((e) => {
2661
2700
  e?.field && !t.has(e.field) && t.set(e.field, e);
2662
2701
  })), t;
2663
2702
  }
2664
- function pa(e = {}, { editing: t = !1 } = {}) {
2703
+ function va(e = {}, { editing: t = !1 } = {}) {
2665
2704
  let n = {};
2666
2705
  return (e.fields ?? []).forEach((e) => {
2667
2706
  !e.field || G(e) || t && !e.defaultOnEdit || e.defaultValue !== void 0 && e.defaultValue !== "" && (n[e.field] = e.defaultValue);
2668
2707
  }), n;
2669
2708
  }
2670
- function ma(e = []) {
2709
+ function ya(e = []) {
2671
2710
  let t = [];
2672
2711
  return e.forEach((e) => {
2673
2712
  (e.fields ?? []).forEach((n) => {
@@ -2678,7 +2717,7 @@ function ma(e = []) {
2678
2717
  });
2679
2718
  }), t;
2680
2719
  }
2681
- var ha = [
2720
+ var ba = [
2682
2721
  "file",
2683
2722
  "document",
2684
2723
  "image",
@@ -2686,19 +2725,19 @@ var ha = [
2686
2725
  "attachment"
2687
2726
  ];
2688
2727
  function G(e) {
2689
- return ha.includes(String(e?.type ?? "").trim().toLowerCase());
2728
+ return ba.includes(String(e?.type ?? "").trim().toLowerCase());
2690
2729
  }
2691
- function ga(e = []) {
2692
- return ma(e).map(({ field: e }) => e).filter(G);
2730
+ function xa(e = []) {
2731
+ return ya(e).map(({ field: e }) => e).filter(G);
2693
2732
  }
2694
- function _a(e) {
2733
+ function Sa(e) {
2695
2734
  return String(e ?? "").trim().toLowerCase();
2696
2735
  }
2697
- function va(e, t) {
2698
- return !!t && _a(e.moduleName) === t;
2736
+ function Ca(e, t) {
2737
+ return !!t && Sa(e.moduleName) === t;
2699
2738
  }
2700
- function ya(e, t = [], n = {}) {
2701
- let r = [], i = n.scope ?? "all", a = _a(n.module), o = (e, t) => {
2739
+ function wa(e, t = [], n = {}) {
2740
+ let r = [], i = n.scope ?? "all", a = Sa(n.module), o = (e, t) => {
2702
2741
  t != null && (Array.isArray(t) ? t : [t]).forEach((t) => {
2703
2742
  let n = t?.originFileObj || t;
2704
2743
  (typeof File < "u" && n instanceof File || typeof Blob < "u" && n instanceof Blob) && r.push({
@@ -2710,7 +2749,7 @@ function ya(e, t = [], n = {}) {
2710
2749
  return (t ?? []).forEach((t) => {
2711
2750
  let r = (t.fields ?? []).filter(G);
2712
2751
  if (!r.length) return;
2713
- let s = t.moduleName && !va(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
2752
+ let s = t.moduleName && !Ca(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
2714
2753
  if (t.addRow) {
2715
2754
  if (i === "flat") return;
2716
2755
  let a = e[t.name];
@@ -2730,12 +2769,12 @@ function ya(e, t = [], n = {}) {
2730
2769
  });
2731
2770
  }), r;
2732
2771
  }
2733
- function ba(e, t, n = {}) {
2772
+ function Ta(e, t, n = {}) {
2734
2773
  let r = z(n.base) ? structuredClone(n.base) : {};
2735
- ga(t).forEach((e) => {
2736
- (e.payloadKey || e.field) && (Ca(r, e.payloadKey || e.field), Ca(r, e.field));
2774
+ xa(t).forEach((e) => {
2775
+ (e.payloadKey || e.field) && (Oa(r, e.payloadKey || e.field), Oa(r, e.field));
2737
2776
  });
2738
- let i = _a(n.module), a = fa(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || va(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
2777
+ let i = Sa(n.module), a = _a(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || Ca(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
2739
2778
  return (t ?? []).forEach((t) => {
2740
2779
  let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && H(e, t.toggleField) ? !!V(e, t.toggleField) : !1;
2741
2780
  if (t.toggleEnabled && t.toggleField && H(e, t.toggleField) && (U(n, t.toggleField, i), i && t.addRow)) {
@@ -2745,29 +2784,29 @@ function ba(e, t, n = {}) {
2745
2784
  if (t.addRow) {
2746
2785
  let i = e[t.name];
2747
2786
  if (!Array.isArray(i)) return;
2748
- U(n, t.payloadKey || t.name, i.map((t) => Sa(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
2787
+ U(n, t.payloadKey || t.name, i.map((t) => Da(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
2749
2788
  return;
2750
2789
  }
2751
- r.forEach((t) => xa(t, e, n, e, a));
2790
+ r.forEach((t) => Ea(t, e, n, e, a));
2752
2791
  }), o.size > 0 && (r.moduleWrites = Array.from(o, ([e, t]) => ({
2753
2792
  moduleName: e,
2754
2793
  data: t
2755
- }))), Ei(r, t);
2794
+ }))), ji(r, t);
2756
2795
  }
2757
- function xa(e, t, n, r, i) {
2758
- if (Oi(e) && ji(e)) {
2759
- let r = ki(e);
2796
+ function Ea(e, t, n, r, i) {
2797
+ if (Ni(e) && Ii(e)) {
2798
+ let r = Pi(e);
2760
2799
  H(t, r) && U(n, r, !!V(t, r));
2761
2800
  }
2762
2801
  if (G(e)) {
2763
- let i = qi(V(t, e.field));
2802
+ let i = Qi(V(t, e.field));
2764
2803
  if (i !== void 0) {
2765
2804
  let a = r !== void 0 && r !== t;
2766
- Ki(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
2805
+ Zi(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
2767
2806
  }
2768
2807
  return;
2769
2808
  }
2770
- if (la(e.showIf).length && !da(e, t, r, i)) {
2809
+ if (ma(e.showIf).length && !ga(e, t, r, i)) {
2771
2810
  (r === void 0 || r === t) && H(t, e.field) && U(n, e.payloadKey || e.field, null);
2772
2811
  return;
2773
2812
  }
@@ -2775,30 +2814,30 @@ function xa(e, t, n, r, i) {
2775
2814
  if (!H(t, e.field)) return;
2776
2815
  let a = V(t, e.field);
2777
2816
  if (!Array.isArray(a)) return;
2778
- let o = a.map((t) => Sa(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
2817
+ let o = a.map((t) => Da(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
2779
2818
  U(n, e.payloadKey || e.field, o);
2780
2819
  return;
2781
2820
  }
2782
2821
  if (!H(t, e.field)) return;
2783
- if (Vi(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
2784
- let r = V(t, e.field), i = Array.isArray(r) ? r : R(r) ? [] : [r], a = Ta(e), o = i.map((e) => aa(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
2822
+ if (Ki(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
2823
+ let r = V(t, e.field), i = Array.isArray(r) ? r : R(r) ? [] : [r], a = Aa(e), o = i.map((e) => ua(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
2785
2824
  U(n, e.payloadKey || e.field, o);
2786
2825
  return;
2787
2826
  }
2788
- let a = aa(e, V(t, e.field));
2827
+ let a = ua(e, V(t, e.field));
2789
2828
  if (a.kind !== "skip") {
2790
2829
  if (a.kind === "spread" && z(a.out)) {
2791
- Ji(n, a.out);
2830
+ $i(n, a.out);
2792
2831
  return;
2793
2832
  }
2794
2833
  U(n, e.payloadKey || e.field, a.out);
2795
2834
  }
2796
2835
  }
2797
- function Sa(e, t, n, r) {
2836
+ function Da(e, t, n, r) {
2798
2837
  let i = {};
2799
- return e.forEach((e) => xa(e, t, i, n ?? t, r)), i;
2838
+ return e.forEach((e) => Ea(e, t, i, n ?? t, r)), i;
2800
2839
  }
2801
- function Ca(e, t) {
2840
+ function Oa(e, t) {
2802
2841
  let n = String(t).split("."), r = e;
2803
2842
  for (let e = 0; e < n.length - 1; e += 1) {
2804
2843
  if (!z(r[n[e]])) return;
@@ -2806,7 +2845,7 @@ function Ca(e, t) {
2806
2845
  }
2807
2846
  delete r[n[n.length - 1]];
2808
2847
  }
2809
- var wa = /* @__PURE__ */ new Set([
2848
+ var ka = /* @__PURE__ */ new Set([
2810
2849
  "text",
2811
2850
  "textarea",
2812
2851
  "email",
@@ -2823,7 +2862,7 @@ function K(e, t) {
2823
2862
  if (t == null) return r() ?? t;
2824
2863
  if (n(t)) return r();
2825
2864
  if (R(t) && e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "") return e.defaultValue;
2826
- if (wa.has(e.type) && z(t)) {
2865
+ if (ka.has(e.type) && z(t)) {
2827
2866
  let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
2828
2867
  if (r === void 0 || z(r)) return;
2829
2868
  t = r;
@@ -2833,8 +2872,8 @@ function K(e, t) {
2833
2872
  let e = T(t);
2834
2873
  return e.isValid() ? e : null;
2835
2874
  }
2836
- t = Bi(e, t);
2837
- let i = (t) => z(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && Zi(e) === "array", o = (t) => {
2875
+ t = Gi(e, t);
2876
+ let i = (t) => z(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && na(e) === "array", o = (t) => {
2838
2877
  if (t == null || t === "" || !Array.isArray(e.options)) return t;
2839
2878
  let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
2840
2879
  return n ? n.value : t;
@@ -2846,7 +2885,7 @@ function K(e, t) {
2846
2885
  }
2847
2886
  return t;
2848
2887
  }
2849
- function Ta(e = {}) {
2888
+ function Aa(e = {}) {
2850
2889
  return {
2851
2890
  ...e,
2852
2891
  addRow: !1,
@@ -2855,7 +2894,7 @@ function Ta(e = {}) {
2855
2894
  dataType: void 0
2856
2895
  };
2857
2896
  }
2858
- function Ea(e, t) {
2897
+ function ja(e, t) {
2859
2898
  let n = Math.max(0, Number(e.minRows ?? 0) || 0), r = e.initialRows !== void 0 && e.initialRows !== "" ? Math.max(n, Math.max(0, Number(e.initialRows) || 0)) : n;
2860
2899
  if (Array.isArray(e.subFields) && e.subFields.length > 0) {
2861
2900
  let i = [];
@@ -2871,7 +2910,7 @@ function Ea(e, t) {
2871
2910
  for (; i.length < a;) i.push({});
2872
2911
  return i;
2873
2912
  }
2874
- let i = Ta(e), a = [];
2913
+ let i = Aa(e), a = [];
2875
2914
  if (Array.isArray(t)) a = t.map((e) => K(i, e)).filter((e) => e != null && e !== "");
2876
2915
  else if (t != null && t !== "") {
2877
2916
  let e = K(i, t);
@@ -2883,12 +2922,12 @@ function Ea(e, t) {
2883
2922
  }
2884
2923
  //#endregion
2885
2924
  //#region src/components/form/linkedAddRowGroups.js
2886
- var Da = (e) => e === !0 || e === 1 || e === "1";
2887
- function Oa(e = []) {
2925
+ var Ma = (e) => e === !0 || e === 1 || e === "1";
2926
+ function Na(e = []) {
2888
2927
  let t = /* @__PURE__ */ new Map();
2889
2928
  e.forEach((e) => {
2890
2929
  let n = e?.linkGroup;
2891
- !Da(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
2930
+ !Ma(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
2892
2931
  });
2893
2932
  let n = /* @__PURE__ */ new Map();
2894
2933
  return t.forEach((e, t) => {
@@ -2898,11 +2937,11 @@ function Oa(e = []) {
2898
2937
  });
2899
2938
  }), n;
2900
2939
  }
2901
- function ka(e, t) {
2940
+ function Pa(e, t) {
2902
2941
  for (let n of e.values()) if (n.memberNames.includes(t)) return n;
2903
2942
  return null;
2904
2943
  }
2905
- function Aa(e, t = {}) {
2944
+ function Fa(e, t = {}) {
2906
2945
  let n = { ...t };
2907
2946
  return e.forEach(({ memberNames: e }) => {
2908
2947
  let t = Math.max(...e.map((e) => (n[e] ?? []).length));
@@ -2914,7 +2953,7 @@ function Aa(e, t = {}) {
2914
2953
  }
2915
2954
  //#endregion
2916
2955
  //#region src/components/form/formDecisionDialog.jsx
2917
- var ja = {
2956
+ var Ia = {
2918
2957
  duplicate: {
2919
2958
  className: "fdd-tone-amber",
2920
2959
  Icon: he
@@ -2932,8 +2971,8 @@ var ja = {
2932
2971
  Icon: de
2933
2972
  }
2934
2973
  };
2935
- function Ma({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s } = {}) {
2936
- let { className: c, Icon: l } = ja[e] ?? ja.suggestion, u = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
2974
+ function La({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s } = {}) {
2975
+ let { className: c, Icon: l } = Ia[e] ?? Ia.suggestion, u = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
2937
2976
  return new Promise((e) => {
2938
2977
  ee.confirm({
2939
2978
  icon: null,
@@ -2983,8 +3022,8 @@ function Ma({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText:
2983
3022
  });
2984
3023
  });
2985
3024
  }
2986
- function Na({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back" } = {}) {
2987
- let { className: a, Icon: o } = ja[e] ?? ja.suggestion, s = r.filter((e) => e && String(e.value ?? "").trim() !== "");
3025
+ function Ra({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back" } = {}) {
3026
+ let { className: a, Icon: o } = Ia[e] ?? Ia.suggestion, s = r.filter((e) => e && String(e.value ?? "").trim() !== "");
2988
3027
  return new Promise((e) => {
2989
3028
  ee.warning({
2990
3029
  icon: null,
@@ -3026,7 +3065,7 @@ function Na({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
3026
3065
  }
3027
3066
  //#endregion
3028
3067
  //#region src/services/aiActionApi.js
3029
- async function Pa({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: o = {} }) {
3068
+ async function za({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: o = {} }) {
3030
3069
  if (!e || !t || !n || !i) throw Error("module, group, field and actionKey are required to run an AI action");
3031
3070
  let c = await r(), l = new FormData();
3032
3071
  l.append("json", JSON.stringify({ inputs: a })), Object.entries(o).forEach(([e, t]) => {
@@ -3052,17 +3091,17 @@ async function Pa({ module: e, group: t, field: n, actionKey: i, inputs: a = {},
3052
3091
  }
3053
3092
  //#endregion
3054
3093
  //#region src/components/detail/phoneDisplay.js
3055
- var Fa = (e) => e == null || e === "";
3056
- function Ia(e, t) {
3094
+ var Ba = (e) => e == null || e === "";
3095
+ function Va(e, t) {
3057
3096
  return String(t ?? "").split(".").filter(Boolean).reduce((e, t) => e?.[t], e);
3058
3097
  }
3059
- function La(e) {
3098
+ function Ha(e) {
3060
3099
  let t = String(e ?? "").trim().replace(/[\s()-]/g, "");
3061
3100
  if (!t) return "";
3062
3101
  let n = t.replace(/^\+/, "");
3063
3102
  return /^\d{1,4}$/.test(n) ? `+${n}` : "";
3064
3103
  }
3065
- function Ra(e) {
3104
+ function Ua(e) {
3066
3105
  let t = String(e?.field ?? "").trim(), n = t.replace(/(number|no|phone|mobile|contact)$/i, "");
3067
3106
  return [
3068
3107
  ...t ? [`${t}CountryCode`, `${t}Code`] : [],
@@ -3075,15 +3114,15 @@ function Ra(e) {
3075
3114
  "isdCode"
3076
3115
  ];
3077
3116
  }
3078
- function za(e, t, n = "") {
3079
- let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ra(e)] : Ra(e);
3117
+ function Wa(e, t, n = "") {
3118
+ let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ua(e)] : Ua(e);
3080
3119
  for (let e of i) {
3081
- let n = La(Ia(t, e));
3120
+ let n = Ha(Va(t, e));
3082
3121
  if (n) return n;
3083
3122
  }
3084
- return La(n);
3123
+ return Ha(n);
3085
3124
  }
3086
- function Ba(e) {
3125
+ function Ga(e) {
3087
3126
  let t = String(e ?? "").trim(), n = t.match(/^(\+\d{1,4})[\s-]*(.*)$/);
3088
3127
  return n ? {
3089
3128
  code: n[1],
@@ -3093,17 +3132,17 @@ function Ba(e) {
3093
3132
  rest: t
3094
3133
  };
3095
3134
  }
3096
- function Va(e, t = "") {
3097
- if (Fa(e)) return "";
3098
- let { code: n, rest: r } = Ba(e), i = n || La(t), a = Gn(r) || r;
3135
+ function Ka(e, t = "") {
3136
+ if (Ba(e)) return "";
3137
+ let { code: n, rest: r } = Ga(e), i = n || Ha(t), a = Xn(r) || r;
3099
3138
  return `${i ? `${i} ` : ""}${a}`.trim();
3100
3139
  }
3101
- function Ha(e, t, n) {
3102
- return Va(t, za(e, n, Un()));
3140
+ function qa(e, t, n) {
3141
+ return Ka(t, Wa(e, n, Jn()));
3103
3142
  }
3104
3143
  //#endregion
3105
3144
  //#region src/components/detail/renderConfig.js
3106
- var Ua = [
3145
+ var Ja = [
3107
3146
  {
3108
3147
  value: "auto",
3109
3148
  label: "Default (auto)"
@@ -3160,7 +3199,7 @@ var Ua = [
3160
3199
  value: "html",
3161
3200
  label: "HTML"
3162
3201
  }
3163
- ], Wa = [
3202
+ ], Ya = [
3164
3203
  {
3165
3204
  value: "preview",
3166
3205
  label: "Preview (viewer)"
@@ -3181,7 +3220,7 @@ var Ua = [
3181
3220
  value: "text",
3182
3221
  label: "Text (filename)"
3183
3222
  }
3184
- ], Ga = [
3223
+ ], Xa = [
3185
3224
  {
3186
3225
  value: "none",
3187
3226
  label: "None"
@@ -3198,76 +3237,76 @@ var Ua = [
3198
3237
  value: "title",
3199
3238
  label: "Title Case"
3200
3239
  }
3201
- ], Ka = [
3240
+ ], Za = [
3202
3241
  "location",
3203
3242
  "path",
3204
3243
  "url",
3205
3244
  "key"
3206
- ], qa = [
3245
+ ], Qa = [
3207
3246
  "location",
3208
3247
  "filepath",
3209
3248
  "path",
3210
3249
  "url",
3211
3250
  "key"
3212
- ], Ja = [
3251
+ ], $a = [
3213
3252
  "uploadedfilename",
3214
3253
  "uploadname",
3215
3254
  "originalname",
3216
3255
  "displayname",
3217
3256
  "documentname",
3218
3257
  "filename"
3219
- ], Ya = ["name"], Xa = (e) => String(e).toLowerCase(), Za = (e) => e == null || e === "";
3220
- function Qa(e, t) {
3258
+ ], eo = ["name"], to = (e) => String(e).toLowerCase(), no = (e) => e == null || e === "";
3259
+ function ro(e, t) {
3221
3260
  for (let n of t) {
3222
3261
  let t = e[n];
3223
3262
  if (typeof t == "string" && t) return t;
3224
3263
  }
3225
3264
  return "";
3226
3265
  }
3227
- function $a(e, t) {
3228
- for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && Xa(t).endsWith(n)) return r;
3266
+ function io(e, t) {
3267
+ for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && to(t).endsWith(n)) return r;
3229
3268
  return "";
3230
3269
  }
3231
- function eo(e) {
3270
+ function ao(e) {
3232
3271
  if (!e) return "";
3233
3272
  let t = String(e).split("?")[0].split("#")[0];
3234
3273
  return decodeURIComponent(t.split("/").pop() || "");
3235
3274
  }
3236
- function to(e) {
3275
+ function oo(e) {
3237
3276
  if (!e) return "";
3238
3277
  let t = String(e);
3239
3278
  return /^https?:\/\//i.test(t) ? t : "";
3240
3279
  }
3241
- function no(e) {
3280
+ function so(e) {
3242
3281
  let t = String(e ?? "").trim();
3243
3282
  return !t || /^https?:\/\//i.test(t) || t.startsWith("blob:") || t.startsWith("data:") ? !1 : t.includes("/");
3244
3283
  }
3245
- function ro(e) {
3246
- return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : Qa(e, Ka) || $a(e, qa);
3284
+ function co(e) {
3285
+ return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : ro(e, Za) || io(e, Qa);
3247
3286
  }
3248
- function io(e) {
3249
- return e ? typeof e == "string" ? eo(e) || e : typeof e == "object" && (Qa(e, N().documentNameOrder ?? []) || $a(e, Ja) || eo(ro(e)) || $a(e, Ya)) || "Document" : "Document";
3287
+ function lo(e) {
3288
+ return e ? typeof e == "string" ? ao(e) || e : typeof e == "object" && (ro(e, N().documentNameOrder ?? []) || io(e, $a) || ao(co(e)) || io(e, eo)) || "Document" : "Document";
3250
3289
  }
3251
- function ao(e) {
3252
- if (Za(e)) return [];
3290
+ function uo(e) {
3291
+ if (no(e)) return [];
3253
3292
  let t = Array.isArray(e) ? e : [e], n = [];
3254
- for (let e of t) if (!Za(e)) {
3293
+ for (let e of t) if (!no(e)) {
3255
3294
  if (typeof e == "string") {
3256
3295
  let t = e.includes("/") ? e : "";
3257
3296
  n.push({
3258
3297
  location: t,
3259
- name: eo(e) || e,
3260
- url: to(t),
3261
- needsAuthFetch: no(t)
3298
+ name: ao(e) || e,
3299
+ url: oo(t),
3300
+ needsAuthFetch: so(t)
3262
3301
  });
3263
3302
  } else if (typeof e == "object") {
3264
- let t = ro(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
3303
+ let t = co(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
3265
3304
  n.push({
3266
3305
  location: t,
3267
- name: io(e),
3268
- url: r || to(t),
3306
+ name: lo(e),
3307
+ url: r || oo(t),
3269
3308
  documentId: e.id || e._id || e.documentId || "",
3270
- needsAuthFetch: !r && no(t)
3309
+ needsAuthFetch: !r && so(t)
3271
3310
  });
3272
3311
  }
3273
3312
  }
@@ -3275,24 +3314,24 @@ function ao(e) {
3275
3314
  }
3276
3315
  //#endregion
3277
3316
  //#region src/components/form/repeatableRowShape.js
3278
- function oo(e) {
3317
+ function fo(e) {
3279
3318
  return e?.primaryField ? e.primaryField : (e?.fields ?? []).find((e) => e?.field)?.field ?? null;
3280
3319
  }
3281
- function so(e, t) {
3320
+ function po(e, t) {
3282
3321
  if (!Array.isArray(t) || t.length === 0) return t;
3283
- let n = oo(e);
3322
+ let n = fo(e);
3284
3323
  if (!n) return t;
3285
3324
  let r = !1, i = t.map((e) => typeof e == "object" && e && !Array.isArray(e) ? e : e == null || String(e).trim() === "" ? (r = !0, {}) : (r = !0, { [n]: e }));
3286
3325
  return r ? i : t;
3287
3326
  }
3288
3327
  //#endregion
3289
3328
  //#region src/components/form/applyGroupValues.js
3290
- var co = (e) => e === !0 || e === 1 || e === "1", lo = (e) => e == null || e === "";
3291
- function uo(e) {
3329
+ var mo = (e) => e === !0 || e === 1 || e === "1", ho = (e) => e == null || e === "";
3330
+ function go(e) {
3292
3331
  return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
3293
3332
  }
3294
3333
  function q(e, t, n) {
3295
- let r = Array.isArray(t) ? t : uo(t);
3334
+ let r = Array.isArray(t) ? t : go(t);
3296
3335
  if (!r.length) return e;
3297
3336
  let i = e;
3298
3337
  for (let e = 0; e < r.length - 1; e += 1) {
@@ -3301,23 +3340,23 @@ function q(e, t, n) {
3301
3340
  }
3302
3341
  return i[r[r.length - 1]] = n, e;
3303
3342
  }
3304
- function fo(e, t = []) {
3343
+ function _o(e, t = []) {
3305
3344
  if (!(!e || typeof e != "object")) for (let n of t) {
3306
3345
  if (!n) continue;
3307
3346
  let t = B(e, n);
3308
- if (!lo(t)) return t;
3347
+ if (!ho(t)) return t;
3309
3348
  }
3310
3349
  }
3311
- function po(e, t) {
3350
+ function vo(e, t) {
3312
3351
  if (!e || typeof e != "object") return;
3313
- let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !lo(n));
3352
+ let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !ho(n));
3314
3353
  if (r) return r[1];
3315
3354
  for (let [, e] of n) if (e && typeof e == "object" && !Array.isArray(e)) {
3316
- let n = po(e, t);
3317
- if (!lo(n)) return n;
3355
+ let n = vo(e, t);
3356
+ if (!ho(n)) return n;
3318
3357
  }
3319
3358
  }
3320
- function mo(e, t) {
3359
+ function yo(e, t) {
3321
3360
  let n = Array.isArray(e) ? e : e ? [e] : [];
3322
3361
  if (!n.length) return;
3323
3362
  let r = n.map((e, n) => {
@@ -3327,9 +3366,9 @@ function mo(e, t) {
3327
3366
  status: "done"
3328
3367
  };
3329
3368
  if (!e || typeof e != "object") return null;
3330
- let r = fo(e, [t.fileUrlKey, t.locationKey]) ?? po(e, /(location|url|path)$/i) ?? "", i = fo(e, [t.fileNameKey]) ?? po(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
3369
+ let r = _o(e, [t.fileUrlKey, t.locationKey]) ?? vo(e, /(location|url|path)$/i) ?? "", i = _o(e, [t.fileNameKey]) ?? vo(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
3331
3370
  if (!r && !i) return null;
3332
- let a = r && !String(r).startsWith("http") ? to(r) : r;
3371
+ let a = r && !String(r).startsWith("http") ? oo(r) : r;
3333
3372
  return {
3334
3373
  uid: String(e.id ?? e._id ?? e.uniqueName ?? e.documentCopyUniqueName ?? `${t.field}-${n}`),
3335
3374
  name: i || "file",
@@ -3341,11 +3380,11 @@ function mo(e, t) {
3341
3380
  }).filter(Boolean);
3342
3381
  return r.length ? r : void 0;
3343
3382
  }
3344
- function ho(e, t) {
3383
+ function bo(e, t) {
3345
3384
  if (!e || typeof e != "object") return;
3346
- let n = fo(e, [t.fileNameKey, t.field]) ?? po(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = fo(e, [t.fileUrlKey, t.locationKey]) ?? po(e, /(location|url|path)$/i) ?? "";
3385
+ let n = _o(e, [t.fileNameKey, t.field]) ?? vo(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = _o(e, [t.fileUrlKey, t.locationKey]) ?? vo(e, /(location|url|path)$/i) ?? "";
3347
3386
  if (!n && !r) return;
3348
- let i = r && !String(r).startsWith("http") ? to(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
3387
+ let i = r && !String(r).startsWith("http") ? oo(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
3349
3388
  return [{
3350
3389
  uid: String(a),
3351
3390
  name: n ?? "file",
@@ -3354,7 +3393,7 @@ function ho(e, t) {
3354
3393
  url: i || void 0
3355
3394
  }];
3356
3395
  }
3357
- function go(e, t, n, r) {
3396
+ function xo(e, t, n, r) {
3358
3397
  (e.fields ?? []).forEach((e) => {
3359
3398
  e?.verifyAction && [
3360
3399
  e.verifyResultField,
@@ -3367,8 +3406,8 @@ function go(e, t, n, r) {
3367
3406
  });
3368
3407
  });
3369
3408
  }
3370
- function _o(e) {
3371
- let t = Array.isArray(e.rows) ? so(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
3409
+ function So(e) {
3410
+ let t = Array.isArray(e.rows) ? po(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
3372
3411
  let i = {};
3373
3412
  return (e.fields ?? []).forEach((e) => {
3374
3413
  if (!e.field) return;
@@ -3382,26 +3421,26 @@ function _o(e) {
3382
3421
  e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "" && q(i, e.field, e.defaultValue);
3383
3422
  return;
3384
3423
  }
3385
- q(i, e.field, co(e.addRow) ? Ea(e, a) : K(e, a));
3386
- }), go(e, t, i, r), i;
3387
- }, i = pa(e, { editing: !0 });
3424
+ q(i, e.field, mo(e.addRow) ? ja(e, a) : K(e, a));
3425
+ }), xo(e, t, i, r), i;
3426
+ }, i = va(e, { editing: !0 });
3388
3427
  if (t && t.length > 0) {
3389
- let e = t.map((e) => r(e, (e, t) => ho(e, t), (e, t) => B(e, t.field)));
3428
+ let e = t.map((e) => r(e, (e, t) => bo(e, t), (e, t) => B(e, t.field)));
3390
3429
  for (; e.length < n;) e.push({ ...i });
3391
3430
  return e;
3392
3431
  }
3393
- let a = r(e, (e, t) => mo(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
3432
+ let a = r(e, (e, t) => yo(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
3394
3433
  for (; o.length < n;) o.push({ ...i });
3395
3434
  return o;
3396
3435
  }
3397
- function vo(e, t = []) {
3436
+ function Co(e, t = []) {
3398
3437
  let n = {};
3399
3438
  return t.forEach((e) => {
3400
3439
  e.toggleEnabled && e.toggleField && q(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
3401
3440
  if (!e.field || e.addRow) return;
3402
3441
  let t = e.value, r = e.field;
3403
3442
  if (e.type === "file") {
3404
- let i = mo(t, e);
3443
+ let i = yo(t, e);
3405
3444
  i && q(n, r, i);
3406
3445
  return;
3407
3446
  }
@@ -3411,12 +3450,12 @@ function vo(e, t = []) {
3411
3450
  if (i) {
3412
3451
  let e = Object.entries(i).find(([, e]) => String(e) === String(t));
3413
3452
  q(n, r, e ? [e[0]] : []);
3414
- } else q(n, r, Bi(e, Array.isArray(t) ? t : [t]));
3453
+ } else q(n, r, Gi(e, Array.isArray(t) ? t : [t]));
3415
3454
  return;
3416
3455
  }
3417
3456
  let i = e.splitDialCodeInto;
3418
3457
  if (i && typeof t == "string") {
3419
- let { code: a, rest: o } = Ba(t), s = La(a);
3458
+ let { code: a, rest: o } = Ga(t), s = Ha(a);
3420
3459
  s && q(n, i, s), q(n, r, K(e, o || t));
3421
3460
  return;
3422
3461
  }
@@ -3426,27 +3465,27 @@ function vo(e, t = []) {
3426
3465
  }
3427
3466
  //#endregion
3428
3467
  //#region src/components/form/useAiActions.js
3429
- function yo(e) {
3468
+ function wo(e) {
3430
3469
  let t = document.createElement("div");
3431
3470
  return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
3432
3471
  }
3433
- function bo(e, t) {
3434
- return t && t === "stripHtml" ? yo(e) : e;
3472
+ function To(e, t) {
3473
+ return t && t === "stripHtml" ? wo(e) : e;
3435
3474
  }
3436
- function xo(e) {
3475
+ function Eo(e) {
3437
3476
  return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
3438
3477
  }
3439
- function So(e) {
3478
+ function Do(e) {
3440
3479
  return Object.values(e || {}).some((e) => e != null && e !== "");
3441
3480
  }
3442
- function Co(e, t) {
3481
+ function Oo(e, t) {
3443
3482
  if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
3444
- let n = bo(t, e.transform), r = String(n ?? "").trim();
3483
+ let n = To(t, e.transform), r = String(n ?? "").trim();
3445
3484
  if (!r) return !1;
3446
3485
  let i = Number(e.minWords) || 0;
3447
- return i > 0 ? xo(r) >= i : !0;
3486
+ return i > 0 ? Eo(r) >= i : !0;
3448
3487
  }
3449
- function wo(e, t) {
3488
+ function ko(e, t) {
3450
3489
  let n = e.inputs || [];
3451
3490
  if (n.length === 0) return !0;
3452
3491
  let r = /* @__PURE__ */ new Map();
@@ -3454,10 +3493,10 @@ function wo(e, t) {
3454
3493
  let n = e.group || `__solo_${t}`;
3455
3494
  r.has(n) || r.set(n, []), r.get(n).push(e);
3456
3495
  });
3457
- for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => Co(e, t(e.sourceField)))) return !1;
3496
+ for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => Oo(e, t(e.sourceField)))) return !1;
3458
3497
  return !0;
3459
3498
  }
3460
- function To(e = []) {
3499
+ function Ao(e = []) {
3461
3500
  let t = [];
3462
3501
  return e.forEach((e) => {
3463
3502
  if (e?.addRow) {
@@ -3470,32 +3509,32 @@ function To(e = []) {
3470
3509
  });
3471
3510
  }), t;
3472
3511
  }
3473
- function Eo(e, t) {
3474
- return To(t).some((t) => {
3512
+ function jo(e, t) {
3513
+ return Ao(t).some((t) => {
3475
3514
  let n = e.getFieldValue(t);
3476
- return Array.isArray(n) ? n.some(So) : n != null && n !== "";
3515
+ return Array.isArray(n) ? n.some(Do) : n != null && n !== "";
3477
3516
  });
3478
3517
  }
3479
- function Do(e, t = [], { includeUntouched: n = !1 } = {}) {
3518
+ function Mo(e, t = [], { includeUntouched: n = !1 } = {}) {
3480
3519
  let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = n || typeof e.isFieldTouched != "function" ? () => !0 : (t) => e.isFieldTouched(t), o = 0;
3481
3520
  return Object.entries(r).forEach(([e, t]) => {
3482
- if (!(i.has(e) || !a(e) || !Oo(t))) {
3521
+ if (!(i.has(e) || !a(e) || !No(t))) {
3483
3522
  if (Array.isArray(t)) {
3484
- o += t.filter((e) => e && typeof e == "object" ? So(e) : !!e).length;
3523
+ o += t.filter((e) => e && typeof e == "object" ? Do(e) : !!e).length;
3485
3524
  return;
3486
3525
  }
3487
3526
  o += 1;
3488
3527
  }
3489
3528
  }), o;
3490
3529
  }
3491
- function Oo(e) {
3492
- return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? So(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
3530
+ function No(e) {
3531
+ return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? Do(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
3493
3532
  }
3494
- function ko(e, t = [], { includeUntouched: n = !1 } = {}) {
3533
+ function Po(e, t = [], { includeUntouched: n = !1 } = {}) {
3495
3534
  let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = Object.keys(r).filter((e) => !i.has(e));
3496
- return n ? a.some((e) => Oo(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && Oo(r[t])) : a.some((e) => Oo(r[e]));
3535
+ return n ? a.some((e) => No(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && No(r[t])) : a.some((e) => No(r[e]));
3497
3536
  }
3498
- function Ao(e = []) {
3537
+ function Fo(e = []) {
3499
3538
  let t = {};
3500
3539
  return (e ?? []).forEach((e) => {
3501
3540
  e?.addRow || (e?.fields ?? []).forEach((e) => {
@@ -3506,38 +3545,38 @@ function Ao(e = []) {
3506
3545
  });
3507
3546
  }), t;
3508
3547
  }
3509
- function jo(e, t, n) {
3548
+ function Io(e, t, n) {
3510
3549
  let r = e?.confirmWhen ?? "never";
3511
- return r === "never" ? !1 : r === "always" || Eo(t, n);
3550
+ return r === "never" ? !1 : r === "always" || jo(t, n);
3512
3551
  }
3513
- var Mo = [
3552
+ var Lo = [
3514
3553
  "top-left",
3515
3554
  "top-center",
3516
3555
  "top-right",
3517
3556
  "bottom-left",
3518
3557
  "bottom-center",
3519
3558
  "bottom-right"
3520
- ], No = "bottom-left";
3521
- function Po(e = []) {
3559
+ ], Ro = "bottom-left";
3560
+ function zo(e = []) {
3522
3561
  let t = {};
3523
3562
  return e.forEach((e) => {
3524
- let n = Mo.includes(e.position) ? e.position : No;
3563
+ let n = Lo.includes(e.position) ? e.position : Ro;
3525
3564
  (t[n] ??= []).push(e);
3526
3565
  }), t;
3527
3566
  }
3528
- function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1 }) {
3529
- let [o, s] = g(null), [c, l] = g(""), u = x.useWatch((e) => e, e), d = f((e) => wo(e, (e) => (u || {})[e]), [u]), p = f((t) => {
3567
+ function Bo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1 }) {
3568
+ let [o, s] = g(null), [c, l] = g(""), u = x.useWatch((e) => e, e), d = f((e) => ko(e, (e) => (u || {})[e]), [u]), p = f((t) => {
3530
3569
  if (!Array.isArray(t) || t.length === 0) return !1;
3531
- let n = vo(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3570
+ let n = Co(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3532
3571
  return t.forEach((t) => {
3533
3572
  if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
3534
- let n = _o(t);
3573
+ let n = So(t);
3535
3574
  if (n.length === 0) return;
3536
3575
  r = !0;
3537
- let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(So);
3576
+ let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(Do);
3538
3577
  if (a.length) {
3539
3578
  let e = t.label || t.name;
3540
- Ma({
3579
+ La({
3541
3580
  tone: "overwrite",
3542
3581
  title: `Replace what's in ${e}?`,
3543
3582
  facts: [
@@ -3567,9 +3606,9 @@ function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3567
3606
  return {
3568
3607
  runAction: f(async (t, o, c, u) => {
3569
3608
  let d = c?.confirmWhen ?? "never";
3570
- if (c?.trigger === "upload" && d !== "never" && (d === "always" || ko(e, [o?.field], { includeUntouched: a }))) {
3571
- let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = Do(e, [o?.field], { includeUntouched: a });
3572
- if (!await Ma({
3609
+ if (c?.trigger === "upload" && d !== "never" && (d === "always" || Po(e, [o?.field], { includeUntouched: a }))) {
3610
+ let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = Mo(e, [o?.field], { includeUntouched: a });
3611
+ if (!await La({
3573
3612
  tone: "overwrite",
3574
3613
  title: t.title || "Read this file and fill the form in?",
3575
3614
  facts: [{
@@ -3593,12 +3632,12 @@ function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3593
3632
  r && (s[t.param] = r);
3594
3633
  } else {
3595
3634
  let n = e.getFieldValue(t.sourceField);
3596
- n != null && n !== "" && (a[t.param] = bo(n, t.transform));
3635
+ n != null && n !== "" && (a[t.param] = To(n, t.transform));
3597
3636
  }
3598
3637
  }), (c.inputs || []).forEach((e) => {
3599
3638
  !e.group || e.kind !== "text" || (c.inputs || []).some((t) => t.group === e.group && t.kind === "file" && s[t.param]) && delete a[e.param];
3600
3639
  });
3601
- let l = await Pa({
3640
+ let l = await za({
3602
3641
  module: n,
3603
3642
  group: t,
3604
3643
  field: o.field,
@@ -3606,9 +3645,9 @@ function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3606
3645
  inputs: a,
3607
3646
  files: s
3608
3647
  }), d = c.label || "AI action", f = l?.groups;
3609
- if (c?.trigger !== "upload" && jo(c, e, f)) {
3610
- let e = c.confirmMessages ?? {}, t = To(f).length;
3611
- if (!await Ma({
3648
+ if (c?.trigger !== "upload" && Io(c, e, f)) {
3649
+ let e = c.confirmMessages ?? {}, t = Ao(f).length;
3650
+ if (!await La({
3612
3651
  tone: "overwrite",
3613
3652
  title: e.title || `Fill the form in from ${d}?`,
3614
3653
  facts: [{
@@ -3629,7 +3668,7 @@ function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3629
3668
  field: o,
3630
3669
  groupName: t,
3631
3670
  responseGroups: f,
3632
- payload: Ao(f)
3671
+ payload: Fo(f)
3633
3672
  });
3634
3673
  if (e === !1 || e === "abort") return l;
3635
3674
  }
@@ -3661,7 +3700,7 @@ function Fo({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3661
3700
  }
3662
3701
  //#endregion
3663
3702
  //#region src/components/form/AiActionButtons.jsx
3664
- function Io({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3703
+ function Vo({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3665
3704
  if (!t || t.length === 0) return null;
3666
3705
  let a = e.endsWith("center") ? "center" : e.endsWith("right") ? "flex-end" : "flex-start";
3667
3706
  return /* @__PURE__ */ C(te, {
@@ -3682,18 +3721,18 @@ function Io({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3682
3721
  }
3683
3722
  //#endregion
3684
3723
  //#region src/components/form/emailValidator.js
3685
- function Lo(e) {
3724
+ function Ho(e) {
3686
3725
  let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
3687
3726
  if (!n) return !1;
3688
3727
  let [, r, i] = n;
3689
3728
  return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
3690
3729
  }
3691
- function Ro(e = "Email", t) {
3692
- return { validator: (n, r) => r == null || r === "" || Lo(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3730
+ function Uo(e = "Email", t) {
3731
+ return { validator: (n, r) => r == null || r === "" || Ho(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3693
3732
  }
3694
3733
  //#endregion
3695
3734
  //#region src/components/form/inputValidator.js
3696
- var zo = [
3735
+ var Wo = [
3697
3736
  {
3698
3737
  label: "Only Numbers",
3699
3738
  value: "onlyNumber"
@@ -3766,7 +3805,7 @@ var zo = [
3766
3805
  label: "Website URL",
3767
3806
  value: "websiteUrl"
3768
3807
  }
3769
- ], Bo = {
3808
+ ], Go = {
3770
3809
  onlyNumber: /^[0-9]$/,
3771
3810
  experience: /^[0-9]$/,
3772
3811
  numericTwoDigits: /^[0-9]$/,
@@ -3782,10 +3821,10 @@ var zo = [
3782
3821
  decimalRange: /^[0-9.]$/,
3783
3822
  contactNumber: /^[0-9()\-+\s]$/
3784
3823
  };
3785
- function Vo(e) {
3786
- return Bo[e] ?? null;
3824
+ function Ko(e) {
3825
+ return Go[e] ?? null;
3787
3826
  }
3788
- function Ho(e, t = {}, n = "change") {
3827
+ function qo(e, t = {}, n = "change") {
3789
3828
  if (!t?.type || e == null) return {
3790
3829
  cleaned: e ?? "",
3791
3830
  error: null
@@ -3868,7 +3907,7 @@ function Ho(e, t = {}, n = "change") {
3868
3907
  break;
3869
3908
  }
3870
3909
  case "email":
3871
- c = n === "blur" ? r.trim() : r, c && !Lo(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3910
+ c = n === "blur" ? r.trim() : r, c && !Ho(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3872
3911
  break;
3873
3912
  case "websiteUrl":
3874
3913
  c = n === "blur" ? r.trim() : r, c && !/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i.test(c) && (l = `${s} must be a valid URL.`);
@@ -3880,21 +3919,21 @@ function Ho(e, t = {}, n = "change") {
3880
3919
  error: l
3881
3920
  };
3882
3921
  }
3883
- var Uo = "This value is already present";
3884
- function Wo(e) {
3922
+ var Jo = "This value is already present";
3923
+ function Yo(e) {
3885
3924
  return typeof e == "string" ? e : e?.type ?? e?.rule ?? e?.name;
3886
3925
  }
3887
- function Go(e) {
3888
- if (Wo(e) !== "unique") return null;
3926
+ function Xo(e) {
3927
+ if (Yo(e) !== "unique") return null;
3889
3928
  if (typeof e == "string") return {
3890
- message: Uo,
3929
+ message: Jo,
3891
3930
  normalizer: "trim",
3892
3931
  skipBlank: !0,
3893
3932
  validateOn: "blur"
3894
3933
  };
3895
3934
  let t = e.value && typeof e.value == "object" ? e.value : e, n = String(t.validateOn ?? "blur").toLowerCase();
3896
3935
  return {
3897
- message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : Uo,
3936
+ message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : Jo,
3898
3937
  collectionField: t.collectionField ?? "",
3899
3938
  normalizer: String(t.normalizer ?? "trim"),
3900
3939
  skipBlank: t.skipBlank !== !1,
@@ -3905,20 +3944,20 @@ function Go(e) {
3905
3944
  ].includes(n) ? n : "blur"
3906
3945
  };
3907
3946
  }
3908
- function Ko(e) {
3947
+ function Zo(e) {
3909
3948
  let t = e?.validations ?? e?.validation ?? e?.rules ?? [];
3910
3949
  if (!Array.isArray(t)) return null;
3911
3950
  for (let e of t) {
3912
- let t = Go(e);
3951
+ let t = Xo(e);
3913
3952
  if (t) return t;
3914
3953
  }
3915
3954
  return null;
3916
3955
  }
3917
- function qo(e = []) {
3956
+ function Qo(e = []) {
3918
3957
  let t = [];
3919
3958
  return (Array.isArray(e) ? e : []).forEach((e) => {
3920
3959
  (e?.fields ?? []).forEach((e) => {
3921
- let n = Ko(e);
3960
+ let n = Zo(e);
3922
3961
  !n || !e?.field || t.push({
3923
3962
  field: e.field,
3924
3963
  label: e.label ?? e.field,
@@ -3927,10 +3966,10 @@ function qo(e = []) {
3927
3966
  });
3928
3967
  }), t;
3929
3968
  }
3930
- function Jo(e) {
3969
+ function $o(e) {
3931
3970
  return e == null ? !0 : typeof e == "number" ? Number.isNaN(e) : typeof e == "boolean" ? !1 : Array.isArray(e) ? e.length === 0 : String(e).trim() === "";
3932
3971
  }
3933
- function Yo(e, t = "trim") {
3972
+ function es(e, t = "trim") {
3934
3973
  if (e == null) return "";
3935
3974
  let n = String(e);
3936
3975
  switch (String(t)) {
@@ -3942,10 +3981,10 @@ function Yo(e, t = "trim") {
3942
3981
  default: return n.trim();
3943
3982
  }
3944
3983
  }
3945
- function Xo(e, t) {
3946
- return !(!e || e.skipBlank !== !1 && Jo(t));
3984
+ function ts(e, t) {
3985
+ return !(!e || e.skipBlank !== !1 && $o(t));
3947
3986
  }
3948
- function Zo(e) {
3987
+ function ns(e) {
3949
3988
  return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
3950
3989
  }
3951
3990
  var J = {
@@ -3955,21 +3994,21 @@ var J = {
3955
3994
  STALE: "stale",
3956
3995
  ERROR: "error"
3957
3996
  };
3958
- function Qo({ module: e, field: t, recordId: n, normalized: r }) {
3997
+ function rs({ module: e, field: t, recordId: n, normalized: r }) {
3959
3998
  return `${e}${t}${n ?? ""}${r}`;
3960
3999
  }
3961
- function $o({ checkFieldUnique: e, onPendingChange: t } = {}) {
4000
+ function is({ checkFieldUnique: e, onPendingChange: t } = {}) {
3962
4001
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
3963
4002
  function o(e) {
3964
4003
  a = e, typeof t == "function" && t(a);
3965
4004
  }
3966
4005
  async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
3967
- if (!c || !t || !s || typeof e != "function" || !Xo(c, l)) return { status: J.SKIPPED };
3968
- let p = Qo({
4006
+ if (!c || !t || !s || typeof e != "function" || !ts(c, l)) return { status: J.SKIPPED };
4007
+ let p = rs({
3969
4008
  module: t,
3970
4009
  field: s,
3971
4010
  recordId: u,
3972
- normalized: Yo(l, c.normalizer)
4011
+ normalized: es(l, c.normalizer)
3973
4012
  });
3974
4013
  if (n.has(p)) return n.get(p);
3975
4014
  i += 1;
@@ -3987,7 +4026,7 @@ function $o({ checkFieldUnique: e, onPendingChange: t } = {}) {
3987
4026
  if (r.get(s) !== m) return { status: J.STALE };
3988
4027
  let a = i?.available === !1 ? {
3989
4028
  status: J.DUPLICATE,
3990
- message: es(i) || c.message || Uo
4029
+ message: as(i) || c.message || Jo
3991
4030
  } : { status: J.AVAILABLE };
3992
4031
  return n.set(p, a), a;
3993
4032
  } catch (e) {
@@ -4008,17 +4047,17 @@ function $o({ checkFieldUnique: e, onPendingChange: t } = {}) {
4008
4047
  }
4009
4048
  };
4010
4049
  }
4011
- function es(e) {
4050
+ function as(e) {
4012
4051
  return (e?.errors ?? []).find((e) => e?.message)?.message || e?.message || "";
4013
4052
  }
4014
- var ts = "__uniqueRule";
4015
- function ns({ field: e, validation: t, context: n }) {
4016
- let r = Go(t);
4053
+ var os = "__uniqueRule";
4054
+ function ss({ field: e, validation: t, context: n }) {
4055
+ let r = Xo(t);
4017
4056
  if (!r) return { validator: () => Promise.resolve() };
4018
4057
  let i = e?.field ?? "";
4019
4058
  return !n?.checker || !n?.module || !i ? { validator: () => Promise.resolve() } : {
4020
- [ts]: r,
4021
- validateTrigger: Zo(r),
4059
+ [os]: r,
4060
+ validateTrigger: ns(r),
4022
4061
  validator: async (e, t) => {
4023
4062
  let a = await n.checker.check({
4024
4063
  module: n.module,
@@ -4033,22 +4072,22 @@ function ns({ field: e, validation: t, context: n }) {
4033
4072
  }
4034
4073
  };
4035
4074
  }
4036
- function rs(e = []) {
4075
+ function cs(e = []) {
4037
4076
  let t = Array.isArray(e) ? e : [];
4038
- if (!t.some((e) => e && e[ts])) return t;
4039
- let n = t.filter((e) => e && !e[ts]);
4077
+ if (!t.some((e) => e && e[os])) return t;
4078
+ let n = t.filter((e) => e && !e[os]);
4040
4079
  return t.map((e) => {
4041
- if (!e || !e[ts]) return e;
4080
+ if (!e || !e[os]) return e;
4042
4081
  let t = e.validator;
4043
4082
  return {
4044
4083
  ...e,
4045
- validator: async (e, r) => await is(n, r, e) ? Promise.resolve() : t(e, r)
4084
+ validator: async (e, r) => await ls(n, r, e) ? Promise.resolve() : t(e, r)
4046
4085
  };
4047
4086
  });
4048
4087
  }
4049
- async function is(e = [], t, n = {}) {
4088
+ async function ls(e = [], t, n = {}) {
4050
4089
  for (let r of e) if (!(!r || typeof r == "string")) {
4051
- if (r.required && Jo(t) || !Jo(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
4090
+ if (r.required && $o(t) || !$o(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
4052
4091
  if (typeof r.validator == "function") try {
4053
4092
  await r.validator(n, t);
4054
4093
  } catch {
@@ -4057,7 +4096,7 @@ async function is(e = [], t, n = {}) {
4057
4096
  }
4058
4097
  return !1;
4059
4098
  }
4060
- function as(e) {
4099
+ function us(e) {
4061
4100
  let t = String(e ?? "").trim();
4062
4101
  if (!t.startsWith("{")) return null;
4063
4102
  try {
@@ -4066,19 +4105,19 @@ function as(e) {
4066
4105
  return null;
4067
4106
  }
4068
4107
  }
4069
- function os(e) {
4108
+ function ds(e) {
4070
4109
  if (!e) return null;
4071
- if (typeof e == "string") return as(e);
4110
+ if (typeof e == "string") return us(e);
4072
4111
  let t = [
4073
4112
  e.data,
4074
4113
  e.response,
4075
4114
  e,
4076
- as(e.message)
4115
+ us(e.message)
4077
4116
  ];
4078
4117
  for (let e of t) if (!(!e || typeof e != "object") && (Array.isArray(e.errors) || e.code === "DUPLICATE_VALUE")) return e;
4079
4118
  return null;
4080
4119
  }
4081
- function ss({ field: e, group: t, rowIndex: n }) {
4120
+ function fs({ field: e, group: t, rowIndex: n }) {
4082
4121
  let r = String(e ?? ""), i = Number(n);
4083
4122
  return t && Number.isInteger(i) && i >= 0 ? [
4084
4123
  String(t),
@@ -4086,14 +4125,14 @@ function ss({ field: e, group: t, rowIndex: n }) {
4086
4125
  ...r.split(".")
4087
4126
  ] : r;
4088
4127
  }
4089
- function cs(e, { uniqueRules: t = [] } = {}) {
4090
- let n = os(e);
4128
+ function ps(e, { uniqueRules: t = [] } = {}) {
4129
+ let n = ds(e);
4091
4130
  if (n) {
4092
4131
  let e = (Array.isArray(n.errors) ? n.errors : []).filter((e) => e?.field).map((e) => {
4093
4132
  let t = {
4094
4133
  field: e.field,
4095
- name: ss(e),
4096
- message: e.message || n.message || Uo
4134
+ name: fs(e),
4135
+ message: e.message || n.message || Jo
4097
4136
  };
4098
4137
  return Array.isArray(t.name) && (t.group = String(e.group), t.rowIndex = Number(e.rowIndex)), t;
4099
4138
  });
@@ -4110,7 +4149,7 @@ function cs(e, { uniqueRules: t = [] } = {}) {
4110
4149
  }
4111
4150
  //#endregion
4112
4151
  //#region src/services/uniqueValidationApi.js
4113
- async function ls({ module: e, field: t, value: n, recordId: r, clientId: i, region: o } = {}) {
4152
+ async function ms({ module: e, field: t, value: n, recordId: r, clientId: i, region: o } = {}) {
4114
4153
  if (!e || !t) throw Error("module and field are required to check uniqueness");
4115
4154
  let c = {
4116
4155
  field: t,
@@ -4144,7 +4183,7 @@ async function ls({ module: e, field: t, value: n, recordId: r, clientId: i, reg
4144
4183
  throw e;
4145
4184
  }
4146
4185
  }
4147
- async function us({ module: e, payload: t, excludeId: n } = {}) {
4186
+ async function hs({ module: e, payload: t, excludeId: n } = {}) {
4148
4187
  if (!e || !t) return { duplicate: !1 };
4149
4188
  try {
4150
4189
  let r = await a(s, `/module/duplicate-check?module=${encodeURIComponent(e)}`, {
@@ -4162,7 +4201,7 @@ async function us({ module: e, payload: t, excludeId: n } = {}) {
4162
4201
  }
4163
4202
  //#endregion
4164
4203
  //#region src/components/form/uploadAccept.js
4165
- var ds = [
4204
+ var gs = [
4166
4205
  "jpg",
4167
4206
  "jpeg",
4168
4207
  "png",
@@ -4171,18 +4210,18 @@ var ds = [
4171
4210
  "bmp",
4172
4211
  "svg",
4173
4212
  "avif"
4174
- ], fs = [
4213
+ ], _s = [
4175
4214
  "mp4",
4176
4215
  "webm",
4177
4216
  "ogg",
4178
4217
  "ogv",
4179
4218
  "mov",
4180
4219
  "m4v"
4181
- ], ps = [
4220
+ ], vs = [
4182
4221
  "pdf",
4183
4222
  "doc",
4184
4223
  "docx"
4185
- ], ms = [
4224
+ ], ys = [
4186
4225
  {
4187
4226
  label: "Any file",
4188
4227
  value: "any"
@@ -4207,45 +4246,45 @@ var ds = [
4207
4246
  label: "Images & Videos",
4208
4247
  value: "imagesAndVideos"
4209
4248
  }
4210
- ], hs = {
4249
+ ], bs = {
4211
4250
  resume: {
4212
- exts: ps,
4251
+ exts: vs,
4213
4252
  maxSizeMB: 2,
4214
4253
  hint: "PDF, DOC or DOCX",
4215
4254
  error: "Only PDF, DOC, and DOCX resume files are supported."
4216
4255
  },
4217
4256
  documents: {
4218
- exts: [...ps, ...ds],
4257
+ exts: [...vs, ...gs],
4219
4258
  hint: "PDF, DOC or image files",
4220
4259
  error: "Only document (PDF/DOC) or image files are allowed"
4221
4260
  },
4222
4261
  images: {
4223
- exts: ds,
4262
+ exts: gs,
4224
4263
  hint: "Image files",
4225
4264
  error: "Only image files are allowed"
4226
4265
  },
4227
4266
  videos: {
4228
- exts: fs,
4267
+ exts: _s,
4229
4268
  hint: "Video files",
4230
4269
  error: "Only video files are allowed"
4231
4270
  },
4232
4271
  imagesAndVideos: {
4233
- exts: [...ds, ...fs],
4272
+ exts: [...gs, ..._s],
4234
4273
  hint: "Image or video files",
4235
4274
  error: "Only image or video files are allowed"
4236
4275
  }
4237
4276
  };
4238
- function gs(e) {
4277
+ function xs(e) {
4239
4278
  let t = String(e?.field ?? e?.payloadKey ?? "").toLowerCase();
4240
4279
  return t ? t.includes("resume") || t.includes("cv") || t.includes("curriculumvitae") : !1;
4241
4280
  }
4242
- function _s(e) {
4281
+ function Ss(e) {
4243
4282
  let t = String(e?.accept ?? "").trim();
4244
- return t && t !== "any" ? hs[t] ?? null : !t && gs(e) ? hs.resume : hs[t] ?? null;
4283
+ return t && t !== "any" ? bs[t] ?? null : !t && xs(e) ? bs.resume : bs[t] ?? null;
4245
4284
  }
4246
4285
  //#endregion
4247
4286
  //#region src/components/form/quickActionLabels.js
4248
- var vs = /* @__PURE__ */ new Set([
4287
+ var Cs = /* @__PURE__ */ new Set([
4249
4288
  "of",
4250
4289
  "and",
4251
4290
  "the",
@@ -4254,7 +4293,7 @@ var vs = /* @__PURE__ */ new Set([
4254
4293
  "in",
4255
4294
  "a",
4256
4295
  "an"
4257
- ]), ys = {
4296
+ ]), ws = {
4258
4297
  addresses: "address",
4259
4298
  branches: "branch",
4260
4299
  batches: "batch",
@@ -4265,43 +4304,43 @@ var vs = /* @__PURE__ */ new Set([
4265
4304
  people: "person",
4266
4305
  statuses: "status"
4267
4306
  };
4268
- function bs(e) {
4307
+ function Ts(e) {
4269
4308
  let t = String(e ?? "").trim();
4270
4309
  if (!t) return "";
4271
4310
  if (t.length > 1 && t === t.toUpperCase() && /[A-Z]/.test(t)) return t;
4272
4311
  let n = t.toLowerCase();
4273
- return ys[n] ? ys[n] : /[^aeiou]ies$/i.test(t) ? t.slice(0, -3) + "y" : /(s|x|z|ch|sh)es$/i.test(t) ? t.slice(0, -2) : /[^s]s$/i.test(t) ? t.slice(0, -1) : t;
4312
+ return ws[n] ? ws[n] : /[^aeiou]ies$/i.test(t) ? t.slice(0, -3) + "y" : /(s|x|z|ch|sh)es$/i.test(t) ? t.slice(0, -2) : /[^s]s$/i.test(t) ? t.slice(0, -1) : t;
4274
4313
  }
4275
4314
  function Y(e) {
4276
4315
  let t = String(e ?? "").trim();
4277
4316
  if (!t) return "";
4278
4317
  let n = t.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-.]+/g, " ").split(/\s+/).filter(Boolean);
4279
4318
  if (!n.length) return "";
4280
- let r = bs(n[n.length - 1]);
4319
+ let r = Ts(n[n.length - 1]);
4281
4320
  return [...n.slice(0, -1), r].map((e, t) => {
4282
4321
  let n = e.toLowerCase();
4283
- return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && vs.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
4322
+ return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && Cs.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
4284
4323
  }).join(" ");
4285
4324
  }
4286
- function xs(e, t) {
4325
+ function Es(e, t) {
4287
4326
  let n = String(e?.quickCreateLabel ?? "").trim();
4288
4327
  if (n && n.toLowerCase() !== "add more") return n;
4289
4328
  let r = Y(e?.quickCreateModule || t);
4290
4329
  return r ? `Add New ${r}` : "Add New";
4291
4330
  }
4292
- function Ss(e, t) {
4331
+ function Ds(e, t) {
4293
4332
  let n = String(e?.quickEditLabel ?? "").trim();
4294
4333
  if (n && n.toLowerCase() !== "add more") return n;
4295
4334
  let r = Y(e?.quickEditModule || t);
4296
4335
  return r ? `Edit ${r}` : "Edit";
4297
4336
  }
4298
- function Cs(e, t, n) {
4337
+ function Os(e, t, n) {
4299
4338
  let r = Y((e === "create" ? t?.quickCreateModule : t?.quickEditModule) || n);
4300
- return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` : xs(t, n)) : String(t?.quickEditTitle ?? "").trim() || (r ? `Edit ${r}` : Ss(t, n));
4339
+ return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` : Es(t, n)) : String(t?.quickEditTitle ?? "").trim() || (r ? `Edit ${r}` : Ds(t, n));
4301
4340
  }
4302
4341
  //#endregion
4303
4342
  //#region src/components/AppButton.jsx
4304
- function ws({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
4343
+ function ks({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
4305
4344
  let o = /* @__PURE__ */ C(y, {
4306
4345
  className: `app-button app-button--${i} ${t}`.trim(),
4307
4346
  icon: n,
@@ -4316,13 +4355,13 @@ function ws({ children: e, className: t = "", icon: n, to: r, variant: i = "defa
4316
4355
  }
4317
4356
  //#endregion
4318
4357
  //#region src/components/detail/userNames.js
4319
- function Ts(e) {
4358
+ function As(e) {
4320
4359
  return !e || typeof e != "object" ? "" : [e.first_name ?? e.firstName ?? e.FIRST_NAME, e.last_name ?? e.lastName ?? e.LAST_NAME].filter(Boolean).join(" ").trim() || e.name || e.user_name || e.userName || e.username || e.email || "";
4321
4360
  }
4322
- function Es(e) {
4361
+ function js(e) {
4323
4362
  let t = {};
4324
4363
  return (Array.isArray(e) ? e : []).forEach((e) => {
4325
- let n = Ts(e);
4364
+ let n = As(e);
4326
4365
  n && [
4327
4366
  e.legacyUserId,
4328
4367
  e.userId,
@@ -4336,16 +4375,16 @@ function Es(e) {
4336
4375
  });
4337
4376
  }), t;
4338
4377
  }
4339
- var Ds = /* @__PURE__ */ new Map();
4340
- function Os(e) {
4378
+ var Ms = /* @__PURE__ */ new Map();
4379
+ function Ns(e) {
4341
4380
  let t = String(e ?? "").trim();
4342
4381
  if (!t) return Promise.resolve("");
4343
- if (Ds.has(t)) return Ds.get(t);
4344
- let n = a(s, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => Ts(e?.data ?? e ?? null)).catch(() => "");
4345
- return Ds.set(t, n), n;
4382
+ if (Ms.has(t)) return Ms.get(t);
4383
+ let n = a(s, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => As(e?.data ?? e ?? null)).catch(() => "");
4384
+ return Ms.set(t, n), n;
4346
4385
  }
4347
4386
  var X = (e) => e == null ? "" : String(e).trim();
4348
- function ks(e) {
4387
+ function Ps(e) {
4349
4388
  let t = e?.quickCreateNotice;
4350
4389
  return !t || typeof t != "object" || t.enabled === !1 ? null : {
4351
4390
  enabled: !0,
@@ -4358,7 +4397,7 @@ function ks(e) {
4358
4397
  creatorLabel: X(t.creatorLabel) || "Created by"
4359
4398
  };
4360
4399
  }
4361
- var As = [
4400
+ var Fs = [
4362
4401
  "clientName",
4363
4402
  "companyName",
4364
4403
  "name",
@@ -4368,24 +4407,24 @@ var As = [
4368
4407
  "label",
4369
4408
  "employerName",
4370
4409
  "vendorName"
4371
- ], js = (e, t) => {
4410
+ ], Is = (e, t) => {
4372
4411
  if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
4373
- }, Ms = (e) => typeof e == "string" || typeof e == "number" ? X(e) : e && typeof e == "object" ? X(e.label ?? e.name ?? e.title ?? "") : "";
4374
- function Ns(e, { recordNameField: t = "", displayField: n = "" } = {}) {
4412
+ }, Ls = (e) => typeof e == "string" || typeof e == "number" ? X(e) : e && typeof e == "object" ? X(e.label ?? e.name ?? e.title ?? "") : "";
4413
+ function Rs(e, { recordNameField: t = "", displayField: n = "" } = {}) {
4375
4414
  if (!e || typeof e != "object") return "";
4376
4415
  for (let r of [
4377
4416
  t,
4378
4417
  n,
4379
- ...As
4418
+ ...Fs
4380
4419
  ]) {
4381
4420
  if (!r) continue;
4382
- let t = Ms(js(e, r));
4421
+ let t = Ls(Is(e, r));
4383
4422
  if (t) return t;
4384
4423
  }
4385
4424
  let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
4386
4425
  return r ? X(e[r]) : "";
4387
4426
  }
4388
- function Ps(e) {
4427
+ function zs(e) {
4389
4428
  if (!e || typeof e != "object") return "";
4390
4429
  let t = [
4391
4430
  e.createdBy,
@@ -4407,36 +4446,36 @@ function Ps(e) {
4407
4446
  }
4408
4447
  return "";
4409
4448
  }
4410
- function Fs(e = i) {
4449
+ function Bs(e = i) {
4411
4450
  try {
4412
- return Ts(e()) || "";
4451
+ return As(e()) || "";
4413
4452
  } catch {
4414
4453
  return "";
4415
4454
  }
4416
4455
  }
4417
- var Is = (e, t) => a(s, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
4456
+ var Vs = (e, t) => a(s, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
4418
4457
  let t = e?.data?.data ?? e?.data ?? [];
4419
4458
  return Array.isArray(t) ? t[0] : t;
4420
4459
  });
4421
- async function Ls({ module: e, recordId: t, notice: n, displayField: r = "", deps: a = {} } = {}) {
4422
- let { fetchRecord: o = Is, fetchUserNameFn: s = Os, getUser: c = i } = a, l = null;
4460
+ async function Hs({ module: e, recordId: t, notice: n, displayField: r = "", deps: a = {} } = {}) {
4461
+ let { fetchRecord: o = Vs, fetchUserNameFn: s = Ns, getUser: c = i } = a, l = null;
4423
4462
  if (e && t) try {
4424
4463
  l = await o(e, t);
4425
4464
  } catch {
4426
4465
  l = null;
4427
4466
  }
4428
- let u = n?.showRecordName === !1 ? "" : Ns(l, {
4467
+ let u = n?.showRecordName === !1 ? "" : Rs(l, {
4429
4468
  recordNameField: n?.recordNameField,
4430
4469
  displayField: r
4431
4470
  }), d = "";
4432
4471
  if (n?.showCreator !== !1) {
4433
- let e = Ps(l);
4472
+ let e = zs(l);
4434
4473
  if (e) try {
4435
4474
  d = X(await s(e));
4436
4475
  } catch {
4437
4476
  d = "";
4438
4477
  }
4439
- d ||= Fs(c);
4478
+ d ||= Bs(c);
4440
4479
  }
4441
4480
  return {
4442
4481
  recordName: u,
@@ -4445,17 +4484,17 @@ async function Ls({ module: e, recordId: t, notice: n, displayField: r = "", dep
4445
4484
  }
4446
4485
  //#endregion
4447
4486
  //#region src/components/form/QuickCreateEditField.jsx
4448
- var Rs = d(() => import("./index.js").then((e) => e.i)), zs = d(() => import("./index.js").then((e) => e.n)), Bs = (e) => e == null || e === "", Vs = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4449
- function Hs(e, t, n, r, i) {
4487
+ var Us = d(() => import("./index.js").then((e) => e.i)), Ws = d(() => import("./index.js").then((e) => e.n)), Gs = (e) => e == null || e === "", Ks = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4488
+ function qs(e, t, n, r, i) {
4450
4489
  let a = e.quickEditIdFrom;
4451
4490
  if (a) {
4452
- let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Vs(a)] : Vs(a), i = t?.getFieldValue?.(e);
4453
- return Bs(i) && (i = r?.[a]), Bs(i) ? null : i;
4491
+ let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Ks(a)] : Ks(a), i = t?.getFieldValue?.(e);
4492
+ return Gs(i) && (i = r?.[a]), Gs(i) ? null : i;
4454
4493
  }
4455
- return i && typeof i == "object" ? i.value ?? null : Bs(i) ? null : i;
4494
+ return i && typeof i == "object" ? i.value ?? null : Gs(i) ? null : i;
4456
4495
  }
4457
- function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4458
- let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", v = m(() => p ? Hs(e, t, n, i, a) : null, [
4496
+ function Js({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4497
+ let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", v = m(() => p ? qs(e, t, n, i, a) : null, [
4459
4498
  p,
4460
4499
  e,
4461
4500
  t,
@@ -4485,12 +4524,12 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4485
4524
  module: _,
4486
4525
  recordId: String(v)
4487
4526
  }), ie = (t) => {
4488
- let n = ks(e);
4527
+ let n = Ps(e);
4489
4528
  n && (d({
4490
4529
  ...n,
4491
4530
  recordName: "",
4492
4531
  creatorName: ""
4493
- }), Ls({
4532
+ }), Hs({
4494
4533
  module: h,
4495
4534
  recordId: t,
4496
4535
  notice: n,
@@ -4520,7 +4559,7 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4520
4559
  icon: /* @__PURE__ */ C(me, {}),
4521
4560
  onClick: x,
4522
4561
  style: { paddingLeft: 0 },
4523
- children: xs(e, h)
4562
+ children: Es(e, h)
4524
4563
  }), p && /* @__PURE__ */ C(y, {
4525
4564
  type: "link",
4526
4565
  size: "small",
@@ -4528,12 +4567,12 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4528
4567
  onClick: re,
4529
4568
  disabled: !v,
4530
4569
  title: v ? void 0 : `Choose a ${Y(_) || "record"} above first, then edit it here`,
4531
- children: Ss(e, _)
4570
+ children: Ds(e, _)
4532
4571
  })]
4533
4572
  })
4534
4573
  }), ae = s ? /* @__PURE__ */ C(ee, {
4535
4574
  open: !0,
4536
- title: Cs(s.mode, e, s.mode === "create" ? h : _),
4575
+ title: Os(s.mode, e, s.mode === "create" ? h : _),
4537
4576
  width: "min(1080px, 96vw)",
4538
4577
  footer: null,
4539
4578
  destroyOnClose: !0,
@@ -4551,7 +4590,7 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4551
4590
  },
4552
4591
  children: /* @__PURE__ */ C(ne, {})
4553
4592
  }),
4554
- children: s.mode === "create" ? /* @__PURE__ */ C(Rs, {
4593
+ children: s.mode === "create" ? /* @__PURE__ */ C(Us, {
4555
4594
  moduleName: s.module,
4556
4595
  embedded: !0,
4557
4596
  breadcrumbItems: [],
@@ -4559,7 +4598,7 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4559
4598
  onSuccess: (e) => {
4560
4599
  b(), ie(e), o?.("create", e);
4561
4600
  }
4562
- }) : /* @__PURE__ */ C(zs, {
4601
+ }) : /* @__PURE__ */ C(Ws, {
4563
4602
  moduleName: s.module,
4564
4603
  recordId: s.recordId,
4565
4604
  embedded: !0,
@@ -4583,7 +4622,7 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4583
4622
  width: "min(520px, 94vw)",
4584
4623
  maskClosable: !1,
4585
4624
  onCancel: () => d(null),
4586
- footer: /* @__PURE__ */ C(ws, {
4625
+ footer: /* @__PURE__ */ C(ks, {
4587
4626
  variant: "primary",
4588
4627
  type: "primary",
4589
4628
  onClick: () => d(null),
@@ -4620,8 +4659,8 @@ function Us({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4620
4659
  }
4621
4660
  //#endregion
4622
4661
  //#region src/components/form/crossFieldRules.js
4623
- var Ws = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4624
- function Gs(e, t, n) {
4662
+ var Ys = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4663
+ function Xs(e, t, n) {
4625
4664
  let r = String(t ?? "").includes(".") ? String(t).split(".") : [t];
4626
4665
  if (typeof n == "function") {
4627
4666
  let e = n(t);
@@ -4629,23 +4668,23 @@ function Gs(e, t, n) {
4629
4668
  }
4630
4669
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), ...r] : r;
4631
4670
  }
4632
- function Ks({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4671
+ function Zs({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4633
4672
  let s = n.field ?? n.compareField ?? r;
4634
4673
  return { validator: async (n, r) => {
4635
- if (!s || Ws(r)) return Promise.resolve();
4636
- let c = i?.getFieldValue?.(Gs(a, s, o));
4637
- if (Ws(c)) return Promise.resolve();
4674
+ if (!s || Ys(r)) return Promise.resolve();
4675
+ let c = i?.getFieldValue?.(Xs(a, s, o));
4676
+ if (Ys(c)) return Promise.resolve();
4638
4677
  let l = Number(c), u = Number(r);
4639
4678
  return Number.isNaN(l) || Number.isNaN(u) || u <= l ? Promise.resolve() : Promise.reject(Error(t ?? `${e} must not exceed ${s}`));
4640
4679
  } };
4641
4680
  }
4642
- function qs(e = {}, t, n) {
4681
+ function Qs(e = {}, t, n) {
4643
4682
  let r = e.field ?? e.compareField ?? e.value;
4644
- return r ? Gs(t, r, n) : null;
4683
+ return r ? Xs(t, r, n) : null;
4645
4684
  }
4646
4685
  //#endregion
4647
4686
  //#region src/components/form/maxCeiling.js
4648
- function Js(e, t) {
4687
+ function $s(e, t) {
4649
4688
  let n = String(t).split(".").filter(Boolean);
4650
4689
  if (!Array.isArray(e)) return n.length > 1 ? n : t;
4651
4690
  if (n.length > 1) {
@@ -4658,14 +4697,14 @@ function Js(e, t) {
4658
4697
  let r = [...e];
4659
4698
  return r[r.length - 1] = n[0], r;
4660
4699
  }
4661
- function Ys(e, t, n) {
4662
- let r = e?.getFieldValue?.(Js(t, n));
4700
+ function ec(e, t, n) {
4701
+ let r = e?.getFieldValue?.($s(t, n));
4663
4702
  return r != null && r !== "" ? r : e?.getFieldValue?.(n);
4664
4703
  }
4665
- function Xs(e) {
4704
+ function tc(e) {
4666
4705
  return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
4667
4706
  }
4668
- function Zs(e, t) {
4707
+ function nc(e, t) {
4669
4708
  for (let n of e ?? []) {
4670
4709
  let e = t(n);
4671
4710
  if (e == null || e === "") continue;
@@ -4677,14 +4716,14 @@ function Zs(e, t) {
4677
4716
  }
4678
4717
  return null;
4679
4718
  }
4680
- function Qs({ input: e, compareFields: t, readValue: n }) {
4719
+ function rc({ input: e, compareFields: t, readValue: n }) {
4681
4720
  let r = {
4682
4721
  ok: !0,
4683
4722
  field: null,
4684
4723
  maximum: null
4685
4724
  };
4686
4725
  if (e == null || e === "") return r;
4687
- let i = Zs(t, n);
4726
+ let i = nc(t, n);
4688
4727
  if (!i) return r;
4689
4728
  let a = Number(e);
4690
4729
  return Number.isFinite(a) ? {
@@ -4695,39 +4734,39 @@ function Qs({ input: e, compareFields: t, readValue: n }) {
4695
4734
  }
4696
4735
  //#endregion
4697
4736
  //#region src/components/form/contextPrefill.js
4698
- var $s = { candidates: ["applicantId"] };
4699
- function ec(e) {
4737
+ var ic = { candidates: ["applicantId"] };
4738
+ function ac(e) {
4700
4739
  let t = String(e ?? "").trim();
4701
4740
  if (!t) return [];
4702
4741
  let n = t.endsWith("s") ? t.slice(0, -1) : t;
4703
4742
  return [.../* @__PURE__ */ new Set([
4704
4743
  `${n}Id`,
4705
4744
  `${t}Id`,
4706
- ...$s[t] ?? []
4745
+ ...ic[t] ?? []
4707
4746
  ])];
4708
4747
  }
4709
- function tc(e, t) {
4748
+ function oc(e, t) {
4710
4749
  if (!t) return "";
4711
4750
  let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
4712
- for (let r of ec(e)) {
4751
+ for (let r of ac(e)) {
4713
4752
  let e = String(n(t[r]) || "");
4714
4753
  if (e) return e;
4715
4754
  }
4716
4755
  return "";
4717
4756
  }
4718
- function nc(e, t) {
4757
+ function sc(e, t) {
4719
4758
  let n = /* @__PURE__ */ new Set();
4720
4759
  return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
4721
4760
  e?.prefillFromModule && n.add(t(e.prefillFromModule));
4722
4761
  })), [...n];
4723
4762
  }
4724
- function rc(e) {
4763
+ function cc(e) {
4725
4764
  return e?.payloadMode === "skip";
4726
4765
  }
4727
- function ic(e) {
4766
+ function lc(e) {
4728
4767
  return Array.isArray(e) ? e : Array.isArray(e?.groups) ? e.groups : Array.isArray(e?.data) ? e.data : Array.isArray(e?.data?.groups) ? e.data.groups : [];
4729
4768
  }
4730
- function ac(e) {
4769
+ function uc(e) {
4731
4770
  let t = {};
4732
4771
  return (e ?? []).forEach((e) => {
4733
4772
  e?.addRow || (e?.fields ?? []).forEach((e) => {
@@ -4735,7 +4774,7 @@ function ac(e) {
4735
4774
  });
4736
4775
  }), t;
4737
4776
  }
4738
- function oc(e, t) {
4777
+ function dc(e, t) {
4739
4778
  if (!e || !t) return;
4740
4779
  let n = e;
4741
4780
  for (let e of String(t).split(".")) {
@@ -4750,7 +4789,7 @@ function oc(e, t) {
4750
4789
  }
4751
4790
  return n;
4752
4791
  }
4753
- function sc(e, t) {
4792
+ function fc(e, t) {
4754
4793
  if (!(!e || !t)) for (let n of [
4755
4794
  t.prefillFrom,
4756
4795
  t.field,
@@ -4758,13 +4797,13 @@ function sc(e, t) {
4758
4797
  ]) {
4759
4798
  if (!n) continue;
4760
4799
  let t = e[n];
4761
- if (t ??= B(e, n), t ??= oc(e, n), t != null) return t;
4800
+ if (t ??= B(e, n), t ??= dc(e, n), t != null) return t;
4762
4801
  }
4763
4802
  }
4764
4803
  //#endregion
4765
4804
  //#region src/components/form/ValidationOverrideCheckbox.jsx
4766
- function cc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4767
- let a = Oi(t), o = x.useWatch(n, e);
4805
+ function pc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4806
+ let a = Ni(t), o = x.useWatch(n, e);
4768
4807
  if (!a) return null;
4769
4808
  let s = a.label || "Allow beyond the limit", c = () => {
4770
4809
  setTimeout(() => {
@@ -4775,7 +4814,7 @@ function cc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4775
4814
  e.setFieldValue(n, !1), c();
4776
4815
  return;
4777
4816
  }
4778
- let i = await Ma(Fi(t));
4817
+ let i = await La(Bi(t));
4779
4818
  e.setFieldValue(n, !!i), c();
4780
4819
  }, u = a.help ? `${s} — ${a.help}` : s;
4781
4820
  return /* @__PURE__ */ C(re, {
@@ -4794,34 +4833,34 @@ function cc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4794
4833
  }
4795
4834
  //#endregion
4796
4835
  //#region src/components/form/prefillWhenRules.js
4797
- var lc = (e) => String(e ?? "");
4798
- function uc(e) {
4836
+ var mc = (e) => String(e ?? "");
4837
+ function hc(e) {
4799
4838
  let t = /* @__PURE__ */ new Set(), n = [];
4800
4839
  return (Array.isArray(e) ? e : []).forEach((e) => {
4801
4840
  let r = e?.field;
4802
4841
  !r || t.has(r) || (t.add(r), n.push(r));
4803
4842
  }), n;
4804
4843
  }
4805
- function dc(e, t, n, r) {
4806
- return uc(e).map((e) => ({
4844
+ function gc(e, t, n, r) {
4845
+ return hc(e).map((e) => ({
4807
4846
  field: e,
4808
4847
  path: n(t, e, r)
4809
4848
  }));
4810
4849
  }
4811
- function fc(e, t = {}) {
4812
- return !e || !e.field ? !1 : lc(t[e.field]) === lc(e.value);
4850
+ function _c(e, t = {}) {
4851
+ return !e || !e.field ? !1 : mc(t[e.field]) === mc(e.value);
4813
4852
  }
4814
- function pc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
4815
- let o = (Array.isArray(e) ? e : []).find((e) => fc(e, t));
4853
+ function vc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
4854
+ let o = (Array.isArray(e) ? e : []).find((e) => _c(e, t));
4816
4855
  return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
4817
4856
  action: "set",
4818
4857
  value: o.setValue
4819
- } : i && r !== void 0 && lc(n) === lc(r) ? { action: "clear" } : { action: "none" };
4858
+ } : i && r !== void 0 && mc(n) === mc(r) ? { action: "clear" } : { action: "none" };
4820
4859
  }
4821
4860
  //#endregion
4822
4861
  //#region src/components/form/optionConstraints.js
4823
4862
  var Z = (e) => String(e ?? "").trim().toLowerCase();
4824
- function mc(e) {
4863
+ function yc(e) {
4825
4864
  let t = Array.isArray(e) ? e : [e], n = [];
4826
4865
  return t.forEach((e) => {
4827
4866
  if (e != null && e !== "") {
@@ -4841,42 +4880,42 @@ function mc(e) {
4841
4880
  }
4842
4881
  }), n;
4843
4882
  }
4844
- function hc(e = [], t) {
4845
- let n = mc(t);
4883
+ function bc(e = [], t) {
4884
+ let n = yc(t);
4846
4885
  if (!n.length || !Array.isArray(e) || e.length === 0) return e;
4847
4886
  let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Z(e.value)) || r.has(Z(e.label)) : r.has(Z(e)));
4848
4887
  return i.length > 0 ? i : e;
4849
4888
  }
4850
- function gc(e) {
4889
+ function xc(e) {
4851
4890
  let t = [];
4852
4891
  return [e?.setValue, e?.setValueLabel].forEach((e) => {
4853
4892
  e != null && e !== "" && t.push(Z(e));
4854
4893
  }), t;
4855
4894
  }
4856
- function _c(e, t = {}) {
4895
+ function Sc(e, t = {}) {
4857
4896
  let n = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
4858
4897
  return n.forEach((e) => {
4859
4898
  if (!e || e.clearValue) return;
4860
- let n = gc(e);
4899
+ let n = xc(e);
4861
4900
  if (!n.length) return;
4862
- let a = fc(e, t) ? i : r;
4901
+ let a = _c(e, t) ? i : r;
4863
4902
  n.forEach((e) => a.add(e));
4864
4903
  }), i.forEach((e) => r.delete(e)), [...r];
4865
4904
  }
4866
- function vc(e = [], t, n) {
4867
- let r = _c(t, n);
4905
+ function Cc(e = [], t, n) {
4906
+ let r = Sc(t, n);
4868
4907
  if (!r.length || !Array.isArray(e) || e.length === 0) return e;
4869
4908
  let i = new Set(r);
4870
4909
  return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Z(e.value)) || i.has(Z(e.label))) : !i.has(Z(e)));
4871
4910
  }
4872
- function yc(e, t = {}, n) {
4911
+ function wc(e, t = {}, n) {
4873
4912
  let r = Array.isArray(e) ? e : [];
4874
4913
  if (n == null || n === "") return [];
4875
4914
  let i = Z(n), a = [], o = /* @__PURE__ */ new Set();
4876
4915
  return r.forEach((e) => {
4877
4916
  if (!e || e.clearValue) return;
4878
4917
  let { setValue: n, setValueLabel: r } = e;
4879
- n != null && n !== "" && r && Z(n) === i && fc(e, t) && (o.has(Z(n)) || (o.add(Z(n)), a.push({
4918
+ n != null && n !== "" && r && Z(n) === i && _c(e, t) && (o.has(Z(n)) || (o.add(Z(n)), a.push({
4880
4919
  value: n,
4881
4920
  label: r
4882
4921
  })));
@@ -4884,8 +4923,8 @@ function yc(e, t = {}, n) {
4884
4923
  }
4885
4924
  //#endregion
4886
4925
  //#region src/components/form/optionRowFilters.js
4887
- var bc = 64;
4888
- function xc(e) {
4926
+ var Tc = 64;
4927
+ function Ec(e) {
4889
4928
  if (String(e ?? "").trim() !== "currentUserId") return "";
4890
4929
  try {
4891
4930
  return typeof localStorage > "u" ? "" : String(localStorage.getItem("userId") ?? "").trim();
@@ -4893,34 +4932,34 @@ function xc(e) {
4893
4932
  return "";
4894
4933
  }
4895
4934
  }
4896
- var Q = (e) => String(e ?? "").trim().toLowerCase(), Sc = (e) => e != null && String(e).trim() !== "";
4897
- function Cc(e) {
4935
+ var Q = (e) => String(e ?? "").trim().toLowerCase(), Dc = (e) => e != null && String(e).trim() !== "";
4936
+ function Oc(e) {
4898
4937
  let t = Array.isArray(e) ? e : String(e ?? "").split(",");
4899
4938
  return new Set(t.map(Q).filter((e) => e !== ""));
4900
4939
  }
4901
- function wc(e, t) {
4902
- return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => Sc(e?.extraData?.[t]));
4940
+ function kc(e, t) {
4941
+ return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => Dc(e?.extraData?.[t]));
4903
4942
  }
4904
- function Tc(e, t, n) {
4943
+ function Ac(e, t, n) {
4905
4944
  let r = e?.extraData?.[t];
4906
- if (!Sc(n)) return r === !0;
4907
- let i = Cc(n);
4945
+ if (!Dc(n)) return r === !0;
4946
+ let i = Oc(n);
4908
4947
  return i.size === 0 ? r === !0 : i.has(Q(r));
4909
4948
  }
4910
- function Ec(e, t) {
4949
+ function jc(e, t) {
4911
4950
  let n = /* @__PURE__ */ new Map();
4912
4951
  return (Array.isArray(e) ? e : []).forEach((e) => {
4913
4952
  let r = Q(e?.value);
4914
4953
  r && n.set(r, Q(e?.extraData?.[t]));
4915
4954
  }), n;
4916
4955
  }
4917
- function Dc(e, t, n) {
4956
+ function Mc(e, t, n) {
4918
4957
  let r = Q(n);
4919
4958
  if (!r) return !1;
4920
4959
  let i = /* @__PURE__ */ new Set(), a = Q(e);
4921
4960
  if (!a) return !1;
4922
4961
  i.add(a);
4923
- for (let e = 0; e < bc; e += 1) {
4962
+ for (let e = 0; e < Tc; e += 1) {
4924
4963
  let e = t.get(a);
4925
4964
  if (!e) return !1;
4926
4965
  if (e === r) return !0;
@@ -4929,63 +4968,63 @@ function Dc(e, t, n) {
4929
4968
  }
4930
4969
  return !1;
4931
4970
  }
4932
- function Oc(e = {}) {
4971
+ function Nc(e = {}) {
4933
4972
  let t = [], n = (e) => {
4934
4973
  let n = String(e ?? "").trim();
4935
4974
  n && !t.includes(n) && t.push(n);
4936
4975
  };
4937
4976
  return (Array.isArray(e.extraFields) ? e.extraFields : []).forEach(n), n(e.optionsRequireExtraField), n(e.optionsHierarchyParentField), t;
4938
4977
  }
4939
- function kc(e, t = {}, n = {}) {
4978
+ function Pc(e, t = {}, n = {}) {
4940
4979
  if (!Array.isArray(e) || e.length === 0) return e;
4941
4980
  let r = n.source ? `[${n.source}]` : "[optionRowFilters]", i = t.field ?? t.label ?? "(unnamed field)", a = typeof n.warn == "function" ? n.warn : (e) => {
4942
4981
  typeof console < "u" && console.warn(e);
4943
4982
  }, o = e, s = String(t.optionsRequireExtraField ?? "").trim();
4944
- s && (wc(o, s) ? o = o.filter((e) => Tc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
4983
+ s && (kc(o, s) ? o = o.filter((e) => Ac(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
4945
4984
  let c = String(t.optionsHierarchyParentField ?? "").trim();
4946
4985
  if (c) {
4947
- let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = xc(n);
4986
+ let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = Ec(n);
4948
4987
  if (!s) a(`${r} "${i}": hierarchy filter SKIPPED — identity "${n}" could not be resolved (no signed-in user id available). Showing the list unrestricted by reporting line.`);
4949
- else if (!wc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
4988
+ else if (!kc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
4950
4989
  else {
4951
- let t = Ec(e, c);
4952
- o = o.filter((e) => Dc(e?.value, t, s));
4990
+ let t = jc(e, c);
4991
+ o = o.filter((e) => Mc(e?.value, t, s));
4953
4992
  }
4954
4993
  }
4955
4994
  return o;
4956
4995
  }
4957
4996
  //#endregion
4958
4997
  //#region src/components/form/fieldTooltip.js
4959
- var Ac = (e) => e == null || String(e).trim() === "", jc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
4960
- function Mc(e) {
4961
- return Ac(e?.tooltip) ? jc(e?.infoEnabled) && !Ac(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
4998
+ var Fc = (e) => e == null || String(e).trim() === "", Ic = (e) => e === !0 || e === 1 || e === "1" || e === "true";
4999
+ function Lc(e) {
5000
+ return Fc(e?.tooltip) ? Ic(e?.infoEnabled) && !Fc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
4962
5001
  }
4963
5002
  //#endregion
4964
5003
  //#region src/components/form/dependentLookupReset.js
4965
- var Nc = Symbol("parentFilterUnseen"), Pc = (e) => e == null || e === "", Fc = (e, t) => String(e ?? "") === String(t ?? "");
4966
- function Ic({ previous: e, next: t, currentValue: n, scoped: r = !0 }) {
4967
- return !(!r || e === Nc || Fc(e, t) || Pc(e) || Pc(n));
5004
+ var Rc = Symbol("parentFilterUnseen"), zc = (e) => e == null || e === "", Bc = (e, t) => String(e ?? "") === String(t ?? "");
5005
+ function Vc({ previous: e, next: t, currentValue: n, scoped: r = !0 }) {
5006
+ return !(!r || e === Rc || Bc(e, t) || zc(e) || zc(n));
4968
5007
  }
4969
5008
  //#endregion
4970
5009
  //#region src/utils/roleAllowsAction.js
4971
- function Lc(e) {
4972
- return e == null ? !0 : typeof e == "object" ? Lc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
5010
+ function Hc(e) {
5011
+ return e == null ? !0 : typeof e == "object" ? Hc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
4973
5012
  }
4974
- function Rc(e, t) {
5013
+ function Uc(e, t) {
4975
5014
  if (!e) return !0;
4976
5015
  try {
4977
5016
  let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split(".");
4978
- return Lc((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
5017
+ return Hc((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
4979
5018
  } catch {
4980
5019
  return !0;
4981
5020
  }
4982
5021
  }
4983
5022
  //#endregion
4984
5023
  //#region src/utils/afterSubmitNav.js
4985
- function zc(e) {
5024
+ function Wc(e) {
4986
5025
  return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
4987
5026
  }
4988
- function Bc(e, t, n) {
5027
+ function Gc(e, t, n) {
4989
5028
  let r = String(e ?? "").trim();
4990
5029
  return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
4991
5030
  let i = r === "id" ? t : n?.[r];
@@ -4994,50 +5033,50 @@ function Bc(e, t, n) {
4994
5033
  }
4995
5034
  //#endregion
4996
5035
  //#region src/utils/backNav.js
4997
- function Vc(e = typeof window < "u" ? window : void 0) {
5036
+ function Kc(e = typeof window < "u" ? window : void 0) {
4998
5037
  let t = e?.history?.state?.idx;
4999
5038
  return typeof t == "number" && t > 0;
5000
5039
  }
5001
- function Hc({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5002
- return t && e ? { path: e } : Vc(r) ? { back: !0 } : e ? { path: e } : { path: n };
5040
+ function qc({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5041
+ return t && e ? { path: e } : Kc(r) ? { back: !0 } : e ? { path: e } : { path: n };
5003
5042
  }
5004
- function Uc(e, t = {}) {
5005
- let n = Hc(t);
5043
+ function Jc(e, t = {}) {
5044
+ let n = qc(t);
5006
5045
  return n.back ? e(-1) : e(n.path), n;
5007
5046
  }
5008
5047
  //#endregion
5009
5048
  //#region src/components/form/educationRules.js
5010
- var Wc = (e) => e == null ? "" : String(e).trim();
5011
- function Gc(e, t) {
5049
+ var Yc = (e) => e == null ? "" : String(e).trim();
5050
+ function Xc(e, t) {
5012
5051
  let n = e?.regionRules;
5013
5052
  if (!n || typeof n != "object") return e ?? {};
5014
- let r = Wc(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5053
+ let r = Yc(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5015
5054
  return !i || typeof i != "object" ? e ?? {} : {
5016
5055
  ...e,
5017
5056
  ...i
5018
5057
  };
5019
5058
  }
5020
- function Kc(e) {
5059
+ function Zc(e) {
5021
5060
  return e?.allowInProgress !== !1;
5022
5061
  }
5023
- function qc(e) {
5024
- return Kc(e) ? "" : Xc(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5062
+ function Qc(e) {
5063
+ return Zc(e) ? "" : tl(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5025
5064
  }
5026
- function Jc(e) {
5027
- return Kc(e) ? "allow" : Wc(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5065
+ function $c(e) {
5066
+ return Zc(e) ? "allow" : Yc(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5028
5067
  }
5029
- function Yc(e) {
5030
- return Jc(e) === "block";
5068
+ function el(e) {
5069
+ return $c(e) === "block";
5031
5070
  }
5032
- function Xc(e) {
5033
- return Jc(e) === "warn";
5071
+ function tl(e) {
5072
+ return $c(e) === "warn";
5034
5073
  }
5035
- function Zc(e) {
5036
- if (!Yc(e)) return null;
5037
- let t = qc(e);
5074
+ function nl(e) {
5075
+ if (!el(e)) return null;
5076
+ let t = Qc(e);
5038
5077
  return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
5039
5078
  }
5040
- function Qc(e, t = {}) {
5079
+ function rl(e, t = {}) {
5041
5080
  let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
5042
5081
  for (let t of [n, r]) {
5043
5082
  let n = e?.[t];
@@ -5047,50 +5086,50 @@ function Qc(e, t = {}) {
5047
5086
  }
5048
5087
  return null;
5049
5088
  }
5050
- function $c(e, t = {}) {
5089
+ function il(e, t = {}) {
5051
5090
  let n = t.inProgressField ?? "currentStudyingHere";
5052
5091
  return !!e?.[n];
5053
5092
  }
5054
- function el(e = [], t = {}) {
5093
+ function al(e = [], t = {}) {
5055
5094
  let n = (t.direction ?? "desc") === "desc";
5056
5095
  return e.map((e, n) => ({
5057
5096
  index: n,
5058
- key: Qc(e, t),
5059
- ongoing: t.inProgressFirst !== !1 && $c(e, t)
5097
+ key: rl(e, t),
5098
+ ongoing: t.inProgressFirst !== !1 && il(e, t)
5060
5099
  })).slice().sort((e, t) => e.ongoing === t.ongoing ? e.key === null && t.key === null ? e.index - t.index : e.key === null ? 1 : t.key === null ? -1 : e.key === t.key ? e.index - t.index : n ? t.key - e.key : e.key - t.key : e.ongoing ? -1 : 1).map((e) => e.index);
5061
5100
  }
5062
- function tl(e, t, n = {}) {
5101
+ function ol(e, t, n = {}) {
5063
5102
  if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
5064
- let r = el(e, n).indexOf(t);
5103
+ let r = al(e, n).indexOf(t);
5065
5104
  return r === -1 || r === t ? null : {
5066
5105
  from: t,
5067
5106
  to: r,
5068
- reason: $c(e[t], n) ? "inProgress" : "outOfOrder"
5107
+ reason: il(e[t], n) ? "inProgress" : "outOfOrder"
5069
5108
  };
5070
5109
  }
5071
- var nl = Object.freeze({
5110
+ var sl = Object.freeze({
5072
5111
  inProgress: "You’ve marked this one as still ongoing, so it’s the most recent. Shall we move it to the top? This list reads best newest first.",
5073
5112
  outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
5074
5113
  ok: "Yes, move it up",
5075
5114
  keep: "No, leave it here"
5076
5115
  });
5077
- function rl(e, t = {}) {
5116
+ function cl(e, t = {}) {
5078
5117
  let n = {
5079
- ...nl,
5118
+ ...sl,
5080
5119
  ...t.messages ?? {}
5081
5120
  };
5082
5121
  return n[e] ?? n.outOfOrder;
5083
5122
  }
5084
- function il(e, t = {}) {
5085
- let n = t.levelField ?? "qualification", r = Wc(e?.[n]);
5123
+ function ll(e, t = {}) {
5124
+ let n = t.levelField ?? "qualification", r = Yc(e?.[n]);
5086
5125
  if (!r) return null;
5087
5126
  let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
5088
- return Number.isFinite(Number(a)) ? Number(a) : al(r, t);
5127
+ return Number.isFinite(Number(a)) ? Number(a) : ul(r, t);
5089
5128
  }
5090
- function al(e, t) {
5129
+ function ul(e, t) {
5091
5130
  let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
5092
5131
  for (let e of n) {
5093
- let t = Wc(e?.match);
5132
+ let t = Yc(e?.match);
5094
5133
  if (!t) continue;
5095
5134
  let n;
5096
5135
  try {
@@ -5102,14 +5141,14 @@ function al(e, t) {
5102
5141
  }
5103
5142
  return null;
5104
5143
  }
5105
- function ol(e, t = {}) {
5106
- return Wc((t?.levelLabels ?? {})[e]) || Wc(e);
5144
+ function dl(e, t = {}) {
5145
+ return Yc((t?.levelLabels ?? {})[e]) || Yc(e);
5107
5146
  }
5108
- function sl(e = [], t = {}) {
5147
+ function fl(e = [], t = {}) {
5109
5148
  if (!t || t.requireBelow === !1) return [];
5110
5149
  let n = t.levels ?? {}, r = t.requiredLevels ?? [];
5111
5150
  if (!r.length) return [];
5112
- let i = e.map((e) => il(e, t)).filter((e) => e !== null);
5151
+ let i = e.map((e) => ll(e, t)).filter((e) => e !== null);
5113
5152
  if (!i.length) return [];
5114
5153
  let a = Math.max(...i), o = [];
5115
5154
  return r.forEach((e) => {
@@ -5117,43 +5156,43 @@ function sl(e = [], t = {}) {
5117
5156
  Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
5118
5157
  }), o;
5119
5158
  }
5120
- function cl(e, t = {}) {
5121
- let n = sl(e, t);
5159
+ function pl(e, t = {}) {
5160
+ let n = fl(e, t);
5122
5161
  if (!n.length) return "";
5123
- let r = n.map((e) => ol(e, t)).join(", ");
5162
+ let r = n.map((e) => dl(e, t)).join(", ");
5124
5163
  return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
5125
5164
  }
5126
- async function ll({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5165
+ async function ml({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5127
5166
  let a = e?.orderBy;
5128
5167
  if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
5129
- let o = tl(t, n, a);
5168
+ let o = ol(t, n, a);
5130
5169
  if (!o) return !1;
5131
5170
  let s = {
5132
- ...nl,
5171
+ ...sl,
5133
5172
  ...a.messages ?? {}
5134
5173
  };
5135
5174
  return await i({
5136
5175
  reason: o.reason,
5137
5176
  title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
5138
- body: rl(o.reason, a),
5177
+ body: cl(o.reason, a),
5139
5178
  okText: s.ok,
5140
5179
  cancelText: s.keep,
5141
5180
  from: o.from,
5142
5181
  to: o.to
5143
5182
  }) ? (r(o.from, o.to), !0) : !1;
5144
5183
  }
5145
- function ul(e, t) {
5146
- let n = Gc(e, t), r = n?.orderBy?.inProgressField;
5184
+ function hl(e, t) {
5185
+ let n = Xc(e, t), r = n?.orderBy?.inProgressField;
5147
5186
  return r ? {
5148
5187
  name: n.name,
5149
5188
  label: n.label ?? n.name,
5150
5189
  rowsKey: n.payloadKey || n.name,
5151
5190
  inProgressField: r,
5152
- severity: Jc(n),
5153
- message: qc(n)
5191
+ severity: $c(n),
5192
+ message: Qc(n)
5154
5193
  } : null;
5155
5194
  }
5156
- function dl(e = [], t, n) {
5195
+ function gl(e = [], t, n) {
5157
5196
  if (!n) return {
5158
5197
  severity: "allow",
5159
5198
  message: "",
@@ -5161,8 +5200,8 @@ function dl(e = [], t, n) {
5161
5200
  };
5162
5201
  let r = null;
5163
5202
  for (let i of e) {
5164
- let e = ul(i, t);
5165
- if (!(!e || e.severity === "allow") && fl(n, e.rowsKey).some((t) => $c(t, e))) {
5203
+ let e = hl(i, t);
5204
+ if (!(!e || e.severity === "allow") && _l(n, e.rowsKey).some((t) => il(t, e))) {
5166
5205
  if (e.severity === "block") return {
5167
5206
  severity: "block",
5168
5207
  message: e.message,
@@ -5181,23 +5220,23 @@ function dl(e = [], t, n) {
5181
5220
  group: null
5182
5221
  };
5183
5222
  }
5184
- function fl(e, t) {
5223
+ function _l(e, t) {
5185
5224
  let n = e?.[t];
5186
5225
  return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
5187
5226
  }
5188
- function pl(e) {
5227
+ function vl(e) {
5189
5228
  return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
5190
5229
  }
5191
- function ml(e = [], t = {}) {
5230
+ function yl(e = [], t = {}) {
5192
5231
  let n = null;
5193
5232
  for (let r of e) {
5194
5233
  let e = r?.levelRule;
5195
5234
  if (!e) continue;
5196
- let i = hl(t, r);
5235
+ let i = bl(t, r);
5197
5236
  if (!i.length) continue;
5198
- let a = cl(i, e);
5237
+ let a = pl(i, e);
5199
5238
  if (a) {
5200
- if (pl(e) === "block") return {
5239
+ if (vl(e) === "block") return {
5201
5240
  severity: "block",
5202
5241
  message: a,
5203
5242
  group: r
@@ -5215,7 +5254,7 @@ function ml(e = [], t = {}) {
5215
5254
  group: null
5216
5255
  };
5217
5256
  }
5218
- function hl(e, t) {
5257
+ function bl(e, t) {
5219
5258
  for (let n of [t?.name, t?.payloadKey]) {
5220
5259
  if (!n) continue;
5221
5260
  let t = e?.[n];
@@ -5225,10 +5264,10 @@ function hl(e, t) {
5225
5264
  }
5226
5265
  //#endregion
5227
5266
  //#region src/components/form/clearGroupOnChange.js
5228
- function gl(e, t) {
5267
+ function xl(e, t) {
5229
5268
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
5230
5269
  }
5231
- function _l(e, t) {
5270
+ function Sl(e, t) {
5232
5271
  let n = e?.field, r = [];
5233
5272
  e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
5234
5273
  e && e !== n && r.push(e);
@@ -5238,24 +5277,24 @@ function _l(e, t) {
5238
5277
  e && e !== n && r.push(e);
5239
5278
  }) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
5240
5279
  }
5241
- function vl(e, t, n, r) {
5242
- let i = _l(t, r).map((e) => gl(n, e));
5280
+ function Cl(e, t, n, r) {
5281
+ let i = Sl(t, r).map((e) => xl(n, e));
5243
5282
  return i.forEach((t) => e.setFieldValue(t, null)), i;
5244
5283
  }
5245
5284
  //#endregion
5246
5285
  //#region src/components/form/resolveStoredOptions.js
5247
- function yl(e) {
5286
+ function wl(e) {
5248
5287
  return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
5249
5288
  }
5250
- function bl(e, t = []) {
5289
+ function Tl(e, t = []) {
5251
5290
  let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
5252
- for (let t of yl(e)) {
5291
+ for (let t of wl(e)) {
5253
5292
  let e = String(t);
5254
5293
  !n.has(e) && !r.includes(e) && r.push(e);
5255
5294
  }
5256
5295
  return r;
5257
5296
  }
5258
- async function xl(e, t) {
5297
+ async function El(e, t) {
5259
5298
  if (!e?.lookupCollection || !t?.length) return [];
5260
5299
  let n = new URLSearchParams({
5261
5300
  collection: e.lookupCollection,
@@ -5267,7 +5306,7 @@ async function xl(e, t) {
5267
5306
  let r = await a(s, `/admin/lookup-dropdown-values?${n}`), i = r?.data ?? r ?? [];
5268
5307
  return Array.isArray(i) ? i : [];
5269
5308
  }
5270
- function Sl(e = [], t = []) {
5309
+ function Dl(e = [], t = []) {
5271
5310
  if (!t.length) return e;
5272
5311
  let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
5273
5312
  ...e,
@@ -5276,9 +5315,36 @@ function Sl(e = [], t = []) {
5276
5315
  return r.length ? [...e, ...r] : e;
5277
5316
  }
5278
5317
  //#endregion
5318
+ //#region src/components/form/requireAnyOf.js
5319
+ var Ol = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
5320
+ function kl(e) {
5321
+ let t = e?.requireAnyOf;
5322
+ return Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim() !== "") : [];
5323
+ }
5324
+ function Al(e) {
5325
+ return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !Ol(e));
5326
+ }
5327
+ function jl({ field: e, getRow: t }) {
5328
+ let n = kl(e);
5329
+ if (n.length === 0 || !n.includes(e?.field)) return;
5330
+ let r = e.requireAnyOfMessage || `Select at least one of ${n.join(", ")}.`;
5331
+ return { validator: async () => {
5332
+ let e = t?.() ?? {};
5333
+ return Al(e) ? n.some((t) => !Ol(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
5334
+ } };
5335
+ }
5336
+ function Ml(e, t = []) {
5337
+ let n = kl(e);
5338
+ return n.length === 0 ? t : t.map((t) => n.includes(t?.field) ? {
5339
+ ...t,
5340
+ requireAnyOf: n,
5341
+ requireAnyOfMessage: e.requireAnyOfMessage
5342
+ } : t);
5343
+ }
5344
+ //#endregion
5279
5345
  //#region src/components/form/dateRules.js
5280
- var Cl = (e) => e == null || e === "";
5281
- function wl(e) {
5346
+ var Nl = (e) => e == null || e === "";
5347
+ function Pl(e) {
5282
5348
  if (!e) return null;
5283
5349
  if (typeof e.valueOf == "function") {
5284
5350
  let t = e.valueOf();
@@ -5292,12 +5358,12 @@ function $(e) {
5292
5358
  let t = T(e);
5293
5359
  return t.isValid() ? t.startOf("day").valueOf() : null;
5294
5360
  }
5295
- function Tl(e) {
5361
+ function Fl(e) {
5296
5362
  if (!e) return null;
5297
5363
  let t = T(e);
5298
5364
  return t.isValid() ? t.hour() * 60 + t.minute() : null;
5299
5365
  }
5300
- var El = {
5366
+ var Il = {
5301
5367
  d: "day",
5302
5368
  day: "day",
5303
5369
  days: "day",
@@ -5313,13 +5379,13 @@ var El = {
5313
5379
  year: "year",
5314
5380
  years: "year"
5315
5381
  };
5316
- function Dl(e) {
5382
+ function Ll(e) {
5317
5383
  if (e == null || e === "") return null;
5318
5384
  if (typeof e == "object" && !Array.isArray(e)) {
5319
5385
  let t = Number(e.value ?? e.count ?? e.amount);
5320
5386
  return !Number.isFinite(t) || t <= 0 ? null : {
5321
5387
  value: t,
5322
- unit: El[String(e.unit ?? "month").toLowerCase()] ?? "month"
5388
+ unit: Il[String(e.unit ?? "month").toLowerCase()] ?? "month"
5323
5389
  };
5324
5390
  }
5325
5391
  let t = String(e).trim().toLowerCase();
@@ -5329,49 +5395,49 @@ function Dl(e) {
5329
5395
  let r = Number(n[1]);
5330
5396
  return !Number.isFinite(r) || r <= 0 ? null : {
5331
5397
  value: r,
5332
- unit: El[n[2]] ?? "month"
5398
+ unit: Il[n[2]] ?? "month"
5333
5399
  };
5334
5400
  }
5335
- function Ol(e, t) {
5401
+ function Rl(e, t) {
5336
5402
  let n = e?.minGapFrom ?? e?.gapFrom;
5337
5403
  if (n && typeof t == "function") {
5338
- let e = Dl(t(n));
5404
+ let e = Ll(t(n));
5339
5405
  if (e) return e;
5340
5406
  }
5341
- return Dl(e?.minGap);
5407
+ return Ll(e?.minGap);
5342
5408
  }
5343
- function kl(e, t, n, r) {
5409
+ function zl(e, t, n, r) {
5344
5410
  if (t === null) return null;
5345
- let i = Ol(n, r), a = T(t);
5411
+ let i = Rl(n, r), a = T(t);
5346
5412
  return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
5347
5413
  }
5348
- function Al(e, t, n, r, i) {
5414
+ function Bl(e, t, n, r, i) {
5349
5415
  if (t === null || n === null) return !1;
5350
- let a = kl(e, n, r, i);
5416
+ let a = zl(e, n, r, i);
5351
5417
  if (a === null) return !1;
5352
- let o = !!r?.strict && !Ol(r, i);
5418
+ let o = !!r?.strict && !Rl(r, i);
5353
5419
  return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
5354
5420
  }
5355
- function jl(e, t, n, r) {
5421
+ function Vl(e, t, n, r) {
5356
5422
  if (n?.message) return n.message;
5357
- let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Ol(n, r);
5423
+ let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Rl(n, r);
5358
5424
  if (a) {
5359
5425
  let n = a.value === 1 ? a.unit : `${a.unit}s`;
5360
5426
  return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
5361
5427
  }
5362
5428
  return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
5363
5429
  }
5364
- function Ml({ type: e, label: t, rule: n, readSibling: r }) {
5430
+ function Hl({ type: e, label: t, rule: n, readSibling: r }) {
5365
5431
  return { validator: async (i, a) => {
5366
5432
  let o = n?.value ?? n?.compareField ?? n?.field;
5367
- if (!o || Cl(a)) return Promise.resolve();
5433
+ if (!o || Nl(a)) return Promise.resolve();
5368
5434
  let s = r(o);
5369
- if (Cl(s)) return Promise.resolve();
5435
+ if (Nl(s)) return Promise.resolve();
5370
5436
  let c = $(a), l = $(s);
5371
- return c === null || l === null ? Promise.resolve() : Al(e, c, l, n, r) ? Promise.reject(Error(jl(e, t, n, r))) : Promise.resolve();
5437
+ return c === null || l === null ? Promise.resolve() : Bl(e, c, l, n, r) ? Promise.reject(Error(Vl(e, t, n, r))) : Promise.resolve();
5372
5438
  } };
5373
5439
  }
5374
- function Nl(e, t, { rows: n, rowIndex: r } = {}) {
5440
+ function Ul(e, t, { rows: n, rowIndex: r } = {}) {
5375
5441
  if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
5376
5442
  let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
5377
5443
  if (o) {
@@ -5385,11 +5451,11 @@ function Nl(e, t, { rows: n, rowIndex: r } = {}) {
5385
5451
  }
5386
5452
  return !1;
5387
5453
  }
5388
- function Pl(e, t = "above") {
5389
- let n = e?.messages ?? {};
5390
- return t === "below" ? n.below || "This starts before the entry below it finished. Entries are listed newest first, so they cannot overlap." : n.above || "This overlaps the entry above it. Entries are listed newest first, so this one must finish before that one started.";
5454
+ function Wl(e, t = "above", n = void 0) {
5455
+ let r = e?.messages ?? {}, i = t === "below";
5456
+ return (n === "start" ? i ? r.belowStart : r.aboveStart : n === "end" ? i ? r.belowEnd : r.aboveEnd : void 0) || (i ? r.below || "Start date must be after the end date of the entry below it." : n === "end" ? r.above || "End date must be before the start date of the entry above it." : r.above || "This period overlaps the entry above it. Please adjust the dates.");
5391
5457
  }
5392
- function Fl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Zn }) {
5458
+ function Gl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = nr }) {
5393
5459
  let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
5394
5460
  for (let e of a) {
5395
5461
  let n = typeof e == "string" ? { type: e } : e, r = n?.type;
@@ -5403,61 +5469,91 @@ function Fl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Zn }) {
5403
5469
  o.push((i) => {
5404
5470
  if (!i) return !1;
5405
5471
  let a = t(e);
5406
- return !Cl(a) && Al(r, $(i), $(a), n, t);
5472
+ return !Nl(a) && Bl(r, $(i), $(a), n, t);
5407
5473
  });
5408
5474
  }
5409
5475
  }
5410
- return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? Nl($(t), e.rowHierarchy, {
5476
+ return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? Ul($(t), e.rowHierarchy, {
5411
5477
  rows: n,
5412
5478
  rowIndex: r
5413
5479
  }) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
5414
5480
  }
5415
- function Il(e, t = Zn) {
5416
- let n = e?.validations ?? e?.validation ?? e?.rules ?? [];
5417
- for (let e of n) {
5481
+ function Kl(e, t = nr, n = void 0) {
5482
+ if (!Nl(n) && $(n) !== null) return;
5483
+ let r = e?.validations ?? e?.validation ?? e?.rules ?? [];
5484
+ for (let e of r) {
5418
5485
  let n = typeof e == "string" ? { type: e } : e;
5419
5486
  if (n?.type === "minAge") return t().subtract(Number(n?.value ?? 18), "year");
5420
5487
  if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
5421
5488
  }
5422
5489
  }
5423
- function Ll({ field: e, rows: t, rowIndex: n }) {
5490
+ function ql({ field: e, name: t, rows: n }) {
5491
+ if (!Array.isArray(t) || t.length === 0) return [];
5492
+ let r = t[t.length - 1], i = t.length >= 3 && typeof t[1] == "number", a = /* @__PURE__ */ new Set(), o = e?.validations ?? e?.validation ?? e?.rules ?? [];
5493
+ for (let e of o) {
5494
+ let t = typeof e == "string" ? { type: e } : e;
5495
+ if (t?.type === "dateBeforeField" || t?.type === "dateAfterField") {
5496
+ let e = t?.value ?? t?.compareField ?? t?.field;
5497
+ e && a.add(e);
5498
+ }
5499
+ }
5500
+ let s = e?.rowHierarchy, c = s?.startField ?? "startDate", l = s?.endField ?? "endDate";
5501
+ s && (a.add(c), a.add(l));
5502
+ let u = [];
5503
+ for (let e of a) e !== r && u.push(i ? [
5504
+ t[0],
5505
+ t[1],
5506
+ e
5507
+ ] : [...t.slice(0, -1), e]);
5508
+ if (s && i && Array.isArray(n)) for (let e of [t[1] - 1, t[1] + 1]) e < 0 || e >= n.length || (u.push([
5509
+ t[0],
5510
+ e,
5511
+ c
5512
+ ]), u.push([
5513
+ t[0],
5514
+ e,
5515
+ l
5516
+ ]));
5517
+ return u;
5518
+ }
5519
+ function Jl({ field: e, rows: t, rowIndex: n }) {
5424
5520
  let r = e?.rowHierarchy;
5425
- return { validator: async (e, i) => {
5426
- if (!r || Cl(i) || !Array.isArray(t) || n == null) return Promise.resolve();
5427
- let a = $(i);
5428
- if (a === null || !Nl(a, r, {
5521
+ return { validator: async (i, a) => {
5522
+ if (!r || Nl(a) || !Array.isArray(t) || n == null) return Promise.resolve();
5523
+ let o = $(a);
5524
+ if (o === null || !Ul(o, r, {
5429
5525
  rows: t,
5430
5526
  rowIndex: n
5431
5527
  })) return Promise.resolve();
5432
- let o = r.startField ?? "startDate", s = t[n - 1], c = s ? $(s[o]) : null, l = c !== null && a >= c ? "above" : "below";
5433
- return Promise.reject(Error(Pl(r, l)));
5528
+ let s = r.startField ?? "startDate", c = t[n - 1], l = c ? $(c[s]) : null, u = l !== null && o >= l ? "above" : "below", d = r.endField ?? "endDate", f = e?.field, p = f === s ? "start" : f === d ? "end" : void 0;
5529
+ return Promise.reject(Error(Wl(r, u, p)));
5434
5530
  } };
5435
5531
  }
5436
5532
  //#endregion
5437
5533
  //#region src/utils/submitMessages.js
5438
- function Rl(e) {
5534
+ function Yl(e) {
5439
5535
  return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
5440
5536
  }
5441
- function zl(e) {
5537
+ function Xl(e) {
5442
5538
  let t = String(e ?? "").trim();
5443
5539
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
5444
5540
  }
5445
- function Bl(e, t) {
5446
- return String(e).replaceAll("${module}", zl(t)).replaceAll("${moduleName}", zl(t));
5541
+ function Zl(e, t) {
5542
+ return String(e).replaceAll("${module}", Xl(t)).replaceAll("${moduleName}", Xl(t));
5447
5543
  }
5448
- function Vl(e, t, n) {
5449
- let r = Rl(e);
5544
+ function Ql(e, t, n) {
5545
+ let r = Yl(e);
5450
5546
  if (r?.suppress) return null;
5451
5547
  let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
5452
- return i && String(i).trim() ? Bl(i, t) : n === "edit" ? `${zl(t)} has Updated successfully` : `${zl(t)} has added successfully`;
5548
+ return i && String(i).trim() ? Zl(i, t) : n === "edit" ? `${Xl(t)} has Updated successfully` : `${Xl(t)} has added successfully`;
5453
5549
  }
5454
- function Hl(e, t, n, r) {
5455
- let i = Rl(e), a = n === "edit" ? i?.editError : i?.addError;
5456
- return a && String(a).trim() ? Bl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${zl(t)}` : `Failed to create ${zl(t)}`;
5550
+ function $l(e, t, n, r) {
5551
+ let i = Yl(e), a = n === "edit" ? i?.editError : i?.addError;
5552
+ return a && String(a).trim() ? Zl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Xl(t)}` : `Failed to create ${Xl(t)}`;
5457
5553
  }
5458
5554
  //#endregion
5459
5555
  //#region src/utils/scrollToFirstFormError.js
5460
- function Ul({ errorFields: e } = {}, t, { root: n = document } = {}) {
5556
+ function eu({ errorFields: e } = {}, t, { root: n = document } = {}) {
5461
5557
  if (!e?.length) return;
5462
5558
  let r = e[0]?.name;
5463
5559
  setTimeout(() => {
@@ -5482,10 +5578,10 @@ function Ul({ errorFields: e } = {}, t, { root: n = document } = {}) {
5482
5578
  }
5483
5579
  //#endregion
5484
5580
  //#region src/components/form/conditionalFieldLabel.js
5485
- function Wl(e) {
5581
+ function tu(e) {
5486
5582
  return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
5487
5583
  }
5488
- function Gl(e, t) {
5584
+ function nu(e, t) {
5489
5585
  if (!e?.field) return !1;
5490
5586
  switch (e.operator ?? "eq") {
5491
5587
  case "eq": return String(t ?? "") === String(e.value ?? "");
@@ -5493,66 +5589,66 @@ function Gl(e, t) {
5493
5589
  case "truthy": return t != null && t !== "" && t !== !1;
5494
5590
  case "falsy": return t == null || t === "" || t === !1;
5495
5591
  case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
5496
- case "in": return Wl(e.value).includes(String(t ?? ""));
5497
- case "notIn": return !Wl(e.value).includes(String(t ?? ""));
5592
+ case "in": return tu(e.value).includes(String(t ?? ""));
5593
+ case "notIn": return !tu(e.value).includes(String(t ?? ""));
5498
5594
  default: return !1;
5499
5595
  }
5500
5596
  }
5501
- function Kl(e, t, n = !1) {
5597
+ function ru(e, t, n = !1) {
5502
5598
  let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
5503
- return Gl(i, t) && i?.label ? i.label : r;
5599
+ return nu(i, t) && i?.label ? i.label : r;
5504
5600
  }
5505
- function ql(e) {
5601
+ function iu(e) {
5506
5602
  return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
5507
5603
  }
5508
- function Jl(e, t) {
5509
- let n = ql(e);
5604
+ function au(e, t) {
5605
+ let n = iu(e);
5510
5606
  if (!n.length) return !0;
5511
- let r = n.map((e) => Gl(e, t(e.field)));
5607
+ let r = n.map((e) => nu(e, t(e.field)));
5512
5608
  return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
5513
5609
  }
5514
- function Yl(e) {
5610
+ function ou(e) {
5515
5611
  let t = e?.colWhen;
5516
5612
  return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
5517
5613
  }
5518
- function Xl(e, t, n) {
5519
- for (let t of Yl(e)) if (Gl(t, n(t))) return Number(t.col);
5614
+ function su(e, t, n) {
5615
+ for (let t of ou(e)) if (nu(t, n(t))) return Number(t.col);
5520
5616
  return t;
5521
5617
  }
5522
- function Zl(e, t) {
5618
+ function cu(e, t) {
5523
5619
  return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
5524
5620
  }
5525
5621
  //#endregion
5526
5622
  //#region src/components/form/conditionalRequired.js
5527
- function Ql(e, t) {
5623
+ function lu(e, t) {
5528
5624
  return (n) => {
5529
5625
  if (!e || !n) return;
5530
5626
  let r = Array.isArray(t) && t.length > 1 ? [...t.slice(0, -1), n] : [n], i = e.getFieldValue(r);
5531
5627
  return i === void 0 ? e.getFieldValue([n]) : i;
5532
5628
  };
5533
5629
  }
5534
- function $l(e, t, n) {
5630
+ function uu(e, t, n) {
5535
5631
  let r = e?.requiredWhen;
5536
- return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : Jl(r, Ql(t, n));
5632
+ return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : au(r, lu(t, n));
5537
5633
  }
5538
- function eu(e, t, n) {
5634
+ function du(e, t, n) {
5539
5635
  return { validator: (r, i) => {
5540
- if (!$l(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5636
+ if (!uu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5541
5637
  let a = e?.label ?? e?.field ?? "This field";
5542
5638
  return Promise.reject(Error(e?.requiredWhen?.message ?? `${a} is required`));
5543
5639
  } };
5544
5640
  }
5545
5641
  //#endregion
5546
5642
  //#region src/components/Breadcrumb.jsx
5547
- function tu({ items: e = [] }) {
5548
- let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(Cr, {
5643
+ function fu({ items: e = [] }) {
5644
+ let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(Or, {
5549
5645
  variant: "body",
5550
5646
  weight: "medium",
5551
5647
  color: "link",
5552
5648
  children: t.label
5553
5649
  }) : /* @__PURE__ */ w(ye, {
5554
5650
  to: t.href,
5555
- children: [/* @__PURE__ */ C(Cr, {
5651
+ children: [/* @__PURE__ */ C(Or, {
5556
5652
  variant: "body",
5557
5653
  color: "secondary",
5558
5654
  children: t.label
@@ -5562,34 +5658,34 @@ function tu({ items: e = [] }) {
5562
5658
  }
5563
5659
  //#endregion
5564
5660
  //#region src/components/form/canonicalOption.js
5565
- var nu = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5566
- function ru(e = []) {
5661
+ var pu = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5662
+ function mu(e = []) {
5567
5663
  let t = /* @__PURE__ */ new Map();
5568
5664
  for (let n of e) {
5569
5665
  if (n == null) continue;
5570
5666
  let e = typeof n == "object" ? n.value : n;
5571
5667
  if (e != null && e !== "") for (let r of [n?.label, e]) {
5572
- let n = nu(r);
5668
+ let n = pu(r);
5573
5669
  n && !t.has(n) && t.set(n, e);
5574
5670
  }
5575
5671
  }
5576
5672
  return t;
5577
5673
  }
5578
- function iu(e, t) {
5674
+ function hu(e, t) {
5579
5675
  if (!Array.isArray(e)) {
5580
- let n = iu([e], t);
5676
+ let n = hu([e], t);
5581
5677
  return n.length ? n[0] : e;
5582
5678
  }
5583
- let n = ru(t), r = /* @__PURE__ */ new Set(), i = [];
5679
+ let n = mu(t), r = /* @__PURE__ */ new Set(), i = [];
5584
5680
  for (let t of e) {
5585
- let e = typeof t == "object" && t ? t.value : t, a = n.get(nu(e)) ?? e, o = nu(a);
5681
+ let e = typeof t == "object" && t ? t.value : t, a = n.get(pu(e)) ?? e, o = pu(a);
5586
5682
  o && r.has(o) || (o && r.add(o), i.push(a));
5587
5683
  }
5588
5684
  return i;
5589
5685
  }
5590
5686
  //#endregion
5591
5687
  //#region src/components/form/dependencyBusy.js
5592
- function au(e, t = []) {
5688
+ function gu(e, t = []) {
5593
5689
  if (!e) return [];
5594
5690
  let n = /* @__PURE__ */ new Set();
5595
5691
  for (let r of t) for (let t of r?.fields ?? []) if (t?.field) {
@@ -5599,16 +5695,16 @@ function au(e, t = []) {
5599
5695
  }
5600
5696
  return n.delete(e), [...n];
5601
5697
  }
5602
- function ou(e, t = []) {
5603
- return e?.blockWhileResolving ? au(e.field, t).length > 0 : !1;
5698
+ function _u(e, t = []) {
5699
+ return e?.blockWhileResolving ? gu(e.field, t).length > 0 : !1;
5604
5700
  }
5605
- function su(e) {
5701
+ function vu(e) {
5606
5702
  let t = String(e?.label ?? "").trim();
5607
5703
  return t ? `Applying ${t}…` : "Applying your selection…";
5608
5704
  }
5609
- function cu(e, t = []) {
5705
+ function yu(e, t = []) {
5610
5706
  if (!e?.field) return [];
5611
- let n = new Set(au(e.field, t));
5707
+ let n = new Set(gu(e.field, t));
5612
5708
  if (n.size === 0) return [];
5613
5709
  let r = [];
5614
5710
  for (let e of t) {
@@ -5617,19 +5713,19 @@ function cu(e, t = []) {
5617
5713
  }
5618
5714
  return r;
5619
5715
  }
5620
- function lu(e) {
5716
+ function bu(e) {
5621
5717
  return String(e?.blockScope ?? "").toLowerCase() === "group";
5622
5718
  }
5623
5719
  //#endregion
5624
5720
  //#region src/components/form/LinkedRecordFileField.jsx
5625
- var uu = d(() => import("./index.js").then((e) => e.n)), du = d(() => import("./DocumentViewer-DA2IOO5w.js").then((e) => e.n));
5626
- function fu(e) {
5721
+ var xu = d(() => import("./index.js").then((e) => e.n)), Su = d(() => import("./DocumentViewer-DA2IOO5w.js").then((e) => e.n));
5722
+ function Cu(e) {
5627
5723
  let t = String(e ?? "").split(".").pop()?.toLowerCase();
5628
5724
  return C(t === "pdf" ? ue : t === "doc" || t === "docx" ? fe : le, { className: "v1-file-chip__icon" });
5629
5725
  }
5630
- function pu({ field: e, recordMeta: t }) {
5726
+ function wu({ field: e, recordMeta: t }) {
5631
5727
  let n = e?.linkedModule, r = e?.linkedFileField, i = m(() => {
5632
- let r = tc(n, t);
5728
+ let r = oc(n, t);
5633
5729
  if (r) return r;
5634
5730
  let i = e?.linkedIdField, a = i ? t?.[i] : "";
5635
5731
  return a ? String(a) : "";
@@ -5649,7 +5745,7 @@ function pu({ field: e, recordMeta: t }) {
5649
5745
  ...e,
5650
5746
  loading: !0
5651
5747
  }));
5652
- }), Br(n, i).then((t) => {
5748
+ }), Gr(n, i).then((t) => {
5653
5749
  e || o({
5654
5750
  loading: !1,
5655
5751
  fileValue: t?.[r] ?? null
@@ -5663,7 +5759,7 @@ function pu({ field: e, recordMeta: t }) {
5663
5759
  r,
5664
5760
  f
5665
5761
  ]);
5666
- let v = m(() => ao(a.fileValue), [a.fileValue])[0], y = !!v, b = e?.label ?? "File", x = Y(n) || "record";
5762
+ let v = m(() => uo(a.fileValue), [a.fileValue])[0], y = !!v, b = e?.label ?? "File", x = Y(n) || "record";
5667
5763
  if (!i) return /* @__PURE__ */ C("div", {
5668
5764
  className: "v1-linked-file v1-linked-file--empty",
5669
5765
  children: /* @__PURE__ */ C("span", { children: e?.unlinkedText ?? `Not available until the ${x} is set.` })
@@ -5691,7 +5787,7 @@ function pu({ field: e, recordMeta: t }) {
5691
5787
  onClick: () => y && c(!0),
5692
5788
  title: y ? `Preview or download ${v.name}` : ie,
5693
5789
  children: [
5694
- y ? fu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5790
+ y ? Cu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5695
5791
  /* @__PURE__ */ C("span", {
5696
5792
  className: "v1-file-chip__name",
5697
5793
  children: y ? v.name : ie
@@ -5715,7 +5811,7 @@ function pu({ field: e, recordMeta: t }) {
5715
5811
  }),
5716
5812
  s && te && /* @__PURE__ */ C(u, {
5717
5813
  fallback: null,
5718
- children: /* @__PURE__ */ C(du, {
5814
+ children: /* @__PURE__ */ C(Su, {
5719
5815
  open: s,
5720
5816
  onClose: () => c(!1),
5721
5817
  documents: [te]
@@ -5746,7 +5842,7 @@ function pu({ field: e, recordMeta: t }) {
5746
5842
  },
5747
5843
  children: /* @__PURE__ */ C(ne, {})
5748
5844
  }),
5749
- children: /* @__PURE__ */ C(uu, {
5845
+ children: /* @__PURE__ */ C(xu, {
5750
5846
  moduleName: n,
5751
5847
  recordId: i,
5752
5848
  embedded: !0,
@@ -5760,7 +5856,7 @@ function pu({ field: e, recordMeta: t }) {
5760
5856
  })
5761
5857
  ] });
5762
5858
  }
5763
- pu.propTypes = {
5859
+ wu.propTypes = {
5764
5860
  field: E.shape({
5765
5861
  label: E.string,
5766
5862
  linkedModule: E.string,
@@ -5772,8 +5868,8 @@ pu.propTypes = {
5772
5868
  reuploadWarning: E.string
5773
5869
  }).isRequired,
5774
5870
  recordMeta: E.object
5775
- }, pu.defaultProps = { recordMeta: void 0 };
5871
+ }, wu.defaultProps = { recordMeta: void 0 };
5776
5872
  //#endregion
5777
- export { dc as $, qn as $n, Nt as $r, Oa as $t, Zc as A, jt as Ai, qr as An, sn as Ar, $o as At, zc as B, F as Bn, yt as Br, vo as Bt, Il as C, gn as Ci, ri as Cn, Xe as Cr, ms as Ct, Sl as D, Rt as Di, Qr as Dn, At as Dr, rs as Dt, xl as E, Zt as Ei, ii as En, Dt as Er, ls as Et, dl as F, jr as Fn, Cn as Fr, Ro as Ft, Ic as G, lr as Gn, un as Gr, Ua as Gt, Lc as H, $n as Hn, $t as Hr, uo as Ht, ml as I, Ar as In, it as Ir, Lo as It, Oc as J, er as Jn, Ue as Jr, ao as Jt, Mc as K, Qn as Kn, Pn as Kr, Ga as Kt, ll as L, kr as Ln, ct as Lr, Io as Lt, Kc as M, qt as Mi, Rr as Mn, gt as Mr, zo as Mt, Yc as N, on as Ni, zr as Nn, vt as Nr, Ho as Nt, bl as O, xn as Oi, $r as On, Wt as Or, ns as Ot, qc as P, Vr as Pn, cn as Pr, Vo as Pt, uc as Q, N as Qn, j as Qr, Na as Qt, Gc as R, Cr as Rn, Kt as Rr, Po as Rt, Ll as S, Tn as Si, ai as Sn, Jt as Sr, Ss as St, Tl as T, In as Ti, Xr as Tn, dt as Tr, us as Tt, Rc as U, nr as Un, en as Ur, q as Ut, Bc as V, Zn as Vn, wt as Vr, _o as Vt, Nc as W, P as Wn, mn as Wr, Wa as Wt, yc as X, Kn as Xn, Ze as Xr, Ha as Xt, hc as Y, Rn as Yn, rn as Yr, Ra as Yt, vc as Z, Gn as Zn, Vt as Zr, Ma as Zt, Ul as _, Ht as _i, wi as _n, Ln as _r, Os as _t, ou as a, Re as ai, ya as an, wn as ar, ac as at, Fl as b, Ct as bi, ci as bn, Mn as br, Y as bt, $l as c, tt as ci, G as cn, Fn as cr, oc as ct, Zl as d, at as di, sa as dn, et as dr, Ys as dt, Pt as ei, ka as en, Vn as er, pc as et, Gl as f, lt as fi, oa as fn, pt as fr, Js as ft, ql as g, ze as gi, yi as gn, pn as gr, Us as gt, Xl as h, an as hi, Pi as hn, _n as hr, Gs as ht, su as i, Yt as ii, Ea as in, Qe as ir, ic as it, ul as j, Ut as ji, Kr as jn, He as jr, cs as jt, vl as k, jn as ki, Jr as kn, ln as kr, qo as kt, eu as l, ft as li, pa as ln, Xt as lr, Qs as lt, Jl as m, Ve as mi, Mi as mn, St as mr, Ks as mt, lu as n, kn as ni, K as nn, nt as nr, nc as nt, iu as o, tn as oi, Zi as on, hn as or, rc as ot, Kl as p, xt as pi, Oi as pn, En as pr, qs as pt, kc as q, or as qn, Le as qr, to as qt, cu as r, Ft as ri, ba as rn, Tt as rr, tc as rt, tu as s, nn as si, B as sn, dn as sr, sc as st, pu as t, bn as ti, Aa as tn, Wn as tr, cc as tt, Yl as u, _t as ui, Ta as un, An as ur, Xs as ut, Hl as v, Gt as vi, Ci as vn, Qt as vr, Es as vt, wl as w, fn as wi, Zr as wn, Ye as wr, _s as wt, Ml as x, $e as xi, oi as xn, ot as xr, xs as xt, Vl as y, mt as yi, si as yn, Be as yr, ws as yt, Uc as z, I as zn, bt as zr, Fo as zt };
5873
+ export { bc as $, Un as $n, mn as $r, Ua as $t, El as A, $e as Ai, li as An, ot as Ar, ms as At, yl as B, Ut as Bi, Fr as Bn, He as Br, Ho as Bt, Kl as C, Ve as Ci, fi as Cn, St as Cr, ks as Ct, ql as D, Gt as Di, ci as Dn, Qt as Dr, ys as Dt, Nl as E, Ht as Ei, ui as En, Ln as Er, Ds as Et, hl as F, Zt as Fi, Zr as Fn, Dt as Fr, ps as Ft, Gc as G, nr as Gn, it as Gr, So as Gt, Xc as H, on as Hi, Or as Hn, vt as Hr, zo as Ht, Zc as I, Rt as Ii, Ur as In, At as Ir, Wo as It, Rc as J, P as Jn, bt as Jr, Ya as Jt, Hc as K, ir as Kn, ct as Kr, go as Kt, el as L, xn as Li, Wr as Ln, Wt as Lr, qo as Lt, Tl as M, gn as Mi, ii as Mn, Xe as Mr, ss as Mt, Cl as N, fn as Ni, $r as Nn, Ye as Nr, Qo as Nt, Ml as O, mt as Oi, ni as On, Be as Or, Ss as Ot, nl as P, In as Pi, Qr as Pn, dt as Pr, is as Pt, Nc as Q, ar as Qn, en as Qr, uo as Qt, Qc as R, jn as Ri, Kr as Rn, ln as Rr, Ko as Rt, Jl as S, xt as Si, Oi as Sn, En as Sr, js as St, Fl as T, ze as Ti, di as Tn, pn as Tr, Es as Tt, Jc as U, I as Un, cn as Ur, Bo as Ut, ml as V, qt as Vi, Pr as Vn, gt as Vr, Vo as Vt, Wc as W, F as Wn, Cn as Wr, Co as Wt, Lc as X, rr as Xn, wt as Xr, Xa as Xt, Vc as Y, mr as Yn, yt as Yr, Ja as Yt, Pc as Z, dr as Zn, $t as Zr, oo as Zt, eu as _, tt as _i, Ni as _n, Fn as _r, Qs as _t, _u as a, Ze as ai, Fa as an, Yn as ar, pc as at, Gl as b, at as bi, wi as bn, et as br, Js as bt, uu as c, Nt as ci, ja as cn, Vn as cr, lc as ct, cu as d, kn as di, B as dn, nt as dr, fc as dt, un as ei, qa as en, Zn as er, wc as et, nu as f, Ft as fi, G as fn, Tt as fr, dc as ft, iu as g, nn as gi, da as gn, dn as gr, $s as gt, su as h, tn as hi, fa as hn, hn as hr, ec as ht, vu as i, rn as ii, Pa as in, Kn as ir, vc as it, Dl as j, Tn as ji, ri as jn, Jt as jr, cs as jt, jl as k, Ct as ki, ti as kn, Mn as kr, hs as kt, du as l, Pt as li, wa as ln, Bn as lr, uc as lt, au as m, Re as mi, Aa as mn, wn as mr, tc as mt, bu as n, Le as ni, Ra as nn, N as nr, hc as nt, hu as o, Vt as oi, K as on, Rn as or, sc as ot, ru as p, Yt as pi, va as pn, Qe as pr, rc as pt, Uc as q, sr as qn, Kt as qr, q as qt, yu as r, Ue as ri, Na as rn, Qn as rr, gc as rt, fu as s, j as si, Ta as sn, zn as sr, oc as st, wu as t, Pn as ti, La as tn, Xn as tr, Cc as tt, ou as u, bn as ui, na as un, Hn as ur, cc as ut, $l as v, ft as vi, Li as vn, Xt as vr, Zs as vt, Pl as w, an as wi, pi as wn, _n as wr, Y as wt, Hl as x, lt as xi, ki as xn, pt as xr, Ns as xt, Ql as y, _t as yi, zi as yn, An as yr, Xs as yt, gl as z, jt as zi, Ir as zn, sn as zr, Uo as zt };
5778
5874
 
5779
- //# sourceMappingURL=LinkedRecordFileField-CiVlY8m5.js.map
5875
+ //# sourceMappingURL=LinkedRecordFileField-CnkVvce4.js.map