@gravitee/graphene-core 2.43.0-fix-improve-data-table.f0d5d2e → 2.43.0-fix-improve-data-table.97c0873
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/FileUploadInput/FileUploadInput.d.ts +3 -1
- package/dist/base/FileUploadInput/FileUploadInput.d.ts.map +1 -1
- package/dist/composed/DataTable/DataTable.d.ts.map +1 -1
- package/dist/composed/DataTable/cells.d.ts.map +1 -1
- package/dist/composed/FileUpload/FileUpload.d.ts +2 -2
- package/dist/composed/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/index.js +906 -865
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23203,42 +23203,61 @@ function gB({ maxFiles: e, maxFileSize: t, multiple: n }) {
|
|
|
23203
23203
|
let r = [];
|
|
23204
23204
|
return n && e !== void 0 && e > 1 && r.push(`Max ${e} files`), t !== void 0 && r.push(`Up to ${hB(t)}`), r.length > 0 ? r.join(" · ") : null;
|
|
23205
23205
|
}
|
|
23206
|
-
function _B({ accept: e, className: t,
|
|
23207
|
-
let { getInputProps:
|
|
23206
|
+
function _B({ accept: e, className: t, describedById: n, disabled: r, hint: i, icon: a, invalid: o, label: s, maxFileSize: c, maxFiles: l = 1, multiple: u = !1, onFilesAccepted: d, onFilesRejected: f, triggerLabel: p = "Choose file", ...m }) {
|
|
23207
|
+
let { getInputProps: h, getRootProps: g, isDragActive: _, isDragReject: v, open: y } = fB({
|
|
23208
23208
|
accept: e,
|
|
23209
|
-
disabled:
|
|
23210
|
-
maxFiles:
|
|
23211
|
-
maxSize:
|
|
23212
|
-
multiple:
|
|
23213
|
-
|
|
23214
|
-
|
|
23215
|
-
|
|
23216
|
-
|
|
23217
|
-
|
|
23218
|
-
|
|
23219
|
-
|
|
23209
|
+
disabled: r,
|
|
23210
|
+
maxFiles: l,
|
|
23211
|
+
maxSize: c,
|
|
23212
|
+
multiple: u,
|
|
23213
|
+
noKeyboard: !0,
|
|
23214
|
+
onDropAccepted: d,
|
|
23215
|
+
onDropRejected: f
|
|
23216
|
+
}), x = k.useId(), S = k.useId(), C = r ? "disabled" : o || v ? "reject" : _ ? "active" : "idle", w = i === null ? null : i ?? gB({
|
|
23217
|
+
maxFiles: l,
|
|
23218
|
+
maxFileSize: c,
|
|
23219
|
+
multiple: u
|
|
23220
|
+
}), T = s === void 0 ? "Choose file to upload" : s, E = [n, w ? S : void 0].filter(Boolean).join(" ") || void 0;
|
|
23220
23221
|
return /* @__PURE__ */ U("div", {
|
|
23221
|
-
...
|
|
23222
|
-
...
|
|
23222
|
+
...m,
|
|
23223
|
+
...g(),
|
|
23223
23224
|
"data-slot": "file-upload-input",
|
|
23224
|
-
"data-state":
|
|
23225
|
-
"aria-disabled":
|
|
23226
|
-
"aria-invalid":
|
|
23227
|
-
className: q("flex cursor-pointer flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-input bg-background px-6 py-10 text-center transition-colors outline-none", "
|
|
23225
|
+
"data-state": C,
|
|
23226
|
+
"aria-disabled": r ? !0 : void 0,
|
|
23227
|
+
"aria-invalid": o || v ? !0 : void 0,
|
|
23228
|
+
className: q("flex cursor-pointer flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-input bg-background px-6 py-10 text-center transition-colors outline-none", "data-active:border-ring data-active:bg-accent/40", "data-[state=reject]:border-destructive", "data-[state=disabled]:pointer-events-none data-[state=disabled]:cursor-not-allowed data-[state=disabled]:opacity-50", t),
|
|
23228
23229
|
children: [
|
|
23229
|
-
/* @__PURE__ */ H("input", { ...
|
|
23230
|
+
/* @__PURE__ */ H("input", { ...h({
|
|
23231
|
+
...T ? { "aria-labelledby": x } : { "aria-label": "Choose file to upload" },
|
|
23232
|
+
"aria-describedby": E,
|
|
23233
|
+
"aria-invalid": o || v ? !0 : void 0
|
|
23234
|
+
}) }),
|
|
23230
23235
|
/* @__PURE__ */ H("div", {
|
|
23231
23236
|
"aria-hidden": "true",
|
|
23232
|
-
className: q("flex items-center justify-center text-muted-foreground",
|
|
23233
|
-
children:
|
|
23237
|
+
className: q("flex items-center justify-center text-muted-foreground", T === null && w === null && "h-full w-full"),
|
|
23238
|
+
children: a ?? /* @__PURE__ */ H(b, { className: "size-8" })
|
|
23234
23239
|
}),
|
|
23235
|
-
|
|
23236
|
-
id:
|
|
23237
|
-
children:
|
|
23240
|
+
T ? /* @__PURE__ */ H(fR, {
|
|
23241
|
+
id: x,
|
|
23242
|
+
children: T
|
|
23238
23243
|
}) : null,
|
|
23239
|
-
|
|
23244
|
+
w ? /* @__PURE__ */ H("div", {
|
|
23245
|
+
id: S,
|
|
23240
23246
|
className: "text-xs text-muted-foreground",
|
|
23241
|
-
children:
|
|
23247
|
+
children: w
|
|
23248
|
+
}) : null,
|
|
23249
|
+
p ? /* @__PURE__ */ H(hb, {
|
|
23250
|
+
type: "button",
|
|
23251
|
+
variant: "outline",
|
|
23252
|
+
size: "sm",
|
|
23253
|
+
disabled: r,
|
|
23254
|
+
"aria-describedby": E,
|
|
23255
|
+
"aria-invalid": o || v ? !0 : void 0,
|
|
23256
|
+
"data-slot": "file-upload-trigger",
|
|
23257
|
+
onClick: (e) => {
|
|
23258
|
+
e.stopPropagation(), y();
|
|
23259
|
+
},
|
|
23260
|
+
children: p
|
|
23242
23261
|
}) : null
|
|
23243
23262
|
]
|
|
23244
23263
|
});
|
|
@@ -28840,7 +28859,7 @@ function dq({ columns: e, data: t, selectionMode: n = "none", onSelectionChange:
|
|
|
28840
28859
|
children: "\xA0"
|
|
28841
28860
|
}), /* @__PURE__ */ H("div", { className: "absolute inset-1 animate-pulse rounded-md bg-muted" })]
|
|
28842
28861
|
}, `skeleton-${t}-${n}`))
|
|
28843
|
-
}, `skeleton-${t}`)) : z.length ? z.map((e) => /* @__PURE__ */ H(KW, {
|
|
28862
|
+
}, `skeleton-${t}`)) : !z.length && d ? null : z.length ? z.map((e) => /* @__PURE__ */ H(KW, {
|
|
28844
28863
|
"data-state": e.getIsSelected() ? "selected" : void 0,
|
|
28845
28864
|
className: O ? "pointer-events-none border-transparent hover:bg-transparent" : void 0,
|
|
28846
28865
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ U(JW, {
|
|
@@ -28939,16 +28958,19 @@ function fq({ column: e, title: t, className: n, ...r }) {
|
|
|
28939
28958
|
}
|
|
28940
28959
|
//#endregion
|
|
28941
28960
|
//#region src/composed/DataTable/cells.tsx
|
|
28942
|
-
var pq = 6e4, mq = 36e5, hq = 864e5
|
|
28943
|
-
|
|
28961
|
+
var pq = 6e4, mq = 36e5, hq = 864e5, gq = new Intl.RelativeTimeFormat(void 0, {
|
|
28962
|
+
numeric: "auto",
|
|
28963
|
+
style: "narrow"
|
|
28964
|
+
});
|
|
28965
|
+
function _q(e) {
|
|
28944
28966
|
let t = Date.now() - e.getTime();
|
|
28945
|
-
return t < pq ?
|
|
28967
|
+
return t < pq ? gq.format(0, "second") : t < mq ? gq.format(-Math.floor(t / pq), "minute") : t < hq ? gq.format(-Math.floor(t / mq), "hour") : t < hq * 30 ? gq.format(-Math.floor(t / hq), "day") : e.toLocaleDateString(void 0, {
|
|
28946
28968
|
month: "short",
|
|
28947
28969
|
day: "numeric",
|
|
28948
28970
|
year: "numeric"
|
|
28949
28971
|
});
|
|
28950
28972
|
}
|
|
28951
|
-
function
|
|
28973
|
+
function vq(e) {
|
|
28952
28974
|
return e.toLocaleString(void 0, {
|
|
28953
28975
|
month: "short",
|
|
28954
28976
|
day: "numeric",
|
|
@@ -28957,7 +28979,7 @@ function _q(e) {
|
|
|
28957
28979
|
minute: "2-digit"
|
|
28958
28980
|
});
|
|
28959
28981
|
}
|
|
28960
|
-
function
|
|
28982
|
+
function yq({ value: e, format: t = "relative" }) {
|
|
28961
28983
|
if (!e) return /* @__PURE__ */ H("span", {
|
|
28962
28984
|
className: "text-muted-foreground",
|
|
28963
28985
|
children: "—"
|
|
@@ -28967,7 +28989,7 @@ function vq({ value: e, format: t = "relative" }) {
|
|
|
28967
28989
|
className: "text-muted-foreground",
|
|
28968
28990
|
children: "—"
|
|
28969
28991
|
});
|
|
28970
|
-
let r = t === "relative" ?
|
|
28992
|
+
let r = t === "relative" ? _q(n) : vq(n), i = vq(n);
|
|
28971
28993
|
return /* @__PURE__ */ H(SU, {
|
|
28972
28994
|
delayDuration: 300,
|
|
28973
28995
|
children: /* @__PURE__ */ U(CU, { children: [/* @__PURE__ */ H(wU, {
|
|
@@ -28985,7 +29007,7 @@ function vq({ value: e, format: t = "relative" }) {
|
|
|
28985
29007
|
})] })
|
|
28986
29008
|
});
|
|
28987
29009
|
}
|
|
28988
|
-
function
|
|
29010
|
+
function bq({ value: e, variant: t = "default", icon: n }) {
|
|
28989
29011
|
if (!e) return /* @__PURE__ */ H("span", {
|
|
28990
29012
|
className: "text-muted-foreground",
|
|
28991
29013
|
children: "—"
|
|
@@ -29010,7 +29032,7 @@ function yq({ value: e, variant: t = "default", icon: n }) {
|
|
|
29010
29032
|
})] })
|
|
29011
29033
|
}) : r;
|
|
29012
29034
|
}
|
|
29013
|
-
function
|
|
29035
|
+
function xq({ value: e, maxLength: t = 32 }) {
|
|
29014
29036
|
if (!e) return /* @__PURE__ */ H("span", {
|
|
29015
29037
|
className: "text-muted-foreground",
|
|
29016
29038
|
children: "—"
|
|
@@ -29037,7 +29059,7 @@ function bq({ value: e, maxLength: t = 32 }) {
|
|
|
29037
29059
|
children: r
|
|
29038
29060
|
});
|
|
29039
29061
|
}
|
|
29040
|
-
function
|
|
29062
|
+
function Sq({ value: e, maxLength: t = 24 }) {
|
|
29041
29063
|
let [n, i] = V(!1), a = re(void 0), o = F(() => {
|
|
29042
29064
|
e && (navigator.clipboard.writeText(e), i(!0), clearTimeout(a.current), a.current = setTimeout(() => i(!1), 2e3));
|
|
29043
29065
|
}, [e]);
|
|
@@ -29074,7 +29096,7 @@ function xq({ value: e, maxLength: t = 24 }) {
|
|
|
29074
29096
|
})]
|
|
29075
29097
|
});
|
|
29076
29098
|
}
|
|
29077
|
-
function
|
|
29099
|
+
function Cq({ value: e, className: t }) {
|
|
29078
29100
|
return e ? /* @__PURE__ */ H(SU, {
|
|
29079
29101
|
delayDuration: 500,
|
|
29080
29102
|
children: /* @__PURE__ */ U(CU, { children: [/* @__PURE__ */ H(wU, {
|
|
@@ -29098,7 +29120,7 @@ function Sq({ value: e, className: t }) {
|
|
|
29098
29120
|
}
|
|
29099
29121
|
//#endregion
|
|
29100
29122
|
//#region src/composed/DataTableEmptyState/DataTableEmptyState.tsx
|
|
29101
|
-
function
|
|
29123
|
+
function wq(e) {
|
|
29102
29124
|
let { variant: t, icon: n, title: r, description: i, className: a } = e, o = r.trim().length > 0, s = i.trim().length > 0;
|
|
29103
29125
|
return t === "no-results" ? /* @__PURE__ */ U(aR, {
|
|
29104
29126
|
className: q("py-12 text-foreground", a),
|
|
@@ -29154,98 +29176,98 @@ function Cq(e) {
|
|
|
29154
29176
|
}
|
|
29155
29177
|
//#endregion
|
|
29156
29178
|
//#region ../../node_modules/date-fns/constants.js
|
|
29157
|
-
var
|
|
29158
|
-
|
|
29159
|
-
var
|
|
29179
|
+
var Tq = 365.2425, Eq = 6048e5, Dq = 864e5, Oq = 3600 * 24;
|
|
29180
|
+
Oq * 7, Oq * Tq / 12 * 3;
|
|
29181
|
+
var kq = Symbol.for("constructDateFrom");
|
|
29160
29182
|
//#endregion
|
|
29161
29183
|
//#region ../../node_modules/date-fns/constructFrom.js
|
|
29162
|
-
function
|
|
29163
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
29184
|
+
function Aq(e, t) {
|
|
29185
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && kq in e ? e[kq](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
29164
29186
|
}
|
|
29165
29187
|
//#endregion
|
|
29166
29188
|
//#region ../../node_modules/date-fns/toDate.js
|
|
29167
|
-
function
|
|
29168
|
-
return
|
|
29189
|
+
function jq(e, t) {
|
|
29190
|
+
return Aq(t || e, e);
|
|
29169
29191
|
}
|
|
29170
29192
|
//#endregion
|
|
29171
29193
|
//#region ../../node_modules/date-fns/_lib/defaultOptions.js
|
|
29172
|
-
var
|
|
29173
|
-
function
|
|
29174
|
-
return
|
|
29194
|
+
var Mq = {};
|
|
29195
|
+
function Nq() {
|
|
29196
|
+
return Mq;
|
|
29175
29197
|
}
|
|
29176
29198
|
//#endregion
|
|
29177
29199
|
//#region ../../node_modules/date-fns/startOfWeek.js
|
|
29178
|
-
function
|
|
29179
|
-
let n =
|
|
29200
|
+
function Pq(e, t) {
|
|
29201
|
+
let n = Nq(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = jq(e, t?.in), a = i.getDay(), o = (a < r ? 7 : 0) + a - r;
|
|
29180
29202
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
29181
29203
|
}
|
|
29182
29204
|
//#endregion
|
|
29183
29205
|
//#region ../../node_modules/date-fns/startOfISOWeek.js
|
|
29184
|
-
function
|
|
29185
|
-
return
|
|
29206
|
+
function Fq(e, t) {
|
|
29207
|
+
return Pq(e, {
|
|
29186
29208
|
...t,
|
|
29187
29209
|
weekStartsOn: 1
|
|
29188
29210
|
});
|
|
29189
29211
|
}
|
|
29190
29212
|
//#endregion
|
|
29191
29213
|
//#region ../../node_modules/date-fns/getISOWeekYear.js
|
|
29192
|
-
function
|
|
29193
|
-
let n =
|
|
29214
|
+
function Iq(e, t) {
|
|
29215
|
+
let n = jq(e, t?.in), r = n.getFullYear(), i = Aq(n, 0);
|
|
29194
29216
|
i.setFullYear(r + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
29195
|
-
let a =
|
|
29217
|
+
let a = Fq(i), o = Aq(n, 0);
|
|
29196
29218
|
o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
|
|
29197
|
-
let s =
|
|
29219
|
+
let s = Fq(o);
|
|
29198
29220
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
29199
29221
|
}
|
|
29200
29222
|
//#endregion
|
|
29201
29223
|
//#region ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
29202
|
-
function
|
|
29203
|
-
let t =
|
|
29224
|
+
function Lq(e) {
|
|
29225
|
+
let t = jq(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
29204
29226
|
return n.setUTCFullYear(t.getFullYear()), e - +n;
|
|
29205
29227
|
}
|
|
29206
29228
|
//#endregion
|
|
29207
29229
|
//#region ../../node_modules/date-fns/_lib/normalizeDates.js
|
|
29208
|
-
function
|
|
29209
|
-
let n =
|
|
29230
|
+
function Rq(e, ...t) {
|
|
29231
|
+
let n = Aq.bind(null, e || t.find((e) => typeof e == "object"));
|
|
29210
29232
|
return t.map(n);
|
|
29211
29233
|
}
|
|
29212
29234
|
//#endregion
|
|
29213
29235
|
//#region ../../node_modules/date-fns/startOfDay.js
|
|
29214
|
-
function
|
|
29215
|
-
let n =
|
|
29236
|
+
function zq(e, t) {
|
|
29237
|
+
let n = jq(e, t?.in);
|
|
29216
29238
|
return n.setHours(0, 0, 0, 0), n;
|
|
29217
29239
|
}
|
|
29218
29240
|
//#endregion
|
|
29219
29241
|
//#region ../../node_modules/date-fns/differenceInCalendarDays.js
|
|
29220
|
-
function
|
|
29221
|
-
let [r, i] =
|
|
29222
|
-
return Math.round((s - c) /
|
|
29242
|
+
function Bq(e, t, n) {
|
|
29243
|
+
let [r, i] = Rq(n?.in, e, t), a = zq(r), o = zq(i), s = +a - Lq(a), c = +o - Lq(o);
|
|
29244
|
+
return Math.round((s - c) / Dq);
|
|
29223
29245
|
}
|
|
29224
29246
|
//#endregion
|
|
29225
29247
|
//#region ../../node_modules/date-fns/startOfISOWeekYear.js
|
|
29226
|
-
function
|
|
29227
|
-
let n =
|
|
29228
|
-
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0),
|
|
29248
|
+
function Vq(e, t) {
|
|
29249
|
+
let n = Iq(e, t), r = Aq(t?.in || e, 0);
|
|
29250
|
+
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Fq(r);
|
|
29229
29251
|
}
|
|
29230
29252
|
//#endregion
|
|
29231
29253
|
//#region ../../node_modules/date-fns/isDate.js
|
|
29232
|
-
function
|
|
29254
|
+
function Hq(e) {
|
|
29233
29255
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
29234
29256
|
}
|
|
29235
29257
|
//#endregion
|
|
29236
29258
|
//#region ../../node_modules/date-fns/isValid.js
|
|
29237
|
-
function
|
|
29238
|
-
return !(!
|
|
29259
|
+
function Uq(e) {
|
|
29260
|
+
return !(!Hq(e) && typeof e != "number" || isNaN(+jq(e)));
|
|
29239
29261
|
}
|
|
29240
29262
|
//#endregion
|
|
29241
29263
|
//#region ../../node_modules/date-fns/startOfYear.js
|
|
29242
|
-
function
|
|
29243
|
-
let n =
|
|
29264
|
+
function Wq(e, t) {
|
|
29265
|
+
let n = jq(e, t?.in);
|
|
29244
29266
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
29245
29267
|
}
|
|
29246
29268
|
//#endregion
|
|
29247
29269
|
//#region ../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
29248
|
-
var
|
|
29270
|
+
var Gq = {
|
|
29249
29271
|
lessThanXSeconds: {
|
|
29250
29272
|
one: "less than a second",
|
|
29251
29273
|
other: "less than {{count}} seconds"
|
|
@@ -29307,20 +29329,20 @@ var Wq = {
|
|
|
29307
29329
|
one: "almost 1 year",
|
|
29308
29330
|
other: "almost {{count}} years"
|
|
29309
29331
|
}
|
|
29310
|
-
},
|
|
29311
|
-
let r, i =
|
|
29332
|
+
}, Kq = (e, t, n) => {
|
|
29333
|
+
let r, i = Gq[e];
|
|
29312
29334
|
return r = typeof i == "string" ? i : t === 1 ? i.one : i.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
29313
29335
|
};
|
|
29314
29336
|
//#endregion
|
|
29315
29337
|
//#region ../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
29316
|
-
function
|
|
29338
|
+
function qq(e) {
|
|
29317
29339
|
return (t = {}) => {
|
|
29318
29340
|
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
29319
29341
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
29320
29342
|
};
|
|
29321
29343
|
}
|
|
29322
|
-
var
|
|
29323
|
-
date:
|
|
29344
|
+
var Jq = {
|
|
29345
|
+
date: qq({
|
|
29324
29346
|
formats: {
|
|
29325
29347
|
full: "EEEE, MMMM do, y",
|
|
29326
29348
|
long: "MMMM do, y",
|
|
@@ -29329,7 +29351,7 @@ var qq = {
|
|
|
29329
29351
|
},
|
|
29330
29352
|
defaultWidth: "full"
|
|
29331
29353
|
}),
|
|
29332
|
-
time:
|
|
29354
|
+
time: qq({
|
|
29333
29355
|
formats: {
|
|
29334
29356
|
full: "h:mm:ss a zzzz",
|
|
29335
29357
|
long: "h:mm:ss a z",
|
|
@@ -29338,7 +29360,7 @@ var qq = {
|
|
|
29338
29360
|
},
|
|
29339
29361
|
defaultWidth: "full"
|
|
29340
29362
|
}),
|
|
29341
|
-
dateTime:
|
|
29363
|
+
dateTime: qq({
|
|
29342
29364
|
formats: {
|
|
29343
29365
|
full: "{{date}} 'at' {{time}}",
|
|
29344
29366
|
long: "{{date}} 'at' {{time}}",
|
|
@@ -29347,17 +29369,17 @@ var qq = {
|
|
|
29347
29369
|
},
|
|
29348
29370
|
defaultWidth: "full"
|
|
29349
29371
|
})
|
|
29350
|
-
},
|
|
29372
|
+
}, Yq = {
|
|
29351
29373
|
lastWeek: "'last' eeee 'at' p",
|
|
29352
29374
|
yesterday: "'yesterday at' p",
|
|
29353
29375
|
today: "'today at' p",
|
|
29354
29376
|
tomorrow: "'tomorrow at' p",
|
|
29355
29377
|
nextWeek: "eeee 'at' p",
|
|
29356
29378
|
other: "P"
|
|
29357
|
-
},
|
|
29379
|
+
}, Xq = (e, t, n, r) => Yq[e];
|
|
29358
29380
|
//#endregion
|
|
29359
29381
|
//#region ../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
29360
|
-
function
|
|
29382
|
+
function Zq(e) {
|
|
29361
29383
|
return (t, n) => {
|
|
29362
29384
|
let r = n?.context ? String(n.context) : "standalone", i;
|
|
29363
29385
|
if (r === "formatting" && e.formattingValues) {
|
|
@@ -29371,7 +29393,7 @@ function Xq(e) {
|
|
|
29371
29393
|
return i[a];
|
|
29372
29394
|
};
|
|
29373
29395
|
}
|
|
29374
|
-
var
|
|
29396
|
+
var Qq = {
|
|
29375
29397
|
ordinalNumber: (e, t) => {
|
|
29376
29398
|
let n = Number(e), r = n % 100;
|
|
29377
29399
|
if (r > 20 || r < 10) switch (r % 10) {
|
|
@@ -29381,7 +29403,7 @@ var Zq = {
|
|
|
29381
29403
|
}
|
|
29382
29404
|
return n + "th";
|
|
29383
29405
|
},
|
|
29384
|
-
era:
|
|
29406
|
+
era: Zq({
|
|
29385
29407
|
values: {
|
|
29386
29408
|
narrow: ["B", "A"],
|
|
29387
29409
|
abbreviated: ["BC", "AD"],
|
|
@@ -29389,7 +29411,7 @@ var Zq = {
|
|
|
29389
29411
|
},
|
|
29390
29412
|
defaultWidth: "wide"
|
|
29391
29413
|
}),
|
|
29392
|
-
quarter:
|
|
29414
|
+
quarter: Zq({
|
|
29393
29415
|
values: {
|
|
29394
29416
|
narrow: [
|
|
29395
29417
|
"1",
|
|
@@ -29413,7 +29435,7 @@ var Zq = {
|
|
|
29413
29435
|
defaultWidth: "wide",
|
|
29414
29436
|
argumentCallback: (e) => e - 1
|
|
29415
29437
|
}),
|
|
29416
|
-
month:
|
|
29438
|
+
month: Zq({
|
|
29417
29439
|
values: {
|
|
29418
29440
|
narrow: [
|
|
29419
29441
|
"J",
|
|
@@ -29460,7 +29482,7 @@ var Zq = {
|
|
|
29460
29482
|
},
|
|
29461
29483
|
defaultWidth: "wide"
|
|
29462
29484
|
}),
|
|
29463
|
-
day:
|
|
29485
|
+
day: Zq({
|
|
29464
29486
|
values: {
|
|
29465
29487
|
narrow: [
|
|
29466
29488
|
"S",
|
|
@@ -29501,7 +29523,7 @@ var Zq = {
|
|
|
29501
29523
|
},
|
|
29502
29524
|
defaultWidth: "wide"
|
|
29503
29525
|
}),
|
|
29504
|
-
dayPeriod:
|
|
29526
|
+
dayPeriod: Zq({
|
|
29505
29527
|
values: {
|
|
29506
29528
|
narrow: {
|
|
29507
29529
|
am: "a",
|
|
@@ -29572,11 +29594,11 @@ var Zq = {
|
|
|
29572
29594
|
};
|
|
29573
29595
|
//#endregion
|
|
29574
29596
|
//#region ../../node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
29575
|
-
function
|
|
29597
|
+
function $q(e) {
|
|
29576
29598
|
return (t, n = {}) => {
|
|
29577
29599
|
let r = n.width, i = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
29578
29600
|
if (!a) return null;
|
|
29579
|
-
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
29601
|
+
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? tJ(s, (e) => e.test(o)) : eJ(s, (e) => e.test(o)), l;
|
|
29580
29602
|
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
29581
29603
|
let u = t.slice(o.length);
|
|
29582
29604
|
return {
|
|
@@ -29585,15 +29607,15 @@ function Qq(e) {
|
|
|
29585
29607
|
};
|
|
29586
29608
|
};
|
|
29587
29609
|
}
|
|
29588
|
-
function
|
|
29610
|
+
function eJ(e, t) {
|
|
29589
29611
|
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
29590
29612
|
}
|
|
29591
|
-
function
|
|
29613
|
+
function tJ(e, t) {
|
|
29592
29614
|
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
29593
29615
|
}
|
|
29594
29616
|
//#endregion
|
|
29595
29617
|
//#region ../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
29596
|
-
function
|
|
29618
|
+
function nJ(e) {
|
|
29597
29619
|
return (t, n = {}) => {
|
|
29598
29620
|
let r = t.match(e.matchPattern);
|
|
29599
29621
|
if (!r) return null;
|
|
@@ -29610,19 +29632,19 @@ function tJ(e) {
|
|
|
29610
29632
|
}
|
|
29611
29633
|
//#endregion
|
|
29612
29634
|
//#region ../../node_modules/date-fns/locale/en-US.js
|
|
29613
|
-
var
|
|
29635
|
+
var rJ = {
|
|
29614
29636
|
code: "en-US",
|
|
29615
|
-
formatDistance:
|
|
29616
|
-
formatLong:
|
|
29617
|
-
formatRelative:
|
|
29618
|
-
localize:
|
|
29637
|
+
formatDistance: Kq,
|
|
29638
|
+
formatLong: Jq,
|
|
29639
|
+
formatRelative: Xq,
|
|
29640
|
+
localize: Qq,
|
|
29619
29641
|
match: {
|
|
29620
|
-
ordinalNumber:
|
|
29642
|
+
ordinalNumber: nJ({
|
|
29621
29643
|
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
29622
29644
|
parsePattern: /\d+/i,
|
|
29623
29645
|
valueCallback: (e) => parseInt(e, 10)
|
|
29624
29646
|
}),
|
|
29625
|
-
era:
|
|
29647
|
+
era: $q({
|
|
29626
29648
|
matchPatterns: {
|
|
29627
29649
|
narrow: /^(b|a)/i,
|
|
29628
29650
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
@@ -29632,7 +29654,7 @@ var nJ = {
|
|
|
29632
29654
|
parsePatterns: { any: [/^b/i, /^(a|c)/i] },
|
|
29633
29655
|
defaultParseWidth: "any"
|
|
29634
29656
|
}),
|
|
29635
|
-
quarter:
|
|
29657
|
+
quarter: $q({
|
|
29636
29658
|
matchPatterns: {
|
|
29637
29659
|
narrow: /^[1234]/i,
|
|
29638
29660
|
abbreviated: /^q[1234]/i,
|
|
@@ -29648,7 +29670,7 @@ var nJ = {
|
|
|
29648
29670
|
defaultParseWidth: "any",
|
|
29649
29671
|
valueCallback: (e) => e + 1
|
|
29650
29672
|
}),
|
|
29651
|
-
month:
|
|
29673
|
+
month: $q({
|
|
29652
29674
|
matchPatterns: {
|
|
29653
29675
|
narrow: /^[jfmasond]/i,
|
|
29654
29676
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
@@ -29687,7 +29709,7 @@ var nJ = {
|
|
|
29687
29709
|
},
|
|
29688
29710
|
defaultParseWidth: "any"
|
|
29689
29711
|
}),
|
|
29690
|
-
day:
|
|
29712
|
+
day: $q({
|
|
29691
29713
|
matchPatterns: {
|
|
29692
29714
|
narrow: /^[smtwf]/i,
|
|
29693
29715
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
@@ -29717,7 +29739,7 @@ var nJ = {
|
|
|
29717
29739
|
},
|
|
29718
29740
|
defaultParseWidth: "any"
|
|
29719
29741
|
}),
|
|
29720
|
-
dayPeriod:
|
|
29742
|
+
dayPeriod: $q({
|
|
29721
29743
|
matchPatterns: {
|
|
29722
29744
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
29723
29745
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
@@ -29743,56 +29765,56 @@ var nJ = {
|
|
|
29743
29765
|
};
|
|
29744
29766
|
//#endregion
|
|
29745
29767
|
//#region ../../node_modules/date-fns/getDayOfYear.js
|
|
29746
|
-
function
|
|
29747
|
-
let n =
|
|
29748
|
-
return
|
|
29768
|
+
function iJ(e, t) {
|
|
29769
|
+
let n = jq(e, t?.in);
|
|
29770
|
+
return Bq(n, Wq(n)) + 1;
|
|
29749
29771
|
}
|
|
29750
29772
|
//#endregion
|
|
29751
29773
|
//#region ../../node_modules/date-fns/getISOWeek.js
|
|
29752
|
-
function
|
|
29753
|
-
let n =
|
|
29754
|
-
return Math.round(r /
|
|
29774
|
+
function aJ(e, t) {
|
|
29775
|
+
let n = jq(e, t?.in), r = Fq(n) - +Vq(n);
|
|
29776
|
+
return Math.round(r / Eq) + 1;
|
|
29755
29777
|
}
|
|
29756
29778
|
//#endregion
|
|
29757
29779
|
//#region ../../node_modules/date-fns/getWeekYear.js
|
|
29758
|
-
function
|
|
29759
|
-
let n =
|
|
29780
|
+
function oJ(e, t) {
|
|
29781
|
+
let n = jq(e, t?.in), r = n.getFullYear(), i = Nq(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = Aq(t?.in || e, 0);
|
|
29760
29782
|
o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
29761
|
-
let s =
|
|
29783
|
+
let s = Pq(o, t), c = Aq(t?.in || e, 0);
|
|
29762
29784
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
29763
|
-
let l =
|
|
29785
|
+
let l = Pq(c, t);
|
|
29764
29786
|
return +n >= +s ? r + 1 : +n >= +l ? r : r - 1;
|
|
29765
29787
|
}
|
|
29766
29788
|
//#endregion
|
|
29767
29789
|
//#region ../../node_modules/date-fns/startOfWeekYear.js
|
|
29768
|
-
function
|
|
29769
|
-
let n =
|
|
29770
|
-
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0),
|
|
29790
|
+
function sJ(e, t) {
|
|
29791
|
+
let n = Nq(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = oJ(e, t), a = Aq(t?.in || e, 0);
|
|
29792
|
+
return a.setFullYear(i, 0, r), a.setHours(0, 0, 0, 0), Pq(a, t);
|
|
29771
29793
|
}
|
|
29772
29794
|
//#endregion
|
|
29773
29795
|
//#region ../../node_modules/date-fns/getWeek.js
|
|
29774
|
-
function
|
|
29775
|
-
let n =
|
|
29776
|
-
return Math.round(r /
|
|
29796
|
+
function cJ(e, t) {
|
|
29797
|
+
let n = jq(e, t?.in), r = Pq(n, t) - +sJ(n, t);
|
|
29798
|
+
return Math.round(r / Eq) + 1;
|
|
29777
29799
|
}
|
|
29778
29800
|
//#endregion
|
|
29779
29801
|
//#region ../../node_modules/date-fns/_lib/addLeadingZeros.js
|
|
29780
|
-
function
|
|
29802
|
+
function lJ(e, t) {
|
|
29781
29803
|
return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
|
|
29782
29804
|
}
|
|
29783
29805
|
//#endregion
|
|
29784
29806
|
//#region ../../node_modules/date-fns/_lib/format/lightFormatters.js
|
|
29785
|
-
var
|
|
29807
|
+
var uJ = {
|
|
29786
29808
|
y(e, t) {
|
|
29787
29809
|
let n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
29788
|
-
return
|
|
29810
|
+
return lJ(t === "yy" ? r % 100 : r, t.length);
|
|
29789
29811
|
},
|
|
29790
29812
|
M(e, t) {
|
|
29791
29813
|
let n = e.getMonth();
|
|
29792
|
-
return t === "M" ? String(n + 1) :
|
|
29814
|
+
return t === "M" ? String(n + 1) : lJ(n + 1, 2);
|
|
29793
29815
|
},
|
|
29794
29816
|
d(e, t) {
|
|
29795
|
-
return
|
|
29817
|
+
return lJ(e.getDate(), t.length);
|
|
29796
29818
|
},
|
|
29797
29819
|
a(e, t) {
|
|
29798
29820
|
let n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
@@ -29805,22 +29827,22 @@ var lJ = {
|
|
|
29805
29827
|
}
|
|
29806
29828
|
},
|
|
29807
29829
|
h(e, t) {
|
|
29808
|
-
return
|
|
29830
|
+
return lJ(e.getHours() % 12 || 12, t.length);
|
|
29809
29831
|
},
|
|
29810
29832
|
H(e, t) {
|
|
29811
|
-
return
|
|
29833
|
+
return lJ(e.getHours(), t.length);
|
|
29812
29834
|
},
|
|
29813
29835
|
m(e, t) {
|
|
29814
|
-
return
|
|
29836
|
+
return lJ(e.getMinutes(), t.length);
|
|
29815
29837
|
},
|
|
29816
29838
|
s(e, t) {
|
|
29817
|
-
return
|
|
29839
|
+
return lJ(e.getSeconds(), t.length);
|
|
29818
29840
|
},
|
|
29819
29841
|
S(e, t) {
|
|
29820
29842
|
let n = t.length, r = e.getMilliseconds();
|
|
29821
|
-
return
|
|
29843
|
+
return lJ(Math.trunc(r * 10 ** (n - 3)), t.length);
|
|
29822
29844
|
}
|
|
29823
|
-
},
|
|
29845
|
+
}, dJ = {
|
|
29824
29846
|
am: "am",
|
|
29825
29847
|
pm: "pm",
|
|
29826
29848
|
midnight: "midnight",
|
|
@@ -29829,7 +29851,7 @@ var lJ = {
|
|
|
29829
29851
|
afternoon: "afternoon",
|
|
29830
29852
|
evening: "evening",
|
|
29831
29853
|
night: "night"
|
|
29832
|
-
},
|
|
29854
|
+
}, fJ = {
|
|
29833
29855
|
G: function(e, t, n) {
|
|
29834
29856
|
let r = +(e.getFullYear() > 0);
|
|
29835
29857
|
switch (t) {
|
|
@@ -29845,23 +29867,23 @@ var lJ = {
|
|
|
29845
29867
|
let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
|
|
29846
29868
|
return n.ordinalNumber(r, { unit: "year" });
|
|
29847
29869
|
}
|
|
29848
|
-
return
|
|
29870
|
+
return uJ.y(e, t);
|
|
29849
29871
|
},
|
|
29850
29872
|
Y: function(e, t, n, r) {
|
|
29851
|
-
let i =
|
|
29852
|
-
return t === "YY" ?
|
|
29873
|
+
let i = oJ(e, r), a = i > 0 ? i : 1 - i;
|
|
29874
|
+
return t === "YY" ? lJ(a % 100, 2) : t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : lJ(a, t.length);
|
|
29853
29875
|
},
|
|
29854
29876
|
R: function(e, t) {
|
|
29855
|
-
return
|
|
29877
|
+
return lJ(Iq(e), t.length);
|
|
29856
29878
|
},
|
|
29857
29879
|
u: function(e, t) {
|
|
29858
|
-
return
|
|
29880
|
+
return lJ(e.getFullYear(), t.length);
|
|
29859
29881
|
},
|
|
29860
29882
|
Q: function(e, t, n) {
|
|
29861
29883
|
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
29862
29884
|
switch (t) {
|
|
29863
29885
|
case "Q": return String(r);
|
|
29864
|
-
case "QQ": return
|
|
29886
|
+
case "QQ": return lJ(r, 2);
|
|
29865
29887
|
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
29866
29888
|
case "QQQ": return n.quarter(r, {
|
|
29867
29889
|
width: "abbreviated",
|
|
@@ -29881,7 +29903,7 @@ var lJ = {
|
|
|
29881
29903
|
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
29882
29904
|
switch (t) {
|
|
29883
29905
|
case "q": return String(r);
|
|
29884
|
-
case "qq": return
|
|
29906
|
+
case "qq": return lJ(r, 2);
|
|
29885
29907
|
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
29886
29908
|
case "qqq": return n.quarter(r, {
|
|
29887
29909
|
width: "abbreviated",
|
|
@@ -29901,7 +29923,7 @@ var lJ = {
|
|
|
29901
29923
|
let r = e.getMonth();
|
|
29902
29924
|
switch (t) {
|
|
29903
29925
|
case "M":
|
|
29904
|
-
case "MM": return
|
|
29926
|
+
case "MM": return uJ.M(e, t);
|
|
29905
29927
|
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
29906
29928
|
case "MMM": return n.month(r, {
|
|
29907
29929
|
width: "abbreviated",
|
|
@@ -29921,7 +29943,7 @@ var lJ = {
|
|
|
29921
29943
|
let r = e.getMonth();
|
|
29922
29944
|
switch (t) {
|
|
29923
29945
|
case "L": return String(r + 1);
|
|
29924
|
-
case "LL": return
|
|
29946
|
+
case "LL": return lJ(r + 1, 2);
|
|
29925
29947
|
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
29926
29948
|
case "LLL": return n.month(r, {
|
|
29927
29949
|
width: "abbreviated",
|
|
@@ -29938,19 +29960,19 @@ var lJ = {
|
|
|
29938
29960
|
}
|
|
29939
29961
|
},
|
|
29940
29962
|
w: function(e, t, n, r) {
|
|
29941
|
-
let i =
|
|
29942
|
-
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) :
|
|
29963
|
+
let i = cJ(e, r);
|
|
29964
|
+
return t === "wo" ? n.ordinalNumber(i, { unit: "week" }) : lJ(i, t.length);
|
|
29943
29965
|
},
|
|
29944
29966
|
I: function(e, t, n) {
|
|
29945
|
-
let r =
|
|
29946
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
29967
|
+
let r = aJ(e);
|
|
29968
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : lJ(r, t.length);
|
|
29947
29969
|
},
|
|
29948
29970
|
d: function(e, t, n) {
|
|
29949
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
29971
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : uJ.d(e, t);
|
|
29950
29972
|
},
|
|
29951
29973
|
D: function(e, t, n) {
|
|
29952
|
-
let r =
|
|
29953
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
29974
|
+
let r = iJ(e);
|
|
29975
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : lJ(r, t.length);
|
|
29954
29976
|
},
|
|
29955
29977
|
E: function(e, t, n) {
|
|
29956
29978
|
let r = e.getDay();
|
|
@@ -29979,7 +30001,7 @@ var lJ = {
|
|
|
29979
30001
|
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
29980
30002
|
switch (t) {
|
|
29981
30003
|
case "e": return String(a);
|
|
29982
|
-
case "ee": return
|
|
30004
|
+
case "ee": return lJ(a, 2);
|
|
29983
30005
|
case "eo": return n.ordinalNumber(a, { unit: "day" });
|
|
29984
30006
|
case "eee": return n.day(i, {
|
|
29985
30007
|
width: "abbreviated",
|
|
@@ -30003,7 +30025,7 @@ var lJ = {
|
|
|
30003
30025
|
let i = e.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
30004
30026
|
switch (t) {
|
|
30005
30027
|
case "c": return String(a);
|
|
30006
|
-
case "cc": return
|
|
30028
|
+
case "cc": return lJ(a, t.length);
|
|
30007
30029
|
case "co": return n.ordinalNumber(a, { unit: "day" });
|
|
30008
30030
|
case "ccc": return n.day(i, {
|
|
30009
30031
|
width: "abbreviated",
|
|
@@ -30027,7 +30049,7 @@ var lJ = {
|
|
|
30027
30049
|
let r = e.getDay(), i = r === 0 ? 7 : r;
|
|
30028
30050
|
switch (t) {
|
|
30029
30051
|
case "i": return String(i);
|
|
30030
|
-
case "ii": return
|
|
30052
|
+
case "ii": return lJ(i, t.length);
|
|
30031
30053
|
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
30032
30054
|
case "iii": return n.day(r, {
|
|
30033
30055
|
width: "abbreviated",
|
|
@@ -30071,7 +30093,7 @@ var lJ = {
|
|
|
30071
30093
|
},
|
|
30072
30094
|
b: function(e, t, n) {
|
|
30073
30095
|
let r = e.getHours(), i;
|
|
30074
|
-
switch (i = r === 12 ?
|
|
30096
|
+
switch (i = r === 12 ? dJ.noon : r === 0 ? dJ.midnight : r / 12 >= 1 ? "pm" : "am", t) {
|
|
30075
30097
|
case "b":
|
|
30076
30098
|
case "bb": return n.dayPeriod(i, {
|
|
30077
30099
|
width: "abbreviated",
|
|
@@ -30093,7 +30115,7 @@ var lJ = {
|
|
|
30093
30115
|
},
|
|
30094
30116
|
B: function(e, t, n) {
|
|
30095
30117
|
let r = e.getHours(), i;
|
|
30096
|
-
switch (i = r >= 17 ?
|
|
30118
|
+
switch (i = r >= 17 ? dJ.evening : r >= 12 ? dJ.afternoon : r >= 4 ? dJ.morning : dJ.night, t) {
|
|
30097
30119
|
case "B":
|
|
30098
30120
|
case "BB":
|
|
30099
30121
|
case "BBB": return n.dayPeriod(i, {
|
|
@@ -30115,45 +30137,45 @@ var lJ = {
|
|
|
30115
30137
|
let t = e.getHours() % 12;
|
|
30116
30138
|
return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
|
|
30117
30139
|
}
|
|
30118
|
-
return
|
|
30140
|
+
return uJ.h(e, t);
|
|
30119
30141
|
},
|
|
30120
30142
|
H: function(e, t, n) {
|
|
30121
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
30143
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : uJ.H(e, t);
|
|
30122
30144
|
},
|
|
30123
30145
|
K: function(e, t, n) {
|
|
30124
30146
|
let r = e.getHours() % 12;
|
|
30125
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
30147
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : lJ(r, t.length);
|
|
30126
30148
|
},
|
|
30127
30149
|
k: function(e, t, n) {
|
|
30128
30150
|
let r = e.getHours();
|
|
30129
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
30151
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : lJ(r, t.length);
|
|
30130
30152
|
},
|
|
30131
30153
|
m: function(e, t, n) {
|
|
30132
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
30154
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : uJ.m(e, t);
|
|
30133
30155
|
},
|
|
30134
30156
|
s: function(e, t, n) {
|
|
30135
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
30157
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : uJ.s(e, t);
|
|
30136
30158
|
},
|
|
30137
30159
|
S: function(e, t) {
|
|
30138
|
-
return
|
|
30160
|
+
return uJ.S(e, t);
|
|
30139
30161
|
},
|
|
30140
30162
|
X: function(e, t, n) {
|
|
30141
30163
|
let r = e.getTimezoneOffset();
|
|
30142
30164
|
if (r === 0) return "Z";
|
|
30143
30165
|
switch (t) {
|
|
30144
|
-
case "X": return
|
|
30166
|
+
case "X": return mJ(r);
|
|
30145
30167
|
case "XXXX":
|
|
30146
|
-
case "XX": return
|
|
30147
|
-
default: return
|
|
30168
|
+
case "XX": return hJ(r);
|
|
30169
|
+
default: return hJ(r, ":");
|
|
30148
30170
|
}
|
|
30149
30171
|
},
|
|
30150
30172
|
x: function(e, t, n) {
|
|
30151
30173
|
let r = e.getTimezoneOffset();
|
|
30152
30174
|
switch (t) {
|
|
30153
|
-
case "x": return
|
|
30175
|
+
case "x": return mJ(r);
|
|
30154
30176
|
case "xxxx":
|
|
30155
|
-
case "xx": return
|
|
30156
|
-
default: return
|
|
30177
|
+
case "xx": return hJ(r);
|
|
30178
|
+
default: return hJ(r, ":");
|
|
30157
30179
|
}
|
|
30158
30180
|
},
|
|
30159
30181
|
O: function(e, t, n) {
|
|
@@ -30161,8 +30183,8 @@ var lJ = {
|
|
|
30161
30183
|
switch (t) {
|
|
30162
30184
|
case "O":
|
|
30163
30185
|
case "OO":
|
|
30164
|
-
case "OOO": return "GMT" +
|
|
30165
|
-
default: return "GMT" +
|
|
30186
|
+
case "OOO": return "GMT" + pJ(r, ":");
|
|
30187
|
+
default: return "GMT" + hJ(r, ":");
|
|
30166
30188
|
}
|
|
30167
30189
|
},
|
|
30168
30190
|
z: function(e, t, n) {
|
|
@@ -30170,49 +30192,49 @@ var lJ = {
|
|
|
30170
30192
|
switch (t) {
|
|
30171
30193
|
case "z":
|
|
30172
30194
|
case "zz":
|
|
30173
|
-
case "zzz": return "GMT" +
|
|
30174
|
-
default: return "GMT" +
|
|
30195
|
+
case "zzz": return "GMT" + pJ(r, ":");
|
|
30196
|
+
default: return "GMT" + hJ(r, ":");
|
|
30175
30197
|
}
|
|
30176
30198
|
},
|
|
30177
30199
|
t: function(e, t, n) {
|
|
30178
|
-
return
|
|
30200
|
+
return lJ(Math.trunc(e / 1e3), t.length);
|
|
30179
30201
|
},
|
|
30180
30202
|
T: function(e, t, n) {
|
|
30181
|
-
return
|
|
30203
|
+
return lJ(+e, t.length);
|
|
30182
30204
|
}
|
|
30183
30205
|
};
|
|
30184
|
-
function
|
|
30206
|
+
function pJ(e, t = "") {
|
|
30185
30207
|
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), a = r % 60;
|
|
30186
|
-
return a === 0 ? n + String(i) : n + String(i) + t +
|
|
30208
|
+
return a === 0 ? n + String(i) : n + String(i) + t + lJ(a, 2);
|
|
30187
30209
|
}
|
|
30188
|
-
function
|
|
30189
|
-
return e % 60 == 0 ? (e > 0 ? "-" : "+") +
|
|
30210
|
+
function mJ(e, t) {
|
|
30211
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + lJ(Math.abs(e) / 60, 2) : hJ(e, t);
|
|
30190
30212
|
}
|
|
30191
|
-
function
|
|
30192
|
-
let n = e > 0 ? "-" : "+", r = Math.abs(e), i =
|
|
30213
|
+
function hJ(e, t = "") {
|
|
30214
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = lJ(Math.trunc(r / 60), 2), a = lJ(r % 60, 2);
|
|
30193
30215
|
return n + i + t + a;
|
|
30194
30216
|
}
|
|
30195
30217
|
//#endregion
|
|
30196
30218
|
//#region ../../node_modules/date-fns/_lib/format/longFormatters.js
|
|
30197
|
-
var
|
|
30219
|
+
var gJ = (e, t) => {
|
|
30198
30220
|
switch (e) {
|
|
30199
30221
|
case "P": return t.date({ width: "short" });
|
|
30200
30222
|
case "PP": return t.date({ width: "medium" });
|
|
30201
30223
|
case "PPP": return t.date({ width: "long" });
|
|
30202
30224
|
default: return t.date({ width: "full" });
|
|
30203
30225
|
}
|
|
30204
|
-
},
|
|
30226
|
+
}, _J = (e, t) => {
|
|
30205
30227
|
switch (e) {
|
|
30206
30228
|
case "p": return t.time({ width: "short" });
|
|
30207
30229
|
case "pp": return t.time({ width: "medium" });
|
|
30208
30230
|
case "ppp": return t.time({ width: "long" });
|
|
30209
30231
|
default: return t.time({ width: "full" });
|
|
30210
30232
|
}
|
|
30211
|
-
},
|
|
30212
|
-
p:
|
|
30233
|
+
}, vJ = {
|
|
30234
|
+
p: _J,
|
|
30213
30235
|
P: (e, t) => {
|
|
30214
30236
|
let n = e.match(/(P+)(p+)?/) || [], r = n[1], i = n[2];
|
|
30215
|
-
if (!i) return
|
|
30237
|
+
if (!i) return gJ(e, t);
|
|
30216
30238
|
let a;
|
|
30217
30239
|
switch (r) {
|
|
30218
30240
|
case "P":
|
|
@@ -30228,42 +30250,42 @@ var hJ = (e, t) => {
|
|
|
30228
30250
|
a = t.dateTime({ width: "full" });
|
|
30229
30251
|
break;
|
|
30230
30252
|
}
|
|
30231
|
-
return a.replace("{{date}}",
|
|
30253
|
+
return a.replace("{{date}}", gJ(r, t)).replace("{{time}}", _J(i, t));
|
|
30232
30254
|
}
|
|
30233
|
-
},
|
|
30255
|
+
}, yJ = /^D+$/, bJ = /^Y+$/, xJ = [
|
|
30234
30256
|
"D",
|
|
30235
30257
|
"DD",
|
|
30236
30258
|
"YY",
|
|
30237
30259
|
"YYYY"
|
|
30238
30260
|
];
|
|
30239
|
-
function xJ(e) {
|
|
30240
|
-
return vJ.test(e);
|
|
30241
|
-
}
|
|
30242
30261
|
function SJ(e) {
|
|
30243
30262
|
return yJ.test(e);
|
|
30244
30263
|
}
|
|
30245
|
-
function CJ(e
|
|
30246
|
-
|
|
30247
|
-
if (console.warn(r), bJ.includes(e)) throw RangeError(r);
|
|
30264
|
+
function CJ(e) {
|
|
30265
|
+
return bJ.test(e);
|
|
30248
30266
|
}
|
|
30249
30267
|
function wJ(e, t, n) {
|
|
30268
|
+
let r = TJ(e, t, n);
|
|
30269
|
+
if (console.warn(r), xJ.includes(e)) throw RangeError(r);
|
|
30270
|
+
}
|
|
30271
|
+
function TJ(e, t, n) {
|
|
30250
30272
|
let r = e[0] === "Y" ? "years" : "days of the month";
|
|
30251
30273
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
30252
30274
|
}
|
|
30253
30275
|
//#endregion
|
|
30254
30276
|
//#region ../../node_modules/date-fns/format.js
|
|
30255
|
-
var
|
|
30256
|
-
function
|
|
30257
|
-
let r =
|
|
30258
|
-
if (!
|
|
30259
|
-
let c = t.match(
|
|
30277
|
+
var EJ = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, DJ = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, OJ = /^'([^]*?)'?$/, kJ = /''/g, AJ = /[a-zA-Z]/;
|
|
30278
|
+
function jJ(e, t, n) {
|
|
30279
|
+
let r = Nq(), i = n?.locale ?? r.locale ?? rJ, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = jq(e, n?.in);
|
|
30280
|
+
if (!Uq(s)) throw RangeError("Invalid time value");
|
|
30281
|
+
let c = t.match(DJ).map((e) => {
|
|
30260
30282
|
let t = e[0];
|
|
30261
30283
|
if (t === "p" || t === "P") {
|
|
30262
|
-
let n =
|
|
30284
|
+
let n = vJ[t];
|
|
30263
30285
|
return n(e, i.formatLong);
|
|
30264
30286
|
}
|
|
30265
30287
|
return e;
|
|
30266
|
-
}).join("").match(
|
|
30288
|
+
}).join("").match(EJ).map((e) => {
|
|
30267
30289
|
if (e === "''") return {
|
|
30268
30290
|
isToken: !1,
|
|
30269
30291
|
value: "'"
|
|
@@ -30271,13 +30293,13 @@ function AJ(e, t, n) {
|
|
|
30271
30293
|
let t = e[0];
|
|
30272
30294
|
if (t === "'") return {
|
|
30273
30295
|
isToken: !1,
|
|
30274
|
-
value:
|
|
30296
|
+
value: MJ(e)
|
|
30275
30297
|
};
|
|
30276
|
-
if (
|
|
30298
|
+
if (fJ[t]) return {
|
|
30277
30299
|
isToken: !0,
|
|
30278
30300
|
value: e
|
|
30279
30301
|
};
|
|
30280
|
-
if (t.match(
|
|
30302
|
+
if (t.match(AJ)) throw RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
|
|
30281
30303
|
return {
|
|
30282
30304
|
isToken: !1,
|
|
30283
30305
|
value: e
|
|
@@ -30292,18 +30314,18 @@ function AJ(e, t, n) {
|
|
|
30292
30314
|
return c.map((r) => {
|
|
30293
30315
|
if (!r.isToken) return r.value;
|
|
30294
30316
|
let a = r.value;
|
|
30295
|
-
(!n?.useAdditionalWeekYearTokens &&
|
|
30296
|
-
let o =
|
|
30317
|
+
(!n?.useAdditionalWeekYearTokens && CJ(a) || !n?.useAdditionalDayOfYearTokens && SJ(a)) && wJ(a, t, String(e));
|
|
30318
|
+
let o = fJ[a[0]];
|
|
30297
30319
|
return o(s, a, i.localize, l);
|
|
30298
30320
|
}).join("");
|
|
30299
30321
|
}
|
|
30300
|
-
function
|
|
30301
|
-
let t = e.match(
|
|
30302
|
-
return t ? t[1].replace(
|
|
30322
|
+
function MJ(e) {
|
|
30323
|
+
let t = e.match(OJ);
|
|
30324
|
+
return t ? t[1].replace(kJ, "'") : e;
|
|
30303
30325
|
}
|
|
30304
30326
|
//#endregion
|
|
30305
30327
|
//#region src/composed/DatePicker/DatePicker.tsx
|
|
30306
|
-
function
|
|
30328
|
+
function NJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disabled: i = !1, dateFormat: a = "PPP", locale: o, className: s, "aria-label": c }) {
|
|
30307
30329
|
let [l, u] = V(!1);
|
|
30308
30330
|
return /* @__PURE__ */ U(GB, {
|
|
30309
30331
|
open: l,
|
|
@@ -30319,7 +30341,7 @@ function MJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disa
|
|
|
30319
30341
|
"aria-expanded": l,
|
|
30320
30342
|
"aria-label": c,
|
|
30321
30343
|
className: q("w-full min-w-[9rem] justify-between font-normal", !t && "text-muted-foreground", s),
|
|
30322
|
-
children: [t ?
|
|
30344
|
+
children: [t ? jJ(t, a) : /* @__PURE__ */ H("span", { children: r }), /* @__PURE__ */ H(f, { "aria-hidden": "true" })]
|
|
30323
30345
|
})
|
|
30324
30346
|
}), /* @__PURE__ */ H(qB, {
|
|
30325
30347
|
className: "w-auto p-0",
|
|
@@ -30336,7 +30358,7 @@ function MJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disa
|
|
|
30336
30358
|
}
|
|
30337
30359
|
//#endregion
|
|
30338
30360
|
//#region src/composed/DatePicker/DateRangePicker.tsx
|
|
30339
|
-
function
|
|
30361
|
+
function PJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disabled: i = !1, dateFormat: a = "LLL dd, y", locale: o, numberOfMonths: s = 2, className: c, "aria-label": l }) {
|
|
30340
30362
|
let [u, d] = V(!1);
|
|
30341
30363
|
return /* @__PURE__ */ U(GB, {
|
|
30342
30364
|
open: u,
|
|
@@ -30353,10 +30375,10 @@ function NJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disa
|
|
|
30353
30375
|
"aria-label": l,
|
|
30354
30376
|
className: q("w-full min-w-[15rem] justify-between font-normal", !(t?.from || t?.to) && "text-muted-foreground", c),
|
|
30355
30377
|
children: [t?.from || t?.to ? t.from ? t.to ? /* @__PURE__ */ U(oe, { children: [
|
|
30356
|
-
|
|
30378
|
+
jJ(t.from, a),
|
|
30357
30379
|
" → ",
|
|
30358
|
-
|
|
30359
|
-
] }) : /* @__PURE__ */ U(oe, { children: [
|
|
30380
|
+
jJ(t.to, a)
|
|
30381
|
+
] }) : /* @__PURE__ */ U(oe, { children: [jJ(t.from, a), " → …"] }) : /* @__PURE__ */ U(oe, { children: ["… → ", jJ(t.to, a)] }) : /* @__PURE__ */ H("span", { children: r }), /* @__PURE__ */ H(f, { "aria-hidden": "true" })]
|
|
30360
30382
|
})
|
|
30361
30383
|
}), /* @__PURE__ */ H(qB, {
|
|
30362
30384
|
className: "w-auto p-0",
|
|
@@ -30374,10 +30396,10 @@ function NJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date", disa
|
|
|
30374
30396
|
}
|
|
30375
30397
|
//#endregion
|
|
30376
30398
|
//#region src/composed/DatePicker/date-time.ts
|
|
30377
|
-
function
|
|
30378
|
-
return e ?
|
|
30399
|
+
function FJ(e, t = "00:00:00") {
|
|
30400
|
+
return e ? jJ(e, "HH:mm:ss") : t;
|
|
30379
30401
|
}
|
|
30380
|
-
function
|
|
30402
|
+
function IJ(e, t) {
|
|
30381
30403
|
let [n = "0", r = "0", i = "0"] = t.split(":"), a = Number(n), o = Number(r), s = Number(i);
|
|
30382
30404
|
if (Number.isNaN(a) || Number.isNaN(o) || Number.isNaN(s)) return e;
|
|
30383
30405
|
let c = new Date(e);
|
|
@@ -30385,17 +30407,17 @@ function FJ(e, t) {
|
|
|
30385
30407
|
}
|
|
30386
30408
|
//#endregion
|
|
30387
30409
|
//#region src/composed/DatePicker/DateTimePicker.tsx
|
|
30388
|
-
function
|
|
30410
|
+
function LJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and time", disabled: i = !1, dateTimeFormat: a = "PP '@' HH:mm:ss", locale: o, className: s, side: c = "bottom", align: l = "start", "aria-label": u }) {
|
|
30389
30411
|
let d = (/* @__PURE__ */ new Date()).getFullYear(), p = new Date(d - 10, 0), m = new Date(d + 10, 11), h = ee(), g = e ?? h, [_, v] = V(!1);
|
|
30390
30412
|
function y(e) {
|
|
30391
30413
|
if (!e) {
|
|
30392
30414
|
n?.(void 0);
|
|
30393
30415
|
return;
|
|
30394
30416
|
}
|
|
30395
|
-
n?.(
|
|
30417
|
+
n?.(IJ(e, t ? FJ(t) : "00:00:00"));
|
|
30396
30418
|
}
|
|
30397
30419
|
function b(e) {
|
|
30398
|
-
n?.(
|
|
30420
|
+
n?.(IJ(t ?? /* @__PURE__ */ new Date(), e));
|
|
30399
30421
|
}
|
|
30400
30422
|
return /* @__PURE__ */ U(GB, {
|
|
30401
30423
|
open: _,
|
|
@@ -30411,7 +30433,7 @@ function IJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30411
30433
|
"aria-expanded": _,
|
|
30412
30434
|
"aria-label": u,
|
|
30413
30435
|
className: q("w-full min-w-[13rem] justify-between font-normal", !t && "text-muted-foreground", s),
|
|
30414
|
-
children: [t ?
|
|
30436
|
+
children: [t ? jJ(t, a) : r, /* @__PURE__ */ H(f, { "aria-hidden": "true" })]
|
|
30415
30437
|
})
|
|
30416
30438
|
}), /* @__PURE__ */ U(qB, {
|
|
30417
30439
|
className: "w-auto overflow-hidden p-0",
|
|
@@ -30438,7 +30460,7 @@ function IJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30438
30460
|
id: `${g}-time`,
|
|
30439
30461
|
type: "time",
|
|
30440
30462
|
step: "1",
|
|
30441
|
-
value:
|
|
30463
|
+
value: FJ(t),
|
|
30442
30464
|
disabled: i,
|
|
30443
30465
|
onChange: (e) => b(e.target.value),
|
|
30444
30466
|
className: "ml-auto w-32 appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
|
|
@@ -30450,15 +30472,15 @@ function IJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30450
30472
|
}
|
|
30451
30473
|
//#endregion
|
|
30452
30474
|
//#region src/composed/DatePicker/DateTimeRangePicker.tsx
|
|
30453
|
-
var
|
|
30454
|
-
function
|
|
30455
|
-
let h = (/* @__PURE__ */ new Date()).getFullYear(), g = new Date(h - 10, 0), _ = new Date(h + 10, 11), v = ee(), y = e ?? v, [b, x] = V(!1), S =
|
|
30475
|
+
var RJ = "00:00:00", zJ = "23:59:59";
|
|
30476
|
+
function BJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and time range", disabled: i = !1, fromLabel: a = "From", toLabel: o = "To", dateTimeFormat: s = "PP '@' HH:mm", locale: c, className: l, side: u = "bottom", align: d = "start", numberOfMonths: p = 2, "aria-label": m }) {
|
|
30477
|
+
let h = (/* @__PURE__ */ new Date()).getFullYear(), g = new Date(h - 10, 0), _ = new Date(h + 10, 11), v = ee(), y = e ?? v, [b, x] = V(!1), S = FJ(t?.from, RJ), C = FJ(t?.to, zJ);
|
|
30456
30478
|
function w(e) {
|
|
30457
30479
|
if (!e) {
|
|
30458
30480
|
n?.(void 0);
|
|
30459
30481
|
return;
|
|
30460
30482
|
}
|
|
30461
|
-
let t = e.from ?
|
|
30483
|
+
let t = e.from ? IJ(e.from, S) : void 0, r = e.to ? IJ(e.to, C) : void 0;
|
|
30462
30484
|
n?.({
|
|
30463
30485
|
from: t,
|
|
30464
30486
|
to: r
|
|
@@ -30467,7 +30489,7 @@ function zJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30467
30489
|
function T(e) {
|
|
30468
30490
|
let r = t?.from ?? /* @__PURE__ */ new Date();
|
|
30469
30491
|
n?.({
|
|
30470
|
-
from:
|
|
30492
|
+
from: IJ(r, e),
|
|
30471
30493
|
to: t?.to
|
|
30472
30494
|
});
|
|
30473
30495
|
}
|
|
@@ -30475,11 +30497,11 @@ function zJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30475
30497
|
let r = t?.to ?? t?.from ?? /* @__PURE__ */ new Date();
|
|
30476
30498
|
n?.({
|
|
30477
30499
|
from: t?.from,
|
|
30478
|
-
to:
|
|
30500
|
+
to: IJ(r, e)
|
|
30479
30501
|
});
|
|
30480
30502
|
}
|
|
30481
30503
|
function D() {
|
|
30482
|
-
return !t?.from && !t?.to ? r : t?.from && t?.to ? `${
|
|
30504
|
+
return !t?.from && !t?.to ? r : t?.from && t?.to ? `${jJ(t.from, s)} → ${jJ(t.to, s)}` : t?.from ? `${jJ(t.from, s)} → …` : t?.to ? `… → ${jJ(t.to, s)}` : r;
|
|
30483
30505
|
}
|
|
30484
30506
|
return /* @__PURE__ */ U(GB, {
|
|
30485
30507
|
open: b,
|
|
@@ -30552,7 +30574,7 @@ function zJ({ id: e, value: t, onChange: n, placeholder: r = "Pick a date and ti
|
|
|
30552
30574
|
}
|
|
30553
30575
|
//#endregion
|
|
30554
30576
|
//#region src/composed/FacetedFilter/FacetedFilter.tsx
|
|
30555
|
-
function
|
|
30577
|
+
function VJ({ title: e, options: t, selected: n, onChange: r }) {
|
|
30556
30578
|
let i = B(() => new Set(n), [n]);
|
|
30557
30579
|
return /* @__PURE__ */ U(GB, { children: [/* @__PURE__ */ H(KB, {
|
|
30558
30580
|
asChild: !0,
|
|
@@ -30594,13 +30616,13 @@ function BJ({ title: e, options: t, selected: n, onChange: r }) {
|
|
|
30594
30616
|
}
|
|
30595
30617
|
//#endregion
|
|
30596
30618
|
//#region src/composed/FileUpload/FileUploadItem.tsx
|
|
30597
|
-
var
|
|
30598
|
-
function
|
|
30619
|
+
var HJ = /\.(json|ya?ml|js|jsx|ts|tsx|html?|css|py|rb|go|rs|sh)$/i;
|
|
30620
|
+
function UJ(e) {
|
|
30599
30621
|
let t = e.type;
|
|
30600
|
-
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" :
|
|
30622
|
+
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : HJ.test(e.name) ? "code" : t === "application/pdf" || t.includes("document") || t.startsWith("text/") ? "document" : "other";
|
|
30601
30623
|
}
|
|
30602
|
-
function
|
|
30603
|
-
switch (
|
|
30624
|
+
function WJ({ className: t, file: n }) {
|
|
30625
|
+
switch (UJ(n)) {
|
|
30604
30626
|
case "audio": return /* @__PURE__ */ H(ue, { className: t });
|
|
30605
30627
|
case "code": return /* @__PURE__ */ H(de, { className: t });
|
|
30606
30628
|
case "document": return /* @__PURE__ */ H(e, { className: t });
|
|
@@ -30609,7 +30631,7 @@ function UJ({ className: t, file: n }) {
|
|
|
30609
30631
|
case "other": return /* @__PURE__ */ H(le, { className: t });
|
|
30610
30632
|
}
|
|
30611
30633
|
}
|
|
30612
|
-
function
|
|
30634
|
+
function GJ({ className: e, item: t, onRemove: n, ...r }) {
|
|
30613
30635
|
let i = ee(), a = t.status ?? "idle", o = t.progress !== void 0 && a !== "error";
|
|
30614
30636
|
return /* @__PURE__ */ U(DB, {
|
|
30615
30637
|
variant: "outline",
|
|
@@ -30622,7 +30644,7 @@ function WJ({ className: e, item: t, onRemove: n, ...r }) {
|
|
|
30622
30644
|
/* @__PURE__ */ H(kB, {
|
|
30623
30645
|
"aria-hidden": "true",
|
|
30624
30646
|
className: "text-muted-foreground",
|
|
30625
|
-
children: /* @__PURE__ */ H(
|
|
30647
|
+
children: /* @__PURE__ */ H(WJ, {
|
|
30626
30648
|
file: t.file,
|
|
30627
30649
|
className: "size-5"
|
|
30628
30650
|
})
|
|
@@ -30673,63 +30695,82 @@ function WJ({ className: e, item: t, onRemove: n, ...r }) {
|
|
|
30673
30695
|
}
|
|
30674
30696
|
//#endregion
|
|
30675
30697
|
//#region src/composed/FileUpload/FileUpload.tsx
|
|
30676
|
-
function
|
|
30677
|
-
let c = t !== void 0 && t.length > 0
|
|
30698
|
+
function KJ({ className: e, errors: t, invalid: n, items: r, onFileRemove: i, onFilesAdd: a, onFilesReject: o, ...s }) {
|
|
30699
|
+
let c = k.useRef(null), l = k.useId(), [u, d] = k.useState(""), f = t !== void 0 && t.length > 0, p = (e) => {
|
|
30700
|
+
e.length === 1 ? d(`Added ${e[0].name}`) : e.length > 1 && d(`Added ${e.length} files`), a?.(e);
|
|
30701
|
+
}, m = (e) => {
|
|
30702
|
+
e.length === 1 ? d(`${e[0].file.name} rejected`) : e.length > 1 && d(`${e.length} files rejected`), o?.(e);
|
|
30703
|
+
}, h = (e) => {
|
|
30704
|
+
let t = r.findIndex((t) => t.id === e), n = r[t];
|
|
30705
|
+
n && d(`Removed ${n.file.name}`);
|
|
30706
|
+
let a = r[t + 1] ?? r[t - 1];
|
|
30707
|
+
requestAnimationFrame(a ? () => {
|
|
30708
|
+
Array.from(c.current?.querySelectorAll("[data-file-upload-item-id]") ?? []).find((e) => e.getAttribute("data-file-upload-item-id") === a.id)?.querySelector("button")?.focus();
|
|
30709
|
+
} : () => c.current?.querySelector("[data-slot=\"file-upload-trigger\"]")?.focus()), i?.(e);
|
|
30710
|
+
};
|
|
30678
30711
|
return /* @__PURE__ */ U("div", {
|
|
30712
|
+
ref: c,
|
|
30679
30713
|
"data-slot": "file-upload",
|
|
30680
30714
|
className: q("flex flex-col gap-3", e),
|
|
30681
30715
|
children: [
|
|
30682
30716
|
/* @__PURE__ */ H(_B, {
|
|
30683
30717
|
...s,
|
|
30684
|
-
invalid: n ||
|
|
30685
|
-
|
|
30686
|
-
|
|
30718
|
+
invalid: n || f,
|
|
30719
|
+
describedById: f ? l : void 0,
|
|
30720
|
+
onFilesAccepted: p,
|
|
30721
|
+
onFilesRejected: m
|
|
30687
30722
|
}),
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
children: t.map((e, t) => /* @__PURE__ */ H("li", { children: e }, t))
|
|
30723
|
+
f ? /* @__PURE__ */ H(CR, {
|
|
30724
|
+
id: l,
|
|
30725
|
+
errors: t.map((e) => ({ message: e }))
|
|
30692
30726
|
}) : null,
|
|
30693
30727
|
r.length > 0 ? /* @__PURE__ */ H("ul", {
|
|
30694
30728
|
className: "flex flex-col gap-2",
|
|
30695
|
-
children: r.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(
|
|
30729
|
+
children: r.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(GJ, {
|
|
30696
30730
|
item: e,
|
|
30697
|
-
onRemove:
|
|
30731
|
+
onRemove: h,
|
|
30732
|
+
"data-file-upload-item-id": e.id
|
|
30698
30733
|
}) }, e.id))
|
|
30699
|
-
}) : null
|
|
30734
|
+
}) : null,
|
|
30735
|
+
/* @__PURE__ */ H("div", {
|
|
30736
|
+
role: "status",
|
|
30737
|
+
"aria-live": "polite",
|
|
30738
|
+
className: "sr-only",
|
|
30739
|
+
children: u
|
|
30740
|
+
})
|
|
30700
30741
|
]
|
|
30701
30742
|
});
|
|
30702
30743
|
}
|
|
30703
30744
|
//#endregion
|
|
30704
30745
|
//#region ../../node_modules/react-hook-form/dist/index.esm.mjs
|
|
30705
|
-
var
|
|
30746
|
+
var qJ = (e) => e.type === "checkbox", JJ = (e) => e instanceof Date, YJ = (e) => e == null, XJ = (e) => typeof e == "object", ZJ = (e) => !YJ(e) && !Array.isArray(e) && XJ(e) && !JJ(e), QJ = (e) => ZJ(e) && e.target ? qJ(e.target) ? e.target.checked : e.target.value : e, $J = (e, t) => t.split(".").some((t, n, r) => !isNaN(Number(t)) && e.has(r.slice(0, n).join("."))), eY = (e) => {
|
|
30706
30747
|
let t = e.constructor && e.constructor.prototype;
|
|
30707
|
-
return
|
|
30708
|
-
},
|
|
30709
|
-
function
|
|
30748
|
+
return ZJ(t) && t.hasOwnProperty("isPrototypeOf");
|
|
30749
|
+
}, tY = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
30750
|
+
function nY(e) {
|
|
30710
30751
|
if (e instanceof Date) return new Date(e);
|
|
30711
30752
|
let t = typeof FileList < "u" && e instanceof FileList;
|
|
30712
|
-
if (
|
|
30753
|
+
if (tY && (e instanceof Blob || t)) return e;
|
|
30713
30754
|
let n = Array.isArray(e);
|
|
30714
|
-
if (!n && !(
|
|
30755
|
+
if (!n && !(ZJ(e) && eY(e))) return e;
|
|
30715
30756
|
let r = n ? [] : Object.create(Object.getPrototypeOf(e));
|
|
30716
|
-
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] =
|
|
30757
|
+
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = nY(e[t]));
|
|
30717
30758
|
return r;
|
|
30718
30759
|
}
|
|
30719
|
-
var
|
|
30760
|
+
var rY = {
|
|
30720
30761
|
BLUR: "blur",
|
|
30721
30762
|
FOCUS_OUT: "focusout",
|
|
30722
30763
|
CHANGE: "change",
|
|
30723
30764
|
SUBMIT: "submit",
|
|
30724
30765
|
TRIGGER: "trigger",
|
|
30725
30766
|
VALID: "valid"
|
|
30726
|
-
},
|
|
30767
|
+
}, iY = {
|
|
30727
30768
|
onBlur: "onBlur",
|
|
30728
30769
|
onChange: "onChange",
|
|
30729
30770
|
onSubmit: "onSubmit",
|
|
30730
30771
|
onTouched: "onTouched",
|
|
30731
30772
|
all: "all"
|
|
30732
|
-
},
|
|
30773
|
+
}, aY = {
|
|
30733
30774
|
max: "max",
|
|
30734
30775
|
min: "min",
|
|
30735
30776
|
maxLength: "maxLength",
|
|
@@ -30737,39 +30778,39 @@ var nY = {
|
|
|
30737
30778
|
pattern: "pattern",
|
|
30738
30779
|
required: "required",
|
|
30739
30780
|
validate: "validate"
|
|
30740
|
-
},
|
|
30781
|
+
}, oY = "root", sY = [
|
|
30741
30782
|
"__proto__",
|
|
30742
30783
|
"constructor",
|
|
30743
30784
|
"prototype"
|
|
30744
|
-
],
|
|
30745
|
-
if (!t || !
|
|
30746
|
-
let r =
|
|
30747
|
-
if (r.some((e) =>
|
|
30748
|
-
let i = r.reduce((e, t) =>
|
|
30749
|
-
return
|
|
30750
|
-
},
|
|
30751
|
-
let r = -1, i =
|
|
30785
|
+
], cY = (e) => /^\w*$/.test(e), lY = (e) => e === void 0, uY = (e) => e.split(/[.[\]'"]/g).filter(Boolean), dY = (e, t, n) => {
|
|
30786
|
+
if (!t || !ZJ(e)) return n;
|
|
30787
|
+
let r = cY(t) ? [t] : uY(t);
|
|
30788
|
+
if (r.some((e) => sY.includes(e))) return n;
|
|
30789
|
+
let i = r.reduce((e, t) => YJ(e) ? void 0 : e[t], e);
|
|
30790
|
+
return lY(i) || i === e ? lY(e[t]) ? n : e[t] : i;
|
|
30791
|
+
}, fY = (e) => typeof e == "boolean", pY = (e) => typeof e == "function", mY = (e, t, n) => {
|
|
30792
|
+
let r = -1, i = cY(t) ? [t] : uY(t), a = i.length, o = a - 1;
|
|
30752
30793
|
for (; ++r < a;) {
|
|
30753
30794
|
let t = i[r], a = n;
|
|
30754
30795
|
if (r !== o) {
|
|
30755
30796
|
let n = e[t];
|
|
30756
|
-
a =
|
|
30797
|
+
a = ZJ(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
30757
30798
|
}
|
|
30758
|
-
if (
|
|
30799
|
+
if (sY.includes(t)) return;
|
|
30759
30800
|
e[t] = a, e = e[t];
|
|
30760
30801
|
}
|
|
30761
|
-
},
|
|
30762
|
-
|
|
30763
|
-
var
|
|
30802
|
+
}, hY = A.createContext(null);
|
|
30803
|
+
hY.displayName = "HookFormControlContext";
|
|
30804
|
+
var gY = () => A.useContext(hY), _Y = (e, t, n, r = !0) => {
|
|
30764
30805
|
let i = {};
|
|
30765
30806
|
for (let a in e) Object.defineProperty(i, a, { get: () => {
|
|
30766
30807
|
let i = a;
|
|
30767
|
-
return t._proxyFormState[i] !==
|
|
30808
|
+
return t._proxyFormState[i] !== iY.all && (t._proxyFormState[i] = !r || iY.all), n && (n[i] = !0), e[i];
|
|
30768
30809
|
} });
|
|
30769
30810
|
return i;
|
|
30770
|
-
},
|
|
30771
|
-
function
|
|
30772
|
-
let t =
|
|
30811
|
+
}, vY = tY ? A.useLayoutEffect : A.useEffect;
|
|
30812
|
+
function yY(e) {
|
|
30813
|
+
let t = gY(), { control: n = t, disabled: r, name: i, exact: a } = e || {}, [o, s] = A.useState(() => ({
|
|
30773
30814
|
...n._formState,
|
|
30774
30815
|
defaultValues: n._defaultValues
|
|
30775
30816
|
})), c = A.useRef({
|
|
@@ -30782,7 +30823,7 @@ function vY(e) {
|
|
|
30782
30823
|
isValid: !1,
|
|
30783
30824
|
errors: !1
|
|
30784
30825
|
});
|
|
30785
|
-
return
|
|
30826
|
+
return vY(() => n._subscribe({
|
|
30786
30827
|
name: i,
|
|
30787
30828
|
formState: c.current,
|
|
30788
30829
|
exact: a,
|
|
@@ -30799,16 +30840,16 @@ function vY(e) {
|
|
|
30799
30840
|
a
|
|
30800
30841
|
]), A.useEffect(() => {
|
|
30801
30842
|
c.current.isValid && n._setValid(!0);
|
|
30802
|
-
}, [n]), A.useMemo(() =>
|
|
30843
|
+
}, [n]), A.useMemo(() => _Y(o, n, c.current, !1), [o, n]);
|
|
30803
30844
|
}
|
|
30804
|
-
var
|
|
30805
|
-
function
|
|
30845
|
+
var bY = (e) => typeof e == "string", xY = (e, t, n, r, i) => bY(e) ? (r && t.watch.add(e), dY(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), dY(n, e))) : (r && (t.watchAll = !0), n), SY = (e) => YJ(e) || !XJ(e), CY = (e, t) => t.length === 0 && !Array.isArray(e) && !eY(e);
|
|
30846
|
+
function wY(e, t, n = /* @__PURE__ */ new WeakSet()) {
|
|
30806
30847
|
if (e === t) return !0;
|
|
30807
|
-
if (
|
|
30808
|
-
if (
|
|
30848
|
+
if (SY(e) || SY(t)) return Object.is(e, t);
|
|
30849
|
+
if (JJ(e) && JJ(t)) return Object.is(e.getTime(), t.getTime());
|
|
30809
30850
|
let r = Object.keys(e), i = Object.keys(t);
|
|
30810
30851
|
if (r.length !== i.length) return !1;
|
|
30811
|
-
if (
|
|
30852
|
+
if (CY(e, r) || CY(t, i)) return Object.is(e, t);
|
|
30812
30853
|
if (n.has(e) || n.has(t)) return !0;
|
|
30813
30854
|
n.add(e), n.add(t);
|
|
30814
30855
|
for (let i of r) {
|
|
@@ -30816,19 +30857,19 @@ function CY(e, t, n = /* @__PURE__ */ new WeakSet()) {
|
|
|
30816
30857
|
if (!(i in t)) return !1;
|
|
30817
30858
|
if (i !== "ref") {
|
|
30818
30859
|
let e = t[i];
|
|
30819
|
-
if (
|
|
30860
|
+
if (JJ(r) && JJ(e) || (ZJ(r) || Array.isArray(r)) && (ZJ(e) || Array.isArray(e)) ? !wY(r, e, n) : !Object.is(r, e)) return !1;
|
|
30820
30861
|
}
|
|
30821
30862
|
}
|
|
30822
30863
|
return !0;
|
|
30823
30864
|
}
|
|
30824
|
-
function
|
|
30825
|
-
let t =
|
|
30865
|
+
function TY(e) {
|
|
30866
|
+
let t = gY(), { control: n = t, name: r, defaultValue: i, disabled: a, exact: o, compute: s } = e || {}, c = A.useRef(i), l = A.useRef(s), u = A.useRef(void 0), d = A.useRef(n), f = A.useRef(r);
|
|
30826
30867
|
l.current = s;
|
|
30827
30868
|
let [p, m] = A.useState(() => {
|
|
30828
30869
|
let e = n._getWatch(r, c.current);
|
|
30829
30870
|
return l.current ? l.current(e) : e;
|
|
30830
30871
|
}), h = A.useCallback((e) => {
|
|
30831
|
-
let t =
|
|
30872
|
+
let t = xY(r, n._names, e || n._formValues, !1, c.current);
|
|
30832
30873
|
return l.current ? l.current(t) : t;
|
|
30833
30874
|
}, [
|
|
30834
30875
|
n._formValues,
|
|
@@ -30836,10 +30877,10 @@ function wY(e) {
|
|
|
30836
30877
|
r
|
|
30837
30878
|
]), g = A.useCallback((e) => {
|
|
30838
30879
|
if (!a) {
|
|
30839
|
-
let t =
|
|
30880
|
+
let t = xY(r, n._names, e || n._formValues, !1, c.current);
|
|
30840
30881
|
if (l.current) {
|
|
30841
30882
|
let e = l.current(t);
|
|
30842
|
-
|
|
30883
|
+
wY(e, u.current) || (m(e), u.current = e);
|
|
30843
30884
|
} else m(t);
|
|
30844
30885
|
}
|
|
30845
30886
|
}, [
|
|
@@ -30848,7 +30889,7 @@ function wY(e) {
|
|
|
30848
30889
|
a,
|
|
30849
30890
|
r
|
|
30850
30891
|
]);
|
|
30851
|
-
|
|
30892
|
+
vY(() => ((d.current !== n || !wY(f.current, r)) && (d.current = n, f.current = r, g()), n._subscribe({
|
|
30852
30893
|
name: r,
|
|
30853
30894
|
formState: { values: !0 },
|
|
30854
30895
|
exact: o,
|
|
@@ -30863,7 +30904,7 @@ function wY(e) {
|
|
|
30863
30904
|
]), A.useEffect(() => n._removeUnmounted());
|
|
30864
30905
|
let _ = d.current !== n, v = f.current, y = A.useMemo(() => {
|
|
30865
30906
|
if (a) return null;
|
|
30866
|
-
let e = !_ && !
|
|
30907
|
+
let e = !_ && !wY(v, r);
|
|
30867
30908
|
return _ || e ? h() : null;
|
|
30868
30909
|
}, [
|
|
30869
30910
|
a,
|
|
@@ -30874,77 +30915,77 @@ function wY(e) {
|
|
|
30874
30915
|
]);
|
|
30875
30916
|
return y === null ? p : y;
|
|
30876
30917
|
}
|
|
30877
|
-
function
|
|
30878
|
-
let t =
|
|
30918
|
+
function EY(e) {
|
|
30919
|
+
let t = gY(), { name: n, disabled: r, control: i = t, shouldUnregister: a, defaultValue: o, exact: s = !0 } = e, c = $J(i._names.array, n), l = TY({
|
|
30879
30920
|
control: i,
|
|
30880
30921
|
name: n,
|
|
30881
|
-
defaultValue: A.useMemo(() =>
|
|
30922
|
+
defaultValue: A.useMemo(() => dY(i._formValues, n, dY(i._defaultValues, n, o)), [
|
|
30882
30923
|
i,
|
|
30883
30924
|
n,
|
|
30884
30925
|
o
|
|
30885
30926
|
]),
|
|
30886
30927
|
exact: s
|
|
30887
|
-
}), u =
|
|
30928
|
+
}), u = yY({
|
|
30888
30929
|
control: i,
|
|
30889
30930
|
name: n,
|
|
30890
30931
|
exact: s
|
|
30891
30932
|
}), d = A.useRef(e), f = A.useRef(i.register(n, {
|
|
30892
30933
|
...e.rules,
|
|
30893
30934
|
value: l,
|
|
30894
|
-
...
|
|
30935
|
+
...fY(e.disabled) ? { disabled: e.disabled } : {}
|
|
30895
30936
|
}));
|
|
30896
30937
|
d.current = e;
|
|
30897
30938
|
let p = A.useMemo(() => Object.defineProperties({}, {
|
|
30898
30939
|
invalid: {
|
|
30899
30940
|
enumerable: !0,
|
|
30900
|
-
get: () => !!
|
|
30941
|
+
get: () => !!dY(u.errors, n)
|
|
30901
30942
|
},
|
|
30902
30943
|
isDirty: {
|
|
30903
30944
|
enumerable: !0,
|
|
30904
|
-
get: () => !!
|
|
30945
|
+
get: () => !!dY(u.dirtyFields, n)
|
|
30905
30946
|
},
|
|
30906
30947
|
isTouched: {
|
|
30907
30948
|
enumerable: !0,
|
|
30908
|
-
get: () => !!
|
|
30949
|
+
get: () => !!dY(u.touchedFields, n)
|
|
30909
30950
|
},
|
|
30910
30951
|
isValidating: {
|
|
30911
30952
|
enumerable: !0,
|
|
30912
|
-
get: () => !!
|
|
30953
|
+
get: () => !!dY(u.validatingFields, n)
|
|
30913
30954
|
},
|
|
30914
30955
|
error: {
|
|
30915
30956
|
enumerable: !0,
|
|
30916
|
-
get: () =>
|
|
30957
|
+
get: () => dY(u.errors, n)
|
|
30917
30958
|
}
|
|
30918
30959
|
}), [u, n]), m = A.useCallback((e) => {
|
|
30919
|
-
let t =
|
|
30920
|
-
|
|
30960
|
+
let t = QJ(e);
|
|
30961
|
+
dY(i._fields, n) || (f.current = i.register(n, {
|
|
30921
30962
|
...d.current.rules,
|
|
30922
30963
|
value: t
|
|
30923
30964
|
})), f.current.onChange({
|
|
30924
30965
|
target: {
|
|
30925
|
-
value:
|
|
30966
|
+
value: QJ(e),
|
|
30926
30967
|
name: n
|
|
30927
30968
|
},
|
|
30928
|
-
type:
|
|
30969
|
+
type: rY.CHANGE
|
|
30929
30970
|
});
|
|
30930
30971
|
}, [n, i]), h = A.useCallback(() => f.current.onBlur({
|
|
30931
30972
|
target: {
|
|
30932
|
-
value:
|
|
30973
|
+
value: dY(i._formValues, n),
|
|
30933
30974
|
name: n
|
|
30934
30975
|
},
|
|
30935
|
-
type:
|
|
30976
|
+
type: rY.BLUR
|
|
30936
30977
|
}), [n, i._formValues]), g = A.useCallback((e) => {
|
|
30937
|
-
let t =
|
|
30978
|
+
let t = dY(i._fields, n);
|
|
30938
30979
|
t && t._f && e && (t._f.ref = {
|
|
30939
|
-
focus: () =>
|
|
30940
|
-
select: () =>
|
|
30941
|
-
setCustomValidity: (t) =>
|
|
30942
|
-
reportValidity: () =>
|
|
30980
|
+
focus: () => pY(e.focus) && e.focus(),
|
|
30981
|
+
select: () => pY(e.select) && e.select(),
|
|
30982
|
+
setCustomValidity: (t) => pY(e.setCustomValidity) && e.setCustomValidity(t),
|
|
30983
|
+
reportValidity: () => pY(e.reportValidity) && e.reportValidity()
|
|
30943
30984
|
});
|
|
30944
30985
|
}, [i._fields, n]), _ = A.useMemo(() => ({
|
|
30945
30986
|
name: n,
|
|
30946
30987
|
value: l,
|
|
30947
|
-
...
|
|
30988
|
+
...fY(r) || u.disabled ? { disabled: u.disabled || r } : {},
|
|
30948
30989
|
onChange: m,
|
|
30949
30990
|
onBlur: h,
|
|
30950
30991
|
ref: g
|
|
@@ -30961,15 +31002,15 @@ function TY(e) {
|
|
|
30961
31002
|
let e = i._options.shouldUnregister || a;
|
|
30962
31003
|
i.register(n, {
|
|
30963
31004
|
...d.current.rules,
|
|
30964
|
-
...
|
|
31005
|
+
...fY(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
30965
31006
|
});
|
|
30966
31007
|
let t = (e, t) => {
|
|
30967
|
-
let n =
|
|
31008
|
+
let n = dY(i._fields, e);
|
|
30968
31009
|
n && n._f && (n._f.mount = t);
|
|
30969
31010
|
};
|
|
30970
31011
|
if (t(n, !0), e) {
|
|
30971
|
-
let e =
|
|
30972
|
-
|
|
31012
|
+
let e = nY(dY(a ? i._defaultValues : i._options.values || i._defaultValues, n, dY(i._options.defaultValues, n, d.current.defaultValue)));
|
|
31013
|
+
mY(i._defaultValues, n, e), lY(dY(i._formValues, n)) && mY(i._formValues, n, e);
|
|
30973
31014
|
}
|
|
30974
31015
|
return !c && i.register(n), () => {
|
|
30975
31016
|
(c ? e && !i._state.action : e) ? i.unregister(n) : t(n, !1);
|
|
@@ -30998,23 +31039,23 @@ function TY(e) {
|
|
|
30998
31039
|
p
|
|
30999
31040
|
]);
|
|
31000
31041
|
}
|
|
31001
|
-
var
|
|
31002
|
-
|
|
31003
|
-
var
|
|
31042
|
+
var DY = A.createContext(null);
|
|
31043
|
+
DY.displayName = "HookFormContext";
|
|
31044
|
+
var OY = (e, t, n, r, i) => t ? {
|
|
31004
31045
|
...n[e],
|
|
31005
31046
|
types: {
|
|
31006
31047
|
...n[e] && n[e].types ? n[e].types : {},
|
|
31007
31048
|
[r]: i || !0
|
|
31008
31049
|
}
|
|
31009
|
-
} : {},
|
|
31010
|
-
if (!
|
|
31050
|
+
} : {}, kY = (e) => Array.isArray(e) ? e.filter(Boolean) : [], AY = (e) => Array.isArray(e) ? e : [e], jY = (e) => ZJ(e) && !Object.keys(e).length, MY = (e) => e.type === "file", NY = (e) => {
|
|
31051
|
+
if (!tY) return !1;
|
|
31011
31052
|
let t = e ? e.ownerDocument : 0;
|
|
31012
31053
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
31013
|
-
},
|
|
31014
|
-
function
|
|
31054
|
+
}, PY = (e) => e.type === "radio";
|
|
31055
|
+
function FY(e, t) {
|
|
31015
31056
|
let n = t.slice(0, -1).length, r = 0;
|
|
31016
31057
|
for (; r < n;) {
|
|
31017
|
-
if (
|
|
31058
|
+
if (YJ(e)) {
|
|
31018
31059
|
e = void 0;
|
|
31019
31060
|
break;
|
|
31020
31061
|
}
|
|
@@ -31022,22 +31063,22 @@ function PY(e, t) {
|
|
|
31022
31063
|
}
|
|
31023
31064
|
return e;
|
|
31024
31065
|
}
|
|
31025
|
-
function
|
|
31026
|
-
for (let t in e) if (e.hasOwnProperty(t) && !
|
|
31066
|
+
function IY(e) {
|
|
31067
|
+
for (let t in e) if (e.hasOwnProperty(t) && !lY(e[t])) return !1;
|
|
31027
31068
|
return !0;
|
|
31028
31069
|
}
|
|
31029
|
-
function
|
|
31030
|
-
if (
|
|
31031
|
-
let n = Array.isArray(t) ? t :
|
|
31032
|
-
return r && delete r[a], i !== 0 && (
|
|
31070
|
+
function LY(e, t) {
|
|
31071
|
+
if (bY(t) && Object.prototype.hasOwnProperty.call(e, t)) return delete e[t], e;
|
|
31072
|
+
let n = Array.isArray(t) ? t : cY(t) ? [t] : uY(t), r = n.length === 1 ? e : FY(e, n), i = n.length - 1, a = n[i];
|
|
31073
|
+
return r && delete r[a], i !== 0 && (ZJ(r) && jY(r) || Array.isArray(r) && IY(r)) && LY(e, n.slice(0, -1)), e;
|
|
31033
31074
|
}
|
|
31034
|
-
var
|
|
31075
|
+
var RY = {
|
|
31035
31076
|
value: !1,
|
|
31036
31077
|
isValid: !1
|
|
31037
|
-
},
|
|
31078
|
+
}, zY = {
|
|
31038
31079
|
value: !0,
|
|
31039
31080
|
isValid: !0
|
|
31040
|
-
},
|
|
31081
|
+
}, BY = (e) => {
|
|
31041
31082
|
if (Array.isArray(e)) {
|
|
31042
31083
|
if (e.length > 1) {
|
|
31043
31084
|
let t = e.filter((e) => e && e.checked && !e.disabled).map((e) => e.value);
|
|
@@ -31046,55 +31087,55 @@ var LY = {
|
|
|
31046
31087
|
isValid: !!t.length
|
|
31047
31088
|
};
|
|
31048
31089
|
}
|
|
31049
|
-
return e[0].checked && !e[0].disabled ? e[0].attributes && !
|
|
31090
|
+
return e[0].checked && !e[0].disabled ? e[0].attributes && !lY(e[0].attributes.value) ? lY(e[0].value) || e[0].value === "" ? zY : {
|
|
31050
31091
|
value: e[0].value,
|
|
31051
31092
|
isValid: !0
|
|
31052
|
-
} :
|
|
31093
|
+
} : zY : RY;
|
|
31053
31094
|
}
|
|
31054
|
-
return
|
|
31055
|
-
},
|
|
31095
|
+
return RY;
|
|
31096
|
+
}, VY = {
|
|
31056
31097
|
isValid: !1,
|
|
31057
31098
|
value: null
|
|
31058
|
-
},
|
|
31099
|
+
}, HY = (e) => Array.isArray(e) ? e.reduce((e, t) => t && t.checked && !t.disabled ? {
|
|
31059
31100
|
isValid: !0,
|
|
31060
31101
|
value: t.value
|
|
31061
|
-
} : e,
|
|
31062
|
-
isOnSubmit: !e || e ===
|
|
31063
|
-
isOnBlur: e ===
|
|
31064
|
-
isOnChange: e ===
|
|
31065
|
-
isOnAll: e ===
|
|
31066
|
-
isOnTouch: e ===
|
|
31067
|
-
}),
|
|
31102
|
+
} : e, VY) : VY, UY = (e) => e instanceof RegExp, WY = (e) => ({
|
|
31103
|
+
isOnSubmit: !e || e === iY.onSubmit,
|
|
31104
|
+
isOnBlur: e === iY.onBlur,
|
|
31105
|
+
isOnChange: e === iY.onChange,
|
|
31106
|
+
isOnAll: e === iY.all,
|
|
31107
|
+
isOnTouch: e === iY.onTouched
|
|
31108
|
+
}), GY = (e, t, n) => !n && (t.watchAll || t.watch.has(e) || [...t.watch].some((t) => e.startsWith(`${t}.`))), KY = (e, t, n, r) => {
|
|
31068
31109
|
for (let i of n || Object.keys(e)) {
|
|
31069
|
-
let n =
|
|
31110
|
+
let n = dY(e, i);
|
|
31070
31111
|
if (n) {
|
|
31071
31112
|
let { _f: e, ...a } = n;
|
|
31072
31113
|
if (e) {
|
|
31073
31114
|
if (e.refs && e.refs[0] && t(e.refs[0], i) && !r || e.ref && t(e.ref, e.name) && !r) return !0;
|
|
31074
|
-
if (
|
|
31075
|
-
} else if (
|
|
31115
|
+
if (KY(a, t)) break;
|
|
31116
|
+
} else if (ZJ(a) && KY(a, t)) break;
|
|
31076
31117
|
}
|
|
31077
31118
|
}
|
|
31078
|
-
},
|
|
31079
|
-
let r =
|
|
31080
|
-
return
|
|
31119
|
+
}, qY = (e, t, n) => {
|
|
31120
|
+
let r = dY(e, n), i = Array.isArray(r) ? r : [];
|
|
31121
|
+
return mY(i, oY, t[n]), mY(e, n, i), e;
|
|
31081
31122
|
};
|
|
31082
|
-
function
|
|
31083
|
-
if (
|
|
31123
|
+
function JY(e, t, n = "validate") {
|
|
31124
|
+
if (bY(e) || Array.isArray(e) && e.every(bY) || fY(e) && !e) return {
|
|
31084
31125
|
type: n,
|
|
31085
|
-
message:
|
|
31126
|
+
message: bY(e) ? e : "",
|
|
31086
31127
|
ref: t
|
|
31087
31128
|
};
|
|
31088
31129
|
}
|
|
31089
|
-
var
|
|
31130
|
+
var YY = (e) => ZJ(e) && !UY(e) ? e : {
|
|
31090
31131
|
value: e,
|
|
31091
31132
|
message: ""
|
|
31092
|
-
},
|
|
31093
|
-
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v =
|
|
31133
|
+
}, XY = async (e, t, n, r, i, a) => {
|
|
31134
|
+
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v = dY(n, h);
|
|
31094
31135
|
if (!_ || t.has(h)) return {};
|
|
31095
31136
|
let y = s ? s[0] : o, b = (e) => {
|
|
31096
|
-
i && y.reportValidity && (y.setCustomValidity(
|
|
31097
|
-
}, x = {}, S =
|
|
31137
|
+
i && y.reportValidity && (y.setCustomValidity(fY(e) ? "" : e || ""), y.reportValidity());
|
|
31138
|
+
}, x = {}, S = PY(o), C = qJ(o), w = S || C, T = (g || MY(o)) && lY(o.value) && lY(v) || NY(o) && o.value === "" || v === "" || Array.isArray(v) && !v.length, E = OY.bind(null, h, r, x), D = (e, t, n, r = aY.maxLength, i = aY.minLength) => {
|
|
31098
31139
|
let a = e ? t : n;
|
|
31099
31140
|
x[h] = {
|
|
31100
31141
|
type: e ? r : i,
|
|
@@ -31103,60 +31144,60 @@ var JY = (e) => XJ(e) && !HY(e) ? e : {
|
|
|
31103
31144
|
...E(e ? r : i, a)
|
|
31104
31145
|
};
|
|
31105
31146
|
};
|
|
31106
|
-
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T ||
|
|
31107
|
-
let { value: e, message: t } =
|
|
31147
|
+
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T || YJ(v)) || fY(v) && !v || C && !BY(s).isValid || S && !HY(s).isValid)) {
|
|
31148
|
+
let { value: e, message: t } = bY(c) ? {
|
|
31108
31149
|
value: !!c,
|
|
31109
31150
|
message: c
|
|
31110
|
-
} :
|
|
31151
|
+
} : YY(c);
|
|
31111
31152
|
if (e && (x[h] = {
|
|
31112
|
-
type:
|
|
31153
|
+
type: aY.required,
|
|
31113
31154
|
message: t,
|
|
31114
31155
|
ref: y,
|
|
31115
|
-
...E(
|
|
31156
|
+
...E(aY.required, t)
|
|
31116
31157
|
}, !r)) return b(t), x;
|
|
31117
31158
|
}
|
|
31118
|
-
if (!T && (!
|
|
31119
|
-
let e, t, n =
|
|
31120
|
-
if (!
|
|
31159
|
+
if (!T && (!YJ(d) || !YJ(f))) {
|
|
31160
|
+
let e, t, n = YY(f), i = YY(d);
|
|
31161
|
+
if (!YJ(v) && !isNaN(v)) {
|
|
31121
31162
|
let r = o.valueAsNumber || v && +v;
|
|
31122
|
-
|
|
31163
|
+
YJ(n.value) || (e = r > n.value), YJ(i.value) || (t = r < i.value);
|
|
31123
31164
|
} else {
|
|
31124
31165
|
let r = o.valueAsDate || new Date(v), a = (e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + e), s = o.type == "time", c = o.type == "week";
|
|
31125
|
-
|
|
31166
|
+
bY(n.value) && v && (e = s ? a(v) > a(n.value) : c ? v > n.value : r > new Date(n.value)), bY(i.value) && v && (t = s ? a(v) < a(i.value) : c ? v < i.value : r < new Date(i.value));
|
|
31126
31167
|
}
|
|
31127
|
-
if ((e || t) && (D(!!e, n.message, i.message,
|
|
31168
|
+
if ((e || t) && (D(!!e, n.message, i.message, aY.max, aY.min), !r)) return b(x[h].message), x;
|
|
31128
31169
|
}
|
|
31129
|
-
if ((l || u) && !T && (
|
|
31130
|
-
let e =
|
|
31170
|
+
if ((l || u) && !T && (bY(v) || a && Array.isArray(v))) {
|
|
31171
|
+
let e = YY(l), t = YY(u), n = !YJ(e.value) && v.length > +e.value, i = !YJ(t.value) && v.length < +t.value;
|
|
31131
31172
|
if ((n || i) && (D(n, e.message, t.message), !r)) return b(x[h].message), x;
|
|
31132
31173
|
}
|
|
31133
|
-
if (p && !T &&
|
|
31134
|
-
let { value: e, message: t } =
|
|
31135
|
-
if (
|
|
31136
|
-
type:
|
|
31174
|
+
if (p && !T && bY(v)) {
|
|
31175
|
+
let { value: e, message: t } = YY(p);
|
|
31176
|
+
if (UY(e) && !v.match(e) && (x[h] = {
|
|
31177
|
+
type: aY.pattern,
|
|
31137
31178
|
message: t,
|
|
31138
31179
|
ref: o,
|
|
31139
|
-
...E(
|
|
31180
|
+
...E(aY.pattern, t)
|
|
31140
31181
|
}, !r)) return b(t), x;
|
|
31141
31182
|
}
|
|
31142
31183
|
if (m) {
|
|
31143
|
-
if (
|
|
31144
|
-
let e =
|
|
31184
|
+
if (pY(m)) {
|
|
31185
|
+
let e = JY(await m(v, n), y);
|
|
31145
31186
|
if (e && (x[h] = {
|
|
31146
31187
|
...e,
|
|
31147
|
-
...E(
|
|
31188
|
+
...E(aY.validate, e.message)
|
|
31148
31189
|
}, !r)) return b(e.message), x;
|
|
31149
|
-
} else if (
|
|
31190
|
+
} else if (ZJ(m)) {
|
|
31150
31191
|
let e = {};
|
|
31151
31192
|
for (let t in m) {
|
|
31152
|
-
if (!
|
|
31153
|
-
let i =
|
|
31193
|
+
if (!jY(e) && !r) break;
|
|
31194
|
+
let i = JY(await m[t](v, n), y, t);
|
|
31154
31195
|
i && (e = {
|
|
31155
31196
|
...i,
|
|
31156
31197
|
...E(t, i.message)
|
|
31157
31198
|
}, b(i.message), r && (x[h] = e));
|
|
31158
31199
|
}
|
|
31159
|
-
if (!
|
|
31200
|
+
if (!jY(e) && (x[h] = {
|
|
31160
31201
|
ref: y,
|
|
31161
31202
|
...e
|
|
31162
31203
|
}, !r)) return x;
|
|
@@ -31164,76 +31205,76 @@ var JY = (e) => XJ(e) && !HY(e) ? e : {
|
|
|
31164
31205
|
}
|
|
31165
31206
|
return b(!0), x;
|
|
31166
31207
|
};
|
|
31167
|
-
|
|
31168
|
-
var
|
|
31208
|
+
iY.onSubmit, iY.onChange;
|
|
31209
|
+
var ZY = () => {
|
|
31169
31210
|
if (typeof crypto < "u" && crypto.randomUUID) return crypto.randomUUID();
|
|
31170
31211
|
let e = typeof performance > "u" ? Date.now() : performance.now() * 1e3;
|
|
31171
31212
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
31172
31213
|
let n = (Math.random() * 16 + e) % 16 | 0;
|
|
31173
31214
|
return (t == "x" ? n : n & 3 | 8).toString(16);
|
|
31174
31215
|
});
|
|
31175
|
-
},
|
|
31176
|
-
function
|
|
31216
|
+
}, QY = (e, t, n = {}) => n.shouldFocus || lY(n.shouldFocus) ? n.focusName || `${e}.${lY(n.focusIndex) ? t : n.focusIndex}.` : "", $Y = (e, t) => [...e, ...AY(t)], eX = (e) => Array.isArray(e) ? e.map(() => void 0) : void 0;
|
|
31217
|
+
function tX(e, t, n) {
|
|
31177
31218
|
return [
|
|
31178
31219
|
...e.slice(0, t),
|
|
31179
|
-
...
|
|
31220
|
+
...AY(n),
|
|
31180
31221
|
...e.slice(t)
|
|
31181
31222
|
];
|
|
31182
31223
|
}
|
|
31183
|
-
var
|
|
31184
|
-
function
|
|
31224
|
+
var nX = (e, t, n) => Array.isArray(e) ? (lY(e[n]) && (e[n] = void 0), e.splice(n, 0, e.splice(t, 1)[0]), e) : [], rX = (e, t) => [...AY(t), ...AY(e)];
|
|
31225
|
+
function iX(e, t) {
|
|
31185
31226
|
let n = 0, r = [...e];
|
|
31186
31227
|
for (let e of t) r.splice(e - n, 1), n++;
|
|
31187
|
-
return
|
|
31228
|
+
return kY(r).length ? r : [];
|
|
31188
31229
|
}
|
|
31189
|
-
var
|
|
31230
|
+
var aX = (e, t) => lY(t) ? [] : iX(e, AY(t).sort((e, t) => e - t)), oX = (e, t, n) => {
|
|
31190
31231
|
[e[t], e[n]] = [e[n], e[t]];
|
|
31191
|
-
},
|
|
31192
|
-
function
|
|
31193
|
-
let t =
|
|
31232
|
+
}, sX = (e, t, n) => (e[t] = n, e);
|
|
31233
|
+
function cX(e) {
|
|
31234
|
+
let t = gY(), { control: n = t, name: r, keyName: i = "id", shouldUnregister: a, rules: o } = e, [s, c] = A.useState(n._getFieldArray(r)), l = A.useRef(n._getFieldArray(r).map(ZY)), u = A.useRef(!1);
|
|
31194
31235
|
n._names.array.add(r), A.useMemo(() => o && s.length >= 0 && n.register(r, o), [
|
|
31195
31236
|
n,
|
|
31196
31237
|
r,
|
|
31197
31238
|
s.length,
|
|
31198
31239
|
o
|
|
31199
|
-
]),
|
|
31240
|
+
]), vY(() => n._subjects.array.subscribe({ next: ({ values: e, name: t }) => {
|
|
31200
31241
|
if (t === r || !t) {
|
|
31201
|
-
let n =
|
|
31202
|
-
Array.isArray(n) ? (c(n), l.current = n.map(
|
|
31242
|
+
let n = dY(e, r);
|
|
31243
|
+
Array.isArray(n) ? (c(n), l.current = n.map(ZY)) : t || (c([]), l.current = []);
|
|
31203
31244
|
}
|
|
31204
31245
|
} }).unsubscribe, [n, r]);
|
|
31205
31246
|
let d = A.useCallback((e) => {
|
|
31206
31247
|
u.current = !0, n._setFieldArray(r, e);
|
|
31207
31248
|
}, [n, r]);
|
|
31208
31249
|
return A.useEffect(() => {
|
|
31209
|
-
n._state.action = !1,
|
|
31210
|
-
let e =
|
|
31211
|
-
if (u.current && (!e.isOnSubmit || n._formState.isSubmitted) && !
|
|
31250
|
+
n._state.action = !1, GY(r, n._names) && n._subjects.state.next({ ...n._formState });
|
|
31251
|
+
let e = WY(n._options.mode);
|
|
31252
|
+
if (u.current && (!e.isOnSubmit || n._formState.isSubmitted) && !WY(n._options.reValidateMode).isOnSubmit && !e.isOnBlur) if (n._options.resolver) n._runSchema([r]).then((e) => {
|
|
31212
31253
|
n._updateIsValidating([r]);
|
|
31213
|
-
let t =
|
|
31214
|
-
(i ? !t && i.type || t && (i.type !== t.type || i.message !== t.message) : t && t.type) && (t ?
|
|
31254
|
+
let t = dY(e.errors, r), i = dY(n._formState.errors, r);
|
|
31255
|
+
(i ? !t && i.type || t && (i.type !== t.type || i.message !== t.message) : t && t.type) && (t ? mY(n._formState.errors, r, t) : LY(n._formState.errors, r), n._subjects.state.next({ errors: n._formState.errors }));
|
|
31215
31256
|
});
|
|
31216
31257
|
else {
|
|
31217
|
-
let e =
|
|
31218
|
-
e && e._f && !(
|
|
31258
|
+
let e = dY(n._fields, r);
|
|
31259
|
+
e && e._f && !(WY(n._options.reValidateMode).isOnSubmit && WY(n._options.mode).isOnSubmit) && XY(e, n._names.disabled, n._formValues, n._options.criteriaMode === iY.all, n._options.shouldUseNativeValidation, !0).then((e) => !jY(e) && n._subjects.state.next({ errors: qY(n._formState.errors, e, r) }));
|
|
31219
31260
|
}
|
|
31220
31261
|
n._subjects.state.next({
|
|
31221
31262
|
name: r,
|
|
31222
|
-
values:
|
|
31223
|
-
}), n._names.focus &&
|
|
31263
|
+
values: nY(n._formValues)
|
|
31264
|
+
}), n._names.focus && KY(n._fields, (e, t) => {
|
|
31224
31265
|
if (n._names.focus && t.startsWith(n._names.focus) && e.focus) return e.focus(), 1;
|
|
31225
31266
|
}), n._names.focus = "", n._setValid(), u.current = !1;
|
|
31226
31267
|
}, [
|
|
31227
31268
|
s,
|
|
31228
31269
|
r,
|
|
31229
31270
|
n
|
|
31230
|
-
]), A.useEffect(() => (!
|
|
31271
|
+
]), A.useEffect(() => (!dY(n._formValues, r) && n._setFieldArray(r), () => {
|
|
31231
31272
|
let e = !(n._options.shouldUnregister || a);
|
|
31232
31273
|
u.current && e && n._subjects.state.next({
|
|
31233
31274
|
name: r,
|
|
31234
|
-
values:
|
|
31275
|
+
values: nY(n._formValues)
|
|
31235
31276
|
}), e ? ((e, t) => {
|
|
31236
|
-
let r =
|
|
31277
|
+
let r = dY(n._fields, e);
|
|
31237
31278
|
r && r._f && (r._f.mount = t);
|
|
31238
31279
|
})(r, !1) : n.unregister(r);
|
|
31239
31280
|
}), [
|
|
@@ -31244,7 +31285,7 @@ function sX(e) {
|
|
|
31244
31285
|
]), {
|
|
31245
31286
|
swap: A.useCallback((e, t) => {
|
|
31246
31287
|
let i = n._getFieldArray(r);
|
|
31247
|
-
|
|
31288
|
+
oX(i, e, t), oX(l.current, e, t), d(i), c(i), n._setFieldArray(r, i, oX, {
|
|
31248
31289
|
argA: e,
|
|
31249
31290
|
argB: t
|
|
31250
31291
|
}, !1);
|
|
@@ -31255,7 +31296,7 @@ function sX(e) {
|
|
|
31255
31296
|
]),
|
|
31256
31297
|
move: A.useCallback((e, t) => {
|
|
31257
31298
|
let i = n._getFieldArray(r);
|
|
31258
|
-
|
|
31299
|
+
nX(i, e, t), nX(l.current, e, t), d(i), c(i), n._setFieldArray(r, i, nX, {
|
|
31259
31300
|
argA: e,
|
|
31260
31301
|
argB: t
|
|
31261
31302
|
}, !1);
|
|
@@ -31265,34 +31306,34 @@ function sX(e) {
|
|
|
31265
31306
|
n
|
|
31266
31307
|
]),
|
|
31267
31308
|
prepend: A.useCallback((e, t) => {
|
|
31268
|
-
let i =
|
|
31269
|
-
n._names.focus =
|
|
31309
|
+
let i = AY(nY(e)), a = rX(n._getFieldArray(r), i);
|
|
31310
|
+
n._names.focus = QY(r, 0, t), l.current = rX(l.current, i.map(ZY)), d(a), c(a), n._setFieldArray(r, a, rX, { argA: eX(e) });
|
|
31270
31311
|
}, [
|
|
31271
31312
|
d,
|
|
31272
31313
|
r,
|
|
31273
31314
|
n
|
|
31274
31315
|
]),
|
|
31275
31316
|
append: A.useCallback((e, t) => {
|
|
31276
|
-
let i =
|
|
31277
|
-
n._names.focus =
|
|
31317
|
+
let i = AY(nY(e)), a = $Y(n._getFieldArray(r), i);
|
|
31318
|
+
n._names.focus = QY(r, a.length - 1, t), l.current = $Y(l.current, i.map(ZY)), d(a), c(a), n._setFieldArray(r, a, $Y, { argA: eX(e) });
|
|
31278
31319
|
}, [
|
|
31279
31320
|
d,
|
|
31280
31321
|
r,
|
|
31281
31322
|
n
|
|
31282
31323
|
]),
|
|
31283
31324
|
remove: A.useCallback((e) => {
|
|
31284
|
-
let t =
|
|
31285
|
-
l.current =
|
|
31325
|
+
let t = aX(n._getFieldArray(r), e);
|
|
31326
|
+
l.current = aX(l.current, e), d(t), c(t), !Array.isArray(dY(n._fields, r)) && mY(n._fields, r, void 0), n._setFieldArray(r, t, aX, { argA: e });
|
|
31286
31327
|
}, [
|
|
31287
31328
|
d,
|
|
31288
31329
|
r,
|
|
31289
31330
|
n
|
|
31290
31331
|
]),
|
|
31291
31332
|
insert: A.useCallback((e, t, i) => {
|
|
31292
|
-
let a =
|
|
31293
|
-
n._names.focus =
|
|
31333
|
+
let a = AY(nY(t)), o = tX(n._getFieldArray(r), e, a);
|
|
31334
|
+
n._names.focus = QY(r, e, i), l.current = tX(l.current, e, a.map(ZY)), d(o), c(o), n._setFieldArray(r, o, tX, {
|
|
31294
31335
|
argA: e,
|
|
31295
|
-
argB:
|
|
31336
|
+
argB: eX(t)
|
|
31296
31337
|
});
|
|
31297
31338
|
}, [
|
|
31298
31339
|
d,
|
|
@@ -31300,8 +31341,8 @@ function sX(e) {
|
|
|
31300
31341
|
n
|
|
31301
31342
|
]),
|
|
31302
31343
|
update: A.useCallback((e, t) => {
|
|
31303
|
-
let i =
|
|
31304
|
-
l.current = [...a].map((t, n) => !t || n === e ?
|
|
31344
|
+
let i = nY(t), a = sX(n._getFieldArray(r), e, i);
|
|
31345
|
+
l.current = [...a].map((t, n) => !t || n === e ? ZY() : l.current[n]), d(a), c([...a]), n._setFieldArray(r, a, sX, {
|
|
31305
31346
|
argA: e,
|
|
31306
31347
|
argB: i
|
|
31307
31348
|
}, !0, !1);
|
|
@@ -31311,8 +31352,8 @@ function sX(e) {
|
|
|
31311
31352
|
n
|
|
31312
31353
|
]),
|
|
31313
31354
|
replace: A.useCallback((e) => {
|
|
31314
|
-
let t =
|
|
31315
|
-
l.current = t.map(
|
|
31355
|
+
let t = AY(nY(e));
|
|
31356
|
+
l.current = t.map(ZY), d([...t]), c([...t]), n._setFieldArray(r, [...t], (e) => e, {}, !0, !1);
|
|
31316
31357
|
}, [
|
|
31317
31358
|
d,
|
|
31318
31359
|
r,
|
|
@@ -31320,21 +31361,21 @@ function sX(e) {
|
|
|
31320
31361
|
]),
|
|
31321
31362
|
fields: A.useMemo(() => s.map((e, t) => ({
|
|
31322
31363
|
...e,
|
|
31323
|
-
[i]: l.current[t] ||
|
|
31364
|
+
[i]: l.current[t] || ZY()
|
|
31324
31365
|
})), [s, i])
|
|
31325
31366
|
};
|
|
31326
31367
|
}
|
|
31327
31368
|
//#endregion
|
|
31328
31369
|
//#region src/composed/JsonSchemaForm/models/JsonSchemaFormContext.ts
|
|
31329
|
-
var
|
|
31330
|
-
function
|
|
31331
|
-
let e = I(
|
|
31370
|
+
var lX = M(null);
|
|
31371
|
+
function uX() {
|
|
31372
|
+
let e = I(lX);
|
|
31332
31373
|
if (e === null) throw Error("useJsonSchemaFormContext must be used within a <JsonSchemaForm>");
|
|
31333
31374
|
return e;
|
|
31334
31375
|
}
|
|
31335
31376
|
//#endregion
|
|
31336
31377
|
//#region src/composed/JsonSchemaForm/conditional/evalCondition.ts
|
|
31337
|
-
function
|
|
31378
|
+
function dX(e, t) {
|
|
31338
31379
|
if (e.$eq.size === 0) return !0;
|
|
31339
31380
|
for (let [n, r] of e.$eq) {
|
|
31340
31381
|
let e = t.get(n);
|
|
@@ -31344,11 +31385,11 @@ function uX(e, t) {
|
|
|
31344
31385
|
}
|
|
31345
31386
|
//#endregion
|
|
31346
31387
|
//#region src/composed/JsonSchemaForm/conditional/ConditionalGate.tsx
|
|
31347
|
-
function
|
|
31348
|
-
let { control: r } =
|
|
31388
|
+
function fX({ condition: e, unregisterOnHide: t, children: n }) {
|
|
31389
|
+
let { control: r } = uX(), i = B(() => Array.from(e.$eq.keys()), [e]), a = TY({
|
|
31349
31390
|
control: r,
|
|
31350
31391
|
name: i
|
|
31351
|
-
}), o =
|
|
31392
|
+
}), o = dX(e, B(() => {
|
|
31352
31393
|
let e = /* @__PURE__ */ new Map();
|
|
31353
31394
|
if (i.length === 0) return e;
|
|
31354
31395
|
let t = Array.isArray(a) ? a : [a];
|
|
@@ -31364,15 +31405,15 @@ function dX({ condition: e, unregisterOnHide: t, children: n }) {
|
|
|
31364
31405
|
}
|
|
31365
31406
|
//#endregion
|
|
31366
31407
|
//#region src/composed/JsonSchemaForm/conditional/DisabledGate.tsx
|
|
31367
|
-
function
|
|
31368
|
-
let n =
|
|
31408
|
+
function pX({ condition: e, children: t }) {
|
|
31409
|
+
let n = uX(), r = B(() => Array.from(e.$eq.keys()), [e]), i = TY({
|
|
31369
31410
|
control: n.control,
|
|
31370
31411
|
name: r
|
|
31371
31412
|
});
|
|
31372
|
-
return
|
|
31413
|
+
return dX(e, B(() => {
|
|
31373
31414
|
let e = /* @__PURE__ */ new Map(), t = Array.isArray(i) ? i : [i];
|
|
31374
31415
|
return r.forEach((n, r) => e.set(n, t[r])), e;
|
|
31375
|
-
}, [r, i])) ? /* @__PURE__ */ H(
|
|
31416
|
+
}, [r, i])) ? /* @__PURE__ */ H(lX.Provider, {
|
|
31376
31417
|
value: {
|
|
31377
31418
|
...n,
|
|
31378
31419
|
disabled: !0
|
|
@@ -31382,7 +31423,7 @@ function fX({ condition: e, children: t }) {
|
|
|
31382
31423
|
}
|
|
31383
31424
|
//#endregion
|
|
31384
31425
|
//#region src/composed/JsonSchemaForm/conditional/concretizePath.ts
|
|
31385
|
-
function
|
|
31426
|
+
function mX(e, t) {
|
|
31386
31427
|
return e.split(".").map((e, n) => {
|
|
31387
31428
|
let r = t[n];
|
|
31388
31429
|
return e === "*" && r !== void 0 && /^\d+$/.test(r) ? r : e;
|
|
@@ -31390,13 +31431,13 @@ function pX(e, t) {
|
|
|
31390
31431
|
}
|
|
31391
31432
|
//#endregion
|
|
31392
31433
|
//#region src/composed/JsonSchemaForm/conditional/concretizeCondition.ts
|
|
31393
|
-
function
|
|
31434
|
+
function hX(e, t) {
|
|
31394
31435
|
let n = t === "" ? [] : t.split(".");
|
|
31395
|
-
return { $eq: new Map([...e.$eq].map(([e, t]) => [
|
|
31436
|
+
return { $eq: new Map([...e.$eq].map(([e, t]) => [mX(e, n), t])) };
|
|
31396
31437
|
}
|
|
31397
31438
|
//#endregion
|
|
31398
31439
|
//#region src/composed/JsonSchemaForm/schema/preprocess/walkDependencies.ts
|
|
31399
|
-
function
|
|
31440
|
+
function gX(e, t) {
|
|
31400
31441
|
if (!e) return e;
|
|
31401
31442
|
let n = {};
|
|
31402
31443
|
for (let [r, i] of Object.entries(e)) n[r] = Array.isArray(i) ? i : t(i);
|
|
@@ -31404,17 +31445,17 @@ function hX(e, t) {
|
|
|
31404
31445
|
}
|
|
31405
31446
|
//#endregion
|
|
31406
31447
|
//#region src/composed/JsonSchemaForm/schema/preprocess/mergeAllOf.ts
|
|
31407
|
-
function gX(e) {
|
|
31408
|
-
return _X(e);
|
|
31409
|
-
}
|
|
31410
31448
|
function _X(e) {
|
|
31411
|
-
return
|
|
31449
|
+
return vX(e);
|
|
31412
31450
|
}
|
|
31413
31451
|
function vX(e) {
|
|
31452
|
+
return bX(yX({ ...e }));
|
|
31453
|
+
}
|
|
31454
|
+
function yX(e) {
|
|
31414
31455
|
if (!Array.isArray(e.allOf) || e.allOf.length === 0) return e;
|
|
31415
31456
|
let t = { ...e.properties ?? {} }, n = new Set(e.required ?? []), r = e.gioConfig ? { ...e.gioConfig } : void 0, i = { ...e.dependencies ?? {} };
|
|
31416
31457
|
for (let a of e.allOf) {
|
|
31417
|
-
let e =
|
|
31458
|
+
let e = vX(a);
|
|
31418
31459
|
Object.assign(t, e.properties ?? {}), e.required?.forEach((e) => n.add(e)), e.gioConfig && (r = {
|
|
31419
31460
|
...r,
|
|
31420
31461
|
...e.gioConfig
|
|
@@ -31423,33 +31464,33 @@ function vX(e) {
|
|
|
31423
31464
|
let a = { ...e };
|
|
31424
31465
|
return Object.keys(t).length > 0 && (a.properties = t), n.size > 0 && (a.required = Array.from(n)), r !== void 0 && (a.gioConfig = r), Object.keys(i).length > 0 && (a.dependencies = i), delete a.allOf, a;
|
|
31425
31466
|
}
|
|
31426
|
-
function
|
|
31427
|
-
return e.properties &&=
|
|
31467
|
+
function bX(e) {
|
|
31468
|
+
return e.properties &&= xX(e.properties, vX), e.items &&= Array.isArray(e.items) ? e.items.map(vX) : vX(e.items), e.oneOf &&= e.oneOf.map(vX), e.anyOf &&= e.anyOf.map(vX), e.dependencies &&= gX(e.dependencies, vX), e;
|
|
31428
31469
|
}
|
|
31429
|
-
function
|
|
31470
|
+
function xX(e, t) {
|
|
31430
31471
|
let n = {};
|
|
31431
31472
|
for (let [r, i] of Object.entries(e)) n[r] = t(i);
|
|
31432
31473
|
return n;
|
|
31433
31474
|
}
|
|
31434
31475
|
//#endregion
|
|
31435
31476
|
//#region src/composed/JsonSchemaForm/utils/jsonPointer.ts
|
|
31436
|
-
function
|
|
31477
|
+
function SX(e) {
|
|
31437
31478
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
31438
31479
|
}
|
|
31439
|
-
function
|
|
31480
|
+
function CX(e) {
|
|
31440
31481
|
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
31441
31482
|
}
|
|
31442
31483
|
//#endregion
|
|
31443
31484
|
//#region src/composed/JsonSchemaForm/schema/preprocess/resolveRefs.ts
|
|
31444
|
-
function
|
|
31445
|
-
return
|
|
31485
|
+
function wX(e) {
|
|
31486
|
+
return TX(e, e, []);
|
|
31446
31487
|
}
|
|
31447
|
-
function
|
|
31488
|
+
function TX(e, t, n) {
|
|
31448
31489
|
if (typeof e.$ref == "string") {
|
|
31449
31490
|
if (n.includes(e.$ref)) throw Error(`Cyclic $ref: ${[...n, e.$ref].join(" → ")}`);
|
|
31450
|
-
let r =
|
|
31491
|
+
let r = EX(t, e.$ref);
|
|
31451
31492
|
if (r === void 0) throw Error(`Unresolved $ref: ${e.$ref}`);
|
|
31452
|
-
let i =
|
|
31493
|
+
let i = TX(r, t, [...n, e.$ref]), { $ref: a, gioConfig: o, ...s } = e, c = {
|
|
31453
31494
|
...i,
|
|
31454
31495
|
...s
|
|
31455
31496
|
};
|
|
@@ -31461,25 +31502,25 @@ function wX(e, t, n) {
|
|
|
31461
31502
|
let r = { ...e };
|
|
31462
31503
|
if (r.properties) {
|
|
31463
31504
|
let e = {};
|
|
31464
|
-
for (let [i, a] of Object.entries(r.properties)) e[i] =
|
|
31505
|
+
for (let [i, a] of Object.entries(r.properties)) e[i] = TX(a, t, n);
|
|
31465
31506
|
r.properties = e;
|
|
31466
31507
|
}
|
|
31467
|
-
if (r.items &&= Array.isArray(r.items) ? r.items.map((e) =>
|
|
31508
|
+
if (r.items &&= Array.isArray(r.items) ? r.items.map((e) => TX(e, t, n)) : TX(r.items, t, n), r.oneOf &&= r.oneOf.map((e) => TX(e, t, n)), r.anyOf &&= r.anyOf.map((e) => TX(e, t, n)), r.allOf &&= r.allOf.map((e) => TX(e, t, n)), r.dependencies &&= gX(r.dependencies, (e) => TX(e, t, n)), r.definitions) {
|
|
31468
31509
|
let e = {};
|
|
31469
|
-
for (let [i, a] of Object.entries(r.definitions)) e[i] =
|
|
31510
|
+
for (let [i, a] of Object.entries(r.definitions)) e[i] = TX(a, t, n);
|
|
31470
31511
|
r.definitions = e;
|
|
31471
31512
|
}
|
|
31472
31513
|
if (r.$defs) {
|
|
31473
31514
|
let e = {};
|
|
31474
|
-
for (let [i, a] of Object.entries(r.$defs)) e[i] =
|
|
31515
|
+
for (let [i, a] of Object.entries(r.$defs)) e[i] = TX(a, t, n);
|
|
31475
31516
|
r.$defs = e;
|
|
31476
31517
|
}
|
|
31477
31518
|
return r;
|
|
31478
31519
|
}
|
|
31479
|
-
function
|
|
31520
|
+
function EX(e, t) {
|
|
31480
31521
|
if (t === "#") return e;
|
|
31481
31522
|
if (!t.startsWith("#/")) throw Error(`Unsupported $ref format (only local JSON Pointers are supported): ${t}`);
|
|
31482
|
-
let n = t.slice(2).split("/").map(
|
|
31523
|
+
let n = t.slice(2).split("/").map(CX), r = e;
|
|
31483
31524
|
for (let e of n) {
|
|
31484
31525
|
if (typeof r != "object" || !r) return;
|
|
31485
31526
|
r = r[e];
|
|
@@ -31488,28 +31529,28 @@ function TX(e, t) {
|
|
|
31488
31529
|
}
|
|
31489
31530
|
//#endregion
|
|
31490
31531
|
//#region src/composed/JsonSchemaForm/form-bindings/extractDefaults.ts
|
|
31491
|
-
function
|
|
31532
|
+
function DX(e) {
|
|
31492
31533
|
let t;
|
|
31493
31534
|
try {
|
|
31494
|
-
t =
|
|
31535
|
+
t = _X(wX(e));
|
|
31495
31536
|
} catch {
|
|
31496
31537
|
return;
|
|
31497
31538
|
}
|
|
31498
|
-
return
|
|
31539
|
+
return OX(t);
|
|
31499
31540
|
}
|
|
31500
|
-
function
|
|
31541
|
+
function OX(e) {
|
|
31501
31542
|
if (e.deprecated === !0) return;
|
|
31502
31543
|
if (Object.prototype.hasOwnProperty.call(e, "default")) return e.default;
|
|
31503
31544
|
let t = {};
|
|
31504
31545
|
if (e.properties) for (let [n, r] of Object.entries(e.properties)) {
|
|
31505
|
-
let e =
|
|
31546
|
+
let e = OX(r);
|
|
31506
31547
|
e !== void 0 && (t[n] = e);
|
|
31507
31548
|
}
|
|
31508
31549
|
let n = (e.oneOf ?? e.anyOf)?.find((e) => e.deprecated !== !0);
|
|
31509
31550
|
if (n?.properties) {
|
|
31510
31551
|
for (let [e, r] of Object.entries(n.properties)) if (r.const !== void 0) t[e] = r.const;
|
|
31511
31552
|
else if (!(e in t)) {
|
|
31512
|
-
let n =
|
|
31553
|
+
let n = OX(r);
|
|
31513
31554
|
n !== void 0 && (t[e] = n);
|
|
31514
31555
|
}
|
|
31515
31556
|
}
|
|
@@ -31517,23 +31558,23 @@ function DX(e) {
|
|
|
31517
31558
|
}
|
|
31518
31559
|
//#endregion
|
|
31519
31560
|
//#region src/composed/JsonSchemaForm/utils/fieldErrors.ts
|
|
31520
|
-
function
|
|
31561
|
+
function kX(e) {
|
|
31521
31562
|
return e ? e.types ? Object.values(e.types).flat().filter((e) => typeof e == "string").map((e) => ({ message: e })) : [{ message: e.message }] : [];
|
|
31522
31563
|
}
|
|
31523
31564
|
//#endregion
|
|
31524
31565
|
//#region src/composed/JsonSchemaForm/utils/labelOf.ts
|
|
31525
|
-
function
|
|
31566
|
+
function AX(e) {
|
|
31526
31567
|
return e ? e.charAt(0).toUpperCase() + e.slice(1) : "Field";
|
|
31527
31568
|
}
|
|
31528
|
-
function
|
|
31529
|
-
return
|
|
31569
|
+
function jX(e) {
|
|
31570
|
+
return AX(e.split(".").pop());
|
|
31530
31571
|
}
|
|
31531
|
-
function
|
|
31532
|
-
return typeof e.title == "string" && e.title.length > 0 ? e.title :
|
|
31572
|
+
function MX(e, t) {
|
|
31573
|
+
return typeof e.title == "string" && e.title.length > 0 ? e.title : AX(t);
|
|
31533
31574
|
}
|
|
31534
31575
|
//#endregion
|
|
31535
31576
|
//#region src/composed/JsonSchemaForm/fields/banner/SchemaBanner.tsx
|
|
31536
|
-
function
|
|
31577
|
+
function NX({ banner: e }) {
|
|
31537
31578
|
let t = "title" in e ? e.title : void 0;
|
|
31538
31579
|
return /* @__PURE__ */ U(Yy, {
|
|
31539
31580
|
role: "note",
|
|
@@ -31553,7 +31594,7 @@ function MX({ banner: e }) {
|
|
|
31553
31594
|
}
|
|
31554
31595
|
//#endregion
|
|
31555
31596
|
//#region src/composed/JsonSchemaForm/fields/array/buildDefaultForType.ts
|
|
31556
|
-
function
|
|
31597
|
+
function PX(e) {
|
|
31557
31598
|
if (e.default !== void 0) return e.default;
|
|
31558
31599
|
switch (e.type) {
|
|
31559
31600
|
case "string": return "";
|
|
@@ -31568,11 +31609,11 @@ function NX(e) {
|
|
|
31568
31609
|
}
|
|
31569
31610
|
//#endregion
|
|
31570
31611
|
//#region src/composed/JsonSchemaForm/fields/array/use-array-field.ts
|
|
31571
|
-
function
|
|
31572
|
-
let n =
|
|
31612
|
+
function FX(e, t) {
|
|
31613
|
+
let n = uX(), r = t ? n.basePath ? `${n.basePath}.${t}` : t : n.basePath, { fields: i, append: a, remove: o } = cX({
|
|
31573
31614
|
control: n.control,
|
|
31574
31615
|
name: r
|
|
31575
|
-
}), { fieldState: s } =
|
|
31616
|
+
}), { fieldState: s } = EY({
|
|
31576
31617
|
control: n.control,
|
|
31577
31618
|
name: r
|
|
31578
31619
|
}), c = n.disabled || e.readOnly === !0, l = typeof e.minItems == "number" ? e.minItems : 0, u = typeof e.maxItems == "number" ? e.maxItems : Infinity;
|
|
@@ -31590,10 +31631,10 @@ function PX(e, t) {
|
|
|
31590
31631
|
}
|
|
31591
31632
|
//#endregion
|
|
31592
31633
|
//#region src/composed/JsonSchemaForm/fields/array/ArrayField.tsx
|
|
31593
|
-
function
|
|
31594
|
-
let { schema: r } = e, { ctx: i, path: a, fields: o, append: s, remove: c, fieldState: l, isDisabled: u, atMin: d, atMax: f } =
|
|
31634
|
+
function IX({ node: e, name: t, depth: n }) {
|
|
31635
|
+
let { schema: r } = e, { ctx: i, path: a, fields: o, append: s, remove: c, fieldState: l, isDisabled: u, atMin: d, atMax: f } = FX(r, t), p = r.items, m = e.items, h = MX(r, t), g = r.gioConfig?.uiBorder === "full";
|
|
31595
31636
|
function _() {
|
|
31596
|
-
s(
|
|
31637
|
+
s(RX(p), { shouldFocus: !1 });
|
|
31597
31638
|
}
|
|
31598
31639
|
return /* @__PURE__ */ U(pR, {
|
|
31599
31640
|
"aria-required": r.isRequired || void 0,
|
|
@@ -31605,10 +31646,10 @@ function FX({ node: e, name: t, depth: n }) {
|
|
|
31605
31646
|
children: h
|
|
31606
31647
|
}),
|
|
31607
31648
|
r.description && /* @__PURE__ */ H(xR, { children: r.description }),
|
|
31608
|
-
r.gioConfig?.banner && /* @__PURE__ */ H(
|
|
31649
|
+
r.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: r.gioConfig.banner }),
|
|
31609
31650
|
/* @__PURE__ */ H("div", {
|
|
31610
31651
|
className: "flex flex-col",
|
|
31611
|
-
children: o.map((e, t) => /* @__PURE__ */ H(
|
|
31652
|
+
children: o.map((e, t) => /* @__PURE__ */ H(LX, {
|
|
31612
31653
|
index: t,
|
|
31613
31654
|
path: a,
|
|
31614
31655
|
itemsNode: m,
|
|
@@ -31630,11 +31671,11 @@ function FX({ node: e, name: t, depth: n }) {
|
|
|
31630
31671
|
children: [/* @__PURE__ */ H(E, { "aria-hidden": "true" }), "Add"]
|
|
31631
31672
|
})
|
|
31632
31673
|
}),
|
|
31633
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
31674
|
+
/* @__PURE__ */ H(CR, { errors: kX(l.error) })
|
|
31634
31675
|
]
|
|
31635
31676
|
});
|
|
31636
31677
|
}
|
|
31637
|
-
function
|
|
31678
|
+
function LX({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove: a, onRemove: o, ctx: c }) {
|
|
31638
31679
|
let l = `${t}.${e}`;
|
|
31639
31680
|
return /* @__PURE__ */ U(Uw, {
|
|
31640
31681
|
defaultOpen: !0,
|
|
@@ -31663,13 +31704,13 @@ function IX({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove:
|
|
|
31663
31704
|
})]
|
|
31664
31705
|
}), /* @__PURE__ */ H(Gw, { children: /* @__PURE__ */ H("div", {
|
|
31665
31706
|
className: "pt-2 pb-4 pl-6",
|
|
31666
|
-
children: n && /* @__PURE__ */ H(
|
|
31707
|
+
children: n && /* @__PURE__ */ H(lX.Provider, {
|
|
31667
31708
|
value: {
|
|
31668
31709
|
...c,
|
|
31669
31710
|
basePath: l,
|
|
31670
31711
|
disabled: i
|
|
31671
31712
|
},
|
|
31672
|
-
children: /* @__PURE__ */ H(
|
|
31713
|
+
children: /* @__PURE__ */ H(hZ, {
|
|
31673
31714
|
node: n,
|
|
31674
31715
|
name: "",
|
|
31675
31716
|
depth: r + 1
|
|
@@ -31678,17 +31719,17 @@ function IX({ index: e, path: t, itemsNode: n, depth: r, disabled: i, canRemove:
|
|
|
31678
31719
|
}) })]
|
|
31679
31720
|
});
|
|
31680
31721
|
}
|
|
31681
|
-
function
|
|
31682
|
-
let t =
|
|
31683
|
-
return t === void 0 ?
|
|
31722
|
+
function RX(e) {
|
|
31723
|
+
let t = DX(e);
|
|
31724
|
+
return t === void 0 ? PX(e) : t;
|
|
31684
31725
|
}
|
|
31685
31726
|
//#endregion
|
|
31686
31727
|
//#region src/composed/JsonSchemaForm/fields/array/HeadersArrayField.tsx
|
|
31687
|
-
function
|
|
31688
|
-
let { schema: n } = e, { path: r, fields: i, append: a, remove: o, fieldState: s, isDisabled: c, atMin: l, atMax: u } =
|
|
31728
|
+
function zX({ node: e, name: t }) {
|
|
31729
|
+
let { schema: n } = e, { path: r, fields: i, append: a, remove: o, fieldState: s, isDisabled: c, atMin: l, atMax: u } = FX(n, t), d = n.items, f = d && !Array.isArray(d) ? d.properties ?? {} : {}, p = Object.keys(f), m = MX(n, t);
|
|
31689
31730
|
function h() {
|
|
31690
31731
|
let e = {};
|
|
31691
|
-
for (let t of p) e[t] =
|
|
31732
|
+
for (let t of p) e[t] = PX(f[t]);
|
|
31692
31733
|
a(e, { shouldFocus: !1 });
|
|
31693
31734
|
}
|
|
31694
31735
|
return /* @__PURE__ */ U(pR, {
|
|
@@ -31700,16 +31741,16 @@ function RX({ node: e, name: t }) {
|
|
|
31700
31741
|
children: m
|
|
31701
31742
|
}),
|
|
31702
31743
|
n.description && /* @__PURE__ */ H(xR, { children: n.description }),
|
|
31703
|
-
n.gioConfig?.banner && /* @__PURE__ */ H(
|
|
31744
|
+
n.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: n.gioConfig.banner }),
|
|
31704
31745
|
/* @__PURE__ */ H("div", {
|
|
31705
31746
|
className: "overflow-hidden rounded-lg border",
|
|
31706
31747
|
children: /* @__PURE__ */ U(HW, { children: [/* @__PURE__ */ H(UW, { children: /* @__PURE__ */ U(KW, { children: [p.map((e) => /* @__PURE__ */ H(qW, {
|
|
31707
31748
|
scope: "col",
|
|
31708
|
-
children:
|
|
31749
|
+
children: HX(f[e], e)
|
|
31709
31750
|
}, e)), /* @__PURE__ */ H(qW, {
|
|
31710
31751
|
"aria-hidden": "true",
|
|
31711
31752
|
className: "w-px"
|
|
31712
|
-
})] }) }), /* @__PURE__ */ H(WW, { children: i.map((e, t) => /* @__PURE__ */ H(
|
|
31753
|
+
})] }) }), /* @__PURE__ */ H(WW, { children: i.map((e, t) => /* @__PURE__ */ H(BX, {
|
|
31713
31754
|
rowIndex: t,
|
|
31714
31755
|
rowPath: `${r}.${t}`,
|
|
31715
31756
|
columnKeys: p,
|
|
@@ -31727,12 +31768,12 @@ function RX({ node: e, name: t }) {
|
|
|
31727
31768
|
onClick: h,
|
|
31728
31769
|
children: [/* @__PURE__ */ H(E, { "aria-hidden": "true" }), "Add"]
|
|
31729
31770
|
}) }),
|
|
31730
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
31771
|
+
/* @__PURE__ */ H(CR, { errors: kX(s.error) })
|
|
31731
31772
|
]
|
|
31732
31773
|
});
|
|
31733
31774
|
}
|
|
31734
|
-
function
|
|
31735
|
-
return /* @__PURE__ */ U(KW, { children: [n.map((n) => /* @__PURE__ */ H(
|
|
31775
|
+
function BX({ rowIndex: e, rowPath: t, columnKeys: n, itemProperties: r, disabled: i, canRemove: a, onRemove: o }) {
|
|
31776
|
+
return /* @__PURE__ */ U(KW, { children: [n.map((n) => /* @__PURE__ */ H(VX, {
|
|
31736
31777
|
columnKey: n,
|
|
31737
31778
|
cellPath: `${t}.${n}`,
|
|
31738
31779
|
propSchema: r[n],
|
|
@@ -31751,8 +31792,8 @@ function zX({ rowIndex: e, rowPath: t, columnKeys: n, itemProperties: r, disable
|
|
|
31751
31792
|
})
|
|
31752
31793
|
})] });
|
|
31753
31794
|
}
|
|
31754
|
-
function
|
|
31755
|
-
let { control: a } =
|
|
31795
|
+
function VX({ columnKey: e, cellPath: t, propSchema: n, rowIndex: r, disabled: i }) {
|
|
31796
|
+
let { control: a } = uX(), { field: o, fieldState: s } = EY({
|
|
31756
31797
|
control: a,
|
|
31757
31798
|
name: t
|
|
31758
31799
|
}), { ref: c, onBlur: l, onChange: u, value: d } = o;
|
|
@@ -31764,21 +31805,21 @@ function BX({ columnKey: e, cellPath: t, propSchema: n, rowIndex: r, disabled: i
|
|
|
31764
31805
|
onBlur: l,
|
|
31765
31806
|
disabled: i,
|
|
31766
31807
|
"aria-invalid": s.invalid,
|
|
31767
|
-
"aria-label": `${
|
|
31808
|
+
"aria-label": `${HX(n, e)} for row ${r + 1}`,
|
|
31768
31809
|
placeholder: typeof n.title == "string" ? n.title : void 0
|
|
31769
31810
|
}) });
|
|
31770
31811
|
}
|
|
31771
|
-
function
|
|
31812
|
+
function HX(e, t) {
|
|
31772
31813
|
return typeof e.title == "string" ? e.title : t.charAt(0).toUpperCase() + t.slice(1);
|
|
31773
31814
|
}
|
|
31774
31815
|
//#endregion
|
|
31775
31816
|
//#region src/composed/JsonSchemaForm/fields/boolean/BooleanField.tsx
|
|
31776
|
-
function
|
|
31777
|
-
let { control: n, basePath: r, disabled: i } =
|
|
31817
|
+
function UX({ node: e, name: t }) {
|
|
31818
|
+
let { control: n, basePath: r, disabled: i } = uX(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = EY({
|
|
31778
31819
|
control: n,
|
|
31779
31820
|
name: o,
|
|
31780
31821
|
defaultValue: typeof a.default == "boolean" ? a.default : !1
|
|
31781
|
-
}), l =
|
|
31822
|
+
}), l = MX(a, t), u = i || a.readOnly === !0;
|
|
31782
31823
|
return /* @__PURE__ */ U(_R, {
|
|
31783
31824
|
orientation: "horizontal",
|
|
31784
31825
|
"data-invalid": c.invalid,
|
|
@@ -31794,43 +31835,43 @@ function HX({ node: e, name: t }) {
|
|
|
31794
31835
|
htmlFor: o,
|
|
31795
31836
|
children: l
|
|
31796
31837
|
}),
|
|
31797
|
-
a.gioConfig?.banner && /* @__PURE__ */ H(
|
|
31838
|
+
a.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: a.gioConfig.banner }),
|
|
31798
31839
|
a.description && /* @__PURE__ */ H(xR, { children: a.description }),
|
|
31799
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
31840
|
+
/* @__PURE__ */ H(CR, { errors: kX(c.error) })
|
|
31800
31841
|
] })]
|
|
31801
31842
|
});
|
|
31802
31843
|
}
|
|
31803
31844
|
//#endregion
|
|
31804
31845
|
//#region src/composed/JsonSchemaForm/utils/schemaShape.ts
|
|
31805
|
-
function UX(e) {
|
|
31806
|
-
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.every((e) => e.const !== void 0);
|
|
31807
|
-
}
|
|
31808
31846
|
function WX(e) {
|
|
31809
|
-
return e.
|
|
31847
|
+
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.every((e) => e.const !== void 0);
|
|
31810
31848
|
}
|
|
31811
31849
|
function GX(e) {
|
|
31812
|
-
return e.type
|
|
31850
|
+
return e.type !== "array" || e.uniqueItems !== !0 || !e.items || Array.isArray(e.items) ? !1 : Array.isArray(e.items.enum) && e.items.enum.length > 0;
|
|
31813
31851
|
}
|
|
31814
31852
|
function KX(e) {
|
|
31815
|
-
return
|
|
31853
|
+
return e.type === "array" && e.gioConfig?.uiType === "gio-headers-array";
|
|
31816
31854
|
}
|
|
31817
31855
|
function qX(e) {
|
|
31856
|
+
return Array.isArray(e.oneOf) && e.oneOf.length > 0 && e.oneOf.some((e) => e.properties !== void 0) && !WX(e);
|
|
31857
|
+
}
|
|
31858
|
+
function JX(e) {
|
|
31818
31859
|
return Array.isArray(e.anyOf) && e.anyOf.length > 0 && e.anyOf.some((e) => e.properties !== void 0);
|
|
31819
31860
|
}
|
|
31820
31861
|
//#endregion
|
|
31821
31862
|
//#region src/composed/JsonSchemaForm/fields/enum/enumOptions.ts
|
|
31822
|
-
function
|
|
31863
|
+
function YX(e, t) {
|
|
31823
31864
|
let n = t?.[String(e)];
|
|
31824
31865
|
return n === void 0 ? e === null ? "—" : String(e) : n;
|
|
31825
31866
|
}
|
|
31826
|
-
function
|
|
31867
|
+
function XX(e, t) {
|
|
31827
31868
|
return e.map((e, n) => ({
|
|
31828
31869
|
raw: e,
|
|
31829
31870
|
key: String(n),
|
|
31830
|
-
label:
|
|
31871
|
+
label: YX(e, t)
|
|
31831
31872
|
}));
|
|
31832
31873
|
}
|
|
31833
|
-
function
|
|
31874
|
+
function ZX(e) {
|
|
31834
31875
|
return e.map((e, t) => ({
|
|
31835
31876
|
raw: e.const,
|
|
31836
31877
|
key: String(t),
|
|
@@ -31839,12 +31880,12 @@ function XX(e) {
|
|
|
31839
31880
|
}
|
|
31840
31881
|
//#endregion
|
|
31841
31882
|
//#region src/composed/JsonSchemaForm/fields/enum/EnumField.tsx
|
|
31842
|
-
function
|
|
31843
|
-
let { control: n, basePath: r, disabled: i } =
|
|
31883
|
+
function QX({ node: e, name: t }) {
|
|
31884
|
+
let { control: n, basePath: r, disabled: i } = uX(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = EY({
|
|
31844
31885
|
control: n,
|
|
31845
31886
|
name: o,
|
|
31846
31887
|
defaultValue: a.default
|
|
31847
|
-
}), { ref: l, onBlur: u } = s, d =
|
|
31888
|
+
}), { ref: l, onBlur: u } = s, d = MX(a, t), f = i || a.readOnly === !0, p = $X(a), m = p.find((e) => Object.is(e.raw, s.value))?.key ?? "", h = (e) => p.find((t) => t.key === e)?.raw;
|
|
31848
31889
|
return /* @__PURE__ */ U(_R, {
|
|
31849
31890
|
"data-invalid": c.invalid,
|
|
31850
31891
|
children: [
|
|
@@ -31853,7 +31894,7 @@ function ZX({ node: e, name: t }) {
|
|
|
31853
31894
|
required: a.isRequired,
|
|
31854
31895
|
children: d
|
|
31855
31896
|
}),
|
|
31856
|
-
a.gioConfig?.banner && /* @__PURE__ */ H(
|
|
31897
|
+
a.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: a.gioConfig.banner }),
|
|
31857
31898
|
/* @__PURE__ */ U(tU, {
|
|
31858
31899
|
value: m,
|
|
31859
31900
|
onValueChange: (e) => s.onChange(h(e)),
|
|
@@ -31871,22 +31912,22 @@ function ZX({ node: e, name: t }) {
|
|
|
31871
31912
|
}, e.key)) })]
|
|
31872
31913
|
}),
|
|
31873
31914
|
a.description && /* @__PURE__ */ H(xR, { children: a.description }),
|
|
31874
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
31915
|
+
/* @__PURE__ */ H(CR, { errors: kX(c.error) })
|
|
31875
31916
|
]
|
|
31876
31917
|
});
|
|
31877
31918
|
}
|
|
31878
|
-
function
|
|
31879
|
-
return
|
|
31919
|
+
function $X(e) {
|
|
31920
|
+
return WX(e) ? ZX(e.oneOf ?? []) : XX(e.enum ?? [], e.gioConfig?.enumLabelMap);
|
|
31880
31921
|
}
|
|
31881
31922
|
//#endregion
|
|
31882
31923
|
//#region src/composed/JsonSchemaForm/fields/enum/MultiSelectField.tsx
|
|
31883
|
-
function
|
|
31884
|
-
let { control: n, basePath: r, disabled: i } =
|
|
31924
|
+
function eZ({ node: e, name: t }) {
|
|
31925
|
+
let { control: n, basePath: r, disabled: i } = uX(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = EY({
|
|
31885
31926
|
control: n,
|
|
31886
31927
|
name: o,
|
|
31887
31928
|
defaultValue: Array.isArray(a.default) ? a.default : []
|
|
31888
|
-
}), { ref: l, onBlur: u, onChange: d, value: f } = s, p = EM(), m =
|
|
31889
|
-
return
|
|
31929
|
+
}), { ref: l, onBlur: u, onChange: d, value: f } = s, p = EM(), m = MX(a, t), h = i || a.readOnly === !0, g = a.items, _ = XX(g.enum ?? [], g.gioConfig?.enumLabelMap), v = _.map((e) => e.label), y = (e) => _.find((t) => t.label === e)?.raw, b = (e) => _.find((t) => Object.is(t.raw, e))?.label, x = (Array.isArray(s.value) ? s.value : []).map((e) => b(e)).filter((e) => e !== void 0);
|
|
31930
|
+
return tZ({
|
|
31890
31931
|
schema: a,
|
|
31891
31932
|
options: _,
|
|
31892
31933
|
value: f,
|
|
@@ -31899,7 +31940,7 @@ function $X({ node: e, name: t }) {
|
|
|
31899
31940
|
required: a.isRequired,
|
|
31900
31941
|
children: m
|
|
31901
31942
|
}),
|
|
31902
|
-
a.gioConfig?.banner && /* @__PURE__ */ H(
|
|
31943
|
+
a.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: a.gioConfig.banner }),
|
|
31903
31944
|
/* @__PURE__ */ U(uM, {
|
|
31904
31945
|
multiple: !0,
|
|
31905
31946
|
autoHighlight: !0,
|
|
@@ -31932,27 +31973,27 @@ function $X({ node: e, name: t }) {
|
|
|
31932
31973
|
})]
|
|
31933
31974
|
}),
|
|
31934
31975
|
a.description && /* @__PURE__ */ H(xR, { children: a.description }),
|
|
31935
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
31976
|
+
/* @__PURE__ */ H(CR, { errors: kX(c.error) })
|
|
31936
31977
|
]
|
|
31937
31978
|
});
|
|
31938
31979
|
}
|
|
31939
|
-
function
|
|
31980
|
+
function tZ({ schema: e, options: t, value: n, onReset: r }) {
|
|
31940
31981
|
R(() => {
|
|
31941
31982
|
(Array.isArray(n) ? n : []).every((e) => t.some((t) => Object.is(t.raw, e))) || r(Array.isArray(e.default) ? e.default : []);
|
|
31942
31983
|
}, [e]);
|
|
31943
31984
|
}
|
|
31944
31985
|
//#endregion
|
|
31945
31986
|
//#region src/composed/JsonSchemaForm/fields/null/NullField.tsx
|
|
31946
|
-
function
|
|
31987
|
+
function nZ() {
|
|
31947
31988
|
return null;
|
|
31948
31989
|
}
|
|
31949
31990
|
//#endregion
|
|
31950
31991
|
//#region src/composed/JsonSchemaForm/fields/number/NumberField.tsx
|
|
31951
|
-
function
|
|
31952
|
-
let { control: n, basePath: r, disabled: i } =
|
|
31992
|
+
function rZ({ node: e, name: t }) {
|
|
31993
|
+
let { control: n, basePath: r, disabled: i } = uX(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = EY({
|
|
31953
31994
|
control: n,
|
|
31954
31995
|
name: o
|
|
31955
|
-
}), l =
|
|
31996
|
+
}), l = MX(a, t), u = i || a.readOnly === !0, d = (e) => {
|
|
31956
31997
|
let t = e.target.value;
|
|
31957
31998
|
if (t === "") {
|
|
31958
31999
|
s.onChange(null);
|
|
@@ -31969,7 +32010,7 @@ function nZ({ node: e, name: t }) {
|
|
|
31969
32010
|
required: a.isRequired,
|
|
31970
32011
|
children: l
|
|
31971
32012
|
}),
|
|
31972
|
-
a.gioConfig?.banner && /* @__PURE__ */ H(
|
|
32013
|
+
a.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: a.gioConfig.banner }),
|
|
31973
32014
|
/* @__PURE__ */ H(eM, {
|
|
31974
32015
|
id: o,
|
|
31975
32016
|
type: "number",
|
|
@@ -31984,21 +32025,21 @@ function nZ({ node: e, name: t }) {
|
|
|
31984
32025
|
step: f
|
|
31985
32026
|
}),
|
|
31986
32027
|
a.description && /* @__PURE__ */ H(xR, { children: a.description }),
|
|
31987
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
32028
|
+
/* @__PURE__ */ H(CR, { errors: kX(c.error) })
|
|
31988
32029
|
]
|
|
31989
32030
|
});
|
|
31990
32031
|
}
|
|
31991
32032
|
//#endregion
|
|
31992
32033
|
//#region src/composed/JsonSchemaForm/utils/pickActiveVariant.ts
|
|
31993
|
-
function
|
|
32034
|
+
function iZ(e, t, n, r) {
|
|
31994
32035
|
if (e.length === 0) return -1;
|
|
31995
32036
|
let i = n?.get(t);
|
|
31996
|
-
return
|
|
32037
|
+
return aZ(i, e) && oZ(e[i], r) ? i : sZ(e, r);
|
|
31997
32038
|
}
|
|
31998
|
-
function
|
|
32039
|
+
function aZ(e, t) {
|
|
31999
32040
|
return typeof e == "number" && Number.isInteger(e) && t[e] !== void 0;
|
|
32000
32041
|
}
|
|
32001
|
-
function
|
|
32042
|
+
function oZ(e, t) {
|
|
32002
32043
|
return Object.entries(e.properties ?? {}).every(([e, n]) => {
|
|
32003
32044
|
if (n.const !== void 0) return t(e) === n.const;
|
|
32004
32045
|
if (typeof n.pattern == "string") {
|
|
@@ -32008,18 +32049,18 @@ function aZ(e, t) {
|
|
|
32008
32049
|
return !0;
|
|
32009
32050
|
});
|
|
32010
32051
|
}
|
|
32011
|
-
function
|
|
32052
|
+
function sZ(e, t) {
|
|
32012
32053
|
let n = 0, r = {
|
|
32013
32054
|
viable: !1,
|
|
32014
32055
|
matches: -1
|
|
32015
32056
|
};
|
|
32016
32057
|
return e.forEach((e, i) => {
|
|
32017
|
-
let a =
|
|
32018
|
-
|
|
32058
|
+
let a = cZ(e, t);
|
|
32059
|
+
lZ(a, r) > 0 && (n = i, r = a);
|
|
32019
32060
|
}), n;
|
|
32020
32061
|
}
|
|
32021
|
-
function
|
|
32022
|
-
return
|
|
32062
|
+
function cZ(e, t) {
|
|
32063
|
+
return oZ(e, t) ? {
|
|
32023
32064
|
viable: (e.required ?? []).every((e) => t(e) !== void 0),
|
|
32024
32065
|
matches: Object.keys(e.properties ?? {}).filter((e) => t(e) !== void 0).length
|
|
32025
32066
|
} : {
|
|
@@ -32027,13 +32068,13 @@ function sZ(e, t) {
|
|
|
32027
32068
|
matches: -1
|
|
32028
32069
|
};
|
|
32029
32070
|
}
|
|
32030
|
-
function
|
|
32071
|
+
function lZ(e, t) {
|
|
32031
32072
|
return e.viable === t.viable ? e.matches - t.matches : e.viable ? 1 : -1;
|
|
32032
32073
|
}
|
|
32033
32074
|
//#endregion
|
|
32034
32075
|
//#region src/composed/JsonSchemaForm/fields/oneOf/OneOfField.tsx
|
|
32035
|
-
function
|
|
32036
|
-
let n =
|
|
32076
|
+
function uZ({ node: e, depth: t }) {
|
|
32077
|
+
let n = uX(), { control: r, index: i, basePath: a } = n, { schema: o } = e, s = i.variantIndices, c = B(() => e.variants ?? [], [e.variants]), [l, u] = V(() => iZ(c.map((e) => e.raw), a, s, (e) => r._getWatch(a ? `${a}.${e}` : e))), d = B(() => c.map((e) => (e.dependencyBranches ?? []).map((e) => Array.from(e.properties.keys()).map((e) => a ? `${a}.${e}` : e))), [c, a]);
|
|
32037
32078
|
if (c.length === 0) return null;
|
|
32038
32079
|
let f = c[l] ?? c[0], p = f.dependencyBranches ?? [], m = n.disabled || o.readOnly === !0, h = `${a || "root"}-variant`, g = (e) => {
|
|
32039
32080
|
if (e === l) return;
|
|
@@ -32064,21 +32105,21 @@ function lZ({ node: e, depth: t }) {
|
|
|
32064
32105
|
}, t)) })]
|
|
32065
32106
|
}),
|
|
32066
32107
|
t === 0 && o.description && /* @__PURE__ */ H(xR, { children: o.description }),
|
|
32067
|
-
o.gioConfig?.banner && /* @__PURE__ */ H(
|
|
32108
|
+
o.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: o.gioConfig.banner })
|
|
32068
32109
|
] }),
|
|
32069
|
-
f.consts.map(({ key: e, value: t }) => /* @__PURE__ */ H(
|
|
32110
|
+
f.consts.map(({ key: e, value: t }) => /* @__PURE__ */ H(dZ, {
|
|
32070
32111
|
path: a ? `${a}.${e}` : e,
|
|
32071
32112
|
value: t
|
|
32072
32113
|
}, e)),
|
|
32073
|
-
Array.from(f.properties).filter(([, e]) => e.schema.const === void 0).map(([e, n]) => /* @__PURE__ */ H(
|
|
32114
|
+
Array.from(f.properties).filter(([, e]) => e.schema.const === void 0).map(([e, n]) => /* @__PURE__ */ H(hZ, {
|
|
32074
32115
|
node: n,
|
|
32075
32116
|
name: e,
|
|
32076
32117
|
depth: t + 1
|
|
32077
32118
|
}, `${l}-${e}`)),
|
|
32078
|
-
p.map((e, n) => /* @__PURE__ */ H(
|
|
32079
|
-
condition:
|
|
32119
|
+
p.map((e, n) => /* @__PURE__ */ H(fX, {
|
|
32120
|
+
condition: hX(e.showIf, a),
|
|
32080
32121
|
unregisterOnHide: d[l]?.[n],
|
|
32081
|
-
children: Array.from(e.properties).map(([e, n]) => /* @__PURE__ */ H(
|
|
32122
|
+
children: Array.from(e.properties).map(([e, n]) => /* @__PURE__ */ H(hZ, {
|
|
32082
32123
|
node: n,
|
|
32083
32124
|
name: e,
|
|
32084
32125
|
depth: t + 1
|
|
@@ -32086,8 +32127,8 @@ function lZ({ node: e, depth: t }) {
|
|
|
32086
32127
|
}, `${l}-var-dep-${n}`))
|
|
32087
32128
|
] });
|
|
32088
32129
|
}
|
|
32089
|
-
function
|
|
32090
|
-
let { control: n } =
|
|
32130
|
+
function dZ({ path: e, value: t }) {
|
|
32131
|
+
let { control: n } = uX(), { field: r } = EY({
|
|
32091
32132
|
control: n,
|
|
32092
32133
|
name: e
|
|
32093
32134
|
}), { onChange: i } = r;
|
|
@@ -32097,28 +32138,28 @@ function uZ({ path: e, value: t }) {
|
|
|
32097
32138
|
}
|
|
32098
32139
|
//#endregion
|
|
32099
32140
|
//#region src/composed/JsonSchemaForm/fields/object/ObjectField.tsx
|
|
32100
|
-
function
|
|
32101
|
-
let r =
|
|
32141
|
+
function fZ({ node: e, name: t, depth: n }) {
|
|
32142
|
+
let r = uX(), { schema: i } = e, a = t ? r.basePath ? `${r.basePath}.${t}` : t : r.basePath, o = qX(i) || JX(i), s = B(() => e.dependencyBranches ?? [], [e.dependencyBranches]), c = s.length > 0, l = B(() => s.map((e) => Array.from(e.properties.keys()).map((e) => a ? `${a}.${e}` : e)), [s, a]), u = (e.properties || o || c) && /* @__PURE__ */ H(lX.Provider, {
|
|
32102
32143
|
value: {
|
|
32103
32144
|
...r,
|
|
32104
32145
|
basePath: a
|
|
32105
32146
|
},
|
|
32106
32147
|
children: /* @__PURE__ */ U(hR, { children: [
|
|
32107
|
-
e.properties && Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ H(
|
|
32148
|
+
e.properties && Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ H(hZ, {
|
|
32108
32149
|
node: t,
|
|
32109
32150
|
name: e,
|
|
32110
32151
|
depth: n + 1
|
|
32111
32152
|
}, e)),
|
|
32112
|
-
s.map((e, t) => /* @__PURE__ */ H(
|
|
32113
|
-
condition:
|
|
32153
|
+
s.map((e, t) => /* @__PURE__ */ H(fX, {
|
|
32154
|
+
condition: hX(e.showIf, a),
|
|
32114
32155
|
unregisterOnHide: l[t],
|
|
32115
|
-
children: Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ H(
|
|
32156
|
+
children: Array.from(e.properties).map(([e, t]) => /* @__PURE__ */ H(hZ, {
|
|
32116
32157
|
node: t,
|
|
32117
32158
|
name: e,
|
|
32118
32159
|
depth: n + 1
|
|
32119
32160
|
}, e))
|
|
32120
32161
|
}, `dep-${t}`)),
|
|
32121
|
-
o && /* @__PURE__ */ H(
|
|
32162
|
+
o && /* @__PURE__ */ H(uZ, {
|
|
32122
32163
|
node: e,
|
|
32123
32164
|
depth: n
|
|
32124
32165
|
})
|
|
@@ -32130,17 +32171,17 @@ function dZ({ node: e, name: t, depth: n }) {
|
|
|
32130
32171
|
/* @__PURE__ */ H(mR, {
|
|
32131
32172
|
className: f ? "px-2 text-base font-semibold" : "text-base font-semibold",
|
|
32132
32173
|
required: i.isRequired,
|
|
32133
|
-
children:
|
|
32174
|
+
children: MX(i, t)
|
|
32134
32175
|
}),
|
|
32135
32176
|
i.description && /* @__PURE__ */ H(xR, { children: i.description }),
|
|
32136
|
-
i.gioConfig?.banner && /* @__PURE__ */ H(
|
|
32177
|
+
i.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: i.gioConfig.banner }),
|
|
32137
32178
|
u
|
|
32138
32179
|
]
|
|
32139
32180
|
});
|
|
32140
32181
|
}
|
|
32141
32182
|
//#endregion
|
|
32142
32183
|
//#region src/composed/PasswordInput/PasswordInput.tsx
|
|
32143
|
-
function
|
|
32184
|
+
function pZ({ groupClassName: e, showLabel: t = "Show password", hideLabel: n = "Hide password", hideToggle: r = !1, className: i, disabled: a, ...o }) {
|
|
32144
32185
|
let [s, c] = V(!1);
|
|
32145
32186
|
return /* @__PURE__ */ U(nM, {
|
|
32146
32187
|
className: e,
|
|
@@ -32166,14 +32207,14 @@ function fZ({ groupClassName: e, showLabel: t = "Show password", hideLabel: n =
|
|
|
32166
32207
|
})]
|
|
32167
32208
|
});
|
|
32168
32209
|
}
|
|
32169
|
-
|
|
32210
|
+
pZ.displayName = "PasswordInput";
|
|
32170
32211
|
//#endregion
|
|
32171
32212
|
//#region src/composed/JsonSchemaForm/fields/string/StringField.tsx
|
|
32172
|
-
function
|
|
32173
|
-
let { control: n, basePath: r, disabled: i } =
|
|
32213
|
+
function mZ({ node: e, name: t }) {
|
|
32214
|
+
let { control: n, basePath: r, disabled: i } = uX(), { schema: a } = e, o = t ? r ? `${r}.${t}` : t : r, { field: s, fieldState: c } = EY({
|
|
32174
32215
|
control: n,
|
|
32175
32216
|
name: o
|
|
32176
|
-
}), l =
|
|
32217
|
+
}), l = MX(a, t), u = i || a.readOnly === !0, d = c.invalid, f = {
|
|
32177
32218
|
id: o,
|
|
32178
32219
|
value: typeof s.value == "string" ? s.value : "",
|
|
32179
32220
|
onChange: s.onChange,
|
|
@@ -32192,8 +32233,8 @@ function pZ({ node: e, name: t }) {
|
|
|
32192
32233
|
required: a.isRequired,
|
|
32193
32234
|
children: l
|
|
32194
32235
|
}),
|
|
32195
|
-
a.gioConfig?.banner && /* @__PURE__ */ H(
|
|
32196
|
-
a.format === "text" ? /* @__PURE__ */ H(tM, { ...f }) : a.format === "password" ? /* @__PURE__ */ H(
|
|
32236
|
+
a.gioConfig?.banner && /* @__PURE__ */ H(NX, { banner: a.gioConfig.banner }),
|
|
32237
|
+
a.format === "text" ? /* @__PURE__ */ H(tM, { ...f }) : a.format === "password" ? /* @__PURE__ */ H(pZ, {
|
|
32197
32238
|
...f,
|
|
32198
32239
|
pattern: a.pattern
|
|
32199
32240
|
}) : /* @__PURE__ */ H(eM, {
|
|
@@ -32202,144 +32243,144 @@ function pZ({ node: e, name: t }) {
|
|
|
32202
32243
|
pattern: a.pattern
|
|
32203
32244
|
}),
|
|
32204
32245
|
a.description && /* @__PURE__ */ H(xR, { children: a.description }),
|
|
32205
|
-
/* @__PURE__ */ H(CR, { errors:
|
|
32246
|
+
/* @__PURE__ */ H(CR, { errors: kX(c.error) })
|
|
32206
32247
|
]
|
|
32207
32248
|
});
|
|
32208
32249
|
}
|
|
32209
32250
|
//#endregion
|
|
32210
32251
|
//#region src/composed/JsonSchemaForm/SchemaField.tsx
|
|
32211
|
-
function
|
|
32212
|
-
let { basePath: r } =
|
|
32252
|
+
function hZ({ node: e, name: t, depth: n = 0 }) {
|
|
32253
|
+
let { basePath: r } = uX(), { schema: i } = e, a = t ?? "", o = t ? r ? `${r}.${t}` : t : r, s = B(() => [o], [o]), c = B(() => e.displayIf ? hX(e.displayIf, r) : void 0, [e.displayIf, r]), l = B(() => e.disableIf ? hX(e.disableIf, r) : void 0, [e.disableIf, r]);
|
|
32213
32254
|
if (i.deprecated === !0) return null;
|
|
32214
|
-
let u =
|
|
32215
|
-
return u === null ? null : (l && (u = /* @__PURE__ */ H(
|
|
32255
|
+
let u = gZ(e, a, t, n);
|
|
32256
|
+
return u === null ? null : (l && (u = /* @__PURE__ */ H(pX, {
|
|
32216
32257
|
condition: l,
|
|
32217
32258
|
children: u
|
|
32218
|
-
})), c ? /* @__PURE__ */ H(
|
|
32259
|
+
})), c ? /* @__PURE__ */ H(fX, {
|
|
32219
32260
|
condition: c,
|
|
32220
32261
|
unregisterOnHide: s,
|
|
32221
32262
|
children: u
|
|
32222
32263
|
}) : u);
|
|
32223
32264
|
}
|
|
32224
|
-
function
|
|
32225
|
-
let { schema: i } = e, a =
|
|
32226
|
-
return Array.isArray(i.enum) && i.enum.length > 0 ||
|
|
32265
|
+
function gZ(e, t, n, r) {
|
|
32266
|
+
let { schema: i } = e, a = _Z(i.type);
|
|
32267
|
+
return Array.isArray(i.enum) && i.enum.length > 0 || WX(i) ? /* @__PURE__ */ H(QX, {
|
|
32227
32268
|
node: e,
|
|
32228
32269
|
name: t
|
|
32229
|
-
}) :
|
|
32270
|
+
}) : GX(i) ? /* @__PURE__ */ H(eZ, {
|
|
32230
32271
|
node: e,
|
|
32231
32272
|
name: t
|
|
32232
|
-
}) :
|
|
32273
|
+
}) : KX(i) ? /* @__PURE__ */ H(zX, {
|
|
32233
32274
|
node: e,
|
|
32234
32275
|
name: t
|
|
32235
|
-
}) : a === "null" ? /* @__PURE__ */ H(
|
|
32276
|
+
}) : a === "null" ? /* @__PURE__ */ H(nZ, {}) : a === "boolean" ? /* @__PURE__ */ H(UX, {
|
|
32236
32277
|
node: e,
|
|
32237
32278
|
name: t
|
|
32238
|
-
}) : a === "integer" || a === "number" ? /* @__PURE__ */ H(
|
|
32279
|
+
}) : a === "integer" || a === "number" ? /* @__PURE__ */ H(rZ, {
|
|
32239
32280
|
node: e,
|
|
32240
32281
|
name: t
|
|
32241
|
-
}) : a === "string" ? /* @__PURE__ */ H(
|
|
32282
|
+
}) : a === "string" ? /* @__PURE__ */ H(mZ, {
|
|
32242
32283
|
node: e,
|
|
32243
32284
|
name: t
|
|
32244
|
-
}) : i.properties || a === "object" ||
|
|
32285
|
+
}) : i.properties || a === "object" || qX(i) || JX(i) ? /* @__PURE__ */ H(fZ, {
|
|
32245
32286
|
node: e,
|
|
32246
32287
|
name: n,
|
|
32247
32288
|
depth: r
|
|
32248
|
-
}) : a === "array" && i.items && !Array.isArray(i.items) ? /* @__PURE__ */ H(
|
|
32289
|
+
}) : a === "array" && i.items && !Array.isArray(i.items) ? /* @__PURE__ */ H(IX, {
|
|
32249
32290
|
node: e,
|
|
32250
32291
|
name: n,
|
|
32251
32292
|
depth: r
|
|
32252
|
-
}) : (console.warn(`[JsonSchemaForm] No renderer for schema at "${n ?? "root"}" (${
|
|
32293
|
+
}) : (console.warn(`[JsonSchemaForm] No renderer for schema at "${n ?? "root"}" (${vZ(i)}). Field is omitted.`), null);
|
|
32253
32294
|
}
|
|
32254
|
-
function
|
|
32295
|
+
function _Z(e) {
|
|
32255
32296
|
return Array.isArray(e) ? e.find((e) => e !== "null") ?? e[0] : e;
|
|
32256
32297
|
}
|
|
32257
|
-
function
|
|
32298
|
+
function vZ(e) {
|
|
32258
32299
|
return e.type ? Array.isArray(e.type) ? e.type.join("|") : e.type : e.oneOf ? "oneOf" : e.anyOf ? "anyOf" : e.allOf ? "allOf" : e.const === void 0 ? "unknown" : "const";
|
|
32259
32300
|
}
|
|
32260
32301
|
//#endregion
|
|
32261
32302
|
//#region src/composed/JsonSchemaForm/schema/preprocess/liftRequired.ts
|
|
32262
|
-
function vZ(e) {
|
|
32263
|
-
return yZ(e);
|
|
32264
|
-
}
|
|
32265
32303
|
function yZ(e) {
|
|
32304
|
+
return bZ(e);
|
|
32305
|
+
}
|
|
32306
|
+
function bZ(e) {
|
|
32266
32307
|
let t = { ...e };
|
|
32267
32308
|
if (t.properties) {
|
|
32268
32309
|
let e = new Set(t.required ?? []), n = {};
|
|
32269
32310
|
for (let [r, i] of Object.entries(t.properties)) {
|
|
32270
|
-
let t =
|
|
32311
|
+
let t = bZ(i);
|
|
32271
32312
|
e.has(r) && (t.isRequired = !0, t.type === "string" && t.minLength === void 0 && t.const === void 0 && !Array.isArray(t.enum) && !Array.isArray(t.oneOf) && !Array.isArray(t.anyOf) && (t.minLength = 1), t.type === "array" && t.minItems === void 0 && t.const === void 0 && !Array.isArray(t.enum) && (t.minItems = 1)), n[r] = t;
|
|
32272
32313
|
}
|
|
32273
32314
|
t.properties = n;
|
|
32274
32315
|
}
|
|
32275
|
-
return t.items &&= Array.isArray(t.items) ? t.items.map(
|
|
32316
|
+
return t.items &&= Array.isArray(t.items) ? t.items.map(bZ) : bZ(t.items), t.oneOf &&= t.oneOf.map(bZ), t.anyOf &&= t.anyOf.map(bZ), t.allOf &&= t.allOf.map(bZ), t.dependencies &&= gX(t.dependencies, bZ), t;
|
|
32276
32317
|
}
|
|
32277
32318
|
//#endregion
|
|
32278
32319
|
//#region src/composed/JsonSchemaForm/schema/preprocess/relaxDeprecated.ts
|
|
32279
|
-
function
|
|
32320
|
+
function xZ(e) {
|
|
32280
32321
|
if (e.deprecated === !0) return { deprecated: !0 };
|
|
32281
32322
|
let t = { ...e };
|
|
32282
32323
|
if (e.properties) {
|
|
32283
32324
|
let n = [];
|
|
32284
32325
|
t.properties = {};
|
|
32285
|
-
for (let [r, i] of Object.entries(e.properties)) i.deprecated === !0 && n.push(r), t.properties[r] =
|
|
32326
|
+
for (let [r, i] of Object.entries(e.properties)) i.deprecated === !0 && n.push(r), t.properties[r] = xZ(i);
|
|
32286
32327
|
n.length > 0 && e.required && (t.required = e.required.filter((e) => !n.includes(e)));
|
|
32287
32328
|
}
|
|
32288
|
-
return e.items && !Array.isArray(e.items) && (t.items =
|
|
32329
|
+
return e.items && !Array.isArray(e.items) && (t.items = xZ(e.items)), e.oneOf && (t.oneOf = e.oneOf.filter((e) => e.deprecated !== !0).map(xZ)), e.anyOf && (t.anyOf = e.anyOf.filter((e) => e.deprecated !== !0).map(xZ)), e.dependencies && (t.dependencies = gX(e.dependencies, xZ)), t;
|
|
32289
32330
|
}
|
|
32290
32331
|
//#endregion
|
|
32291
32332
|
//#region src/composed/JsonSchemaForm/schema/buildIndex.ts
|
|
32292
|
-
function
|
|
32293
|
-
let n =
|
|
32333
|
+
function SZ(e, t = "") {
|
|
32334
|
+
let n = yZ(xZ(_X(wX(e)))), r = /* @__PURE__ */ new Map();
|
|
32294
32335
|
return {
|
|
32295
|
-
root:
|
|
32336
|
+
root: CZ(n, "", !1, r, "", t),
|
|
32296
32337
|
nodeByPath: r,
|
|
32297
32338
|
variantIndices: /* @__PURE__ */ new Map()
|
|
32298
32339
|
};
|
|
32299
32340
|
}
|
|
32300
|
-
function
|
|
32341
|
+
function CZ(e, t, n, r, i = "", a = "") {
|
|
32301
32342
|
let o = {
|
|
32302
32343
|
rhfPath: t,
|
|
32303
32344
|
schema: e,
|
|
32304
32345
|
isRequired: n
|
|
32305
32346
|
};
|
|
32306
|
-
if (e.gioConfig?.displayIf && (o.displayIf =
|
|
32347
|
+
if (e.gioConfig?.displayIf && (o.displayIf = OZ(e.gioConfig.displayIf, i, a)), e.gioConfig?.disableIf && (o.disableIf = OZ(e.gioConfig.disableIf, i, a)), e.properties) {
|
|
32307
32348
|
let n = new Set(e.required ?? []), i = /* @__PURE__ */ new Map();
|
|
32308
32349
|
for (let [o, s] of Object.entries(e.properties)) {
|
|
32309
32350
|
let e = t ? `${t}.${o}` : o;
|
|
32310
|
-
i.set(o,
|
|
32351
|
+
i.set(o, CZ(s, e, n.has(o), r, t, a));
|
|
32311
32352
|
}
|
|
32312
32353
|
o.properties = i;
|
|
32313
32354
|
}
|
|
32314
32355
|
if (e.items && !Array.isArray(e.items)) {
|
|
32315
32356
|
let n = t ? `${t}.*` : "*";
|
|
32316
|
-
o.items =
|
|
32357
|
+
o.items = CZ(e.items, n, !1, r, t, a);
|
|
32317
32358
|
}
|
|
32318
32359
|
let s = e.oneOf ?? e.anyOf;
|
|
32319
|
-
if (Array.isArray(s) && s.length > 0 && (o.variants =
|
|
32320
|
-
let n =
|
|
32360
|
+
if (Array.isArray(s) && s.length > 0 && (o.variants = wZ(s).map((e) => TZ(e, t, a))), e.dependencies) {
|
|
32361
|
+
let n = AZ(e.dependencies, t, a);
|
|
32321
32362
|
n.length > 0 && (o.dependencyBranches = n);
|
|
32322
32363
|
}
|
|
32323
32364
|
return r.set(t, o), o;
|
|
32324
32365
|
}
|
|
32325
|
-
function
|
|
32366
|
+
function wZ(e) {
|
|
32326
32367
|
let t = /* @__PURE__ */ new Set();
|
|
32327
32368
|
return e.filter((e) => typeof e.title == "string" ? t.has(e.title) ? !1 : (t.add(e.title), !0) : !0);
|
|
32328
32369
|
}
|
|
32329
|
-
function
|
|
32370
|
+
function TZ(e, t, n) {
|
|
32330
32371
|
let r = new Set(e.required ?? []), i = /* @__PURE__ */ new Map(), a = [];
|
|
32331
32372
|
for (let [o, s] of Object.entries(e.properties ?? {})) {
|
|
32332
|
-
let e =
|
|
32373
|
+
let e = EZ(s);
|
|
32333
32374
|
e && a.push({
|
|
32334
32375
|
key: o,
|
|
32335
32376
|
value: e.value
|
|
32336
32377
|
});
|
|
32337
32378
|
let c = t ? `${t}.${o}` : o;
|
|
32338
|
-
i.set(o,
|
|
32379
|
+
i.set(o, DZ(s, c, r.has(o), t, n));
|
|
32339
32380
|
}
|
|
32340
32381
|
let o;
|
|
32341
32382
|
if (e.dependencies) {
|
|
32342
|
-
let r =
|
|
32383
|
+
let r = AZ(e.dependencies, t, n);
|
|
32343
32384
|
r.length > 0 && (o = r);
|
|
32344
32385
|
}
|
|
32345
32386
|
return {
|
|
@@ -32350,17 +32391,17 @@ function wZ(e, t, n) {
|
|
|
32350
32391
|
raw: e
|
|
32351
32392
|
};
|
|
32352
32393
|
}
|
|
32353
|
-
function
|
|
32394
|
+
function EZ(e) {
|
|
32354
32395
|
if (e.const !== void 0) return { value: e.const };
|
|
32355
32396
|
if (Array.isArray(e.enum) && e.enum.length === 1) return { value: e.enum[0] };
|
|
32356
32397
|
}
|
|
32357
|
-
function
|
|
32358
|
-
return
|
|
32398
|
+
function DZ(e, t, n, r, i) {
|
|
32399
|
+
return CZ(e, t, n, /* @__PURE__ */ new Map(), r, i);
|
|
32359
32400
|
}
|
|
32360
|
-
function
|
|
32401
|
+
function OZ(e, t, n) {
|
|
32361
32402
|
let r = /* @__PURE__ */ new Map();
|
|
32362
32403
|
for (let [i, a] of Object.entries(e.$eq)) {
|
|
32363
|
-
let e =
|
|
32404
|
+
let e = kZ(i, t, n);
|
|
32364
32405
|
if (e === null) {
|
|
32365
32406
|
console.warn(`[JsonSchemaForm] gioConfig path "${i}" is unsupported (expected value.X / ./X / ../X).`);
|
|
32366
32407
|
continue;
|
|
@@ -32369,7 +32410,7 @@ function DZ(e, t, n) {
|
|
|
32369
32410
|
}
|
|
32370
32411
|
return { $eq: r };
|
|
32371
32412
|
}
|
|
32372
|
-
function
|
|
32413
|
+
function kZ(e, t, n) {
|
|
32373
32414
|
let r = null;
|
|
32374
32415
|
if (e.startsWith("value.")) r = e.slice(6);
|
|
32375
32416
|
else if (e.startsWith("./")) {
|
|
@@ -32383,24 +32424,24 @@ function OZ(e, t, n) {
|
|
|
32383
32424
|
}
|
|
32384
32425
|
return r === null ? null : n ? `${n}.${r}` : r;
|
|
32385
32426
|
}
|
|
32386
|
-
function
|
|
32427
|
+
function AZ(e, t, n) {
|
|
32387
32428
|
return Object.entries(e).flatMap(([e, r]) => {
|
|
32388
|
-
let i =
|
|
32429
|
+
let i = jZ(e, r);
|
|
32389
32430
|
if (!i) return [];
|
|
32390
32431
|
let a = t ? `${t}.${e}` : e;
|
|
32391
|
-
return i.map((r) =>
|
|
32432
|
+
return i.map((r) => MZ(r, e, a, t, n));
|
|
32392
32433
|
});
|
|
32393
32434
|
}
|
|
32394
|
-
function
|
|
32435
|
+
function jZ(e, t) {
|
|
32395
32436
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : null;
|
|
32396
|
-
return n?.oneOf?.length ? n.oneOf.every((t) => t.properties?.[e] !== void 0 &&
|
|
32437
|
+
return n?.oneOf?.length ? n.oneOf.every((t) => t.properties?.[e] !== void 0 && EZ(t.properties[e]) !== void 0) ? n.oneOf : (console.warn(`[JsonSchemaForm] dependencies."${e}".oneOf has at least one variant missing a \`const\` (or single-value \`enum\`) discriminator on "${e}". Skipping the whole dependency (no partial unfold).`), null) : (console.warn(`[JsonSchemaForm] dependencies."${e}" is not a discriminator-oneOf shape (only \`{ oneOf: [...] }\` with const discriminators is supported). Skipping.`), null);
|
|
32397
32438
|
}
|
|
32398
|
-
function
|
|
32399
|
-
let a =
|
|
32439
|
+
function MZ(e, t, n, r, i) {
|
|
32440
|
+
let a = EZ(e.properties[t]).value, o = new Set((e.required ?? []).filter((e) => e !== t)), s = /* @__PURE__ */ new Map();
|
|
32400
32441
|
for (let [n, a] of Object.entries(e.properties ?? {})) {
|
|
32401
32442
|
if (n === t) continue;
|
|
32402
32443
|
let e = r ? `${r}.${n}` : n;
|
|
32403
|
-
s.set(n,
|
|
32444
|
+
s.set(n, DZ(a, e, o.has(n), r, i));
|
|
32404
32445
|
}
|
|
32405
32446
|
let c = i ? `${i}.${n}` : n;
|
|
32406
32447
|
return {
|
|
@@ -32411,10 +32452,10 @@ function jZ(e, t, n, r, i) {
|
|
|
32411
32452
|
}
|
|
32412
32453
|
//#endregion
|
|
32413
32454
|
//#region src/composed/JsonSchemaForm/JsonSchemaForm.tsx
|
|
32414
|
-
function
|
|
32455
|
+
function NZ({ schema: e, control: t, name: n = "", disabled: r = !1, context: i }) {
|
|
32415
32456
|
let a = B(() => {
|
|
32416
32457
|
try {
|
|
32417
|
-
let a =
|
|
32458
|
+
let a = SZ(e, n);
|
|
32418
32459
|
return {
|
|
32419
32460
|
ok: !0,
|
|
32420
32461
|
contextValue: {
|
|
@@ -32439,9 +32480,9 @@ function MZ({ schema: e, control: t, name: n = "", disabled: r = !1, context: i
|
|
|
32439
32480
|
r,
|
|
32440
32481
|
i
|
|
32441
32482
|
]);
|
|
32442
|
-
return a.ok ? /* @__PURE__ */ H(
|
|
32483
|
+
return a.ok ? /* @__PURE__ */ H(lX.Provider, {
|
|
32443
32484
|
value: a.contextValue,
|
|
32444
|
-
children: /* @__PURE__ */ H(
|
|
32485
|
+
children: /* @__PURE__ */ H(hZ, { node: a.root })
|
|
32445
32486
|
}) : /* @__PURE__ */ U("p", {
|
|
32446
32487
|
role: "alert",
|
|
32447
32488
|
className: "text-sm text-destructive",
|
|
@@ -32450,7 +32491,7 @@ function MZ({ schema: e, control: t, name: n = "", disabled: r = !1, context: i
|
|
|
32450
32491
|
}
|
|
32451
32492
|
//#endregion
|
|
32452
32493
|
//#region src/composed/JsonSchemaForm/form-bindings/composeResolvers.ts
|
|
32453
|
-
function
|
|
32494
|
+
function PZ(...e) {
|
|
32454
32495
|
return async (t, n, r) => {
|
|
32455
32496
|
let i = await Promise.all(e.map((e) => e(t, n, r))), a = {};
|
|
32456
32497
|
for (let e of i) Object.assign(a, e.errors);
|
|
@@ -32465,7 +32506,7 @@ function NZ(...e) {
|
|
|
32465
32506
|
}
|
|
32466
32507
|
//#endregion
|
|
32467
32508
|
//#region ../../node_modules/ajv/dist/compile/codegen/code.js
|
|
32468
|
-
var
|
|
32509
|
+
var FZ = /* @__PURE__ */ W(((e) => {
|
|
32469
32510
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
32470
32511
|
var t = class {};
|
|
32471
32512
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
@@ -32570,9 +32611,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
32570
32611
|
return new r(e.toString());
|
|
32571
32612
|
}
|
|
32572
32613
|
e.regexpCode = g;
|
|
32573
|
-
})),
|
|
32614
|
+
})), IZ = /* @__PURE__ */ W(((e) => {
|
|
32574
32615
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
32575
|
-
var t =
|
|
32616
|
+
var t = FZ(), n = class extends Error {
|
|
32576
32617
|
constructor(e) {
|
|
32577
32618
|
super(`CodeGen: "code" for ${e} not defined`), this.value = e.value;
|
|
32578
32619
|
}
|
|
@@ -32681,9 +32722,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
32681
32722
|
return c;
|
|
32682
32723
|
}
|
|
32683
32724
|
};
|
|
32684
|
-
})),
|
|
32725
|
+
})), LZ = /* @__PURE__ */ W(((e) => {
|
|
32685
32726
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
32686
|
-
var t =
|
|
32727
|
+
var t = FZ(), n = IZ(), r = FZ();
|
|
32687
32728
|
Object.defineProperty(e, "_", {
|
|
32688
32729
|
enumerable: !0,
|
|
32689
32730
|
get: function() {
|
|
@@ -32725,7 +32766,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
32725
32766
|
return r.Name;
|
|
32726
32767
|
}
|
|
32727
32768
|
});
|
|
32728
|
-
var i =
|
|
32769
|
+
var i = IZ();
|
|
32729
32770
|
Object.defineProperty(e, "Scope", {
|
|
32730
32771
|
enumerable: !0,
|
|
32731
32772
|
get: function() {
|
|
@@ -33196,9 +33237,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33196
33237
|
function L(e) {
|
|
33197
33238
|
return e instanceof t.Name ? e : (0, t._)`(${e})`;
|
|
33198
33239
|
}
|
|
33199
|
-
})),
|
|
33240
|
+
})), RZ = /* @__PURE__ */ W(((e) => {
|
|
33200
33241
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.checkStrictMode = e.getErrorPath = e.Type = e.useFunc = e.setEvaluated = e.evaluatedPropsToName = e.mergeEvaluated = e.eachItem = e.unescapeJsonPointer = e.escapeJsonPointer = e.escapeFragment = e.unescapeFragment = e.schemaRefOrVal = e.schemaHasRulesButRef = e.schemaHasRules = e.checkUnknownRules = e.alwaysValidSchema = e.toHash = void 0;
|
|
33201
|
-
var t =
|
|
33242
|
+
var t = LZ(), n = FZ();
|
|
33202
33243
|
function r(e) {
|
|
33203
33244
|
let t = {};
|
|
33204
33245
|
for (let n of e) t[n] = !0;
|
|
@@ -33321,9 +33362,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33321
33362
|
}
|
|
33322
33363
|
}
|
|
33323
33364
|
e.checkStrictMode = x;
|
|
33324
|
-
})),
|
|
33365
|
+
})), zZ = /* @__PURE__ */ W(((e) => {
|
|
33325
33366
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
33326
|
-
var t =
|
|
33367
|
+
var t = LZ();
|
|
33327
33368
|
e.default = {
|
|
33328
33369
|
data: new t.Name("data"),
|
|
33329
33370
|
valCxt: new t.Name("valCxt"),
|
|
@@ -33342,9 +33383,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33342
33383
|
jsonLen: new t.Name("jsonLen"),
|
|
33343
33384
|
jsonPart: new t.Name("jsonPart")
|
|
33344
33385
|
};
|
|
33345
|
-
})),
|
|
33386
|
+
})), BZ = /* @__PURE__ */ W(((e) => {
|
|
33346
33387
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
33347
|
-
var t =
|
|
33388
|
+
var t = LZ(), n = RZ(), r = zZ();
|
|
33348
33389
|
e.keywordError = { message: ({ keyword: e }) => (0, t.str)`must pass "${e}" keyword validation` }, e.keyword$DataError = { message: ({ keyword: e, schemaType: n }) => n ? (0, t.str)`"${e}" keyword must be ${n} ($data)` : (0, t.str)`"${e}" keyword is invalid ($data)` };
|
|
33349
33390
|
function i(n, r = e.keywordError, i, a) {
|
|
33350
33391
|
let { it: o } = n, { gen: s, compositeRule: u, allErrors: f } = o, p = d(n, r, i);
|
|
@@ -33406,9 +33447,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33406
33447
|
let { keyword: o, data: s, schemaValue: c, it: l } = e, { opts: d, propertyName: f, topSchemaRef: p, schemaPath: m } = l;
|
|
33407
33448
|
a.push([u.keyword, o], [u.params, typeof n == "function" ? n(e) : n || (0, t._)`{}`]), d.messages && a.push([u.message, typeof i == "function" ? i(e) : i]), d.verbose && a.push([u.schema, c], [u.parentSchema, (0, t._)`${p}${m}`], [r.default.data, s]), f && a.push([u.propertyName, f]);
|
|
33408
33449
|
}
|
|
33409
|
-
})),
|
|
33450
|
+
})), VZ = /* @__PURE__ */ W(((e) => {
|
|
33410
33451
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.boolOrEmptySchema = e.topBoolOrEmptySchema = void 0;
|
|
33411
|
-
var t =
|
|
33452
|
+
var t = BZ(), n = LZ(), r = zZ(), i = { message: "boolean schema is false" };
|
|
33412
33453
|
function a(e) {
|
|
33413
33454
|
let { gen: t, schema: i, validateName: a } = e;
|
|
33414
33455
|
i === !1 ? s(e, !1) : typeof i == "object" && i.$async === !0 ? t.return(r.default.data) : (t.assign((0, n._)`${a}.errors`, null), t.return(!0));
|
|
@@ -33432,7 +33473,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33432
33473
|
};
|
|
33433
33474
|
(0, t.reportError)(o, i, void 0, n);
|
|
33434
33475
|
}
|
|
33435
|
-
})),
|
|
33476
|
+
})), HZ = /* @__PURE__ */ W(((e) => {
|
|
33436
33477
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getRules = e.isJSONType = void 0;
|
|
33437
33478
|
var t = new Set([
|
|
33438
33479
|
"string",
|
|
@@ -33486,7 +33527,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33486
33527
|
};
|
|
33487
33528
|
}
|
|
33488
33529
|
e.getRules = r;
|
|
33489
|
-
})),
|
|
33530
|
+
})), UZ = /* @__PURE__ */ W(((e) => {
|
|
33490
33531
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.shouldUseRule = e.shouldUseGroup = e.schemaHasRulesForType = void 0;
|
|
33491
33532
|
function t({ schema: e, self: t }, r) {
|
|
33492
33533
|
let i = t.RULES.types[r];
|
|
@@ -33501,9 +33542,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33501
33542
|
return e[t.keyword] !== void 0 || t.definition.implements?.some((t) => e[t] !== void 0);
|
|
33502
33543
|
}
|
|
33503
33544
|
e.shouldUseRule = r;
|
|
33504
|
-
})),
|
|
33545
|
+
})), WZ = /* @__PURE__ */ W(((e) => {
|
|
33505
33546
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reportTypeError = e.checkDataTypes = e.checkDataType = e.coerceAndCheckDataType = e.getJSONTypes = e.getSchemaTypes = e.DataType = void 0;
|
|
33506
|
-
var t =
|
|
33547
|
+
var t = HZ(), n = UZ(), r = BZ(), i = LZ(), a = RZ(), o;
|
|
33507
33548
|
(function(e) {
|
|
33508
33549
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
33509
33550
|
})(o || (e.DataType = o = {}));
|
|
@@ -33638,9 +33679,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33638
33679
|
it: e
|
|
33639
33680
|
};
|
|
33640
33681
|
}
|
|
33641
|
-
})),
|
|
33682
|
+
})), GZ = /* @__PURE__ */ W(((e) => {
|
|
33642
33683
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.assignDefaults = void 0;
|
|
33643
|
-
var t =
|
|
33684
|
+
var t = LZ(), n = RZ();
|
|
33644
33685
|
function r(e, t) {
|
|
33645
33686
|
let { properties: n, items: r } = e.schema;
|
|
33646
33687
|
if (t === "object" && n) for (let t in n) i(e, t, n[t].default);
|
|
@@ -33658,9 +33699,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33658
33699
|
let u = (0, t._)`${l} === undefined`;
|
|
33659
33700
|
c.useDefaults === "empty" && (u = (0, t._)`${u} || ${l} === null || ${l} === ""`), a.if(u, (0, t._)`${l} = ${(0, t.stringify)(i)}`);
|
|
33660
33701
|
}
|
|
33661
|
-
})),
|
|
33702
|
+
})), KZ = /* @__PURE__ */ W(((e) => {
|
|
33662
33703
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateUnion = e.validateArray = e.usePattern = e.callValidateCode = e.schemaProperties = e.allSchemaProperties = e.noPropertyInData = e.propertyInData = e.isOwnProperty = e.hasPropFunc = e.reportMissingProp = e.checkMissingProp = e.checkReportMissingProp = void 0;
|
|
33663
|
-
var t =
|
|
33704
|
+
var t = LZ(), n = RZ(), r = zZ(), i = RZ();
|
|
33664
33705
|
function a(e, n) {
|
|
33665
33706
|
let { gen: r, data: i, it: a } = e;
|
|
33666
33707
|
r.if(d(r, i, n, a.opts.ownProperties), () => {
|
|
@@ -33762,9 +33803,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33762
33803
|
})), e.result(s, () => e.reset(), () => e.error(!0));
|
|
33763
33804
|
}
|
|
33764
33805
|
e.validateUnion = v;
|
|
33765
|
-
})),
|
|
33806
|
+
})), qZ = /* @__PURE__ */ W(((e) => {
|
|
33766
33807
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateKeywordUsage = e.validSchemaType = e.funcKeywordCode = e.macroKeywordCode = void 0;
|
|
33767
|
-
var t =
|
|
33808
|
+
var t = LZ(), n = zZ(), r = KZ(), i = BZ();
|
|
33768
33809
|
function a(e, n) {
|
|
33769
33810
|
let { gen: r, keyword: i, schema: a, parentSchema: o, it: s } = e, c = n.macro.call(s.self, a, o, s), l = u(r, i, c);
|
|
33770
33811
|
s.opts.validateSchema !== !1 && s.self.validateSchema(c, !0);
|
|
@@ -33843,9 +33884,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33843
33884
|
}
|
|
33844
33885
|
}
|
|
33845
33886
|
e.validateKeywordUsage = f;
|
|
33846
|
-
})),
|
|
33887
|
+
})), JZ = /* @__PURE__ */ W(((e) => {
|
|
33847
33888
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendSubschemaMode = e.extendSubschemaData = e.getSubschema = void 0;
|
|
33848
|
-
var t =
|
|
33889
|
+
var t = LZ(), n = RZ();
|
|
33849
33890
|
function r(e, { keyword: r, schemaProp: i, schema: a, schemaPath: o, errSchemaPath: s, topSchemaRef: c }) {
|
|
33850
33891
|
if (r !== void 0 && a !== void 0) throw Error("both \"keyword\" and \"schema\" passed, only one allowed");
|
|
33851
33892
|
if (r !== void 0) {
|
|
@@ -33889,7 +33930,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33889
33930
|
r !== void 0 && (e.compositeRule = r), i !== void 0 && (e.createErrors = i), a !== void 0 && (e.allErrors = a), e.jtdDiscriminator = t, e.jtdMetadata = n;
|
|
33890
33931
|
}
|
|
33891
33932
|
e.extendSubschemaMode = a;
|
|
33892
|
-
})),
|
|
33933
|
+
})), YZ = /* @__PURE__ */ W(((e, t) => {
|
|
33893
33934
|
t.exports = function e(t, n) {
|
|
33894
33935
|
if (t === n) return !0;
|
|
33895
33936
|
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
@@ -33913,7 +33954,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33913
33954
|
}
|
|
33914
33955
|
return t !== t && n !== n;
|
|
33915
33956
|
};
|
|
33916
|
-
})),
|
|
33957
|
+
})), XZ = /* @__PURE__ */ W(((e, t) => {
|
|
33917
33958
|
var n = t.exports = function(e, t, n) {
|
|
33918
33959
|
typeof t == "function" && (n = t, t = {}), n = t.cb || n;
|
|
33919
33960
|
var i = typeof n == "function" ? n : n.pre || function() {}, a = n.post || function() {};
|
|
@@ -33976,9 +34017,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
33976
34017
|
function i(e) {
|
|
33977
34018
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
33978
34019
|
}
|
|
33979
|
-
})),
|
|
34020
|
+
})), ZZ = /* @__PURE__ */ W(((e) => {
|
|
33980
34021
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getSchemaRefs = e.resolveUrl = e.normalizeId = e._getFullPath = e.getFullPath = e.inlineRef = void 0;
|
|
33981
|
-
var t =
|
|
34022
|
+
var t = RZ(), n = YZ(), r = XZ(), i = new Set([
|
|
33982
34023
|
"type",
|
|
33983
34024
|
"format",
|
|
33984
34025
|
"pattern",
|
|
@@ -34067,9 +34108,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34067
34108
|
}
|
|
34068
34109
|
}
|
|
34069
34110
|
e.getSchemaRefs = h;
|
|
34070
|
-
})),
|
|
34111
|
+
})), QZ = /* @__PURE__ */ W(((e) => {
|
|
34071
34112
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getData = e.KeywordCxt = e.validateFunctionCode = void 0;
|
|
34072
|
-
var t =
|
|
34113
|
+
var t = VZ(), n = WZ(), r = UZ(), i = WZ(), a = GZ(), o = qZ(), s = JZ(), c = LZ(), l = zZ(), u = ZZ(), d = RZ(), f = BZ();
|
|
34073
34114
|
function p(e) {
|
|
34074
34115
|
if (S(e) && (w(e), x(e))) {
|
|
34075
34116
|
_(e);
|
|
@@ -34359,23 +34400,23 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34359
34400
|
}
|
|
34360
34401
|
}
|
|
34361
34402
|
e.getData = ae;
|
|
34362
|
-
})),
|
|
34403
|
+
})), $Z = /* @__PURE__ */ W(((e) => {
|
|
34363
34404
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class extends Error {
|
|
34364
34405
|
constructor(e) {
|
|
34365
34406
|
super("validation failed"), this.errors = e, this.ajv = this.validation = !0;
|
|
34366
34407
|
}
|
|
34367
34408
|
};
|
|
34368
|
-
})),
|
|
34409
|
+
})), eQ = /* @__PURE__ */ W(((e) => {
|
|
34369
34410
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34370
|
-
var t =
|
|
34411
|
+
var t = ZZ();
|
|
34371
34412
|
e.default = class extends Error {
|
|
34372
34413
|
constructor(e, n, r, i) {
|
|
34373
34414
|
super(i || `can't resolve reference ${r} from id ${n}`), this.missingRef = (0, t.resolveUrl)(e, n, r), this.missingSchema = (0, t.normalizeId)((0, t.getFullPath)(e, this.missingRef));
|
|
34374
34415
|
}
|
|
34375
34416
|
};
|
|
34376
|
-
})),
|
|
34417
|
+
})), tQ = /* @__PURE__ */ W(((e) => {
|
|
34377
34418
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resolveSchema = e.getCompilingSchema = e.resolveRef = e.compileSchema = e.SchemaEnv = void 0;
|
|
34378
|
-
var t =
|
|
34419
|
+
var t = LZ(), n = $Z(), r = zZ(), i = ZZ(), a = RZ(), o = QZ(), s = class {
|
|
34379
34420
|
constructor(e) {
|
|
34380
34421
|
this.refs = {}, this.dynamicAnchors = {};
|
|
34381
34422
|
let t;
|
|
@@ -34534,27 +34575,27 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34534
34575
|
baseId: t
|
|
34535
34576
|
}), o.schema !== o.root.schema) return o;
|
|
34536
34577
|
}
|
|
34537
|
-
})),
|
|
34538
|
-
$id: () =>
|
|
34578
|
+
})), nQ = /* @__PURE__ */ xe({
|
|
34579
|
+
$id: () => rQ,
|
|
34539
34580
|
additionalProperties: () => !1,
|
|
34540
|
-
default: () =>
|
|
34541
|
-
description: () =>
|
|
34542
|
-
properties: () =>
|
|
34543
|
-
required: () =>
|
|
34544
|
-
type: () =>
|
|
34545
|
-
}),
|
|
34546
|
-
|
|
34581
|
+
default: () => cQ,
|
|
34582
|
+
description: () => iQ,
|
|
34583
|
+
properties: () => sQ,
|
|
34584
|
+
required: () => oQ,
|
|
34585
|
+
type: () => aQ
|
|
34586
|
+
}), rQ, iQ, aQ, oQ, sQ, cQ, lQ = be((() => {
|
|
34587
|
+
rQ = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", iQ = "Meta-schema for $data reference (JSON AnySchema extension proposal)", aQ = "object", oQ = ["$data"], sQ = { $data: {
|
|
34547
34588
|
type: "string",
|
|
34548
34589
|
anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }]
|
|
34549
|
-
} },
|
|
34550
|
-
$id:
|
|
34551
|
-
description:
|
|
34552
|
-
type:
|
|
34553
|
-
required:
|
|
34554
|
-
properties:
|
|
34590
|
+
} }, cQ = {
|
|
34591
|
+
$id: rQ,
|
|
34592
|
+
description: iQ,
|
|
34593
|
+
type: aQ,
|
|
34594
|
+
required: oQ,
|
|
34595
|
+
properties: sQ,
|
|
34555
34596
|
additionalProperties: !1
|
|
34556
34597
|
};
|
|
34557
|
-
})),
|
|
34598
|
+
})), uQ = /* @__PURE__ */ W(((e, t) => {
|
|
34558
34599
|
var n = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), r = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u), i = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu), a = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu), o = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
34559
34600
|
function s(e) {
|
|
34560
34601
|
let t = "", n = 0, r = 0;
|
|
@@ -34766,8 +34807,8 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34766
34807
|
normalizeIPv6: f,
|
|
34767
34808
|
stringArrayToHexStripped: s
|
|
34768
34809
|
};
|
|
34769
|
-
})),
|
|
34770
|
-
var { isUUID: n } =
|
|
34810
|
+
})), dQ = /* @__PURE__ */ W(((e, t) => {
|
|
34811
|
+
var { isUUID: n } = uQ(), r = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, i = [
|
|
34771
34812
|
"http",
|
|
34772
34813
|
"https",
|
|
34773
34814
|
"ws",
|
|
@@ -34872,8 +34913,8 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34872
34913
|
isValidSchemeName: a,
|
|
34873
34914
|
getSchemeHandler: y
|
|
34874
34915
|
};
|
|
34875
|
-
})),
|
|
34876
|
-
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizePercentEncoding: a, normalizePathEncoding: o, escapePreservingEscapes: s, reescapeHostDelimiters: c, isIPv4: l, nonSimpleDomain: u } =
|
|
34916
|
+
})), fQ = /* @__PURE__ */ W(((e, t) => {
|
|
34917
|
+
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizePercentEncoding: a, normalizePathEncoding: o, escapePreservingEscapes: s, reescapeHostDelimiters: c, isIPv4: l, nonSimpleDomain: u } = uQ(), { SCHEMES: d, getSchemeHandler: f } = dQ();
|
|
34877
34918
|
function p(e, t) {
|
|
34878
34919
|
return typeof e == "string" ? e = S(e, t) : typeof e == "object" && (e = x(_(e, t), t)), e;
|
|
34879
34920
|
}
|
|
@@ -34987,20 +35028,20 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
34987
35028
|
parse: x
|
|
34988
35029
|
};
|
|
34989
35030
|
t.exports = T, t.exports.default = T, t.exports.fastUri = T;
|
|
34990
|
-
})),
|
|
35031
|
+
})), pQ = /* @__PURE__ */ W(((e) => {
|
|
34991
35032
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
34992
|
-
var t =
|
|
35033
|
+
var t = fQ();
|
|
34993
35034
|
t.code = "require(\"ajv/dist/runtime/uri\").default", e.default = t;
|
|
34994
|
-
})),
|
|
35035
|
+
})), mQ = /* @__PURE__ */ W(((e) => {
|
|
34995
35036
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
34996
|
-
var t =
|
|
35037
|
+
var t = QZ();
|
|
34997
35038
|
Object.defineProperty(e, "KeywordCxt", {
|
|
34998
35039
|
enumerable: !0,
|
|
34999
35040
|
get: function() {
|
|
35000
35041
|
return t.KeywordCxt;
|
|
35001
35042
|
}
|
|
35002
35043
|
});
|
|
35003
|
-
var n =
|
|
35044
|
+
var n = LZ();
|
|
35004
35045
|
Object.defineProperty(e, "_", {
|
|
35005
35046
|
enumerable: !0,
|
|
35006
35047
|
get: function() {
|
|
@@ -35032,7 +35073,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35032
35073
|
return n.CodeGen;
|
|
35033
35074
|
}
|
|
35034
35075
|
});
|
|
35035
|
-
var r =
|
|
35076
|
+
var r = $Z(), i = eQ(), a = HZ(), o = tQ(), s = LZ(), c = ZZ(), l = WZ(), u = RZ(), d = (lQ(), we(nQ).default), f = pQ(), p = (e, t) => new RegExp(e, t);
|
|
35036
35077
|
p.code = "new RegExp";
|
|
35037
35078
|
var m = [
|
|
35038
35079
|
"removeAdditional",
|
|
@@ -35418,16 +35459,16 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35418
35459
|
function F(e) {
|
|
35419
35460
|
return { anyOf: [e, P] };
|
|
35420
35461
|
}
|
|
35421
|
-
})),
|
|
35462
|
+
})), hQ = /* @__PURE__ */ W(((e) => {
|
|
35422
35463
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
35423
35464
|
keyword: "id",
|
|
35424
35465
|
code() {
|
|
35425
35466
|
throw Error("NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID");
|
|
35426
35467
|
}
|
|
35427
35468
|
};
|
|
35428
|
-
})),
|
|
35469
|
+
})), gQ = /* @__PURE__ */ W(((e) => {
|
|
35429
35470
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.callRef = e.getValidate = void 0;
|
|
35430
|
-
var t =
|
|
35471
|
+
var t = eQ(), n = KZ(), r = LZ(), i = zZ(), a = tQ(), o = RZ(), s = {
|
|
35431
35472
|
keyword: "$ref",
|
|
35432
35473
|
schemaType: "string",
|
|
35433
35474
|
code(e) {
|
|
@@ -35500,9 +35541,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35500
35541
|
}
|
|
35501
35542
|
}
|
|
35502
35543
|
e.callRef = l, e.default = s;
|
|
35503
|
-
})),
|
|
35544
|
+
})), _Q = /* @__PURE__ */ W(((e) => {
|
|
35504
35545
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35505
|
-
var t =
|
|
35546
|
+
var t = hQ(), n = gQ();
|
|
35506
35547
|
e.default = [
|
|
35507
35548
|
"$schema",
|
|
35508
35549
|
"$id",
|
|
@@ -35513,9 +35554,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35513
35554
|
t.default,
|
|
35514
35555
|
n.default
|
|
35515
35556
|
];
|
|
35516
|
-
})),
|
|
35557
|
+
})), vQ = /* @__PURE__ */ W(((e) => {
|
|
35517
35558
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35518
|
-
var t =
|
|
35559
|
+
var t = LZ(), n = t.operators, r = {
|
|
35519
35560
|
maximum: {
|
|
35520
35561
|
okStr: "<=",
|
|
35521
35562
|
ok: n.LTE,
|
|
@@ -35551,9 +35592,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35551
35592
|
e.fail$data((0, t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`);
|
|
35552
35593
|
}
|
|
35553
35594
|
};
|
|
35554
|
-
})),
|
|
35595
|
+
})), yQ = /* @__PURE__ */ W(((e) => {
|
|
35555
35596
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35556
|
-
var t =
|
|
35597
|
+
var t = LZ();
|
|
35557
35598
|
e.default = {
|
|
35558
35599
|
keyword: "multipleOf",
|
|
35559
35600
|
type: "number",
|
|
@@ -35568,7 +35609,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35568
35609
|
e.fail$data((0, t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`);
|
|
35569
35610
|
}
|
|
35570
35611
|
};
|
|
35571
|
-
})),
|
|
35612
|
+
})), bQ = /* @__PURE__ */ W(((e) => {
|
|
35572
35613
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35573
35614
|
function t(e) {
|
|
35574
35615
|
let t = e.length, n = 0, r = 0, i;
|
|
@@ -35576,9 +35617,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35576
35617
|
return n;
|
|
35577
35618
|
}
|
|
35578
35619
|
e.default = t, t.code = "require(\"ajv/dist/runtime/ucs2length\").default";
|
|
35579
|
-
})),
|
|
35620
|
+
})), xQ = /* @__PURE__ */ W(((e) => {
|
|
35580
35621
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35581
|
-
var t =
|
|
35622
|
+
var t = LZ(), n = RZ(), r = bQ();
|
|
35582
35623
|
e.default = {
|
|
35583
35624
|
keyword: ["maxLength", "minLength"],
|
|
35584
35625
|
type: "string",
|
|
@@ -35596,9 +35637,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35596
35637
|
e.fail$data((0, t._)`${l} ${c} ${o}`);
|
|
35597
35638
|
}
|
|
35598
35639
|
};
|
|
35599
|
-
})),
|
|
35640
|
+
})), SQ = /* @__PURE__ */ W(((e) => {
|
|
35600
35641
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35601
|
-
var t =
|
|
35642
|
+
var t = KZ(), n = RZ(), r = LZ();
|
|
35602
35643
|
e.default = {
|
|
35603
35644
|
keyword: "pattern",
|
|
35604
35645
|
type: "string",
|
|
@@ -35619,9 +35660,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35619
35660
|
}
|
|
35620
35661
|
}
|
|
35621
35662
|
};
|
|
35622
|
-
})),
|
|
35663
|
+
})), CQ = /* @__PURE__ */ W(((e) => {
|
|
35623
35664
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35624
|
-
var t =
|
|
35665
|
+
var t = LZ();
|
|
35625
35666
|
e.default = {
|
|
35626
35667
|
keyword: ["maxProperties", "minProperties"],
|
|
35627
35668
|
type: "object",
|
|
@@ -35639,9 +35680,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35639
35680
|
e.fail$data((0, t._)`Object.keys(${r}).length ${a} ${i}`);
|
|
35640
35681
|
}
|
|
35641
35682
|
};
|
|
35642
|
-
})),
|
|
35683
|
+
})), wQ = /* @__PURE__ */ W(((e) => {
|
|
35643
35684
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35644
|
-
var t =
|
|
35685
|
+
var t = KZ(), n = LZ(), r = RZ();
|
|
35645
35686
|
e.default = {
|
|
35646
35687
|
keyword: "required",
|
|
35647
35688
|
type: "object",
|
|
@@ -35687,9 +35728,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35687
35728
|
}
|
|
35688
35729
|
}
|
|
35689
35730
|
};
|
|
35690
|
-
})),
|
|
35731
|
+
})), TQ = /* @__PURE__ */ W(((e) => {
|
|
35691
35732
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35692
|
-
var t =
|
|
35733
|
+
var t = LZ();
|
|
35693
35734
|
e.default = {
|
|
35694
35735
|
keyword: ["maxItems", "minItems"],
|
|
35695
35736
|
type: "array",
|
|
@@ -35707,13 +35748,13 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35707
35748
|
e.fail$data((0, t._)`${r}.length ${a} ${i}`);
|
|
35708
35749
|
}
|
|
35709
35750
|
};
|
|
35710
|
-
})),
|
|
35751
|
+
})), EQ = /* @__PURE__ */ W(((e) => {
|
|
35711
35752
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35712
|
-
var t =
|
|
35753
|
+
var t = YZ();
|
|
35713
35754
|
t.code = "require(\"ajv/dist/runtime/equal\").default", e.default = t;
|
|
35714
|
-
})),
|
|
35755
|
+
})), DQ = /* @__PURE__ */ W(((e) => {
|
|
35715
35756
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35716
|
-
var t =
|
|
35757
|
+
var t = WZ(), n = LZ(), r = RZ(), i = EQ();
|
|
35717
35758
|
e.default = {
|
|
35718
35759
|
keyword: "uniqueItems",
|
|
35719
35760
|
type: "array",
|
|
@@ -35754,9 +35795,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35754
35795
|
}
|
|
35755
35796
|
}
|
|
35756
35797
|
};
|
|
35757
|
-
})),
|
|
35798
|
+
})), OQ = /* @__PURE__ */ W(((e) => {
|
|
35758
35799
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35759
|
-
var t =
|
|
35800
|
+
var t = LZ(), n = RZ(), r = EQ();
|
|
35760
35801
|
e.default = {
|
|
35761
35802
|
keyword: "const",
|
|
35762
35803
|
$data: !0,
|
|
@@ -35769,9 +35810,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35769
35810
|
o || c && typeof c == "object" ? e.fail$data((0, t._)`!${(0, n.useFunc)(i, r.default)}(${a}, ${s})`) : e.fail((0, t._)`${c} !== ${a}`);
|
|
35770
35811
|
}
|
|
35771
35812
|
};
|
|
35772
|
-
})),
|
|
35813
|
+
})), kQ = /* @__PURE__ */ W(((e) => {
|
|
35773
35814
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35774
|
-
var t =
|
|
35815
|
+
var t = LZ(), n = RZ(), r = EQ();
|
|
35775
35816
|
e.default = {
|
|
35776
35817
|
keyword: "enum",
|
|
35777
35818
|
schemaType: "array",
|
|
@@ -35801,9 +35842,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35801
35842
|
}
|
|
35802
35843
|
}
|
|
35803
35844
|
};
|
|
35804
|
-
})),
|
|
35845
|
+
})), AQ = /* @__PURE__ */ W(((e) => {
|
|
35805
35846
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35806
|
-
var t =
|
|
35847
|
+
var t = vQ(), n = yQ(), r = xQ(), i = SQ(), a = CQ(), o = wQ(), s = TQ(), c = DQ(), l = OQ(), u = kQ();
|
|
35807
35848
|
e.default = [
|
|
35808
35849
|
t.default,
|
|
35809
35850
|
n.default,
|
|
@@ -35824,9 +35865,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35824
35865
|
l.default,
|
|
35825
35866
|
u.default
|
|
35826
35867
|
];
|
|
35827
|
-
})),
|
|
35868
|
+
})), jQ = /* @__PURE__ */ W(((e) => {
|
|
35828
35869
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateAdditionalItems = void 0;
|
|
35829
|
-
var t =
|
|
35870
|
+
var t = LZ(), n = RZ(), r = {
|
|
35830
35871
|
keyword: "additionalItems",
|
|
35831
35872
|
type: "array",
|
|
35832
35873
|
schemaType: ["boolean", "object"],
|
|
@@ -35864,9 +35905,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35864
35905
|
}
|
|
35865
35906
|
}
|
|
35866
35907
|
e.validateAdditionalItems = i, e.default = r;
|
|
35867
|
-
})),
|
|
35908
|
+
})), MQ = /* @__PURE__ */ W(((e) => {
|
|
35868
35909
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateTuple = void 0;
|
|
35869
|
-
var t =
|
|
35910
|
+
var t = LZ(), n = RZ(), r = KZ(), i = {
|
|
35870
35911
|
keyword: "items",
|
|
35871
35912
|
type: "array",
|
|
35872
35913
|
schemaType: [
|
|
@@ -35901,9 +35942,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35901
35942
|
}
|
|
35902
35943
|
}
|
|
35903
35944
|
e.validateTuple = a, e.default = i;
|
|
35904
|
-
})),
|
|
35945
|
+
})), NQ = /* @__PURE__ */ W(((e) => {
|
|
35905
35946
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35906
|
-
var t =
|
|
35947
|
+
var t = MQ();
|
|
35907
35948
|
e.default = {
|
|
35908
35949
|
keyword: "prefixItems",
|
|
35909
35950
|
type: "array",
|
|
@@ -35911,9 +35952,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35911
35952
|
before: "uniqueItems",
|
|
35912
35953
|
code: (e) => (0, t.validateTuple)(e, "items")
|
|
35913
35954
|
};
|
|
35914
|
-
})),
|
|
35955
|
+
})), PQ = /* @__PURE__ */ W(((e) => {
|
|
35915
35956
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35916
|
-
var t =
|
|
35957
|
+
var t = LZ(), n = RZ(), r = KZ(), i = jQ();
|
|
35917
35958
|
e.default = {
|
|
35918
35959
|
keyword: "items",
|
|
35919
35960
|
type: "array",
|
|
@@ -35928,9 +35969,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35928
35969
|
o.items = !0, !(0, n.alwaysValidSchema)(o, t) && (s ? (0, i.validateAdditionalItems)(e, s) : e.ok((0, r.validateArray)(e)));
|
|
35929
35970
|
}
|
|
35930
35971
|
};
|
|
35931
|
-
})),
|
|
35972
|
+
})), FQ = /* @__PURE__ */ W(((e) => {
|
|
35932
35973
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
35933
|
-
var t =
|
|
35974
|
+
var t = LZ(), n = RZ();
|
|
35934
35975
|
e.default = {
|
|
35935
35976
|
keyword: "contains",
|
|
35936
35977
|
type: "array",
|
|
@@ -35983,9 +36024,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
35983
36024
|
}
|
|
35984
36025
|
}
|
|
35985
36026
|
};
|
|
35986
|
-
})),
|
|
36027
|
+
})), IQ = /* @__PURE__ */ W(((e) => {
|
|
35987
36028
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
35988
|
-
var t =
|
|
36029
|
+
var t = LZ(), n = RZ(), r = KZ();
|
|
35989
36030
|
e.error = {
|
|
35990
36031
|
message: ({ params: { property: e, depsCount: n, deps: r } }) => {
|
|
35991
36032
|
let i = n === 1 ? "property" : "properties";
|
|
@@ -36044,9 +36085,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36044
36085
|
}, () => i.var(c, !0)), e.ok(c));
|
|
36045
36086
|
}
|
|
36046
36087
|
e.validateSchemaDeps = s, e.default = i;
|
|
36047
|
-
})),
|
|
36088
|
+
})), LQ = /* @__PURE__ */ W(((e) => {
|
|
36048
36089
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36049
|
-
var t =
|
|
36090
|
+
var t = LZ(), n = RZ();
|
|
36050
36091
|
e.default = {
|
|
36051
36092
|
keyword: "propertyNames",
|
|
36052
36093
|
type: "object",
|
|
@@ -36072,9 +36113,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36072
36113
|
}), e.ok(s);
|
|
36073
36114
|
}
|
|
36074
36115
|
};
|
|
36075
|
-
})),
|
|
36116
|
+
})), RQ = /* @__PURE__ */ W(((e) => {
|
|
36076
36117
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36077
|
-
var t =
|
|
36118
|
+
var t = KZ(), n = LZ(), r = zZ(), i = RZ();
|
|
36078
36119
|
e.default = {
|
|
36079
36120
|
keyword: "additionalProperties",
|
|
36080
36121
|
type: ["object"],
|
|
@@ -36139,9 +36180,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36139
36180
|
}
|
|
36140
36181
|
}
|
|
36141
36182
|
};
|
|
36142
|
-
})),
|
|
36183
|
+
})), zQ = /* @__PURE__ */ W(((e) => {
|
|
36143
36184
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36144
|
-
var t =
|
|
36185
|
+
var t = QZ(), n = KZ(), r = RZ(), i = RQ();
|
|
36145
36186
|
e.default = {
|
|
36146
36187
|
keyword: "properties",
|
|
36147
36188
|
type: "object",
|
|
@@ -36168,9 +36209,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36168
36209
|
}
|
|
36169
36210
|
}
|
|
36170
36211
|
};
|
|
36171
|
-
})),
|
|
36212
|
+
})), BQ = /* @__PURE__ */ W(((e) => {
|
|
36172
36213
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36173
|
-
var t =
|
|
36214
|
+
var t = KZ(), n = LZ(), r = RZ(), i = RZ();
|
|
36174
36215
|
e.default = {
|
|
36175
36216
|
keyword: "patternProperties",
|
|
36176
36217
|
type: "object",
|
|
@@ -36203,9 +36244,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36203
36244
|
}
|
|
36204
36245
|
}
|
|
36205
36246
|
};
|
|
36206
|
-
})),
|
|
36247
|
+
})), VQ = /* @__PURE__ */ W(((e) => {
|
|
36207
36248
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36208
|
-
var t =
|
|
36249
|
+
var t = RZ();
|
|
36209
36250
|
e.default = {
|
|
36210
36251
|
keyword: "not",
|
|
36211
36252
|
schemaType: ["object", "boolean"],
|
|
@@ -36226,17 +36267,17 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36226
36267
|
},
|
|
36227
36268
|
error: { message: "must NOT be valid" }
|
|
36228
36269
|
};
|
|
36229
|
-
})),
|
|
36270
|
+
})), HQ = /* @__PURE__ */ W(((e) => {
|
|
36230
36271
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
36231
36272
|
keyword: "anyOf",
|
|
36232
36273
|
schemaType: "array",
|
|
36233
36274
|
trackErrors: !0,
|
|
36234
|
-
code:
|
|
36275
|
+
code: KZ().validateUnion,
|
|
36235
36276
|
error: { message: "must match a schema in anyOf" }
|
|
36236
36277
|
};
|
|
36237
|
-
})),
|
|
36278
|
+
})), UQ = /* @__PURE__ */ W(((e) => {
|
|
36238
36279
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36239
|
-
var t =
|
|
36280
|
+
var t = LZ(), n = RZ();
|
|
36240
36281
|
e.default = {
|
|
36241
36282
|
keyword: "oneOf",
|
|
36242
36283
|
schemaType: "array",
|
|
@@ -36266,9 +36307,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36266
36307
|
}
|
|
36267
36308
|
}
|
|
36268
36309
|
};
|
|
36269
|
-
})),
|
|
36310
|
+
})), WQ = /* @__PURE__ */ W(((e) => {
|
|
36270
36311
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36271
|
-
var t =
|
|
36312
|
+
var t = RZ();
|
|
36272
36313
|
e.default = {
|
|
36273
36314
|
keyword: "allOf",
|
|
36274
36315
|
schemaType: "array",
|
|
@@ -36287,9 +36328,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36287
36328
|
});
|
|
36288
36329
|
}
|
|
36289
36330
|
};
|
|
36290
|
-
})),
|
|
36331
|
+
})), GQ = /* @__PURE__ */ W(((e) => {
|
|
36291
36332
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36292
|
-
var t =
|
|
36333
|
+
var t = LZ(), n = RZ(), r = {
|
|
36293
36334
|
keyword: "if",
|
|
36294
36335
|
schemaType: ["object", "boolean"],
|
|
36295
36336
|
trackErrors: !0,
|
|
@@ -36330,9 +36371,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36330
36371
|
return r !== void 0 && !(0, n.alwaysValidSchema)(e, r);
|
|
36331
36372
|
}
|
|
36332
36373
|
e.default = r;
|
|
36333
|
-
})),
|
|
36374
|
+
})), KQ = /* @__PURE__ */ W(((e) => {
|
|
36334
36375
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36335
|
-
var t =
|
|
36376
|
+
var t = RZ();
|
|
36336
36377
|
e.default = {
|
|
36337
36378
|
keyword: ["then", "else"],
|
|
36338
36379
|
schemaType: ["object", "boolean"],
|
|
@@ -36340,9 +36381,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36340
36381
|
n.if === void 0 && (0, t.checkStrictMode)(r, `"${e}" without "if" is ignored`);
|
|
36341
36382
|
}
|
|
36342
36383
|
};
|
|
36343
|
-
})),
|
|
36384
|
+
})), qQ = /* @__PURE__ */ W(((e) => {
|
|
36344
36385
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36345
|
-
var t =
|
|
36386
|
+
var t = jQ(), n = NQ(), r = MQ(), i = PQ(), a = FQ(), o = IQ(), s = LQ(), c = RQ(), l = zQ(), u = BQ(), d = VQ(), f = HQ(), p = UQ(), m = WQ(), h = GQ(), g = KQ();
|
|
36346
36387
|
function _(e = !1) {
|
|
36347
36388
|
let _ = [
|
|
36348
36389
|
d.default,
|
|
@@ -36360,9 +36401,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36360
36401
|
return e ? _.push(n.default, i.default) : _.push(t.default, r.default), _.push(a.default), _;
|
|
36361
36402
|
}
|
|
36362
36403
|
e.default = _;
|
|
36363
|
-
})),
|
|
36404
|
+
})), JQ = /* @__PURE__ */ W(((e) => {
|
|
36364
36405
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36365
|
-
var t =
|
|
36406
|
+
var t = LZ();
|
|
36366
36407
|
e.default = {
|
|
36367
36408
|
keyword: "format",
|
|
36368
36409
|
type: ["number", "string"],
|
|
@@ -36435,9 +36476,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36435
36476
|
}
|
|
36436
36477
|
}
|
|
36437
36478
|
};
|
|
36438
|
-
})), JQ = /* @__PURE__ */ W(((e) => {
|
|
36439
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [qQ().default];
|
|
36440
36479
|
})), YQ = /* @__PURE__ */ W(((e) => {
|
|
36480
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [JQ().default];
|
|
36481
|
+
})), XQ = /* @__PURE__ */ W(((e) => {
|
|
36441
36482
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.contentVocabulary = e.metadataVocabulary = void 0, e.metadataVocabulary = [
|
|
36442
36483
|
"title",
|
|
36443
36484
|
"description",
|
|
@@ -36451,9 +36492,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36451
36492
|
"contentEncoding",
|
|
36452
36493
|
"contentSchema"
|
|
36453
36494
|
];
|
|
36454
|
-
})),
|
|
36495
|
+
})), ZQ = /* @__PURE__ */ W(((e) => {
|
|
36455
36496
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36456
|
-
var t =
|
|
36497
|
+
var t = _Q(), n = AQ(), r = qQ(), i = YQ(), a = XQ();
|
|
36457
36498
|
e.default = [
|
|
36458
36499
|
t.default,
|
|
36459
36500
|
n.default,
|
|
@@ -36462,15 +36503,15 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36462
36503
|
a.metadataVocabulary,
|
|
36463
36504
|
a.contentVocabulary
|
|
36464
36505
|
];
|
|
36465
|
-
})),
|
|
36506
|
+
})), QQ = /* @__PURE__ */ W(((e) => {
|
|
36466
36507
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DiscrError = void 0;
|
|
36467
36508
|
var t;
|
|
36468
36509
|
(function(e) {
|
|
36469
36510
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
36470
36511
|
})(t || (e.DiscrError = t = {}));
|
|
36471
|
-
})),
|
|
36512
|
+
})), $Q = /* @__PURE__ */ W(((e) => {
|
|
36472
36513
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36473
|
-
var t =
|
|
36514
|
+
var t = LZ(), n = QQ(), r = tQ(), i = eQ(), a = RZ();
|
|
36474
36515
|
e.default = {
|
|
36475
36516
|
keyword: "discriminator",
|
|
36476
36517
|
type: "object",
|
|
@@ -36538,16 +36579,16 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36538
36579
|
}
|
|
36539
36580
|
}
|
|
36540
36581
|
};
|
|
36541
|
-
})), $
|
|
36542
|
-
$id: () =>
|
|
36543
|
-
$schema: () =>
|
|
36544
|
-
default: () =>
|
|
36545
|
-
definitions: () =>
|
|
36546
|
-
properties: () =>
|
|
36547
|
-
title: () =>
|
|
36548
|
-
type: () =>
|
|
36549
|
-
}),
|
|
36550
|
-
|
|
36582
|
+
})), e$ = /* @__PURE__ */ xe({
|
|
36583
|
+
$id: () => n$,
|
|
36584
|
+
$schema: () => t$,
|
|
36585
|
+
default: () => s$,
|
|
36586
|
+
definitions: () => i$,
|
|
36587
|
+
properties: () => o$,
|
|
36588
|
+
title: () => r$,
|
|
36589
|
+
type: () => a$
|
|
36590
|
+
}), t$, n$, r$, i$, a$, o$, s$, c$ = be((() => {
|
|
36591
|
+
t$ = "http://json-schema.org/draft-07/schema#", n$ = "http://json-schema.org/draft-07/schema#", r$ = "Core schema meta-schema", i$ = {
|
|
36551
36592
|
schemaArray: {
|
|
36552
36593
|
type: "array",
|
|
36553
36594
|
minItems: 1,
|
|
@@ -36573,7 +36614,7 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36573
36614
|
uniqueItems: !0,
|
|
36574
36615
|
default: []
|
|
36575
36616
|
}
|
|
36576
|
-
},
|
|
36617
|
+
}, a$ = ["object", "boolean"], o$ = {
|
|
36577
36618
|
$id: {
|
|
36578
36619
|
type: "string",
|
|
36579
36620
|
format: "uri-reference"
|
|
@@ -36672,18 +36713,18 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36672
36713
|
anyOf: { $ref: "#/definitions/schemaArray" },
|
|
36673
36714
|
oneOf: { $ref: "#/definitions/schemaArray" },
|
|
36674
36715
|
not: { $ref: "#" }
|
|
36675
|
-
},
|
|
36676
|
-
$schema:
|
|
36677
|
-
$id:
|
|
36678
|
-
title:
|
|
36679
|
-
definitions:
|
|
36680
|
-
type:
|
|
36681
|
-
properties:
|
|
36716
|
+
}, s$ = {
|
|
36717
|
+
$schema: t$,
|
|
36718
|
+
$id: n$,
|
|
36719
|
+
title: r$,
|
|
36720
|
+
definitions: i$,
|
|
36721
|
+
type: a$,
|
|
36722
|
+
properties: o$,
|
|
36682
36723
|
default: !0
|
|
36683
36724
|
};
|
|
36684
|
-
})),
|
|
36725
|
+
})), l$ = /* @__PURE__ */ W(((e, t) => {
|
|
36685
36726
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MissingRefError = e.ValidationError = e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = e.Ajv = void 0;
|
|
36686
|
-
var n =
|
|
36727
|
+
var n = mQ(), r = ZQ(), i = $Q(), a = (c$(), we(e$).default), o = ["/properties"], s = "http://json-schema.org/draft-07/schema", c = class extends n.default {
|
|
36687
36728
|
_addVocabularies() {
|
|
36688
36729
|
super._addVocabularies(), r.default.forEach((e) => this.addVocabulary(e)), this.opts.discriminator && this.addKeyword(i.default);
|
|
36689
36730
|
}
|
|
@@ -36697,14 +36738,14 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36697
36738
|
}
|
|
36698
36739
|
};
|
|
36699
36740
|
e.Ajv = c, t.exports = e = c, t.exports.Ajv = c, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
36700
|
-
var l =
|
|
36741
|
+
var l = QZ();
|
|
36701
36742
|
Object.defineProperty(e, "KeywordCxt", {
|
|
36702
36743
|
enumerable: !0,
|
|
36703
36744
|
get: function() {
|
|
36704
36745
|
return l.KeywordCxt;
|
|
36705
36746
|
}
|
|
36706
36747
|
});
|
|
36707
|
-
var u =
|
|
36748
|
+
var u = LZ();
|
|
36708
36749
|
Object.defineProperty(e, "_", {
|
|
36709
36750
|
enumerable: !0,
|
|
36710
36751
|
get: function() {
|
|
@@ -36736,21 +36777,21 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36736
36777
|
return u.CodeGen;
|
|
36737
36778
|
}
|
|
36738
36779
|
});
|
|
36739
|
-
var d =
|
|
36780
|
+
var d = $Z();
|
|
36740
36781
|
Object.defineProperty(e, "ValidationError", {
|
|
36741
36782
|
enumerable: !0,
|
|
36742
36783
|
get: function() {
|
|
36743
36784
|
return d.default;
|
|
36744
36785
|
}
|
|
36745
36786
|
});
|
|
36746
|
-
var f =
|
|
36787
|
+
var f = eQ();
|
|
36747
36788
|
Object.defineProperty(e, "MissingRefError", {
|
|
36748
36789
|
enumerable: !0,
|
|
36749
36790
|
get: function() {
|
|
36750
36791
|
return f.default;
|
|
36751
36792
|
}
|
|
36752
36793
|
});
|
|
36753
|
-
})),
|
|
36794
|
+
})), u$ = /* @__PURE__ */ W(((e) => {
|
|
36754
36795
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatNames = e.fastFormats = e.fullFormats = void 0;
|
|
36755
36796
|
function t(e, t) {
|
|
36756
36797
|
return {
|
|
@@ -36902,9 +36943,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36902
36943
|
return !1;
|
|
36903
36944
|
}
|
|
36904
36945
|
}
|
|
36905
|
-
})),
|
|
36946
|
+
})), d$ = /* @__PURE__ */ W(((e) => {
|
|
36906
36947
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatLimitDefinition = void 0;
|
|
36907
|
-
var t =
|
|
36948
|
+
var t = l$(), n = LZ(), r = n.operators, i = {
|
|
36908
36949
|
formatMaximum: {
|
|
36909
36950
|
okStr: "<=",
|
|
36910
36951
|
ok: r.LTE,
|
|
@@ -36964,9 +37005,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36964
37005
|
},
|
|
36965
37006
|
dependencies: ["format"]
|
|
36966
37007
|
}, e.default = (t) => (t.addKeyword(e.formatLimitDefinition), t);
|
|
36967
|
-
})),
|
|
37008
|
+
})), f$ = /* @__PURE__ */ W(((e, t) => {
|
|
36968
37009
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
36969
|
-
var n =
|
|
37010
|
+
var n = u$(), r = d$(), i = LZ(), a = new i.Name("fullFormats"), o = new i.Name("fastFormats"), s = (e, t = { keywords: !0 }) => {
|
|
36970
37011
|
if (Array.isArray(t)) return c(e, t, n.fullFormats, a), e;
|
|
36971
37012
|
let [i, s] = t.mode === "fast" ? [n.fastFormats, o] : [n.fullFormats, a];
|
|
36972
37013
|
return c(e, t.formats || n.formatNames, i, s), t.keywords && (0, r.default)(e), e;
|
|
@@ -36982,9 +37023,9 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36982
37023
|
for (let r of t) e.addFormat(r, n[r]);
|
|
36983
37024
|
}
|
|
36984
37025
|
t.exports = e = s, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
36985
|
-
})),
|
|
37026
|
+
})), p$ = /* @__PURE__ */ Ce(l$(), 1), m$ = /* @__PURE__ */ Ce(f$(), 1), h$ = {
|
|
36986
37027
|
required: () => "This field is required",
|
|
36987
|
-
type: (e) => `Should be "${
|
|
37028
|
+
type: (e) => `Should be "${_$(e)}".`,
|
|
36988
37029
|
minLength: (e) => e.params.limit === 1 ? "This field must not be empty" : `Should NOT be shorter than ${e.params.limit} characters`,
|
|
36989
37030
|
maxLength: (e) => `Should NOT be longer than ${e.params.limit} characters`,
|
|
36990
37031
|
minimum: (e) => `Should be >= ${e.params.limit}`,
|
|
@@ -36996,63 +37037,63 @@ var PZ = /* @__PURE__ */ W(((e) => {
|
|
|
36996
37037
|
maxItems: (e) => `Should NOT have more than ${e.params.limit} items`,
|
|
36997
37038
|
uniqueItems: () => "Should NOT have duplicate items",
|
|
36998
37039
|
const: (e) => `Should be equal to constant "${e.params.allowedValue}"`,
|
|
36999
|
-
pattern: (e, t) => `${
|
|
37040
|
+
pattern: (e, t) => `${jX(t)} value does not respect the pattern: ${e.params.pattern}`,
|
|
37000
37041
|
format: (e) => `Should be a valid ${e.params.format}`,
|
|
37001
37042
|
uniqueItemProperties: (e) => `${e.params.propertyName ?? "This field"} must be unique`
|
|
37002
37043
|
};
|
|
37003
|
-
function
|
|
37004
|
-
let n =
|
|
37044
|
+
function g$(e, t) {
|
|
37045
|
+
let n = h$[e.keyword];
|
|
37005
37046
|
return n ? n(e, t) : e.message ?? "Invalid value";
|
|
37006
37047
|
}
|
|
37007
|
-
function
|
|
37048
|
+
function _$(e) {
|
|
37008
37049
|
let t = e.params.type;
|
|
37009
37050
|
return String(Array.isArray(t) ? t[0] : t);
|
|
37010
37051
|
}
|
|
37011
37052
|
//#endregion
|
|
37012
37053
|
//#region src/composed/JsonSchemaForm/form-bindings/resolveAt.ts
|
|
37013
|
-
function
|
|
37054
|
+
function v$(e, t, n) {
|
|
37014
37055
|
let r = t === "" ? [] : t.split("."), i = e.root, a = n, o = [];
|
|
37015
37056
|
for (let e of r) {
|
|
37016
37057
|
if (!i) return {
|
|
37017
37058
|
node: void 0,
|
|
37018
37059
|
value: void 0
|
|
37019
37060
|
};
|
|
37020
|
-
i =
|
|
37061
|
+
i = y$(i, a, n, o), /^\d+$/.test(e) ? (i = i.items, a = Array.isArray(a) ? a[Number(e)] : void 0) : (i = i.properties?.get(e), a = a && typeof a == "object" ? a[e] : void 0), o.push(e);
|
|
37021
37062
|
}
|
|
37022
37063
|
return i ? {
|
|
37023
|
-
node:
|
|
37064
|
+
node: b$(y$(i, a, n, r), r),
|
|
37024
37065
|
value: a
|
|
37025
37066
|
} : {
|
|
37026
37067
|
node: void 0,
|
|
37027
37068
|
value: a
|
|
37028
37069
|
};
|
|
37029
37070
|
}
|
|
37030
|
-
function
|
|
37031
|
-
let i = new Map(e.properties), a = e.variants ?
|
|
37071
|
+
function y$(e, t, n, r) {
|
|
37072
|
+
let i = new Map(e.properties), a = e.variants ? C$(e.variants, t) : void 0;
|
|
37032
37073
|
if (a) for (let [e, t] of a.properties) i.set(e, t);
|
|
37033
37074
|
let o = [...e.dependencyBranches ?? [], ...a?.dependencyBranches ?? []];
|
|
37034
37075
|
if (o.length > 0) {
|
|
37035
|
-
for (let e of o) if (
|
|
37076
|
+
for (let e of o) if (x$(e.showIf.$eq, n, r)) for (let [t, n] of e.properties) i.set(t, n);
|
|
37036
37077
|
}
|
|
37037
37078
|
return i.size > (e.properties?.size ?? 0) ? {
|
|
37038
37079
|
...e,
|
|
37039
37080
|
properties: i
|
|
37040
37081
|
} : e;
|
|
37041
37082
|
}
|
|
37042
|
-
function
|
|
37083
|
+
function b$(e, t) {
|
|
37043
37084
|
return e.displayIf ? {
|
|
37044
37085
|
...e,
|
|
37045
|
-
displayIf: { $eq: new Map([...e.displayIf.$eq].map(([e, n]) => [
|
|
37086
|
+
displayIf: { $eq: new Map([...e.displayIf.$eq].map(([e, n]) => [mX(e, t), n])) }
|
|
37046
37087
|
} : e;
|
|
37047
37088
|
}
|
|
37048
|
-
function
|
|
37089
|
+
function x$(e, t, n) {
|
|
37049
37090
|
for (let [r, i] of e) {
|
|
37050
|
-
let e =
|
|
37091
|
+
let e = S$(t, mX(r, n).split("."));
|
|
37051
37092
|
if (!(Array.isArray(i) ? i : [i]).includes(e)) return !1;
|
|
37052
37093
|
}
|
|
37053
37094
|
return !0;
|
|
37054
37095
|
}
|
|
37055
|
-
function
|
|
37096
|
+
function S$(e, t) {
|
|
37056
37097
|
let n = e;
|
|
37057
37098
|
for (let e of t) {
|
|
37058
37099
|
if (typeof n != "object" || !n) return;
|
|
@@ -37060,25 +37101,25 @@ function x$(e, t) {
|
|
|
37060
37101
|
}
|
|
37061
37102
|
return n;
|
|
37062
37103
|
}
|
|
37063
|
-
function
|
|
37104
|
+
function C$(e, t) {
|
|
37064
37105
|
if (typeof t != "object" || !t) return;
|
|
37065
37106
|
let n = t;
|
|
37066
37107
|
return e.find((e) => e.consts.length > 0 && e.consts.every((e) => Object.is(n[e.key], e.value)));
|
|
37067
37108
|
}
|
|
37068
37109
|
//#endregion
|
|
37069
37110
|
//#region src/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.ts
|
|
37070
|
-
var
|
|
37111
|
+
var w$ = new p$.default({
|
|
37071
37112
|
strict: !1,
|
|
37072
37113
|
allErrors: !0
|
|
37073
37114
|
});
|
|
37074
|
-
(0,
|
|
37115
|
+
(0, m$.default)(w$), w$.removeKeyword("id"), w$.addKeyword({
|
|
37075
37116
|
keyword: "id",
|
|
37076
37117
|
validate: () => !0
|
|
37077
37118
|
});
|
|
37078
|
-
function
|
|
37119
|
+
function T$(e, t = {}) {
|
|
37079
37120
|
let n;
|
|
37080
37121
|
try {
|
|
37081
|
-
n =
|
|
37122
|
+
n = SZ(e);
|
|
37082
37123
|
} catch (e) {
|
|
37083
37124
|
let t = e instanceof Error ? e.message : "Invalid JSON Schema";
|
|
37084
37125
|
return () => ({
|
|
@@ -37091,7 +37132,7 @@ function w$(e, t = {}) {
|
|
|
37091
37132
|
}
|
|
37092
37133
|
let r = n.root.schema, i = n.variantIndices, a;
|
|
37093
37134
|
try {
|
|
37094
|
-
a =
|
|
37135
|
+
a = w$.compile(r);
|
|
37095
37136
|
} catch (e) {
|
|
37096
37137
|
let t = e instanceof Error ? e.message : "Invalid JSON Schema";
|
|
37097
37138
|
return () => ({
|
|
@@ -37102,15 +37143,15 @@ function w$(e, t = {}) {
|
|
|
37102
37143
|
} }
|
|
37103
37144
|
});
|
|
37104
37145
|
}
|
|
37105
|
-
|
|
37146
|
+
w$.removeSchema(r);
|
|
37106
37147
|
let o = async (e, t, r) => {
|
|
37107
|
-
let o = a(e) ? [] : a.errors ?? [], s =
|
|
37148
|
+
let o = a(e) ? [] : a.errors ?? [], s = M$(n.root, e, "", i), c = [...o, ...s];
|
|
37108
37149
|
return c.length === 0 ? {
|
|
37109
37150
|
values: e,
|
|
37110
37151
|
errors: {}
|
|
37111
37152
|
} : {
|
|
37112
37153
|
values: {},
|
|
37113
|
-
errors:
|
|
37154
|
+
errors: k$(O$(c.filter((t) => !E$(t, n, e))), r.criteriaMode ?? "firstError")
|
|
37114
37155
|
};
|
|
37115
37156
|
};
|
|
37116
37157
|
if (!t.basePath) return o;
|
|
@@ -37126,12 +37167,12 @@ function w$(e, t = {}) {
|
|
|
37126
37167
|
};
|
|
37127
37168
|
};
|
|
37128
37169
|
}
|
|
37129
|
-
function
|
|
37130
|
-
let { node: r, value: i } =
|
|
37170
|
+
function E$(e, t, n) {
|
|
37171
|
+
let { node: r, value: i } = v$(t, (e.instancePath ? e.instancePath.slice(1).split("/").map(CX) : []).join("."), n);
|
|
37131
37172
|
if (!r) return !1;
|
|
37132
37173
|
switch (e.keyword) {
|
|
37133
37174
|
case "const":
|
|
37134
|
-
case "enum": return
|
|
37175
|
+
case "enum": return D$(r.schema, i);
|
|
37135
37176
|
case "required": {
|
|
37136
37177
|
let t = e.params.missingProperty;
|
|
37137
37178
|
return typeof t == "string" && !!r.properties && !r.properties.has(t);
|
|
@@ -37139,46 +37180,46 @@ function T$(e, t, n) {
|
|
|
37139
37180
|
default: return !1;
|
|
37140
37181
|
}
|
|
37141
37182
|
}
|
|
37142
|
-
function
|
|
37183
|
+
function D$(e, t) {
|
|
37143
37184
|
return e.const === void 0 ? Array.isArray(e.enum) ? e.enum.includes(t) : !1 : Object.is(e.const, t);
|
|
37144
37185
|
}
|
|
37145
|
-
function
|
|
37186
|
+
function O$(e) {
|
|
37146
37187
|
return e.filter((t) => {
|
|
37147
37188
|
if (t.keyword !== "oneOf" && t.keyword !== "anyOf") return !0;
|
|
37148
|
-
let n =
|
|
37189
|
+
let n = A$(t), r = n === "" ? "" : `${n}.`;
|
|
37149
37190
|
return !e.some((e) => {
|
|
37150
37191
|
if (e === t) return !1;
|
|
37151
|
-
let i =
|
|
37192
|
+
let i = A$(e);
|
|
37152
37193
|
return n === "" ? i !== "" : i.startsWith(r);
|
|
37153
37194
|
});
|
|
37154
37195
|
});
|
|
37155
37196
|
}
|
|
37156
|
-
function
|
|
37197
|
+
function k$(e, t) {
|
|
37157
37198
|
let n = /* @__PURE__ */ new Map();
|
|
37158
37199
|
for (let t of e) {
|
|
37159
|
-
let e =
|
|
37200
|
+
let e = A$(t), r = n.get(e) ?? [];
|
|
37160
37201
|
r.push(t), n.set(e, r);
|
|
37161
37202
|
}
|
|
37162
37203
|
let r = {};
|
|
37163
37204
|
for (let [e, i] of n) {
|
|
37164
37205
|
let n = {
|
|
37165
37206
|
type: i[0].keyword,
|
|
37166
|
-
message:
|
|
37207
|
+
message: g$(i[0], e)
|
|
37167
37208
|
};
|
|
37168
37209
|
if (t === "all" && i.length > 0) {
|
|
37169
37210
|
let t = {};
|
|
37170
|
-
for (let n of i) t[n.keyword] =
|
|
37211
|
+
for (let n of i) t[n.keyword] = g$(n, e);
|
|
37171
37212
|
n.types = t;
|
|
37172
37213
|
}
|
|
37173
|
-
|
|
37214
|
+
j$(r, e === "" ? "root" : e, n);
|
|
37174
37215
|
}
|
|
37175
37216
|
return r;
|
|
37176
37217
|
}
|
|
37177
|
-
function
|
|
37178
|
-
let t = e.instancePath ? e.instancePath.slice(1).split("/").map(
|
|
37218
|
+
function A$(e) {
|
|
37219
|
+
let t = e.instancePath ? e.instancePath.slice(1).split("/").map(CX) : [];
|
|
37179
37220
|
return e.keyword === "required" && typeof e.params.missingProperty == "string" && t.push(e.params.missingProperty), t.join(".");
|
|
37180
37221
|
}
|
|
37181
|
-
function
|
|
37222
|
+
function j$(e, t, n) {
|
|
37182
37223
|
let r = t.split("."), i = e;
|
|
37183
37224
|
for (let e = 0; e < r.length - 1; e++) {
|
|
37184
37225
|
let t = r[e];
|
|
@@ -37186,7 +37227,7 @@ function A$(e, t, n) {
|
|
|
37186
37227
|
}
|
|
37187
37228
|
i[r[r.length - 1]] = n;
|
|
37188
37229
|
}
|
|
37189
|
-
function
|
|
37230
|
+
function M$(e, t, n, r) {
|
|
37190
37231
|
if (!e) return [];
|
|
37191
37232
|
let i = [];
|
|
37192
37233
|
if (e.schema.gioConfig?.uniqueItemProperties && Array.isArray(t)) for (let r of e.schema.gioConfig.uniqueItemProperties) {
|
|
@@ -37203,18 +37244,18 @@ function j$(e, t, n, r) {
|
|
|
37203
37244
|
}
|
|
37204
37245
|
}
|
|
37205
37246
|
let a = typeof t == "object" && !!t && !Array.isArray(t);
|
|
37206
|
-
if (e.properties && a) for (let [a, o] of e.properties) i.push(...
|
|
37247
|
+
if (e.properties && a) for (let [a, o] of e.properties) i.push(...M$(o, t[a], `${n}/${SX(a)}`, r));
|
|
37207
37248
|
if (e.variants && e.variants.length > 0 && a) {
|
|
37208
|
-
let a = t, o =
|
|
37209
|
-
if (s) for (let [e, t] of s.properties) i.push(...
|
|
37249
|
+
let a = t, o = iZ(e.variants.map((e) => e.raw), e.rhfPath, r, (e) => a[e]), s = e.variants[o];
|
|
37250
|
+
if (s) for (let [e, t] of s.properties) i.push(...M$(t, a[e], `${n}/${SX(e)}`, r));
|
|
37210
37251
|
}
|
|
37211
37252
|
return e.items && Array.isArray(t) && t.forEach((t, a) => {
|
|
37212
|
-
i.push(...
|
|
37253
|
+
i.push(...M$(e.items, t, `${n}/${a}`, r));
|
|
37213
37254
|
}), i;
|
|
37214
37255
|
}
|
|
37215
37256
|
//#endregion
|
|
37216
37257
|
//#region src/composed/LayoutSlots/LayoutSlotsContext.tsx
|
|
37217
|
-
var
|
|
37258
|
+
var N$ = {
|
|
37218
37259
|
navigation: null,
|
|
37219
37260
|
contextSidebar: null,
|
|
37220
37261
|
breadcrumbs: [],
|
|
@@ -37222,9 +37263,9 @@ var M$ = {
|
|
|
37222
37263
|
viewMode: "global",
|
|
37223
37264
|
contextExpanded: !0,
|
|
37224
37265
|
contentVariant: "default"
|
|
37225
|
-
},
|
|
37226
|
-
function
|
|
37227
|
-
let [t, n] = V(
|
|
37266
|
+
}, P$ = M(null);
|
|
37267
|
+
function F$({ children: e }) {
|
|
37268
|
+
let [t, n] = V(N$), r = F((e, t) => {
|
|
37228
37269
|
n((n) => ({
|
|
37229
37270
|
...n,
|
|
37230
37271
|
[e]: t
|
|
@@ -37236,7 +37277,7 @@ function P$({ children: e }) {
|
|
|
37236
37277
|
}));
|
|
37237
37278
|
}, []), a = F((e) => {
|
|
37238
37279
|
n((t) => {
|
|
37239
|
-
let n = Object.fromEntries(e.map((e) => [e,
|
|
37280
|
+
let n = Object.fromEntries(e.map((e) => [e, N$[e]]));
|
|
37240
37281
|
return {
|
|
37241
37282
|
...t,
|
|
37242
37283
|
...n
|
|
@@ -37253,20 +37294,20 @@ function P$({ children: e }) {
|
|
|
37253
37294
|
i,
|
|
37254
37295
|
a
|
|
37255
37296
|
]);
|
|
37256
|
-
return /* @__PURE__ */ H(
|
|
37297
|
+
return /* @__PURE__ */ H(P$.Provider, {
|
|
37257
37298
|
value: o,
|
|
37258
37299
|
children: e
|
|
37259
37300
|
});
|
|
37260
37301
|
}
|
|
37261
|
-
function
|
|
37262
|
-
let e = I(
|
|
37302
|
+
function I$() {
|
|
37303
|
+
let e = I(P$);
|
|
37263
37304
|
if (!e) throw Error("useLayoutSlots must be used within a LayoutSlotsProvider.");
|
|
37264
37305
|
return e;
|
|
37265
37306
|
}
|
|
37266
37307
|
//#endregion
|
|
37267
37308
|
//#region src/composed/LayoutSlots/use-layout-config.ts
|
|
37268
|
-
function
|
|
37269
|
-
let { setSlots: n, resetSlots: r } =
|
|
37309
|
+
function L$(e, t = []) {
|
|
37310
|
+
let { setSlots: n, resetSlots: r } = I$();
|
|
37270
37311
|
R(() => {
|
|
37271
37312
|
n(e);
|
|
37272
37313
|
let t = Object.keys(e);
|
|
@@ -37281,7 +37322,7 @@ function I$(e, t = []) {
|
|
|
37281
37322
|
}
|
|
37282
37323
|
//#endregion
|
|
37283
37324
|
//#region src/composed/TopNavUser/TopNavUser.tsx
|
|
37284
|
-
var
|
|
37325
|
+
var R$ = [
|
|
37285
37326
|
{
|
|
37286
37327
|
value: "light",
|
|
37287
37328
|
label: "Light"
|
|
@@ -37295,7 +37336,7 @@ var L$ = [
|
|
|
37295
37336
|
label: "System"
|
|
37296
37337
|
}
|
|
37297
37338
|
];
|
|
37298
|
-
function
|
|
37339
|
+
function z$({ name: e, email: t, avatarUrl: n, initials: r, className: i, onSignOut: a }) {
|
|
37299
37340
|
let o = r ?? e.slice(0, 2).toUpperCase(), { mode: s, setMode: c } = D();
|
|
37300
37341
|
return /* @__PURE__ */ U(WL, { children: [/* @__PURE__ */ H(KL, {
|
|
37301
37342
|
asChild: !0,
|
|
@@ -37324,7 +37365,7 @@ function R$({ name: e, email: t, avatarUrl: n, initials: r, className: i, onSign
|
|
|
37324
37365
|
/* @__PURE__ */ H(ZL, {
|
|
37325
37366
|
value: s,
|
|
37326
37367
|
onValueChange: (e) => c(e),
|
|
37327
|
-
children:
|
|
37368
|
+
children: R$.map((e) => /* @__PURE__ */ H(QL, {
|
|
37328
37369
|
value: e.value,
|
|
37329
37370
|
children: e.label
|
|
37330
37371
|
}, e.value))
|
|
@@ -37337,6 +37378,6 @@ function R$({ name: e, email: t, avatarUrl: n, initials: r, className: i, onSign
|
|
|
37337
37378
|
]
|
|
37338
37379
|
})] });
|
|
37339
37380
|
}
|
|
37340
|
-
|
|
37381
|
+
z$.displayName = "TopNavUser";
|
|
37341
37382
|
//#endregion
|
|
37342
|
-
export { Vy as Accordion, Wy as AccordionContent, Hy as AccordionItem, Uy as AccordionTrigger, Yy as Alert, Qy as AlertAction, Zy as AlertDescription, Xy as AlertTitle, lG as AppContextBar, yG as AppLayout, CG as AppSidebar, oG as AppSwitcher, $y as Avatar, nb as AvatarBadge, tb as AvatarFallback, rb as AvatarGroup, ib as AvatarGroupCount, eb as AvatarImage, ob as Badge,
|
|
37383
|
+
export { Vy as Accordion, Wy as AccordionContent, Hy as AccordionItem, Uy as AccordionTrigger, Yy as Alert, Qy as AlertAction, Zy as AlertDescription, Xy as AlertTitle, lG as AppContextBar, yG as AppLayout, CG as AppSidebar, oG as AppSwitcher, $y as Avatar, nb as AvatarBadge, tb as AvatarFallback, rb as AvatarGroup, ib as AvatarGroupCount, eb as AvatarImage, ob as Badge, bq as BadgeCell, sb as Breadcrumb, pb as BreadcrumbEllipsis, lb as BreadcrumbItem, ub as BreadcrumbLink, cb as BreadcrumbList, db as BreadcrumbPage, fb as BreadcrumbSeparator, hb as Button, vb as ButtonGroup, bb as ButtonGroupSeparator, yb as ButtonGroupText, Nw as Calendar, Pw as CalendarDayButton, Fw as Card, zw as CardAction, Bw as CardContent, Rw as CardDescription, Vw as CardFooter, Iw as CardHeader, Lw as CardTitle, Hw as Checkbox, Uw as Collapsible, Gw as CollapsibleContent, Ww as CollapsibleTrigger, uM as Combobox, wM as ComboboxChip, CM as ComboboxChips, TM as ComboboxChipsInput, bM as ComboboxCollection, hM as ComboboxContent, xM as ComboboxEmpty, vM as ComboboxGroup, mM as ComboboxInput, _M as ComboboxItem, yM as ComboboxLabel, gM as ComboboxList, SM as ComboboxSeparator, fM as ComboboxTrigger, dM as ComboboxValue, aI as Command, oI as CommandDialog, lI as CommandEmpty, uI as CommandGroup, sI as CommandInput, fI as CommandItem, cI as CommandList, dI as CommandSeparator, pI as CommandShortcut, OG as ContentHeader, mI as ContextMenu, wI as ContextMenuCheckboxItem, bI as ContextMenuContent, gI as ContextMenuGroup, xI as ContextMenuItem, EI as ContextMenuLabel, _I as ContextMenuPortal, yI as ContextMenuRadioGroup, TI as ContextMenuRadioItem, DI as ContextMenuSeparator, OI as ContextMenuShortcut, vI as ContextMenuSub, CI as ContextMenuSubContent, SI as ContextMenuSubTrigger, hI as ContextMenuTrigger, TG as ContextSidebar, EG as ContextToggleButton, Sq as CopyableCell, kG as CopyableText, N$ as DEFAULT_SLOTS, dq as DataTable, fq as DataTableColumnHeader, wq as DataTableEmptyState, iq as DataTablePagination, aq as DataTableViewOptions, yq as DateCell, NJ as DatePicker, PJ as DateRangePicker, LJ as DateTimePicker, BJ as DateTimeRangePicker, YF as Dialog, QF as DialogClose, eI as DialogContent, iI as DialogDescription, nI as DialogFooter, tI as DialogHeader, $F as DialogOverlay, ZF as DialogPortal, rI as DialogTitle, XF as DialogTrigger, PL as Drawer, LL as DrawerClose, zL as DrawerContent, UL as DrawerDescription, VL as DrawerFooter, BL as DrawerHeader, RL as DrawerOverlay, IL as DrawerPortal, HL as DrawerTitle, FL as DrawerTrigger, WL as DropdownMenu, XL as DropdownMenuCheckboxItem, qL as DropdownMenuContent, JL as DropdownMenuGroup, YL as DropdownMenuItem, $L as DropdownMenuLabel, GL as DropdownMenuPortal, ZL as DropdownMenuRadioGroup, QL as DropdownMenuRadioItem, eR as DropdownMenuSeparator, tR as DropdownMenuShortcut, nR as DropdownMenuSub, iR as DropdownMenuSubContent, rR as DropdownMenuSubTrigger, KL as DropdownMenuTrigger, aR as Empty, dR as EmptyContent, uR as EmptyDescription, oR as EmptyHeader, cR as EmptyMedia, lR as EmptyTitle, VJ as FacetedFilter, _R as Field, vR as FieldContent, xR as FieldDescription, CR as FieldError, hR as FieldGroup, yR as FieldLabel, mR as FieldLegend, SR as FieldSeparator, pR as FieldSet, bR as FieldTitle, KJ as FileUpload, _B as FileUploadInput, GJ as FileUploadItem, vB as HoverCard, bB as HoverCardContent, CB as HoverCardDescription, xB as HoverCardHeader, SB as HoverCardTitle, yB as HoverCardTrigger, eM as Input, nM as InputGroup, iM as InputGroupAddon, oM as InputGroupButton, cM as InputGroupInput, sM as InputGroupText, lM as InputGroupTextarea, DB as Item, NB as ItemActions, AB as ItemContent, MB as ItemDescription, FB as ItemFooter, wB as ItemGroup, PB as ItemHeader, kB as ItemMedia, TB as ItemSeparator, jB as ItemTitle, NZ as JsonSchemaForm, IB as Kbd, LB as KbdGroup, fR as Label, F$ as LayoutSlotsProvider, xq as MonoCell, RB as Pagination, zB as PaginationContent, WB as PaginationEllipsis, BB as PaginationItem, VB as PaginationLink, UB as PaginationNext, HB as PaginationPrevious, pZ as PasswordInput, GB as Popover, JB as PopoverAnchor, qB as PopoverContent, ZB as PopoverDescription, YB as PopoverHeader, XB as PopoverTitle, KB as PopoverTrigger, en as PortalContainerProvider, QB as Progress, eV as Prose, tV as RadioGroup, nV as RadioGroupItem, QH as ResizableHandle, ZH as ResizablePanel, XH as ResizablePanelGroup, $H as ScrollArea, eU as ScrollBar, tU as Select, aU as SelectContent, nU as SelectGroup, sU as SelectItem, oU as SelectLabel, uU as SelectScrollDownButton, lU as SelectScrollUpButton, cU as SelectSeparator, iU as SelectTrigger, rU as SelectValue, sG as SelectorDropdown, cG as SelectorTriggerButton, gb as Separator, dU as Sheet, pU as SheetClose, gU as SheetContent, bU as SheetDescription, vU as SheetFooter, _U as SheetHeader, yU as SheetTitle, fU as SheetTrigger, BU as Sidebar, JU as SidebarContent, KU as SidebarFooter, YU as SidebarGroup, ZU as SidebarGroupAction, QU as SidebarGroupContent, XU as SidebarGroupLabel, GU as SidebarHeader, WU as SidebarInput, UU as SidebarInset, $U as SidebarMenu, rW as SidebarMenuAction, iW as SidebarMenuBadge, nW as SidebarMenuButton, eW as SidebarMenuItem, aW as SidebarMenuSkeleton, oW as SidebarMenuSub, cW as SidebarMenuSubButton, sW as SidebarMenuSubItem, _G as SidebarModeControl, hG as SidebarModeProvider, wG as SidebarNavigation, zU as SidebarProvider, HU as SidebarRail, qU as SidebarSeparator, VU as SidebarTrigger, xU as Skeleton, BW as Spinner, VW as Switch, HW as Table, WW as TableBody, YW as TableCaption, JW as TableCell, GW as TableFooter, qW as TableHead, UW as TableHeader, KW as TableRow, XW as Tabs, eG as TabsContent, QW as TabsList, $W as TabsTrigger, tM as Textarea, O as ThemeProvider, zW as Toaster, nG as Toggle, iG as ToggleGroup, aG as ToggleGroupItem, CU as Tooltip, TU as TooltipContent, SU as TooltipProvider, wU as TooltipTrigger, z$ as TopNavUser, Cq as TruncatedCell, Jy as alertVariants, ab as badgeVariants, AG as buildLinearBreadcrumbs, _b as buttonGroupVariants, mb as buttonVariants, q as cn, PZ as composeResolvers, DX as extractDefaults, T$ as jsonSchemaResolver, ZW as tabsListVariants, CW as toast, tG as toggleVariants, EM as useComboboxAnchor, L$ as useLayoutConfig, I$ as useLayoutSlots, tn as usePortalContainer, RU as useSidebar, fG as useSidebarMode, D as useTheme };
|