@overmap-ai/forms 1.0.36-add-utils.0 → 1.0.36-add-utils.2
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
CHANGED
|
@@ -2,12 +2,12 @@ var Es = Object.defineProperty;
|
|
|
2
2
|
var Ss = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var b = (r, e, t) => Ss(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { jsxs as _, jsx as p, Fragment as ft } from "react/jsx-runtime";
|
|
5
|
-
import { Card as at, LuIcon as D, Text as Pe, Spinner as Ga, Overlay as yt, ButtonGroup as he, Tooltip as xt, IconButton as ne, Separator as
|
|
6
|
-
import { cx as
|
|
7
|
-
import { forwardRef as
|
|
5
|
+
import { Card as at, LuIcon as D, Text as Pe, Spinner as Ga, Overlay as yt, ButtonGroup as he, Tooltip as xt, IconButton as ne, Separator as Cr, Input as xe, Badge as Ie, Checkbox as Jr, CheckboxGroup as Vn, Popover as De, Button as z, DayPicker as Xa, Menu as M, OneTimePasswordField as Pn, RadioGroup as ir, TextArea as It, Rating as Gi, stopPropagation as ui, Heading as Wa, toast as Le, ToggleGroup as Fn, useAlertDialog as Is } from "@overmap-ai/blocks";
|
|
6
|
+
import { cx as Ar } from "class-variance-authority";
|
|
7
|
+
import { forwardRef as Pr, createElement as jn, memo as G, createContext as Fr, useContext as bs, useRef as Br, useCallback as T, useState as ye, useEffect as ke, useMemo as ie, Fragment as qa, use as dt, useLayoutEffect as $a, useId as Os } from "react";
|
|
8
8
|
import "@xyflow/react/dist/style.css";
|
|
9
9
|
import { getBezierPath as Ns, Position as mt, BaseEdge as Ts, EdgeLabelRenderer as Ds, NodeToolbar as Rs, Handle as Xi, MarkerType as Ms, useNodesState as Vs, useEdgesState as Ps, ReactFlow as Fs, Panel as Bn } from "@xyflow/react";
|
|
10
|
-
import { useField as
|
|
10
|
+
import { useField as _r, useFormikContext as Lr, useFormik as ja, FormikProvider as Ya } from "formik";
|
|
11
11
|
import { willCreateCycle as Za } from "graphology-dag";
|
|
12
12
|
import { v4 as W } from "uuid";
|
|
13
13
|
import { DragDropContext as Bs, Droppable as Ls, Draggable as ks } from "@hello-pangea/dnd";
|
|
@@ -58,7 +58,7 @@ var js = {
|
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
60
|
*/
|
|
61
|
-
const Ys =
|
|
61
|
+
const Ys = Pr(
|
|
62
62
|
({
|
|
63
63
|
color: r = "currentColor",
|
|
64
64
|
size: e = 24,
|
|
@@ -94,7 +94,7 @@ const Ys = Fr(
|
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
95
|
*/
|
|
96
96
|
const q = (r, e) => {
|
|
97
|
-
const t =
|
|
97
|
+
const t = Pr(
|
|
98
98
|
({ className: n, ...i }, a) => jn(Ys, {
|
|
99
99
|
ref: a,
|
|
100
100
|
iconNode: e,
|
|
@@ -443,7 +443,7 @@ const Xl = [
|
|
|
443
443
|
* This source code is licensed under the ISC license.
|
|
444
444
|
* See the LICENSE file in the root directory of this source tree.
|
|
445
445
|
*/
|
|
446
|
-
const ql = [["path", { d: "M5 12h14", key: "1ays0h" }]],
|
|
446
|
+
const ql = [["path", { d: "M5 12h14", key: "1ays0h" }]], en = q("minus", ql);
|
|
447
447
|
/**
|
|
448
448
|
* @license lucide-react v0.542.0 - ISC
|
|
449
449
|
*
|
|
@@ -604,9 +604,9 @@ const fc = [
|
|
|
604
604
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
605
605
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
606
606
|
], bt = q("x", fc), so = G(
|
|
607
|
-
|
|
607
|
+
Pr((r, e) => {
|
|
608
608
|
const { file: t, className: n, error: i, rightSlot: a, ...o } = r;
|
|
609
|
-
return /* @__PURE__ */ _(at, { className:
|
|
609
|
+
return /* @__PURE__ */ _(at, { className: Ar(n, "flex w-full items-center gap-2 text-sm"), ref: e, ...o, children: [
|
|
610
610
|
i ? /* @__PURE__ */ p(D, { icon: Il }) : /* @__PURE__ */ p(D, { icon: no, color: "var(--base-a11)" }),
|
|
611
611
|
i ? /* @__PURE__ */ p(Pe, { accentColor: "danger", className: "truncate", children: i }) : t ? /* @__PURE__ */ p(Pe, { className: "truncate", children: t.name }) : /* @__PURE__ */ p("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ p(Ga, {}) }),
|
|
612
612
|
a
|
|
@@ -614,13 +614,13 @@ const fc = [
|
|
|
614
614
|
})
|
|
615
615
|
);
|
|
616
616
|
so.displayName = "FileCard";
|
|
617
|
-
const
|
|
617
|
+
const kr = {
|
|
618
618
|
danger: "danger",
|
|
619
619
|
warning: "warning",
|
|
620
620
|
info: "base",
|
|
621
621
|
success: "success"
|
|
622
622
|
};
|
|
623
|
-
function
|
|
623
|
+
function tn(r) {
|
|
624
624
|
return Array.isArray(r) ? r.every((e) => typeof e == "string") : !1;
|
|
625
625
|
}
|
|
626
626
|
class un {
|
|
@@ -709,6 +709,18 @@ class Je extends lo {
|
|
|
709
709
|
isValueBlank(t) {
|
|
710
710
|
return this.areValuesEqual(t, this.blankValue());
|
|
711
711
|
}
|
|
712
|
+
cleanValue(t) {
|
|
713
|
+
return t;
|
|
714
|
+
}
|
|
715
|
+
isValueClean(t) {
|
|
716
|
+
return this.areValuesEqual(t, this.cleanValue(t));
|
|
717
|
+
}
|
|
718
|
+
cleanSerializedValue(t) {
|
|
719
|
+
return t;
|
|
720
|
+
}
|
|
721
|
+
isSerializedValueClean(t) {
|
|
722
|
+
return this.areSerializedValuesEqual(t, this.cleanSerializedValue(t));
|
|
723
|
+
}
|
|
712
724
|
isSerializedValueBlank(t) {
|
|
713
725
|
return this.areSerializedValuesEqual(t, this.blankSerializedValue());
|
|
714
726
|
}
|
|
@@ -718,15 +730,15 @@ class Je extends lo {
|
|
|
718
730
|
}
|
|
719
731
|
b(Je, "fieldTypeName"), b(Je, "fieldTypeDescription");
|
|
720
732
|
const pi = (r) => {
|
|
721
|
-
const { helpText: e, children: t, severity: n } = r, i = n ?
|
|
733
|
+
const { helpText: e, children: t, severity: n } = r, i = n ? kr[n] : "base";
|
|
722
734
|
return /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
|
|
723
735
|
t,
|
|
724
736
|
!!e && /* @__PURE__ */ p(Pe, { accentColor: i, size: "xs", children: e })
|
|
725
737
|
] });
|
|
726
|
-
}, co =
|
|
738
|
+
}, co = Fr(() => {
|
|
727
739
|
throw new Error("No ImageViewerProvider found");
|
|
728
740
|
}), vi = () => bs(co), uo = G((r) => {
|
|
729
|
-
const { file: e, onClose: t } = r, n =
|
|
741
|
+
const { file: e, onClose: t } = r, n = Br(null), i = T(() => {
|
|
730
742
|
var s;
|
|
731
743
|
if (!n.current) return;
|
|
732
744
|
const o = document.createElement("canvas");
|
|
@@ -752,7 +764,7 @@ const pi = (r) => {
|
|
|
752
764
|
/* @__PURE__ */ p(xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: a, "aria-label": "download", children: /* @__PURE__ */ p(D, { icon: ro }) }) }),
|
|
753
765
|
/* @__PURE__ */ p(xt.Content, { size: "sm", children: "Download" })
|
|
754
766
|
] }),
|
|
755
|
-
/* @__PURE__ */ p(
|
|
767
|
+
/* @__PURE__ */ p(Cr, { orientation: "vertical", size: "sm" }),
|
|
756
768
|
/* @__PURE__ */ p(yt.Close, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: t, "aria-label": "close", children: /* @__PURE__ */ p(D, { icon: bt }) }) })
|
|
757
769
|
]
|
|
758
770
|
}
|
|
@@ -787,7 +799,7 @@ const dc = G((r) => {
|
|
|
787
799
|
});
|
|
788
800
|
dc.displayName = "FileViewerProvider";
|
|
789
801
|
const qe = G((r) => {
|
|
790
|
-
const { className: e, label: t, children: n, severity: i, inputId: a, labelId: o, image: s } = r, [l, c] = ye(void 0), u = vi(), f = i ?
|
|
802
|
+
const { className: e, label: t, children: n, severity: i, inputId: a, labelId: o, image: s } = r, [l, c] = ye(void 0), u = vi(), f = i ? kr[i] : "base";
|
|
791
803
|
ke(() => {
|
|
792
804
|
s instanceof Promise ? s.then(c).catch(console.error) : c(s);
|
|
793
805
|
}, [s]);
|
|
@@ -806,14 +818,14 @@ const qe = G((r) => {
|
|
|
806
818
|
onClick: d
|
|
807
819
|
}
|
|
808
820
|
),
|
|
809
|
-
!!t && /* @__PURE__ */ p("label", { className:
|
|
821
|
+
!!t && /* @__PURE__ */ p("label", { className: Ar(e, "w-max max-w-full"), htmlFor: a, children: /* @__PURE__ */ p(Pe, { accentColor: f, size: "sm", id: o, className: "text-wrap", children: t }) }),
|
|
810
822
|
n
|
|
811
823
|
] });
|
|
812
824
|
}), $e = (r) => {
|
|
813
825
|
const { children: e, ...t } = r;
|
|
814
826
|
return /* @__PURE__ */ p(pi, { ...t, children: e });
|
|
815
827
|
}, m0 = (r, e) => ie(() => !e || !r ? null : r.render(e), [r, e]), rn = (r, e) => /* @__PURE__ */ p("div", { className: "flex flex-col gap-4", children: r.map((t) => /* @__PURE__ */ p(qa, { children: t.render(e) }, t.identifier)) }), je = (r) => {
|
|
816
|
-
const { field: e, size: t, showInputOnly: n, onValuesChange: i, ...a } = r, [o, s, l] =
|
|
828
|
+
const { field: e, size: t, showInputOnly: n, onValuesChange: i, ...a } = r, [o, s, l] = _r(e.identifier), { touched: c } = s, u = s.error ?? e.description, f = s.error ? "danger" : void 0, h = e.identifier, d = `${h}-label`, v = e.required ? `${e.label} *` : e.label, g = ie(() => ({
|
|
817
829
|
...o,
|
|
818
830
|
// name and value not being overridden
|
|
819
831
|
onChange: (w) => {
|
|
@@ -933,12 +945,12 @@ const qe = G((r) => {
|
|
|
933
945
|
draggableId: `${J}-draggable`,
|
|
934
946
|
index: $,
|
|
935
947
|
isDragDisabled: u,
|
|
936
|
-
children: ({ draggableProps: le, dragHandleProps: Fe, innerRef:
|
|
948
|
+
children: ({ draggableProps: le, dragHandleProps: Fe, innerRef: fr }) => /* @__PURE__ */ _(
|
|
937
949
|
Ie,
|
|
938
950
|
{
|
|
939
951
|
...Fe,
|
|
940
952
|
...le,
|
|
941
|
-
ref:
|
|
953
|
+
ref: fr,
|
|
942
954
|
className: "flex items-center justify-between gap-2",
|
|
943
955
|
accentColor: "base",
|
|
944
956
|
size: "sm",
|
|
@@ -1037,10 +1049,10 @@ const Xt = class Xt extends Je {
|
|
|
1037
1049
|
return new Xt(t);
|
|
1038
1050
|
}
|
|
1039
1051
|
isSerializedValueValid(t) {
|
|
1040
|
-
return
|
|
1052
|
+
return tn(t);
|
|
1041
1053
|
}
|
|
1042
1054
|
isValueValid(t) {
|
|
1043
|
-
return
|
|
1055
|
+
return tn(t);
|
|
1044
1056
|
}
|
|
1045
1057
|
blankValue() {
|
|
1046
1058
|
return [];
|
|
@@ -1058,7 +1070,7 @@ const Xt = class Xt extends Je {
|
|
|
1058
1070
|
}
|
|
1059
1071
|
};
|
|
1060
1072
|
b(Xt, "fieldTypeName", "Multi-string"), b(Xt, "fieldTypeDescription", "Allows the user to provide multiple unique strings.");
|
|
1061
|
-
let
|
|
1073
|
+
let Er = Xt;
|
|
1062
1074
|
class fn extends Je {
|
|
1063
1075
|
constructor(t) {
|
|
1064
1076
|
const { options: n, ...i } = t;
|
|
@@ -1087,7 +1099,7 @@ class fn extends Je {
|
|
|
1087
1099
|
const n = t && `${t}.`;
|
|
1088
1100
|
return [
|
|
1089
1101
|
{
|
|
1090
|
-
field: new
|
|
1102
|
+
field: new Er({
|
|
1091
1103
|
label: "Options",
|
|
1092
1104
|
description: "List possible options for the user to select from.",
|
|
1093
1105
|
required: !0,
|
|
@@ -1119,7 +1131,7 @@ const ho = G((r) => {
|
|
|
1119
1131
|
image: a ? void 0 : o.image,
|
|
1120
1132
|
className: "items-center flex-row-reverse justify-end gap-2",
|
|
1121
1133
|
children: /* @__PURE__ */ p(
|
|
1122
|
-
|
|
1134
|
+
Jr.Root,
|
|
1123
1135
|
{
|
|
1124
1136
|
id: e,
|
|
1125
1137
|
name: f,
|
|
@@ -1130,7 +1142,7 @@ const ho = G((r) => {
|
|
|
1130
1142
|
accentColor: "primary",
|
|
1131
1143
|
variant: "surface",
|
|
1132
1144
|
disabled: u,
|
|
1133
|
-
children: /* @__PURE__ */ p(
|
|
1145
|
+
children: /* @__PURE__ */ p(Jr.Indicator, { children: /* @__PURE__ */ p(D, { icon: tt }) })
|
|
1134
1146
|
}
|
|
1135
1147
|
)
|
|
1136
1148
|
}
|
|
@@ -1190,7 +1202,7 @@ const Wt = class Wt extends Je {
|
|
|
1190
1202
|
}
|
|
1191
1203
|
};
|
|
1192
1204
|
b(Wt, "fieldTypeName", "Checkbox"), b(Wt, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
1193
|
-
let
|
|
1205
|
+
let Sr = Wt;
|
|
1194
1206
|
const po = G((r) => {
|
|
1195
1207
|
const [
|
|
1196
1208
|
{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c, touched: u, helpers: f },
|
|
@@ -1278,7 +1290,7 @@ const _t = class _t extends Je {
|
|
|
1278
1290
|
showDirectly: !1
|
|
1279
1291
|
},
|
|
1280
1292
|
{
|
|
1281
|
-
field: new
|
|
1293
|
+
field: new Sr({
|
|
1282
1294
|
label: "Integers",
|
|
1283
1295
|
description: "Whole numbers only",
|
|
1284
1296
|
required: !1,
|
|
@@ -1362,7 +1374,7 @@ const _t = class _t extends Je {
|
|
|
1362
1374
|
};
|
|
1363
1375
|
b(_t, "fieldTypeName", "Number"), b(_t, "fieldTypeDescription", "Allows specifying a number within a given range.");
|
|
1364
1376
|
let pt = _t;
|
|
1365
|
-
const
|
|
1377
|
+
const mr = 1e4;
|
|
1366
1378
|
class vo extends Je {
|
|
1367
1379
|
constructor(t) {
|
|
1368
1380
|
const { minLength: n, maxLength: i, placeholder: a = "", ...o } = t;
|
|
@@ -1370,7 +1382,7 @@ class vo extends Je {
|
|
|
1370
1382
|
b(this, "minLength");
|
|
1371
1383
|
b(this, "maxLength");
|
|
1372
1384
|
b(this, "placeholder");
|
|
1373
|
-
this.minLength = n ? Math.max(n, 0) : void 0, this.maxLength = i ? Math.max(i, 0) :
|
|
1385
|
+
this.minLength = n ? Math.max(n, 0) : void 0, this.maxLength = i ? Math.max(i, 0) : mr, this.placeholder = a;
|
|
1374
1386
|
}
|
|
1375
1387
|
static getFieldCreationSchema(t = "") {
|
|
1376
1388
|
const n = t && `${t}.`;
|
|
@@ -1394,7 +1406,7 @@ class vo extends Je {
|
|
|
1394
1406
|
required: !1,
|
|
1395
1407
|
identifier: `${n}maximum_length`,
|
|
1396
1408
|
minimum: 1,
|
|
1397
|
-
maximum:
|
|
1409
|
+
maximum: mr,
|
|
1398
1410
|
// TODO: depends on short vs long text
|
|
1399
1411
|
// TODO: default: 500 (see: "Short text fields can hold up to 500 characters on a single line.")
|
|
1400
1412
|
integers: !0
|
|
@@ -1527,10 +1539,12 @@ const qt = class qt extends fn {
|
|
|
1527
1539
|
return /* @__PURE__ */ p(go, { field: this, ...t });
|
|
1528
1540
|
}
|
|
1529
1541
|
isSerializedValueValid(t) {
|
|
1530
|
-
|
|
1542
|
+
if (!tn(t)) return !1;
|
|
1543
|
+
const n = new Set(this.options.map(({ value: i }) => i));
|
|
1544
|
+
return t.every((i) => n.has(i));
|
|
1531
1545
|
}
|
|
1532
1546
|
isValueValid(t) {
|
|
1533
|
-
return
|
|
1547
|
+
return this.isSerializedValueValid(t);
|
|
1534
1548
|
}
|
|
1535
1549
|
blankValue() {
|
|
1536
1550
|
return [];
|
|
@@ -1548,7 +1562,7 @@ const qt = class qt extends fn {
|
|
|
1548
1562
|
}
|
|
1549
1563
|
};
|
|
1550
1564
|
b(qt, "fieldTypeName", "Checkbox list"), b(qt, "fieldTypeDescription", "Allows the user to select a multiple options from a list.");
|
|
1551
|
-
let
|
|
1565
|
+
let Ir = qt;
|
|
1552
1566
|
const xo = G((r) => {
|
|
1553
1567
|
const [{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c }, { disabled: u }] = je(r), { value: f, name: h, onChange: d, onBlur: v } = c, [g, x] = ye(!1), m = a ? null : s, w = a ? "" : l, C = T(
|
|
1554
1568
|
(E) => {
|
|
@@ -1702,7 +1716,7 @@ const yo = G((r) => {
|
|
|
1702
1716
|
) }),
|
|
1703
1717
|
/* @__PURE__ */ p(M.Content, { children: /* @__PURE__ */ p(M.Scroll, { children: /* @__PURE__ */ _(M.MultiSelectGroup, { values: f, onValuesChange: m, children: [
|
|
1704
1718
|
/* @__PURE__ */ _(M.SelectAllItem, { children: [
|
|
1705
|
-
/* @__PURE__ */ p(M.CheckboxItemIndicator, { children: (C) => C ? /* @__PURE__ */ p(D, { icon:
|
|
1719
|
+
/* @__PURE__ */ p(M.CheckboxItemIndicator, { children: (C) => C ? /* @__PURE__ */ p(D, { icon: en }) : /* @__PURE__ */ p(D, { icon: tt }) }),
|
|
1706
1720
|
"Select all"
|
|
1707
1721
|
] }),
|
|
1708
1722
|
o.options.map((C, A) => /* @__PURE__ */ _(
|
|
@@ -1762,10 +1776,12 @@ const jt = class jt extends fn {
|
|
|
1762
1776
|
return /* @__PURE__ */ p(yo, { field: this, ...t });
|
|
1763
1777
|
}
|
|
1764
1778
|
isSerializedValueValid(t) {
|
|
1765
|
-
|
|
1779
|
+
if (!tn(t)) return !1;
|
|
1780
|
+
const n = new Set(this.options.map(({ value: i }) => i));
|
|
1781
|
+
return t.every((i) => n.has(i));
|
|
1766
1782
|
}
|
|
1767
1783
|
isValueValid(t) {
|
|
1768
|
-
return
|
|
1784
|
+
return this.isSerializedValueValid(t);
|
|
1769
1785
|
}
|
|
1770
1786
|
blankValue() {
|
|
1771
1787
|
return [];
|
|
@@ -1867,10 +1883,10 @@ const Yt = class Yt extends fn {
|
|
|
1867
1883
|
return /* @__PURE__ */ p(mo, { field: this, ...t });
|
|
1868
1884
|
}
|
|
1869
1885
|
isSerializedValueValid(t) {
|
|
1870
|
-
return typeof t
|
|
1886
|
+
return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
|
|
1871
1887
|
}
|
|
1872
1888
|
isValueValid(t) {
|
|
1873
|
-
return
|
|
1889
|
+
return this.isSerializedValueValid(t);
|
|
1874
1890
|
}
|
|
1875
1891
|
blankValue() {
|
|
1876
1892
|
return null;
|
|
@@ -1886,7 +1902,7 @@ const Yt = class Yt extends fn {
|
|
|
1886
1902
|
}
|
|
1887
1903
|
};
|
|
1888
1904
|
b(Yt, "fieldTypeName", "Dropdown"), b(Yt, "fieldTypeDescription", "Allows the user to select a single option from a list of options.");
|
|
1889
|
-
let
|
|
1905
|
+
let or = Yt;
|
|
1890
1906
|
const wo = G((r) => {
|
|
1891
1907
|
const [
|
|
1892
1908
|
{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c, touched: u, helpers: f },
|
|
@@ -1968,7 +1984,7 @@ const Zt = class Zt extends Je {
|
|
|
1968
1984
|
showDirectly: !1
|
|
1969
1985
|
},
|
|
1970
1986
|
{
|
|
1971
|
-
field: new
|
|
1987
|
+
field: new or({
|
|
1972
1988
|
label: "Type",
|
|
1973
1989
|
required: !1,
|
|
1974
1990
|
identifier: `${n}validationType`,
|
|
@@ -2058,7 +2074,7 @@ const Zt = class Zt extends Je {
|
|
|
2058
2074
|
}
|
|
2059
2075
|
};
|
|
2060
2076
|
b(Zt, "fieldTypeName", "OTP"), b(Zt, "fieldTypeDescription", "Allows specifying a number within a given range.");
|
|
2061
|
-
let
|
|
2077
|
+
let br = Zt;
|
|
2062
2078
|
const ar = {
|
|
2063
2079
|
pass: {
|
|
2064
2080
|
label: "Pass",
|
|
@@ -2072,7 +2088,7 @@ const ar = {
|
|
|
2072
2088
|
label: "N/A",
|
|
2073
2089
|
icon: fl
|
|
2074
2090
|
}
|
|
2075
|
-
},
|
|
2091
|
+
}, Or = Object.keys(ar);
|
|
2076
2092
|
class Ft extends File {
|
|
2077
2093
|
constructor(t, ...n) {
|
|
2078
2094
|
super(...n);
|
|
@@ -2086,7 +2102,7 @@ class Ft extends File {
|
|
|
2086
2102
|
});
|
|
2087
2103
|
}
|
|
2088
2104
|
}
|
|
2089
|
-
class
|
|
2105
|
+
class zr extends Promise {
|
|
2090
2106
|
constructor(t, n) {
|
|
2091
2107
|
super(t);
|
|
2092
2108
|
b(this, "_uuid");
|
|
@@ -2099,7 +2115,7 @@ class Ur extends Promise {
|
|
|
2099
2115
|
this._uuid = t;
|
|
2100
2116
|
}
|
|
2101
2117
|
static from(t, n) {
|
|
2102
|
-
return new
|
|
2118
|
+
return new zr((i, a) => {
|
|
2103
2119
|
Promise.resolve(t).then(i).catch(a);
|
|
2104
2120
|
}, n);
|
|
2105
2121
|
}
|
|
@@ -2118,19 +2134,19 @@ class Ur extends Promise {
|
|
|
2118
2134
|
}
|
|
2119
2135
|
}
|
|
2120
2136
|
function hc(r) {
|
|
2121
|
-
return Array.isArray(r) ? r.every((e) => e instanceof
|
|
2137
|
+
return Array.isArray(r) ? r.every((e) => e instanceof zr || e instanceof Ft) : !1;
|
|
2122
2138
|
}
|
|
2123
2139
|
function gi(r, e) {
|
|
2124
2140
|
const t = new Set(r.map(({ uuid: i }) => i)), n = new Set(e.map(({ uuid: i }) => i));
|
|
2125
2141
|
return t.size === n.size && t.isSubsetOf(n);
|
|
2126
2142
|
}
|
|
2127
2143
|
const pc = G(
|
|
2128
|
-
|
|
2144
|
+
Pr((r, e) => {
|
|
2129
2145
|
const { file: t, alt: n, error: i, rightSlot: a, className: o, ...s } = r;
|
|
2130
2146
|
return /* @__PURE__ */ _(
|
|
2131
2147
|
at,
|
|
2132
2148
|
{
|
|
2133
|
-
className:
|
|
2149
|
+
className: Ar(o, "relative flex h-[200px] w-full flex-col gap-2 overflow-hidden items-center"),
|
|
2134
2150
|
ref: e,
|
|
2135
2151
|
...s,
|
|
2136
2152
|
children: [
|
|
@@ -2146,7 +2162,7 @@ const pc = G(
|
|
|
2146
2162
|
(!!t || !!i) && /* @__PURE__ */ _(
|
|
2147
2163
|
"div",
|
|
2148
2164
|
{
|
|
2149
|
-
className:
|
|
2165
|
+
className: Ar("flex w-full items-center gap-2 self-end", {
|
|
2150
2166
|
"bg-transparent": !t
|
|
2151
2167
|
}),
|
|
2152
2168
|
children: [
|
|
@@ -2177,7 +2193,7 @@ const pc = G(
|
|
|
2177
2193
|
return i != null && i.type.startsWith("image/") && (g = URL.createObjectURL(i)), i ? (x = i.name, m = vc(i.size)) : (x = "Downloading...", m = "..."), { url: g, name: x, size: m };
|
|
2178
2194
|
}, [i]);
|
|
2179
2195
|
ke(() => {
|
|
2180
|
-
e instanceof
|
|
2196
|
+
e instanceof zr ? e.then((g) => {
|
|
2181
2197
|
a(g);
|
|
2182
2198
|
}).catch((g) => {
|
|
2183
2199
|
s(g instanceof Error ? g.message : "Unknown error");
|
|
@@ -2235,7 +2251,7 @@ const Co = G((r) => {
|
|
|
2235
2251
|
const [
|
|
2236
2252
|
{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c, touched: u, helpers: f },
|
|
2237
2253
|
{ disabled: h }
|
|
2238
|
-
] = je(r), { value: d, onChange: v, onBlur: g, name: x } = c, [m, w] = ye(""), C =
|
|
2254
|
+
] = je(r), { value: d, onChange: v, onBlur: g, name: x } = c, [m, w] = ye(""), C = Br(null), A = a ? null : s, E = a ? "" : l, I = d.status && o.showNotesAndFilesOn.includes(d.status), N = T(
|
|
2239
2255
|
($) => {
|
|
2240
2256
|
const le = o.cleanValue({
|
|
2241
2257
|
...d,
|
|
@@ -2279,7 +2295,7 @@ const Co = G((r) => {
|
|
|
2279
2295
|
($ = C.current) == null || $.click();
|
|
2280
2296
|
}, []), X = T(
|
|
2281
2297
|
($) => {
|
|
2282
|
-
const le = Array.from($.target.files ?? []).map((
|
|
2298
|
+
const le = Array.from($.target.files ?? []).map((fr) => Ft.from(W(), fr)), Fe = {
|
|
2283
2299
|
...d,
|
|
2284
2300
|
files: [...d.files, ...le]
|
|
2285
2301
|
};
|
|
@@ -2325,7 +2341,7 @@ const Co = G((r) => {
|
|
|
2325
2341
|
variant: "surface",
|
|
2326
2342
|
size: "sm",
|
|
2327
2343
|
onValueChange: N,
|
|
2328
|
-
children:
|
|
2344
|
+
children: Or.map(($) => {
|
|
2329
2345
|
const { label: le } = ar[$];
|
|
2330
2346
|
return /* @__PURE__ */ _("label", { className: "flex gap-2 items-center min-w-0", children: [
|
|
2331
2347
|
/* @__PURE__ */ p(ir.Item, { value: $, children: /* @__PURE__ */ p(ir.Indicator, { children: /* @__PURE__ */ p(D, { icon: Ja, className: "fill-current" }) }) }),
|
|
@@ -2400,7 +2416,7 @@ const Co = G((r) => {
|
|
|
2400
2416
|
) });
|
|
2401
2417
|
});
|
|
2402
2418
|
Co.displayName = "PassFailInput";
|
|
2403
|
-
const Ao = (r) => typeof r == "string" &&
|
|
2419
|
+
const Ao = (r) => typeof r == "string" && Or.includes(r), gc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !Ao(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !(Array.isArray(r.files) && r.files.length === 0)), xc = (r) => !(r === null || typeof r != "object" || !("status" in r) || !Ao(r.status) || !("notes" in r) || typeof r.notes != "string" || !("files" in r) || !hc(r.files)), yc = (r) => ({
|
|
2404
2420
|
status: r.status,
|
|
2405
2421
|
notes: r.notes,
|
|
2406
2422
|
files: []
|
|
@@ -2425,7 +2441,7 @@ const Ao = (r) => typeof r == "string" && Nr.includes(r), gc = (r) => !(r === nu
|
|
|
2425
2441
|
identifier: `${n}showNotesAndFilesOn`,
|
|
2426
2442
|
label: "Show notes and files on",
|
|
2427
2443
|
description: "Show the notes and files on desired statuses.",
|
|
2428
|
-
options:
|
|
2444
|
+
options: Or.map((i) => {
|
|
2429
2445
|
const { label: a } = ar[i];
|
|
2430
2446
|
return {
|
|
2431
2447
|
value: i,
|
|
@@ -2508,6 +2524,9 @@ const Ao = (r) => typeof r == "string" && Nr.includes(r), gc = (r) => !(r === nu
|
|
|
2508
2524
|
files: []
|
|
2509
2525
|
};
|
|
2510
2526
|
}
|
|
2527
|
+
cleanSerializedValue(t) {
|
|
2528
|
+
return super.cleanSerializedValue(t);
|
|
2529
|
+
}
|
|
2511
2530
|
blankSerializedValue() {
|
|
2512
2531
|
return {
|
|
2513
2532
|
status: null,
|
|
@@ -2520,7 +2539,7 @@ const Ao = (r) => typeof r == "string" && Nr.includes(r), gc = (r) => !(r === nu
|
|
|
2520
2539
|
}
|
|
2521
2540
|
};
|
|
2522
2541
|
b(Kt, "fieldTypeName", "Pass - Fail"), b(Kt, "fieldTypeDescription", "Track pass, fail, or N/A outcome.");
|
|
2523
|
-
let
|
|
2542
|
+
let Nr = Kt;
|
|
2524
2543
|
const _o = G((r) => {
|
|
2525
2544
|
const [{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c }, { disabled: u }] = je(r), { name: f, onChange: h, onBlur: d, value: v } = c, g = a ? null : s, x = a ? "" : l, m = T(
|
|
2526
2545
|
(C) => {
|
|
@@ -2612,10 +2631,10 @@ const Qt = class Qt extends fn {
|
|
|
2612
2631
|
return /* @__PURE__ */ p(_o, { field: this, ...t });
|
|
2613
2632
|
}
|
|
2614
2633
|
isSerializedValueValid(t) {
|
|
2615
|
-
return typeof t
|
|
2634
|
+
return typeof t != "string" && t !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(t);
|
|
2616
2635
|
}
|
|
2617
2636
|
isValueValid(t) {
|
|
2618
|
-
return
|
|
2637
|
+
return this.isSerializedValueValid(t);
|
|
2619
2638
|
}
|
|
2620
2639
|
blankValue() {
|
|
2621
2640
|
return null;
|
|
@@ -2631,7 +2650,7 @@ const Qt = class Qt extends fn {
|
|
|
2631
2650
|
}
|
|
2632
2651
|
};
|
|
2633
2652
|
b(Qt, "fieldTypeName", "Option list"), b(Qt, "fieldTypeDescription", "Allows the user to select a single option from a list of options.");
|
|
2634
|
-
let
|
|
2653
|
+
let Tr = Qt;
|
|
2635
2654
|
const Eo = G((r) => {
|
|
2636
2655
|
const [{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c }, { disabled: u }] = je(r), { name: f, onChange: h, onBlur: d, value: v } = c, g = a ? null : s, x = a ? "" : l, m = T(
|
|
2637
2656
|
(A) => {
|
|
@@ -2763,8 +2782,8 @@ const Jt = class Jt extends Je {
|
|
|
2763
2782
|
}
|
|
2764
2783
|
};
|
|
2765
2784
|
b(Jt, "fieldTypeName", "Rating"), b(Jt, "fieldTypeDescription", "Allows users to select a rating value.");
|
|
2766
|
-
let
|
|
2767
|
-
const So =
|
|
2785
|
+
let Dr = Jt;
|
|
2786
|
+
const So = Fr(() => {
|
|
2768
2787
|
throw new Error("No ScannerProvider found");
|
|
2769
2788
|
}), w0 = () => dt(So);
|
|
2770
2789
|
function Ac(r, e) {
|
|
@@ -3394,7 +3413,7 @@ var _e = (
|
|
|
3394
3413
|
}
|
|
3395
3414
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
3396
3415
|
};
|
|
3397
|
-
}(),
|
|
3416
|
+
}(), Yr = (
|
|
3398
3417
|
/** @class */
|
|
3399
3418
|
function(r) {
|
|
3400
3419
|
Bc(e, r);
|
|
@@ -3433,7 +3452,7 @@ var _e = (
|
|
|
3433
3452
|
}
|
|
3434
3453
|
if (n.equals(_e.UnicodeBigUnmarked))
|
|
3435
3454
|
return String.fromCharCode.apply(null, new Uint16Array(e.buffer));
|
|
3436
|
-
throw new
|
|
3455
|
+
throw new Yr("Encoding " + this.encodingName(t) + " not supported by fallback.");
|
|
3437
3456
|
}, r.isDecodeFallbackSupported = function(e) {
|
|
3438
3457
|
return e.equals(_e.UTF8) || e.equals(_e.ISO8859_1) || e.equals(_e.ASCII);
|
|
3439
3458
|
}, r.encodeFallback = function(e) {
|
|
@@ -3896,13 +3915,13 @@ var _e = (
|
|
|
3896
3915
|
}, r.prototype.isCropSupported = function() {
|
|
3897
3916
|
return !1;
|
|
3898
3917
|
}, r.prototype.crop = function(e, t, n, i) {
|
|
3899
|
-
throw new
|
|
3918
|
+
throw new Yr("This luminance source does not support cropping.");
|
|
3900
3919
|
}, r.prototype.isRotateSupported = function() {
|
|
3901
3920
|
return !1;
|
|
3902
3921
|
}, r.prototype.rotateCounterClockwise = function() {
|
|
3903
|
-
throw new
|
|
3922
|
+
throw new Yr("This luminance source does not support rotation by 90 degrees.");
|
|
3904
3923
|
}, r.prototype.rotateCounterClockwise45 = function() {
|
|
3905
|
-
throw new
|
|
3924
|
+
throw new Yr("This luminance source does not support rotation by 45 degrees.");
|
|
3906
3925
|
}, r.prototype.toString = function() {
|
|
3907
3926
|
for (var e = new Uint8ClampedArray(this.width), t = new j(), n = 0; n < this.height; n++) {
|
|
3908
3927
|
for (var i = this.getRow(n, e), a = 0; a < this.width; a++) {
|
|
@@ -4152,7 +4171,7 @@ var _e = (
|
|
|
4152
4171
|
}
|
|
4153
4172
|
};
|
|
4154
4173
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
4155
|
-
},
|
|
4174
|
+
}, lr = (
|
|
4156
4175
|
/** @class */
|
|
4157
4176
|
function() {
|
|
4158
4177
|
function r(e, t, n) {
|
|
@@ -4735,7 +4754,7 @@ var hn = (
|
|
|
4735
4754
|
return this.structuredAppendSequenceNumber;
|
|
4736
4755
|
}, r;
|
|
4737
4756
|
}()
|
|
4738
|
-
),
|
|
4757
|
+
), vr = (
|
|
4739
4758
|
/** @class */
|
|
4740
4759
|
function() {
|
|
4741
4760
|
function r() {
|
|
@@ -4781,13 +4800,13 @@ var hn = (
|
|
|
4781
4800
|
n = 0;
|
|
4782
4801
|
for (var i = 0, a = t.length; i !== a; i++) {
|
|
4783
4802
|
var o = t[i];
|
|
4784
|
-
n =
|
|
4803
|
+
n = vr.addOrSubtract(n, o);
|
|
4785
4804
|
}
|
|
4786
4805
|
return n;
|
|
4787
4806
|
}
|
|
4788
4807
|
n = t[0];
|
|
4789
4808
|
for (var s = t.length, l = this.field, i = 1; i < s; i++)
|
|
4790
|
-
n =
|
|
4809
|
+
n = vr.addOrSubtract(l.multiply(e, n), t[i]);
|
|
4791
4810
|
return n;
|
|
4792
4811
|
}, r.prototype.addOrSubtract = function(e) {
|
|
4793
4812
|
if (!this.field.equals(e.field))
|
|
@@ -4804,7 +4823,7 @@ var hn = (
|
|
|
4804
4823
|
var a = new Int32Array(n.length), o = n.length - t.length;
|
|
4805
4824
|
de.arraycopy(n, 0, a, 0, o);
|
|
4806
4825
|
for (var s = o; s < n.length; s++)
|
|
4807
|
-
a[s] =
|
|
4826
|
+
a[s] = vr.addOrSubtract(t[s - o], n[s]);
|
|
4808
4827
|
return new r(this.field, a);
|
|
4809
4828
|
}, r.prototype.multiply = function(e) {
|
|
4810
4829
|
if (!this.field.equals(e.field))
|
|
@@ -4813,7 +4832,7 @@ var hn = (
|
|
|
4813
4832
|
return this.field.getZero();
|
|
4814
4833
|
for (var t = this.coefficients, n = t.length, i = e.coefficients, a = i.length, o = new Int32Array(n + a - 1), s = this.field, l = 0; l < n; l++)
|
|
4815
4834
|
for (var c = t[l], u = 0; u < a; u++)
|
|
4816
|
-
o[l + u] =
|
|
4835
|
+
o[l + u] = vr.addOrSubtract(o[l + u], s.multiply(c, i[u]));
|
|
4817
4836
|
return new r(s, o);
|
|
4818
4837
|
}, r.prototype.multiplyScalar = function(e) {
|
|
4819
4838
|
if (e === 0)
|
|
@@ -4934,7 +4953,7 @@ var hn = (
|
|
|
4934
4953
|
}, e.prototype.equals = function(t) {
|
|
4935
4954
|
return t === this;
|
|
4936
4955
|
}, e.AZTEC_DATA_12 = new e(4201, 4096, 1), e.AZTEC_DATA_10 = new e(1033, 1024, 1), e.AZTEC_DATA_6 = new e(67, 64, 1), e.AZTEC_PARAM = new e(19, 16, 1), e.QR_CODE_FIELD_256 = new e(285, 256, 0), e.DATA_MATRIX_FIELD_256 = new e(301, 256, 1), e.AZTEC_DATA_8 = e.DATA_MATRIX_FIELD_256, e.MAXICODE_FIELD_64 = e.AZTEC_DATA_6, e;
|
|
4937
|
-
}(
|
|
4956
|
+
}(vr)
|
|
4938
4957
|
), Zc = /* @__PURE__ */ function() {
|
|
4939
4958
|
var r = function(e, t) {
|
|
4940
4959
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -4950,7 +4969,7 @@ var hn = (
|
|
|
4950
4969
|
}
|
|
4951
4970
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
4952
4971
|
};
|
|
4953
|
-
}(),
|
|
4972
|
+
}(), Xr = (
|
|
4954
4973
|
/** @class */
|
|
4955
4974
|
function(r) {
|
|
4956
4975
|
Zc(e, r);
|
|
@@ -4974,7 +4993,7 @@ var hn = (
|
|
|
4974
4993
|
}
|
|
4975
4994
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
4976
4995
|
};
|
|
4977
|
-
}(),
|
|
4996
|
+
}(), Ur = (
|
|
4978
4997
|
/** @class */
|
|
4979
4998
|
function(r) {
|
|
4980
4999
|
Kc(e, r);
|
|
@@ -4998,7 +5017,7 @@ var hn = (
|
|
|
4998
5017
|
for (var c = new Et(n, a), u = this.runEuclideanAlgorithm(n.buildMonomial(t, 1), c, t), f = u[0], h = u[1], d = this.findErrorLocations(f), v = this.findErrorMagnitudes(h, d), s = 0; s < d.length; s++) {
|
|
4999
5018
|
var g = e.length - 1 - n.log(d[s]);
|
|
5000
5019
|
if (g < 0)
|
|
5001
|
-
throw new
|
|
5020
|
+
throw new Xr("Bad error location");
|
|
5002
5021
|
e[g] = Qe.addOrSubtract(e[g], v[s]);
|
|
5003
5022
|
}
|
|
5004
5023
|
}, r.prototype.runEuclideanAlgorithm = function(e, t, n) {
|
|
@@ -5009,18 +5028,18 @@ var hn = (
|
|
|
5009
5028
|
for (var a = this.field, o = e, s = t, l = a.getZero(), c = a.getOne(); s.getDegree() >= (n / 2 | 0); ) {
|
|
5010
5029
|
var u = o, f = l;
|
|
5011
5030
|
if (o = s, l = c, o.isZero())
|
|
5012
|
-
throw new
|
|
5031
|
+
throw new Xr("r_{i-1} was zero");
|
|
5013
5032
|
s = u;
|
|
5014
5033
|
for (var h = a.getZero(), d = o.getCoefficient(o.getDegree()), v = a.inverse(d); s.getDegree() >= o.getDegree() && !s.isZero(); ) {
|
|
5015
5034
|
var g = s.getDegree() - o.getDegree(), x = a.multiply(s.getCoefficient(s.getDegree()), v);
|
|
5016
5035
|
h = h.addOrSubtract(a.buildMonomial(g, x)), s = s.addOrSubtract(o.multiplyByMonomial(g, x));
|
|
5017
5036
|
}
|
|
5018
5037
|
if (c = h.multiply(l).addOrSubtract(f), s.getDegree() >= o.getDegree())
|
|
5019
|
-
throw new
|
|
5038
|
+
throw new Ur("Division algorithm failed to reduce polynomial?");
|
|
5020
5039
|
}
|
|
5021
5040
|
var m = c.getCoefficient(0);
|
|
5022
5041
|
if (m === 0)
|
|
5023
|
-
throw new
|
|
5042
|
+
throw new Xr("sigmaTilde(0) was zero");
|
|
5024
5043
|
var w = a.inverse(m), C = c.multiplyScalar(w), A = s.multiplyScalar(w);
|
|
5025
5044
|
return [C, A];
|
|
5026
5045
|
}, r.prototype.findErrorLocations = function(e) {
|
|
@@ -5030,7 +5049,7 @@ var hn = (
|
|
|
5030
5049
|
for (var n = new Int32Array(t), i = 0, a = this.field, o = 1; o < a.getSize() && i < t; o++)
|
|
5031
5050
|
e.evaluateAt(o) === 0 && (n[i] = a.inverse(o), i++);
|
|
5032
5051
|
if (i !== t)
|
|
5033
|
-
throw new
|
|
5052
|
+
throw new Xr("Error locator degree does not match number of roots");
|
|
5034
5053
|
return n;
|
|
5035
5054
|
}, r.prototype.findErrorMagnitudes = function(e, t) {
|
|
5036
5055
|
for (var n = t.length, i = new Int32Array(n), a = this.field, o = 0; o < n; o++) {
|
|
@@ -5119,7 +5138,7 @@ var ji = (
|
|
|
5119
5138
|
case Re.DIGIT:
|
|
5120
5139
|
return r.DIGIT_TABLE[t];
|
|
5121
5140
|
default:
|
|
5122
|
-
throw new
|
|
5141
|
+
throw new Ur("Bad table");
|
|
5123
5142
|
}
|
|
5124
5143
|
}, r.prototype.correctBits = function(e) {
|
|
5125
5144
|
var t, n;
|
|
@@ -5882,7 +5901,7 @@ var ji = (
|
|
|
5882
5901
|
return t === void 0 && (t = 500), r.call(this, new ei(), t) || this;
|
|
5883
5902
|
}
|
|
5884
5903
|
return e;
|
|
5885
|
-
})(
|
|
5904
|
+
})(lr);
|
|
5886
5905
|
var Se = (
|
|
5887
5906
|
/** @class */
|
|
5888
5907
|
function() {
|
|
@@ -6925,7 +6944,7 @@ var Se = (
|
|
|
6925
6944
|
}
|
|
6926
6945
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
6927
6946
|
};
|
|
6928
|
-
}(),
|
|
6947
|
+
}(), sr = (
|
|
6929
6948
|
/** @class */
|
|
6930
6949
|
function(r) {
|
|
6931
6950
|
cu(e, r);
|
|
@@ -7035,7 +7054,7 @@ var Se = (
|
|
|
7035
7054
|
var i, a, o = this.decodeMiddleCounters;
|
|
7036
7055
|
o[0] = 0, o[1] = 0, o[2] = 0, o[3] = 0;
|
|
7037
7056
|
for (var s = e.getSize(), l = t[1], c = 0, u = 0; u < 5 && l < s; u++) {
|
|
7038
|
-
var f =
|
|
7057
|
+
var f = sr.decodeDigit(e, o, l, sr.L_AND_G_PATTERNS);
|
|
7039
7058
|
n += String.fromCharCode(48 + f % 10);
|
|
7040
7059
|
try {
|
|
7041
7060
|
for (var h = (i = void 0, uu(o)), d = h.next(); !d.done; d = h.next()) {
|
|
@@ -7129,7 +7148,7 @@ var Se = (
|
|
|
7129
7148
|
var i, a, o = this.decodeMiddleCounters;
|
|
7130
7149
|
o[0] = 0, o[1] = 0, o[2] = 0, o[3] = 0;
|
|
7131
7150
|
for (var s = e.getSize(), l = t[1], c = 0, u = 0; u < 2 && l < s; u++) {
|
|
7132
|
-
var f =
|
|
7151
|
+
var f = sr.decodeDigit(e, o, l, sr.L_AND_G_PATTERNS);
|
|
7133
7152
|
n += String.fromCharCode(48 + f % 10);
|
|
7134
7153
|
try {
|
|
7135
7154
|
for (var h = (i = void 0, du(o)), d = h.next(); !d.done; d = h.next()) {
|
|
@@ -7162,7 +7181,7 @@ var Se = (
|
|
|
7162
7181
|
function r() {
|
|
7163
7182
|
}
|
|
7164
7183
|
return r.decodeRow = function(e, t, n) {
|
|
7165
|
-
var i =
|
|
7184
|
+
var i = sr.findGuardPattern(t, n, !1, this.EXTENSION_START_PATTERN, new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));
|
|
7166
7185
|
try {
|
|
7167
7186
|
var a = new fu();
|
|
7168
7187
|
return a.decodeRow(e, t, i);
|
|
@@ -7271,7 +7290,7 @@ var Se = (
|
|
|
7271
7290
|
}, e.decodeEnd = function(t, n) {
|
|
7272
7291
|
return e.findGuardPattern(t, n, !1, e.START_END_PATTERN, new Int32Array(e.START_END_PATTERN.length).fill(0));
|
|
7273
7292
|
}, e;
|
|
7274
|
-
}(
|
|
7293
|
+
}(sr)
|
|
7275
7294
|
), gu = /* @__PURE__ */ function() {
|
|
7276
7295
|
var r = function(e, t) {
|
|
7277
7296
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -8060,7 +8079,7 @@ var Se = (
|
|
|
8060
8079
|
return this.firstDigit === e.FNC1 || this.secondDigit === e.FNC1;
|
|
8061
8080
|
}, e.FNC1 = 10, e;
|
|
8062
8081
|
}(Ai)
|
|
8063
|
-
),
|
|
8082
|
+
), Wr = function(r) {
|
|
8064
8083
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
8065
8084
|
if (t) return t.call(r);
|
|
8066
8085
|
if (r && typeof r.length == "number") return {
|
|
@@ -8082,7 +8101,7 @@ var Se = (
|
|
|
8082
8101
|
throw new O();
|
|
8083
8102
|
var u = e.substring(0, 2);
|
|
8084
8103
|
try {
|
|
8085
|
-
for (var f =
|
|
8104
|
+
for (var f = Wr(r.TWO_DIGIT_DATA_LENGTH), h = f.next(); !h.done; h = f.next()) {
|
|
8086
8105
|
var d = h.value;
|
|
8087
8106
|
if (d[0] === u)
|
|
8088
8107
|
return d[1] === r.VARIABLE_LENGTH ? r.processVariableAI(2, d[2], e) : r.processFixedAI(2, d[1], e);
|
|
@@ -8100,7 +8119,7 @@ var Se = (
|
|
|
8100
8119
|
throw new O();
|
|
8101
8120
|
var v = e.substring(0, 3);
|
|
8102
8121
|
try {
|
|
8103
|
-
for (var g =
|
|
8122
|
+
for (var g = Wr(r.THREE_DIGIT_DATA_LENGTH), x = g.next(); !x.done; x = g.next()) {
|
|
8104
8123
|
var d = x.value;
|
|
8105
8124
|
if (d[0] === v)
|
|
8106
8125
|
return d[1] === r.VARIABLE_LENGTH ? r.processVariableAI(3, d[2], e) : r.processFixedAI(3, d[1], e);
|
|
@@ -8115,7 +8134,7 @@ var Se = (
|
|
|
8115
8134
|
}
|
|
8116
8135
|
}
|
|
8117
8136
|
try {
|
|
8118
|
-
for (var m =
|
|
8137
|
+
for (var m = Wr(r.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH), w = m.next(); !w.done; w = m.next()) {
|
|
8119
8138
|
var d = w.value;
|
|
8120
8139
|
if (d[0] === v)
|
|
8121
8140
|
return d[1] === r.VARIABLE_LENGTH ? r.processVariableAI(4, d[2], e) : r.processFixedAI(4, d[1], e);
|
|
@@ -8133,7 +8152,7 @@ var Se = (
|
|
|
8133
8152
|
throw new O();
|
|
8134
8153
|
var C = e.substring(0, 4);
|
|
8135
8154
|
try {
|
|
8136
|
-
for (var A =
|
|
8155
|
+
for (var A = Wr(r.FOUR_DIGIT_DATA_LENGTH), E = A.next(); !E.done; E = A.next()) {
|
|
8137
8156
|
var d = E.value;
|
|
8138
8157
|
if (d[0] === C)
|
|
8139
8158
|
return d[1] === r.VARIABLE_LENGTH ? r.processVariableAI(4, d[2], e) : r.processFixedAI(4, d[1], e);
|
|
@@ -8293,7 +8312,7 @@ var Se = (
|
|
|
8293
8312
|
["8200", r.VARIABLE_LENGTH, 70]
|
|
8294
8313
|
], r;
|
|
8295
8314
|
}()
|
|
8296
|
-
),
|
|
8315
|
+
), Zr = (
|
|
8297
8316
|
/** @class */
|
|
8298
8317
|
function() {
|
|
8299
8318
|
function r(e) {
|
|
@@ -8508,7 +8527,7 @@ var Se = (
|
|
|
8508
8527
|
i = "/";
|
|
8509
8528
|
break;
|
|
8510
8529
|
default:
|
|
8511
|
-
throw new
|
|
8530
|
+
throw new Ur("Decoding invalid alphanumeric value: " + n);
|
|
8512
8531
|
}
|
|
8513
8532
|
return new st(e + 6, i);
|
|
8514
8533
|
}, r.prototype.isAlphaTo646ToAlphaLatch = function(e) {
|
|
@@ -8541,7 +8560,7 @@ var Se = (
|
|
|
8541
8560
|
/** @class */
|
|
8542
8561
|
function() {
|
|
8543
8562
|
function r(e) {
|
|
8544
|
-
this.information = e, this.generalDecoder = new
|
|
8563
|
+
this.information = e, this.generalDecoder = new Zr(e);
|
|
8545
8564
|
}
|
|
8546
8565
|
return r.prototype.getInformation = function() {
|
|
8547
8566
|
return this.information;
|
|
@@ -8660,7 +8679,7 @@ var Se = (
|
|
|
8660
8679
|
}
|
|
8661
8680
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
8662
8681
|
};
|
|
8663
|
-
}(),
|
|
8682
|
+
}(), Kr = (
|
|
8664
8683
|
/** @class */
|
|
8665
8684
|
function(r) {
|
|
8666
8685
|
Bu(e, r);
|
|
@@ -8698,12 +8717,12 @@ var Se = (
|
|
|
8698
8717
|
return r.call(this, t) || this;
|
|
8699
8718
|
}
|
|
8700
8719
|
return e.prototype.parseInformation = function() {
|
|
8701
|
-
if (this.getInformation().getSize() !== e.HEADER_SIZE +
|
|
8720
|
+
if (this.getInformation().getSize() !== e.HEADER_SIZE + Kr.GTIN_SIZE + e.WEIGHT_SIZE)
|
|
8702
8721
|
throw new O();
|
|
8703
8722
|
var t = new j();
|
|
8704
|
-
return this.encodeCompressedGtin(t, e.HEADER_SIZE), this.encodeCompressedWeight(t, e.HEADER_SIZE +
|
|
8723
|
+
return this.encodeCompressedGtin(t, e.HEADER_SIZE), this.encodeCompressedWeight(t, e.HEADER_SIZE + Kr.GTIN_SIZE, e.WEIGHT_SIZE), t.toString();
|
|
8705
8724
|
}, e.HEADER_SIZE = 5, e.WEIGHT_SIZE = 15, e;
|
|
8706
|
-
}(
|
|
8725
|
+
}(Kr)
|
|
8707
8726
|
), ku = /* @__PURE__ */ function() {
|
|
8708
8727
|
var r = function(e, t) {
|
|
8709
8728
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -8872,7 +8891,7 @@ var Se = (
|
|
|
8872
8891
|
}, e.prototype.checkWeight = function(t) {
|
|
8873
8892
|
return t % 1e5;
|
|
8874
8893
|
}, e.HEADER_SIZE = 8, e.WEIGHT_SIZE = 20, e.DATE_SIZE = 16, e;
|
|
8875
|
-
}(
|
|
8894
|
+
}(Kr)
|
|
8876
8895
|
);
|
|
8877
8896
|
function ju(r) {
|
|
8878
8897
|
try {
|
|
@@ -8880,21 +8899,21 @@ function ju(r) {
|
|
|
8880
8899
|
return new Vu(r);
|
|
8881
8900
|
if (!r.get(2))
|
|
8882
8901
|
return new Fu(r);
|
|
8883
|
-
var e =
|
|
8902
|
+
var e = Zr.extractNumericValueFromBitArray(r, 1, 4);
|
|
8884
8903
|
switch (e) {
|
|
8885
8904
|
case 4:
|
|
8886
8905
|
return new zu(r);
|
|
8887
8906
|
case 5:
|
|
8888
8907
|
return new Hu(r);
|
|
8889
8908
|
}
|
|
8890
|
-
var t =
|
|
8909
|
+
var t = Zr.extractNumericValueFromBitArray(r, 1, 5);
|
|
8891
8910
|
switch (t) {
|
|
8892
8911
|
case 12:
|
|
8893
8912
|
return new Xu(r);
|
|
8894
8913
|
case 13:
|
|
8895
8914
|
return new qu(r);
|
|
8896
8915
|
}
|
|
8897
|
-
var n =
|
|
8916
|
+
var n = Zr.extractNumericValueFromBitArray(r, 1, 7);
|
|
8898
8917
|
switch (n) {
|
|
8899
8918
|
case 56:
|
|
8900
8919
|
return new wt(r, "310", "11");
|
|
@@ -8914,7 +8933,7 @@ function ju(r) {
|
|
|
8914
8933
|
return new wt(r, "320", "17");
|
|
8915
8934
|
}
|
|
8916
8935
|
} catch (i) {
|
|
8917
|
-
throw console.log(i), new
|
|
8936
|
+
throw console.log(i), new Ur("unknown decoder: " + r);
|
|
8918
8937
|
}
|
|
8919
8938
|
}
|
|
8920
8939
|
var oa = (
|
|
@@ -9797,7 +9816,7 @@ var oa = (
|
|
|
9797
9816
|
}
|
|
9798
9817
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
9799
9818
|
};
|
|
9800
|
-
}(),
|
|
9819
|
+
}(), gr = (
|
|
9801
9820
|
/** @class */
|
|
9802
9821
|
function(r) {
|
|
9803
9822
|
tf(e, r);
|
|
@@ -9839,10 +9858,10 @@ var oa = (
|
|
|
9839
9858
|
(function(r) {
|
|
9840
9859
|
rf(e, r);
|
|
9841
9860
|
function e(t, n) {
|
|
9842
|
-
return t === void 0 && (t = 500), r.call(this, new
|
|
9861
|
+
return t === void 0 && (t = 500), r.call(this, new gr(n), t, n) || this;
|
|
9843
9862
|
}
|
|
9844
9863
|
return e;
|
|
9845
|
-
})(
|
|
9864
|
+
})(lr);
|
|
9846
9865
|
var la = function(r) {
|
|
9847
9866
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
9848
9867
|
if (t) return t.call(r);
|
|
@@ -10395,7 +10414,7 @@ var sf = (
|
|
|
10395
10414
|
try {
|
|
10396
10415
|
t.append(it.decode(s, Q.ISO88591));
|
|
10397
10416
|
} catch (c) {
|
|
10398
|
-
throw new
|
|
10417
|
+
throw new Ur("Platform does not support required encoding: " + c.message);
|
|
10399
10418
|
}
|
|
10400
10419
|
}, r.unrandomize255State = function(e, t) {
|
|
10401
10420
|
var n = 149 * t % 255 + 1, i = e - n;
|
|
@@ -10727,7 +10746,7 @@ var sf = (
|
|
|
10727
10746
|
return t === void 0 && (t = 500), r.call(this, new ri(), t) || this;
|
|
10728
10747
|
}
|
|
10729
10748
|
return e;
|
|
10730
|
-
})(
|
|
10749
|
+
})(lr);
|
|
10731
10750
|
var Gt;
|
|
10732
10751
|
(function(r) {
|
|
10733
10752
|
r[r.L = 0] = "L", r[r.M = 1] = "M", r[r.Q = 2] = "Q", r[r.H = 3] = "H";
|
|
@@ -11752,7 +11771,7 @@ var ve = (
|
|
|
11752
11771
|
return this.topRight;
|
|
11753
11772
|
}, r;
|
|
11754
11773
|
}()
|
|
11755
|
-
),
|
|
11774
|
+
), dr = function(r) {
|
|
11756
11775
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
11757
11776
|
if (t) return t.call(r);
|
|
11758
11777
|
if (r && typeof r.length == "number") return {
|
|
@@ -11949,7 +11968,7 @@ var ve = (
|
|
|
11949
11968
|
return 0;
|
|
11950
11969
|
var i = null;
|
|
11951
11970
|
try {
|
|
11952
|
-
for (var a =
|
|
11971
|
+
for (var a = dr(this.possibleCenters), o = a.next(); !o.done; o = a.next()) {
|
|
11953
11972
|
var s = o.value;
|
|
11954
11973
|
if (s.getCount() >= r.CENTER_QUORUM)
|
|
11955
11974
|
if (i == null)
|
|
@@ -11971,7 +11990,7 @@ var ve = (
|
|
|
11971
11990
|
}, r.prototype.haveMultiplyConfirmedCenters = function() {
|
|
11972
11991
|
var e, t, n, i, a = 0, o = 0, s = this.possibleCenters.length;
|
|
11973
11992
|
try {
|
|
11974
|
-
for (var l =
|
|
11993
|
+
for (var l = dr(this.possibleCenters), c = l.next(); !c.done; c = l.next()) {
|
|
11975
11994
|
var u = c.value;
|
|
11976
11995
|
u.getCount() >= r.CENTER_QUORUM && (a++, o += u.getEstimatedModuleSize());
|
|
11977
11996
|
}
|
|
@@ -11988,7 +12007,7 @@ var ve = (
|
|
|
11988
12007
|
return !1;
|
|
11989
12008
|
var f = o / s, h = 0;
|
|
11990
12009
|
try {
|
|
11991
|
-
for (var d =
|
|
12010
|
+
for (var d = dr(this.possibleCenters), v = d.next(); !v.done; v = d.next()) {
|
|
11992
12011
|
var u = v.value;
|
|
11993
12012
|
h += Math.abs(u.getEstimatedModuleSize() - f);
|
|
11994
12013
|
}
|
|
@@ -12010,7 +12029,7 @@ var ve = (
|
|
|
12010
12029
|
if (a > 3) {
|
|
12011
12030
|
var l = 0, c = 0;
|
|
12012
12031
|
try {
|
|
12013
|
-
for (var u =
|
|
12032
|
+
for (var u = dr(this.possibleCenters), f = u.next(); !f.done; f = u.next()) {
|
|
12014
12033
|
var h = f.value, d = h.getEstimatedModuleSize();
|
|
12015
12034
|
l += d, c += d * d;
|
|
12016
12035
|
}
|
|
@@ -12043,7 +12062,7 @@ var ve = (
|
|
|
12043
12062
|
if (o.length > 3) {
|
|
12044
12063
|
var l = 0;
|
|
12045
12064
|
try {
|
|
12046
|
-
for (var w =
|
|
12065
|
+
for (var w = dr(o), C = w.next(); !C.done; C = w.next()) {
|
|
12047
12066
|
var A = C.value;
|
|
12048
12067
|
l += A.getEstimatedModuleSize();
|
|
12049
12068
|
}
|
|
@@ -18551,7 +18570,7 @@ var ve = (
|
|
|
18551
18570
|
}
|
|
18552
18571
|
}
|
|
18553
18572
|
return a;
|
|
18554
|
-
},
|
|
18573
|
+
}, xr = (
|
|
18555
18574
|
/** @class */
|
|
18556
18575
|
function() {
|
|
18557
18576
|
function r() {
|
|
@@ -18695,7 +18714,7 @@ var ve = (
|
|
|
18695
18714
|
h === 0 || (h === 1 ? c = f.getRowNumber() : f.getRowNumber() >= t.getRowCount() ? l[u] = null : c = f.getRowNumber());
|
|
18696
18715
|
}
|
|
18697
18716
|
}, e.prototype.getBarcodeMetadata = function() {
|
|
18698
|
-
var t, n, i = this.getCodewords(), a = new
|
|
18717
|
+
var t, n, i = this.getCodewords(), a = new xr(), o = new xr(), s = new xr(), l = new xr();
|
|
18699
18718
|
try {
|
|
18700
18719
|
for (var c = Hn(i), u = c.next(); !u.done; u = c.next()) {
|
|
18701
18720
|
var f = u.value;
|
|
@@ -19181,11 +19200,11 @@ function Po() {
|
|
|
19181
19200
|
return self.BigInt || null;
|
|
19182
19201
|
throw new Error("Can't search globals for BigInt!");
|
|
19183
19202
|
}
|
|
19184
|
-
var
|
|
19203
|
+
var qr;
|
|
19185
19204
|
function At(r) {
|
|
19186
|
-
if (typeof
|
|
19205
|
+
if (typeof qr > "u" && (qr = Po()), qr === null)
|
|
19187
19206
|
throw new Error("BigInt is not supported!");
|
|
19188
|
-
return
|
|
19207
|
+
return qr(r);
|
|
19189
19208
|
}
|
|
19190
19209
|
function rd() {
|
|
19191
19210
|
var r = [];
|
|
@@ -19575,7 +19594,7 @@ var nd = (
|
|
|
19575
19594
|
}, 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 ,:
|
|
19576
19595
|
-.$/"|*()?{}'`, r.MIXED_CHARS = "0123456789&\r ,:#-.$/+%*=^", r.EXP900 = Po() ? rd() : [], r.NUMBER_OF_SEQUENCE_CODEWORDS = 2, r;
|
|
19577
19596
|
}()
|
|
19578
|
-
),
|
|
19597
|
+
), hr = function(r) {
|
|
19579
19598
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
19580
19599
|
if (t) return t.call(r);
|
|
19581
19600
|
if (r && typeof r.length == "number") return {
|
|
@@ -19637,7 +19656,7 @@ var nd = (
|
|
|
19637
19656
|
return null;
|
|
19638
19657
|
var a = r.getMax(i), o = 0;
|
|
19639
19658
|
try {
|
|
19640
|
-
for (var s =
|
|
19659
|
+
for (var s = hr(i), l = s.next(); !l.done; l = s.next()) {
|
|
19641
19660
|
var c = l.value;
|
|
19642
19661
|
if (o += a - c, c > 0)
|
|
19643
19662
|
break;
|
|
@@ -19661,7 +19680,7 @@ var nd = (
|
|
|
19661
19680
|
}, r.getMax = function(e) {
|
|
19662
19681
|
var t, n, i = -1;
|
|
19663
19682
|
try {
|
|
19664
|
-
for (var a =
|
|
19683
|
+
for (var a = hr(e), o = a.next(); !o.done; o = a.next()) {
|
|
19665
19684
|
var s = o.value;
|
|
19666
19685
|
i = Math.max(i, s);
|
|
19667
19686
|
}
|
|
@@ -19738,14 +19757,14 @@ var nd = (
|
|
|
19738
19757
|
return new Array(e.getBarcodeColumnCount() + 2);
|
|
19739
19758
|
}), s = 0; s < o.length; s++)
|
|
19740
19759
|
for (var l = 0; l < o[s].length; l++)
|
|
19741
|
-
o[s][l] = new
|
|
19760
|
+
o[s][l] = new xr();
|
|
19742
19761
|
var c = 0;
|
|
19743
19762
|
try {
|
|
19744
|
-
for (var u =
|
|
19763
|
+
for (var u = hr(e.getDetectionResultColumns()), f = u.next(); !f.done; f = u.next()) {
|
|
19745
19764
|
var h = f.value;
|
|
19746
19765
|
if (h != null)
|
|
19747
19766
|
try {
|
|
19748
|
-
for (var d = (i = void 0,
|
|
19767
|
+
for (var d = (i = void 0, hr(h.getCodewords())), v = d.next(); !v.done; v = d.next()) {
|
|
19749
19768
|
var g = v.value;
|
|
19750
19769
|
if (g != null) {
|
|
19751
19770
|
var x = g.getRowNumber();
|
|
@@ -19790,7 +19809,7 @@ var nd = (
|
|
|
19790
19809
|
for (var c = 0; r.isValidBarcodeColumn(e, t - s); ) {
|
|
19791
19810
|
t -= s;
|
|
19792
19811
|
try {
|
|
19793
|
-
for (var u = (a = void 0,
|
|
19812
|
+
for (var u = (a = void 0, hr(e.getDetectionResultColumn(t).getCodewords())), f = u.next(); !f.done; f = u.next()) {
|
|
19794
19813
|
var h = f.value;
|
|
19795
19814
|
if (h != null)
|
|
19796
19815
|
return (i ? h.getEndX() : h.getStartX()) + s * c * (h.getEndX() - h.getStartX());
|
|
@@ -19996,9 +20015,9 @@ var nd = (
|
|
|
19996
20015
|
var a = n.some(function(o) {
|
|
19997
20016
|
return o === B.UPC_A || o === B.UPC_E || o === B.EAN_13 || o === B.EAN_8 || o === B.CODABAR || o === B.CODE_39 || o === B.CODE_93 || o === B.CODE_128 || o === B.ITF || o === B.RSS_14 || o === B.RSS_EXPANDED;
|
|
19998
20017
|
});
|
|
19999
|
-
a && !t && i.push(new
|
|
20018
|
+
a && !t && i.push(new gr(e)), n.includes(B.QR_CODE) && i.push(new ni()), n.includes(B.DATA_MATRIX) && i.push(new ri()), n.includes(B.AZTEC) && i.push(new ei()), n.includes(B.PDF_417) && i.push(new ai()), a && t && i.push(new gr(e));
|
|
20000
20019
|
}
|
|
20001
|
-
i.length === 0 && (t || i.push(new
|
|
20020
|
+
i.length === 0 && (t || i.push(new gr(e)), i.push(new ni()), i.push(new ri()), i.push(new ei()), i.push(new ai()), t && i.push(new gr(e))), this.readers = i;
|
|
20002
20021
|
}, r.prototype.reset = function() {
|
|
20003
20022
|
var e, t;
|
|
20004
20023
|
if (this.readers !== null)
|
|
@@ -20068,7 +20087,7 @@ var nd = (
|
|
|
20068
20087
|
return e.prototype.decodeBitmap = function(t) {
|
|
20069
20088
|
return this.reader.decodeWithState(t);
|
|
20070
20089
|
}, e;
|
|
20071
|
-
})(
|
|
20090
|
+
})(lr);
|
|
20072
20091
|
var cd = /* @__PURE__ */ function() {
|
|
20073
20092
|
var r = function(e, t) {
|
|
20074
20093
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -20091,7 +20110,7 @@ var cd = /* @__PURE__ */ function() {
|
|
|
20091
20110
|
return t === void 0 && (t = 500), r.call(this, new ai(), t) || this;
|
|
20092
20111
|
}
|
|
20093
20112
|
return e;
|
|
20094
|
-
})(
|
|
20113
|
+
})(lr);
|
|
20095
20114
|
var ud = /* @__PURE__ */ function() {
|
|
20096
20115
|
var r = function(e, t) {
|
|
20097
20116
|
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
@@ -20114,12 +20133,12 @@ var ud = /* @__PURE__ */ function() {
|
|
|
20114
20133
|
return t === void 0 && (t = 500), r.call(this, new ni(), t) || this;
|
|
20115
20134
|
}
|
|
20116
20135
|
return e;
|
|
20117
|
-
})(
|
|
20136
|
+
})(lr);
|
|
20118
20137
|
var oi;
|
|
20119
20138
|
(function(r) {
|
|
20120
20139
|
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";
|
|
20121
20140
|
})(oi || (oi = {}));
|
|
20122
|
-
const
|
|
20141
|
+
const $r = oi;
|
|
20123
20142
|
var Fo = (
|
|
20124
20143
|
/** @class */
|
|
20125
20144
|
function() {
|
|
@@ -20149,7 +20168,7 @@ var Fo = (
|
|
|
20149
20168
|
de.arraycopy(l, 0, e, n + c, l.length);
|
|
20150
20169
|
}, r;
|
|
20151
20170
|
}()
|
|
20152
|
-
),
|
|
20171
|
+
), yr = (
|
|
20153
20172
|
/** @class */
|
|
20154
20173
|
function() {
|
|
20155
20174
|
function r() {
|
|
@@ -20419,7 +20438,7 @@ var Fo = (
|
|
|
20419
20438
|
var c = o - l;
|
|
20420
20439
|
if (r.isEmpty(n.get(c, s))) {
|
|
20421
20440
|
var u = void 0;
|
|
20422
|
-
i < e.getSize() ? (u = e.get(i), ++i) : u = !1, t !== 255 &&
|
|
20441
|
+
i < e.getSize() ? (u = e.get(i), ++i) : u = !1, t !== 255 && yr.getDataMaskBit(t, c, s) && (u = !u), n.setBoolean(c, s, u);
|
|
20423
20442
|
}
|
|
20424
20443
|
}
|
|
20425
20444
|
s += a;
|
|
@@ -20599,11 +20618,11 @@ var Fo = (
|
|
|
20599
20618
|
function r() {
|
|
20600
20619
|
}
|
|
20601
20620
|
return r.calculateMaskPenalty = function(e) {
|
|
20602
|
-
return
|
|
20621
|
+
return yr.applyMaskPenaltyRule1(e) + yr.applyMaskPenaltyRule2(e) + yr.applyMaskPenaltyRule3(e) + yr.applyMaskPenaltyRule4(e);
|
|
20603
20622
|
}, r.encode = function(e, t, n) {
|
|
20604
20623
|
n === void 0 && (n = null);
|
|
20605
|
-
var i = r.DEFAULT_BYTE_MODE_ENCODING, a = n !== null && n.get(
|
|
20606
|
-
a && (i = n.get(
|
|
20624
|
+
var i = r.DEFAULT_BYTE_MODE_ENCODING, a = n !== null && n.get($r.CHARACTER_SET) !== void 0;
|
|
20625
|
+
a && (i = n.get($r.CHARACTER_SET).toString());
|
|
20607
20626
|
var o = this.chooseMode(e, i), s = new Te();
|
|
20608
20627
|
if (o === ve.BYTE && (a || r.DEFAULT_BYTE_MODE_ENCODING !== i)) {
|
|
20609
20628
|
var l = _e.getCharacterSetECIByName(i);
|
|
@@ -20613,8 +20632,8 @@ var Fo = (
|
|
|
20613
20632
|
var c = new Te();
|
|
20614
20633
|
this.appendBytes(e, o, c, i);
|
|
20615
20634
|
var u;
|
|
20616
|
-
if (n !== null && n.get(
|
|
20617
|
-
var f = Number.parseInt(n.get(
|
|
20635
|
+
if (n !== null && n.get($r.QR_VERSION) !== void 0) {
|
|
20636
|
+
var f = Number.parseInt(n.get($r.QR_VERSION).toString(), 10);
|
|
20618
20637
|
u = Mt.getVersionForNumber(f);
|
|
20619
20638
|
var h = this.calculateBitsNeeded(o, s, c, u);
|
|
20620
20639
|
if (!this.willFit(h, u, t))
|
|
@@ -22205,7 +22224,7 @@ var qd = (
|
|
|
22205
22224
|
function Kd(r, e, t) {
|
|
22206
22225
|
return new Zd(r, e, t);
|
|
22207
22226
|
}
|
|
22208
|
-
function
|
|
22227
|
+
function pr(r, e, t) {
|
|
22209
22228
|
return new Si(r, e, t);
|
|
22210
22229
|
}
|
|
22211
22230
|
var Qd = [
|
|
@@ -22309,18 +22328,18 @@ var ko = t1(Ee.createInt32Array(6, 6)), r1 = function(r) {
|
|
|
22309
22328
|
var n = this.bitCount, i = this.token;
|
|
22310
22329
|
if (e !== this.mode) {
|
|
22311
22330
|
var a = Wn[this.mode][e];
|
|
22312
|
-
i =
|
|
22331
|
+
i = pr(i, a & 65535, a >> 16), n += a >> 16;
|
|
22313
22332
|
}
|
|
22314
22333
|
var o = e === nt ? 4 : 5;
|
|
22315
|
-
return i =
|
|
22334
|
+
return i = pr(i, t, o), new r(i, e, 0, n + o);
|
|
22316
22335
|
}, r.prototype.shiftAndAppend = function(e, t) {
|
|
22317
22336
|
var n = this.token, i = this.mode === nt ? 4 : 5;
|
|
22318
|
-
return n =
|
|
22337
|
+
return n = pr(n, ko[this.mode][e], i), n = pr(n, t, 5), new r(n, this.mode, 0, this.bitCount + i + 5);
|
|
22319
22338
|
}, r.prototype.addBinaryShiftChar = function(e) {
|
|
22320
22339
|
var t = this.token, n = this.mode, i = this.bitCount;
|
|
22321
22340
|
if (this.mode === vt || this.mode === nt) {
|
|
22322
22341
|
var a = Wn[n][St];
|
|
22323
|
-
t =
|
|
22342
|
+
t = pr(t, a & 65535, a >> 16), i += a >> 16, n = St;
|
|
22324
22343
|
}
|
|
22325
22344
|
var o = this.binaryShiftByteCount === 0 || this.binaryShiftByteCount === 31 ? 18 : this.binaryShiftByteCount === 62 ? 9 : 8, s = new r(t, n, this.binaryShiftByteCount + 1, i + o);
|
|
22326
22345
|
return s.binaryShiftByteCount === 2078 && (s = s.endBinaryShift(e + 1)), s;
|
|
@@ -22438,7 +22457,7 @@ function i1(r) {
|
|
|
22438
22457
|
Q.getCharCode(d[h]) > 0 && (r[vt][Q.getCharCode(d[h])] = h);
|
|
22439
22458
|
return r;
|
|
22440
22459
|
}
|
|
22441
|
-
var qn = i1(Ee.createInt32Array(5, 256)),
|
|
22460
|
+
var qn = i1(Ee.createInt32Array(5, 256)), jr = function(r) {
|
|
22442
22461
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
22443
22462
|
if (t) return t.call(r);
|
|
22444
22463
|
if (r && typeof r.length == "number") return {
|
|
@@ -22482,7 +22501,7 @@ var qn = i1(Ee.createInt32Array(5, 256)), Yr = function(r) {
|
|
|
22482
22501
|
}, r.prototype.updateStateListForChar = function(e, t) {
|
|
22483
22502
|
var n, i, a = [];
|
|
22484
22503
|
try {
|
|
22485
|
-
for (var o =
|
|
22504
|
+
for (var o = jr(e), s = o.next(); !s.done; s = o.next()) {
|
|
22486
22505
|
var l = s.value;
|
|
22487
22506
|
this.updateStateForChar(l, t, a);
|
|
22488
22507
|
}
|
|
@@ -22517,7 +22536,7 @@ var qn = i1(Ee.createInt32Array(5, 256)), Yr = function(r) {
|
|
|
22517
22536
|
}, r.updateStateListForPair = function(e, t, n) {
|
|
22518
22537
|
var i, a, o = [];
|
|
22519
22538
|
try {
|
|
22520
|
-
for (var s =
|
|
22539
|
+
for (var s = jr(e), l = s.next(); !l.done; l = s.next()) {
|
|
22521
22540
|
var c = l.value;
|
|
22522
22541
|
this.updateStateForPair(c, t, n, o);
|
|
22523
22542
|
}
|
|
@@ -22544,7 +22563,7 @@ var qn = i1(Ee.createInt32Array(5, 256)), Yr = function(r) {
|
|
|
22544
22563
|
}, r.simplifyStates = function(e) {
|
|
22545
22564
|
var t, n, i, a, o = [];
|
|
22546
22565
|
try {
|
|
22547
|
-
for (var s =
|
|
22566
|
+
for (var s = jr(e), l = s.next(); !l.done; l = s.next()) {
|
|
22548
22567
|
var c = l.value, u = !0, f = function(x) {
|
|
22549
22568
|
if (x.isBetterThanOrEqualTo(c))
|
|
22550
22569
|
return u = !1, "break";
|
|
@@ -22553,7 +22572,7 @@ var qn = i1(Ee.createInt32Array(5, 256)), Yr = function(r) {
|
|
|
22553
22572
|
}));
|
|
22554
22573
|
};
|
|
22555
22574
|
try {
|
|
22556
|
-
for (var h = (i = void 0,
|
|
22575
|
+
for (var h = (i = void 0, jr(o)), d = h.next(); !d.done; d = h.next()) {
|
|
22557
22576
|
var v = d.value, g = f(v);
|
|
22558
22577
|
if (g === "break")
|
|
22559
22578
|
break;
|
|
@@ -23039,7 +23058,7 @@ const tr = class tr extends vo {
|
|
|
23039
23058
|
}
|
|
23040
23059
|
};
|
|
23041
23060
|
b(tr, "fieldTypeName", "Short Text"), b(tr, "fieldTypeDescription", `Short text fields can hold up to ${$n} characters on a single line.`);
|
|
23042
|
-
let
|
|
23061
|
+
let Rr = tr;
|
|
23043
23062
|
const Go = G((r) => {
|
|
23044
23063
|
const [
|
|
23045
23064
|
{ inputId: e, labelId: t, size: n, severity: i, showInputOnly: a, field: o, helpText: s, label: l, fieldProps: c, touched: u, helpers: f },
|
|
@@ -23089,7 +23108,7 @@ const Go = G((r) => {
|
|
|
23089
23108
|
Go.displayName = "TextInput";
|
|
23090
23109
|
const rr = class rr extends vo {
|
|
23091
23110
|
constructor(t) {
|
|
23092
|
-
const n = t.maxLength ? Math.min(
|
|
23111
|
+
const n = t.maxLength ? Math.min(mr, t.maxLength) : mr, i = t.minLength ? Math.min(t.minLength, n) : void 0;
|
|
23093
23112
|
super({ ...t, maxLength: n, minLength: i });
|
|
23094
23113
|
b(this, "type", "text");
|
|
23095
23114
|
}
|
|
@@ -23121,11 +23140,11 @@ const rr = class rr extends vo {
|
|
|
23121
23140
|
return /* @__PURE__ */ p(Go, { field: this, ...t });
|
|
23122
23141
|
}
|
|
23123
23142
|
};
|
|
23124
|
-
b(rr, "fieldTypeName", "Paragraph"), b(rr, "fieldTypeDescription", `Paragraph fields can hold up to ${
|
|
23125
|
-
let
|
|
23143
|
+
b(rr, "fieldTypeName", "Paragraph"), b(rr, "fieldTypeDescription", `Paragraph fields can hold up to ${mr} characters and can have multiple lines.`);
|
|
23144
|
+
let Mr = rr;
|
|
23126
23145
|
const Xo = G((r) => {
|
|
23127
23146
|
var R;
|
|
23128
|
-
const [{ inputId: e, labelId: t, label: n, size: i, severity: a, helpText: o, showInputOnly: s, field: l, fieldProps: c }, { disabled: u }] = je(r), { value: f, name: h, onChange: d, onBlur: v } = c, g =
|
|
23147
|
+
const [{ inputId: e, labelId: t, label: n, size: i, severity: a, helpText: o, showInputOnly: s, field: l, fieldProps: c }, { disabled: u }] = je(r), { value: f, name: h, onChange: d, onBlur: v } = c, g = Br(null), x = ie(() => s ? null : o || (l.maxFileSize ? `Maximum file size: ${l.maxFileSize}MB` : null), [l.maxFileSize, o, s]), m = T(() => {
|
|
23129
23148
|
var V;
|
|
23130
23149
|
(V = g.current) == null || V.click();
|
|
23131
23150
|
}, []), w = T(() => {
|
|
@@ -23247,11 +23266,11 @@ const nr = class nr extends Je {
|
|
|
23247
23266
|
{
|
|
23248
23267
|
field: new pt({
|
|
23249
23268
|
label: "What is the maximum size of each file?",
|
|
23250
|
-
description: `Maximum file size in megabytes (between 1MB–${
|
|
23269
|
+
description: `Maximum file size in megabytes (between 1MB–${wr}MB).`,
|
|
23251
23270
|
required: !1,
|
|
23252
23271
|
identifier: `${n}maximum_size`,
|
|
23253
23272
|
minimum: 1,
|
|
23254
|
-
maximum:
|
|
23273
|
+
maximum: wr,
|
|
23255
23274
|
integers: !0
|
|
23256
23275
|
}),
|
|
23257
23276
|
showDirectly: !1
|
|
@@ -23290,7 +23309,7 @@ const nr = class nr extends Je {
|
|
|
23290
23309
|
];
|
|
23291
23310
|
}
|
|
23292
23311
|
getFieldValidators() {
|
|
23293
|
-
const t = super.getFieldValidators(), n = this.maxFileSize ??
|
|
23312
|
+
const t = super.getFieldValidators(), n = this.maxFileSize ?? wr, i = n * 1e3 * 1e3, a = this.maxFiles || 1;
|
|
23294
23313
|
return t.push((o) => {
|
|
23295
23314
|
if (o && o.some((s) => s instanceof Ft && s.size > i))
|
|
23296
23315
|
return `Files must be at most ${n}MB.`;
|
|
@@ -23341,7 +23360,7 @@ const nr = class nr extends Je {
|
|
|
23341
23360
|
return Array.isArray(t) && t.length === 0;
|
|
23342
23361
|
}
|
|
23343
23362
|
isValueValid(t) {
|
|
23344
|
-
return Array.isArray(t) ? t.every((n) => n instanceof
|
|
23363
|
+
return Array.isArray(t) ? t.every((n) => n instanceof zr || n instanceof Ft) : !1;
|
|
23345
23364
|
}
|
|
23346
23365
|
areValuesEqual(t, n) {
|
|
23347
23366
|
return gi(t, n);
|
|
@@ -23357,23 +23376,23 @@ const nr = class nr extends Je {
|
|
|
23357
23376
|
}
|
|
23358
23377
|
};
|
|
23359
23378
|
b(nr, "fieldTypeName", "Upload"), b(nr, "fieldTypeDescription", "Allows a file to be uploaded.");
|
|
23360
|
-
let
|
|
23379
|
+
let Vr = nr;
|
|
23361
23380
|
const bi = {
|
|
23362
23381
|
date: nn,
|
|
23363
23382
|
number: pt,
|
|
23364
|
-
boolean:
|
|
23365
|
-
select:
|
|
23366
|
-
string:
|
|
23367
|
-
text:
|
|
23368
|
-
upload:
|
|
23383
|
+
boolean: Sr,
|
|
23384
|
+
select: or,
|
|
23385
|
+
string: Rr,
|
|
23386
|
+
text: Mr,
|
|
23387
|
+
upload: Vr,
|
|
23369
23388
|
qr: sn,
|
|
23370
|
-
"multi-string":
|
|
23389
|
+
"multi-string": Er,
|
|
23371
23390
|
"multi-select": Pt,
|
|
23372
|
-
radio:
|
|
23373
|
-
"checkbox-list":
|
|
23374
|
-
"pass-fail":
|
|
23375
|
-
otp:
|
|
23376
|
-
rating:
|
|
23391
|
+
radio: Tr,
|
|
23392
|
+
"checkbox-list": Ir,
|
|
23393
|
+
"pass-fail": Nr,
|
|
23394
|
+
otp: br,
|
|
23395
|
+
rating: Dr
|
|
23377
23396
|
}, me = {
|
|
23378
23397
|
boolean: nc,
|
|
23379
23398
|
date: nl,
|
|
@@ -23391,7 +23410,7 @@ const bi = {
|
|
|
23391
23410
|
"pass-fail": xl,
|
|
23392
23411
|
otp: Kl,
|
|
23393
23412
|
rating: oo
|
|
23394
|
-
},
|
|
23413
|
+
}, wr = 50, c1 = wr * 1e3, u1 = c1 * 1e3, Ue = "Unlabelled", Wo = "Unlabelled";
|
|
23395
23414
|
class K {
|
|
23396
23415
|
constructor(e) {
|
|
23397
23416
|
b(this, "id");
|
|
@@ -23562,13 +23581,13 @@ const f1 = K.create({
|
|
|
23562
23581
|
label: "is none of",
|
|
23563
23582
|
serialize: (r) => r,
|
|
23564
23583
|
deserialize: (r) => r
|
|
23565
|
-
}),
|
|
23584
|
+
}), cr = K.create({
|
|
23566
23585
|
id: "nullable-string-equals",
|
|
23567
23586
|
getApplyFn: (r) => (e) => e === r,
|
|
23568
23587
|
label: "is",
|
|
23569
23588
|
serialize: (r) => r,
|
|
23570
23589
|
deserialize: (r) => r
|
|
23571
|
-
}),
|
|
23590
|
+
}), ur = K.create({
|
|
23572
23591
|
id: "nullable-string-not-equals",
|
|
23573
23592
|
getApplyFn: (r) => (e) => e !== r,
|
|
23574
23593
|
label: "is not",
|
|
@@ -23736,10 +23755,10 @@ const rs = G, Bt = rs(function(r) {
|
|
|
23736
23755
|
const { ref: e, children: t, ...n } = r, i = T(
|
|
23737
23756
|
(a) => typeof t == "function" ? /* @__PURE__ */ _(ft, { children: [
|
|
23738
23757
|
t(a),
|
|
23739
|
-
/* @__PURE__ */ p(M.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(D, { icon:
|
|
23758
|
+
/* @__PURE__ */ p(M.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(D, { icon: en }) : /* @__PURE__ */ p(D, { icon: tt }) })
|
|
23740
23759
|
] }) : /* @__PURE__ */ _(ft, { children: [
|
|
23741
23760
|
t,
|
|
23742
|
-
/* @__PURE__ */ p(M.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(D, { icon:
|
|
23761
|
+
/* @__PURE__ */ p(M.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(D, { icon: en }) : /* @__PURE__ */ p(D, { icon: tt }) })
|
|
23743
23762
|
] }),
|
|
23744
23763
|
[t]
|
|
23745
23764
|
);
|
|
@@ -23757,14 +23776,14 @@ const Ze = (r) => {
|
|
|
23757
23776
|
/* @__PURE__ */ p(M.ClickTrigger, { children: e }),
|
|
23758
23777
|
/* @__PURE__ */ p(M.Content, { size: n, variant: i, radius: o, accentColor: a, children: /* @__PURE__ */ p(M.SelectGroup, { required: !0, value: t.getConditionModifier(), onValueChange: s, children: t.getConditionModifiers().map(([l, c]) => /* @__PURE__ */ p(Bt, { value: l, children: c.modifier.label }, l)) }) })
|
|
23759
23778
|
] });
|
|
23760
|
-
},
|
|
23779
|
+
}, Qr = G((r) => {
|
|
23761
23780
|
const { children: e, open: t, onOpenChange: n, defaultOpen: i, modal: a, size: o, align: s, accentColor: l = "base", ...c } = r;
|
|
23762
23781
|
return /* @__PURE__ */ _(De.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
23763
23782
|
/* @__PURE__ */ p(De.Trigger, { asChild: !0, children: e }),
|
|
23764
23783
|
/* @__PURE__ */ p(De.Content, { size: o, align: s, children: /* @__PURE__ */ p(Xa, { size: o, accentColor: l, ...c }) })
|
|
23765
23784
|
] });
|
|
23766
23785
|
});
|
|
23767
|
-
|
|
23786
|
+
Qr.displayName = "DayPickerPopover";
|
|
23768
23787
|
const is = G((r) => {
|
|
23769
23788
|
const {
|
|
23770
23789
|
children: e,
|
|
@@ -23899,7 +23918,7 @@ const He = (r) => {
|
|
|
23899
23918
|
return /* @__PURE__ */ p(ne, { onClick: i, ...n, children: /* @__PURE__ */ p(D, { icon: bt }) });
|
|
23900
23919
|
};
|
|
23901
23920
|
He.displayName = "RemoveConditionButton";
|
|
23902
|
-
const
|
|
23921
|
+
const Hr = G((r) => {
|
|
23903
23922
|
const { ref: e, selectFieldOptions: t, ...n } = r, i = ie(() => t.map(
|
|
23904
23923
|
(a) => typeof a == "string" ? {
|
|
23905
23924
|
value: a,
|
|
@@ -23911,7 +23930,7 @@ const Gr = G((r) => {
|
|
|
23911
23930
|
i.map((a) => /* @__PURE__ */ p(ns, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value))
|
|
23912
23931
|
] });
|
|
23913
23932
|
});
|
|
23914
|
-
|
|
23933
|
+
Hr.displayName = "SelectFieldOptionMultiSelectGroup";
|
|
23915
23934
|
const Vi = G((r) => {
|
|
23916
23935
|
const { ref: e, selectFieldOptions: t, ...n } = r, i = ie(() => t.map(
|
|
23917
23936
|
(a) => typeof a == "string" ? {
|
|
@@ -23922,7 +23941,7 @@ const Vi = G((r) => {
|
|
|
23922
23941
|
return /* @__PURE__ */ p(M.SelectGroup, { ref: e, ...n, children: i.map((a) => /* @__PURE__ */ p(Bt, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value)) });
|
|
23923
23942
|
});
|
|
23924
23943
|
Vi.displayName = "SelectFieldOptionSelectGroup";
|
|
23925
|
-
const
|
|
23944
|
+
const Gr = G((r) => {
|
|
23926
23945
|
const {
|
|
23927
23946
|
children: e,
|
|
23928
23947
|
open: t,
|
|
@@ -23960,7 +23979,7 @@ const Xr = G((r) => {
|
|
|
23960
23979
|
) }) })
|
|
23961
23980
|
] });
|
|
23962
23981
|
});
|
|
23963
|
-
|
|
23982
|
+
Gr.displayName = "TextInputPopover";
|
|
23964
23983
|
const S1 = (r) => {
|
|
23965
23984
|
const { condition: e, onRemove: t } = r, n = e.getConditionValue(), i = e.getConditionModifier(), a = () => {
|
|
23966
23985
|
switch (n) {
|
|
@@ -24050,7 +24069,7 @@ const I1 = (r) => {
|
|
|
24050
24069
|
/* @__PURE__ */ _(M.Root, { children: [
|
|
24051
24070
|
/* @__PURE__ */ p(M.ClickTrigger, { children: /* @__PURE__ */ p(z, { type: "button", className: "truncate", children: s() }) }),
|
|
24052
24071
|
/* @__PURE__ */ p(M.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
24053
|
-
|
|
24072
|
+
Hr,
|
|
24054
24073
|
{
|
|
24055
24074
|
values: i ?? [],
|
|
24056
24075
|
selectFieldOptions: e.field.options,
|
|
@@ -24149,7 +24168,7 @@ const C0 = (r, e) => ie(() => {
|
|
|
24149
24168
|
case "notEquals": {
|
|
24150
24169
|
const l = e.modifiers.equals, c = n !== void 0 && l.isConditionValueValid(n) ? n : void 0;
|
|
24151
24170
|
return /* @__PURE__ */ p(
|
|
24152
|
-
|
|
24171
|
+
Qr,
|
|
24153
24172
|
{
|
|
24154
24173
|
required: !1,
|
|
24155
24174
|
size: "sm",
|
|
@@ -24164,7 +24183,7 @@ const C0 = (r, e) => ie(() => {
|
|
|
24164
24183
|
case "after": {
|
|
24165
24184
|
const l = e.modifiers.after, c = n !== void 0 && l.isConditionValueValid(n) ? n : void 0;
|
|
24166
24185
|
return /* @__PURE__ */ p(
|
|
24167
|
-
|
|
24186
|
+
Qr,
|
|
24168
24187
|
{
|
|
24169
24188
|
required: !0,
|
|
24170
24189
|
size: "sm",
|
|
@@ -24179,7 +24198,7 @@ const C0 = (r, e) => ie(() => {
|
|
|
24179
24198
|
case "notIn": {
|
|
24180
24199
|
const l = e.modifiers.in, c = n !== void 0 && l.isConditionValueValid(n) ? n : void 0;
|
|
24181
24200
|
return /* @__PURE__ */ p(
|
|
24182
|
-
|
|
24201
|
+
Qr,
|
|
24183
24202
|
{
|
|
24184
24203
|
required: !0,
|
|
24185
24204
|
mode: "range",
|
|
@@ -24280,7 +24299,7 @@ const O1 = (r) => {
|
|
|
24280
24299
|
/* @__PURE__ */ _(M.Root, { children: [
|
|
24281
24300
|
/* @__PURE__ */ p(M.ClickTrigger, { children: /* @__PURE__ */ p(z, { type: "button", className: "truncate", children: s() }) }),
|
|
24282
24301
|
/* @__PURE__ */ p(M.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
24283
|
-
|
|
24302
|
+
Hr,
|
|
24284
24303
|
{
|
|
24285
24304
|
values: i ?? [],
|
|
24286
24305
|
selectFieldOptions: n.options,
|
|
@@ -24545,7 +24564,7 @@ const D1 = (r) => {
|
|
|
24545
24564
|
case "includes":
|
|
24546
24565
|
case "excludes":
|
|
24547
24566
|
return /* @__PURE__ */ p(
|
|
24548
|
-
|
|
24567
|
+
Gr,
|
|
24549
24568
|
{
|
|
24550
24569
|
value: i ?? "",
|
|
24551
24570
|
onValueChange: e.setConditionValue,
|
|
@@ -24566,13 +24585,13 @@ const D1 = (r) => {
|
|
|
24566
24585
|
] });
|
|
24567
24586
|
}, Va = {
|
|
24568
24587
|
equals: L({
|
|
24569
|
-
modifier:
|
|
24588
|
+
modifier: cr,
|
|
24570
24589
|
isValueValid: (r) => !0,
|
|
24571
24590
|
isConditionValueValid: (r) => !0,
|
|
24572
24591
|
isSerializedValueValid: (r) => !0
|
|
24573
24592
|
}),
|
|
24574
24593
|
notEquals: L({
|
|
24575
|
-
modifier:
|
|
24594
|
+
modifier: ur,
|
|
24576
24595
|
isValueValid: (r) => !0,
|
|
24577
24596
|
isConditionValueValid: (r) => !0,
|
|
24578
24597
|
isSerializedValueValid: (r) => !0
|
|
@@ -24617,7 +24636,7 @@ const R1 = (r) => {
|
|
|
24617
24636
|
required: !1,
|
|
24618
24637
|
value: l,
|
|
24619
24638
|
onValueChange: e.setConditionValue,
|
|
24620
|
-
children:
|
|
24639
|
+
children: Or.map((c) => {
|
|
24621
24640
|
const { label: u } = ar[c];
|
|
24622
24641
|
return /* @__PURE__ */ p(Bt, { value: c, children: /* @__PURE__ */ p("span", { className: "truncate", children: u }) }, c);
|
|
24623
24642
|
})
|
|
@@ -24637,7 +24656,7 @@ const R1 = (r) => {
|
|
|
24637
24656
|
onValuesChange: e.setConditionValue,
|
|
24638
24657
|
children: [
|
|
24639
24658
|
/* @__PURE__ */ p(Mi, { children: "Select all" }),
|
|
24640
|
-
|
|
24659
|
+
Or.map((c) => {
|
|
24641
24660
|
const { label: u, icon: f } = ar[c];
|
|
24642
24661
|
return /* @__PURE__ */ _(ns, { value: c, children: [
|
|
24643
24662
|
/* @__PURE__ */ p(D, { icon: f }),
|
|
@@ -24740,7 +24759,7 @@ const M1 = (r) => {
|
|
|
24740
24759
|
return /* @__PURE__ */ _(M.Root, { children: [
|
|
24741
24760
|
/* @__PURE__ */ p(M.ClickTrigger, { children: /* @__PURE__ */ p(z, { type: "button", children: u ? `${u.length} options` : "..." }) }),
|
|
24742
24761
|
/* @__PURE__ */ p(M.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
24743
|
-
|
|
24762
|
+
Hr,
|
|
24744
24763
|
{
|
|
24745
24764
|
selectFieldOptions: n.options,
|
|
24746
24765
|
values: u ?? Fi,
|
|
@@ -24762,13 +24781,13 @@ const M1 = (r) => {
|
|
|
24762
24781
|
] });
|
|
24763
24782
|
}, Fa = {
|
|
24764
24783
|
equals: L({
|
|
24765
|
-
modifier:
|
|
24784
|
+
modifier: cr,
|
|
24766
24785
|
isValueValid: (r) => typeof r == "string",
|
|
24767
24786
|
isConditionValueValid: (r) => !Array.isArray(r),
|
|
24768
24787
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
24769
24788
|
}),
|
|
24770
24789
|
notEquals: L({
|
|
24771
|
-
modifier:
|
|
24790
|
+
modifier: ur,
|
|
24772
24791
|
isValueValid: (r) => typeof r == "string",
|
|
24773
24792
|
isConditionValueValid: (r) => !Array.isArray(r),
|
|
24774
24793
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
@@ -24941,7 +24960,7 @@ const P1 = (r) => {
|
|
|
24941
24960
|
case "includes":
|
|
24942
24961
|
case "excludes":
|
|
24943
24962
|
return /* @__PURE__ */ p(
|
|
24944
|
-
|
|
24963
|
+
Gr,
|
|
24945
24964
|
{
|
|
24946
24965
|
value: i ?? "",
|
|
24947
24966
|
onValueChange: e.setConditionValue,
|
|
@@ -24962,13 +24981,13 @@ const P1 = (r) => {
|
|
|
24962
24981
|
] });
|
|
24963
24982
|
}, La = {
|
|
24964
24983
|
equals: L({
|
|
24965
|
-
modifier:
|
|
24984
|
+
modifier: cr,
|
|
24966
24985
|
isValueValid: (r) => !0,
|
|
24967
24986
|
isConditionValueValid: (r) => !0,
|
|
24968
24987
|
isSerializedValueValid: (r) => !0
|
|
24969
24988
|
}),
|
|
24970
24989
|
notEquals: L({
|
|
24971
|
-
modifier:
|
|
24990
|
+
modifier: ur,
|
|
24972
24991
|
isValueValid: (r) => !0,
|
|
24973
24992
|
isConditionValueValid: (r) => !0,
|
|
24974
24993
|
isSerializedValueValid: (r) => !0
|
|
@@ -25039,7 +25058,7 @@ const F1 = (r) => {
|
|
|
25039
25058
|
return /* @__PURE__ */ _(M.Root, { children: [
|
|
25040
25059
|
/* @__PURE__ */ p(M.ClickTrigger, { children: /* @__PURE__ */ p(z, { type: "button", children: f ? `${f.length} options` : "..." }) }),
|
|
25041
25060
|
/* @__PURE__ */ p(M.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25042
|
-
|
|
25061
|
+
Hr,
|
|
25043
25062
|
{
|
|
25044
25063
|
selectFieldOptions: n.options,
|
|
25045
25064
|
values: f ?? [],
|
|
@@ -25061,13 +25080,13 @@ const F1 = (r) => {
|
|
|
25061
25080
|
] });
|
|
25062
25081
|
}, ka = {
|
|
25063
25082
|
equals: L({
|
|
25064
|
-
modifier:
|
|
25083
|
+
modifier: cr,
|
|
25065
25084
|
isValueValid: (r) => typeof r == "string",
|
|
25066
25085
|
isConditionValueValid: (r) => !Array.isArray(r),
|
|
25067
25086
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
25068
25087
|
}),
|
|
25069
25088
|
notEquals: L({
|
|
25070
|
-
modifier:
|
|
25089
|
+
modifier: ur,
|
|
25071
25090
|
isValueValid: (r) => typeof r == "string",
|
|
25072
25091
|
isConditionValueValid: (r) => !Array.isArray(r),
|
|
25073
25092
|
isSerializedValueValid: (r) => !Array.isArray(r)
|
|
@@ -25109,7 +25128,7 @@ const B1 = (r) => {
|
|
|
25109
25128
|
case "includes":
|
|
25110
25129
|
case "excludes":
|
|
25111
25130
|
return /* @__PURE__ */ p(
|
|
25112
|
-
|
|
25131
|
+
Gr,
|
|
25113
25132
|
{
|
|
25114
25133
|
value: i ?? "",
|
|
25115
25134
|
onValueChange: e.setConditionValue,
|
|
@@ -25130,13 +25149,13 @@ const B1 = (r) => {
|
|
|
25130
25149
|
] });
|
|
25131
25150
|
}, za = {
|
|
25132
25151
|
equals: L({
|
|
25133
|
-
modifier:
|
|
25152
|
+
modifier: cr,
|
|
25134
25153
|
isValueValid: (r) => !0,
|
|
25135
25154
|
isConditionValueValid: (r) => !0,
|
|
25136
25155
|
isSerializedValueValid: (r) => !0
|
|
25137
25156
|
}),
|
|
25138
25157
|
notEquals: L({
|
|
25139
|
-
modifier:
|
|
25158
|
+
modifier: ur,
|
|
25140
25159
|
isValueValid: (r) => !0,
|
|
25141
25160
|
isConditionValueValid: (r) => !0,
|
|
25142
25161
|
isSerializedValueValid: (r) => !0
|
|
@@ -25175,7 +25194,7 @@ const L1 = (r) => {
|
|
|
25175
25194
|
case "includes":
|
|
25176
25195
|
case "excludes":
|
|
25177
25196
|
return /* @__PURE__ */ p(
|
|
25178
|
-
|
|
25197
|
+
Gr,
|
|
25179
25198
|
{
|
|
25180
25199
|
value: i ?? "",
|
|
25181
25200
|
onValueChange: e.setConditionValue,
|
|
@@ -25196,13 +25215,13 @@ const L1 = (r) => {
|
|
|
25196
25215
|
] });
|
|
25197
25216
|
}, Ua = {
|
|
25198
25217
|
equals: L({
|
|
25199
|
-
modifier:
|
|
25218
|
+
modifier: cr,
|
|
25200
25219
|
isValueValid: (r) => !0,
|
|
25201
25220
|
isConditionValueValid: (r) => !0,
|
|
25202
25221
|
isSerializedValueValid: (r) => !0
|
|
25203
25222
|
}),
|
|
25204
25223
|
notEquals: L({
|
|
25205
|
-
modifier:
|
|
25224
|
+
modifier: ur,
|
|
25206
25225
|
isValueValid: (r) => !0,
|
|
25207
25226
|
isConditionValueValid: (r) => !0,
|
|
25208
25227
|
isSerializedValueValid: (r) => !0
|
|
@@ -25370,7 +25389,7 @@ function Li(r, e) {
|
|
|
25370
25389
|
for (const n of r) {
|
|
25371
25390
|
if (!(n.identifier in e)) continue;
|
|
25372
25391
|
const i = e[n.identifier];
|
|
25373
|
-
n.isValueValid(i) && (t[n.identifier] = i);
|
|
25392
|
+
n.isValueValid(i) && (t[n.identifier] = n.cleanValue(i));
|
|
25374
25393
|
}
|
|
25375
25394
|
return t;
|
|
25376
25395
|
}
|
|
@@ -25379,7 +25398,7 @@ function os(r, e) {
|
|
|
25379
25398
|
for (const n of r) {
|
|
25380
25399
|
if (!(n.identifier in e)) continue;
|
|
25381
25400
|
const i = e[n.identifier];
|
|
25382
|
-
n.isSerializedValueValid(i) && (t[n.identifier] = i);
|
|
25401
|
+
n.isSerializedValueValid(i) && (t[n.identifier] = n.cleanSerializedValue(i));
|
|
25383
25402
|
}
|
|
25384
25403
|
return t;
|
|
25385
25404
|
}
|
|
@@ -25451,8 +25470,8 @@ const ss = (r, e) => {
|
|
|
25451
25470
|
i.areValuesEqual(a, o) && (n[i.identifier] = o);
|
|
25452
25471
|
}
|
|
25453
25472
|
return n;
|
|
25454
|
-
}, ls =
|
|
25455
|
-
const { fieldSection: e, ...t } = r, { label: n, description: i } = e, { values: a } =
|
|
25473
|
+
}, ls = Fr({}), cs = G((r) => {
|
|
25474
|
+
const { fieldSection: e, ...t } = r, { label: n, description: i } = e, { values: a } = Lr(), { fields: o } = dt(ls), s = ie(() => o.filter((f) => f.type === "section"), [o]), l = ie(() => s.filter((f) => e.identifier in f.conditions), [s, e.identifier]), c = ie(() => l.length === 0 ? !0 : l.some((f) => {
|
|
25456
25475
|
const h = f.getConditions(e.identifier);
|
|
25457
25476
|
return new Pi(h).applyConditions(a);
|
|
25458
25477
|
}), [l, e, a]), u = rn(e.fields, t);
|
|
@@ -25462,7 +25481,7 @@ const ss = (r, e) => {
|
|
|
25462
25481
|
/* @__PURE__ */ p(Wa, { size: "md", children: n }),
|
|
25463
25482
|
i && /* @__PURE__ */ p(Pe, { accentColor: "base", children: i })
|
|
25464
25483
|
] }),
|
|
25465
|
-
/* @__PURE__ */ p(
|
|
25484
|
+
/* @__PURE__ */ p(Cr, { size: "full" })
|
|
25466
25485
|
] }),
|
|
25467
25486
|
u
|
|
25468
25487
|
] }) : null;
|
|
@@ -25775,7 +25794,7 @@ class Lt extends un {
|
|
|
25775
25794
|
), a;
|
|
25776
25795
|
}
|
|
25777
25796
|
}
|
|
25778
|
-
const zt =
|
|
25797
|
+
const zt = Fr(new Lt([])), ln = "form-builder", Rn = Fr({}), Y1 = (r = () => null) => ie(() => Object.entries(bi).map(([t, n]) => ({
|
|
25779
25798
|
children: n.fieldTypeName,
|
|
25780
25799
|
icon: /* @__PURE__ */ p(D, { icon: me[t] }),
|
|
25781
25800
|
value: t,
|
|
@@ -25796,9 +25815,9 @@ Mn.displayName = "CreateFieldDropdownMenu";
|
|
|
25796
25815
|
const zi = (r) => {
|
|
25797
25816
|
switch (r) {
|
|
25798
25817
|
case "text":
|
|
25799
|
-
return new
|
|
25818
|
+
return new Mr({ label: "", required: !1, identifier: W() });
|
|
25800
25819
|
case "boolean":
|
|
25801
|
-
return new
|
|
25820
|
+
return new Sr({
|
|
25802
25821
|
label: "",
|
|
25803
25822
|
required: !1,
|
|
25804
25823
|
identifier: W()
|
|
@@ -25816,20 +25835,20 @@ const zi = (r) => {
|
|
|
25816
25835
|
identifier: W()
|
|
25817
25836
|
});
|
|
25818
25837
|
case "string":
|
|
25819
|
-
return new
|
|
25838
|
+
return new Rr({
|
|
25820
25839
|
label: "",
|
|
25821
25840
|
required: !1,
|
|
25822
25841
|
identifier: W()
|
|
25823
25842
|
});
|
|
25824
25843
|
case "select":
|
|
25825
|
-
return new
|
|
25844
|
+
return new or({
|
|
25826
25845
|
label: "",
|
|
25827
25846
|
options: [],
|
|
25828
25847
|
required: !1,
|
|
25829
25848
|
identifier: W()
|
|
25830
25849
|
});
|
|
25831
25850
|
case "multi-string":
|
|
25832
|
-
return new
|
|
25851
|
+
return new Er({
|
|
25833
25852
|
label: "",
|
|
25834
25853
|
required: !1,
|
|
25835
25854
|
identifier: W()
|
|
@@ -25842,12 +25861,12 @@ const zi = (r) => {
|
|
|
25842
25861
|
identifier: W()
|
|
25843
25862
|
});
|
|
25844
25863
|
case "upload":
|
|
25845
|
-
return new
|
|
25864
|
+
return new Vr({
|
|
25846
25865
|
label: "",
|
|
25847
25866
|
required: !1,
|
|
25848
25867
|
identifier: W(),
|
|
25849
25868
|
maximum_files: 6,
|
|
25850
|
-
maximum_size:
|
|
25869
|
+
maximum_size: wr
|
|
25851
25870
|
});
|
|
25852
25871
|
case "qr":
|
|
25853
25872
|
return new sn({
|
|
@@ -25856,21 +25875,21 @@ const zi = (r) => {
|
|
|
25856
25875
|
identifier: W()
|
|
25857
25876
|
});
|
|
25858
25877
|
case "radio":
|
|
25859
|
-
return new
|
|
25878
|
+
return new Tr({
|
|
25860
25879
|
label: "",
|
|
25861
25880
|
options: [],
|
|
25862
25881
|
required: !1,
|
|
25863
25882
|
identifier: W()
|
|
25864
25883
|
});
|
|
25865
25884
|
case "checkbox-list":
|
|
25866
|
-
return new
|
|
25885
|
+
return new Ir({
|
|
25867
25886
|
label: "",
|
|
25868
25887
|
options: [],
|
|
25869
25888
|
required: !1,
|
|
25870
25889
|
identifier: W()
|
|
25871
25890
|
});
|
|
25872
25891
|
case "pass-fail":
|
|
25873
|
-
return new
|
|
25892
|
+
return new Nr({
|
|
25874
25893
|
label: "",
|
|
25875
25894
|
required: !1,
|
|
25876
25895
|
identifier: W(),
|
|
@@ -25878,7 +25897,7 @@ const zi = (r) => {
|
|
|
25878
25897
|
// TODO: what defaults
|
|
25879
25898
|
});
|
|
25880
25899
|
case "otp":
|
|
25881
|
-
return new
|
|
25900
|
+
return new br({
|
|
25882
25901
|
label: "",
|
|
25883
25902
|
validationType: "none",
|
|
25884
25903
|
required: !1,
|
|
@@ -25886,7 +25905,7 @@ const zi = (r) => {
|
|
|
25886
25905
|
length: 6
|
|
25887
25906
|
});
|
|
25888
25907
|
case "rating":
|
|
25889
|
-
return new
|
|
25908
|
+
return new Dr({
|
|
25890
25909
|
label: "",
|
|
25891
25910
|
required: !1,
|
|
25892
25911
|
identifier: W(),
|
|
@@ -25999,27 +26018,27 @@ const zi = (r) => {
|
|
|
25999
26018
|
}, fs = (r, e) => {
|
|
26000
26019
|
switch (r) {
|
|
26001
26020
|
case "checkbox-list":
|
|
26002
|
-
return
|
|
26021
|
+
return Ir.getFieldCreationSchema(e);
|
|
26003
26022
|
case "multi-select":
|
|
26004
26023
|
return Pt.getFieldCreationSchema(e);
|
|
26005
26024
|
case "number":
|
|
26006
26025
|
return pt.getFieldCreationSchema(e);
|
|
26007
26026
|
case "radio":
|
|
26008
|
-
return
|
|
26027
|
+
return Tr.getFieldCreationSchema(e);
|
|
26009
26028
|
case "select":
|
|
26010
|
-
return
|
|
26029
|
+
return or.getFieldCreationSchema(e);
|
|
26011
26030
|
case "string":
|
|
26012
|
-
return
|
|
26031
|
+
return Rr.getFieldCreationSchema(e);
|
|
26013
26032
|
case "text":
|
|
26014
|
-
return
|
|
26033
|
+
return Mr.getFieldCreationSchema(e);
|
|
26015
26034
|
case "upload":
|
|
26016
|
-
return
|
|
26035
|
+
return Vr.getFieldCreationSchema(e);
|
|
26017
26036
|
case "pass-fail":
|
|
26018
|
-
return
|
|
26037
|
+
return Nr.getFieldCreationSchema(e);
|
|
26019
26038
|
case "otp":
|
|
26020
|
-
return
|
|
26039
|
+
return br.getFieldCreationSchema(e);
|
|
26021
26040
|
case "rating":
|
|
26022
|
-
return
|
|
26041
|
+
return Dr.getFieldCreationSchema(e);
|
|
26023
26042
|
default:
|
|
26024
26043
|
return;
|
|
26025
26044
|
}
|
|
@@ -26034,7 +26053,7 @@ const zi = (r) => {
|
|
|
26034
26053
|
size: "sm",
|
|
26035
26054
|
"aria-label": "settings",
|
|
26036
26055
|
accentColor: "base",
|
|
26037
|
-
...t && { color:
|
|
26056
|
+
...t && { color: kr.danger },
|
|
26038
26057
|
children: [
|
|
26039
26058
|
/* @__PURE__ */ p(D, { icon: tc }),
|
|
26040
26059
|
"Settings"
|
|
@@ -26047,7 +26066,7 @@ const zi = (r) => {
|
|
|
26047
26066
|
});
|
|
26048
26067
|
ds.displayName = "FieldSettingsPopover";
|
|
26049
26068
|
const hs = G((r) => {
|
|
26050
|
-
const { parentPath: e, fieldIndex: t, field: n } = r, { errors: i } =
|
|
26069
|
+
const { parentPath: e, fieldIndex: t, field: n } = r, { errors: i } = Lr(), a = vi(), { disableRequiredFields: o } = dt(Rn), [s, l] = ye(void 0);
|
|
26051
26070
|
ke(() => {
|
|
26052
26071
|
n.image instanceof Promise ? n.image.then(l).catch(console.error) : l(n.image);
|
|
26053
26072
|
}, [n]);
|
|
@@ -26081,12 +26100,12 @@ const hs = G((r) => {
|
|
|
26081
26100
|
] }),
|
|
26082
26101
|
!o && /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
|
|
26083
26102
|
/* @__PURE__ */ p(
|
|
26084
|
-
|
|
26103
|
+
Jr.Root,
|
|
26085
26104
|
{
|
|
26086
26105
|
checked: n.required,
|
|
26087
26106
|
onCheckedChange: (C) => n.setOptions({ required: !!C }),
|
|
26088
26107
|
size: "sm",
|
|
26089
|
-
children: /* @__PURE__ */ p(
|
|
26108
|
+
children: /* @__PURE__ */ p(Jr.Indicator, { children: /* @__PURE__ */ p(D, { icon: tt }) })
|
|
26090
26109
|
}
|
|
26091
26110
|
),
|
|
26092
26111
|
/* @__PURE__ */ p(Pe, { size: "sm", accentColor: "base", children: "Required" })
|
|
@@ -26146,7 +26165,7 @@ const hs = G((r) => {
|
|
|
26146
26165
|
});
|
|
26147
26166
|
hs.displayName = "FieldBuilder";
|
|
26148
26167
|
const Ui = G((r) => {
|
|
26149
|
-
const { field: e, fieldSection: t, fieldIndex: n, sectionIndex: i } = r, a =
|
|
26168
|
+
const { field: e, fieldSection: t, fieldIndex: n, sectionIndex: i } = r, a = Br(null), o = `fields.${i}.fields`, s = T(
|
|
26150
26169
|
(g) => {
|
|
26151
26170
|
t.addField(zi(g), n + 1);
|
|
26152
26171
|
},
|
|
@@ -26440,7 +26459,7 @@ const Z1 = {
|
|
|
26440
26459
|
}, J1 = {
|
|
26441
26460
|
hideAttribution: !0
|
|
26442
26461
|
}, xs = G(() => {
|
|
26443
|
-
const { handleSubmit: r, errors: e } =
|
|
26462
|
+
const { handleSubmit: r, errors: e } = Lr(), { hideTitle: t, hideDescription: n, onCancel: i } = dt(Rn), a = dt(zt), o = Br(null), [s, l] = ye(), [c, u] = ye("TB");
|
|
26444
26463
|
$a(() => {
|
|
26445
26464
|
o.current && o.current.classList.remove("light");
|
|
26446
26465
|
}, []);
|
|
@@ -26463,7 +26482,7 @@ const Z1 = {
|
|
|
26463
26482
|
J[$.identifier] = $;
|
|
26464
26483
|
for (const $ of a.fieldSections) {
|
|
26465
26484
|
const le = $.conditions;
|
|
26466
|
-
for (const [Fe,
|
|
26485
|
+
for (const [Fe, fr] of Object.entries(le))
|
|
26467
26486
|
H.push({
|
|
26468
26487
|
id: `${$.identifier}-${Fe}`,
|
|
26469
26488
|
source: $.identifier,
|
|
@@ -26473,7 +26492,7 @@ const Z1 = {
|
|
|
26473
26492
|
sourceSection: $,
|
|
26474
26493
|
layoutDirection: c
|
|
26475
26494
|
},
|
|
26476
|
-
animated:
|
|
26495
|
+
animated: fr.length > 0,
|
|
26477
26496
|
markerEnd: Ms.Arrow,
|
|
26478
26497
|
style: { strokeWidth: 2, stroke: "var(--base-a8)" },
|
|
26479
26498
|
type: "fieldSectionCondition"
|
|
@@ -26505,14 +26524,14 @@ const Z1 = {
|
|
|
26505
26524
|
return !Za(J, H.source, H.target);
|
|
26506
26525
|
},
|
|
26507
26526
|
[a]
|
|
26508
|
-
), [R, V, F] =
|
|
26527
|
+
), [R, V, F] = _r("title"), [Y, X, te] = _r("description");
|
|
26509
26528
|
return /* @__PURE__ */ _("form", { className: "size-full flex flex-col gap-4", id: ln, onSubmit: r, children: [
|
|
26510
26529
|
!t && /* @__PURE__ */ p(pi, { severity: "danger", helpText: V.error ?? null, children: /* @__PURE__ */ p(
|
|
26511
26530
|
xe.Root,
|
|
26512
26531
|
{
|
|
26513
26532
|
variant: "outline",
|
|
26514
26533
|
size: "md",
|
|
26515
|
-
accentColor: V.error ?
|
|
26534
|
+
accentColor: V.error ? kr.danger : "primary",
|
|
26516
26535
|
children: /* @__PURE__ */ p(
|
|
26517
26536
|
xe.Field,
|
|
26518
26537
|
{
|
|
@@ -26580,10 +26599,10 @@ const Z1 = {
|
|
|
26580
26599
|
]
|
|
26581
26600
|
}
|
|
26582
26601
|
),
|
|
26583
|
-
/* @__PURE__ */ p(
|
|
26602
|
+
/* @__PURE__ */ p(Cr, { size: "sm" }),
|
|
26584
26603
|
/* @__PURE__ */ _(he, { className: "flex flex-col ", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
26585
26604
|
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: () => s == null ? void 0 : s.zoomIn(), type: "button", children: /* @__PURE__ */ p(D, { icon: ht }) }),
|
|
26586
|
-
/* @__PURE__ */ p(ne, { onClick: () => s == null ? void 0 : s.zoomOut(), radius: "none", type: "button", children: /* @__PURE__ */ p(D, { icon:
|
|
26605
|
+
/* @__PURE__ */ p(ne, { onClick: () => s == null ? void 0 : s.zoomOut(), radius: "none", type: "button", children: /* @__PURE__ */ p(D, { icon: en }) }),
|
|
26587
26606
|
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: () => s == null ? void 0 : s.fitView(), type: "button", children: /* @__PURE__ */ p(D, { icon: ac }) })
|
|
26588
26607
|
] })
|
|
26589
26608
|
] }),
|
|
@@ -26663,7 +26682,7 @@ const ms = G((r) => {
|
|
|
26663
26682
|
}
|
|
26664
26683
|
)
|
|
26665
26684
|
] }),
|
|
26666
|
-
/* @__PURE__ */ p(
|
|
26685
|
+
/* @__PURE__ */ p(Cr, { size: "full" }),
|
|
26667
26686
|
/* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
|
|
26668
26687
|
/* @__PURE__ */ _("div", { className: "flex gap-2 justify-between", children: [
|
|
26669
26688
|
/* @__PURE__ */ p(Pe, { accentColor: "base", children: "Conditions" }),
|
|
@@ -26688,7 +26707,7 @@ const ms = G((r) => {
|
|
|
26688
26707
|
o.identifier
|
|
26689
26708
|
))
|
|
26690
26709
|
] }),
|
|
26691
|
-
/* @__PURE__ */ p(
|
|
26710
|
+
/* @__PURE__ */ p(Cr, { size: "full" })
|
|
26692
26711
|
] });
|
|
26693
26712
|
});
|
|
26694
26713
|
ms.displayName = "FieldSectionBuilder";
|
|
@@ -26830,7 +26849,7 @@ const ws = G((r) => {
|
|
|
26830
26849
|
});
|
|
26831
26850
|
ws.displayName = "FieldSectionWithActions";
|
|
26832
26851
|
const Cs = G(() => {
|
|
26833
|
-
const { handleSubmit: r, errors: e } =
|
|
26852
|
+
const { handleSubmit: r, errors: e } = Lr(), { hideTitle: t, hideDescription: n, onCancel: i } = dt(Rn), a = dt(zt), o = T(() => {
|
|
26834
26853
|
a.addFieldSection(new ot({ identifier: W(), fields: [] }));
|
|
26835
26854
|
}, [a]), s = T(async () => {
|
|
26836
26855
|
try {
|
|
@@ -26885,14 +26904,14 @@ const Cs = G(() => {
|
|
|
26885
26904
|
C.forEach((E, I) => {
|
|
26886
26905
|
a.addFieldSection(E, A + I);
|
|
26887
26906
|
}), Le.success({ title: "Sections pasted", description: "Serialized JSON imported successfully." });
|
|
26888
|
-
}, [a]), [c, u, f] =
|
|
26907
|
+
}, [a]), [c, u, f] = _r("title"), [h, d, v] = _r("description");
|
|
26889
26908
|
return /* @__PURE__ */ _("form", { className: "flex flex-col gap-4", id: ln, onSubmit: r, children: [
|
|
26890
26909
|
!t && /* @__PURE__ */ p(pi, { severity: "danger", helpText: u.error ?? null, children: /* @__PURE__ */ p(
|
|
26891
26910
|
xe.Root,
|
|
26892
26911
|
{
|
|
26893
26912
|
variant: "outline",
|
|
26894
26913
|
size: "md",
|
|
26895
|
-
accentColor: u.error ?
|
|
26914
|
+
accentColor: u.error ? kr.danger : "primary",
|
|
26896
26915
|
children: /* @__PURE__ */ p(
|
|
26897
26916
|
xe.Field,
|
|
26898
26917
|
{
|
|
@@ -26964,7 +26983,7 @@ const Cs = G(() => {
|
|
|
26964
26983
|
});
|
|
26965
26984
|
Cs.displayName = "FormBuilderListBuilder";
|
|
26966
26985
|
const e0 = G(
|
|
26967
|
-
|
|
26986
|
+
Pr((r, e) => {
|
|
26968
26987
|
const {
|
|
26969
26988
|
schema: t,
|
|
26970
26989
|
values: n = {},
|
|
@@ -27023,7 +27042,7 @@ const e0 = G(
|
|
|
27023
27042
|
{
|
|
27024
27043
|
id: w,
|
|
27025
27044
|
ref: e,
|
|
27026
|
-
className:
|
|
27045
|
+
className: Ar(d, "flex flex-col gap-4"),
|
|
27027
27046
|
onSubmit: E.handleSubmit,
|
|
27028
27047
|
children: [
|
|
27029
27048
|
!f && /* @__PURE__ */ _(at, { variant: "soft", className: "flex flex-col gap-1", children: [
|
|
@@ -27056,7 +27075,7 @@ const e0 = G(
|
|
|
27056
27075
|
) }) });
|
|
27057
27076
|
})
|
|
27058
27077
|
), As = G((r) => {
|
|
27059
|
-
const { showFormTitle: e } = r, { values: t } =
|
|
27078
|
+
const { showFormTitle: e } = r, { values: t } = Lr(), n = dt(zt), i = ie(() => ({
|
|
27060
27079
|
title: t.title,
|
|
27061
27080
|
description: t.description,
|
|
27062
27081
|
fields: n.fieldSections,
|
|
@@ -27144,12 +27163,12 @@ export {
|
|
|
27144
27163
|
fn as BaseOptionsField,
|
|
27145
27164
|
vo as BaseStringField,
|
|
27146
27165
|
f1 as BooleanEqualsConditionModifier,
|
|
27147
|
-
|
|
27166
|
+
Sr as BooleanField,
|
|
27148
27167
|
xn as BooleanFieldCondition,
|
|
27149
27168
|
S1 as BooleanFieldConditionCell,
|
|
27150
27169
|
ho as BooleanInput,
|
|
27151
27170
|
d1 as BooleanNotEqualsConditionModifier,
|
|
27152
|
-
|
|
27171
|
+
Ir as CheckboxListField,
|
|
27153
27172
|
yn as CheckboxListFieldCondition,
|
|
27154
27173
|
I1 as CheckboxListFieldConditionCell,
|
|
27155
27174
|
go as CheckboxListInput,
|
|
@@ -27179,12 +27198,12 @@ export {
|
|
|
27179
27198
|
pi as InputWithHelpText,
|
|
27180
27199
|
qe as InputWithLabel,
|
|
27181
27200
|
$e as InputWithLabelAndHelpText,
|
|
27182
|
-
|
|
27201
|
+
mr as LONG_TEXT_FIELD_MAX_LENGTH,
|
|
27183
27202
|
Pt as MultiSelectField,
|
|
27184
27203
|
wn as MultiSelectFieldCondition,
|
|
27185
27204
|
O1 as MultiSelectFieldConditionCell,
|
|
27186
27205
|
yo as MultiSelectInput,
|
|
27187
|
-
|
|
27206
|
+
Er as MultiStringField,
|
|
27188
27207
|
Cn as MultiStringFieldCondition,
|
|
27189
27208
|
N1 as MultiStringFieldConditionCell,
|
|
27190
27209
|
fo as MultiStringInput,
|
|
@@ -27200,7 +27219,7 @@ export {
|
|
|
27200
27219
|
$o as NumberNotEqualsConditionModifier,
|
|
27201
27220
|
Qo as NumberRangeInConditionModifier,
|
|
27202
27221
|
Jo as NumberRangeNotInConditionModifier,
|
|
27203
|
-
|
|
27222
|
+
br as OTPField,
|
|
27204
27223
|
_n as OTPFieldCondition,
|
|
27205
27224
|
D1 as OTPFieldConditionCell,
|
|
27206
27225
|
wo as OTPInput,
|
|
@@ -27208,20 +27227,20 @@ export {
|
|
|
27208
27227
|
E1 as PassFailArrayExcludesConditionModifier,
|
|
27209
27228
|
_1 as PassFailArrayIncludesConditionModifier,
|
|
27210
27229
|
C1 as PassFailEqualsConditionModifier,
|
|
27211
|
-
|
|
27230
|
+
Nr as PassFailField,
|
|
27212
27231
|
En as PassFailFieldCondition,
|
|
27213
27232
|
R1 as PassFailFieldConditionCell,
|
|
27214
27233
|
Co as PassFailInput,
|
|
27215
27234
|
A1 as PassFailNotEqualsConditionModifier,
|
|
27216
|
-
|
|
27235
|
+
Tr as RadioField,
|
|
27217
27236
|
Sn as RadioFieldCondition,
|
|
27218
27237
|
M1 as RadioFieldConditionCell,
|
|
27219
27238
|
_o as RadioInput,
|
|
27220
|
-
|
|
27239
|
+
Dr as RatingField,
|
|
27221
27240
|
In as RatingFieldCondition,
|
|
27222
27241
|
V1 as RatingFieldConditionCell,
|
|
27223
27242
|
Eo as RatingInput,
|
|
27224
|
-
|
|
27243
|
+
kr as SEVERITY_COLOR_MAPPING,
|
|
27225
27244
|
$n as SHORT_TEXT_FIELD_MAX_LENGTH,
|
|
27226
27245
|
sn as ScanField,
|
|
27227
27246
|
bn as ScanFieldCondition,
|
|
@@ -27229,7 +27248,7 @@ export {
|
|
|
27229
27248
|
Uo as ScanInput,
|
|
27230
27249
|
Ii as Scanner,
|
|
27231
27250
|
l1 as ScannerProvider,
|
|
27232
|
-
|
|
27251
|
+
or as SelectField,
|
|
27233
27252
|
On as SelectFieldCondition,
|
|
27234
27253
|
F1 as SelectFieldConditionCell,
|
|
27235
27254
|
mo as SelectInput,
|
|
@@ -27240,23 +27259,23 @@ export {
|
|
|
27240
27259
|
Ti as StringArrayNoneConditionModifier,
|
|
27241
27260
|
Ri as StringArrayNotEqualsConditionModifier,
|
|
27242
27261
|
Ni as StringArraySomeConditionModifier,
|
|
27243
|
-
|
|
27262
|
+
cr as StringEqualsConditionModifier,
|
|
27244
27263
|
gn as StringExcludesConditionModifier,
|
|
27245
|
-
|
|
27264
|
+
Rr as StringField,
|
|
27246
27265
|
Nn as StringFieldCondition,
|
|
27247
27266
|
B1 as StringFieldConditionCell,
|
|
27248
27267
|
vn as StringIncludesConditionModifier,
|
|
27249
27268
|
Ho as StringInput,
|
|
27250
|
-
|
|
27251
|
-
|
|
27269
|
+
ur as StringNotEqualsConditionModifier,
|
|
27270
|
+
Mr as TextField,
|
|
27252
27271
|
Tn as TextFieldCondition,
|
|
27253
27272
|
L1 as TextFieldConditionCell,
|
|
27254
27273
|
Go as TextInput,
|
|
27255
27274
|
Ue as UNLABELLED_FIELD_LABEL,
|
|
27256
27275
|
Wo as UNLABELLED_SECTION_LABEL,
|
|
27257
27276
|
Ft as UUIDFile,
|
|
27258
|
-
|
|
27259
|
-
|
|
27277
|
+
zr as UUIDPromise,
|
|
27278
|
+
Vr as UploadField,
|
|
27260
27279
|
Dn as UploadFieldCondition,
|
|
27261
27280
|
k1 as UploadFieldConditionCell,
|
|
27262
27281
|
Xo as UploadInput,
|
|
@@ -27288,12 +27307,12 @@ export {
|
|
|
27288
27307
|
Ao as isPassFailFieldStatus,
|
|
27289
27308
|
xc as isPassFailFieldValue,
|
|
27290
27309
|
gc as isSerializedPassFailFieldValue,
|
|
27291
|
-
|
|
27310
|
+
tn as isStringArray,
|
|
27292
27311
|
u1 as maxFileSizeB,
|
|
27293
27312
|
c1 as maxFileSizeKB,
|
|
27294
|
-
|
|
27313
|
+
wr as maxFileSizeMB,
|
|
27295
27314
|
ar as passFailFieldStatusMapping,
|
|
27296
|
-
|
|
27315
|
+
Or as passFailFieldStatuses,
|
|
27297
27316
|
b0 as separateImagesFromFields,
|
|
27298
27317
|
X1 as serializeFieldValues,
|
|
27299
27318
|
yc as serializePassFailFieldValue,
|