@overmap-ai/forms 1.0.40-file-component-improvements.4 → 1.0.40-file-component-improvements.5
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/forms.js +401 -401
- package/dist/forms.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/forms.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var R = (r, e, t) =>
|
|
1
|
+
var Us = Object.defineProperty;
|
|
2
|
+
var Hs = (r, e, t) => e in r ? Us(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var R = (r, e, t) => Hs(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsxs as _, Fragment as Ie, jsx as p } from "react/jsx-runtime";
|
|
5
|
-
import { Card as
|
|
5
|
+
import { Card as ht, LuIcon as N, Text as pe, Spinner as ti, Overlay as xt, preventDefault as Gs, ButtonGroup as ue, Tooltip as Xt, IconButton as ne, Separator as Vt, Input as ge, Badge as ye, Checkbox as Hr, CheckboxGroup as En, Popover as xe, Button as B, DayPicker as za, Menu as D, OneTimePasswordField as Sn, stopPropagation as mt, RadioGroup as Wt, TextArea as sr, Rating as Fi, Heading as qs, toast as qe, ToggleGroup as bn, useAlertDialog as Xs } from "@overmap-ai/blocks";
|
|
6
6
|
import { cx as kt, cva as ri } from "class-variance-authority";
|
|
7
|
-
import { forwardRef as ni, createElement as kn, memo as L, createContext as jr, useState as Xe,
|
|
7
|
+
import { forwardRef as ni, createElement as kn, memo as L, createContext as jr, useState as Xe, useLayoutEffect as Ua, useContext as Ws, useCallback as b, useEffect as pt, Fragment as ii, use as ce, useMemo as se, useRef as Yr } from "react";
|
|
8
8
|
import "@xyflow/react/dist/style.css";
|
|
9
9
|
import { getBezierPath as $s, Position as yt, BaseEdge as js, EdgeLabelRenderer as Ys, NodeToolbar as Zs, Handle as Pi, MarkerType as Ks, useNodesState as Qs, useEdgesState as Js, ReactFlow as el, Panel as In } from "@xyflow/react";
|
|
10
|
-
import { willCreateCycle as
|
|
11
|
-
import { useController as tl, useWatch as
|
|
10
|
+
import { willCreateCycle as Ha } from "graphology-dag";
|
|
11
|
+
import { useController as tl, useWatch as Ga, useFormState as qa, useFormContext as Xa, useForm as Wa, FormProvider as $a } from "react-hook-form";
|
|
12
12
|
import { v4 as G } from "uuid";
|
|
13
13
|
import { DragDropContext as rl, Droppable as nl, Draggable as il } from "@hello-pangea/dnd";
|
|
14
|
-
import { saveAs as
|
|
14
|
+
import { saveAs as ja } from "file-saver";
|
|
15
15
|
import { DecodeHintType as al, useZxing as ol } from "react-zxing";
|
|
16
16
|
import Bi from "@dagrejs/dagre";
|
|
17
17
|
import { DirectedGraph as sl } from "graphology";
|
|
18
18
|
import { bfsFromNode as ll } from "graphology-traversal";
|
|
19
|
-
import
|
|
19
|
+
import Ya from "lodash.get";
|
|
20
20
|
import cl from "lodash.set";
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.542.0 - ISC
|
|
@@ -30,7 +30,7 @@ const ul = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), dl = (
|
|
|
30
30
|
), ki = (r) => {
|
|
31
31
|
const e = dl(r);
|
|
32
32
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
33
|
-
},
|
|
33
|
+
}, Za = (...r) => r.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), fl = (r) => {
|
|
34
34
|
for (const e in r)
|
|
35
35
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
36
36
|
return !0;
|
|
@@ -77,7 +77,7 @@ const pl = ni(
|
|
|
77
77
|
height: e,
|
|
78
78
|
stroke: r,
|
|
79
79
|
strokeWidth: n ? Number(t) * 24 / Number(e) : t,
|
|
80
|
-
className:
|
|
80
|
+
className: Za("lucide", i),
|
|
81
81
|
...!a && !fl(s) && { "aria-hidden": "true" },
|
|
82
82
|
...s
|
|
83
83
|
},
|
|
@@ -98,7 +98,7 @@ const q = (r, e) => {
|
|
|
98
98
|
({ className: n, ...i }, a) => kn(pl, {
|
|
99
99
|
ref: a,
|
|
100
100
|
iconNode: e,
|
|
101
|
-
className:
|
|
101
|
+
className: Za(
|
|
102
102
|
`lucide-${ul(ki(r))}`,
|
|
103
103
|
`lucide-${r}`,
|
|
104
104
|
n
|
|
@@ -228,7 +228,7 @@ const Ml = [
|
|
|
228
228
|
* This source code is licensed under the ISC license.
|
|
229
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
230
230
|
*/
|
|
231
|
-
const Fl = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]],
|
|
231
|
+
const Fl = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Ka = q("circle", Fl);
|
|
232
232
|
/**
|
|
233
233
|
* @license lucide-react v0.542.0 - ISC
|
|
234
234
|
*
|
|
@@ -241,7 +241,7 @@ const Pl = [
|
|
|
241
241
|
["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
|
|
242
242
|
["path", { d: "M21 14H11", key: "1bme5i" }],
|
|
243
243
|
["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
|
|
244
|
-
],
|
|
244
|
+
], Qa = q("clipboard-copy", Pl);
|
|
245
245
|
/**
|
|
246
246
|
* @license lucide-react v0.542.0 - ISC
|
|
247
247
|
*
|
|
@@ -274,7 +274,7 @@ const Ll = [
|
|
|
274
274
|
["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
|
|
275
275
|
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
|
|
276
276
|
["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
|
|
277
|
-
],
|
|
277
|
+
], Ja = q("clipboard-paste", Ll);
|
|
278
278
|
/**
|
|
279
279
|
* @license lucide-react v0.542.0 - ISC
|
|
280
280
|
*
|
|
@@ -306,7 +306,7 @@ const Gl = [
|
|
|
306
306
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
307
307
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
308
308
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
309
|
-
],
|
|
309
|
+
], eo = q("download", Gl);
|
|
310
310
|
/**
|
|
311
311
|
* @license lucide-react v0.542.0 - ISC
|
|
312
312
|
*
|
|
@@ -317,7 +317,7 @@ const ql = [
|
|
|
317
317
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
318
318
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
319
319
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
320
|
-
],
|
|
320
|
+
], to = q("ellipsis", ql);
|
|
321
321
|
/**
|
|
322
322
|
* @license lucide-react v0.542.0 - ISC
|
|
323
323
|
*
|
|
@@ -339,7 +339,7 @@ const $l = [
|
|
|
339
339
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
340
340
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
341
341
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
342
|
-
],
|
|
342
|
+
], ro = q("file-warning", $l);
|
|
343
343
|
/**
|
|
344
344
|
* @license lucide-react v0.542.0 - ISC
|
|
345
345
|
*
|
|
@@ -384,7 +384,7 @@ const ec = [
|
|
|
384
384
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
385
385
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
386
386
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
387
|
-
],
|
|
387
|
+
], no = q("image", ec);
|
|
388
388
|
/**
|
|
389
389
|
* @license lucide-react v0.542.0 - ISC
|
|
390
390
|
*
|
|
@@ -395,7 +395,7 @@ const tc = [
|
|
|
395
395
|
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
|
|
396
396
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
|
|
397
397
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }]
|
|
398
|
-
],
|
|
398
|
+
], io = q("layout-panel-top", tc);
|
|
399
399
|
/**
|
|
400
400
|
* @license lucide-react v0.542.0 - ISC
|
|
401
401
|
*
|
|
@@ -474,7 +474,7 @@ const fc = [["path", { d: "M5 12h14", key: "1ays0h" }]], Gr = q("minus", fc);
|
|
|
474
474
|
const hc = [
|
|
475
475
|
["path", { d: "M8 18L12 22L16 18", key: "cskvfv" }],
|
|
476
476
|
["path", { d: "M12 2V22", key: "r89rzk" }]
|
|
477
|
-
],
|
|
477
|
+
], ao = q("move-down", hc);
|
|
478
478
|
/**
|
|
479
479
|
* @license lucide-react v0.542.0 - ISC
|
|
480
480
|
*
|
|
@@ -484,7 +484,7 @@ const hc = [
|
|
|
484
484
|
const pc = [
|
|
485
485
|
["path", { d: "M8 6L12 2L16 6", key: "1yvkyx" }],
|
|
486
486
|
["path", { d: "M12 2V22", key: "r89rzk" }]
|
|
487
|
-
],
|
|
487
|
+
], oo = q("move-up", pc);
|
|
488
488
|
/**
|
|
489
489
|
* @license lucide-react v0.542.0 - ISC
|
|
490
490
|
*
|
|
@@ -494,7 +494,7 @@ const pc = [
|
|
|
494
494
|
const vc = [
|
|
495
495
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
496
496
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
497
|
-
],
|
|
497
|
+
], dt = q("plus", vc);
|
|
498
498
|
/**
|
|
499
499
|
* @license lucide-react v0.542.0 - ISC
|
|
500
500
|
*
|
|
@@ -579,7 +579,7 @@ const bc = [
|
|
|
579
579
|
key: "r04s7s"
|
|
580
580
|
}
|
|
581
581
|
]
|
|
582
|
-
],
|
|
582
|
+
], so = q("star", bc);
|
|
583
583
|
/**
|
|
584
584
|
* @license lucide-react v0.542.0 - ISC
|
|
585
585
|
*
|
|
@@ -651,7 +651,7 @@ const Mc = [
|
|
|
651
651
|
const Fc = [
|
|
652
652
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
653
653
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
654
|
-
], bt = q("x", Fc),
|
|
654
|
+
], bt = q("x", Fc), lo = L((r) => {
|
|
655
655
|
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r, l = () => i ? /* @__PURE__ */ _(Ie, { children: [
|
|
656
656
|
/* @__PURE__ */ p(N, { icon: bl, color: "var(--base-a11)" }),
|
|
657
657
|
/* @__PURE__ */ p(pe, { accentColor: "base", className: "truncate", size: o, children: i })
|
|
@@ -659,12 +659,12 @@ const Fc = [
|
|
|
659
659
|
/* @__PURE__ */ p(N, { icon: Yl, color: "var(--base-a11)" }),
|
|
660
660
|
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: t.name })
|
|
661
661
|
] }) : /* @__PURE__ */ p(Ie, { children: /* @__PURE__ */ p("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ p(ti, { size: o }) }) });
|
|
662
|
-
return /* @__PURE__ */ _(
|
|
662
|
+
return /* @__PURE__ */ _(ht, { className: kt(n, "flex w-full items-center gap-2"), ref: e, size: "xs", ...s, children: [
|
|
663
663
|
l(),
|
|
664
664
|
a
|
|
665
665
|
] });
|
|
666
666
|
});
|
|
667
|
-
|
|
667
|
+
lo.displayName = "FileCard";
|
|
668
668
|
function qr(r) {
|
|
669
669
|
return Array.isArray(r) ? r.every((e) => typeof e == "string") : !1;
|
|
670
670
|
}
|
|
@@ -682,7 +682,7 @@ class Kr {
|
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
class
|
|
685
|
+
class co extends Kr {
|
|
686
686
|
constructor(t) {
|
|
687
687
|
const { identifier: n } = t;
|
|
688
688
|
super();
|
|
@@ -704,7 +704,7 @@ class lo extends Kr {
|
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
class tt extends
|
|
707
|
+
class tt extends co {
|
|
708
708
|
constructor(t) {
|
|
709
709
|
const { label: n, description: i = null, required: a, image: o, ...s } = t;
|
|
710
710
|
super(s);
|
|
@@ -768,26 +768,26 @@ class tt extends lo {
|
|
|
768
768
|
return [];
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
|
-
const Ce = jr({}),
|
|
771
|
+
const Ce = jr({}), uo = (r) => {
|
|
772
772
|
const [e, t] = Xe(null);
|
|
773
|
-
return
|
|
773
|
+
return Ua(() => {
|
|
774
774
|
const n = URL.createObjectURL(r);
|
|
775
775
|
return t(n), () => {
|
|
776
776
|
URL.revokeObjectURL(n);
|
|
777
777
|
};
|
|
778
778
|
}, [r]), e;
|
|
779
779
|
}, br = L((r) => {
|
|
780
|
-
const { file: e, ...t } = r, n =
|
|
781
|
-
return
|
|
780
|
+
const { file: e, ...t } = r, n = uo(e);
|
|
781
|
+
return /* @__PURE__ */ p("img", { src: n ?? void 0, alt: e.name, ...t });
|
|
782
782
|
});
|
|
783
783
|
br.displayName = "ImageFile";
|
|
784
|
-
const
|
|
784
|
+
const fo = jr(() => {
|
|
785
785
|
throw new Error("No ImageViewerProvider found");
|
|
786
|
-
}), si = () =>
|
|
786
|
+
}), si = () => Ws(fo), ho = L((r) => {
|
|
787
787
|
const { file: e, onClose: t } = r, n = b(() => {
|
|
788
|
-
|
|
788
|
+
ja(e, e.name);
|
|
789
789
|
}, [e]);
|
|
790
|
-
return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */ _(xt.Content, { onOpenAutoFocus:
|
|
790
|
+
return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */ _(xt.Content, { onOpenAutoFocus: Gs, children: [
|
|
791
791
|
/* @__PURE__ */ _(
|
|
792
792
|
ue,
|
|
793
793
|
{
|
|
@@ -796,7 +796,7 @@ const uo = jr(() => {
|
|
|
796
796
|
variant: "ghost",
|
|
797
797
|
children: [
|
|
798
798
|
/* @__PURE__ */ _(Xt.Root, { children: [
|
|
799
|
-
/* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: n, "aria-label": "download", children: /* @__PURE__ */ p(N, { icon:
|
|
799
|
+
/* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: n, "aria-label": "download", children: /* @__PURE__ */ p(N, { icon: eo }) }) }),
|
|
800
800
|
/* @__PURE__ */ p(Xt.Content, { size: "sm", children: "Download" })
|
|
801
801
|
] }),
|
|
802
802
|
/* @__PURE__ */ p(Vt, { orientation: "vertical", size: "sm" }),
|
|
@@ -807,7 +807,7 @@ const uo = jr(() => {
|
|
|
807
807
|
/* @__PURE__ */ p("figure", { className: "flex size-full items-center justify-center overflow-hidden p-4", children: /* @__PURE__ */ p(br, { className: "max-h-full max-w-full", file: e }) })
|
|
808
808
|
] }) });
|
|
809
809
|
});
|
|
810
|
-
|
|
810
|
+
ho.displayName = "ImageViewer";
|
|
811
811
|
const Pc = L((r) => {
|
|
812
812
|
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
813
813
|
n(null);
|
|
@@ -819,15 +819,15 @@ const Pc = L((r) => {
|
|
|
819
819
|
), o = b(() => {
|
|
820
820
|
t && (t.onClose && t.onClose(), i());
|
|
821
821
|
}, [i, t]);
|
|
822
|
-
return /* @__PURE__ */ _(
|
|
822
|
+
return /* @__PURE__ */ _(fo.Provider, { value: a, children: [
|
|
823
823
|
e,
|
|
824
|
-
t && /* @__PURE__ */ p(
|
|
824
|
+
t && /* @__PURE__ */ p(ho, { file: t.file, onClose: o })
|
|
825
825
|
] });
|
|
826
826
|
});
|
|
827
827
|
Pc.displayName = "FileViewerProvider";
|
|
828
828
|
const Me = L((r) => {
|
|
829
829
|
const { label: e, error: t, description: n, required: i, children: a, inputId: o, image: s, size: l } = r, [c, u] = Xe(void 0), d = si();
|
|
830
|
-
|
|
830
|
+
pt(() => {
|
|
831
831
|
s instanceof Promise ? s.then(u).catch(console.error) : u(s);
|
|
832
832
|
}, [s]);
|
|
833
833
|
const f = b(() => {
|
|
@@ -869,7 +869,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
869
869
|
onChange: i,
|
|
870
870
|
onBlur: a
|
|
871
871
|
};
|
|
872
|
-
},
|
|
872
|
+
}, po = L((r) => {
|
|
873
873
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(""), [d, f] = Xe(""), h = b(
|
|
874
874
|
(w) => {
|
|
875
875
|
o(w), a();
|
|
@@ -944,7 +944,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
944
944
|
"aria-label": "Add option",
|
|
945
945
|
disabled: !!d || l,
|
|
946
946
|
onClick: g,
|
|
947
|
-
children: /* @__PURE__ */ p(N, { icon:
|
|
947
|
+
children: /* @__PURE__ */ p(N, { icon: dt })
|
|
948
948
|
}
|
|
949
949
|
)
|
|
950
950
|
] }),
|
|
@@ -1008,7 +1008,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
1008
1008
|
}
|
|
1009
1009
|
) });
|
|
1010
1010
|
});
|
|
1011
|
-
|
|
1011
|
+
po.displayName = "MultiStringFieldInput";
|
|
1012
1012
|
class jt extends tt {
|
|
1013
1013
|
constructor(t) {
|
|
1014
1014
|
const { minimum_length: n, maximum_length: i, placeholder: a, ...o } = t;
|
|
@@ -1020,7 +1020,7 @@ class jt extends tt {
|
|
|
1020
1020
|
this.minLength = n ?? 0, this.maxLength = i ?? 1 / 0, this.placeholder = a ?? "Press enter to add a new option";
|
|
1021
1021
|
}
|
|
1022
1022
|
render() {
|
|
1023
|
-
return /* @__PURE__ */ p(
|
|
1023
|
+
return /* @__PURE__ */ p(po, { field: this });
|
|
1024
1024
|
}
|
|
1025
1025
|
serialize() {
|
|
1026
1026
|
return {
|
|
@@ -1127,7 +1127,7 @@ class Qr extends tt {
|
|
|
1127
1127
|
];
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const vo = L((r) => {
|
|
1131
1131
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1132
1132
|
(d) => {
|
|
1133
1133
|
o(!!d), a();
|
|
@@ -1164,7 +1164,7 @@ const po = L((r) => {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
);
|
|
1166
1166
|
});
|
|
1167
|
-
|
|
1167
|
+
vo.displayName = "BooleanFieldInput";
|
|
1168
1168
|
class Yt extends tt {
|
|
1169
1169
|
constructor(t) {
|
|
1170
1170
|
super(t);
|
|
@@ -1195,7 +1195,7 @@ class Yt extends tt {
|
|
|
1195
1195
|
return t;
|
|
1196
1196
|
}
|
|
1197
1197
|
render() {
|
|
1198
|
-
return /* @__PURE__ */ p(
|
|
1198
|
+
return /* @__PURE__ */ p(vo, { field: this });
|
|
1199
1199
|
}
|
|
1200
1200
|
isSerializedValue(t) {
|
|
1201
1201
|
return typeof t == "boolean";
|
|
@@ -1216,7 +1216,7 @@ class Yt extends tt {
|
|
|
1216
1216
|
return t === n;
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
const
|
|
1219
|
+
const go = L((r) => {
|
|
1220
1220
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1221
1221
|
(f) => {
|
|
1222
1222
|
const h = f.target.valueAsNumber, v = isNaN(h) ? null : h;
|
|
@@ -1258,7 +1258,7 @@ const vo = L((r) => {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
);
|
|
1260
1260
|
});
|
|
1261
|
-
|
|
1261
|
+
go.displayName = "NumberFieldInput";
|
|
1262
1262
|
class Je extends tt {
|
|
1263
1263
|
constructor(t) {
|
|
1264
1264
|
const {
|
|
@@ -1361,7 +1361,7 @@ class Je extends tt {
|
|
|
1361
1361
|
return t;
|
|
1362
1362
|
}
|
|
1363
1363
|
render() {
|
|
1364
|
-
return /* @__PURE__ */ p(
|
|
1364
|
+
return /* @__PURE__ */ p(go, { field: this });
|
|
1365
1365
|
}
|
|
1366
1366
|
isSerializedValue(t) {
|
|
1367
1367
|
return this.isValue(t);
|
|
@@ -1383,7 +1383,7 @@ class Je extends tt {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
1385
|
const Xr = 1e4;
|
|
1386
|
-
class
|
|
1386
|
+
class xo extends tt {
|
|
1387
1387
|
constructor(t) {
|
|
1388
1388
|
const { minLength: n, maxLength: i, placeholder: a = "", ...o } = t;
|
|
1389
1389
|
super(o);
|
|
@@ -1478,7 +1478,7 @@ class go extends tt {
|
|
|
1478
1478
|
return t === n;
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
|
-
const
|
|
1481
|
+
const yo = L((r) => {
|
|
1482
1482
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1483
1483
|
(d) => {
|
|
1484
1484
|
o(d), a();
|
|
@@ -1525,7 +1525,7 @@ const xo = L((r) => {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
});
|
|
1528
|
-
|
|
1528
|
+
yo.displayName = "CheckboxListFieldInput";
|
|
1529
1529
|
class Zt extends Qr {
|
|
1530
1530
|
constructor(t) {
|
|
1531
1531
|
super(t);
|
|
@@ -1553,7 +1553,7 @@ class Zt extends Qr {
|
|
|
1553
1553
|
return t;
|
|
1554
1554
|
}
|
|
1555
1555
|
render() {
|
|
1556
|
-
return /* @__PURE__ */ p(
|
|
1556
|
+
return /* @__PURE__ */ p(yo, { field: this });
|
|
1557
1557
|
}
|
|
1558
1558
|
isSerializedValue(t) {
|
|
1559
1559
|
if (!qr(t)) return !1;
|
|
@@ -1578,7 +1578,7 @@ class Zt extends Qr {
|
|
|
1578
1578
|
return i.size === a.size && i.isSubsetOf(a);
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
const
|
|
1581
|
+
const mo = L((r) => {
|
|
1582
1582
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
1583
1583
|
(h) => {
|
|
1584
1584
|
o(h ?? null), a(), u(!1);
|
|
@@ -1637,7 +1637,7 @@ const yo = L((r) => {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
);
|
|
1639
1639
|
});
|
|
1640
|
-
|
|
1640
|
+
mo.displayName = "DateFieldInput";
|
|
1641
1641
|
class wr extends tt {
|
|
1642
1642
|
constructor(t) {
|
|
1643
1643
|
super(t);
|
|
@@ -1668,7 +1668,7 @@ class wr extends tt {
|
|
|
1668
1668
|
return t ? new Date(t) : null;
|
|
1669
1669
|
}
|
|
1670
1670
|
render() {
|
|
1671
|
-
return /* @__PURE__ */ p(
|
|
1671
|
+
return /* @__PURE__ */ p(mo, { field: this });
|
|
1672
1672
|
}
|
|
1673
1673
|
isSerializedValue(t) {
|
|
1674
1674
|
return typeof t != "string" && t !== null ? !1 : this.isValue(this.deserializeValue(t));
|
|
@@ -1690,7 +1690,7 @@ class wr extends tt {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
1692
|
var J = /* @__PURE__ */ ((r) => (r.Text = "text", r.Selection = "selection", r.Numeric = "numeric", r.Temporal = "temporal", r.Capture = "capture", r.Assessment = "assessment", r.Verification = "verification", r))(J || {});
|
|
1693
|
-
const
|
|
1693
|
+
const Co = L((r) => {
|
|
1694
1694
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1695
1695
|
(d) => {
|
|
1696
1696
|
o(d), a();
|
|
@@ -1751,7 +1751,7 @@ const mo = L((r) => {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
);
|
|
1753
1753
|
});
|
|
1754
|
-
|
|
1754
|
+
Co.displayName = "MultiSelectFieldInput";
|
|
1755
1755
|
class St extends Qr {
|
|
1756
1756
|
constructor(t) {
|
|
1757
1757
|
const { placeholder: n, ...i } = t;
|
|
@@ -1789,7 +1789,7 @@ class St extends Qr {
|
|
|
1789
1789
|
return t;
|
|
1790
1790
|
}
|
|
1791
1791
|
render() {
|
|
1792
|
-
return /* @__PURE__ */ p(
|
|
1792
|
+
return /* @__PURE__ */ p(Co, { field: this });
|
|
1793
1793
|
}
|
|
1794
1794
|
isSerializedValue(t) {
|
|
1795
1795
|
if (!qr(t)) return !1;
|
|
@@ -1814,7 +1814,7 @@ class St extends Qr {
|
|
|
1814
1814
|
return i.size === a.size && i.isSubsetOf(a);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1817
|
+
const wo = L((r) => {
|
|
1818
1818
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1819
1819
|
(f) => {
|
|
1820
1820
|
o(f ?? null), a();
|
|
@@ -1869,7 +1869,7 @@ const Co = L((r) => {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
);
|
|
1871
1871
|
});
|
|
1872
|
-
|
|
1872
|
+
wo.displayName = "SelectFieldInput";
|
|
1873
1873
|
class Ft extends Qr {
|
|
1874
1874
|
constructor(t) {
|
|
1875
1875
|
const { placeholder: n, ...i } = t;
|
|
@@ -1907,7 +1907,7 @@ class Ft extends Qr {
|
|
|
1907
1907
|
return t;
|
|
1908
1908
|
}
|
|
1909
1909
|
render() {
|
|
1910
|
-
return /* @__PURE__ */ p(
|
|
1910
|
+
return /* @__PURE__ */ p(wo, { field: this });
|
|
1911
1911
|
}
|
|
1912
1912
|
isSerializedValue(t) {
|
|
1913
1913
|
return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
|
|
@@ -1928,7 +1928,7 @@ class Ft extends Qr {
|
|
|
1928
1928
|
return t === n;
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
const
|
|
1931
|
+
const _o = L((r) => {
|
|
1932
1932
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1933
1933
|
(f) => {
|
|
1934
1934
|
o(f);
|
|
@@ -1976,7 +1976,7 @@ const wo = L((r) => {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
);
|
|
1978
1978
|
});
|
|
1979
|
-
|
|
1979
|
+
_o.displayName = "OTPFieldInput";
|
|
1980
1980
|
class Kt extends tt {
|
|
1981
1981
|
constructor(t) {
|
|
1982
1982
|
const { length: n, validationType: i, ...a } = t;
|
|
@@ -2070,7 +2070,7 @@ class Kt extends tt {
|
|
|
2070
2070
|
return t;
|
|
2071
2071
|
}
|
|
2072
2072
|
render() {
|
|
2073
|
-
return /* @__PURE__ */ p(
|
|
2073
|
+
return /* @__PURE__ */ p(_o, { field: this });
|
|
2074
2074
|
}
|
|
2075
2075
|
isSerializedValue(t) {
|
|
2076
2076
|
return typeof t == "string";
|
|
@@ -2156,10 +2156,10 @@ function li(r, e) {
|
|
|
2156
2156
|
const t = new Set(r.map(({ uuid: i }) => i)), n = new Set(e.map(({ uuid: i }) => i));
|
|
2157
2157
|
return t.size === n.size && t.isSubsetOf(n);
|
|
2158
2158
|
}
|
|
2159
|
-
const
|
|
2159
|
+
const Ao = L((r) => {
|
|
2160
2160
|
const { ref: e, file: t, error: n, rightSlot: i, className: a, size: o, ...s } = r;
|
|
2161
2161
|
return /* @__PURE__ */ _(
|
|
2162
|
-
|
|
2162
|
+
ht,
|
|
2163
2163
|
{
|
|
2164
2164
|
className: kt(a, "p-0! relative flex h-48 w-full flex-col overflow-hidden"),
|
|
2165
2165
|
ref: e,
|
|
@@ -2167,11 +2167,11 @@ const _o = L((r) => {
|
|
|
2167
2167
|
...s,
|
|
2168
2168
|
children: [
|
|
2169
2169
|
!t && !n && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
|
|
2170
|
-
!!t && !n && /* @__PURE__ */ p("div", { className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-3", children: /* @__PURE__ */ p(br, { className: "size-full max-w-full object-cover", file: t }) }),
|
|
2170
|
+
!!t && !n && /* @__PURE__ */ p("div", { className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-3", children: /* @__PURE__ */ p(br, { className: "block size-full max-w-full object-cover", file: t }) }),
|
|
2171
2171
|
(!!t || !!n) && /* @__PURE__ */ _(Ie, { children: [
|
|
2172
2172
|
/* @__PURE__ */ p(Vt, { size: "full" }),
|
|
2173
2173
|
/* @__PURE__ */ _("div", { className: "flex w-full shrink-0 items-center gap-2 self-end p-3", children: [
|
|
2174
|
-
n ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon:
|
|
2174
|
+
n ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: ro }) : t && /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: no }),
|
|
2175
2175
|
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: n ?? (t == null ? void 0 : t.name) }),
|
|
2176
2176
|
i
|
|
2177
2177
|
] })
|
|
@@ -2180,16 +2180,16 @@ const _o = L((r) => {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
);
|
|
2182
2182
|
});
|
|
2183
|
-
|
|
2184
|
-
const Ao = L((r) => {
|
|
2185
|
-
const { file: e, ...t } = r, n = co(e);
|
|
2186
|
-
return n ? /* @__PURE__ */ p("video", { src: n, ...t }) : null;
|
|
2187
|
-
});
|
|
2188
|
-
Ao.displayName = "VideoFile";
|
|
2183
|
+
Ao.displayName = "ImageCard";
|
|
2189
2184
|
const Eo = L((r) => {
|
|
2185
|
+
const { file: e, ...t } = r, n = uo(e);
|
|
2186
|
+
return /* @__PURE__ */ p("video", { src: n ?? void 0, ...t });
|
|
2187
|
+
});
|
|
2188
|
+
Eo.displayName = "VideoFile";
|
|
2189
|
+
const So = L((r) => {
|
|
2190
2190
|
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r;
|
|
2191
2191
|
return /* @__PURE__ */ _(
|
|
2192
|
-
|
|
2192
|
+
ht,
|
|
2193
2193
|
{
|
|
2194
2194
|
className: kt(n, "p-0! relative flex h-48 w-full flex-col overflow-hidden"),
|
|
2195
2195
|
ref: e,
|
|
@@ -2197,11 +2197,11 @@ const Eo = L((r) => {
|
|
|
2197
2197
|
...s,
|
|
2198
2198
|
children: [
|
|
2199
2199
|
!t && !i && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
|
|
2200
|
-
!!t && !i && /* @__PURE__ */ p("div", { className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-3", children: /* @__PURE__ */ p(
|
|
2200
|
+
!!t && !i && /* @__PURE__ */ p("div", { className: "flex min-h-0 flex-1 items-center justify-center overflow-hidden p-3", children: /* @__PURE__ */ p(Eo, { className: "block size-full max-w-full object-cover", file: t, controls: !0 }) }),
|
|
2201
2201
|
(!!t || !!i) && /* @__PURE__ */ _(Ie, { children: [
|
|
2202
2202
|
/* @__PURE__ */ p(Vt, { size: "full" }),
|
|
2203
2203
|
/* @__PURE__ */ _("div", { className: "flex w-full shrink-0 items-center gap-2 self-end p-3", children: [
|
|
2204
|
-
i ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon:
|
|
2204
|
+
i ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: ro }) : t && /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: Vc }),
|
|
2205
2205
|
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: i ?? (t == null ? void 0 : t.name) }),
|
|
2206
2206
|
a
|
|
2207
2207
|
] })
|
|
@@ -2210,12 +2210,12 @@ const Eo = L((r) => {
|
|
|
2210
2210
|
}
|
|
2211
2211
|
);
|
|
2212
2212
|
});
|
|
2213
|
-
|
|
2213
|
+
So.displayName = "VideoCard";
|
|
2214
2214
|
const ci = L((r) => {
|
|
2215
2215
|
const { fileOrPromise: e, onRemove: t, disabled: n, size: i } = r, [a, o] = Xe(
|
|
2216
2216
|
e instanceof Qt ? null : e
|
|
2217
2217
|
), [s, l] = Xe(null), c = si();
|
|
2218
|
-
|
|
2218
|
+
pt(() => {
|
|
2219
2219
|
if (l(null), !(e instanceof Qt)) {
|
|
2220
2220
|
o(e);
|
|
2221
2221
|
return;
|
|
@@ -2233,7 +2233,7 @@ const ci = L((r) => {
|
|
|
2233
2233
|
const u = b(() => {
|
|
2234
2234
|
if (!a) return;
|
|
2235
2235
|
const m = new Blob([a]);
|
|
2236
|
-
|
|
2236
|
+
ja(m, a.name);
|
|
2237
2237
|
}, [a]), d = b(() => {
|
|
2238
2238
|
t(e);
|
|
2239
2239
|
}, [t, e]), f = b(() => {
|
|
@@ -2257,12 +2257,12 @@ const ci = L((r) => {
|
|
|
2257
2257
|
variant: "ghost",
|
|
2258
2258
|
accentColor: "base",
|
|
2259
2259
|
size: i,
|
|
2260
|
-
children: /* @__PURE__ */ p(N, { icon:
|
|
2260
|
+
children: /* @__PURE__ */ p(N, { icon: to })
|
|
2261
2261
|
}
|
|
2262
2262
|
) }),
|
|
2263
2263
|
/* @__PURE__ */ _(D.Content, { size: i, children: [
|
|
2264
2264
|
/* @__PURE__ */ _(D.Item, { onSelect: u, disabled: !a, children: [
|
|
2265
|
-
/* @__PURE__ */ p(N, { icon:
|
|
2265
|
+
/* @__PURE__ */ p(N, { icon: eo }),
|
|
2266
2266
|
" Download"
|
|
2267
2267
|
] }),
|
|
2268
2268
|
n ? null : /* @__PURE__ */ _(Ie, { children: [
|
|
@@ -2277,7 +2277,7 @@ const ci = L((r) => {
|
|
|
2277
2277
|
[n, d, u, a, i]
|
|
2278
2278
|
), g = !!(a != null && a.type.startsWith("image/")), y = !!(a != null && a.type.startsWith("video/"));
|
|
2279
2279
|
return g ? /* @__PURE__ */ p(
|
|
2280
|
-
|
|
2280
|
+
Ao,
|
|
2281
2281
|
{
|
|
2282
2282
|
className: "cursor-pointer",
|
|
2283
2283
|
onClick: h,
|
|
@@ -2287,7 +2287,7 @@ const ci = L((r) => {
|
|
|
2287
2287
|
size: i
|
|
2288
2288
|
}
|
|
2289
2289
|
) : y ? /* @__PURE__ */ p(
|
|
2290
|
-
|
|
2290
|
+
So,
|
|
2291
2291
|
{
|
|
2292
2292
|
className: "cursor-pointer",
|
|
2293
2293
|
onClick: h,
|
|
@@ -2297,7 +2297,7 @@ const ci = L((r) => {
|
|
|
2297
2297
|
size: i
|
|
2298
2298
|
}
|
|
2299
2299
|
) : /* @__PURE__ */ p(
|
|
2300
|
-
|
|
2300
|
+
lo,
|
|
2301
2301
|
{
|
|
2302
2302
|
className: "cursor-pointer",
|
|
2303
2303
|
file: a,
|
|
@@ -2309,7 +2309,7 @@ const ci = L((r) => {
|
|
|
2309
2309
|
);
|
|
2310
2310
|
});
|
|
2311
2311
|
ci.displayName = "DisplayFile";
|
|
2312
|
-
const
|
|
2312
|
+
const bo = L((r) => {
|
|
2313
2313
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(
|
|
2314
2314
|
(w) => {
|
|
2315
2315
|
const S = e.cleanValue({
|
|
@@ -2352,7 +2352,7 @@ const So = L((r) => {
|
|
|
2352
2352
|
},
|
|
2353
2353
|
[a, o, n]
|
|
2354
2354
|
);
|
|
2355
|
-
|
|
2355
|
+
pt(() => {
|
|
2356
2356
|
if (!c.current) return;
|
|
2357
2357
|
const w = new AbortController();
|
|
2358
2358
|
return c.current.addEventListener(
|
|
@@ -2394,7 +2394,7 @@ const So = L((r) => {
|
|
|
2394
2394
|
children: _r.map((w) => {
|
|
2395
2395
|
const { label: S } = $t[w];
|
|
2396
2396
|
return /* @__PURE__ */ _("label", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2397
|
-
/* @__PURE__ */ p(Wt.Item, { value: w, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon:
|
|
2397
|
+
/* @__PURE__ */ p(Wt.Item, { value: w, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon: Ka, className: "fill-current" }) }) }),
|
|
2398
2398
|
/* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: S })
|
|
2399
2399
|
] }, `${e.identifier}-${w}`);
|
|
2400
2400
|
})
|
|
@@ -2464,8 +2464,8 @@ const So = L((r) => {
|
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
2466
|
});
|
|
2467
|
-
|
|
2468
|
-
const
|
|
2467
|
+
bo.displayName = "PassFailFieldInput";
|
|
2468
|
+
const Io = (r) => typeof r == "string" && _r.includes(r), Lc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !Io(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !(Array.isArray(r.files) && r.files.length === 0)), zc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !Io(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !kc(r.files)), Uc = (r) => ({
|
|
2469
2469
|
status: r.status,
|
|
2470
2470
|
notes: r.notes,
|
|
2471
2471
|
files: []
|
|
@@ -2548,7 +2548,7 @@ class Jt extends tt {
|
|
|
2548
2548
|
return Hc(t);
|
|
2549
2549
|
}
|
|
2550
2550
|
render() {
|
|
2551
|
-
return /* @__PURE__ */ p(
|
|
2551
|
+
return /* @__PURE__ */ p(bo, { field: this });
|
|
2552
2552
|
}
|
|
2553
2553
|
isSerializedValue(t) {
|
|
2554
2554
|
return Lc(t);
|
|
@@ -2587,7 +2587,7 @@ class Jt extends tt {
|
|
|
2587
2587
|
return qc(t, n);
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
|
-
const
|
|
2590
|
+
const Oo = L((r) => {
|
|
2591
2591
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2592
2592
|
(f) => {
|
|
2593
2593
|
o(f), a();
|
|
@@ -2626,7 +2626,7 @@ const Io = L((r) => {
|
|
|
2626
2626
|
{
|
|
2627
2627
|
className: "flex min-w-0 items-center gap-2",
|
|
2628
2628
|
children: [
|
|
2629
|
-
/* @__PURE__ */ p(Wt.Item, { value: f.value, onBlur: u, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon:
|
|
2629
|
+
/* @__PURE__ */ p(Wt.Item, { value: f.value, onBlur: u, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon: Ka, className: "fill-current" }) }) }),
|
|
2630
2630
|
/* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: f.label })
|
|
2631
2631
|
]
|
|
2632
2632
|
},
|
|
@@ -2653,7 +2653,7 @@ const Io = L((r) => {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
);
|
|
2655
2655
|
});
|
|
2656
|
-
|
|
2656
|
+
Oo.displayName = "RadioFieldInput";
|
|
2657
2657
|
class er extends Qr {
|
|
2658
2658
|
constructor(t) {
|
|
2659
2659
|
super(t);
|
|
@@ -2684,7 +2684,7 @@ class er extends Qr {
|
|
|
2684
2684
|
return t;
|
|
2685
2685
|
}
|
|
2686
2686
|
render() {
|
|
2687
|
-
return /* @__PURE__ */ p(
|
|
2687
|
+
return /* @__PURE__ */ p(Oo, { field: this });
|
|
2688
2688
|
}
|
|
2689
2689
|
isSerializedValue(t) {
|
|
2690
2690
|
return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
|
|
@@ -2720,7 +2720,7 @@ const Xc = ri(
|
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
|
-
),
|
|
2723
|
+
), No = L((r) => {
|
|
2724
2724
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2725
2725
|
(f) => {
|
|
2726
2726
|
o(f), a();
|
|
@@ -2754,7 +2754,7 @@ const Xc = ri(
|
|
|
2754
2754
|
{
|
|
2755
2755
|
value: f,
|
|
2756
2756
|
className: Xc({ size: t }),
|
|
2757
|
-
children: /* @__PURE__ */ p(N, { icon:
|
|
2757
|
+
children: /* @__PURE__ */ p(N, { icon: so, className: "size-full group-data-[active=true]:fill-current" })
|
|
2758
2758
|
},
|
|
2759
2759
|
`${e.identifier}-${f}`
|
|
2760
2760
|
))
|
|
@@ -2765,7 +2765,7 @@ const Xc = ri(
|
|
|
2765
2765
|
}
|
|
2766
2766
|
);
|
|
2767
2767
|
});
|
|
2768
|
-
|
|
2768
|
+
No.displayName = "RatingFieldInput";
|
|
2769
2769
|
class tr extends tt {
|
|
2770
2770
|
constructor(t) {
|
|
2771
2771
|
const { maxRating: n, ...i } = t;
|
|
@@ -2830,7 +2830,7 @@ class tr extends tt {
|
|
|
2830
2830
|
return t;
|
|
2831
2831
|
}
|
|
2832
2832
|
render() {
|
|
2833
|
-
return /* @__PURE__ */ p(
|
|
2833
|
+
return /* @__PURE__ */ p(No, { field: this });
|
|
2834
2834
|
}
|
|
2835
2835
|
isSerializedValue(t) {
|
|
2836
2836
|
return this.isValue(t);
|
|
@@ -2851,9 +2851,9 @@ class tr extends tt {
|
|
|
2851
2851
|
return t === n;
|
|
2852
2852
|
}
|
|
2853
2853
|
}
|
|
2854
|
-
const
|
|
2854
|
+
const To = jr(() => {
|
|
2855
2855
|
throw new Error("No ScannerProvider found");
|
|
2856
|
-
}), uh = () => ce(
|
|
2856
|
+
}), uh = () => ce(To);
|
|
2857
2857
|
function Wc(r, e) {
|
|
2858
2858
|
var t = Object.setPrototypeOf;
|
|
2859
2859
|
t ? t(r, e) : r.__proto__ = e;
|
|
@@ -4957,7 +4957,7 @@ var en = (
|
|
|
4957
4957
|
}
|
|
4958
4958
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
4959
4959
|
};
|
|
4960
|
-
}(),
|
|
4960
|
+
}(), Do = (
|
|
4961
4961
|
/** @class */
|
|
4962
4962
|
function(r) {
|
|
4963
4963
|
yu(e, r);
|
|
@@ -5008,7 +5008,7 @@ var en = (
|
|
|
5008
5008
|
return i[0] = n, new At(this, i);
|
|
5009
5009
|
}, e.prototype.inverse = function(t) {
|
|
5010
5010
|
if (t === 0)
|
|
5011
|
-
throw new
|
|
5011
|
+
throw new Do();
|
|
5012
5012
|
return this.expTable[this.size - this.logTable[t] - 1];
|
|
5013
5013
|
}, e.prototype.multiply = function(t, n) {
|
|
5014
5014
|
return t === 0 || n === 0 ? 0 : this.expTable[(this.logTable[t] + this.logTable[n]) % (this.size - 1)];
|
|
@@ -5644,7 +5644,7 @@ var zi = (
|
|
|
5644
5644
|
}
|
|
5645
5645
|
}, r;
|
|
5646
5646
|
}()
|
|
5647
|
-
),
|
|
5647
|
+
), Ro = (
|
|
5648
5648
|
/** @class */
|
|
5649
5649
|
function() {
|
|
5650
5650
|
function r(e, t, n, i, a, o, s, l, c) {
|
|
@@ -5700,7 +5700,7 @@ var zi = (
|
|
|
5700
5700
|
return r !== null && r.apply(this, arguments) || this;
|
|
5701
5701
|
}
|
|
5702
5702
|
return e.prototype.sampleGrid = function(t, n, i, a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w) {
|
|
5703
|
-
var S =
|
|
5703
|
+
var S = Ro.quadrilateralToQuadrilateral(a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w);
|
|
5704
5704
|
return this.sampleGridWithTransform(t, n, i, S);
|
|
5705
5705
|
}, e.prototype.sampleGridWithTransform = function(t, n, i, a) {
|
|
5706
5706
|
if (n <= 0 || i <= 0)
|
|
@@ -7931,7 +7931,7 @@ var be = (
|
|
|
7931
7931
|
return this.value ^ this.checksumPortion;
|
|
7932
7932
|
}, r;
|
|
7933
7933
|
}()
|
|
7934
|
-
),
|
|
7934
|
+
), Mo = (
|
|
7935
7935
|
/** @class */
|
|
7936
7936
|
function() {
|
|
7937
7937
|
function r(e, t, n, i, a) {
|
|
@@ -8624,7 +8624,7 @@ var be = (
|
|
|
8624
8624
|
return !0;
|
|
8625
8625
|
}, r;
|
|
8626
8626
|
}()
|
|
8627
|
-
),
|
|
8627
|
+
), Vo = (
|
|
8628
8628
|
/** @class */
|
|
8629
8629
|
function() {
|
|
8630
8630
|
function r(e) {
|
|
@@ -8675,7 +8675,7 @@ var be = (
|
|
|
8675
8675
|
}
|
|
8676
8676
|
i = 10 - i % 10, i === 10 && (i = 0), t.append(i);
|
|
8677
8677
|
}, e.GTIN_SIZE = 40, e;
|
|
8678
|
-
}(
|
|
8678
|
+
}(Vo)
|
|
8679
8679
|
), nd = /* @__PURE__ */ function() {
|
|
8680
8680
|
var r = function(e, t) {
|
|
8681
8681
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -8731,7 +8731,7 @@ var be = (
|
|
|
8731
8731
|
var t = new $();
|
|
8732
8732
|
return this.getGeneralDecoder().decodeAllCodes(t, e.HEADER_SIZE);
|
|
8733
8733
|
}, e.HEADER_SIZE = 5, e;
|
|
8734
|
-
}(
|
|
8734
|
+
}(Vo)
|
|
8735
8735
|
), sd = /* @__PURE__ */ function() {
|
|
8736
8736
|
var r = function(e, t) {
|
|
8737
8737
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -8777,7 +8777,7 @@ var be = (
|
|
|
8777
8777
|
}
|
|
8778
8778
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
8779
8779
|
};
|
|
8780
|
-
}(),
|
|
8780
|
+
}(), Fo = (
|
|
8781
8781
|
/** @class */
|
|
8782
8782
|
function(r) {
|
|
8783
8783
|
ld(e, r);
|
|
@@ -8818,7 +8818,7 @@ var be = (
|
|
|
8818
8818
|
}, e.prototype.checkWeight = function(t) {
|
|
8819
8819
|
return t;
|
|
8820
8820
|
}, e;
|
|
8821
|
-
}(
|
|
8821
|
+
}(Fo)
|
|
8822
8822
|
), dd = /* @__PURE__ */ function() {
|
|
8823
8823
|
var r = function(e, t) {
|
|
8824
8824
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -8846,7 +8846,7 @@ var be = (
|
|
|
8846
8846
|
}, e.prototype.checkWeight = function(t) {
|
|
8847
8847
|
return t < 1e4 ? t : t - 1e4;
|
|
8848
8848
|
}, e;
|
|
8849
|
-
}(
|
|
8849
|
+
}(Fo)
|
|
8850
8850
|
), hd = /* @__PURE__ */ function() {
|
|
8851
8851
|
var r = function(e, t) {
|
|
8852
8852
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -9391,7 +9391,7 @@ var Qi = (
|
|
|
9391
9391
|
} catch {
|
|
9392
9392
|
return null;
|
|
9393
9393
|
}
|
|
9394
|
-
return new
|
|
9394
|
+
return new Mo(u, [o, s], o, s, n);
|
|
9395
9395
|
}, e.prototype.decodeDataCharacter = function(t, n, i, a) {
|
|
9396
9396
|
for (var o = this.getDataCharacterCounters(), s = 0; s < o.length; s++)
|
|
9397
9397
|
o[s] = 0;
|
|
@@ -9812,7 +9812,7 @@ var Qi = (
|
|
|
9812
9812
|
var l = a[0] - s, c = this.getDecodeFinderCounters(), u = new Int32Array(c.length);
|
|
9813
9813
|
de.arraycopy(c, 0, u, 1, c.length - 1), u[0] = l;
|
|
9814
9814
|
var d = this.parseFinderValue(u, e.FINDER_PATTERNS), f = s, h = a[1];
|
|
9815
|
-
return i && (f = t.getSize() - 1 - f, h = t.getSize() - 1 - h), new
|
|
9815
|
+
return i && (f = t.getSize() - 1 - f, h = t.getSize() - 1 - h), new Mo(d, [s, a[1]], f, h, n);
|
|
9816
9816
|
}, e.prototype.adjustOddEvenCounts = function(t, n) {
|
|
9817
9817
|
var i = ee.sum(new Int32Array(this.getOddCounts())), a = ee.sum(new Int32Array(this.getEvenCounts())), o = !1, s = !1, l = !1, c = !1;
|
|
9818
9818
|
t ? (i > 12 ? s = !0 : i < 4 && (o = !0), a > 12 ? c = !0 : a < 4 && (l = !0)) : (i > 11 ? s = !0 : i < 5 && (o = !0), a > 10 ? c = !0 : a < 4 && (l = !0));
|
|
@@ -10196,7 +10196,7 @@ var ea = function(r) {
|
|
|
10196
10196
|
return this.codewords;
|
|
10197
10197
|
}, r;
|
|
10198
10198
|
}()
|
|
10199
|
-
),
|
|
10199
|
+
), Po = (
|
|
10200
10200
|
/** @class */
|
|
10201
10201
|
function() {
|
|
10202
10202
|
function r(e) {
|
|
@@ -10237,7 +10237,7 @@ var Td = (
|
|
|
10237
10237
|
function r() {
|
|
10238
10238
|
}
|
|
10239
10239
|
return r.decode = function(e) {
|
|
10240
|
-
var t = new
|
|
10240
|
+
var t = new Po(e), n = new $(), i = new $(), a = new Array(), o = we.ASCII_ENCODE;
|
|
10241
10241
|
do
|
|
10242
10242
|
if (o === we.ASCII_ENCODE)
|
|
10243
10243
|
o = this.decodeAsciiSegment(t, n, i);
|
|
@@ -10864,7 +10864,7 @@ var Fd = (
|
|
|
10864
10864
|
}
|
|
10865
10865
|
};
|
|
10866
10866
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
10867
|
-
},
|
|
10867
|
+
}, Bo = (
|
|
10868
10868
|
/** @class */
|
|
10869
10869
|
function() {
|
|
10870
10870
|
function r(e) {
|
|
@@ -11056,7 +11056,7 @@ var Fd = (
|
|
|
11056
11056
|
var a = r.VERSION_DECODE_INFO[i];
|
|
11057
11057
|
if (a === e)
|
|
11058
11058
|
return r.getVersionForNumber(i + 7);
|
|
11059
|
-
var o =
|
|
11059
|
+
var o = Bo.numBitsDiffering(e, a);
|
|
11060
11060
|
o < t && (n = i + 7, t = o);
|
|
11061
11061
|
}
|
|
11062
11062
|
return t <= 3 ? r.getVersionForNumber(n) : null;
|
|
@@ -11236,7 +11236,7 @@ var ra = (
|
|
|
11236
11236
|
a = this.copyBit(8, n, a);
|
|
11237
11237
|
for (var t = i - 8; t < i; t++)
|
|
11238
11238
|
a = this.copyBit(t, 8, a);
|
|
11239
|
-
if (this.parsedFormatInfo =
|
|
11239
|
+
if (this.parsedFormatInfo = Bo.decodeFormatInformation(e, a), this.parsedFormatInfo !== null)
|
|
11240
11240
|
return this.parsedFormatInfo;
|
|
11241
11241
|
throw new M();
|
|
11242
11242
|
}, r.prototype.readVersion = function() {
|
|
@@ -11399,7 +11399,7 @@ var he = (
|
|
|
11399
11399
|
function r() {
|
|
11400
11400
|
}
|
|
11401
11401
|
return r.decode = function(e, t, n, i) {
|
|
11402
|
-
var a = new
|
|
11402
|
+
var a = new Po(e), o = new $(), s = new Array(), l = -1, c = -1;
|
|
11403
11403
|
try {
|
|
11404
11404
|
var u = null, d = !1, f = void 0;
|
|
11405
11405
|
do {
|
|
@@ -11555,7 +11555,7 @@ var he = (
|
|
|
11555
11555
|
throw new M();
|
|
11556
11556
|
}, r.ALPHANUMERIC_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", r.GB2312_SUBSET = 1, r;
|
|
11557
11557
|
}()
|
|
11558
|
-
),
|
|
11558
|
+
), ko = (
|
|
11559
11559
|
/** @class */
|
|
11560
11560
|
function() {
|
|
11561
11561
|
function r(e) {
|
|
@@ -11597,7 +11597,7 @@ var he = (
|
|
|
11597
11597
|
try {
|
|
11598
11598
|
n.remask(), n.setMirror(!0), n.readVersion(), n.readFormatInformation(), n.mirror();
|
|
11599
11599
|
var a = this.decodeBitMatrixParser(n, t);
|
|
11600
|
-
return a.setOther(new
|
|
11600
|
+
return a.setOther(new ko(!0)), a;
|
|
11601
11601
|
} catch (o) {
|
|
11602
11602
|
throw i !== null ? i : o;
|
|
11603
11603
|
}
|
|
@@ -12205,7 +12205,7 @@ var he = (
|
|
|
12205
12205
|
return c === null ? C = [i, t, n] : C = [i, t, n, c], new fi(m, C);
|
|
12206
12206
|
}, r.createTransform = function(e, t, n, i, a) {
|
|
12207
12207
|
var o = a - 3.5, s, l, c, u;
|
|
12208
|
-
return i !== null ? (s = i.getX(), l = i.getY(), c = o - 3, u = c) : (s = t.getX() - e.getX() + n.getX(), l = t.getY() - e.getY() + n.getY(), c = o, u = o),
|
|
12208
|
+
return i !== null ? (s = i.getX(), l = i.getY(), c = o - 3, u = c) : (s = t.getX() - e.getX() + n.getX(), l = t.getY() - e.getY() + n.getY(), c = o, u = o), Ro.quadrilateralToQuadrilateral(3.5, 3.5, o, 3.5, c, u, 3.5, o, e.getX(), e.getY(), t.getX(), t.getY(), s, l, n.getX(), n.getY());
|
|
12209
12209
|
}, r.sampleGrid = function(e, t, n) {
|
|
12210
12210
|
var i = hi.getInstance();
|
|
12211
12211
|
return i.sampleGridWithTransform(e, n, n, t);
|
|
@@ -12311,7 +12311,7 @@ var he = (
|
|
|
12311
12311
|
var o = new Kd(e.getBlackMatrix()).detect(t);
|
|
12312
12312
|
n = this.decoder.decodeBitMatrix(o.getBits(), t), i = o.getPoints();
|
|
12313
12313
|
}
|
|
12314
|
-
n.getOther() instanceof
|
|
12314
|
+
n.getOther() instanceof ko && n.getOther().applyMirroredCorrection(i);
|
|
12315
12315
|
var s = new We(n.getText(), n.getRawBytes(), void 0, i, P.QR_CODE, void 0), l = n.getByteSegments();
|
|
12316
12316
|
l !== null && s.putMetadata(Le.BYTE_SEGMENTS, l);
|
|
12317
12317
|
var c = n.getECLevel();
|
|
@@ -18300,7 +18300,7 @@ var he = (
|
|
|
18300
18300
|
return this.logTable[e];
|
|
18301
18301
|
}, r.prototype.inverse = function(e) {
|
|
18302
18302
|
if (e === 0)
|
|
18303
|
-
throw new
|
|
18303
|
+
throw new Do();
|
|
18304
18304
|
return this.expTable[this.modulus - this.logTable[e] - 1];
|
|
18305
18305
|
}, r.prototype.multiply = function(e, t) {
|
|
18306
18306
|
return e === 0 || t === 0 ? 0 : this.expTable[(this.logTable[e] + this.logTable[t]) % (this.modulus - 1)];
|
|
@@ -18564,7 +18564,7 @@ var he = (
|
|
|
18564
18564
|
}
|
|
18565
18565
|
};
|
|
18566
18566
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
18567
|
-
},
|
|
18567
|
+
}, Lo = (
|
|
18568
18568
|
/** @class */
|
|
18569
18569
|
function() {
|
|
18570
18570
|
function r(e) {
|
|
@@ -18843,7 +18843,7 @@ var he = (
|
|
|
18843
18843
|
return "IsLeft: " + this._isLeft + `
|
|
18844
18844
|
` + r.prototype.toString.call(this);
|
|
18845
18845
|
}, e;
|
|
18846
|
-
}(
|
|
18846
|
+
}(Lo)
|
|
18847
18847
|
), pf = function(r) {
|
|
18848
18848
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
18849
18849
|
if (t) return t.call(r);
|
|
@@ -19259,7 +19259,7 @@ var he = (
|
|
|
19259
19259
|
(function(r) {
|
|
19260
19260
|
r[r.ALPHA = 0] = "ALPHA", r[r.LOWER = 1] = "LOWER", r[r.MIXED = 2] = "MIXED", r[r.PUNCT = 3] = "PUNCT", r[r.ALPHA_SHIFT = 4] = "ALPHA_SHIFT", r[r.PUNCT_SHIFT = 5] = "PUNCT_SHIFT";
|
|
19261
19261
|
})(le || (le = {}));
|
|
19262
|
-
function
|
|
19262
|
+
function zo() {
|
|
19263
19263
|
if (typeof window < "u")
|
|
19264
19264
|
return window.BigInt || null;
|
|
19265
19265
|
if (typeof global < "u")
|
|
@@ -19270,7 +19270,7 @@ function Lo() {
|
|
|
19270
19270
|
}
|
|
19271
19271
|
var Mr;
|
|
19272
19272
|
function _t(r) {
|
|
19273
|
-
if (typeof Mr > "u" && (Mr =
|
|
19273
|
+
if (typeof Mr > "u" && (Mr = zo()), Mr === null)
|
|
19274
19274
|
throw new Error("BigInt is not supported!");
|
|
19275
19275
|
return Mr(r);
|
|
19276
19276
|
}
|
|
@@ -19660,7 +19660,7 @@ var If = (
|
|
|
19660
19660
|
throw new M();
|
|
19661
19661
|
return a.substring(1);
|
|
19662
19662
|
}, r.TEXT_COMPACTION_MODE_LATCH = 900, r.BYTE_COMPACTION_MODE_LATCH = 901, r.NUMERIC_COMPACTION_MODE_LATCH = 902, r.BYTE_COMPACTION_MODE_LATCH_6 = 924, r.ECI_USER_DEFINED = 925, r.ECI_GENERAL_PURPOSE = 926, r.ECI_CHARSET = 927, r.BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928, r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923, r.MACRO_PDF417_TERMINATOR = 922, r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913, r.MAX_NUMERIC_CODEWORDS = 15, r.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME = 0, r.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT = 1, r.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP = 2, r.MACRO_PDF417_OPTIONAL_FIELD_SENDER = 3, r.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE = 4, r.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE = 5, r.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM = 6, r.PL = 25, r.LL = 27, r.AS = 27, r.ML = 28, r.AL = 28, r.PS = 29, r.PAL = 29, r.PUNCT_CHARS = `;<>@[\\]_\`~!\r ,:
|
|
19663
|
-
-.$/"|*()?{}'`, r.MIXED_CHARS = "0123456789&\r ,:#-.$/+%*=^", r.EXP900 =
|
|
19663
|
+
-.$/"|*()?{}'`, r.MIXED_CHARS = "0123456789&\r ,:#-.$/+%*=^", r.EXP900 = zo() ? bf() : [], r.NUMBER_OF_SEQUENCE_CODEWORDS = 2, r;
|
|
19664
19664
|
}()
|
|
19665
19665
|
), hr = function(r) {
|
|
19666
19666
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
@@ -19694,7 +19694,7 @@ var If = (
|
|
|
19694
19694
|
if (d.getDetectionResultColumn(m) === /* null */
|
|
19695
19695
|
void 0) {
|
|
19696
19696
|
var C = void 0;
|
|
19697
|
-
m === 0 || m === v ? C = new aa(l, m === 0) : C = new
|
|
19697
|
+
m === 0 || m === v ? C = new aa(l, m === 0) : C = new Lo(l), d.setDetectionResultColumn(m, C);
|
|
19698
19698
|
for (var A = -1, w = A, S = l.getMinY(); S <= l.getMaxY(); S++) {
|
|
19699
19699
|
if (A = r.getStartColumn(d, m, S, g), A < 0 || A > l.getMaxX()) {
|
|
19700
19700
|
if (w === -1)
|
|
@@ -20207,7 +20207,7 @@ var Kn;
|
|
|
20207
20207
|
r[r.ERROR_CORRECTION = 0] = "ERROR_CORRECTION", r[r.CHARACTER_SET = 1] = "CHARACTER_SET", r[r.DATA_MATRIX_SHAPE = 2] = "DATA_MATRIX_SHAPE", r[r.DATA_MATRIX_COMPACT = 3] = "DATA_MATRIX_COMPACT", r[r.MIN_SIZE = 4] = "MIN_SIZE", r[r.MAX_SIZE = 5] = "MAX_SIZE", r[r.MARGIN = 6] = "MARGIN", r[r.PDF417_COMPACT = 7] = "PDF417_COMPACT", r[r.PDF417_COMPACTION = 8] = "PDF417_COMPACTION", r[r.PDF417_DIMENSIONS = 9] = "PDF417_DIMENSIONS", r[r.AZTEC_LAYERS = 10] = "AZTEC_LAYERS", r[r.QR_VERSION = 11] = "QR_VERSION", r[r.GS1_FORMAT = 12] = "GS1_FORMAT", r[r.FORCE_C40 = 13] = "FORCE_C40";
|
|
20208
20208
|
})(Kn || (Kn = {}));
|
|
20209
20209
|
const Vr = Kn;
|
|
20210
|
-
var
|
|
20210
|
+
var Uo = (
|
|
20211
20211
|
/** @class */
|
|
20212
20212
|
function() {
|
|
20213
20213
|
function r(e) {
|
|
@@ -20846,7 +20846,7 @@ var zo = (
|
|
|
20846
20846
|
}, r.generateECBytes = function(e, t) {
|
|
20847
20847
|
for (var n = e.length, i = new Int32Array(n + t), a = 0; a < n; a++)
|
|
20848
20848
|
i[a] = e[a] & 255;
|
|
20849
|
-
new
|
|
20849
|
+
new Uo(Qe.QR_CODE_FIELD_256).encode(i, t);
|
|
20850
20850
|
for (var o = new Uint8Array(t), a = 0; a < t; a++)
|
|
20851
20851
|
o[a] = /*(byte) */
|
|
20852
20852
|
i[n + a];
|
|
@@ -21208,7 +21208,7 @@ var da;
|
|
|
21208
21208
|
(function(r) {
|
|
21209
21209
|
r[r.FORCE_NONE = 0] = "FORCE_NONE", r[r.FORCE_SQUARE = 1] = "FORCE_SQUARE", r[r.FORCE_RECTANGLE = 2] = "FORCE_RECTANGLE";
|
|
21210
21210
|
})(da || (da = {}));
|
|
21211
|
-
var fa = 129,
|
|
21211
|
+
var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 239, Qf = 240, Mn = 254, Jf = 254, ha = "[)>05", pa = "[)>06", va = "", oe = 0, ke = 1, Ye = 2, _e = 3, Ne = 4, Ge = 5, e1 = (
|
|
21212
21212
|
/** @class */
|
|
21213
21213
|
function() {
|
|
21214
21214
|
function r() {
|
|
@@ -21227,7 +21227,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21227
21227
|
e.writeCodeword(Wf), e.signalEncoderChange(Ge);
|
|
21228
21228
|
return;
|
|
21229
21229
|
case ke:
|
|
21230
|
-
e.writeCodeword(
|
|
21230
|
+
e.writeCodeword(Ho), e.signalEncoderChange(ke);
|
|
21231
21231
|
return;
|
|
21232
21232
|
case _e:
|
|
21233
21233
|
e.writeCodeword(Zf), e.signalEncoderChange(_e);
|
|
@@ -21304,7 +21304,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21304
21304
|
var c = e.getSymbolInfo().getDataCapacity() - l, u = Math.floor(t.length() % 3);
|
|
21305
21305
|
(u === 2 && c !== 2 || u === 1 && (n > 3 || c !== 1)) && (e.pos = i);
|
|
21306
21306
|
}
|
|
21307
|
-
t.length() > 0 && e.writeCodeword(
|
|
21307
|
+
t.length() > 0 && e.writeCodeword(Ho), this.handleEOD(e, t);
|
|
21308
21308
|
}, r.prototype.encode = function(e) {
|
|
21309
21309
|
for (var t = new $(); e.hasMoreCharacters(); ) {
|
|
21310
21310
|
var n = e.getCurrentChar();
|
|
@@ -22301,7 +22301,7 @@ var _1 = [
|
|
|
22301
22301
|
"DIGIT",
|
|
22302
22302
|
"MIXED",
|
|
22303
22303
|
"PUNCT"
|
|
22304
|
-
], Et = 0, $r = 1, it = 2,
|
|
22304
|
+
], Et = 0, $r = 1, it = 2, Go = 3, ft = 4, A1 = new xi(null, 0, 0), Fn = [
|
|
22305
22305
|
Int32Array.from([
|
|
22306
22306
|
0,
|
|
22307
22307
|
(5 << 16) + 28,
|
|
@@ -22367,9 +22367,9 @@ function S1(r) {
|
|
|
22367
22367
|
if (e) throw e.error;
|
|
22368
22368
|
}
|
|
22369
22369
|
}
|
|
22370
|
-
return r[Et][
|
|
22370
|
+
return r[Et][ft] = 0, r[$r][ft] = 0, r[$r][Et] = 28, r[Go][ft] = 0, r[it][ft] = 0, r[it][Et] = 15, r;
|
|
22371
22371
|
}
|
|
22372
|
-
var
|
|
22372
|
+
var qo = S1(Se.createInt32Array(6, 6)), b1 = function(r) {
|
|
22373
22373
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
22374
22374
|
if (t) return t.call(r);
|
|
22375
22375
|
if (r && typeof r.length == "number") return {
|
|
@@ -22402,10 +22402,10 @@ var Go = S1(Se.createInt32Array(6, 6)), b1 = function(r) {
|
|
|
22402
22402
|
return i = pr(i, t, o), new r(i, e, 0, n + o);
|
|
22403
22403
|
}, r.prototype.shiftAndAppend = function(e, t) {
|
|
22404
22404
|
var n = this.token, i = this.mode === it ? 4 : 5;
|
|
22405
|
-
return n = pr(n,
|
|
22405
|
+
return n = pr(n, qo[this.mode][e], i), n = pr(n, t, 5), new r(n, this.mode, 0, this.bitCount + i + 5);
|
|
22406
22406
|
}, r.prototype.addBinaryShiftChar = function(e) {
|
|
22407
22407
|
var t = this.token, n = this.mode, i = this.bitCount;
|
|
22408
|
-
if (this.mode ===
|
|
22408
|
+
if (this.mode === ft || this.mode === it) {
|
|
22409
22409
|
var a = Fn[n][Et];
|
|
22410
22410
|
t = pr(t, a & 65535, a >> 16), i += a >> 16, n = Et;
|
|
22411
22411
|
}
|
|
@@ -22488,7 +22488,7 @@ function O1(r) {
|
|
|
22488
22488
|
"~",
|
|
22489
22489
|
""
|
|
22490
22490
|
], f = 0; f < d.length; f++)
|
|
22491
|
-
r[
|
|
22491
|
+
r[Go][Y.getCharCode(d[f])] = f;
|
|
22492
22492
|
for (var h = [
|
|
22493
22493
|
"\0",
|
|
22494
22494
|
"\r",
|
|
@@ -22522,7 +22522,7 @@ function O1(r) {
|
|
|
22522
22522
|
"{",
|
|
22523
22523
|
"}"
|
|
22524
22524
|
], f = 0; f < h.length; f++)
|
|
22525
|
-
Y.getCharCode(h[f]) > 0 && (r[
|
|
22525
|
+
Y.getCharCode(h[f]) > 0 && (r[ft][Y.getCharCode(h[f])] = f);
|
|
22526
22526
|
return r;
|
|
22527
22527
|
}
|
|
22528
22528
|
var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
@@ -22584,14 +22584,14 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22584
22584
|
}
|
|
22585
22585
|
return r.simplifyStates(a);
|
|
22586
22586
|
}, r.prototype.updateStateForChar = function(e, t, n) {
|
|
22587
|
-
for (var i = this.text[t] & 255, a = Pn[e.getMode()][i] > 0, o = null, s = 0; s <=
|
|
22587
|
+
for (var i = this.text[t] & 255, a = Pn[e.getMode()][i] > 0, o = null, s = 0; s <= ft; s++) {
|
|
22588
22588
|
var l = Pn[s][i];
|
|
22589
22589
|
if (l > 0) {
|
|
22590
22590
|
if (o == null && (o = e.endBinaryShift(t)), !a || s === e.getMode() || s === it) {
|
|
22591
22591
|
var c = o.latchAndAppend(s, l);
|
|
22592
22592
|
n.push(c);
|
|
22593
22593
|
}
|
|
22594
|
-
if (!a &&
|
|
22594
|
+
if (!a && qo[e.getMode()][s] >= 0) {
|
|
22595
22595
|
var u = o.shiftAndAppend(s, l);
|
|
22596
22596
|
n.push(u);
|
|
22597
22597
|
}
|
|
@@ -22620,7 +22620,7 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22620
22620
|
return this.simplifyStates(o);
|
|
22621
22621
|
}, r.updateStateForPair = function(e, t, n, i) {
|
|
22622
22622
|
var a = e.endBinaryShift(t);
|
|
22623
|
-
if (i.push(a.latchAndAppend(
|
|
22623
|
+
if (i.push(a.latchAndAppend(ft, n)), e.getMode() !== ft && i.push(a.shiftAndAppend(ft, n)), n === 3 || n === 4) {
|
|
22624
22624
|
var o = a.latchAndAppend(it, 16 - n).latchAndAppend(it, 1);
|
|
22625
22625
|
i.push(o);
|
|
22626
22626
|
}
|
|
@@ -22756,7 +22756,7 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22756
22756
|
i.get(o) && e.set(s, a - 7), i.get(o + 10) && e.set(a + 7, s), i.get(29 - o) && e.set(s, a + 7), i.get(39 - o) && e.set(a - 7, s);
|
|
22757
22757
|
}
|
|
22758
22758
|
}, r.generateCheckWords = function(e, t, n) {
|
|
22759
|
-
var i, a, o = e.getSize() / n, s = new
|
|
22759
|
+
var i, a, o = e.getSize() / n, s = new Uo(r.getGF(n)), l = j.truncDivision(t, n), c = r.bitsToWords(e, n, l);
|
|
22760
22760
|
s.encode(c, l - o);
|
|
22761
22761
|
var u = t % n, d = new Re();
|
|
22762
22762
|
d.appendBits(0, u);
|
|
@@ -22881,12 +22881,12 @@ const D1 = /* @__PURE__ */ new Map([
|
|
|
22881
22881
|
/* @__PURE__ */ _(xt.Content, { children: [
|
|
22882
22882
|
/* @__PURE__ */ p(xt.Title, { className: "sr-only", children: "Scanner" }),
|
|
22883
22883
|
/* @__PURE__ */ p(xt.Description, { className: "sr-only", children: "Scan a barcode or a qr code." }),
|
|
22884
|
-
/* @__PURE__ */ p(
|
|
22884
|
+
/* @__PURE__ */ p(Xo, { ...o })
|
|
22885
22885
|
] })
|
|
22886
22886
|
] });
|
|
22887
22887
|
});
|
|
22888
22888
|
yi.displayName = "Scanner";
|
|
22889
|
-
const
|
|
22889
|
+
const Xo = L((r) => {
|
|
22890
22890
|
const { paused: e, timeBetweenDecodingAttempts: t, onDecodeResult: n, onDecodeError: i, onError: a } = r, { ref: o } = ol({
|
|
22891
22891
|
paused: e,
|
|
22892
22892
|
timeBetweenDecodingAttempts: t,
|
|
@@ -22900,7 +22900,7 @@ const qo = L((r) => {
|
|
|
22900
22900
|
/* @__PURE__ */ p("div", { className: "max-h-full w-full grow overflow-hidden p-4", children: /* @__PURE__ */ p("video", { className: "size-full", ref: o }) })
|
|
22901
22901
|
] });
|
|
22902
22902
|
});
|
|
22903
|
-
|
|
22903
|
+
Xo.displayName = "ScannerInternal";
|
|
22904
22904
|
const R1 = L((r) => {
|
|
22905
22905
|
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
22906
22906
|
n(null);
|
|
@@ -22912,13 +22912,13 @@ const R1 = L((r) => {
|
|
|
22912
22912
|
), o = b(() => {
|
|
22913
22913
|
t && (t.onClose && t.onClose(), i());
|
|
22914
22914
|
}, [i, t]);
|
|
22915
|
-
return /* @__PURE__ */ _(
|
|
22915
|
+
return /* @__PURE__ */ _(To.Provider, { value: a, children: [
|
|
22916
22916
|
e,
|
|
22917
22917
|
t && /* @__PURE__ */ p(yi, { open: !0, onOpenChange: o, ...t })
|
|
22918
22918
|
] });
|
|
22919
22919
|
});
|
|
22920
22920
|
R1.displayName = "FileViewerProvider";
|
|
22921
|
-
const
|
|
22921
|
+
const Wo = L((r) => {
|
|
22922
22922
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
22923
22923
|
(y) => {
|
|
22924
22924
|
const m = y.target.value;
|
|
@@ -22985,7 +22985,7 @@ const Xo = L((r) => {
|
|
|
22985
22985
|
}
|
|
22986
22986
|
);
|
|
22987
22987
|
});
|
|
22988
|
-
|
|
22988
|
+
Wo.displayName = "ScanFieldInput";
|
|
22989
22989
|
class Ar extends tt {
|
|
22990
22990
|
constructor(t) {
|
|
22991
22991
|
super(t);
|
|
@@ -23016,7 +23016,7 @@ class Ar extends tt {
|
|
|
23016
23016
|
return t;
|
|
23017
23017
|
}
|
|
23018
23018
|
render() {
|
|
23019
|
-
return /* @__PURE__ */ p(
|
|
23019
|
+
return /* @__PURE__ */ p(Wo, { field: this });
|
|
23020
23020
|
}
|
|
23021
23021
|
isSerializedValue(t) {
|
|
23022
23022
|
return typeof t == "string";
|
|
@@ -23037,7 +23037,7 @@ class Ar extends tt {
|
|
|
23037
23037
|
return t === n;
|
|
23038
23038
|
}
|
|
23039
23039
|
}
|
|
23040
|
-
const Ca = 500,
|
|
23040
|
+
const Ca = 500, $o = L((r) => {
|
|
23041
23041
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23042
23042
|
(f) => {
|
|
23043
23043
|
const h = f.target.value;
|
|
@@ -23077,8 +23077,8 @@ const Ca = 500, Wo = L((r) => {
|
|
|
23077
23077
|
}
|
|
23078
23078
|
);
|
|
23079
23079
|
});
|
|
23080
|
-
|
|
23081
|
-
class nr extends
|
|
23080
|
+
$o.displayName = "StringFieldInput";
|
|
23081
|
+
class nr extends xo {
|
|
23082
23082
|
constructor(t) {
|
|
23083
23083
|
const { ...n } = t, i = t.maxLength ? Math.min(Ca, t.maxLength) : Ca, a = t.minLength ? Math.min(t.minLength, i) : void 0;
|
|
23084
23084
|
super({ ...n, maxLength: i, minLength: a });
|
|
@@ -23109,10 +23109,10 @@ class nr extends go {
|
|
|
23109
23109
|
});
|
|
23110
23110
|
}
|
|
23111
23111
|
render() {
|
|
23112
|
-
return /* @__PURE__ */ p(
|
|
23112
|
+
return /* @__PURE__ */ p($o, { field: this });
|
|
23113
23113
|
}
|
|
23114
23114
|
}
|
|
23115
|
-
const
|
|
23115
|
+
const jo = L((r) => {
|
|
23116
23116
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23117
23117
|
(d) => {
|
|
23118
23118
|
const f = d.target.value;
|
|
@@ -23152,8 +23152,8 @@ const $o = L((r) => {
|
|
|
23152
23152
|
}
|
|
23153
23153
|
);
|
|
23154
23154
|
});
|
|
23155
|
-
|
|
23156
|
-
class ir extends
|
|
23155
|
+
jo.displayName = "TextFieldInput";
|
|
23156
|
+
class ir extends xo {
|
|
23157
23157
|
constructor(t) {
|
|
23158
23158
|
const n = t.maxLength ? Math.min(Xr, t.maxLength) : Xr, i = t.minLength ? Math.min(t.minLength, n) : void 0;
|
|
23159
23159
|
super({ ...t, maxLength: n, minLength: i });
|
|
@@ -23184,10 +23184,10 @@ class ir extends go {
|
|
|
23184
23184
|
});
|
|
23185
23185
|
}
|
|
23186
23186
|
render() {
|
|
23187
|
-
return /* @__PURE__ */ p(
|
|
23187
|
+
return /* @__PURE__ */ p(jo, { field: this });
|
|
23188
23188
|
}
|
|
23189
23189
|
}
|
|
23190
|
-
const
|
|
23190
|
+
const Yo = V1(), M1 = new Set(Yo);
|
|
23191
23191
|
function V1(r = !0) {
|
|
23192
23192
|
const e = /* @__PURE__ */ new Set();
|
|
23193
23193
|
for (let t = -12; t <= 14; t++) {
|
|
@@ -23240,7 +23240,7 @@ const rn = (r) => {
|
|
|
23240
23240
|
if (!t) throw new Error(`Invalid time value: ${r}`);
|
|
23241
23241
|
const n = (t.hours % 12 || 12).toString().padStart(2, "0"), i = t.minutes.toString().padStart(2, "0"), a = t.hours >= 12 ? "PM" : "AM", o = `${n}:${i} ${a}`;
|
|
23242
23242
|
return e ? `${o} ${ei(t.utcOffset)}` : o;
|
|
23243
|
-
}, Pr = (r) => typeof r == "object" && (Te(r.from) || Te(r.to)),
|
|
23243
|
+
}, Pr = (r) => typeof r == "object" && (Te(r.from) || Te(r.to)), Zo = (r, e) => {
|
|
23244
23244
|
const t = Rt(r), n = e.from ? Rt(e.from) : null, i = e.to ? Rt(e.to) : null;
|
|
23245
23245
|
return n === null && i === null ? !0 : n === null ? t <= i : i === null ? t >= n : n <= i ? t >= n && t <= i : t >= n || t <= i;
|
|
23246
23246
|
}, Ci = L((r) => {
|
|
@@ -23308,7 +23308,7 @@ const rn = (r) => {
|
|
|
23308
23308
|
required: !0,
|
|
23309
23309
|
value: c == null ? void 0 : c.utcOffset,
|
|
23310
23310
|
onValueChange: f,
|
|
23311
|
-
children:
|
|
23311
|
+
children: Yo.map((v) => /* @__PURE__ */ _(D.SelectItem, { value: v, children: [
|
|
23312
23312
|
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(N, { icon: et }) }),
|
|
23313
23313
|
ei(v)
|
|
23314
23314
|
] }, v))
|
|
@@ -23318,7 +23318,7 @@ const rn = (r) => {
|
|
|
23318
23318
|
] });
|
|
23319
23319
|
});
|
|
23320
23320
|
Ci.displayName = "TimeFieldControl";
|
|
23321
|
-
const
|
|
23321
|
+
const Ko = L((r) => {
|
|
23322
23322
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e });
|
|
23323
23323
|
return /* @__PURE__ */ p(
|
|
23324
23324
|
Me,
|
|
@@ -23345,7 +23345,7 @@ const Zo = L((r) => {
|
|
|
23345
23345
|
}
|
|
23346
23346
|
);
|
|
23347
23347
|
});
|
|
23348
|
-
|
|
23348
|
+
Ko.displayName = "TimeFieldInput";
|
|
23349
23349
|
class Er extends tt {
|
|
23350
23350
|
constructor(t) {
|
|
23351
23351
|
super(t);
|
|
@@ -23373,7 +23373,7 @@ class Er extends tt {
|
|
|
23373
23373
|
return t;
|
|
23374
23374
|
}
|
|
23375
23375
|
render() {
|
|
23376
|
-
return /* @__PURE__ */ p(
|
|
23376
|
+
return /* @__PURE__ */ p(Ko, { field: this });
|
|
23377
23377
|
}
|
|
23378
23378
|
isSerializedValue(t) {
|
|
23379
23379
|
return t === null || Te(t);
|
|
@@ -23394,7 +23394,7 @@ class Er extends tt {
|
|
|
23394
23394
|
return t === n;
|
|
23395
23395
|
}
|
|
23396
23396
|
}
|
|
23397
|
-
const
|
|
23397
|
+
const Qo = L((r) => {
|
|
23398
23398
|
var y;
|
|
23399
23399
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(() => {
|
|
23400
23400
|
var m;
|
|
@@ -23415,7 +23415,7 @@ const Ko = L((r) => {
|
|
|
23415
23415
|
},
|
|
23416
23416
|
[n, o, a]
|
|
23417
23417
|
);
|
|
23418
|
-
|
|
23418
|
+
pt(() => {
|
|
23419
23419
|
if (!c.current) return;
|
|
23420
23420
|
const m = new AbortController();
|
|
23421
23421
|
return c.current.addEventListener(
|
|
@@ -23486,7 +23486,7 @@ const Ko = L((r) => {
|
|
|
23486
23486
|
}
|
|
23487
23487
|
);
|
|
23488
23488
|
});
|
|
23489
|
-
|
|
23489
|
+
Qo.displayName = "UploadFieldInput";
|
|
23490
23490
|
class ar extends tt {
|
|
23491
23491
|
constructor(t) {
|
|
23492
23492
|
const { extensions: n, maximum_files: i, maximum_size: a, ...o } = t;
|
|
@@ -23603,7 +23603,7 @@ class ar extends tt {
|
|
|
23603
23603
|
return [];
|
|
23604
23604
|
}
|
|
23605
23605
|
render() {
|
|
23606
|
-
return /* @__PURE__ */ p(
|
|
23606
|
+
return /* @__PURE__ */ p(Qo, { field: this });
|
|
23607
23607
|
}
|
|
23608
23608
|
isSerializedValue(t) {
|
|
23609
23609
|
return Array.isArray(t) && t.length === 0;
|
|
@@ -23624,7 +23624,7 @@ class ar extends tt {
|
|
|
23624
23624
|
return t.length === n.length;
|
|
23625
23625
|
}
|
|
23626
23626
|
}
|
|
23627
|
-
const
|
|
23627
|
+
const Jo = L((r) => {
|
|
23628
23628
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23629
23629
|
(h) => {
|
|
23630
23630
|
const v = h.target.value;
|
|
@@ -23681,7 +23681,7 @@ const Qo = L((r) => {
|
|
|
23681
23681
|
}
|
|
23682
23682
|
);
|
|
23683
23683
|
});
|
|
23684
|
-
|
|
23684
|
+
Jo.displayName = "URLFieldInput";
|
|
23685
23685
|
class Sr extends tt {
|
|
23686
23686
|
constructor(t) {
|
|
23687
23687
|
const { placeholder: n = "https://example.com", ...i } = t;
|
|
@@ -23740,10 +23740,10 @@ class Sr extends tt {
|
|
|
23740
23740
|
return (t == null ? void 0 : t.toString()) === (n == null ? void 0 : n.toString());
|
|
23741
23741
|
}
|
|
23742
23742
|
render() {
|
|
23743
|
-
return /* @__PURE__ */ p(
|
|
23743
|
+
return /* @__PURE__ */ p(Jo, { field: this });
|
|
23744
23744
|
}
|
|
23745
23745
|
}
|
|
23746
|
-
const
|
|
23746
|
+
const es = {
|
|
23747
23747
|
date: wr,
|
|
23748
23748
|
time: Er,
|
|
23749
23749
|
number: Je,
|
|
@@ -23761,7 +23761,7 @@ const Jo = {
|
|
|
23761
23761
|
"pass-fail": Jt,
|
|
23762
23762
|
otp: Kt,
|
|
23763
23763
|
rating: tr
|
|
23764
|
-
}, L1 = Object.keys(
|
|
23764
|
+
}, L1 = Object.keys(es), me = {
|
|
23765
23765
|
"checkbox-list": {
|
|
23766
23766
|
description: "Allows the user to select a multiple options from a list.",
|
|
23767
23767
|
group: J.Selection,
|
|
@@ -23831,7 +23831,7 @@ const Jo = {
|
|
|
23831
23831
|
rating: {
|
|
23832
23832
|
description: "Allows users to select a rating value.",
|
|
23833
23833
|
group: J.Assessment,
|
|
23834
|
-
icon:
|
|
23834
|
+
icon: so,
|
|
23835
23835
|
name: "Rating"
|
|
23836
23836
|
},
|
|
23837
23837
|
select: {
|
|
@@ -23872,7 +23872,7 @@ const Jo = {
|
|
|
23872
23872
|
[J.Temporal]: { name: "Temporal" },
|
|
23873
23873
|
[J.Text]: { name: "Text" },
|
|
23874
23874
|
[J.Verification]: { name: "Verification" }
|
|
23875
|
-
}, mr = 50, U1 = mr * 1e3, H1 = U1 * 1e3, Ve = "Unlabelled",
|
|
23875
|
+
}, mr = 50, U1 = mr * 1e3, H1 = U1 * 1e3, Ve = "Unlabelled", ts = "Unlabelled";
|
|
23876
23876
|
class W {
|
|
23877
23877
|
constructor(e) {
|
|
23878
23878
|
R(this, "id");
|
|
@@ -23965,49 +23965,49 @@ const G1 = W.create({
|
|
|
23965
23965
|
getApplyFn: (r) => (e) => e.length === 0,
|
|
23966
23966
|
serialize: (r) => r,
|
|
23967
23967
|
deserialize: (r) => r
|
|
23968
|
-
}),
|
|
23968
|
+
}), rs = W.create({
|
|
23969
23969
|
id: "number-equals",
|
|
23970
23970
|
getApplyFn: (r) => (e) => e === r,
|
|
23971
23971
|
label: "is",
|
|
23972
23972
|
serialize: (r) => r,
|
|
23973
23973
|
deserialize: (r) => r
|
|
23974
|
-
}),
|
|
23974
|
+
}), ns = W.create({
|
|
23975
23975
|
id: "number-not-equals",
|
|
23976
23976
|
getApplyFn: (r) => (e) => e !== r,
|
|
23977
23977
|
label: "is not",
|
|
23978
23978
|
serialize: (r) => r,
|
|
23979
23979
|
deserialize: (r) => r
|
|
23980
|
-
}),
|
|
23980
|
+
}), is = W.create({
|
|
23981
23981
|
id: "number-less-than",
|
|
23982
23982
|
getApplyFn: (r) => (e) => e < r,
|
|
23983
23983
|
label: "is less than",
|
|
23984
23984
|
serialize: (r) => r,
|
|
23985
23985
|
deserialize: (r) => r
|
|
23986
|
-
}),
|
|
23986
|
+
}), as = W.create({
|
|
23987
23987
|
id: "number-less-than-or-equals",
|
|
23988
23988
|
getApplyFn: (r) => (e) => e <= r,
|
|
23989
23989
|
label: "is less than or equal to",
|
|
23990
23990
|
serialize: (r) => r,
|
|
23991
23991
|
deserialize: (r) => r
|
|
23992
|
-
}),
|
|
23992
|
+
}), os = W.create({
|
|
23993
23993
|
id: "number-greater-than",
|
|
23994
23994
|
getApplyFn: (r) => (e) => e > r,
|
|
23995
23995
|
label: "is greater than",
|
|
23996
23996
|
serialize: (r) => r,
|
|
23997
23997
|
deserialize: (r) => r
|
|
23998
|
-
}),
|
|
23998
|
+
}), ss = W.create({
|
|
23999
23999
|
id: "number-greater-than-or-equals",
|
|
24000
24000
|
getApplyFn: (r) => (e) => e >= r,
|
|
24001
24001
|
label: "is greater than or equal to",
|
|
24002
24002
|
serialize: (r) => r,
|
|
24003
24003
|
deserialize: (r) => r
|
|
24004
|
-
}),
|
|
24004
|
+
}), ls = W.create({
|
|
24005
24005
|
id: "number-range-in",
|
|
24006
24006
|
getApplyFn: (r) => (e) => !(r.to && e > r.to || r.from && e < r.from),
|
|
24007
24007
|
label: "is between",
|
|
24008
24008
|
serialize: (r) => r,
|
|
24009
24009
|
deserialize: (r) => r
|
|
24010
|
-
}),
|
|
24010
|
+
}), cs = W.create({
|
|
24011
24011
|
id: "number-range-not-in",
|
|
24012
24012
|
getApplyFn: (r) => (e) => !!(r.to && e > r.to || r.from && e < r.from),
|
|
24013
24013
|
label: "is not between",
|
|
@@ -24067,7 +24067,7 @@ const G1 = W.create({
|
|
|
24067
24067
|
label: "does not include",
|
|
24068
24068
|
serialize: (r) => r,
|
|
24069
24069
|
deserialize: (r) => r
|
|
24070
|
-
}),
|
|
24070
|
+
}), us = W.create({
|
|
24071
24071
|
id: "string-array-includes",
|
|
24072
24072
|
getApplyFn: (r) => {
|
|
24073
24073
|
const e = new Set(r);
|
|
@@ -24076,7 +24076,7 @@ const G1 = W.create({
|
|
|
24076
24076
|
label: "is any of",
|
|
24077
24077
|
serialize: (r) => r,
|
|
24078
24078
|
deserialize: (r) => r
|
|
24079
|
-
}),
|
|
24079
|
+
}), ds = W.create({
|
|
24080
24080
|
id: "string-array-excludes",
|
|
24081
24081
|
getApplyFn: (r) => {
|
|
24082
24082
|
const e = new Set(r);
|
|
@@ -24172,13 +24172,13 @@ const G1 = W.create({
|
|
|
24172
24172
|
}), s0 = W.create({
|
|
24173
24173
|
id: "time-range-in",
|
|
24174
24174
|
label: "in between",
|
|
24175
|
-
getApplyFn: (r) => (e) =>
|
|
24175
|
+
getApplyFn: (r) => (e) => Zo(e, r),
|
|
24176
24176
|
serialize: (r) => r,
|
|
24177
24177
|
deserialize: (r) => r
|
|
24178
24178
|
}), l0 = W.create({
|
|
24179
24179
|
id: "time-range-not-in",
|
|
24180
24180
|
label: "not in between",
|
|
24181
|
-
getApplyFn: (r) => (e) => !
|
|
24181
|
+
getApplyFn: (r) => (e) => !Zo(e, r),
|
|
24182
24182
|
serialize: (r) => r,
|
|
24183
24183
|
deserialize: (r) => r
|
|
24184
24184
|
}), V = (r) => r;
|
|
@@ -24225,7 +24225,7 @@ class Ue extends Kr {
|
|
|
24225
24225
|
return t;
|
|
24226
24226
|
}
|
|
24227
24227
|
}
|
|
24228
|
-
const
|
|
24228
|
+
const fs = L, Bt = fs(function(r) {
|
|
24229
24229
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24230
24230
|
(a) => typeof t == "function" ? /* @__PURE__ */ _(Ie, { children: [
|
|
24231
24231
|
t(a),
|
|
@@ -24237,7 +24237,7 @@ const ds = L, Bt = ds(function(r) {
|
|
|
24237
24237
|
[t]
|
|
24238
24238
|
);
|
|
24239
24239
|
return /* @__PURE__ */ p(D.SelectItem, { ref: e, ...n, children: i });
|
|
24240
|
-
}),
|
|
24240
|
+
}), hs = fs(function(r) {
|
|
24241
24241
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24242
24242
|
(a) => typeof t == "function" ? /* @__PURE__ */ _(Ie, { children: [
|
|
24243
24243
|
t(a),
|
|
@@ -24282,7 +24282,7 @@ const He = (r) => {
|
|
|
24282
24282
|
] });
|
|
24283
24283
|
});
|
|
24284
24284
|
zr.displayName = "DayPickerPopover";
|
|
24285
|
-
const
|
|
24285
|
+
const ps = L((r) => {
|
|
24286
24286
|
const {
|
|
24287
24287
|
children: e,
|
|
24288
24288
|
open: t,
|
|
@@ -24333,7 +24333,7 @@ const hs = L((r) => {
|
|
|
24333
24333
|
variant: "soft",
|
|
24334
24334
|
type: "button",
|
|
24335
24335
|
onClick: y,
|
|
24336
|
-
children: /* @__PURE__ */ p(N, { icon:
|
|
24336
|
+
children: /* @__PURE__ */ p(N, { icon: dt })
|
|
24337
24337
|
}
|
|
24338
24338
|
)
|
|
24339
24339
|
] }),
|
|
@@ -24366,7 +24366,7 @@ const hs = L((r) => {
|
|
|
24366
24366
|
] }) })
|
|
24367
24367
|
] });
|
|
24368
24368
|
});
|
|
24369
|
-
|
|
24369
|
+
ps.displayName = "NumberInputPopover";
|
|
24370
24370
|
const Mt = L((r) => {
|
|
24371
24371
|
const {
|
|
24372
24372
|
children: e,
|
|
@@ -24381,7 +24381,7 @@ const Mt = L((r) => {
|
|
|
24381
24381
|
placeholder: u = "Enter a number",
|
|
24382
24382
|
...d
|
|
24383
24383
|
} = r, [f, h] = Xe(null);
|
|
24384
|
-
|
|
24384
|
+
pt(() => {
|
|
24385
24385
|
l !== void 0 && h(l);
|
|
24386
24386
|
}, [l]);
|
|
24387
24387
|
const v = b((y) => {
|
|
@@ -24425,7 +24425,7 @@ const Tr = L((r) => {
|
|
|
24425
24425
|
), [t]);
|
|
24426
24426
|
return /* @__PURE__ */ _(D.MultiSelectGroup, { ref: e, ...n, children: [
|
|
24427
24427
|
/* @__PURE__ */ p(bi, { children: "Select all" }),
|
|
24428
|
-
i.map((a) => /* @__PURE__ */ p(
|
|
24428
|
+
i.map((a) => /* @__PURE__ */ p(hs, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value))
|
|
24429
24429
|
] });
|
|
24430
24430
|
});
|
|
24431
24431
|
Tr.displayName = "SelectFieldOptionMultiSelectGroup";
|
|
@@ -24461,7 +24461,7 @@ const cr = L((r) => {
|
|
|
24461
24461
|
},
|
|
24462
24462
|
[c]
|
|
24463
24463
|
);
|
|
24464
|
-
return
|
|
24464
|
+
return pt(() => {
|
|
24465
24465
|
l && h(l);
|
|
24466
24466
|
}, [l]), /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24467
24467
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
@@ -24895,7 +24895,7 @@ const h0 = (r) => {
|
|
|
24895
24895
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Ve })
|
|
24896
24896
|
] }),
|
|
24897
24897
|
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
24898
|
-
/* @__PURE__ */ p(
|
|
24898
|
+
/* @__PURE__ */ p(ps, { values: i ?? ur, onValuesChange: o, children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
|
|
24899
24899
|
/* @__PURE__ */ p(Fe, { condition: e, onClick: t })
|
|
24900
24900
|
] });
|
|
24901
24901
|
}, Ia = {
|
|
@@ -25014,49 +25014,49 @@ const p0 = (r) => {
|
|
|
25014
25014
|
] });
|
|
25015
25015
|
}, Oa = {
|
|
25016
25016
|
equals: V({
|
|
25017
|
-
modifier:
|
|
25017
|
+
modifier: rs,
|
|
25018
25018
|
isValueValid: (r) => typeof r == "number",
|
|
25019
25019
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25020
25020
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25021
25021
|
}),
|
|
25022
25022
|
notEquals: V({
|
|
25023
|
-
modifier:
|
|
25023
|
+
modifier: ns,
|
|
25024
25024
|
isValueValid: (r) => typeof r == "number",
|
|
25025
25025
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25026
25026
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25027
25027
|
}),
|
|
25028
25028
|
lessThan: V({
|
|
25029
|
-
modifier:
|
|
25029
|
+
modifier: is,
|
|
25030
25030
|
isValueValid: (r) => typeof r == "number",
|
|
25031
25031
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25032
25032
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25033
25033
|
}),
|
|
25034
25034
|
lessThanOrEquals: V({
|
|
25035
|
-
modifier:
|
|
25035
|
+
modifier: as,
|
|
25036
25036
|
isValueValid: (r) => typeof r == "number",
|
|
25037
25037
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25038
25038
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25039
25039
|
}),
|
|
25040
25040
|
greaterThan: V({
|
|
25041
|
-
modifier:
|
|
25041
|
+
modifier: os,
|
|
25042
25042
|
isValueValid: (r) => typeof r == "number",
|
|
25043
25043
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25044
25044
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25045
25045
|
}),
|
|
25046
25046
|
greaterThanOrEquals: V({
|
|
25047
|
-
modifier:
|
|
25047
|
+
modifier: ss,
|
|
25048
25048
|
isValueValid: (r) => typeof r == "number",
|
|
25049
25049
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25050
25050
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25051
25051
|
}),
|
|
25052
25052
|
inRange: V({
|
|
25053
|
-
modifier:
|
|
25053
|
+
modifier: ls,
|
|
25054
25054
|
isValueValid: (r) => typeof r == "number",
|
|
25055
25055
|
isConditionValueValid: (r) => typeof r == "object",
|
|
25056
25056
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
25057
25057
|
}),
|
|
25058
25058
|
notInRange: V({
|
|
25059
|
-
modifier:
|
|
25059
|
+
modifier: cs,
|
|
25060
25060
|
isValueValid: (r) => typeof r == "number",
|
|
25061
25061
|
isConditionValueValid: (r) => typeof r == "object",
|
|
25062
25062
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
@@ -25180,7 +25180,7 @@ const g0 = (r) => {
|
|
|
25180
25180
|
/* @__PURE__ */ p(bi, { children: "Select all" }),
|
|
25181
25181
|
_r.map((c) => {
|
|
25182
25182
|
const { label: u, icon: d } = $t[c];
|
|
25183
|
-
return /* @__PURE__ */ _(
|
|
25183
|
+
return /* @__PURE__ */ _(hs, { value: c, children: [
|
|
25184
25184
|
/* @__PURE__ */ p(N, { icon: d }),
|
|
25185
25185
|
/* @__PURE__ */ p("span", { className: "truncate", children: u })
|
|
25186
25186
|
] }, c);
|
|
@@ -25315,13 +25315,13 @@ const x0 = (r) => {
|
|
|
25315
25315
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
25316
25316
|
}),
|
|
25317
25317
|
includes: V({
|
|
25318
|
-
modifier:
|
|
25318
|
+
modifier: us,
|
|
25319
25319
|
isValueValid: (r) => typeof r == "string",
|
|
25320
25320
|
isConditionValueValid: (r) => Array.isArray(r),
|
|
25321
25321
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
25322
25322
|
}),
|
|
25323
25323
|
excludes: V({
|
|
25324
|
-
modifier:
|
|
25324
|
+
modifier: ds,
|
|
25325
25325
|
isValueValid: (r) => typeof r == "string",
|
|
25326
25326
|
isConditionValueValid: (r) => Array.isArray(r),
|
|
25327
25327
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
@@ -25410,49 +25410,49 @@ const y0 = (r) => {
|
|
|
25410
25410
|
] });
|
|
25411
25411
|
}, Ra = {
|
|
25412
25412
|
equals: V({
|
|
25413
|
-
modifier:
|
|
25413
|
+
modifier: rs,
|
|
25414
25414
|
isValueValid: (r) => typeof r == "number",
|
|
25415
25415
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25416
25416
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25417
25417
|
}),
|
|
25418
25418
|
notEquals: V({
|
|
25419
|
-
modifier:
|
|
25419
|
+
modifier: ns,
|
|
25420
25420
|
isValueValid: (r) => typeof r == "number",
|
|
25421
25421
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25422
25422
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25423
25423
|
}),
|
|
25424
25424
|
lessThan: V({
|
|
25425
|
-
modifier:
|
|
25425
|
+
modifier: is,
|
|
25426
25426
|
isValueValid: (r) => typeof r == "number",
|
|
25427
25427
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25428
25428
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25429
25429
|
}),
|
|
25430
25430
|
lessThanOrEquals: V({
|
|
25431
|
-
modifier:
|
|
25431
|
+
modifier: as,
|
|
25432
25432
|
isValueValid: (r) => typeof r == "number",
|
|
25433
25433
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25434
25434
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25435
25435
|
}),
|
|
25436
25436
|
greaterThan: V({
|
|
25437
|
-
modifier:
|
|
25437
|
+
modifier: os,
|
|
25438
25438
|
isValueValid: (r) => typeof r == "number",
|
|
25439
25439
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25440
25440
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25441
25441
|
}),
|
|
25442
25442
|
greaterThanOrEquals: V({
|
|
25443
|
-
modifier:
|
|
25443
|
+
modifier: ss,
|
|
25444
25444
|
isValueValid: (r) => typeof r == "number",
|
|
25445
25445
|
isConditionValueValid: (r) => typeof r == "number",
|
|
25446
25446
|
isSerializedValueValid: (r) => typeof r == "number"
|
|
25447
25447
|
}),
|
|
25448
25448
|
inRange: V({
|
|
25449
|
-
modifier:
|
|
25449
|
+
modifier: ls,
|
|
25450
25450
|
isValueValid: (r) => typeof r == "number",
|
|
25451
25451
|
isConditionValueValid: (r) => typeof r == "object",
|
|
25452
25452
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
25453
25453
|
}),
|
|
25454
25454
|
notInRange: V({
|
|
25455
|
-
modifier:
|
|
25455
|
+
modifier: cs,
|
|
25456
25456
|
isValueValid: (r) => typeof r == "number",
|
|
25457
25457
|
isConditionValueValid: (r) => typeof r == "object",
|
|
25458
25458
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
@@ -25614,13 +25614,13 @@ const C0 = (r) => {
|
|
|
25614
25614
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
25615
25615
|
}),
|
|
25616
25616
|
includes: V({
|
|
25617
|
-
modifier:
|
|
25617
|
+
modifier: us,
|
|
25618
25618
|
isValueValid: (r) => typeof r == "string",
|
|
25619
25619
|
isConditionValueValid: (r) => Array.isArray(r),
|
|
25620
25620
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
25621
25621
|
}),
|
|
25622
25622
|
excludes: V({
|
|
25623
|
-
modifier:
|
|
25623
|
+
modifier: ds,
|
|
25624
25624
|
isValueValid: (r) => typeof r == "string",
|
|
25625
25625
|
isConditionValueValid: (r) => Array.isArray(r),
|
|
25626
25626
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
@@ -26037,20 +26037,20 @@ const b0 = {
|
|
|
26037
26037
|
if (r.type !== e.type)
|
|
26038
26038
|
throw new Error(`field and condition type mismatch ${r.type} !== ${e.type}`);
|
|
26039
26039
|
return b0[e.type].deserialize(e, r);
|
|
26040
|
-
},
|
|
26041
|
-
const t =
|
|
26040
|
+
}, vs = (r, e) => {
|
|
26041
|
+
const t = gs(r, e), n = {};
|
|
26042
26042
|
for (const i of r)
|
|
26043
26043
|
n[i.identifier] = i;
|
|
26044
26044
|
return t.map(
|
|
26045
26045
|
(i) => I0(n[i.fieldId], i)
|
|
26046
26046
|
);
|
|
26047
|
-
}, O0 = (r, e) =>
|
|
26047
|
+
}, O0 = (r, e) => xs(r, e).map((n) => n.serialize()), gs = (r, e) => {
|
|
26048
26048
|
const t = new Set(r.map((n) => n.identifier));
|
|
26049
26049
|
return e.filter((n) => t.has(n.fieldId));
|
|
26050
|
-
},
|
|
26050
|
+
}, xs = (r, e) => {
|
|
26051
26051
|
const t = new Set(r.map((n) => n.identifier));
|
|
26052
26052
|
return e.filter((n) => t.has(n.field.identifier));
|
|
26053
|
-
}, Ni = (r) =>
|
|
26053
|
+
}, Ni = (r) => es[r.type].deserialize(r);
|
|
26054
26054
|
function fh(r) {
|
|
26055
26055
|
return r.map(N0);
|
|
26056
26056
|
}
|
|
@@ -26084,7 +26084,7 @@ function T0(r, e, t = !0) {
|
|
|
26084
26084
|
return i;
|
|
26085
26085
|
}
|
|
26086
26086
|
function D0(r, e, t = !0) {
|
|
26087
|
-
const n = t ?
|
|
26087
|
+
const n = t ? ys(r, e) : e, i = {};
|
|
26088
26088
|
for (const a of r) {
|
|
26089
26089
|
if (!(a.identifier in n)) continue;
|
|
26090
26090
|
const o = n[a.identifier];
|
|
@@ -26101,7 +26101,7 @@ function Ti(r, e) {
|
|
|
26101
26101
|
}
|
|
26102
26102
|
return t;
|
|
26103
26103
|
}
|
|
26104
|
-
function
|
|
26104
|
+
function ys(r, e) {
|
|
26105
26105
|
const t = {};
|
|
26106
26106
|
for (const n of r) {
|
|
26107
26107
|
if (!(n.identifier in e)) continue;
|
|
@@ -26178,15 +26178,15 @@ const V0 = (r, e) => {
|
|
|
26178
26178
|
i.areValuesEqual(a, o) && (n[i.identifier] = o);
|
|
26179
26179
|
}
|
|
26180
26180
|
return n;
|
|
26181
|
-
},
|
|
26181
|
+
}, ms = (r, e, t) => r.every((n) => {
|
|
26182
26182
|
const i = e[n.identifier], a = t[n.identifier];
|
|
26183
26183
|
return n.areValuesEqual(i, a);
|
|
26184
|
-
}),
|
|
26184
|
+
}), Cs = (r) => {
|
|
26185
26185
|
const e = {};
|
|
26186
26186
|
for (const t of r)
|
|
26187
26187
|
e[t.identifier] = t.blankValue();
|
|
26188
26188
|
return e;
|
|
26189
|
-
}, B0 = (r, e) =>
|
|
26189
|
+
}, B0 = (r, e) => ms(r, e, Cs(r)), k0 = ri(["flex", "flex-col"], {
|
|
26190
26190
|
variants: {
|
|
26191
26191
|
size: {
|
|
26192
26192
|
xs: ["gap-2"],
|
|
@@ -26206,8 +26206,8 @@ const V0 = (r, e) => {
|
|
|
26206
26206
|
xl: ["gap-10"]
|
|
26207
26207
|
}
|
|
26208
26208
|
}
|
|
26209
|
-
}),
|
|
26210
|
-
const { fieldSection: e } = r, { label: t, description: n } = e, i =
|
|
26209
|
+
}), ws = L((r) => {
|
|
26210
|
+
const { fieldSection: e } = r, { label: t, description: n } = e, i = Ga(), { fieldSchema: a, size: o } = ce(Ce), s = se(() => a.getFieldSections(), [a]), l = se(() => s.findIndex(({ identifier: f }) => f === e.identifier), [s, e.identifier]), c = se(() => s.filter((f) => e.identifier in f.conditions), [s, e.identifier]), u = se(() => c.length === 0 ? !0 : c.some((f) => {
|
|
26211
26211
|
const h = f.getConditions(e.identifier);
|
|
26212
26212
|
return new Oi(h).applyConditions(i);
|
|
26213
26213
|
}), [c, e, i]), d = Ln(e.fields);
|
|
@@ -26215,15 +26215,15 @@ const V0 = (r, e) => {
|
|
|
26215
26215
|
l !== 0 ? /* @__PURE__ */ p(Vt, { size: "full" }) : null,
|
|
26216
26216
|
/* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
|
|
26217
26217
|
(t || n) && /* @__PURE__ */ p(Ie, { children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
|
|
26218
|
-
/* @__PURE__ */ p(
|
|
26218
|
+
/* @__PURE__ */ p(qs, { size: o, children: t }),
|
|
26219
26219
|
n && /* @__PURE__ */ p(pe, { accentColor: "base", size: o, children: n })
|
|
26220
26220
|
] }) }),
|
|
26221
26221
|
/* @__PURE__ */ p("div", { className: Di({ size: o }), children: d })
|
|
26222
26222
|
] })
|
|
26223
26223
|
] }) : null;
|
|
26224
26224
|
});
|
|
26225
|
-
|
|
26226
|
-
const Cr = class Cr extends
|
|
26225
|
+
ws.displayName = "FieldSectionLayout";
|
|
26226
|
+
const Cr = class Cr extends co {
|
|
26227
26227
|
constructor(t) {
|
|
26228
26228
|
const { label: n = null, description: i = null, fields: a, conditions: o = {}, ...s } = t;
|
|
26229
26229
|
super(s);
|
|
@@ -26352,13 +26352,13 @@ const Cr = class Cr extends lo {
|
|
|
26352
26352
|
}
|
|
26353
26353
|
// Render
|
|
26354
26354
|
render() {
|
|
26355
|
-
return /* @__PURE__ */ p(
|
|
26355
|
+
return /* @__PURE__ */ p(ws, { fieldSection: this });
|
|
26356
26356
|
}
|
|
26357
26357
|
};
|
|
26358
26358
|
R(Cr, "deserialize", (t) => {
|
|
26359
26359
|
const n = t.fields.map(Ni), i = {};
|
|
26360
26360
|
for (const [a, o] of Object.entries(t.conditions))
|
|
26361
|
-
i[a] =
|
|
26361
|
+
i[a] = vs(n, o);
|
|
26362
26362
|
return new Cr({ ...t, fields: n, conditions: i });
|
|
26363
26363
|
});
|
|
26364
26364
|
let ot = Cr;
|
|
@@ -26386,7 +26386,7 @@ const gt = jr({}), wn = L((r) => {
|
|
|
26386
26386
|
return c.length === 0 ? null : /* @__PURE__ */ _(D.Group, { children: [
|
|
26387
26387
|
/* @__PURE__ */ p(D.Label, { children: u }),
|
|
26388
26388
|
c.map((d) => /* @__PURE__ */ p(
|
|
26389
|
-
|
|
26389
|
+
_s,
|
|
26390
26390
|
{
|
|
26391
26391
|
fieldType: d,
|
|
26392
26392
|
onSelectFieldType: a
|
|
@@ -26398,7 +26398,7 @@ const gt = jr({}), wn = L((r) => {
|
|
|
26398
26398
|
] });
|
|
26399
26399
|
});
|
|
26400
26400
|
wn.displayName = "CreateFieldDropdownMenu";
|
|
26401
|
-
const
|
|
26401
|
+
const _s = L((r) => {
|
|
26402
26402
|
const { fieldType: e, onSelectFieldType: t } = r, n = b(() => {
|
|
26403
26403
|
t(e);
|
|
26404
26404
|
}, [e, t]), { icon: i, name: a } = me[e];
|
|
@@ -26407,7 +26407,7 @@ const ws = L((r) => {
|
|
|
26407
26407
|
/* @__PURE__ */ p(pe, { className: "truncate", children: a })
|
|
26408
26408
|
] });
|
|
26409
26409
|
});
|
|
26410
|
-
|
|
26410
|
+
_s.displayName = "CreateFieldDropdownMenuItem";
|
|
26411
26411
|
const Ri = (r) => {
|
|
26412
26412
|
switch (r) {
|
|
26413
26413
|
case "text":
|
|
@@ -26520,7 +26520,7 @@ const Ri = (r) => {
|
|
|
26520
26520
|
maxRating: 5
|
|
26521
26521
|
});
|
|
26522
26522
|
}
|
|
26523
|
-
},
|
|
26523
|
+
}, As = (r) => {
|
|
26524
26524
|
switch (r.type) {
|
|
26525
26525
|
case "text":
|
|
26526
26526
|
return new xn({ id: G(), conditionValue: void 0, conditionModifier: "equals", field: r });
|
|
@@ -26637,7 +26637,7 @@ const Ri = (r) => {
|
|
|
26637
26637
|
field: r
|
|
26638
26638
|
});
|
|
26639
26639
|
}
|
|
26640
|
-
},
|
|
26640
|
+
}, Es = (r, e) => {
|
|
26641
26641
|
switch (r) {
|
|
26642
26642
|
case "checkbox-list":
|
|
26643
26643
|
return Zt.getFieldCreationSchema(e);
|
|
@@ -26664,7 +26664,7 @@ const Ri = (r) => {
|
|
|
26664
26664
|
default:
|
|
26665
26665
|
return;
|
|
26666
26666
|
}
|
|
26667
|
-
},
|
|
26667
|
+
}, Ss = L((r) => {
|
|
26668
26668
|
const { popoverInputs: e, ...t } = r;
|
|
26669
26669
|
return /* @__PURE__ */ _(xe.Root, { children: [
|
|
26670
26670
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(B, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
|
|
@@ -26674,16 +26674,16 @@ const Ri = (r) => {
|
|
|
26674
26674
|
/* @__PURE__ */ p(xe.Content, { size: "sm", ...t, children: /* @__PURE__ */ p("div", { className: kt("flex w-full max-w-[350px] flex-col", Di({ size: "sm" })), children: e }) })
|
|
26675
26675
|
] });
|
|
26676
26676
|
});
|
|
26677
|
-
|
|
26678
|
-
const
|
|
26677
|
+
Ss.displayName = "FieldSettingsPopover";
|
|
26678
|
+
const bs = L((r) => {
|
|
26679
26679
|
const { parentPath: e, fieldIndex: t, field: n } = r, i = si(), { disableRequiredFields: a } = ce(gt), [o, s] = Xe(void 0);
|
|
26680
|
-
|
|
26680
|
+
pt(() => {
|
|
26681
26681
|
n.image instanceof Promise ? n.image.then(s).catch(console.error) : s(n.image);
|
|
26682
26682
|
}, [n]);
|
|
26683
26683
|
const l = b(() => {
|
|
26684
26684
|
n.setOptions({ image: void 0 });
|
|
26685
26685
|
}, [n]), [c, u] = se(() => {
|
|
26686
|
-
const w = [], S = [], O =
|
|
26686
|
+
const w = [], S = [], O = Es(n.type, `${e}.${t}`) ?? [];
|
|
26687
26687
|
for (const T of O)
|
|
26688
26688
|
T.showDirectly ? w.push(T.field) : S.push(T.field);
|
|
26689
26689
|
return [w, S];
|
|
@@ -26727,7 +26727,7 @@ const Ss = L((r) => {
|
|
|
26727
26727
|
/* @__PURE__ */ p(pe, { size: "sm", accentColor: "base", children: "Required" })
|
|
26728
26728
|
] })
|
|
26729
26729
|
] }),
|
|
26730
|
-
h && /* @__PURE__ */ p(
|
|
26730
|
+
h && /* @__PURE__ */ p(Ss, { popoverInputs: f, align: "end" })
|
|
26731
26731
|
] }),
|
|
26732
26732
|
o && /* @__PURE__ */ _("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
|
|
26733
26733
|
/* @__PURE__ */ p(
|
|
@@ -26778,7 +26778,7 @@ const Ss = L((r) => {
|
|
|
26778
26778
|
c.length > 0 && /* @__PURE__ */ p("div", { className: kt("w-full", Di({ size: "sm" })), children: d })
|
|
26779
26779
|
] });
|
|
26780
26780
|
});
|
|
26781
|
-
|
|
26781
|
+
bs.displayName = "FieldBuilder";
|
|
26782
26782
|
const Mi = L((r) => {
|
|
26783
26783
|
const { field: e, fieldSection: t, fieldIndex: n, sectionIndex: i } = r, a = Yr(null), o = `fields.${i}.fields`, s = b(
|
|
26784
26784
|
(g) => {
|
|
@@ -26822,14 +26822,14 @@ const Mi = L((r) => {
|
|
|
26822
26822
|
}, []), v = b(() => {
|
|
26823
26823
|
t.removeField(e);
|
|
26824
26824
|
}, [e, t]);
|
|
26825
|
-
return /* @__PURE__ */ _(
|
|
26826
|
-
/* @__PURE__ */ p(
|
|
26825
|
+
return /* @__PURE__ */ _(ht, { className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
26826
|
+
/* @__PURE__ */ p(bs, { fieldIndex: n, field: e, parentPath: o }),
|
|
26827
26827
|
/* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
26828
|
-
/* @__PURE__ */ p(wn, { onSelectFieldType: s, size: "sm", children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon:
|
|
26829
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: d, children: /* @__PURE__ */ p(N, { icon:
|
|
26830
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: f, children: /* @__PURE__ */ p(N, { icon:
|
|
26828
|
+
/* @__PURE__ */ p(wn, { onSelectFieldType: s, size: "sm", children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon: dt }) }) }),
|
|
26829
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: d, children: /* @__PURE__ */ p(N, { icon: oo }) }),
|
|
26830
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: f, children: /* @__PURE__ */ p(N, { icon: ao }) }),
|
|
26831
26831
|
/* @__PURE__ */ p(ne, { type: "button", onClick: l, children: /* @__PURE__ */ p(N, { icon: ai }) }),
|
|
26832
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: h, children: /* @__PURE__ */ p(N, { icon:
|
|
26832
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: h, children: /* @__PURE__ */ p(N, { icon: no }) }),
|
|
26833
26833
|
/* @__PURE__ */ p(ne, { type: "button", onClick: v, children: /* @__PURE__ */ p(N, { icon: Lt }) })
|
|
26834
26834
|
] }),
|
|
26835
26835
|
/* @__PURE__ */ p("input", { className: "hidden", ref: a, type: "file", accept: "image/*", onChange: u })
|
|
@@ -26840,11 +26840,11 @@ const Vi = L((r) => {
|
|
|
26840
26840
|
const { children: e, variant: t, size: n, accentColor: i, fields: a, onSelectField: o, ...s } = r;
|
|
26841
26841
|
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26842
26842
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
26843
|
-
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(D.Scroll, { children: a.map((l) => /* @__PURE__ */ p(
|
|
26843
|
+
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(D.Scroll, { children: a.map((l) => /* @__PURE__ */ p(Is, { field: l, onSelectField: o }, l.identifier)) }) })
|
|
26844
26844
|
] });
|
|
26845
26845
|
});
|
|
26846
26846
|
Vi.displayName = "FieldDropdownMenu";
|
|
26847
|
-
const
|
|
26847
|
+
const Is = L((r) => {
|
|
26848
26848
|
const { field: e, onSelectField: t } = r, n = b(() => {
|
|
26849
26849
|
t(e);
|
|
26850
26850
|
}, [e, t]);
|
|
@@ -26853,13 +26853,13 @@ const bs = L((r) => {
|
|
|
26853
26853
|
e.label || Ve
|
|
26854
26854
|
] });
|
|
26855
26855
|
});
|
|
26856
|
-
|
|
26857
|
-
const
|
|
26856
|
+
Is.displayName = "FieldDropdownMenuItem";
|
|
26857
|
+
const Os = L((r) => {
|
|
26858
26858
|
const { children: e, variant: t, size: n, accentColor: i, fieldSections: a, onSelectFieldSection: o, ...s } = r;
|
|
26859
26859
|
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26860
26860
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
26861
26861
|
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: a.map((l) => /* @__PURE__ */ p(
|
|
26862
|
-
|
|
26862
|
+
Ns,
|
|
26863
26863
|
{
|
|
26864
26864
|
fieldSection: l,
|
|
26865
26865
|
onSelectFieldSection: o
|
|
@@ -26868,23 +26868,23 @@ const Is = L((r) => {
|
|
|
26868
26868
|
)) })
|
|
26869
26869
|
] });
|
|
26870
26870
|
});
|
|
26871
|
-
|
|
26872
|
-
const
|
|
26871
|
+
Os.displayName = "FieldSectionDropdownMenu";
|
|
26872
|
+
const Ns = L((r) => {
|
|
26873
26873
|
const { fieldSection: e, onSelectFieldSection: t } = r, n = b(() => {
|
|
26874
26874
|
t(e);
|
|
26875
26875
|
}, [e, t]);
|
|
26876
26876
|
return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
|
|
26877
|
-
/* @__PURE__ */ p(N, { icon:
|
|
26878
|
-
e.label ||
|
|
26877
|
+
/* @__PURE__ */ p(N, { icon: io }),
|
|
26878
|
+
e.label || ts
|
|
26879
26879
|
] });
|
|
26880
26880
|
});
|
|
26881
|
-
|
|
26882
|
-
const
|
|
26881
|
+
Ns.displayName = "FieldSectionDropdownMenuItem";
|
|
26882
|
+
const Ts = L((r) => {
|
|
26883
26883
|
const { id: e, sourceX: t, sourceY: n, targetX: i, targetY: a, style: o, markerEnd: s, data: l } = r, { targetSection: c, sourceSection: u, layoutDirection: d } = l, f = se(() => u.getConditions(c.identifier), [u, c.identifier]), h = b(() => {
|
|
26884
26884
|
u.removeConditional(c.identifier);
|
|
26885
26885
|
}, [u, c.identifier]), v = b(
|
|
26886
26886
|
(A) => {
|
|
26887
|
-
u.addCondition(c.identifier,
|
|
26887
|
+
u.addCondition(c.identifier, As(A));
|
|
26888
26888
|
},
|
|
26889
26889
|
[u, c.identifier]
|
|
26890
26890
|
), g = b(
|
|
@@ -26903,7 +26903,7 @@ const Ns = L((r) => {
|
|
|
26903
26903
|
return /* @__PURE__ */ _(Ie, { children: [
|
|
26904
26904
|
/* @__PURE__ */ p(js, { id: e, path: y, style: o, markerEnd: s, labelX: m, labelY: C }),
|
|
26905
26905
|
/* @__PURE__ */ p(Ys, { children: /* @__PURE__ */ _(
|
|
26906
|
-
|
|
26906
|
+
ht,
|
|
26907
26907
|
{
|
|
26908
26908
|
size: "xs",
|
|
26909
26909
|
variant: "surface",
|
|
@@ -26924,7 +26924,7 @@ const Ns = L((r) => {
|
|
|
26924
26924
|
variant: "surface",
|
|
26925
26925
|
size: "xs",
|
|
26926
26926
|
accentColor: "base",
|
|
26927
|
-
children: /* @__PURE__ */ p(N, { icon:
|
|
26927
|
+
children: /* @__PURE__ */ p(N, { icon: dt })
|
|
26928
26928
|
}
|
|
26929
26929
|
) }),
|
|
26930
26930
|
/* @__PURE__ */ _(Xt.Root, { children: [
|
|
@@ -26953,8 +26953,8 @@ const Ns = L((r) => {
|
|
|
26953
26953
|
) })
|
|
26954
26954
|
] });
|
|
26955
26955
|
});
|
|
26956
|
-
|
|
26957
|
-
const
|
|
26956
|
+
Ts.displayName = "FieldSectionConditionEdgeComponent";
|
|
26957
|
+
const Ds = L((r) => {
|
|
26958
26958
|
const { data: e, selected: t } = r, { fieldSection: n, index: i, layoutDirection: a } = e, { fieldSchema: o } = ce(gt), s = b(() => {
|
|
26959
26959
|
o.removeFieldSection(n);
|
|
26960
26960
|
}, [o, n]), l = b(
|
|
@@ -26979,7 +26979,7 @@ const Ts = L((r) => {
|
|
|
26979
26979
|
[n]
|
|
26980
26980
|
);
|
|
26981
26981
|
return /* @__PURE__ */ _(
|
|
26982
|
-
|
|
26982
|
+
ht,
|
|
26983
26983
|
{
|
|
26984
26984
|
variant: "surface",
|
|
26985
26985
|
className: "bg-(--base-2) relative cursor-pointer",
|
|
@@ -27013,7 +27013,7 @@ const Ts = L((r) => {
|
|
|
27013
27013
|
/* @__PURE__ */ _("div", { className: "flex items-center justify-between", children: [
|
|
27014
27014
|
/* @__PURE__ */ p(pe, { weight: "bold", children: "Fields" }),
|
|
27015
27015
|
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", accentColor: "base", children: [
|
|
27016
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27016
|
+
/* @__PURE__ */ p(N, { icon: dt }),
|
|
27017
27017
|
" Add field"
|
|
27018
27018
|
] }) })
|
|
27019
27019
|
] }),
|
|
@@ -27029,7 +27029,7 @@ const Ts = L((r) => {
|
|
|
27029
27029
|
)) })
|
|
27030
27030
|
] }),
|
|
27031
27031
|
/* @__PURE__ */ p(Zs, { isVisible: !0, position: yt.Right, align: "start", offset: 8, onMouseDown: mt, children: /* @__PURE__ */ p(
|
|
27032
|
-
|
|
27032
|
+
ht,
|
|
27033
27033
|
{
|
|
27034
27034
|
variant: "surface",
|
|
27035
27035
|
className: "bg-(--base-2) flex flex-col items-center gap-1 p-1",
|
|
@@ -27062,11 +27062,11 @@ const Ts = L((r) => {
|
|
|
27062
27062
|
}
|
|
27063
27063
|
);
|
|
27064
27064
|
});
|
|
27065
|
-
|
|
27065
|
+
Ds.displayName = "CustomNode";
|
|
27066
27066
|
const L0 = {
|
|
27067
|
-
fieldSection:
|
|
27067
|
+
fieldSection: Ds
|
|
27068
27068
|
}, z0 = {
|
|
27069
|
-
fieldSectionCondition:
|
|
27069
|
+
fieldSectionCondition: Ts
|
|
27070
27070
|
}, U0 = (r, e, t) => {
|
|
27071
27071
|
const n = new Bi.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
27072
27072
|
return n.setGraph({ rankdir: t, nodesep: 200, edgesep: 500, ranksep: 500 }), e.forEach(
|
|
@@ -27095,10 +27095,10 @@ const L0 = {
|
|
|
27095
27095
|
];
|
|
27096
27096
|
}, H0 = {
|
|
27097
27097
|
hideAttribution: !0
|
|
27098
|
-
},
|
|
27098
|
+
}, Rs = L(() => {
|
|
27099
27099
|
var U;
|
|
27100
|
-
const { errors: r } =
|
|
27101
|
-
|
|
27100
|
+
const { errors: r } = qa(), { handleSubmit: e } = Xa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = Yr(null), [o, s] = Xe(), [l, c] = Xe("TB");
|
|
27101
|
+
Ua(() => {
|
|
27102
27102
|
a.current && a.current.classList.remove("light");
|
|
27103
27103
|
}, []);
|
|
27104
27104
|
const u = se(
|
|
@@ -27138,9 +27138,9 @@ const L0 = {
|
|
|
27138
27138
|
}
|
|
27139
27139
|
return Z;
|
|
27140
27140
|
}, [i.fieldSections, l]), [f, h, v] = Qs(u), [g, y, m] = Js(d);
|
|
27141
|
-
|
|
27141
|
+
pt(() => {
|
|
27142
27142
|
h(u);
|
|
27143
|
-
}, [u, h]),
|
|
27143
|
+
}, [u, h]), pt(() => {
|
|
27144
27144
|
y(d);
|
|
27145
27145
|
}, [d, y]);
|
|
27146
27146
|
const [C, A] = se(() => U0(f, g, l), [g, l, f]), w = b(() => {
|
|
@@ -27159,7 +27159,7 @@ const L0 = {
|
|
|
27159
27159
|
), O = b(
|
|
27160
27160
|
(Z) => {
|
|
27161
27161
|
const X = i.getSectionDependencyGraph();
|
|
27162
|
-
return !
|
|
27162
|
+
return !Ha(X, Z.source, Z.target);
|
|
27163
27163
|
},
|
|
27164
27164
|
[i]
|
|
27165
27165
|
), T = b(() => {
|
|
@@ -27170,7 +27170,7 @@ const L0 = {
|
|
|
27170
27170
|
o == null || o.fitView();
|
|
27171
27171
|
}, [o]);
|
|
27172
27172
|
return /* @__PURE__ */ _("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
|
|
27173
|
-
/* @__PURE__ */ _(
|
|
27173
|
+
/* @__PURE__ */ _(ht, { className: "relative size-full", variant: "outline", children: [
|
|
27174
27174
|
/* @__PURE__ */ p(
|
|
27175
27175
|
el,
|
|
27176
27176
|
{
|
|
@@ -27191,7 +27191,7 @@ const L0 = {
|
|
|
27191
27191
|
}
|
|
27192
27192
|
),
|
|
27193
27193
|
/* @__PURE__ */ p(In, { position: "top-left", children: /* @__PURE__ */ p(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "surface", onClick: w, children: [
|
|
27194
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27194
|
+
/* @__PURE__ */ p(N, { icon: dt }),
|
|
27195
27195
|
" Add section"
|
|
27196
27196
|
] }) }) }),
|
|
27197
27197
|
/* @__PURE__ */ _(In, { position: "top-right", className: "flex flex-col items-center gap-2", children: [
|
|
@@ -27212,7 +27212,7 @@ const L0 = {
|
|
|
27212
27212
|
),
|
|
27213
27213
|
/* @__PURE__ */ p(Vt, { size: "sm" }),
|
|
27214
27214
|
/* @__PURE__ */ _(ue, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
27215
|
-
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(N, { icon:
|
|
27215
|
+
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(N, { icon: dt }) }),
|
|
27216
27216
|
/* @__PURE__ */ p(ne, { onClick: T, radius: "none", type: "button", children: /* @__PURE__ */ p(N, { icon: Gr }) }),
|
|
27217
27217
|
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: z, type: "button", children: /* @__PURE__ */ p(N, { icon: Sc }) })
|
|
27218
27218
|
] })
|
|
@@ -27225,7 +27225,7 @@ const L0 = {
|
|
|
27225
27225
|
!!((U = r.fields) != null && U.message) && /* @__PURE__ */ p(pe, { size: "xs", accentColor: "danger", children: r.fields.message })
|
|
27226
27226
|
] });
|
|
27227
27227
|
});
|
|
27228
|
-
|
|
27228
|
+
Rs.displayName = "FormBuilderFlowBuilder";
|
|
27229
27229
|
const G0 = (r, e, t = {}) => {
|
|
27230
27230
|
const { conditions: n = !1 } = t, i = r.get(e.identifier);
|
|
27231
27231
|
if (!i)
|
|
@@ -27264,7 +27264,7 @@ const G0 = (r, e, t = {}) => {
|
|
|
27264
27264
|
r.map((n) => [n.identifier, G()])
|
|
27265
27265
|
);
|
|
27266
27266
|
return r.map((n) => G0(t, n, e));
|
|
27267
|
-
},
|
|
27267
|
+
}, Ms = (r, e) => {
|
|
27268
27268
|
const t = {}, n = r.filter((i) => i instanceof ot);
|
|
27269
27269
|
for (const i of r)
|
|
27270
27270
|
if (i instanceof ot) {
|
|
@@ -27279,7 +27279,7 @@ const G0 = (r, e, t = {}) => {
|
|
|
27279
27279
|
} else {
|
|
27280
27280
|
if (!(i instanceof tt))
|
|
27281
27281
|
throw new Error("Invalid field type");
|
|
27282
|
-
const a = i.identifier, o = i.getError(
|
|
27282
|
+
const a = i.identifier, o = i.getError(Ya(e, a));
|
|
27283
27283
|
o && cl(t, a, o);
|
|
27284
27284
|
}
|
|
27285
27285
|
return t;
|
|
@@ -27379,7 +27379,7 @@ class or extends Kr {
|
|
|
27379
27379
|
return Ti(this.getFields(), t);
|
|
27380
27380
|
}
|
|
27381
27381
|
cleanSerializedValues(t) {
|
|
27382
|
-
return
|
|
27382
|
+
return ys(this.getFields(), t);
|
|
27383
27383
|
}
|
|
27384
27384
|
deserializeValues(t, n) {
|
|
27385
27385
|
return D0(this.getFields(), t, n);
|
|
@@ -27391,22 +27391,22 @@ class or extends Kr {
|
|
|
27391
27391
|
return V0(this.getFields(), t);
|
|
27392
27392
|
}
|
|
27393
27393
|
validateValues(t) {
|
|
27394
|
-
return
|
|
27394
|
+
return Ms(this.getFieldSections(), t);
|
|
27395
27395
|
}
|
|
27396
27396
|
areValuesValid(t) {
|
|
27397
27397
|
return Object.keys(this.validateValues(t)).length === 0;
|
|
27398
27398
|
}
|
|
27399
27399
|
deserializeConditions(t) {
|
|
27400
|
-
return
|
|
27400
|
+
return vs(this.getFields(), t);
|
|
27401
27401
|
}
|
|
27402
27402
|
cleanConditions(t) {
|
|
27403
|
-
return
|
|
27403
|
+
return xs(this.getFields(), t);
|
|
27404
27404
|
}
|
|
27405
27405
|
serializeConditions(t) {
|
|
27406
27406
|
return O0(this.getFields(), t);
|
|
27407
27407
|
}
|
|
27408
27408
|
cleanSerializedConditions(t) {
|
|
27409
|
-
return
|
|
27409
|
+
return gs(this.getFields(), t);
|
|
27410
27410
|
}
|
|
27411
27411
|
changedFieldValues(t, n) {
|
|
27412
27412
|
return F0(this.getFields(), t, n);
|
|
@@ -27415,13 +27415,13 @@ class or extends Kr {
|
|
|
27415
27415
|
return P0(this.getFields(), t, n);
|
|
27416
27416
|
}
|
|
27417
27417
|
areValuesEqual(t, n) {
|
|
27418
|
-
return
|
|
27418
|
+
return ms(this.getFields(), t, n);
|
|
27419
27419
|
}
|
|
27420
27420
|
areValuesBlank(t) {
|
|
27421
27421
|
return B0(this.getFields(), t);
|
|
27422
27422
|
}
|
|
27423
27423
|
blankValues() {
|
|
27424
|
-
return
|
|
27424
|
+
return Cs(this.getFields());
|
|
27425
27425
|
}
|
|
27426
27426
|
extractFilesAndPromisesFromFieldValues(t) {
|
|
27427
27427
|
return R0(this.getFields(), t);
|
|
@@ -27430,12 +27430,12 @@ class or extends Kr {
|
|
|
27430
27430
|
return M0(this.getFields(), t, n);
|
|
27431
27431
|
}
|
|
27432
27432
|
}
|
|
27433
|
-
const
|
|
27433
|
+
const Vs = L((r) => {
|
|
27434
27434
|
const { sourceFieldSection: e, targetFieldSection: t } = r, n = se(() => e.getConditions(t.identifier), [e, t.identifier]), i = b(() => {
|
|
27435
27435
|
e.removeConditional(t.identifier);
|
|
27436
27436
|
}, [e, t.identifier]), a = b(
|
|
27437
27437
|
(s) => {
|
|
27438
|
-
e.addCondition(t.identifier,
|
|
27438
|
+
e.addCondition(t.identifier, As(s));
|
|
27439
27439
|
},
|
|
27440
27440
|
[e, t.identifier]
|
|
27441
27441
|
), o = b(
|
|
@@ -27444,11 +27444,11 @@ const Ms = L((r) => {
|
|
|
27444
27444
|
},
|
|
27445
27445
|
[e, t.identifier]
|
|
27446
27446
|
);
|
|
27447
|
-
return /* @__PURE__ */ _(
|
|
27447
|
+
return /* @__PURE__ */ _(ht, { className: "flex flex-col gap-2", size: "sm", children: [
|
|
27448
27448
|
/* @__PURE__ */ _(ue, { className: "flex justify-between gap-2", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
27449
27449
|
/* @__PURE__ */ _(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
|
|
27450
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27451
|
-
e.label ??
|
|
27450
|
+
/* @__PURE__ */ p(N, { icon: io }),
|
|
27451
|
+
e.label ?? ts
|
|
27452
27452
|
] }),
|
|
27453
27453
|
/* @__PURE__ */ p(ne, { type: "button", onClick: i, variant: "ghost", children: /* @__PURE__ */ p(N, { icon: Lt }) })
|
|
27454
27454
|
] }),
|
|
@@ -27456,12 +27456,12 @@ const Ms = L((r) => {
|
|
|
27456
27456
|
n.map((s) => s.render({
|
|
27457
27457
|
onRemove: o
|
|
27458
27458
|
})),
|
|
27459
|
-
/* @__PURE__ */ p(Vi, { fields: e.fields, onSelectField: a, align: "start", children: /* @__PURE__ */ p(ne, { type: "button", size: "sm", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(N, { icon:
|
|
27459
|
+
/* @__PURE__ */ p(Vi, { fields: e.fields, onSelectField: a, align: "start", children: /* @__PURE__ */ p(ne, { type: "button", size: "sm", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(N, { icon: dt }) }) })
|
|
27460
27460
|
] })
|
|
27461
27461
|
] });
|
|
27462
27462
|
});
|
|
27463
|
-
|
|
27464
|
-
const
|
|
27463
|
+
Vs.displayName = "FieldSectionConditionalItem";
|
|
27464
|
+
const Fs = L((r) => {
|
|
27465
27465
|
const { fieldSection: e } = r, { fieldSchema: t } = ce(gt), n = se(() => t.fieldSections.filter((l) => e.identifier in l.conditions), [t.fieldSections, e.identifier]), i = b(
|
|
27466
27466
|
(l) => {
|
|
27467
27467
|
l.addConditional(e.identifier);
|
|
@@ -27480,7 +27480,7 @@ const Vs = L((r) => {
|
|
|
27480
27480
|
), s = se(() => {
|
|
27481
27481
|
const l = t.getSectionDependencyGraph();
|
|
27482
27482
|
return t.fieldSections.filter(
|
|
27483
|
-
(c) => !
|
|
27483
|
+
(c) => !Ha(l, c.identifier, e.identifier)
|
|
27484
27484
|
);
|
|
27485
27485
|
}, [e.identifier, t]);
|
|
27486
27486
|
return /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
@@ -27512,19 +27512,19 @@ const Vs = L((r) => {
|
|
|
27512
27512
|
/* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
|
|
27513
27513
|
/* @__PURE__ */ p(pe, { accentColor: "base", children: "Conditions" }),
|
|
27514
27514
|
/* @__PURE__ */ p(
|
|
27515
|
-
|
|
27515
|
+
Os,
|
|
27516
27516
|
{
|
|
27517
27517
|
fieldSections: s,
|
|
27518
27518
|
onSelectFieldSection: i,
|
|
27519
27519
|
children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", className: "w-max", children: [
|
|
27520
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27520
|
+
/* @__PURE__ */ p(N, { icon: dt }),
|
|
27521
27521
|
"Add condition"
|
|
27522
27522
|
] })
|
|
27523
27523
|
}
|
|
27524
27524
|
)
|
|
27525
27525
|
] }),
|
|
27526
27526
|
n.map((l) => /* @__PURE__ */ p(
|
|
27527
|
-
|
|
27527
|
+
Vs,
|
|
27528
27528
|
{
|
|
27529
27529
|
sourceFieldSection: l,
|
|
27530
27530
|
targetFieldSection: e
|
|
@@ -27535,9 +27535,9 @@ const Vs = L((r) => {
|
|
|
27535
27535
|
/* @__PURE__ */ p(Vt, { size: "full" })
|
|
27536
27536
|
] });
|
|
27537
27537
|
});
|
|
27538
|
-
|
|
27539
|
-
const
|
|
27540
|
-
const { fieldSection: e, sectionIndex: t } = r, { fieldSchema: n } = ce(gt), i =
|
|
27538
|
+
Fs.displayName = "FieldSectionBuilder";
|
|
27539
|
+
const Ps = L((r) => {
|
|
27540
|
+
const { fieldSection: e, sectionIndex: t } = r, { fieldSchema: n } = ce(gt), i = Xs(), a = b(() => {
|
|
27541
27541
|
n.removeFieldSection(e);
|
|
27542
27542
|
}, [n, e]), o = b(
|
|
27543
27543
|
(g) => {
|
|
@@ -27622,14 +27622,14 @@ const Fs = L((r) => {
|
|
|
27622
27622
|
n.addFieldSection(w, t + 1 + S);
|
|
27623
27623
|
}), qe.success({ title: "Section pasted", description: "Serialized JSON imported successfully." });
|
|
27624
27624
|
}, [n, t]);
|
|
27625
|
-
return /* @__PURE__ */ _(
|
|
27625
|
+
return /* @__PURE__ */ _(ht, { variant: "outline", className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
27626
27626
|
/* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
27627
|
-
/* @__PURE__ */ p(
|
|
27627
|
+
/* @__PURE__ */ p(Fs, { fieldSection: e }),
|
|
27628
27628
|
/* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2", children: [
|
|
27629
27629
|
/* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
|
|
27630
27630
|
/* @__PURE__ */ p(pe, { accentColor: "base", size: "md", children: "Fields" }),
|
|
27631
27631
|
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", children: [
|
|
27632
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27632
|
+
/* @__PURE__ */ p(N, { icon: dt }),
|
|
27633
27633
|
" Add field"
|
|
27634
27634
|
] }) })
|
|
27635
27635
|
] }),
|
|
@@ -27646,21 +27646,21 @@ const Fs = L((r) => {
|
|
|
27646
27646
|
] })
|
|
27647
27647
|
] }),
|
|
27648
27648
|
/* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
27649
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(N, { icon:
|
|
27650
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(N, { icon:
|
|
27649
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(N, { icon: oo }) }),
|
|
27650
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(N, { icon: ao }) }),
|
|
27651
27651
|
/* @__PURE__ */ _(D.Root, { align: "end", children: [
|
|
27652
|
-
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon:
|
|
27652
|
+
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon: to }) }) }),
|
|
27653
27653
|
/* @__PURE__ */ _(D.Content, { size: "sm", children: [
|
|
27654
27654
|
/* @__PURE__ */ _(D.Item, { onSelect: s, children: [
|
|
27655
27655
|
/* @__PURE__ */ p(N, { icon: ai }),
|
|
27656
27656
|
"Duplicate section"
|
|
27657
27657
|
] }),
|
|
27658
27658
|
/* @__PURE__ */ _(D.Item, { onSelect: h, children: [
|
|
27659
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27659
|
+
/* @__PURE__ */ p(N, { icon: Qa }),
|
|
27660
27660
|
"Copy JSON"
|
|
27661
27661
|
] }),
|
|
27662
27662
|
/* @__PURE__ */ _(D.Item, { onSelect: v, children: [
|
|
27663
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27663
|
+
/* @__PURE__ */ p(N, { icon: Ja }),
|
|
27664
27664
|
"Paste JSON"
|
|
27665
27665
|
] }),
|
|
27666
27666
|
/* @__PURE__ */ _(D.Item, { onSelect: a, children: [
|
|
@@ -27672,10 +27672,10 @@ const Fs = L((r) => {
|
|
|
27672
27672
|
] })
|
|
27673
27673
|
] });
|
|
27674
27674
|
});
|
|
27675
|
-
|
|
27676
|
-
const
|
|
27675
|
+
Ps.displayName = "FieldSectionWithActions";
|
|
27676
|
+
const Bs = L(() => {
|
|
27677
27677
|
var l;
|
|
27678
|
-
const { handleSubmit: r } =
|
|
27678
|
+
const { handleSubmit: r } = Xa(), { errors: e } = qa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = b(() => {
|
|
27679
27679
|
i.addFieldSection(new ot({ identifier: G(), fields: [] }));
|
|
27680
27680
|
}, [i]), o = b(async () => {
|
|
27681
27681
|
try {
|
|
@@ -27735,16 +27735,16 @@ const Ps = L(() => {
|
|
|
27735
27735
|
/* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
|
|
27736
27736
|
/* @__PURE__ */ _("div", { className: "flex items-center justify-end gap-2", children: [
|
|
27737
27737
|
/* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: o, children: [
|
|
27738
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27738
|
+
/* @__PURE__ */ p(N, { icon: Qa }),
|
|
27739
27739
|
" Copy JSON"
|
|
27740
27740
|
] }),
|
|
27741
27741
|
/* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: s, children: [
|
|
27742
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27742
|
+
/* @__PURE__ */ p(N, { icon: Ja }),
|
|
27743
27743
|
" Paste JSON"
|
|
27744
27744
|
] })
|
|
27745
27745
|
] }),
|
|
27746
27746
|
i.fieldSections.map((c, u) => /* @__PURE__ */ p(
|
|
27747
|
-
|
|
27747
|
+
Ps,
|
|
27748
27748
|
{
|
|
27749
27749
|
fieldSection: c,
|
|
27750
27750
|
sectionIndex: u
|
|
@@ -27761,7 +27761,7 @@ const Ps = L(() => {
|
|
|
27761
27761
|
size: "sm",
|
|
27762
27762
|
onClick: a,
|
|
27763
27763
|
children: [
|
|
27764
|
-
/* @__PURE__ */ p(N, { icon:
|
|
27764
|
+
/* @__PURE__ */ p(N, { icon: dt }),
|
|
27765
27765
|
" Add section"
|
|
27766
27766
|
]
|
|
27767
27767
|
}
|
|
@@ -27774,8 +27774,8 @@ const Ps = L(() => {
|
|
|
27774
27774
|
] })
|
|
27775
27775
|
] });
|
|
27776
27776
|
});
|
|
27777
|
-
|
|
27778
|
-
function
|
|
27777
|
+
Bs.displayName = "FormBuilderListBuilder";
|
|
27778
|
+
function ks(r) {
|
|
27779
27779
|
const e = (t) => {
|
|
27780
27780
|
const n = {};
|
|
27781
27781
|
for (const [i, a] of Object.entries(t))
|
|
@@ -27809,13 +27809,13 @@ const X0 = L(
|
|
|
27809
27809
|
o == null || o(F);
|
|
27810
27810
|
},
|
|
27811
27811
|
[o]
|
|
27812
|
-
), C =
|
|
27812
|
+
), C = Wa({
|
|
27813
27813
|
values: y,
|
|
27814
27814
|
mode: "onBlur",
|
|
27815
27815
|
criteriaMode: "all",
|
|
27816
27816
|
disabled: t,
|
|
27817
27817
|
resolver: (F) => {
|
|
27818
|
-
const z = n.validateValues(F), U =
|
|
27818
|
+
const z = n.validateValues(F), U = ks(z);
|
|
27819
27819
|
return Object.keys(z).length > 0 ? {
|
|
27820
27820
|
values: {},
|
|
27821
27821
|
errors: U
|
|
@@ -27830,7 +27830,7 @@ const X0 = L(
|
|
|
27830
27830
|
},
|
|
27831
27831
|
[a]
|
|
27832
27832
|
);
|
|
27833
|
-
|
|
27833
|
+
pt(() => {
|
|
27834
27834
|
const { unsubscribe: F } = C.watch((z, { type: U }) => {
|
|
27835
27835
|
U === "change" && A(z);
|
|
27836
27836
|
});
|
|
@@ -27845,7 +27845,7 @@ const X0 = L(
|
|
|
27845
27845
|
}),
|
|
27846
27846
|
[n, g]
|
|
27847
27847
|
), O = !d && !!u, T = !l;
|
|
27848
|
-
return /* @__PURE__ */ p(
|
|
27848
|
+
return /* @__PURE__ */ p($a, { ...C, children: /* @__PURE__ */ p(Ce, { value: S, children: /* @__PURE__ */ _(
|
|
27849
27849
|
"form",
|
|
27850
27850
|
{
|
|
27851
27851
|
ref: e,
|
|
@@ -27886,12 +27886,12 @@ const X0 = L(
|
|
|
27886
27886
|
}
|
|
27887
27887
|
) }) });
|
|
27888
27888
|
})
|
|
27889
|
-
),
|
|
27889
|
+
), Ls = L(() => {
|
|
27890
27890
|
const { fieldSchema: r } = ce(gt);
|
|
27891
27891
|
return /* @__PURE__ */ p(X0, { fieldSchema: r, disabled: !1 });
|
|
27892
27892
|
});
|
|
27893
|
-
|
|
27894
|
-
const
|
|
27893
|
+
Ls.displayName = "FormBuilderPreview";
|
|
27894
|
+
const zs = L((r) => {
|
|
27895
27895
|
const { children: e, initialFields: t, onSave: n, onCancel: i, disableRequiredFields: a = !1 } = r, o = b((v) => {
|
|
27896
27896
|
var A;
|
|
27897
27897
|
const g = {};
|
|
@@ -27899,15 +27899,15 @@ const Ls = L((r) => {
|
|
|
27899
27899
|
const y = [];
|
|
27900
27900
|
for (const [w, S] of v.fields.entries())
|
|
27901
27901
|
for (const [O, T] of S.fields.entries()) {
|
|
27902
|
-
const F = ((A =
|
|
27902
|
+
const F = ((A = Es(T.type, `fields.${w}.fields.${O}`)) == null ? void 0 : A.map(
|
|
27903
27903
|
({ field: z }) => z
|
|
27904
27904
|
)) ?? [];
|
|
27905
27905
|
y.push(...F);
|
|
27906
27906
|
}
|
|
27907
27907
|
const m = {};
|
|
27908
27908
|
for (const w of y)
|
|
27909
|
-
m[w.identifier] =
|
|
27910
|
-
const C =
|
|
27909
|
+
m[w.identifier] = Ya(v, w.identifier);
|
|
27910
|
+
const C = Ms(y, m);
|
|
27911
27911
|
return Object.keys(C).length > 0 && (g.fields = C.fields), Object.keys(g).length > 0 && qe.error({
|
|
27912
27912
|
title: "Some form settings are invalid",
|
|
27913
27913
|
description: "Please check settings highlighted in red."
|
|
@@ -27917,13 +27917,13 @@ const Ls = L((r) => {
|
|
|
27917
27917
|
fields: t ?? []
|
|
27918
27918
|
}),
|
|
27919
27919
|
[t]
|
|
27920
|
-
), l =
|
|
27920
|
+
), l = Wa({
|
|
27921
27921
|
values: s,
|
|
27922
27922
|
mode: "onSubmit",
|
|
27923
27923
|
criteriaMode: "all",
|
|
27924
27924
|
reValidateMode: "onSubmit",
|
|
27925
27925
|
resolver: (v) => {
|
|
27926
|
-
const g = o(v), y =
|
|
27926
|
+
const g = o(v), y = ks(g);
|
|
27927
27927
|
return Object.keys(g).length > 0 ? {
|
|
27928
27928
|
values: {},
|
|
27929
27929
|
errors: y
|
|
@@ -27937,7 +27937,7 @@ const Ls = L((r) => {
|
|
|
27937
27937
|
l.setValue("fields", v.serialize());
|
|
27938
27938
|
},
|
|
27939
27939
|
[l]
|
|
27940
|
-
), u =
|
|
27940
|
+
), u = Ga({
|
|
27941
27941
|
control: l.control,
|
|
27942
27942
|
compute: (v) => v.fields
|
|
27943
27943
|
}), d = se(() => {
|
|
@@ -27955,31 +27955,31 @@ const Ls = L((r) => {
|
|
|
27955
27955
|
}),
|
|
27956
27956
|
[d]
|
|
27957
27957
|
);
|
|
27958
|
-
return /* @__PURE__ */ p(gt, { value: f, children: /* @__PURE__ */ p(Ce, { value: h, children: /* @__PURE__ */ p(
|
|
27958
|
+
return /* @__PURE__ */ p(gt, { value: f, children: /* @__PURE__ */ p(Ce, { value: h, children: /* @__PURE__ */ p($a, { ...l, children: e }) }) });
|
|
27959
27959
|
});
|
|
27960
|
-
|
|
27960
|
+
zs.displayName = "FormBuilderRoot";
|
|
27961
27961
|
const yh = {
|
|
27962
|
-
Root:
|
|
27963
|
-
FlowBuilder:
|
|
27964
|
-
ListBuilder:
|
|
27965
|
-
Preview:
|
|
27962
|
+
Root: zs,
|
|
27963
|
+
FlowBuilder: Rs,
|
|
27964
|
+
ListBuilder: Bs,
|
|
27965
|
+
Preview: Ls
|
|
27966
27966
|
};
|
|
27967
27967
|
export {
|
|
27968
27968
|
Ue as BaseCondition,
|
|
27969
27969
|
tt as BaseField,
|
|
27970
|
-
|
|
27970
|
+
co as BaseFormElement,
|
|
27971
27971
|
Qr as BaseOptionsField,
|
|
27972
|
-
|
|
27972
|
+
xo as BaseStringField,
|
|
27973
27973
|
G1 as BooleanEqualsConditionModifier,
|
|
27974
27974
|
Yt as BooleanField,
|
|
27975
27975
|
nn as BooleanFieldCondition,
|
|
27976
27976
|
c0 as BooleanFieldConditionCell,
|
|
27977
|
-
|
|
27977
|
+
vo as BooleanFieldInput,
|
|
27978
27978
|
q1 as BooleanNotEqualsConditionModifier,
|
|
27979
27979
|
Zt as CheckboxListField,
|
|
27980
27980
|
an as CheckboxListFieldCondition,
|
|
27981
27981
|
u0 as CheckboxListFieldConditionCell,
|
|
27982
|
-
|
|
27982
|
+
yo as CheckboxListFieldInput,
|
|
27983
27983
|
Oi as ConditionManager,
|
|
27984
27984
|
j1 as DateAfterConditionModifier,
|
|
27985
27985
|
$1 as DateBeforeConditionModifier,
|
|
@@ -27987,7 +27987,7 @@ export {
|
|
|
27987
27987
|
wr as DateField,
|
|
27988
27988
|
on as DateFieldCondition,
|
|
27989
27989
|
d0 as DateFieldConditionCell,
|
|
27990
|
-
|
|
27990
|
+
mo as DateFieldInput,
|
|
27991
27991
|
W1 as DateNotEqualsConditionModifier,
|
|
27992
27992
|
Y1 as DateRangeInConditionModifier,
|
|
27993
27993
|
Z1 as DateRangeNotInConditionModifier,
|
|
@@ -27995,43 +27995,43 @@ export {
|
|
|
27995
27995
|
L1 as FIELD_TYPES,
|
|
27996
27996
|
or as FieldSchema,
|
|
27997
27997
|
ot as FieldSection,
|
|
27998
|
-
|
|
27998
|
+
ws as FieldSectionLayout,
|
|
27999
27999
|
J as FieldTypeGroup,
|
|
28000
|
-
|
|
28000
|
+
es as FieldTypeToClsMapping,
|
|
28001
28001
|
X0 as FieldsRenderer,
|
|
28002
|
-
|
|
28002
|
+
lo as FileCard,
|
|
28003
28003
|
yh as FormBuilder,
|
|
28004
28004
|
K1 as HasFilesConditionModifier,
|
|
28005
|
-
|
|
28005
|
+
Ao as ImageCard,
|
|
28006
28006
|
br as ImageFile,
|
|
28007
|
-
|
|
28007
|
+
ho as ImageViewer,
|
|
28008
28008
|
Pc as ImageViewerProvider,
|
|
28009
28009
|
Me as InputWithLabel,
|
|
28010
28010
|
Xr as LONG_TEXT_FIELD_MAX_LENGTH,
|
|
28011
28011
|
St as MultiSelectField,
|
|
28012
28012
|
sn as MultiSelectFieldCondition,
|
|
28013
28013
|
f0 as MultiSelectFieldConditionCell,
|
|
28014
|
-
|
|
28014
|
+
Co as MultiSelectFieldInput,
|
|
28015
28015
|
jt as MultiStringField,
|
|
28016
28016
|
ln as MultiStringFieldCondition,
|
|
28017
28017
|
h0 as MultiStringFieldConditionCell,
|
|
28018
|
-
|
|
28019
|
-
|
|
28018
|
+
po as MultiStringFieldInput,
|
|
28019
|
+
rs as NumberEqualsConditionModifier,
|
|
28020
28020
|
Je as NumberField,
|
|
28021
28021
|
cn as NumberFieldCondition,
|
|
28022
28022
|
p0 as NumberFieldConditionCell,
|
|
28023
|
-
|
|
28024
|
-
|
|
28025
|
-
|
|
28026
|
-
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
|
|
28030
|
-
|
|
28023
|
+
go as NumberFieldInput,
|
|
28024
|
+
os as NumberGreaterThanConditionModifier,
|
|
28025
|
+
ss as NumberGreaterThanOrEqualsConditionModifier,
|
|
28026
|
+
is as NumberLessThanConditionModifier,
|
|
28027
|
+
as as NumberLessThanOrEqualsConditionModifier,
|
|
28028
|
+
ns as NumberNotEqualsConditionModifier,
|
|
28029
|
+
ls as NumberRangeInConditionModifier,
|
|
28030
|
+
cs as NumberRangeNotInConditionModifier,
|
|
28031
28031
|
Kt as OTPField,
|
|
28032
28032
|
un as OTPFieldCondition,
|
|
28033
28033
|
v0 as OTPFieldConditionCell,
|
|
28034
|
-
|
|
28034
|
+
_o as OTPFieldInput,
|
|
28035
28035
|
Kr as Observable,
|
|
28036
28036
|
r0 as PassFailArrayExcludesConditionModifier,
|
|
28037
28037
|
t0 as PassFailArrayIncludesConditionModifier,
|
|
@@ -28039,31 +28039,31 @@ export {
|
|
|
28039
28039
|
Jt as PassFailField,
|
|
28040
28040
|
dn as PassFailFieldCondition,
|
|
28041
28041
|
g0 as PassFailFieldConditionCell,
|
|
28042
|
-
|
|
28042
|
+
bo as PassFailFieldInput,
|
|
28043
28043
|
e0 as PassFailNotEqualsConditionModifier,
|
|
28044
28044
|
er as RadioField,
|
|
28045
28045
|
fn as RadioFieldCondition,
|
|
28046
28046
|
x0 as RadioFieldConditionCell,
|
|
28047
|
-
|
|
28047
|
+
Oo as RadioFieldInput,
|
|
28048
28048
|
tr as RatingField,
|
|
28049
28049
|
hn as RatingFieldCondition,
|
|
28050
28050
|
y0 as RatingFieldConditionCell,
|
|
28051
|
-
|
|
28051
|
+
No as RatingFieldInput,
|
|
28052
28052
|
Ca as SHORT_TEXT_FIELD_MAX_LENGTH,
|
|
28053
28053
|
Ar as ScanField,
|
|
28054
28054
|
pn as ScanFieldCondition,
|
|
28055
28055
|
m0 as ScanFieldConditionCell,
|
|
28056
|
-
|
|
28056
|
+
Wo as ScanFieldInput,
|
|
28057
28057
|
yi as Scanner,
|
|
28058
28058
|
R1 as ScannerProvider,
|
|
28059
28059
|
Ft as SelectField,
|
|
28060
28060
|
vn as SelectFieldCondition,
|
|
28061
28061
|
C0 as SelectFieldConditionCell,
|
|
28062
|
-
|
|
28062
|
+
wo as SelectFieldInput,
|
|
28063
28063
|
Ei as StringArrayEqualsConditionModifier,
|
|
28064
28064
|
wi as StringArrayEveryConditionModifier,
|
|
28065
|
-
|
|
28066
|
-
|
|
28065
|
+
ds as StringArrayExcludesConditionModifier,
|
|
28066
|
+
us as StringArrayIncludesConditionModifier,
|
|
28067
28067
|
Ai as StringArrayNoneConditionModifier,
|
|
28068
28068
|
Si as StringArrayNotEqualsConditionModifier,
|
|
28069
28069
|
_i as StringArraySomeConditionModifier,
|
|
@@ -28072,13 +28072,13 @@ export {
|
|
|
28072
28072
|
nr as StringField,
|
|
28073
28073
|
gn as StringFieldCondition,
|
|
28074
28074
|
w0 as StringFieldConditionCell,
|
|
28075
|
-
|
|
28075
|
+
$o as StringFieldInput,
|
|
28076
28076
|
Or as StringIncludesConditionModifier,
|
|
28077
28077
|
Ut as StringNotEqualsConditionModifier,
|
|
28078
28078
|
ir as TextField,
|
|
28079
28079
|
xn as TextFieldCondition,
|
|
28080
28080
|
_0 as TextFieldConditionCell,
|
|
28081
|
-
|
|
28081
|
+
jo as TextFieldInput,
|
|
28082
28082
|
o0 as TimeAfterConditionModifier,
|
|
28083
28083
|
a0 as TimeBeforeConditionModifier,
|
|
28084
28084
|
n0 as TimeEqualsConditionModifier,
|
|
@@ -28086,45 +28086,45 @@ export {
|
|
|
28086
28086
|
yn as TimeFieldCondition,
|
|
28087
28087
|
A0 as TimeFieldConditionCell,
|
|
28088
28088
|
Ci as TimeFieldControl,
|
|
28089
|
-
|
|
28089
|
+
Ko as TimeFieldInput,
|
|
28090
28090
|
i0 as TimeNotEqualsConditionModifier,
|
|
28091
28091
|
s0 as TimeRangeInConditionModifier,
|
|
28092
28092
|
l0 as TimeRangeNotInConditionModifier,
|
|
28093
28093
|
Ve as UNLABELLED_FIELD_LABEL,
|
|
28094
|
-
|
|
28094
|
+
ts as UNLABELLED_SECTION_LABEL,
|
|
28095
28095
|
Sr as URLField,
|
|
28096
28096
|
Cn as URLFieldCondition,
|
|
28097
28097
|
S0 as URLFieldConditionCell,
|
|
28098
|
-
|
|
28099
|
-
|
|
28098
|
+
Jo as URLFieldInput,
|
|
28099
|
+
Yo as UTC_OFFSETS,
|
|
28100
28100
|
M1 as UTC_OFFSETS_SET,
|
|
28101
28101
|
Pt as UUIDFile,
|
|
28102
28102
|
Qt as UUIDPromise,
|
|
28103
28103
|
ar as UploadField,
|
|
28104
28104
|
mn as UploadFieldCondition,
|
|
28105
28105
|
E0 as UploadFieldConditionCell,
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28106
|
+
Qo as UploadFieldInput,
|
|
28107
|
+
So as VideoCard,
|
|
28108
|
+
Eo as VideoFile,
|
|
28109
28109
|
B0 as areFieldValuesBlank,
|
|
28110
|
-
|
|
28110
|
+
ms as areFieldValuesEqual,
|
|
28111
28111
|
li as areFileAndPromiseArraysEqual,
|
|
28112
28112
|
Gc as arePassFieldValuesEqual,
|
|
28113
28113
|
qc as areSerializedPassFailFieldValuesEqual,
|
|
28114
28114
|
xh as awaitFilesAndPromises,
|
|
28115
|
-
|
|
28115
|
+
Cs as blankFieldValues,
|
|
28116
28116
|
F0 as changedFieldValues,
|
|
28117
|
-
|
|
28117
|
+
xs as cleanConditions,
|
|
28118
28118
|
Ti as cleanFieldValues,
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28119
|
+
gs as cleanSerializedConditions,
|
|
28120
|
+
ys as cleanSerializedFieldValues,
|
|
28121
|
+
As as createCondition,
|
|
28122
28122
|
V as createConditionModifierConfig,
|
|
28123
28123
|
Ri as createField,
|
|
28124
28124
|
_a as createTime,
|
|
28125
28125
|
N0 as deserialize,
|
|
28126
28126
|
I0 as deserializeCondition,
|
|
28127
|
-
|
|
28127
|
+
vs as deserializeConditions,
|
|
28128
28128
|
Ni as deserializeField,
|
|
28129
28129
|
D0 as deserializeFieldValues,
|
|
28130
28130
|
fh as deserializeFields,
|
|
@@ -28144,12 +28144,12 @@ export {
|
|
|
28144
28144
|
V0 as initializeFieldValues,
|
|
28145
28145
|
M0 as insertFilesAndPromisesToFieldValues,
|
|
28146
28146
|
kc as isFileAndPromiseArray,
|
|
28147
|
-
|
|
28147
|
+
Io as isPassFailFieldStatus,
|
|
28148
28148
|
zc as isPassFailFieldValue,
|
|
28149
28149
|
Lc as isSerializedPassFailFieldValue,
|
|
28150
28150
|
qr as isStringArray,
|
|
28151
28151
|
Te as isTime,
|
|
28152
|
-
|
|
28152
|
+
Zo as isTimeInRange,
|
|
28153
28153
|
Pr as isTimeRange,
|
|
28154
28154
|
mi as isUTCOffset,
|
|
28155
28155
|
H1 as maxFileSizeB,
|
|
@@ -28168,7 +28168,7 @@ export {
|
|
|
28168
28168
|
Ln as useFieldInputs,
|
|
28169
28169
|
Bc as useFieldSectionInputs,
|
|
28170
28170
|
si as useImageViewer,
|
|
28171
|
-
|
|
28171
|
+
uo as useObjectUrl,
|
|
28172
28172
|
uh as useScanner,
|
|
28173
|
-
|
|
28173
|
+
Ms as validateFieldValues
|
|
28174
28174
|
};
|